:root {
  color-scheme: light;
  --paper: #f4eedf;
  --paper-deep: #e6dcc7;
  --ink: #1f2d28;
  --ink-soft: #53635c;
  --brick: #a73a2a;
  --brick-dark: #7e2a20;
  --forest: #2b4b3f;
  --gold: #b58a3b;
  --blue: #326a86;
  --line: rgba(40, 56, 49, .18);
  --white: #fffdf7;
  --shadow: 0 22px 70px rgba(39, 42, 34, .15);
  --safe-top: max(16px, env(safe-area-inset-top));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #d8cfbc; }
body { min-height: 100%; margin: 0; color: var(--ink); background: #d8cfbc; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; font-size: 16px; }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(50, 106, 134, .28); outline-offset: 2px; }
img { max-width: 100%; }
.hidden { display: none !important; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .4;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(82, 64, 42, .08) 50%, transparent calc(50% + 1px)),
    radial-gradient(circle at 10% 12%, rgba(167, 58, 42, .14), transparent 28%),
    radial-gradient(circle at 90% 80%, rgba(43, 75, 63, .13), transparent 30%);
}

.app-shell { position: relative; width: min(100%, 560px); min-height: 100svh; margin: 0 auto; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.screen { min-height: 100svh; }
.paper-noise { position: absolute; inset: 0; pointer-events: none; opacity: .12; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.75' numOctaves='3' seed='8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E"); }

.start-screen { position: relative; display: flex; flex-direction: column; min-height: 100svh; padding: calc(var(--safe-top) + 18px) 22px calc(var(--safe-bottom) + 22px); isolation: isolate; }
.start-photo { position: relative; min-height: 38svh; margin: -34px -22px 0; overflow: hidden; }
.start-photo img { width: 100%; height: 44svh; object-fit: cover; object-position: 50% 45%; filter: saturate(.78) contrast(1.02); }
.start-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,36,32,.02) 28%, rgba(244,238,223,.2) 62%, var(--paper) 98%); }
.route-thread { position: absolute; z-index: 2; left: 22px; top: var(--safe-top); display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid rgba(255,253,247,.72); border-radius: 999px; background: rgba(31,45,40,.76); color: #fffdf7; font: 700 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .09em; backdrop-filter: blur(12px); }
.route-thread i { width: 7px; height: 7px; border-radius: 50%; background: #e8c774; box-shadow: 0 0 0 3px rgba(232,199,116,.2); }
.start-content { position: relative; z-index: 3; margin-top: -14px; }
.eyebrow { margin: 0 0 13px; color: var(--brick); font: 800 .72rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .15em; }
.start-title { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: clamp(2.7rem, 12.5vw, 4.3rem); font-weight: 700; line-height: 1.05; letter-spacing: .035em; text-wrap: balance; }
.start-title span { display: block; color: var(--brick); }
.start-lede { margin: 18px 0 0; color: var(--ink-soft); font-family: "Songti SC", "STSong", serif; font-size: 1.05rem; line-height: 1.9; }
.dna-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 24px 0; }
.dna-preview span { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: rgba(31,45,40,.28); font-family: "Songti SC", "STSong", serif; font-size: 1.35rem; background: rgba(255,253,247,.44); }
.start-form { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.start-form label { display: block; margin-bottom: 8px; color: var(--ink-soft); font-size: .9rem; }
.name-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.name-row input { width: 100%; min-height: 51px; padding: 8px 2px; border: 0; border-bottom: 1.5px solid rgba(31,45,40,.48); border-radius: 0; background: transparent; color: var(--ink); font-size: 1.2rem; }
.name-row input::placeholder { color: rgba(83,99,92,.5); }
.route-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0; color: var(--ink-soft); font-size: .78rem; }
.route-meta span { padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,247,.44); }
.safety-note { margin: 14px 0 0; color: var(--ink-soft); font-size: .78rem; line-height: 1.65; }

.primary-button, .secondary-button, .text-button { min-height: 50px; border-radius: 999px; cursor: pointer; }
.primary-button { width: 100%; padding: 13px 20px; border: 1px solid var(--brick); background: var(--brick); color: var(--white); font-weight: 750; letter-spacing: .04em; box-shadow: 0 8px 24px rgba(126,42,32,.18); }
.primary-button:hover { background: var(--brick-dark); }
.primary-button:active { transform: translateY(1px); }
.secondary-button { padding: 11px 18px; border: 1px solid var(--line); background: rgba(255,253,247,.58); color: var(--ink); font-weight: 650; }
.text-button { min-height: 44px; padding: 8px 10px; border: 0; background: transparent; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 4px; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(var(--safe-bottom) + 76px); transform: translate(-50%, 16px); width: min(calc(100% - 40px), 480px); padding: 12px 16px; border-radius: 10px; background: rgba(31,45,40,.94); color: white; text-align: center; font-size: .88rem; opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 760px) {
  body { padding: 28px 0; }
  .app-shell { min-height: calc(100svh - 56px); border-radius: 24px; }
  .screen { min-height: calc(100svh - 56px); }
  .start-screen { min-height: calc(100svh - 56px); }
  .start-photo img { height: min(44svh, 430px); }
}

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

.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; }
.continue-label { margin: 0 0 14px; color: var(--forest); font-weight: 700; }
.game-screen { position: relative; background: var(--paper); }
.tone-uprising { --accent: #9d382c; }
.tone-road { --accent: #b1802f; }
.tone-temple { --accent: #2b4b3f; }
.tone-park { --accent: #326a86; }
.game-header { position: sticky; z-index: 20; top: 0; min-height: 70px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 10px; padding: var(--safe-top) 16px 10px; border-bottom: 1px solid var(--line); background: rgba(244,238,223,.92); backdrop-filter: blur(18px); }
.round-button, .score-pill { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,253,247,.6); color: var(--ink); cursor: pointer; }
.round-button { font: 750 1rem/1 ui-monospace, monospace; }
.score-pill { border-color: rgba(167,58,42,.32); color: var(--brick); font: 800 .76rem/1 ui-monospace, monospace; }
.location-label { min-width: 0; text-align: center; }
.location-label small { display: block; color: var(--accent, var(--brick)); font: 800 .66rem/1.4 ui-monospace, monospace; letter-spacing: .12em; }
.location-label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Songti SC", "STSong", serif; font-size: 1rem; }
.progress-line { position: sticky; z-index: 21; top: calc(var(--safe-top) + 54px); height: 3px; background: rgba(31,45,40,.08); }
.progress-line i { display: block; height: 100%; background: var(--accent, var(--brick)); transition: width .35s ease; }
.game-page { min-height: calc(100svh - 130px); padding: 28px 22px calc(96px + var(--safe-bottom)); }
.page-centered { display: flex; align-items: center; }
.page-centered > article { width: 100%; }
.stamp-dock { position: fixed; z-index: 18; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 560px); min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 18px var(--safe-bottom); border-top: 1px solid var(--line); background: rgba(244,238,223,.94); backdrop-filter: blur(18px); }
.stamp-dock > span { color: var(--ink-soft); font: 800 .64rem/1 ui-monospace, monospace; letter-spacing: .12em; }
.stamp-dock > div { display: flex; gap: 7px; }
.rail-stamp { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(31,45,40,.18); border-radius: 50%; color: rgba(31,45,40,.25); font-family: "Songti SC", serif; }
.rail-stamp.found { border: 1.5px solid var(--brick); color: var(--brick); background: rgba(255,253,247,.72); font-weight: 700; transform: rotate(-3deg); }

.intro-card h1, .puzzle-heading h1, .story-card h1, .success-card h1, .finale-card > h1 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: clamp(2rem, 9vw, 3.2rem); line-height: 1.18; }
.intro-copy { margin: 28px 0; font-family: "Songti SC", "STSong", serif; font-size: 1.05rem; line-height: 1.95; }
.intro-copy p { margin: 0 0 12px; }
.axis-illustration { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto; align-items: center; gap: 8px; margin: 28px 0 34px; color: var(--ink-soft); font: 700 .64rem/1 ui-monospace, monospace; }
.axis-illustration i { height: 1px; position: relative; background: var(--line); }
.axis-illustration i::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--brick); }

.puzzle-number { margin: 0 0 8px; color: var(--accent, var(--brick)); font: 800 .72rem/1.4 ui-monospace, monospace; letter-spacing: .12em; }
.puzzle-prompt { margin: 18px 0 0; color: var(--ink-soft); font-family: "Songti SC", "STSong", serif; font-size: 1.06rem; line-height: 1.9; }
.puzzle-area { margin-top: 30px; }
.answer-input { width: 100%; min-height: 58px; padding: 13px 15px; border: 1.5px solid rgba(31,45,40,.3); border-radius: 8px; background: rgba(255,253,247,.72); color: var(--ink); font-size: 1.05rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.answer-input:focus { border-color: var(--blue); }
.character-template { margin-bottom: 14px; padding: 24px; border: 1px solid var(--line); background: rgba(255,253,247,.48); text-align: center; font-family: "Songti SC", serif; font-size: 2.1rem; letter-spacing: .15em; }
.character-template b { color: var(--brick); }
.choice-grid { display: grid; gap: 10px; }
.choice-button, .match-button, .order-card, .count-button { min-height: 52px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,253,247,.64); color: var(--ink); text-align: left; cursor: pointer; }
.choice-button.selected, .match-button.selected, .count-button.selected { border-color: var(--brick); background: rgba(167,58,42,.08); color: var(--brick); font-weight: 700; }
.feedback { min-height: 52px; padding-top: 12px; color: var(--brick); font-size: .9rem; line-height: 1.55; }
.puzzle-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.puzzle-actions .primary-button, .puzzle-actions .full-row { grid-column: 1 / -1; }
.puzzle-actions .secondary-button { padding-inline: 9px; font-size: .86rem; }
.interaction-guide { margin: 0 0 14px; color: var(--ink-soft); font-size: .83rem; line-height: 1.6; }
.shake { animation: shake .3s linear; }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

.pair-board { margin-bottom: 18px; border-top: 1px solid var(--line); }
.pair-row { min-height: 52px; display: grid; grid-template-columns: 1fr auto 1.2fr; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.pair-row button { padding: 10px 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.pair-row button:not(:disabled) { color: var(--brick); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.pair-row span { color: var(--gold); }
.pair-row strong { color: var(--forest); text-align: right; font-weight: 700; }
.match-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match-columns > div { display: grid; align-content: start; gap: 8px; }
.match-columns small { color: var(--ink-soft); font-size: .75rem; }
.match-columns em { color: var(--ink-soft); font-size: .78rem; font-style: normal; }
.match-button.right { border-color: rgba(50,106,134,.26); color: var(--blue); }
.match-button:disabled { opacity: .35; }

.order-field, .count-field { margin: 0; padding: 0; border: 0; }
.order-field { margin-top: 28px; }
.order-field legend, .count-field legend { margin-bottom: 14px; color: var(--ink); font-weight: 750; }
.count-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.count-button { text-align: center; font: 800 1.1rem/1 ui-monospace, monospace; }
.order-slots { display: grid; gap: 7px; }
.order-slot { min-height: 49px; display: grid; grid-template-columns: 46px 1fr; align-items: center; border: 1px dashed rgba(31,45,40,.24); border-radius: 8px; background: rgba(255,253,247,.4); color: var(--ink-soft); text-align: left; }
.order-slot small { padding-left: 12px; font: 700 .7rem/1 ui-monospace, monospace; }
.order-slot strong { color: var(--ink); font-weight: 650; }
.order-slot.filled { border-style: solid; border-color: rgba(167,58,42,.34); cursor: pointer; }
.order-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.order-card { min-width: 72px; min-height: 44px; flex: 1 0 auto; text-align: center; }
.order-pool > span { color: var(--forest); font-size: .85rem; }

.found-gate { padding: 26px 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,253,247,.48); text-align: center; }
.found-gate > span { display: block; color: var(--brick); font-size: 2.4rem; }
.found-gate p { color: var(--ink-soft); line-height: 1.7; }
.photo-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-option { padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background: var(--white); cursor: pointer; }
.photo-option img { width: 100%; aspect-ratio: 3/4; display: block; object-fit: cover; }
.photo-option span { display: block; padding: 8px 4px; color: var(--ink-soft); font-size: .73rem; }
.photo-option.selected { border-color: var(--brick); }
.photo-option.selected span { background: var(--brick); color: white; }

.success-card { text-align: center; }
.success-mark { width: 116px; height: 116px; display: grid; place-items: center; margin: 0 auto 26px; border: 2px solid var(--brick); color: var(--brick); font-family: "Songti SC", serif; font-size: 4rem; transform: rotate(-4deg); box-shadow: inset 0 0 0 8px var(--paper), inset 0 0 0 10px rgba(167,58,42,.45); }
.success-card p:not(.eyebrow) { margin: 16px auto 30px; max-width: 25rem; color: var(--ink-soft); line-height: 1.75; }

.story-image { position: relative; margin: -28px -22px 24px; overflow: hidden; aspect-ratio: 4/3; }
.story-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8); }
.story-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 66%, var(--paper)); }
.story-card h1 { font-size: 2rem; }
.story-copy { margin: 18px 0 22px; font-family: "Songti SC", "STSong", serif; font-size: 1.06rem; line-height: 1.95; text-align: justify; }
.fact-tag { display: flex; justify-content: space-between; align-items: center; margin: 0 0 26px; padding: 10px 12px; border-left: 3px solid var(--forest); background: rgba(43,75,63,.06); color: var(--forest); font-size: .76rem; }
.fact-tag button { border: 0; background: transparent; color: var(--blue); text-decoration: underline; cursor: pointer; }

.stamp-story { width: 100%; }
.giant-stamp { position: relative; min-height: 260px; display: grid; place-items: center; margin: -10px 0 16px; }
.giant-stamp::before, .giant-stamp::after { content: ""; position: absolute; left: 50%; width: 1px; height: 68px; background: var(--line); }
.giant-stamp::before { top: 0; }
.giant-stamp::after { bottom: 0; }
.giant-stamp span { width: 148px; height: 148px; display: grid; place-items: center; border: 3px double var(--brick); color: var(--brick); font-family: "Songti SC", serif; font-size: 5rem; font-weight: 700; transform: rotate(-3deg); }
.page-stamp .eyebrow { text-align: center; line-height: 1.7; }

.clue-card { position: relative; padding: 26px 20px; border: 1px solid rgba(31,45,40,.22); background: rgba(255,253,247,.46); box-shadow: 10px 12px 0 rgba(167,58,42,.08); }
.clue-seal { position: absolute; right: 18px; top: 16px; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--brick); border-radius: 50%; color: var(--brick); font: 800 1.4rem/1 ui-monospace, monospace; }
.clue-text { margin: 26px 0; font-family: "Songti SC", "STSong", serif; font-size: 1.22rem; line-height: 2.05; }
.clue-rule { color: var(--ink-soft); font-size: .8rem; }
.clue-actions { display: grid; gap: 8px; margin-top: 24px; }
.bonus-badge { display: inline-block; margin-top: 16px; padding: 6px 9px; border-radius: 999px; background: rgba(181,138,59,.12); color: #7c5c22; font-size: .75rem; font-weight: 700; }

.finale-card > h1 { margin-bottom: 6px; }
.finale-subtitle { margin: 0 0 28px; color: var(--ink-soft); font-family: "Songti SC", serif; font-size: 1.15rem; }
.final-stamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 28px 0; }
.final-stamps div { display: grid; gap: 7px; justify-items: center; }
.final-stamps b { width: 64px; height: 64px; display: grid; place-items: center; border: 2px double var(--brick); color: var(--brick); font-family: "Songti SC", serif; font-size: 2rem; transform: rotate(-3deg); }
.final-stamps span { color: var(--ink-soft); font-size: .68rem; text-align: center; }
.dna-meanings { display: grid; gap: 0; border-top: 1px solid var(--line); }
.dna-meanings p { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: baseline; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); line-height: 1.6; }
.dna-meanings b { color: var(--brick); font: 700 1.5rem/1 "Songti SC", serif; }
.finale-card blockquote { margin: 30px 0; padding: 0 0 0 18px; border-left: 3px solid var(--gold); color: var(--ink); font-family: "Songti SC", serif; font-size: 1.25rem; line-height: 1.9; }
.poster-panel { margin: 34px -4px 0; padding: 18px; border-radius: 14px; background: var(--forest); color: var(--paper); }
.poster-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.poster-heading .eyebrow { color: #e4bd6a; }
.poster-heading h2 { margin: 4px 0 16px; font-family: "Songti SC", serif; }
.format-switch { display: flex; padding: 3px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; }
.format-switch button { min-height: 32px; padding: 5px 9px; border: 0; border-radius: 999px; background: transparent; color: rgba(255,255,255,.66); font-size: .73rem; cursor: pointer; }
.format-switch button.selected { background: var(--paper); color: var(--forest); }
.poster-preview { width: 100%; display: block; border-radius: 5px; background: #e9dfcb; box-shadow: 0 14px 30px rgba(0,0,0,.22); }
.poster-status { margin: 10px 0; color: rgba(255,255,255,.62); font-size: .75rem; text-align: center; }
.poster-actions { display: grid; grid-template-columns: 1.5fr 1fr; gap: 8px; }
.poster-panel .secondary-button { border-color: rgba(255,255,255,.3); color: var(--paper); background: transparent; }

.overlay-backdrop { position: fixed; z-index: 80; inset: 0; display: flex; align-items: end; justify-content: center; padding: 16px; background: rgba(24,32,28,.58); backdrop-filter: blur(6px); }
.drawer, .dialog { width: min(100%, 528px); max-height: 88svh; overflow: auto; padding: 18px 20px calc(20px + var(--safe-bottom)); border-radius: 20px 20px 14px 14px; background: var(--paper); box-shadow: var(--shadow); }
.drawer-handle { width: 42px; height: 4px; margin: 0 auto 22px; border-radius: 999px; background: rgba(31,45,40,.2); }
.drawer h2, .dialog h2 { margin: 0 0 16px; font-family: "Songti SC", serif; }
.drawer ol { margin: 18px 0 22px; padding-left: 24px; }
.drawer li { margin-bottom: 13px; padding-left: 5px; color: var(--ink-soft); line-height: 1.7; }
.hint-score, .fallback-note { color: var(--ink-soft); font-size: .78rem; }
.fallback-drawer > p:not(.eyebrow) { line-height: 1.7; }
.fallback-drawer img { width: 100%; max-height: 52svh; display: block; margin: 16px 0; border-radius: 10px; object-fit: contain; background: #d8cfbc; }
.dialog { align-self: center; border-radius: 18px; }
.dialog > p:not(.eyebrow) { color: var(--ink-soft); line-height: 1.7; }
.dialog > div { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; margin-top: 24px; }
.overlay.poster-overlay { position: fixed; z-index: 90; inset: 0; overflow: auto; padding: 64px 16px 100px; background: #17231e; }
.overlay-bar { position: fixed; z-index: 2; top: 0; left: 0; right: 0; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: var(--safe-top) 16px 8px; background: rgba(23,35,30,.95); color: white; }
.overlay-bar p { margin: 0; font-size: .78rem; }
.overlay-bar button { padding: 7px 10px; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: white; }
.poster-overlay > img { width: min(100%, 480px); display: block; margin: 16px auto; }
.download-link { max-width: 480px; display: block; margin: 0 auto; text-align: center; text-decoration: none; }

.dev-panel { position: fixed; z-index: 70; right: 10px; top: 10px; font-size: 12px; }
.dev-panel > button { width: 46px; height: 30px; border: 0; border-radius: 999px; background: #101914; color: #f4eedf; font: 800 11px/1 ui-monospace, monospace; }
#dev-controls { display: none; width: 220px; margin-top: 5px; padding: 10px; border-radius: 10px; background: rgba(16,25,20,.96); box-shadow: 0 10px 28px rgba(0,0,0,.24); }
#dev-controls.open { display: grid; gap: 6px; }
#dev-controls label { display: grid; gap: 4px; color: #e6dcc7; }
#dev-controls select, #dev-controls button { width: 100%; min-height: 32px; border: 1px solid rgba(255,255,255,.15); border-radius: 5px; background: #24342c; color: white; }

@media (max-width: 380px) {
  .game-page { padding-inline: 17px; }
  .puzzle-actions { grid-template-columns: 1fr; }
  .puzzle-actions .primary-button, .puzzle-actions .full-row { grid-column: auto; }
  .photo-options { gap: 5px; }
  .final-stamps b { width: 56px; height: 56px; }
}
