@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;600;700;800&display=swap");

:root {
  --ink: #142a3a;
  --ink-soft: #536675;
  --paper: #f5efe1;
  --paper-deep: #e9dfc9;
  --cream: #fffaf0;
  --gold: #f2b422;
  --gold-deep: #cc8d00;
  --red: #db352f;
  --line: rgba(20, 42, 58, 0.18);
  --image-aspect: 1276 / 954;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 88% 4%, rgba(242,180,34,.18), transparent 22%), var(--paper); font-family: Inter, Arial, sans-serif; }
button, a { font: inherit; }
.site-shell { width: min(100% - 48px, 1380px); margin-inline: auto; }
.topbar, .play-toolbar, .stats, .toolbar-buttons, .scene-heading, .play-footer, .instructions, footer { display: flex; align-items: center; }
.topbar { min-height: 106px; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: block; width: 205px; }
.brand img { display: block; width: 100%; height: auto; }
.mission-badge { padding: 9px 13px; border: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; }
.mission-badge span { color: var(--gold-deep); }
.hero-copy { max-width: 880px; padding: 52px 0 38px; }
.eyebrow { margin: 0 0 9px; color: var(--gold-deep); font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.hero-copy h1 { margin: 0 0 14px; font-family: "Archivo Black", Impact, sans-serif; font-size: clamp(44px, 7vw, 86px); letter-spacing: -3px; line-height: .95; }
.hero-copy > p:last-child { max-width: 720px; margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.game-card, .instructions { background: rgba(255,250,240,.86); border: 1px solid var(--line); box-shadow: 0 18px 48px rgba(20,42,58,.11); }
.game-card { padding: 24px; }
.play-toolbar { min-height: 58px; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.stats { gap: 22px; }
.stats div span, .stats div strong { display: block; }
.stats div span { margin-bottom: 4px; color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: 1.4px; }
.stats div strong { font-family: "Archivo Black", Impact, sans-serif; font-size: 25px; line-height: 1; }
.stats i { width: 1px; align-self: stretch; background: var(--line); }
.timer-active { color: var(--gold-deep); }
.toolbar-buttons { gap: 9px; }
.tool-button { min-height: 44px; padding: 0 17px; color: var(--ink); background: transparent; border: 1px solid rgba(20,42,58,.28); cursor: pointer; font-size: 12px; font-weight: 800; transition: 160ms ease; }
.tool-button span { margin-right: 5px; font-size: 18px; }
.tool-button:hover, .tool-button:focus-visible, .tool-button[aria-pressed="true"] { color: white; background: var(--ink); outline: none; }
.status-message { min-height: 24px; margin: 0 0 12px; color: var(--ink-soft); font-size: 12px; font-weight: 700; text-align: center; }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.scene-panel { min-width: 0; }
.scene-heading { gap: 10px; margin-bottom: 10px; }
.scene-heading h2, .instructions h2 { margin: 0; font-family: "Archivo Black", Impact, sans-serif; font-size: 17px; letter-spacing: .2px; }
.section-number { display: grid; width: 32px; height: 32px; place-items: center; flex: 0 0 auto; color: var(--cream); background: var(--ink); border-radius: 50%; font-size: 11px; font-weight: 800; }
.scene { position: relative; overflow: hidden; aspect-ratio: var(--image-aspect); background: #d8cba9; border: 6px solid white; box-shadow: 0 10px 28px rgba(20,42,58,.17); cursor: crosshair; touch-action: none; }
.scene > img { display: block; width: 100%; height: 100%; object-fit: fill; user-select: none; }
.scene:focus-visible { outline: 5px solid var(--gold); outline-offset: 3px; }
.marks { position: absolute; inset: 0; pointer-events: none; }
.difference-mark { position: absolute; z-index: 5; width: clamp(24px, 3.4vw, 43px); height: clamp(24px, 3.4vw, 43px); transform: translate(-50%, -50%); color: var(--red); filter: drop-shadow(0 1px 0 white) drop-shadow(1px 0 0 white) drop-shadow(-1px 0 0 white); font-family: "Archivo Black", Impact, sans-serif; font-size: clamp(30px, 4vw, 52px); line-height: .72; text-align: center; }
.miss-mark { position: absolute; z-index: 6; width: 15px; height: 15px; transform: translate(-50%, -50%); border: 3px solid rgba(219,53,47,.78); border-radius: 50%; animation: miss .45s ease both; }
.magnifier { --lens-center: 88px; position: fixed; z-index: 50; display: none; box-sizing: border-box; width: 190px; height: 190px; overflow: visible; pointer-events: none; background-color: white; background-repeat: no-repeat; background-clip: padding-box; border: 7px solid var(--gold); border-radius: 50%; box-shadow: 0 0 0 4px white, 0 14px 38px rgba(20,42,58,.38); transform: translate(-50%, -50%); }
.magnifier.visible { display: block; }
.solution-button { color: #846111; border-color: rgba(204,141,0,.5); }
.solution-overlay { position: fixed; z-index: 110; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(20,42,58,.88); backdrop-filter: blur(4px); }
.solution-overlay[hidden] { display: none; }
.solution-dialog { position: relative; width: min(100%, 560px); padding: 38px; color: var(--ink); background: var(--cream); border: 6px solid white; box-shadow: 0 28px 80px rgba(0,0,0,.35); }
.solution-dialog > p { margin: 0 0 7px; color: var(--gold-deep); font-size: 10px; font-weight: 800; letter-spacing: 2px; }
.solution-dialog h2 { margin: 0 0 20px; font-family: "Archivo Black", Impact, sans-serif; font-size: 32px; }
.solution-dialog ol { display: grid; gap: 9px; margin: 0; padding-left: 24px; color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
.solution-close { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; color: var(--ink); background: transparent; border: 0; cursor: pointer; font-size: 30px; }
.solution-action { width: 100%; min-height: 46px; margin-top: 24px; color: var(--ink); background: var(--gold); border: 0; cursor: pointer; font-weight: 800; }
.success-overlay { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(20,42,58,.9); backdrop-filter: blur(4px); }
.success-dialog { max-width: 620px; padding: 42px; color: white; text-align: center; }
.success-stamp { display: grid; width: 72px; height: 72px; place-items: center; margin: 0 auto 18px; color: var(--ink); background: var(--gold); border: 5px solid white; border-radius: 50%; font-size: 40px; font-weight: 900; transform: rotate(-7deg); }
.success-dialog p { margin: 0 0 8px; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: 2.4px; }
.success-dialog h2 { margin: 0 0 14px; font-family: "Archivo Black", Impact, sans-serif; font-size: clamp(30px, 5vw, 52px); }
.success-dialog span { color: rgba(255,255,255,.8); }
.success-dialog button { margin-top: 24px; min-height: 46px; padding: 0 22px; color: var(--ink); background: var(--gold); border: 0; cursor: pointer; font-weight: 800; }
.play-footer { justify-content: space-between; gap: 18px; padding-top: 18px; }
.play-footer p { margin: 0; color: var(--ink-soft); font-size: 11px; }
.play-footer p span { margin-right: 5px; color: var(--gold-deep); font-size: 17px; font-weight: 900; }
.progress-track { width: 160px; height: 6px; flex: 0 0 auto; overflow: hidden; background: var(--paper-deep); border-radius: 10px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--gold); transition: width 250ms ease; }
.instructions { gap: 18px; margin-top: 24px; padding: 24px 28px; }
.instructions p { margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
footer { min-height: 120px; justify-content: space-between; color: var(--ink-soft); font-size: 11px; }
footer span { font-weight: 800; letter-spacing: 1.7px; }
footer p { margin: 0; font-style: italic; }
@keyframes miss { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.4); } 60% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.5); } }

@media (max-width: 920px) {
  .comparison { grid-template-columns: 1fr; }
  .play-footer { align-items: flex-start; flex-direction: column; }
  .progress-track { width: 100%; }
}
@media (max-width: 650px) {
  .site-shell { width: min(100% - 24px, 1380px); }
  .topbar { min-height: 82px; }
  .brand { width: 150px; }
  .mission-badge { width: 12px; height: 12px; padding: 0; overflow: hidden; border: 0; }
  .mission-badge span { font-size: 12px; }
  .hero-copy { padding: 38px 0 28px; }
  .hero-copy h1 { font-size: clamp(38px, 13vw, 58px); letter-spacing: -2px; }
  .hero-copy > p:last-child { font-size: 14px; }
  .game-card { padding: 10px; }
  .play-toolbar { align-items: stretch; flex-direction: column; padding: 5px; }
  .stats { justify-content: space-between; gap: 7px; }
  .stats div span { font-size: 7px; letter-spacing: .7px; }
  .stats div strong { font-size: 19px; }
  .stats i { display: none; }
  .toolbar-buttons { display: grid; grid-template-columns: repeat(3, 1fr); }
  .tool-button { padding: 0 10px; }
  .scene { border-width: 4px; }
  .scene-heading h2 { font-size: 13px; }
  .magnifier { --lens-center: 65px; width: 140px; height: 140px; border-width: 5px; }
  .instructions { align-items: flex-start; padding: 20px 16px; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
