:root {
  --ink: #12352f;
  --paper: #f5f0e5;
  --paper-2: #ebe5d8;
  --cream: #fffaf0;
  --orange: #f08a58;
  --amber: #e8b84c;
  --blue: #5a9fb2;
  --mint: #76ab8c;
  --red: #d95f4b;
  --line: rgba(18, 53, 47, .15);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); }
button { color: inherit; font: inherit; }
button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.app-shell { min-height: 100dvh; max-width: 1180px; margin: auto; padding: 0 28px calc(28px + env(safe-area-inset-bottom)); }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { border: 0; background: none; display: flex; gap: 11px; align-items: center; padding: 0; cursor: pointer; font-family: Georgia, serif; font-size: 21px; font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 45% 55%; color: var(--paper); background: var(--ink); font-style: italic; }
.stats { display: flex; gap: 10px; }
.stats span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; background: rgba(255,255,255,.3); }
.eyebrow, .round-label, .tiny-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.home-view { padding: 62px 0 20px; }
.home-view > h1 { font: 700 clamp(42px, 7vw, 76px)/.95 Georgia, serif; letter-spacing: -.04em; margin: 13px 0 20px; }
.home-view h1 em { color: var(--orange); font-weight: 400; }
.intro { max-width: 590px; font-size: 18px; line-height: 1.55; color: #4d625d; }
.daily-card { width: 100%; border: 0; border-radius: 18px; background: var(--ink); color: var(--cream); margin: 28px 0 42px; padding: 22px 24px; text-align: left; display: flex; align-items: center; justify-content: space-between; cursor: pointer; box-shadow: 0 12px 32px rgba(18,53,47,.14); }
.daily-card strong, .daily-card small { display: block; }
.daily-card strong { font: 700 21px/1.2 Georgia, serif; margin: 7px 0 4px; }
.daily-card small { color: #bdcec8; }
.round-arrow { display: grid; place-items: center; min-width: 45px; height: 45px; border-radius: 50%; color: var(--ink); background: var(--amber); font-size: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 15px; }
.section-head h2 { font: 700 24px Georgia, serif; margin: 0; }
.section-head span { font-size: 12px; font-weight: 700; color: #70817d; }
.mode-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.mode-card { position: relative; min-height: 245px; padding: 18px; overflow: hidden; border: 0; border-radius: 15px; text-align: left; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; transition: transform .2s, box-shadow .2s; }
.mode-card:hover { transform: translateY(-4px); box-shadow: 0 12px 25px rgba(18,53,47,.13); }
.mode-card.amber { background: #eec45f; }.mode-card.blue { background: #70afbe; }.mode-card.coral { background: #eb8a68; }.mode-card.mint { background: #86b598; }.mode-card.violet { background: #b2a1ca; }
.mode-number { position: absolute; top: 17px; left: 18px; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.mode-card strong { position: relative; font: 700 21px/1.05 Georgia, serif; }
.mode-card small { position: relative; margin-top: 8px; font-size: 11px; font-weight: 700; opacity: .7; }
.mini-map { position: absolute; width: 112px; height: 105px; right: 10px; top: 23px; opacity: .85; }
.cat-shape { background: var(--ink); clip-path: polygon(42% 0, 87% 8%, 100% 30%, 82% 55%, 76% 91%, 53% 100%, 32% 88%, 5% 91%, 13% 65%, 0 42%, 19% 18%); }
.spain-shape { background: var(--ink); clip-path: polygon(5% 26%, 27% 6%, 73% 10%, 94% 28%, 88% 69%, 62% 83%, 54% 100%, 29% 83%, 9% 65%); }
.pins-shape, .europe-shape, .ccaa-shape { display: grid; place-items: center; color: var(--ink); font: 700 65px Georgia, serif; transform: rotate(-8deg); }.europe-shape { font-size: 34px; border: 3px solid var(--ink); border-radius: 50% 35% 45% 40%; }.ccaa-shape { font-size: 35px; background: var(--ink); color: #b2a1ca; clip-path: polygon(5% 26%, 27% 6%, 73% 10%, 94% 28%, 88% 69%, 62% 83%, 54% 100%, 29% 83%, 9% 65%); }
.home-footer { margin-top: 24px; padding: 20px 0; display: flex; justify-content: space-between; color: #70817d; font-size: 12px; border-top: 1px solid var(--line); }
.home-footer button { border: 0; background: none; text-decoration: underline; cursor: pointer; font-weight: 700; }

.game-view { max-width: 980px; margin: auto; padding: 24px 0; }
.game-meta { display: grid; grid-template-columns: 44px 1fr 65px; align-items: center; gap: 17px; }
.icon-button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: transparent; font-size: 26px; cursor: pointer; }
.progress-track { height: 7px; border-radius: 9px; background: #ded8cc; overflow: hidden; }.progress-track i { display: block; width: 10%; height: 100%; border-radius: inherit; background: var(--orange); transition: width .3s; }
.lives { text-align: right; letter-spacing: 2px; color: var(--red); font-size: 16px; }
.question-block { text-align: center; padding: 26px 0 18px; }
.question-block h1 { font: 700 clamp(32px, 5vw, 51px)/1.05 Georgia, serif; margin: 9px 0 8px; }
.question-block p { margin: 0; color: #71817d; font-size: 14px; }
.map-card { position: relative; height: min(58vh, 570px); min-height: 370px; background: #dfe9df; border-radius: 22px; overflow: hidden; border: 1px solid rgba(18,53,47,.09); box-shadow: inset 0 0 80px rgba(18,53,47,.05); }
#map { width: 100%; height: 100%; touch-action: none; cursor: grab; user-select: none; }
#map:active { cursor: grabbing; }
.region { fill: #f7f1e4; stroke: #385b52; stroke-width: 1.4; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .16s, opacity .16s; }
.region:hover { fill: #f2c96d; }.region.correct { fill: #62ac78; }.region.wrong { fill: #e16e5b; }.region.muted { opacity: .58; }
.inset-box { fill: rgba(255,250,240,.42); stroke: rgba(18,53,47,.25); stroke-width: 1.5; stroke-dasharray: 5 4; }
.inset-label { fill: var(--ink); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.point { cursor: pointer; }.point circle { fill: var(--cream); stroke: var(--ink); stroke-width: 2.5; vector-effect: non-scaling-stroke; }.point:hover circle { fill: var(--amber); transform-origin: center; transform: scale(1.22); }.point.correct circle { fill: #62ac78; }.point.wrong circle { fill: #e16e5b; }
.point text { font-size: 14px; font-weight: 800; fill: var(--ink); paint-order: stroke; stroke: #dfe9df; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.land { fill: #f5efe3; stroke: #58746c; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sea-lines { fill: none; stroke: rgba(18,53,47,.07); stroke-width: 1; }
.map-tools { position: absolute; right: 16px; bottom: 16px; display: grid; border-radius: 11px; overflow: hidden; box-shadow: 0 5px 16px rgba(18,53,47,.12); }
.map-tools button { width: 39px; height: 37px; border: 0; background: var(--cream); font-size: 20px; cursor: pointer; }.map-tools button + button { border-top: 1px solid var(--line); }
.compass { position: absolute; top: 17px; right: 18px; font: italic 700 13px Georgia, serif; }
.compass::after { content: ""; display: block; width: 1px; height: 19px; background: var(--ink); margin: 4px auto; }
.score-line { display: flex; justify-content: space-between; align-items: center; padding: 13px 5px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.score-line strong { font-size: 15px; }.score-line i { color: var(--orange); font-style: normal; }
.fact-sheet { position: fixed; z-index: 10; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(720px, calc(100% - 28px)); padding: 17px; border-radius: 17px; color: var(--cream); background: var(--ink); box-shadow: 0 16px 50px rgba(0,0,0,.24); }
.fact-sheet > div { display: flex; gap: 14px; align-items: flex-start; }
.result-icon { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 50%; color: var(--ink); background: var(--amber); font-weight: 900; }
.fact-sheet b { font: 700 19px Georgia, serif; }.fact-sheet p { color: #c9d4d0; margin: 5px 0 15px; line-height: 1.4; font-size: 14px; }
.fact-sheet button, .primary-button { width: 100%; border: 0; border-radius: 11px; padding: 13px 17px; background: var(--amber); font-weight: 800; cursor: pointer; }.fact-sheet button { display: flex; justify-content: space-between; }

.results-view { max-width: 520px; margin: auto; text-align: center; padding: 72px 0 30px; }
.result-orbit { width: 112px; height: 112px; margin: 0 auto 25px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 52% 48% 55% 45%; transform: rotate(10deg); }.result-orbit span { font-size: 46px; color: var(--orange); transform: rotate(-10deg); }
.results-view h1 { font: 700 43px/1.05 Georgia, serif; letter-spacing: -.03em; margin: 13px 0; }.results-view > p { color: #687a75; line-height: 1.5; }
.result-score { margin: 28px auto 15px; }.result-score strong { display: block; font: 700 65px/1 Georgia, serif; }.result-score span { font-size: 10px; font-weight: 900; letter-spacing: .2em; }
.result-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 25px 0; border: 1px solid var(--line); border-radius: 13px; }.result-stats div { padding: 16px; }.result-stats div + div { border-left: 1px solid var(--line); }.result-stats b, .result-stats span { display: block; }.result-stats b { font: 700 24px Georgia, serif; }.result-stats span { color: #71817d; font-size: 11px; margin-top: 4px; }
.primary-button { background: var(--ink); color: var(--cream); font-size: 15px; padding: 16px; }.text-button { margin-top: 8px; border: 0; background: transparent; padding: 13px; cursor: pointer; font-weight: 700; }
@media (max-width: 950px) and (min-width: 761px) { .mode-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .app-shell { padding-inline: 16px; }.topbar { height: 66px; }.home-view { padding-top: 37px; }.mode-grid { grid-template-columns: 1fr 1fr; }.mode-card { min-height: 220px; }.game-view { padding-top: 14px; }.question-block { padding: 20px 0 14px; }.map-card { height: 53vh; min-height: 360px; }.point text { font-size: 18px; }
}
@media (max-width: 420px) {
  .mode-card { min-height: 190px; padding: 14px; }.mode-card strong { font-size: 18px; }.mini-map { width: 88px; height: 82px; }.home-view > h1 { font-size: 42px; }.daily-card { margin-bottom: 32px; }.map-card { min-height: 330px; }.stats span { padding: 7px 9px; }.results-view { padding-top: 45px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
