:root {
  color-scheme: light;
  --ink: #294c49;
  --muted: #6c7e79;
  --paper: #fffdf7;
  --cream: #f7f0dc;
  --line: #ddd2b5;
  --green: #4b9672;
  --green-dark: #357457;
  --yellow: #efb943;
  --coral: #e97567;
  --navy: #384e59;
  --purple: #7667a2;
  --shadow: 0 18px 42px rgba(67, 76, 55, 0.13);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 0; background: #f4efdf; }
body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 13px 13px, rgba(255,255,255,.72) 0 2px, transparent 2.4px) 0 0 / 29px 29px,
    linear-gradient(145deg, #f7f1df, #eaf1e4 58%, #f6eadb);
}
button { color: inherit; font: inherit; }
button:focus-visible { outline: 4px solid rgba(239,185,67,.55); outline-offset: 3px; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }

.app { width: min(1120px, calc(100% - 32px)); min-height: 100vh; margin: 0 auto; padding: 22px 0 48px; }
.paper-card, .loading-card { background: rgba(255,253,247,.95); border: 2px solid rgba(221,210,181,.94); box-shadow: var(--shadow); }
.loading-card { display: grid; min-height: 300px; margin-top: 80px; place-items: center; align-content: center; gap: 10px; border-radius: 40px; font-size: 20px; font-weight: 900; }
.loading-card span { font-size: 55px; }

.topbar { display: flex; min-height: 70px; margin-bottom: 22px; padding: 9px 11px; align-items: center; justify-content: space-between; gap: 16px; background: rgba(255,253,247,.84); border: 2px solid rgba(221,210,181,.85); border-radius: 24px; box-shadow: 0 10px 26px rgba(70,78,55,.08); backdrop-filter: blur(8px); }
.brand, .archive-button { display: flex; min-height: 48px; align-items: center; color: var(--ink); background: none; border: 0; cursor: pointer; }
.brand { gap: 11px; padding: 3px; text-align: left; }
.brand-mark { display: grid; width: 48px; height: 48px; place-items: center; background: #f9e7b6; border-radius: 16px; font-size: 24px; transform: rotate(-5deg); }
.brand strong, .brand small, .archive-button strong, .archive-button small { display: block; }
.brand strong { margin-bottom: 1px; font-size: 18px; }
.brand small { color: var(--muted); font-size: 12px; }
.archive-button { gap: 9px; padding: 6px 10px; border-radius: 15px; }
.archive-button:hover { background: #f2ecda; }
.archive-button > span:first-child { display: grid; width: 35px; height: 35px; place-items: center; color: #fff; background: var(--navy); border-radius: 11px; font-size: 19px; }
.archive-button strong { font-size: 13px; }
.archive-button small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.hero { position: relative; display: grid; min-height: 450px; grid-template-columns: minmax(0,1.05fr) minmax(400px,.95fr); overflow: hidden; border-radius: 44px; }
.hero::before { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 48%, rgba(247,226,171,.37)); content: ""; }
.hero-copy { position: relative; z-index: 2; align-self: center; padding: 55px 24px 55px 54px; }
.eyebrow, .card-kicker { display: inline-block; margin-bottom: 9px; color: #8c6a34; font-size: 11px; font-weight: 900; letter-spacing: .13em; }
.hero h1 { max-width: 590px; margin-bottom: 18px; font-size: clamp(47px,6vw,74px); line-height: .98; letter-spacing: -.045em; }
.hero-copy > p { max-width: 560px; margin-bottom: 28px; color: #536d67; font-size: 19px; line-height: 1.5; }
.hero-actions, .result-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button { min-height: 48px; padding: 13px 20px; border: 0; border-radius: 16px; cursor: pointer; font-weight: 900; transition: transform 160ms ease, box-shadow 160ms ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button-primary { color: #fff; background: linear-gradient(180deg,#59a47d,#438b68); box-shadow: 0 8px 0 #347457,0 13px 20px rgba(52,116,87,.18); }
.button-primary:active:not(:disabled) { box-shadow: 0 3px 0 #347457,0 7px 12px rgba(52,116,87,.16); }
.button-soft { color: #755a2d; background: #f8e6b4; box-shadow: inset 0 0 0 2px #ead08e; }
.button-soft span { margin-left: 5px; font-size: 12px; }
.button-outline { color: var(--ink); background: #fffdf7; box-shadow: inset 0 0 0 2px var(--line); }

.hero-board { position: relative; min-height: 450px; background: linear-gradient(145deg,#3e5660,#31454f); border-left: 3px solid #d6c49d; }
.hero-board::before { position: absolute; inset: 0; opacity: .17; background: radial-gradient(circle,#fff 1px,transparent 1.4px) 0 0 / 20px 20px; content: ""; }
.hero-photo { position: absolute; z-index: 2; display: grid; width: 145px; height: 165px; padding: 8px 8px 28px; place-items: center; background: #fffaf0; border-radius: 4px; box-shadow: 0 12px 20px rgba(18,29,33,.27); }
.hero-photo img { width: 100%; height: 100%; object-fit: contain; }
.photo-one { top: 45px; left: 34px; transform: rotate(-7deg); }
.photo-two { right: 35px; bottom: 32px; transform: rotate(7deg); }
.board-pin { position: absolute; z-index: 4; width: 15px; height: 15px; background: var(--coral); border: 3px solid #ffb8ae; border-radius: 50%; box-shadow: 0 3px 4px rgba(0,0,0,.25); }
.pin-one { top: 43px; left: 96px; }.pin-two { right: 98px; bottom: 179px; background: var(--yellow); border-color: #ffe09c; }
.hero-lens { position: absolute; z-index: 5; top: 82px; right: 72px; width: 205px; height: 205px; padding: 14px; background: #f2c35b; border: 7px solid #243b43; border-radius: 50%; box-shadow: 0 19px 25px rgba(17,31,37,.35), inset 0 0 0 4px #fff7d6; }
.hero-clue { display: block; width: 100%; height: 100%; background-color: #f8f0dc; background-repeat: no-repeat; background-position: 28% 69%; background-size: 270%; border-radius: 50%; }
.lens-handle { position: absolute; z-index: 4; top: 267px; right: 56px; width: 45px; height: 145px; background: #243b43; border: 5px solid #f2c35b; border-radius: 22px; transform: rotate(-32deg); transform-origin: top; box-shadow: 0 11px 15px rgba(17,31,37,.3); }
.evidence-line { position: absolute; z-index: 1; height: 3px; background: #d66f62; transform-origin: left; }
.line-one { top: 152px; left: 150px; width: 135px; transform: rotate(18deg); }.line-two { right: 99px; bottom: 155px; width: 160px; transform: rotate(-46deg); }

.section-block { margin-top: 50px; }
.section-heading { display: flex; margin: 0 7px 19px; align-items: end; justify-content: space-between; gap: 22px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2, .archive-callout h2 { margin-bottom: 0; font-size: 31px; letter-spacing: -.025em; }
.section-heading > p { max-width: 420px; margin-bottom: 3px; color: var(--muted); font-size: 14px; text-align: right; }
.steps-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.step-card { position: relative; min-height: 235px; padding: 27px; overflow: hidden; border-radius: 30px; }
.step-number { position: absolute; top: 19px; right: 20px; display: grid; width: 35px; height: 35px; place-items: center; color: #806129; background: #f8e8b9; border-radius: 50%; font-size: 14px; font-weight: 900; }
.step-icon { display: grid; width: 66px; height: 66px; margin-bottom: 17px; place-items: center; background: #e3efe4; border-radius: 21px; }
.step-cards { background: #e5edf2; }.step-stamp { background: #f8e2dd; }
.step-icon svg { width: 42px; height: 42px; fill: none; stroke: var(--green-dark); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.step-card h3 { margin-bottom: 8px; font-size: 20px; }.step-card p { margin-bottom: 0; color: var(--muted); line-height: 1.47; }

.level-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.level-card { position: relative; overflow: hidden; border-radius: 32px; }
.case-tab { position: absolute; z-index: 4; top: 14px; left: 14px; right: 14px; display: flex; height: 33px; padding: 0 11px; align-items: center; justify-content: space-between; color: #fff; background: var(--level); border-radius: 11px; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.case-tab b { font-size: 10px; letter-spacing: 0; }
.level-preview { position: relative; height: 205px; overflow: hidden; background: linear-gradient(145deg,color-mix(in srgb,var(--level) 23%,#fff),#f8f1dd); border-bottom: 2px solid var(--line); }
.level-preview > span { position: absolute; bottom: 4px; left: calc(12% + var(--p) * 25%); display: grid; width: 116px; height: 145px; place-items: center; transform: rotate(calc((var(--p) - 1) * 6deg)); }
.level-preview img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 6px rgba(62,72,49,.14)); }
.preview-lens { position: absolute; z-index: 2; right: 15px; bottom: 9px; width: 75px; height: 75px; background: rgba(255,253,247,.72); border: 8px solid #344b55; border-radius: 50%; box-shadow: 0 7px 14px rgba(39,54,60,.25); }
.preview-lens::after { position: absolute; right: -22px; bottom: -35px; width: 17px; height: 48px; background: #344b55; border-radius: 10px; content: ""; transform: rotate(-39deg); }
.level-copy { padding: 23px 24px 27px; }
.level-copy h3 { margin-bottom: 7px; font-size: 24px; }.level-copy > p { min-height: 45px; margin-bottom: 15px; color: var(--muted); line-height: 1.42; }
.level-progress { display: flex; margin-bottom: 18px; align-items: center; justify-content: space-between; gap: 9px; color: var(--muted); font-size: 13px; font-weight: 800; }
.level-progress > span:last-child { white-space: nowrap; letter-spacing: 1px; }
.level-copy .button { width: 100%; }
.star-filled { color: #efaf34; text-shadow: 0 2px 0 #c78e1e; }.star-empty { color: #ded8c7; text-shadow: none; }

.archive-callout { display: grid; margin-top: 44px; padding: 26px 30px; grid-template-columns: 180px minmax(0,1fr) auto; align-items: center; gap: 26px; border-radius: 30px; }
.archive-stack { position: relative; height: 105px; }
.archive-stack img { position: absolute; top: 0; left: calc(var(--i) * 34px); width: 92px; height: 105px; padding: 5px; object-fit: contain; background: #fffaf0; border: 2px solid var(--line); border-radius: 10px; box-shadow: 0 7px 13px rgba(61,70,49,.12); transform: rotate(calc((var(--i) - 1.5) * 5deg)); }
.archive-callout .eyebrow { margin-bottom: 4px; }.archive-callout h2 { margin-bottom: 5px; font-size: 23px; }.archive-callout p { margin-bottom: 0; color: var(--muted); line-height: 1.42; }
.parent-note { display: flex; margin-top: 20px; padding: 20px 24px; align-items: center; gap: 15px; border-radius: 24px; }
.parent-note > span { display: grid; flex: 0 0 42px; height: 42px; place-items: center; color: #806129; background: #f8e8b9; border-radius: 13px; font-family: Georgia,serif; font-size: 23px; font-weight: 900; }.parent-note p { margin: 0; color: var(--muted); line-height: 1.45; }.parent-note strong { color: var(--ink); }

.game-shell { padding: 27px; background: rgba(255,253,247,.7); border: 2px solid rgba(221,210,181,.88); border-radius: 38px; box-shadow: var(--shadow); }
.game-heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.game-heading > div { text-align: center; }.game-heading > div span, .game-heading > div strong { display: block; }.game-heading > div span { margin-bottom: 3px; color: var(--muted); font-size: 12px; font-weight: 800; }.game-heading > div strong { font-size: 18px; }
.back-button, .hint-button { min-height: 46px; padding: 10px 14px; color: var(--ink); background: #fffdf7; border: 2px solid var(--line); border-radius: 15px; cursor: pointer; font-weight: 900; }
.back-button { justify-self: start; }.hint-button { justify-self: end; color: #765a28; background: #f9e9b9; border-color: #ead08d; }.hint-button > span { display: inline-grid; width: 24px; height: 24px; margin-right: 4px; place-items: center; color: #fff; background: #d6a43b; border-radius: 50%; }.hint-button:disabled { opacity: .55; cursor: default; }
.progress-track, .archive-progress { height: 10px; margin: 20px 0 25px; overflow: hidden; background: #e5dfcd; border-radius: 999px; }.progress-track span, .archive-progress span { display: block; height: 100%; background: linear-gradient(90deg,#58a27a,#efb943); border-radius: inherit; }
.investigation-layout { display: grid; grid-template-columns: minmax(330px,.84fr) minmax(500px,1.16fr); gap: 21px; align-items: stretch; }
.clue-card, .suspects-card { border-radius: 31px; }
.clue-card { min-height: 520px; padding: 25px 24px 21px; text-align: center; }
.clue-card h1 { margin-bottom: 6px; font-size: 31px; letter-spacing: -.025em; }
.clue-instruction { max-width: 420px; margin: 5px auto 0; color: var(--muted); line-height: 1.43; }
.magnifier-stage { position: relative; width: min(345px,100%); height: 355px; margin: 5px auto -1px; }
.clue-dots { position: absolute; inset: 42px 34px 30px; background: radial-gradient(circle,#d5c89f 1.5px,transparent 2px) 0 0 / 22px 22px; border-radius: 50%; opacity: .48; }
.magnifier { position: absolute; z-index: 2; top: 16px; left: 16px; width: 280px; height: 280px; padding: 14px; background: var(--yellow); border: 8px solid #334b54; border-radius: 50%; box-shadow: 0 18px 26px rgba(40,56,62,.24),inset 0 0 0 4px #fff3c5; }
.zoomed-clue { display: block; width: 100%; height: 100%; background-color: #f8f1de; background-repeat: no-repeat; background-position: var(--x) var(--y); background-size: calc(var(--zoom) * 100%); border-radius: 50%; }
.magnifier-handle { position: absolute; z-index: 1; right: 12px; bottom: 7px; width: 48px; height: 136px; background: #334b54; border: 5px solid var(--yellow); border-radius: 24px; transform: rotate(-38deg); transform-origin: top; box-shadow: 0 10px 15px rgba(40,56,62,.2); }
.evidence-tag { position: absolute; z-index: 3; left: 5px; bottom: 30px; padding: 7px 11px; color: #fff; background: var(--coral); border-radius: 6px; box-shadow: 0 5px 10px rgba(107,54,48,.2); font-size: 10px; font-weight: 900; letter-spacing: .12em; transform: rotate(-7deg); }
.reveal-stage { position: relative; display: grid; width: min(330px,100%); height: 355px; margin: 5px auto -1px; place-items: center; overflow: hidden; background: linear-gradient(145deg,#edf3df,#f8e5c0); border-radius: 50%; }
.reveal-stage img { position: relative; z-index: 2; width: 94%; height: 94%; object-fit: contain; filter: drop-shadow(0 13px 8px rgba(60,72,49,.16)); animation: reveal-pop .42s ease both; }
.reveal-rays { position: absolute; inset: -50%; opacity: .3; background: repeating-conic-gradient(from 0deg,#fff 0 10deg,transparent 10deg 24deg); animation: slow-spin 18s linear infinite; }
.solved-stamp { position: absolute; z-index: 3; right: auto; bottom: 20px; left: 50%; padding: 8px 12px; color: #fff; background: var(--green); border: 3px solid #dcebdd; border-radius: 8px; font-size: 11px; font-weight: 900; letter-spacing: .1em; white-space: nowrap; transform: translateX(-50%) rotate(-6deg); }

.suspects-card { display: flex; min-height: 520px; padding: 24px; flex-direction: column; }
.suspects-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }.suspects-heading .card-kicker { margin-bottom: 5px; }.suspects-heading h2 { margin-bottom: 0; font-size: 28px; }.case-number { display: grid; width: 47px; height: 47px; place-items: center; color: #fff; background: var(--navy); border-radius: 15px; font-size: 16px; font-weight: 900; }
.suspect-grid { display: grid; margin-top: 20px; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.suspect-option { position: relative; min-width: 0; min-height: 275px; padding: 10px 9px 14px; overflow: hidden; color: var(--ink); background: #fbf8ed; border: 3px solid #dfd6bc; border-radius: 24px; cursor: pointer; transition: transform 160ms ease,border-color 160ms ease,box-shadow 160ms ease; }
.suspect-option:hover:not(:disabled) { border-color: #9dbb9e; box-shadow: 0 12px 22px rgba(67,86,56,.13); transform: translateY(-4px); }.suspect-option:disabled { cursor: default; }
.suspect-image { display: grid; height: 205px; place-items: center; background: linear-gradient(145deg,#f3efdf,#e9f0e0); border-radius: 17px; }
.suspect-image img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 9px 6px rgba(60,71,49,.14)); }.suspect-option > strong { display: block; margin-top: 11px; font-size: 15px; line-height: 1.18; }
.answer-mark { position: absolute; top: 15px; right: 15px; display: none; width: 36px; height: 36px; place-items: center; color: #fff; background: var(--green); border: 3px solid #fff; border-radius: 50%; font-size: 20px; font-weight: 900; box-shadow: 0 5px 10px rgba(47,91,69,.22); }
.suspect-option.is-wrong { border-color: var(--coral); opacity: .66; }.suspect-option.is-wrong .answer-mark { display: grid; background: var(--coral); }.suspect-option.is-wrong .answer-mark::before { content: "×"; }
.suspect-option.is-correct { border-color: var(--green); box-shadow: 0 0 0 5px rgba(75,150,114,.16); }.suspect-option.is-correct .answer-mark { display: grid; }.suspect-option.is-correct .answer-mark::before { content: "✓"; }
.suspect-option.is-hint { border-color: var(--yellow); box-shadow: 0 0 0 5px rgba(239,185,67,.2); }.suspect-option.is-hint .answer-mark { display: grid; color: #74591f; background: var(--yellow); }.suspect-option.is-hint .answer-mark::before { content: "?"; }
.feedback-slot { flex: 1 1 auto; display: flex; min-height: 103px; margin-top: 16px; align-items: end; }
.feedback { display: flex; width: 100%; min-height: 86px; padding: 14px 15px; align-items: center; gap: 11px; background: #f7f3e8; border: 2px solid #dfd7c2; border-radius: 21px; }.feedback > span { display: grid; flex: 0 0 40px; height: 40px; place-items: center; background: #e8e3d5; border-radius: 13px; font-size: 20px; font-weight: 900; }.feedback p { flex: 1 1 auto; margin: 0; font-size: 14px; line-height: 1.37; }.feedback .button { flex: 0 0 auto; }
.feedback-try { background: #fff0eb; border-color: #efb3aa; }.feedback-try > span { color: #fff; background: var(--coral); }.feedback-hint { background: #fff5d7; border-color: #e7ca81; }.feedback-hint > span { color: #73591f; background: var(--yellow); }.feedback-success { background: #e8f4e8; border-color: #9ac9aa; }.feedback-success > span { color: #fff; background: var(--green); }.feedback-idle { color: var(--muted); }

.result-card { position: relative; max-width: 910px; margin: 45px auto 0; padding: 50px 52px 46px; overflow: hidden; border-radius: 42px; text-align: center; }
.result-card::before, .result-card::after { position: absolute; width: 230px; height: 230px; background: #e2efda; border-radius: 50%; content: ""; }.result-card::before { top: -145px; left: -90px; }.result-card::after { right: -100px; bottom: -155px; background: #f9e7b7; }
.result-stamp, .result-card > .eyebrow, .result-card h1, .result-card > p, .result-stars, .result-stats, .result-strip, .result-actions { position: relative; z-index: 1; }
.result-stamp { display: inline-flex; margin-bottom: 18px; padding: 8px 14px 8px 8px; align-items: center; gap: 8px; color: #fff; background: var(--green); border: 4px solid #dcebdd; border-radius: 17px; transform: rotate(-3deg); }.result-stamp span { display: grid; width: 38px; height: 38px; place-items: center; background: rgba(255,255,255,.2); border-radius: 11px; font-size: 23px; font-weight: 900; }.result-stamp small { font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.result-card h1 { margin-bottom: 12px; font-size: clamp(39px,5vw,59px); letter-spacing: -.04em; }.result-card > p { max-width: 620px; margin: 0 auto 14px; color: var(--muted); font-size: 18px; line-height: 1.48; }.result-stars { margin-bottom: 20px; font-size: 43px; letter-spacing: 7px; }
.result-stats { display: grid; max-width: 650px; margin: 0 auto 24px; grid-template-columns: repeat(3,1fr); overflow: hidden; background: #f6f2e6; border: 2px solid #e0d8bf; border-radius: 22px; }.result-stats span { padding: 16px 11px; }.result-stats span + span { border-left: 2px solid #e0d8bf; }.result-stats b, .result-stats small { display: block; }.result-stats b { margin-bottom: 2px; font-size: 25px; }.result-stats small { color: var(--muted); font-size: 12px; }
.result-strip { display: flex; max-width: 750px; margin: 0 auto 28px; justify-content: center; }.result-strip img { width: 73px; height: 73px; margin-left: -10px; object-fit: contain; background: #fffdf7; border: 2px solid var(--line); border-radius: 50%; filter: drop-shadow(0 5px 5px rgba(62,72,49,.12)); }.result-strip img:first-child { margin-left: 0; }.result-actions { justify-content: center; }

.archive-shell { padding: 33px; border-radius: 38px; }
.archive-heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 17px; text-align: center; }.archive-heading .back-button { grid-column: 1; justify-self: start; }.archive-heading > div { grid-column: 2; }.archive-heading .eyebrow { margin-bottom: 5px; }.archive-heading h1 { margin-bottom: 6px; font-size: clamp(32px,4vw,49px); letter-spacing: -.035em; }.archive-heading p { margin-bottom: 0; color: var(--muted); }
.archive-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.archive-card { position: relative; min-width: 0; overflow: hidden; background: #fffdf7; border: 2px solid var(--line); border-radius: 23px; box-shadow: 0 8px 18px rgba(68,78,53,.08); }.file-number { position: absolute; z-index: 2; top: 9px; left: 9px; padding: 5px 7px; color: #fff; background: var(--navy); border-radius: 8px; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.archive-image { display: grid; aspect-ratio: 1/1; place-items: center; background: linear-gradient(145deg,#f7f1df,#e5eedb); }.archive-image img { width: 94%; height: 94%; object-fit: contain; filter: drop-shadow(0 7px 6px rgba(61,71,49,.13)); }.archive-card > div:last-child { min-height: 120px; padding: 14px; }.archive-card strong { display: block; margin-bottom: 6px; font-size: 16px; }.archive-card p { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.archive-card.is-locked { border-style: dashed; }.archive-card.is-locked .archive-image { background: #ebe8dc; }.archive-card.is-locked .archive-image > span { display: grid; width: 58px; height: 58px; place-items: center; color: #a3a094; background: #f8f5eb; border-radius: 50%; font-family: Georgia,serif; font-size: 28px; font-weight: 900; }

@keyframes reveal-pop { from { opacity: 0; transform: scale(.65) rotate(-8deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes slow-spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0,1fr) 370px; }.hero-copy { padding-left: 40px; }.hero-photo { width: 125px; height: 148px; }.photo-one { left: 20px; }.hero-lens { right: 48px; width: 190px; height: 190px; }.lens-handle { right: 34px; top: 253px; }
  .level-grid { grid-template-columns: 1fr; }.level-card { display: grid; grid-template-columns: 40% 60%; }.level-preview { height: 100%; min-height: 265px; border-right: 2px solid var(--line); border-bottom: 0; }.level-copy > p { min-height: 0; }
  .investigation-layout { grid-template-columns: minmax(290px,.75fr) minmax(430px,1.25fr); }.game-shell { padding: 21px; }.magnifier-stage { transform: scale(.9); margin-top: -9px; margin-bottom: -18px; }.clue-card, .suspects-card { min-height: 500px; }.suspect-option { min-height: 250px; }.suspect-image { height: 180px; }
  .archive-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .app { width: min(100% - 22px,1120px); padding-top: 11px; }.topbar { margin-bottom: 13px; }.brand small, .archive-button strong { display: none; }
  .hero { grid-template-columns: 1fr; }.hero-copy { padding: 39px 28px 24px; }.hero h1 { font-size: clamp(45px,10vw,61px); }.hero-board { min-height: 330px; border-top: 3px solid #d6c49d; border-left: 0; }.photo-one { top: 30px; left: 12%; }.photo-two { right: 10%; bottom: 18px; }.hero-lens { top: 42px; right: 29%; }.lens-handle { top: 213px; right: 25%; }
  .steps-grid { grid-template-columns: 1fr; }.step-card { min-height: 0; }.level-card { display: block; }.level-preview { height: 210px; min-height: 0; border-right: 0; border-bottom: 2px solid var(--line); }
  .archive-callout { grid-template-columns: 150px 1fr; }.archive-callout .button { grid-column: 1/-1; }
  .game-heading { grid-template-columns: 1fr 1fr; }.game-heading > div { grid-column: 1/-1; grid-row: 1; }.game-heading .back-button { grid-column: 1; grid-row: 2; }.game-heading .hint-button { grid-column: 2; grid-row: 2; }
  .investigation-layout { grid-template-columns: 1fr; }.clue-card { min-height: 485px; }.suspects-card { min-height: 0; }.magnifier-stage { transform: none; margin-top: 4px; margin-bottom: -1px; }
  .feedback { flex-wrap: wrap; }.feedback .button { width: 100%; }
  .archive-shell { padding: 23px; }.archive-heading { display: block; }.archive-heading .back-button { display: flex; margin-bottom: 23px; }.archive-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 520px) {
  .brand strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }.archive-button { padding-inline: 5px; }.archive-button > span:first-child { width: 33px; height: 33px; }
  .hero-copy { padding: 33px 20px 19px; }.hero-copy > p { font-size: 17px; }.hero-actions .button { width: 100%; }.hero-board { min-height: 295px; }.hero-photo { width: 108px; height: 128px; }.photo-one { left: 6%; }.photo-two { right: 4%; }.hero-lens { top: 34px; right: 24%; width: 170px; height: 170px; }.lens-handle { top: 184px; right: 18%; height: 110px; }
  .section-block { margin-top: 38px; }.section-heading { align-items: flex-start; flex-direction: column; gap: 3px; }.section-heading h2 { font-size: 27px; }.section-heading > p { text-align: left; }.level-preview > span { left: calc(7% + var(--p) * 27%); }
  .archive-callout { padding: 23px; grid-template-columns: 1fr; text-align: center; }.archive-stack { width: 180px; margin: 0 auto; }.parent-note { align-items: flex-start; padding: 19px; }
  .game-shell { padding: 14px; border-radius: 28px; }.back-button, .hint-button { width: 100%; padding-inline: 8px; font-size: 13px; }.clue-card, .suspects-card { border-radius: 25px; }.clue-card { min-height: 420px; padding: 20px 13px 17px; }.clue-card h1 { font-size: 27px; }.magnifier-stage { width: 285px; height: 292px; }.magnifier { width: 230px; height: 230px; padding: 11px; border-width: 7px; }.magnifier-handle { right: 13px; bottom: 5px; width: 40px; height: 112px; }.evidence-tag { bottom: 23px; }.reveal-stage { width: 275px; height: 292px; }.solved-stamp { bottom: 18px; }
  .suspects-card { padding: 16px 11px; }.suspects-heading h2 { font-size: 24px; }.case-number { width: 42px; height: 42px; }.suspect-grid { gap: 7px; }.suspect-option { min-height: 191px; padding: 6px 5px 10px; border-width: 2px; border-radius: 18px; }.suspect-image { height: 136px; border-radius: 13px; }.suspect-option > strong { margin-top: 8px; font-size: 12px; }.answer-mark { top: 8px; right: 8px; width: 31px; height: 31px; border-width: 2px; font-size: 17px; }.feedback { padding: 12px; }.feedback > span { flex-basis: 36px; height: 36px; }
  .result-card { margin-top: 20px; padding: 37px 17px 30px; border-radius: 32px; }.result-stats { grid-template-columns: 1fr; }.result-stats span + span { border-top: 2px solid #e0d8bf; border-left: 0; }.result-strip { flex-wrap: wrap; }.result-strip img { width: 59px; height: 59px; }.result-actions .button { width: 100%; }
  .archive-shell { padding: 18px 12px; border-radius: 29px; }.archive-grid { gap: 9px; }.archive-card > div:last-child { min-height: 108px; padding: 11px; }.archive-card strong { font-size: 14px; }.archive-card p { font-size: 11px; }
}

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