
:root {
  --ink: #22212d;
  --muted: #6d6a78;
  --paper: #fffaf0;
  --line: #dfd8ca;
  --yellow: #ffcf43;
  --scene-color: #ff5d47;
  --scene-soft: #fff0d8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", Arial, sans-serif;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 4px solid #1c9ff5; outline-offset: 3px; }

.site-shell {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 4% 16%, rgba(255,205,62,.15) 0 7%, transparent 7.2%),
    radial-gradient(circle at 93% 31%, color-mix(in srgb, var(--scene-color) 10%, transparent) 0 8%, transparent 8.2%),
    var(--paper);
  transition: background 300ms ease;
}

.topbar {
  width: min(1480px, calc(100% - 40px));
  min-height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin: 0 auto;
  border-bottom: 1.5px solid var(--line);
}
.brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font: 900 1.45rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  letter-spacing: -.04em;
}
.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  position: relative;
  border: 2px solid var(--ink);
  border-radius: 50% 48% 46% 52%;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-5deg);
}
.brand-mark::after {
  content: "";
  width: 9px;
  height: 9px;
  position: absolute;
  right: -3px;
  bottom: 2px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--yellow);
  transform: rotate(25deg);
}
.brand-mark span { font-size: 1.6rem; line-height: 1; transform: rotate(5deg); }
.topbar-note { color: var(--muted); font-size: .86rem; font-weight: 700; letter-spacing: .015em; }
.sound-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px 9px 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}
.sound-button span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
}

.game { width: min(1480px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 70px; }
.scene-heading {
  display: grid;
  grid-template-columns: minmax(0,1fr) 240px;
  align-items: end;
  gap: 40px;
  margin-bottom: 23px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--scene-color);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.scene-copy h1 {
  margin: 0;
  font: 900 clamp(2rem,4vw,4.35rem)/.98 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  letter-spacing: -.055em;
}
.scene-copy h1 span { display: inline-block; margin-right: 7px; font-size: .75em; transform: rotate(-7deg); }
.scene-copy > p:last-child { margin: 13px 0 0; color: var(--muted); font-size: clamp(.95rem,1.3vw,1.08rem); font-weight: 600; }
.score-card {
  padding: 14px 16px 13px;
  border: 1.5px solid var(--ink);
  border-radius: 19px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--ink);
}
.score-topline, .score-time { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.score-topline span, .score-time span { color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.score-topline strong { font: 900 1.6rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; letter-spacing: -.06em; }
.score-topline small { color: var(--muted); font-size: .75rem; }
.progress-track { height: 8px; overflow: hidden; margin: 7px 0 11px; border-radius: 999px; background: #ece9e1; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--scene-color); transition: width 350ms cubic-bezier(.2,.8,.2,1); }
.score-time strong { font-size: .85rem; font-variant-numeric: tabular-nums; }

.instruction-row {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 10px 14px 10px 12px;
  border: 1.5px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: rgba(255,255,255,.74);
  backdrop-filter: blur(12px);
}
.instruction-copy { display: flex; align-items: center; gap: 11px; }
.instruction-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--scene-color);
  color: #fff;
  font-weight: 900;
  transform: rotate(-4deg);
}
.instruction-copy div { display: flex; flex-direction: column; gap: 2px; }
.instruction-copy strong { font-size: .86rem; }
.instruction-copy div span { color: var(--muted); font-size: .74rem; font-weight: 600; }
.game-actions { display: flex; gap: 8px; }
.action-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: .76rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.action-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 0 color-mix(in srgb,var(--scene-color) 30%,transparent); }
.action-button:disabled { opacity: .45; cursor: not-allowed; }
.hint-button { border-color: color-mix(in srgb,var(--scene-color) 70%,#fff); background: var(--scene-soft); }
.hint-button b { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--scene-color); color: #fff; font-size: .68rem; }

.picture-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 0 0 24px 24px;
  background: #f1ebdf;
  box-shadow: 0 18px 45px rgba(62,48,29,.1);
}
.picture-panel { min-width: 0; }
.picture-label-row { min-height: 29px; display: flex; align-items: center; gap: 7px; padding: 0 5px; color: #645f56; font-size: .67rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.picture-label-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--scene-color); }
.picture-frame {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #e3dccd;
  cursor: crosshair;
  box-shadow: 3px 3px 0 var(--ink);
  isolation: isolate;
}
.picture-frame::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.26); }
.picture-frame img { width: 100%; aspect-ratio: 3/2; display: block; object-fit: cover; user-select: none; }
.spot-layer { position: absolute; inset: 0; z-index: 3; }
.spot-button {
  position: absolute;
  transform: translate(-50%,-50%);
  pointer-events: none;
}
.spot-highlight {
  width: 68%;
  height: 68%;
  position: absolute;
  left: 16%;
  top: 16%;
  border: 2px solid color-mix(in srgb,var(--scene-color) 78%,#fff);
  border-radius: 18%;
  background: color-mix(in srgb,var(--scene-color) 18%,transparent);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.62), 0 2px 8px rgba(0,0,0,.12);
}
.spot-button.is-found .spot-highlight { animation: spot-pop 420ms cubic-bezier(.18,.9,.2,1.3); }
.spot-button.is-hint .spot-highlight { border-color: #fff; background: rgba(255,220,44,.22); box-shadow: 0 0 0 4px #ffdc2c, 0 0 0 10px rgba(255,220,44,.22); animation: hint-pulse 760ms ease-in-out infinite; }
.clue-section {
  margin-top: 24px;
  padding: 22px;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.68);
}
.clue-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 17px; }
.clue-heading .eyebrow { margin-bottom: 5px; }
.clue-heading h2 { margin: 0; font: 900 1.35rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; letter-spacing: -.035em; }
.clue-heading > p { max-width: 430px; margin: 0; color: var(--muted); font-size: .76rem; font-weight: 650; line-height: 1.45; text-align: right; }
.spot-counter {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.spot-counter li {
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 31px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1.5px solid #d7cfc0;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}
.clue-number {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--scene-soft);
  color: var(--scene-color);
  font-size: .72rem;
  font-weight: 1000;
}
.clue-label { min-width: 0; font-size: clamp(.68rem,.85vw,.78rem); font-weight: 850; line-height: 1.15; text-transform: capitalize; }
.spot-counter li.is-found { border-color: color-mix(in srgb,var(--scene-color) 45%,#d7cfc0); background: color-mix(in srgb,var(--scene-soft) 65%,#fff); }
.spot-counter li.is-found .clue-number { background: var(--scene-color); color: #fff; transform: rotate(-7deg); }
.spot-counter li.is-found .clue-label { color: var(--muted); text-decoration: line-through 2px var(--scene-color); opacity: .68; }
.sr-only { width: 1px; height: 1px; position: absolute; overflow: hidden; padding: 0; margin: -1px; border: 0; clip: rect(0,0,0,0); white-space: nowrap; }

.scene-picker { padding: 68px max(20px,calc((100vw - 1480px)/2)); background: #25232f; color: #fff; }
.picker-heading { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-bottom: 28px; }
.picker-heading h2 { margin: 0; font: 900 clamp(1.9rem,3.5vw,3.2rem)/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; letter-spacing: -.05em; }
.picker-heading > p { max-width: 380px; margin: 0 0 5px; color: #b9b6c3; font-size: .9rem; line-height: 1.6; }
.scene-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.scene-card {
  display: grid;
  grid-template-columns: minmax(110px,.9fr) minmax(140px,1fr);
  gap: 15px;
  align-items: center;
  padding: 11px;
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 17px;
  background: #32303d;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.scene-card:hover, .scene-card.is-active { transform: translateY(-4px); border-color: var(--card-color); background: color-mix(in srgb,var(--card-color) 18%,#32303d); }
.scene-thumb { min-height: 112px; position: relative; overflow: hidden; border-radius: 10px; background: var(--card-soft); }
.scene-thumb img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.scene-thumb > span { width: 39px; height: 39px; display: grid; place-items: center; position: absolute; right: 7px; bottom: 7px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); box-shadow: 2px 2px 0 var(--ink); }
.scene-card-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.scene-card-copy small { margin-bottom: 5px; color: var(--card-color); font-size: .63rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.scene-card-copy strong { margin-bottom: 13px; font: 900 clamp(.92rem,1.2vw,1.12rem)/1.15 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.scene-card-copy > span { color: #d0ccd8; font-size: .69rem; font-weight: 800; }

footer { min-height: 128px; display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 25px; padding: 30px max(20px,calc((100vw - 1480px)/2)); background: #1e1c27; color: #aaa7b2; border-top: 1px solid rgba(255,255,255,.08); }
.footer-squiggle { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #4a4653; border-radius: 50%; color: var(--yellow); font-size: 1.7rem; }
footer p { margin: 0; font-size: .78rem; line-height: 1.5; }
footer a { color: #fff; font-size: .75rem; font-weight: 900; text-decoration: none; }
.footer-copy { display: flex; flex-direction: column; gap: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.footer-links a { color: #d8d5df; text-decoration: underline; text-decoration-color: #595563; text-underline-offset: 4px; }
.footer-links a:hover { color: var(--yellow); }

.info-shell { min-height: 100vh; background: var(--paper); color: var(--ink); }
.info-topbar { width: min(920px,calc(100% - 40px)); min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 auto; border-bottom: 1.5px solid var(--line); }
.info-back { color: var(--ink); font-size: .8rem; font-weight: 900; text-decoration: none; }
.info-page { width: min(760px,calc(100% - 40px)); margin: 0 auto; padding: 58px 0 80px; }
.info-page h1 { margin: 0 0 20px; font: 900 clamp(2.5rem,7vw,4.8rem)/.98 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; letter-spacing: -.055em; }
.info-page h2 { margin: 36px 0 10px; font: 900 1.25rem/1.2 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.info-page p, .info-page li { color: #575360; font-size: 1rem; line-height: 1.75; }
.info-page ul { padding-left: 22px; }
.info-page a { color: #6b55df; font-weight: 850; }
.info-card { margin-top: 28px; padding: 22px; border: 1.5px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 5px 5px 0 var(--yellow); }
.info-date { margin-bottom: 28px !important; color: var(--muted) !important; font-size: .8rem !important; font-weight: 800; }

.win-overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 22px; background: rgba(31,29,39,.77); backdrop-filter: blur(8px); }
.win-card { width: min(470px,100%); position: relative; z-index: 2; padding: 36px 35px 30px; border: 2px solid var(--ink); border-radius: 24px; background: var(--paper); color: var(--ink); text-align: center; box-shadow: 8px 8px 0 var(--yellow); animation: win-pop 520ms cubic-bezier(.18,.9,.2,1.25); }
.win-emoji { display: block; margin-bottom: 10px; font-size: 3.7rem; transform: rotate(-7deg); }
.win-card h2 { margin: 0; font: 900 clamp(2rem,8vw,3.4rem)/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; letter-spacing: -.06em; }
.win-card > p:not(.eyebrow) { margin: 17px auto 23px; color: var(--muted); font-size: .92rem; line-height: 1.65; }
.win-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.win-actions button { min-height: 48px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font-size: .8rem; font-weight: 900; cursor: pointer; }
.win-actions .next-scene-button { background: var(--scene-color); color: #fff; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { width: 11px; height: 21px; position: absolute; left: calc((var(--i,1)*5.4%) - 2%); top: -30px; border-radius: 3px; background: var(--yellow); animation: confetti-fall 2.4s linear infinite; }
.confetti i:nth-child(3n) { background: #ff5d47; transform: rotate(25deg); }
.confetti i:nth-child(3n+1) { background: #30c4af; transform: rotate(-22deg); }
.confetti i:nth-child(1) { --i:1; animation-delay:-.2s } .confetti i:nth-child(2) { --i:2; animation-delay:-1.1s }
.confetti i:nth-child(3) { --i:3; animation-delay:-.7s } .confetti i:nth-child(4) { --i:4; animation-delay:-1.8s }
.confetti i:nth-child(5) { --i:5; animation-delay:-.4s } .confetti i:nth-child(6) { --i:6; animation-delay:-1.4s }
.confetti i:nth-child(7) { --i:7; animation-delay:-.1s } .confetti i:nth-child(8) { --i:8; animation-delay:-2s }
.confetti i:nth-child(9) { --i:9; animation-delay:-.9s } .confetti i:nth-child(10) { --i:10; animation-delay:-1.6s }
.confetti i:nth-child(11) { --i:11; animation-delay:-.3s } .confetti i:nth-child(12) { --i:12; animation-delay:-1.2s }
.confetti i:nth-child(13) { --i:13; animation-delay:-.6s } .confetti i:nth-child(14) { --i:14; animation-delay:-2.1s }
.confetti i:nth-child(15) { --i:15; animation-delay:-.8s } .confetti i:nth-child(16) { --i:16; animation-delay:-1.7s }
.confetti i:nth-child(17) { --i:17; animation-delay:-.5s } .confetti i:nth-child(18) { --i:18; animation-delay:-1.3s }
.miss-pulse .instruction-icon { animation: miss-shake 340ms ease; }

@keyframes spot-pop { 0% { opacity:0; transform:scale(.3) rotate(-5deg) } 70% { transform:scale(1.08) rotate(2deg) } 100% { opacity:1; transform:scale(1) rotate(0) } }
@keyframes hint-pulse { 0%,100% { transform:scale(.92) } 50% { transform:scale(1.06) } }
@keyframes miss-shake { 0%,100% { transform:rotate(-4deg) translateX(0) } 25% { transform:rotate(-4deg) translateX(-5px) } 75% { transform:rotate(-4deg) translateX(5px) } }
@keyframes win-pop { from { opacity:0; transform:scale(.78) rotate(-3deg) } to { opacity:1; transform:scale(1) rotate(0) } }
@keyframes confetti-fall { to { top:108%; transform:rotate(720deg) } }

@media (max-width: 1040px) {
  .topbar-note { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .scene-card-grid { grid-template-columns: 1fr; }
  .scene-card { grid-template-columns: 180px 1fr; }
}

@media (max-width: 760px) {
  .topbar, .game { width: min(100% - 24px,1480px); }
  .topbar { min-height: 70px; }
  .brand { font-size: 1.2rem; }
  .brand-mark { width: 36px; height: 36px; }
  .sound-button { padding-right: 0; }
  .sound-button:not(:focus) { font-size: 0; gap: 0; }
  .sound-button span { font-size: .9rem; }
  .game { padding-top: 25px; }
  .scene-heading { grid-template-columns: 1fr; gap: 19px; }
  .score-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 11px 13px; box-shadow: 3px 3px 0 var(--ink); }
  .score-topline { gap: 8px; }
  .score-topline span, .score-time span { display: none; }
  .score-topline strong { font-size: 1.35rem; }
  .progress-track { margin: 0; }
  .instruction-row { align-items: flex-start; flex-direction: column; padding: 11px; }
  .game-actions { width: 100%; }
  .action-button { flex: 1; justify-content: center; }
  .picture-grid { grid-template-columns: 1fr; gap: 17px; }
  .picture-frame { box-shadow: 2px 2px 0 var(--ink); }
  .clue-section { padding: 17px 13px; }
  .clue-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .clue-heading > p { text-align: left; }
  .spot-counter { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  .spot-counter li { min-height: 58px; grid-template-columns: 27px minmax(0,1fr); gap: 7px; padding: 7px; }
  .clue-number { width: 27px; height: 27px; }
  .scene-picker { padding-top: 50px; padding-bottom: 50px; }
  .picker-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .scene-card { grid-template-columns: 120px 1fr; }
  footer { grid-template-columns: 42px 1fr; }
  footer > a { grid-column: 2; }
  .info-topbar, .info-page { width: min(100% - 24px,920px); }
  .info-page { padding-top: 38px; }
}

@media (max-width: 430px) {
  .scene-copy h1 { font-size: 2.25rem; }
  .instruction-copy strong { font-size: .78rem; }
  .instruction-copy div span { font-size: .68rem; }
  .scene-card { grid-template-columns: 98px 1fr; }
  .scene-thumb { min-height: 96px; }
  .spot-counter { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .win-card { padding: 30px 22px 23px; }
}

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

.static-app .topbar { grid-template-columns: 1fr auto 1fr; }
.static-app .topbar-note { text-align:center; }
.static-app .game { min-height: 740px; }
.static-app .picture-frame { touch-action: manipulation; }
.static-app .scene-card { width:100%; }
.static-app .spot-button { border:0; background:transparent; padding:0; }
.static-app .footer-links a { grid-column:auto; }
.static-app .win-overlay[hidden] { display:none; }
@media(max-width:1040px){.static-app .topbar{grid-template-columns:1fr auto}.static-app .topbar-note{display:none}}
