a[data-illustration] { cursor: zoom-in; }
.illustration-viewer {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  background: #f7f5ef;
  color: #25352d;
  font-family: inherit;
  overflow: hidden;
  overscroll-behavior: contain;
}
.illustration-viewer[open] { display: grid; grid-template-rows: auto auto minmax(80px, 1fr) auto; gap: 12px; }
.illustration-viewer::backdrop { background: rgb(25 35 30 / 72%); }
.illustration-viewer *, .illustration-viewer *::before, .illustration-viewer *::after { box-sizing: border-box; }
.iv-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-width: 0; }
.iv-header h2 { margin: 0; font-family: inherit; font-size: clamp(18px, 2.4vw, 28px); line-height: 1.2; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.iv-eyebrow { margin: 0 0 6px; color: #61705e; font-size: 11px; line-height: 1.3; letter-spacing: .08em; }
.illustration-viewer button, .illustration-viewer .iv-original {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #bbc2b5;
  border-radius: 9px;
  background: #fff;
  color: #25352d;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}
.illustration-viewer button:disabled { opacity: .42; cursor: default; }
.illustration-viewer button:not(:disabled):hover, .illustration-viewer .iv-original:hover { background: #e8eddf; }
.illustration-viewer :focus-visible { outline: 3px solid #306d8a; outline-offset: 3px; }
.illustration-viewer .iv-close { flex: 0 0 auto; background: #25352d; color: #fff; border-color: #25352d; }
.illustration-viewer .iv-close:not(:disabled):hover { background: #43583e; }
.iv-close span { font-size: 23px; line-height: 1; }
.iv-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.iv-toolbar [data-iv="in"], .iv-toolbar [data-iv="out"] { font-size: 24px; padding: 4px 10px; }
.iv-scale { min-width: 60px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.iv-original { margin-left: auto; }
.iv-viewport { position: relative; min-height: 0; min-width: 0; overflow: hidden; border: 1px solid #d6dbd0; border-radius: 12px; background: #e9ece5; touch-action: none; user-select: none; overscroll-behavior: contain; }
.iv-viewport[data-pannable="true"] { cursor: grab; }
.iv-viewport[data-pannable="true"][data-dragging="true"] { cursor: grabbing; }
.illustration-viewer .iv-image { position: absolute; top: 0; left: 0; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; object-fit: contain; transform-origin: 0 0; pointer-events: none; user-select: none; }
.iv-image[hidden], .iv-message[hidden], .iv-footer [hidden] { display: none; }
.iv-message { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 28px; color: #455044; text-align: center; font-size: 16px; line-height: 1.5; }
.iv-footer { max-height: 20vh; overflow: auto; padding: 1px 2px; font-size: 14px; line-height: 1.45; }
.iv-footer p { margin: 0; line-height: inherit; }
#illustration-viewer-help { margin-top: 5px; color: #61705e; font-size: 12px; }
.illustration-viewer .iv-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .illustration-viewer { padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  .illustration-viewer[open] { gap: 9px; }
  .iv-header { gap: 10px; }
  .iv-eyebrow { font-size: 9px; }
  .illustration-viewer .iv-close { padding: 8px 10px; font-size: 12px; }
  .iv-toolbar { gap: 6px; }
  .iv-toolbar button, .illustration-viewer .iv-original { padding: 8px 10px; font-size: 13px; }
  .iv-original { margin-left: 0; }
  .iv-scale { min-width: 48px; }
  .iv-footer { max-height: 18vh; font-size: 12px; }
  #illustration-viewer-help { font-size: 11px; }
}
@media (max-height: 500px) {
  .illustration-viewer { padding-top: 8px; padding-bottom: 8px; }
  .illustration-viewer[open] { gap: 6px; }
  .iv-eyebrow { display: none; }
  .iv-header h2 { font-size: 18px; }
  .iv-footer { max-height: 15vh; }
  #illustration-viewer-help { display: none; }
}
@media print { .illustration-viewer, .illustration-viewer[open] { display: none !important; } }
