@font-face {
  font-family: 'Patrick Hand';
  src: url('assets/fonts/patrick-hand-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #d6ab45;
  --paper: #fffcf4;
  --ink: #302820;
  --muted: #4e3d2e;
  --accent: #a83d24;
  --red: #96331f;
  --rust: #96331f;
  --green: #31562f;
  --line: #302820;
  --decor: #76541e;
  --white: #fffcf4;
  --button: #fffcf4;
}

* { box-sizing: border-box; }
html { background: var(--page); scrollbar-gutter: stable; }
body {
  position: relative;
  margin: 0;
  min-height: 100dvh;
  padding: 0 0 max(40px, env(safe-area-inset-bottom));
  background-color: var(--page);
  background-image: url('assets/art/paper-grain.svg');
  background-size: 420px 420px;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  line-height: 1.45;
}

.decorative-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.art-piece {
  position: absolute;
  display: block;
  height: auto;
  opacity: 0.82;
  pointer-events: none;
}
.game-art-envelope { top: 270px; left: -120px; width: 680px; opacity: 0.88; transform: rotate(-6deg); }
.game-art-bill { top: 102px; right: -100px; width: 560px; opacity: 0.84; transform: rotate(6deg); }
.game-art-coins { top: 356px; right: -20px; width: 390px; opacity: 0.8; transform: rotate(-10deg); }
.game-art-stack { top: 126px; left: -70px; width: 380px; opacity: 0.84; transform: rotate(4deg); }
.game-art-bill-low { top: 574px; left: 74px; width: 500px; opacity: 0.78; transform: rotate(-8deg); }
.game-art-coins-low { top: 590px; left: 42%; width: 330px; opacity: 0.84; transform: rotate(12deg); }
.game-art-stack-low { top: 582px; right: 18px; width: 280px; opacity: 0.78; transform: rotate(-6deg); }
.game-art-mobile { display: none; }
.collection-art-bill { top: 112px; right: -110px; width: 560px; opacity: 0.84; transform: rotate(6deg); }
.collection-art-coins { top: 650px; left: -118px; width: 390px; opacity: 0.8; transform: rotate(-10deg); }
.collection-art-stack { top: 1270px; right: -58px; width: 370px; opacity: 0.84; transform: rotate(5deg); }
.collection-art-envelope { top: 1800px; left: -142px; width: 680px; opacity: 0.86; transform: rotate(-7deg); }
.collection-art-bill-low { top: 2420px; right: -82px; width: 500px; opacity: 0.78; transform: rotate(-9deg); }
.collection-art-coins-low { top: 2840px; left: -48px; width: 340px; opacity: 0.84; transform: rotate(12deg); }
.site-header,
.game-screen,
.collection-main { position: relative; z-index: 1; }

button, a { font: inherit; }
button { color: inherit; }
a {
  color: var(--ink);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}

.site-header {
  width: min(1160px, calc(100% - 32px));
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 2px 6px;
}

.site-name {
  min-height: 80px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: var(--ink);
  font-family: 'Patrick Hand', 'Comic Sans MS', cursive;
  font-size: 68px;
  line-height: 0.88;
  text-decoration: none;
}
.title-line { display: inline-flex; align-items: center; gap: 9px; }
.title-words { display: inline-flex; gap: 0.17em; white-space: nowrap; }
.title-print { color: var(--ink); }
.title-check { position: relative; display: inline-block; color: #963b24; }
.title-check-ghost {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: #963b24;
  opacity: 0.18;
  transform: translate(2px, 2px);
  pointer-events: none;
}
.title-check-front { position: relative; z-index: 1; }
.site-name .title-underline { width: 74%; height: 9px; margin-top: 4px; overflow: visible; }
.site-name path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 26px;
  white-space: nowrap;
}
.site-header nav a, .nav-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 21px;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
  cursor: pointer;
}
.site-header [aria-current='page'] { text-decoration-thickness: 2.5px; }

h1, h2, h3 { font-family: 'Patrick Hand', 'Comic Sans MS', cursive; font-weight: 400; }
h1, h2, h3, p { overflow-wrap: break-word; }

.sketch-button, .primary-button, .secondary-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 9px 7px 10px 8px;
  background: var(--button);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.primary-button { background: var(--accent); color: var(--white); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.46; cursor: not-allowed; transform: none; }

.game-screen {
  width: fit-content;
  max-width: calc(100% - 24px);
  display: flex;
  flex-direction: column;
  margin: 20px auto 0;
  padding: 24px;
  border: 1px solid rgb(48 40 32 / 0.74);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: 0 7px 14px rgb(82 55 25 / 0.2);
}
.prompt { width: 100%; margin: 0 0 14px; }
.prompt h1 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
}

.image-frame {
  position: relative;
  display: grid;
  place-items: center;
  max-width: 100%;
  margin-inline: auto;
  overflow: visible;
  border: 0;
  background: transparent;
}
.image-message {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: grid;
  place-content: center;
  margin: 0;
  padding: 28px;
  text-align: center;
}
.image-canvas {
  grid-area: 1 / 1;
  position: relative;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  cursor: crosshair;
  touch-action: manipulation;
}
.game-side-images {
  width: 100%;
  height: 100%;
  display: grid;
  align-items: stretch;
  gap: 8px;
}
.game-side-images-stack { gap: 6px; }
.game-side {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
.game-side > img {
  position: absolute;
  max-width: none;
  height: auto;
  user-select: none;
  pointer-events: none;
}
.guess-marker {
  position: absolute;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--red);
  outline: 2px solid var(--ink);
  pointer-events: none;
}
.guess-marker::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1.5px solid var(--white);
  border-radius: 50%;
}
.answer-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.answer-region {
  fill: none;
  stroke: var(--rust);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.response-slot {
  order: 4;
  position: relative;
  width: 100%;
  padding-top: 0;
  min-height: 0;
}
.response-slot:has(.feedback:not([hidden]), .answer-panel:not([hidden])) { padding-top: 16px; }
.feedback {
  position: static;
  max-width: 620px;
  min-height: 33px;
  margin: 0 auto;
  font-size: 22px;
  font-weight: 600;
}
.feedback[data-tone='correct'] { color: var(--green); }
.feedback[data-tone='wrong'] { color: var(--red); }

.answer-panel {
  max-width: 850px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 20px;
  align-items: start;
  margin: 0 auto;
}
.answer-success { grid-column: 1; grid-row: 1; margin: 0; color: var(--green); font-weight: 600; }
.answer-panel h2 { grid-column: 1; grid-row: 2; margin: 0 0 2px; font-family: Arial, Helvetica, sans-serif; font-size: 28px; font-weight: 700; line-height: 1.15; }
.answer-panel > p { margin: 0; font-size: 22px; line-height: 1.3; }
.answer-panel > #answer-explanation { grid-column: 1; grid-row: 3; }
.answer-closeup {
  grid-column: 2;
  grid-row: 1 / 4;
  width: min(240px, 28vw);
  margin: 0;
}
.answer-closeup-crop {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
}
.answer-closeup-crop img { position: absolute; max-width: none; height: auto; }
.answer-closeup figcaption { margin-top: 4px; font-size: 18px; line-height: 1.25; }
.source-details { grid-column: 1; grid-row: 4; align-self: end; margin: 0; }
.source-details summary {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  font-size: 18px;
  cursor: pointer;
}
.source-details p {
  margin: 7px 0;
  color: var(--muted);
  font-size: 18px;
}

.play-actions {
  order: 3;
  max-width: 760px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 18px auto 0;
}
#enlarge-link { min-height: 48px; display: inline-flex; align-items: center; font-size: 22px; }
.action-row { display: flex; flex-wrap: wrap; gap: 12px; }

dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 26px;
  border: 1.5px solid var(--ink);
  border-radius: 8px 6px 9px 7px;
  background: var(--white);
  color: var(--ink);
  font-size: 22px;
  line-height: 1.5;
}
dialog::backdrop { background: rgba(48, 40, 32, 0.5); }
.help-dialog {
  width: min(650px, calc(100% - 32px));
  padding: 0;
  border: 1.5px solid var(--ink);
  border-radius: 7px 5px 8px 6px;
  background-color: var(--paper);
  background-image: url('assets/art/paper-grain.svg');
  background-size: 360px 360px;
  box-shadow: 0 10px 24px rgb(82 55 25 / 0.24);
}
.help-dialog-inner {
  position: relative;
  min-width: 0;
  padding: 30px 32px 22px;
}
.help-dialog .dialog-head {
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgb(48 40 32 / 0.42);
}
.help-dialog .dialog-head h2 {
  font-size: 44px;
  line-height: 1;
}
.help-instructions {
  display: grid;
  gap: 12px;
  max-width: 46ch;
}
.help-instructions p {
  margin: 0;
  font-size: 22px;
  line-height: 1.45;
}
.help-dialog .keyboard-controls {
  margin-top: 18px;
  padding-top: 8px;
  border-top: 1px solid rgb(48 40 32 / 0.28);
}
.help-dialog .keyboard-controls p {
  max-width: 48ch;
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.45;
}
.help-dialog-art {
  display: flex;
  justify-content: flex-end;
  min-height: 0;
  margin: -4px 4px -8px 0;
  pointer-events: none;
  user-select: none;
}
.help-dialog-art img {
  width: 130px;
  height: auto;
  opacity: 0.72;
  pointer-events: none;
}
.image-dialog { width: min(1050px, calc(100% - 32px)); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 10px; }
.dialog-head h2 { margin: 0; font-size: 34px; line-height: 1.1; }
.close-button { background: var(--button); }
.keyboard-controls { margin-top: 14px; }
.keyboard-controls summary {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 22px;
  cursor: pointer;
}
.keyboard-controls p { margin: 5px 0 0; }
.full-image-gallery {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 14px;
}
.full-image-gallery figure { max-width: 100%; margin: 0; text-align: center; }
.full-image-crop {
  position: relative;
  display: block;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
}
.full-image-crop img { position: absolute; max-width: none; height: auto; }
.full-image-gallery figcaption { margin-top: 6px; font-size: 18px; }

.collection-main {
  width: min(1120px, calc(100% - 24px));
  margin: 18px auto 0;
}
.collection-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 4px 14px;
  border-bottom: 1.5px solid rgb(48 40 32 / 0.62);
}
.collection-intro h1 { margin: 0; font-size: 52px; line-height: 1; }
.collection-detail-active .collection-intro { display: none; }
.collection-play-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
}
.collection-gallery {
  padding: 4px 0 20px;
}
.collection-status {
  min-height: 252px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  margin-top: 20px;
  border: 1px solid rgb(48 40 32 / 0.55);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: 0 7px 14px rgb(82 55 25 / 0.18);
  text-align: center;
}
.collection-status p { margin: 0; font-size: 22px; }
.gallery-entry {
  position: relative;
  min-width: 0;
  display: block;
  padding: 10px 10px 14px;
  border: 1px solid transparent;
  border-radius: 4px 6px 5px 3px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
}
.gallery-entry:hover,
.gallery-entry:focus-visible {
  border-color: rgb(118 84 30 / 0.35);
  background: rgb(255 249 237 / 0.58);
}
.gallery-entry:focus-visible { outline-offset: 1px; }
.album-section {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid rgb(48 40 32 / 0.62);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: 0 7px 14px rgb(82 55 25 / 0.18);
}
.album-section + .album-section {
  margin-top: 26px;
}
.album-section-title {
  margin: 0 0 18px;
  font-size: 40px;
  line-height: 1;
}
.collection-art-break,
.collection-art-tail {
  position: relative;
  pointer-events: none;
  user-select: none;
}
.collection-art-break { height: 330px; margin: -8px 0 -12px; }
.collection-art-tail { height: 430px; margin-top: -8px; }
.collection-art-break img,
.collection-art-tail img {
  position: absolute;
  display: block;
  height: auto;
  pointer-events: none;
}
.collection-break-stack { top: -24px; right: 4%; width: 360px; opacity: 0.82; transform: rotate(6deg); }
.collection-break-coins { top: 132px; right: 34%; width: 270px; opacity: 0.76; transform: rotate(-12deg); }
.collection-tail-envelope { top: -8px; left: -7%; width: 650px; opacity: 0.84; transform: rotate(-6deg); }
.collection-tail-bill { top: 122px; right: -2%; width: 480px; opacity: 0.76; transform: rotate(8deg); }
.album-grid {
  display: grid;
  gap: 26px 16px;
}
.album-grid-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.album-grid-coins { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-photo {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgb(48 40 32 / 0.58);
  border-radius: 2px 3px 2px 4px;
  background: #f7eedf;
}
.specimen-mount-note { aspect-ratio: 1.62 / 1; }
.specimen-mount-coin { aspect-ratio: 1 / 1; padding: 14px; }
.gallery-copy { padding: 11px 4px 0; }
.gallery-copy h3 { margin: 0 0 3px; font-family: Arial, Helvetica, sans-serif; font-size: 25px; font-weight: 700; line-height: 1.2; }
.gallery-copy p { margin: 0; color: var(--muted); font-size: 21px; line-height: 1.3; }
.gallery-entry:hover h3,
.gallery-entry:focus-visible h3 { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.collection-image-group { min-width: 0; }
.collection-image-group-gallery {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.collection-image-group-gallery figure {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.collection-image-group-gallery.collection-image-pair figure { width: auto; flex: 1 1 0; }
.collection-image-group-gallery .collection-crop { max-width: 100%; max-height: 100%; border-color: rgb(48 40 32 / 0.45); }
.gallery-entry-coin .collection-image-group-gallery .collection-crop { border: 0; background: transparent; }
.collection-detail {
  margin-top: 22px;
  padding: 22px 24px 24px;
  border: 1px solid rgb(48 40 32 / 0.62);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: 0 7px 14px rgb(82 55 25 / 0.18);
}
.all-items-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 22px;
}
.collection-item {
  display: grid;
  grid-template-columns: minmax(320px, 56%) minmax(0, 1fr);
  align-items: start;
  gap: 30px;
  padding: 10px 0 14px;
}
.collection-image { min-width: 0; display: grid; gap: 14px; }
.collection-image figure { min-width: 0; max-width: 100%; margin: 0; }
.detail-mount {
  width: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px solid rgb(48 40 32 / 0.58);
  border-radius: 2px 4px 3px 2px;
  background: #f4ead9;
  box-shadow: 0 6px 11px rgb(82 55 25 / 0.15);
}
.detail-mount-note { padding: 14px; }
.detail-mount-coin { padding: 18px; }
.collection-image-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.collection-image-pair figure { min-width: 0; max-width: calc(50% - 5px); }
.collection-crop {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px 4px 3px 2px;
  background: var(--white);
}
.collection-crop img { position: absolute; max-width: none; height: auto; }
.collection-image-group-detail { width: 100%; display: flex; align-items: center; justify-content: center; }
.collection-image-group-detail figure { min-width: 0; max-width: 100%; }
.collection-image-group-detail .collection-crop { max-width: 100%; }
.detail-mount-coin .collection-crop { border-color: rgb(48 40 32 / 0.4); }
.collection-closeup {
  width: min(360px, 100%);
  justify-self: center;
  padding: 10px;
  border: 1px solid rgb(48 40 32 / 0.42);
  border-radius: 2px 3px 2px 4px;
  background: #f4ead9;
  box-shadow: 0 4px 8px rgb(82 55 25 / 0.12);
}
.collection-closeup figcaption {
  margin: 0 0 7px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}
.collection-closeup-crop {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgb(48 40 32 / 0.55);
  background: var(--white);
}
.collection-closeup-crop img { position: absolute; max-width: none; height: auto; }
.collection-copy h2 { margin: 2px 0 8px; font-family: Arial, Helvetica, sans-serif; font-size: 30px; font-weight: 700; line-height: 1.15; }
.collection-meta { margin: 0 0 3px; color: var(--muted); }
.collection-copy p { margin: 9px 0; font-size: 21px; line-height: 1.45; }
.collection-credit { color: var(--muted); font-size: 18px; }
.collection-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 4px;
}

@media (max-width: 1000px) and (min-width: 681px) {
  .album-grid-notes,
  .album-grid-coins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1099px) and (min-width: 761px) {
  .decorative-art .art-piece { display: none; }
}

.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;
}
[hidden] { display: none !important; }

@media (max-width: 760px) {
  body { padding: 0 0 max(32px, env(safe-area-inset-bottom)); font-size: 20px; line-height: 1.45; }
  .site-header {
    width: calc(100% - 24px);
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: max(8px, env(safe-area-inset-top)) 0 4px;
  }
  .site-name { min-height: 66px; font-size: 48px; }
  .title-line { gap: 6px; }
  .site-name .title-underline { width: 76%; margin-top: 3px; }
  .site-header nav { width: 100%; gap: 20px; flex-wrap: wrap; justify-content: flex-start; }
  .site-header nav a, .nav-button { font-size: 20px; }
  .decorative-art .art-piece { display: none; }
  .game-art-mobile {
    top: 570px;
    right: -118px;
    display: block !important;
    width: 330px;
    opacity: 0.8;
    transform: rotate(8deg);
  }
  .game-art-envelope {
    top: 484px;
    left: -172px;
    display: block !important;
    width: 380px;
    opacity: 0.84;
    transform: rotate(-8deg);
  }
  .game-screen { max-width: calc(100% - 24px); margin-top: 12px; padding: 16px; }
  .prompt { margin-bottom: 10px; }
  .prompt h1 { font-size: 28px; }
  .feedback, .answer-panel > p { font-size: 20px; }
  .answer-panel h2 { font-size: 25px; }
  .response-slot { padding-top: 7px; }
  .response-slot { min-height: 0; }
  .answer-panel { grid-template-columns: 1fr; }
  .answer-success, .answer-panel h2, .answer-panel > #answer-explanation, .answer-closeup, .source-details { grid-column: 1; }
  .answer-success { grid-row: 1; }
  .answer-panel h2 { grid-row: 2; }
  .answer-panel > #answer-explanation { grid-row: 3; }
  .answer-closeup { grid-row: 4; width: min(260px, 100%); margin: 5px auto 0; }
  .source-details { grid-row: 5; }
  .answer-panel > p { line-height: 1.35; }
  .play-actions { align-items: center; gap: 10px; }
  #enlarge-link { font-size: 20px; }
  .action-row > button { font-size: 20px; }
  dialog { font-size: 20px; }
  .help-dialog {
    width: min(650px, calc(100% - 20px));
    max-height: calc(100dvh - 20px);
  }
  .help-dialog-inner { padding: 22px 18px 16px; }
  .help-dialog .dialog-head { align-items: flex-start; gap: 14px; margin-bottom: 16px; }
  .help-dialog .dialog-head h2 { font-size: 36px; }
  .help-dialog .close-button { min-height: 48px; padding-inline: 15px; font-size: 20px; }
  .help-instructions { gap: 10px; }
  .help-instructions p { font-size: 20px; line-height: 1.4; }
  .help-dialog .keyboard-controls { margin-top: 15px; }
  .help-dialog .keyboard-controls p { font-size: 18px; }
  .help-dialog-art { margin-top: 0; margin-right: 0; }
  .help-dialog-art img { width: 100px; opacity: 0.68; }
  .collection-main { width: calc(100% - 24px); margin-top: 12px; }
  .collection-intro h1 { font-size: 42px; }
  .collection-gallery { padding-top: 4px; }
  .album-section { margin-top: 16px; padding: 16px; }
  .album-section + .album-section { margin-top: 18px; }
  .album-section-title { font-size: 37px; }
  .collection-art-break { display: block; height: 136px; margin: -2px 0 -6px; overflow: hidden; }
  .collection-art-break .collection-break-stack { top: -74px; right: -72px; width: 300px; opacity: 0.78; }
  .collection-break-coins { display: none !important; }
  .collection-art-tail { height: 158px; margin-top: -4px; overflow: hidden; }
  .collection-art-tail .collection-tail-envelope { top: -60px; left: -132px; width: 390px; opacity: 0.82; }
  .collection-tail-bill { display: none !important; }
  .album-grid-notes,
  .album-grid-coins { grid-template-columns: 1fr; gap: 24px; }
  .gallery-entry { padding: 7px 5px 12px; }
  .gallery-photo { max-height: none; }
  .specimen-mount-note { aspect-ratio: 1.55 / 1; }
  .specimen-mount-coin { width: min(100%, 430px); justify-self: center; }
  .gallery-copy p { font-size: 20px; }
  .gallery-copy h3 { font-size: 24px; }
  .collection-detail { margin-top: 16px; padding: 16px; }
  .collection-item { grid-template-columns: 1fr; gap: 12px; padding-top: 4px; }
  .collection-image { max-width: 560px; }
  .detail-mount { padding: 10px; }
  .collection-image-group-detail[data-piece='fractional-5-cent-inverted-reverse'] {
    flex-direction: column;
  }
  .collection-image-group-detail[data-piece='fractional-5-cent-inverted-reverse'] figure {
    width: 100%;
    max-width: 100%;
  }
  .collection-copy h2 { font-size: 27px; }
  .collection-copy p { font-size: 20px; }
  .collection-actions { padding-top: 0; }
}

@media (max-width: 460px) {
  .site-header nav a, .nav-button { font-size: 22px; }
  .play-actions { flex-direction: column; flex-wrap: nowrap; justify-content: center; gap: 12px; }
  #enlarge-link { flex: 0 0 auto; }
  .action-row { display: grid; grid-template-columns: 1fr 1fr; }
  .action-row > button { min-width: 0; padding-inline: 12px; }
  .collection-actions { gap: 8px; }
  .collection-actions .sketch-button { min-width: 0; padding-inline: 12px; }
}

@media (max-height: 720px) {
  .prompt { margin-bottom: 4px; }
  .response-slot { padding-top: 5px; }
  .play-actions { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.001ms !important; }
}

@media print {
  .site-header nav, button, .play-actions { display: none !important; }
  body { background: #fff; color: #111; }
  .decorative-art, .collection-art-break, .collection-art-tail, .help-dialog-art { display: none !important; }
}
