:root {
  --bg: #f6f3ed;
  --card: #fffdfb;
  --panel: rgba(255,255,255,.90);
  --border: #ddd6cb;
  --text: #2d2a26;
  --muted: #6e665d;
  --accent: #1f6f8b;
  --accent-dark: #18586d;
  --good: #2f8a57;
  --bad: #c44d4d;
  --warm: #f1a63a;
  --soft: #f4efe8;
  --water-soft: #e7f4f5;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
[hidden], .hidden { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(31,111,139,.10), transparent 32rem),
    radial-gradient(circle at top right, rgba(241,166,58,.12), transparent 30rem),
    var(--bg);
}
button,input { font: inherit; }
button { cursor: pointer; }
button:focus-visible,input:focus-visible { outline: 3px solid rgba(31,111,139,.25); outline-offset: 3px; }
.page-shell { width: min(1220px, calc(100% - 24px)); margin: 0 auto; padding-bottom: 42px; }
.site-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 0 10px; }
.brand { display:inline-flex; align-items:center; text-decoration:none; }
.brand-logo { display:block; width:min(230px,58vw); height:auto; }
.home-link { display:inline-flex; align-items:center; gap:7px; min-height:42px; padding:0 14px; border:1px solid var(--border); border-radius:999px; background:var(--card); color:var(--accent-dark); text-decoration:none; font-weight:800; box-shadow:0 5px 14px rgba(0,0,0,.045); }
.home-link:hover { background:var(--soft); transform:translateY(-1px); }
main { display:grid; gap:16px; }
.panel,.card { background:var(--panel); border:1px solid var(--border); box-shadow:var(--shadow); backdrop-filter:blur(8px); }
.hero { position:relative; overflow:hidden; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:27px 30px; border-radius:22px; }
.hero::before { content:""; position:absolute; inset:0 auto 0 0; width:6px; background:var(--accent); }
.hero > * { position:relative; z-index:1; }
.hero h1 { margin:8px 0 8px; color:var(--accent); font-size:clamp(2rem,5vw,3.65rem); line-height:.98; letter-spacing:-.04em; }
.hero p:not(.eyebrow) { max-width:760px; margin:0; color:var(--muted); line-height:1.5; }
.eyebrow { display:inline-flex; align-items:center; gap:7px; margin:0; padding:6px 10px; border-radius:999px; background:rgba(241,166,58,.16); color:#8b5e1d; font-size:.75rem; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.eyebrow::before { content:"★"; color:var(--warm); }
.hero-water { color:rgba(31,111,139,.18); font-family:Georgia,serif; font-size:100px; line-height:.6; transform:rotate(-8deg); }
.mode-tabs { display:flex; flex-wrap:wrap; gap:9px; padding:0 2px; }
.mode-tab { min-height:44px; padding:0 15px; border:1px solid var(--border); border-radius:14px; background:var(--card); color:var(--text); font-weight:800; box-shadow:0 5px 14px rgba(0,0,0,.045); }
.mode-tab:hover { transform:translateY(-1px); background:var(--soft); }
.mode-tab.active { border-color:var(--accent); background:var(--accent); color:#fff; box-shadow:0 8px 18px rgba(31,111,139,.22); }
.mode-tab span { margin-right:5px; }
.mode-panel { display:none; padding-bottom:4px; }
.mode-panel.active { display:block; }
.card { border-radius:20px; }
.toolbar { display:flex; align-items:center; gap:16px; margin-bottom:16px; padding:14px 16px; }
.progress-wrap { flex:1; }
.progress-label { display:flex; justify-content:space-between; gap:12px; margin-bottom:8px; font-size:.82rem; }
.progress-label span { color:var(--muted); font-weight:700; }
.progress-track { height:8px; overflow:hidden; border-radius:999px; background:#e9e1d6; }
.progress-bar { height:100%; width:10%; border-radius:999px; background:var(--accent); transition:width .35s; }
.icon-btn { width:42px; height:42px; border:1px solid rgba(31,111,139,.16); border-radius:13px; background:rgba(31,111,139,.09); color:var(--accent-dark); font-size:1.15rem; }
.quiz-grid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(360px,.8fr); gap:18px; align-items:start; }
.image-card { overflow:hidden; }
.image-frame { position:relative; aspect-ratio:16/10; overflow:hidden; background:#edf3f3; }
.image-frame img { width:100%; height:100%; display:block; object-fit:cover; }
.image-footer { display:flex; align-items:center; gap:12px; padding:14px 16px; }
.pill { display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; background:rgba(31,111,139,.10); color:var(--accent-dark); font-size:.76rem; font-weight:800; }
.image-tip { color:var(--muted); font-size:.85rem; }
.image-fallback { position:absolute; inset:0; display:grid; place-items:center; color:var(--muted); }
.correct-burst { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#fff; background:radial-gradient(circle,rgba(31,111,139,.22),rgba(24,88,109,.84)); opacity:0; pointer-events:none; transform:scale(.96); transition:.35s; }
.correct-burst.show { opacity:1; transform:scale(1); animation:celebrate .85s ease both; }
.correct-burst span { font-size:4rem; }
.correct-burst strong { font-size:clamp(2rem,4vw,2.7rem); }
.correct-burst small { margin-top:6px; font-size:1rem; }
@keyframes celebrate { 0%{transform:scale(.86)} 65%{transform:scale(1.025)} 100%{transform:scale(1)} }
.game-card { align-self:start; padding:24px; }
.step-label { margin:0 0 15px; color:var(--text); font-size:1.2rem; font-weight:850; }
.guess-form { display:grid; grid-template-columns:1fr auto; gap:9px; }
.guess-form input { width:100%; min-height:48px; padding:0 14px; border:1px solid var(--border); border-radius:13px; background:#fff; color:var(--text); }
.guess-form input:focus { border-color:var(--accent); box-shadow:0 0 0 4px rgba(31,111,139,.12); outline:none; }
.primary-btn,.secondary-btn { min-height:46px; padding:0 16px; border:0; border-radius:13px; font-weight:800; transition:transform .15s ease,background .15s ease; }
.primary-btn { background:var(--accent); color:#fff; box-shadow:0 8px 18px rgba(31,111,139,.24); }
.primary-btn:hover { background:var(--accent-dark); transform:translateY(-1px); }
.secondary-btn { border:1px solid rgba(31,111,139,.16); background:rgba(31,111,139,.09); color:var(--accent-dark); }
.secondary-btn:hover { background:rgba(31,111,139,.14); transform:translateY(-1px); }
.wide { width:100%; margin-top:16px; }
.feedback { min-height:23px; margin:10px 0; font-size:.88rem; font-weight:800; }
.feedback.good { color:var(--good); }
.feedback.bad { color:var(--bad); }
.hint-heading { display:flex; align-items:end; justify-content:space-between; gap:12px; margin-top:18px; }
.hint-heading h2 { margin:0; font-size:1.05rem; }
.hint-heading span { color:var(--muted); font-size:.75rem; }
.clues { display:grid; gap:8px; margin:12px 0; }
.clue { display:flex; gap:10px; padding:11px 12px; border-radius:12px; background:#f7f4ef; color:var(--muted); font-size:.88rem; }
.clue.revealed { background:rgba(241,166,58,.13); color:var(--text); }
.clue-number { flex:0 0 auto; width:24px; height:24px; display:grid; place-items:center; border-radius:50%; background:#e9e1d6; font-size:.75rem; font-weight:900; }
.clue.revealed .clue-number { background:var(--warm); color:#4f3510; }
.hint-actions,.answer-actions { display:flex; gap:8px; }
.text-btn { display:block; margin:16px auto 0; padding:0; border:0; background:none; color:var(--muted); text-decoration:underline; text-underline-offset:3px; font-size:.82rem; }
.visual-hint,.fact-box,.spot-panel { margin-top:13px; padding:14px; border-radius:14px; font-size:.9rem; }
.visual-hint { background:rgba(31,111,139,.09); }
.visual-hint strong { display:block; margin-bottom:5px; color:var(--accent-dark); }
.answer-kicker { margin:0; color:var(--accent); font-size:.72rem; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.answer-panel h2 { margin:5px 0; color:var(--accent); font-size:2.2rem; }
.answer-region { color:var(--muted); font-weight:650; }
.fact-box { border-left:4px solid var(--warm); background:rgba(241,166,58,.12); line-height:1.55; }
.spot-panel { background:#f7f4ef; }
.spot-panel ol { margin:0; padding-left:22px; columns:2; }
.spot-panel li { padding:4px; }
.map-section { margin-top:18px; padding:18px; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.section-heading h2 { margin:5px 0 14px; color:var(--accent); }
.map { height:430px; overflow:hidden; border-radius:17px; background:#edf3f3; }
.map-legend { display:flex; flex-wrap:wrap; gap:15px; margin-top:12px; color:var(--muted); font-size:.78rem; }
.legend-dot { display:inline-block; width:10px; height:10px; margin-right:5px; border-radius:50%; }
.study-card { display:grid; grid-template-columns:1.12fr .88fr; overflow:hidden; }
.study-image { min-height:590px; }
.study-image img { width:100%; height:100%; display:block; object-fit:cover; }
.study-content { padding:30px; }
.study-content h2 { margin:8px 0; color:var(--accent); font-size:clamp(2rem,4vw,2.7rem); }
.study-fact { font-size:1rem; line-height:1.65; }
.study-content li { margin-bottom:8px; }
.mini-map { height:220px; overflow:hidden; margin-top:20px; border-radius:16px; }
.study-controls { display:flex; justify-content:space-between; gap:10px; margin-top:18px; }
.map-quiz-layout { display:grid; grid-template-columns:330px 1fr; gap:18px; }
.map-instructions { align-self:start; padding:26px; }
.map-instructions h2 { color:var(--accent); font-size:1.7rem; }
.map-instructions > p:not(.eyebrow) { color:var(--muted); line-height:1.55; }
.map-feedback { margin-top:20px; padding:14px; border-radius:13px; background:#f7f4ef; font-weight:800; }
.map-feedback.excellent { background:rgba(47,138,87,.12); color:var(--good); }
.map-feedback.good { background:rgba(241,166,58,.17); color:#76540d; }
.map-feedback.miss { background:rgba(196,77,77,.11); color:var(--bad); }
.map-card { padding:10px; }
.map-quiz { height:600px; }
footer { padding:24px 10px 0; color:var(--muted); text-align:center; font-size:.86rem; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
@media (max-width:900px) {
  .quiz-grid,.study-card,.map-quiz-layout { grid-template-columns:1fr; }
  .game-card { order:2; }
  .study-image { min-height:420px; }
  .map-quiz-layout .map-card { order:1; }
  .map-quiz-layout .map-instructions { order:2; }
  .hero-water { display:none; }
}
@media (max-width:600px) {
  .page-shell { width:min(100% - 20px,1220px); }
  .site-header { padding-top:12px; }
  .brand-logo { width:min(190px,58vw); }
  .home-link { min-height:38px; padding:0 11px; font-size:.82rem; }
  .hero { padding:22px 20px; }
  .mode-tabs { overflow-x:auto; flex-wrap:nowrap; padding-bottom:3px; }
  .mode-tab { white-space:nowrap; }
  .toolbar { padding:12px; }
  .quiz-grid { gap:14px; }
  .game-card { padding:19px; }
  .guess-form { grid-template-columns:1fr; }
  .hint-actions,.answer-actions { flex-direction:column; }
  .spot-panel ol { columns:1; }
  .image-tip { display:none; }
  .image-frame { aspect-ratio:4/3; }
  .map { height:350px; }
  .map-quiz { height:460px; }
  .study-content { padding:22px; }
}
