:root{color-scheme:dark;--text:#f3f5ee;--muted:#99aeb5;--pale:#6b8792;--accent:#c1f293;--gold:#ffd681;--bg:#071a24;--line:rgba(169,210,215,.14);--glass:rgba(7,27,40,.8)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#06151f;color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #e2f7b1!important;outline-offset:3px}button:focus{scroll-margin:85px}
.shell{position:relative;min-height:100vh;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 24% 42%,#123c4d 0%,#091e2d 45%,#06141e 85%)}.shell:after{content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent 42%,rgba(6,17,27,.28) 51%,rgba(5,16,25,.9) 81%)}
.header{height:102px;max-width:1680px;padding:0 4.2%;margin:auto;display:flex;align-items:center;gap:34px;position:relative;z-index:10;border-bottom:1px solid rgba(200,236,233,.09)}.brand{display:flex;align-items:center;gap:13px;flex:0 0 auto}.brand-mark{width:39px;height:39px;border:2px solid #b7eea0;border-radius:50%;display:grid;place-items:center;color:#c5f8a8;font-size:31px;transform:rotate(-25deg);box-shadow:0 0 35px rgba(140,247,183,.13)}.brand-text{font-size:16px;font-weight:800;letter-spacing:2px;white-space:nowrap;line-height:1.1}.brand-text strong{color:#b5f19a}.brand-text small{font-size:9px;letter-spacing:2.7px;color:#7ea1aa;display:block;margin-top:7px}.top-nav{margin:auto;display:flex;gap:4px;padding:5px;border-radius:12px;background:rgba(13,38,50,.55);border:1px solid var(--line)}.nav-btn{color:#94aeb7;border:0;border-radius:8px;background:transparent;padding:12px 19px;font-size:13px;font-weight:700;white-space:nowrap}.nav-btn.active{background:#b6ed9e;color:#12272c;box-shadow:0 3px 13px rgba(164,232,152,.12)}.nav-btn:not(.active):hover{background:rgba(255,255,255,.06);color:white}.progress-label{font-size:12px;color:#acc5c8;white-space:nowrap;border-left:1px solid var(--line);padding-left:20px}
.layout{position:relative;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(410px,.9fr);min-height:calc(100vh - 154px);max-width:1680px;margin:auto}.planet-area{min-height:600px;position:relative;isolation:isolate;touch-action:none;overflow:hidden}.stars{position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(1px 1px at 23% 8%,#d4f9e4 99%,transparent 101%),radial-gradient(1px 1px at 63% 27%,#d4f9e4 99%,transparent 101%),radial-gradient(2px 2px at 14% 54%,#aedbdc 99%,transparent 101%),radial-gradient(1px 1px at 78% 70%,#fff 99%,transparent 101%),radial-gradient(1px 1px at 39% 83%,#cbdfef 99%,transparent 101%),radial-gradient(1px 1px at 81% 8%,#fff 99%,transparent 101%);opacity:.22}
#globe{width:100%;height:100%;position:absolute;inset:0;cursor:grab;touch-action:none;z-index:1}#globe:active{cursor:grabbing}.planet-area:before{content:"";position:absolute;top:14%;left:6%;width:75%;height:73%;border-radius:50%;background:radial-gradient(circle,rgba(38,176,159,.16),transparent 67%);filter:blur(27px);z-index:0}.planet-caption{position:absolute;z-index:2;left:7.3%;top:45px;display:flex;align-items:center;gap:9px;font-size:11px;letter-spacing:2px;text-transform:uppercase;font-weight:700;color:#94b4b6}.caption-dot{height:7px;width:7px;background:#b4ee99;border-radius:50%;box-shadow:0 0 17px #83ebbd}.planet-controls{position:absolute;z-index:2;bottom:44px;left:7.3%;font-size:10px;letter-spacing:1.8px;color:#7398a1;font-weight:700;display:flex;gap:13px}.planet-controls .dot{color:#5b7379}.orbit-label{position:absolute;z-index:2;font-size:10px;letter-spacing:1.5px;color:#72919c;pointer-events:none}.orbit-label-a{left:10%;top:20%}.orbit-label-b{right:8%;bottom:21%;writing-mode:vertical-rl}.compass{position:absolute;right:10%;top:16%;font-size:10px;font-weight:800;letter-spacing:1px;color:#a5c6c6;display:flex;align-items:center;flex-direction:column;gap:5px;z-index:2}.compass i{width:1px;height:37px;background:linear-gradient(#d5fbd2,transparent)}.compass span:last-child{opacity:.4}
.game-panel{padding:62px clamp(28px,5vw,88px) 32px 10px;position:relative;z-index:3;display:flex;flex-direction:column;max-width:690px}.eyebrow{color:#b9eaa2;font-size:11px;font-weight:800;letter-spacing:2.4px;display:flex;align-items:center;gap:12px}.eyebrow-line{height:2px;width:24px;background:#c2f0ac}h1{font-size:clamp(34px,3.6vw,56px);line-height:1.05;letter-spacing:-1.8px;margin:21px 0 15px;font-weight:850}.subtitle{margin:0;color:#b2c5c8;font-size:15px;line-height:1.65;max-width:480px;min-height:46px}.filter-group{display:flex;flex-wrap:wrap;gap:7px;margin-top:26px;margin-bottom:27px}.chip{border:1px solid rgba(173,207,199,.19);background:rgba(19,45,53,.5);border-radius:999px;padding:8px 12px;color:#a2bdc1;font-size:12px;font-weight:650;transition:.14s}.chip.selected{background:#b6e99e;color:#122d28;border-color:#c1f2aa}.chip:hover{border-color:#c4eeae}
#screen{padding-bottom:16px}.question-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;gap:12px}.question-top .section-label,.section-label{font-size:11px;font-weight:800;letter-spacing:2px;color:#8daab3}.pill{font-size:11px;border-radius:99px;padding:7px 10px;color:#e6cb8b;background:rgba(255,207,103,.1);border:1px solid rgba(255,202,98,.18);white-space:nowrap}.choices{display:grid;grid-template-columns:1fr 1fr;gap:11px}.choice{border:1px solid rgba(184,225,225,.15);background:linear-gradient(150deg,rgba(35,68,76,.78),rgba(23,51,62,.75));border-radius:15px;color:#e6f0e9;text-align:left;display:flex;align-items:center;min-height:89px;padding:14px 16px;gap:13px;position:relative;overflow:hidden;transition:border .15s,background .15s,transform .15s}.choice:hover,.choice:focus{border-color:#c4f0a3;background:#1d4651;transform:translateY(-1px)}.choice .flag{font-size:29px;min-width:32px;display:flex;justify-content:center;align-items:center}.choice .choice-name{font-size:14px;font-weight:750;line-height:1.25}.choice .choice-letter{position:absolute;right:11px;top:9px;font-size:10px;color:#71939d}.choice.correct{border-color:#aae89c;background:rgba(83,134,94,.23)}.choice.wrong{border-color:#e3a69b;background:rgba(150,75,77,.23)}.choice:disabled{cursor:default;transform:none}.choice:focus{outline:2px solid #d9ffbd;outline-offset:1px}.helper-line{display:flex;align-items:center;justify-content:space-between;margin:21px 0 0;gap:12px;font-size:12px;color:#829fa9}.helper-line strong{color:#b7e99d}.helper-line button{border:0;background:transparent;color:#c1e99c;font-weight:750;padding:6px}.primary-action,.secondary-action{border:0;border-radius:12px;padding:13px 20px;font-weight:800;font-size:14px;letter-spacing:.1px}.primary-action{color:#183026;background:#b6ea9d}.primary-action:hover{background:#d3ffb6}.secondary-action{color:#c9e5e0;background:rgba(171,216,220,.1);border:1px solid rgba(171,216,220,.19)}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:17px}.result-card{border:1px solid rgba(172,221,173,.22);background:linear-gradient(120deg,rgba(28,66,60,.7),rgba(17,45,54,.86));border-radius:16px;padding:17px 19px;margin-top:18px}.result-head{font-weight:850;font-size:21px;display:flex;align-items:center;gap:10px}.result-head .flag{font-size:28px}.result-card p{color:#cadbd7;font-size:13px;line-height:1.65;margin:8px 0 0}.result-card small{color:#a7cfb8}.stat-line{font-size:12px;margin:17px 0 0;color:#819eaa}.stat-line b{color:#bee5aa}.celebrate{display:inline-block;color:#bbed9e;font-weight:750;font-size:11px;letter-spacing:1.4px;margin-bottom:9px}.failure{color:#f0b6a5}.muted{color:var(--muted)}
.explore-top{display:flex;gap:9px;margin-bottom:12px}.search-box{background:#102f3c;border:1px solid rgba(163,209,217,.25);border-radius:11px;color:white;padding:13px 14px;width:100%;min-width:0}.search-box::placeholder{color:#70949e}.country-list{overflow-y:auto;max-height:min(43vh,390px);padding-right:6px;scrollbar-color:#315866 transparent;scrollbar-width:thin}.country-row{width:100%;border:1px solid rgba(169,221,214,.1);background:rgba(20,47,58,.45);border-radius:11px;display:flex;gap:12px;text-align:left;align-items:center;color:#d7e9e5;margin-bottom:7px;padding:12px;transition:.1s}.country-row:hover,.country-row.active{border-color:#c6f2a1;background:#214b53}.country-row .flag{font-size:26px;min-width:35px;text-align:center}.country-row .country-row-name{font-weight:750;font-size:14px;flex:1}.country-row small{font-size:10px;color:#94b0b6;letter-spacing:.5px}.country-row .know{color:#aee697;font-size:18px}.country-card{margin-top:13px;border:1px solid rgba(173,217,215,.19);border-radius:16px;background:rgba(14,43,56,.79);padding:18px}.country-card h2{font-size:25px;margin:0 0 3px}.country-card .meta{font-size:12px;color:#afc6c9;margin-bottom:14px}.country-card p{font-size:13px;line-height:1.7;color:#e0eee7;margin:8px 0}.country-card .group-title{font-size:10px;text-transform:uppercase;font-weight:800;color:#c2f2ad;letter-spacing:1.5px;margin:15px 0 5px}.mini-tags{display:flex;gap:6px;flex-wrap:wrap}.mini-tags span{background:rgba(162,213,186,.12);border:1px solid rgba(162,213,186,.11);border-radius:99px;padding:6px 9px;font-size:11px;color:#c2dbce}.explore-empty{padding:25px 5px;color:#a5bdbb}.info-badge{font-size:10px;padding:6px 10px;letter-spacing:.6px;border-radius:99px;color:#c0e9b4;background:rgba(160,219,163,.12)}
.footer{height:52px;max-width:1680px;margin:auto;padding:0 4.2%;border-top:1px solid rgba(200,236,233,.08);display:flex;align-items:center;justify-content:space-between;color:#678d99;font-size:11px;letter-spacing:.3px;position:relative;z-index:4}.toast{position:fixed;bottom:68px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:100;border-radius:11px;padding:13px 17px;background:#c6f2af;color:#203c31;box-shadow:0 15px 40px #0007;font-weight:800;font-size:13px;transition:.2s}.toast.visible{opacity:1;transform:translate(-50%,0)}
@media(max-width:1080px){.header{gap:14px;padding:0 3%}.progress-label{display:none}.layout{grid-template-columns:minmax(0,1fr) minmax(380px,1fr)}.game-panel{padding:55px 24px 25px 0}.planet-caption{top:25px}.footer{padding:0 3%}.orbit-label-b{display:none}}
@media(max-width:760px){.header{height:auto;min-height:90px;gap:14px;flex-wrap:wrap;padding:16px 18px}.brand-text{font-size:13px}.top-nav{order:2;margin:0 auto;width:100%;justify-content:center}.nav-btn{padding:9px 17px}.layout{display:flex;flex-direction:column}.planet-area{min-height:370px;height:44vh}.game-panel{max-width:none;padding:18px 20px 48px}.planet-caption{left:20px}.planet-controls{left:20px;bottom:16px}.game-panel h1{font-size:38px}.footer{padding:13px 18px;min-height:60px;height:auto;align-items:start;gap:10px}.footer span:last-child{display:none}.choices{gap:9px}.choice{min-height:75px;padding:10px}.choice .choice-name{font-size:13px}.filter-group{margin:19px 0}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important}}
.outline-preview{display:flex;gap:15px;align-items:center;min-height:75px;margin:-3px 0 17px;padding:6px 16px;border-radius:13px;background:linear-gradient(110deg,rgba(33,71,77,.46),rgba(11,37,46,.4));border:1px solid rgba(157,219,190,.13)}.outline-preview img{width:104px;height:65px;object-fit:contain;flex-shrink:0}.outline-preview span{font-size:10px;letter-spacing:1.6px;font-weight:800;line-height:1.8;color:#88abaf}.outline-preview strong{color:#cee6da;font-size:12px;letter-spacing:.2px;font-weight:650}
.content-icon{width:21px;height:21px;object-fit:contain;vertical-align:middle;margin-right:6px}

/* v0.2 — stable globe viewport and card-first layout.
   Desktop uses a viewport-locked map and a separately scrollable content panel.
   Country cards now occupy the choice area after successful guesses. */
@media (min-width: 901px) {
  .header { height: 72px; padding-inline: 3.3%; }
  .layout {
    height: calc(100dvh - 108px);
    min-height: 540px;
    max-height: 1050px;
    grid-template-columns: minmax(0, 1.06fr) minmax(435px, .94fr);
  }
  .planet-area { min-height: 0; height: 100%; }
  .game-panel {
    height: 100%;
    min-height: 0;
    max-width: none;
    padding: 23px 31px 18px 14px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #335c60 transparent;
  }
  .footer { height: 36px; padding-inline: 3.3%; }
}
.planet-caption { top: 22px; }
.planet-controls { bottom: 18px; }
.filter-group { margin-top: 17px; margin-bottom: 20px; gap: 7px; }
.eyebrow { font-size: 11px; }
.question-top { margin: 0 0 12px; }
.outline-preview { margin: 0 0 13px; min-height: 68px; }
.choice { min-height: 84px; }
.stat-line.progress-status { margin-top: 18px; }
.inline-mode {
  margin-left: 12px;
  padding: 5px 8px;
  border: 1px solid rgba(183, 235, 165, .18);
  border-radius: 7px;
  background: transparent;
  color: #b5e89d;
  cursor: pointer;
  font-size: 11px;
}
.globe-legend {
  position: absolute;
  left: 7.3%;
  bottom: 47px;
  display: flex;
  gap: 18px;
  align-items: center;
  z-index: 3;
  color: #9cbabd;
  font-size: 11px;
  pointer-events: none;
}
.globe-legend span { display: inline-flex; gap: 7px; align-items: center; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.legend-target { background: #f8b142; box-shadow: 0 0 8px #f8b14288; }
.legend-known { background: #4baa86; box-shadow: 0 0 8px #4baa8688; }
.quiz-reveal .celebrate { margin: 3px 0 6px; }
.quiz-reveal .country-card {
  margin: 0;
  border-color: rgba(181, 236, 164, .35);
  background: linear-gradient(130deg, rgba(25, 71, 66, .86), rgba(13, 43, 54, .9));
}
.quiz-actions { margin-top: 13px; }
.country-card p { line-height: 1.6; }
.country-card .group-title { margin-top: 12px; }
.explore-top { margin-bottom: 13px; }
.selected-card .country-card { margin-top: 0; }
.atlas-label {
  color: #89aab0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.7px;
  margin: 15px 0 9px;
}
.country-list { max-height: 195px; overflow-y: auto; }
.country-row { padding: 9px 11px; margin-bottom: 6px; min-height: 48px; }
.country-row .flag { font-size: 23px; }
.explore-empty { padding: 12px 5px; }
@media (max-width: 900px) {
  .header { min-height: 74px; height: auto; padding: 12px 18px; }
  .layout { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .planet-area { height: min(60vw, 530px); min-height: 340px; max-height: 580px; }
  .game-panel { height: auto; min-height: 0; max-width: none; padding: 20px 20px 35px; overflow: visible; }
  .filter-group { margin-top: 16px; margin-bottom: 18px; }
  .footer { min-height: 36px; height: auto; padding: 12px 18px; }
}
@media (max-width: 480px) {
  .planet-area { height: 360px; min-height: 360px; }
  .globe-legend { bottom: 42px; font-size: 10px; gap: 10px; left: 20px; }
  .planet-controls { bottom: 16px; left: 20px; font-size: 9px; letter-spacing: .6px; }
  .planet-caption { top: 15px; left: 20px; }
  .choice { min-height: 70px; }
  .country-list { max-height: 210px; }
}


/* v0.3 — compact completion tracking and safe progress reset */
.progress-label { display: none; }
.filter-group { margin-bottom: 12px; }
.region-progress { display:flex; align-items:center; gap:16px; margin: 0 0 18px; }
.progress-pair { flex:1; min-width:0; display:flex; align-items:center; gap:16px; }
.progress-track-item { flex:1; min-width:0; }
.progress-track-text { display:flex; align-items:center; justify-content:space-between; gap:7px; margin-bottom:7px; font-size:10px; color:#8daeb3; font-weight:700; letter-spacing:.3px; }
.progress-track-item.active .progress-track-text { color:#c3efaa; }
.progress-track { width:100%; height:5px; background:rgba(137,185,191,.17); border-radius:20px; overflow:hidden; }
.progress-fill { height:100%; background:linear-gradient(90deg,#4bb18b,#b6ed9a); border-radius:20px; transition:width .3s ease; }
.reset-link { flex-shrink:0; border:1px solid rgba(178,210,216,.15); border-radius:8px; background:rgba(24,52,60,.55); padding:8px 10px; color:#94b5b8; font-size:11px; font-weight:750; }
.reset-link:hover,.reset-link:focus { color:#f7e2b3; border-color:#e6c78b; }
.mode-toggle { cursor:pointer; font-weight:750; transition:background .15s, border-color .15s; }
.mode-toggle:hover,.mode-toggle:focus { color:#ffebb6; background:rgba(255,209,105,.16); border-color:rgba(255,209,105,.5); }
.orbit-label-a { left:7.3%; top:49px; letter-spacing:1.1px; }
.completion-card { border:1px solid rgba(178,232,163,.4); background:radial-gradient(circle at 90% 0%,rgba(134,213,151,.13),transparent 60%),linear-gradient(140deg,rgba(19,67,63,.94),rgba(12,43,52,.92)); border-radius:17px; padding:24px 22px; }
.completion-star { color:#b9ed9d; font-size:40px; line-height:1; margin-bottom:5px; }
.completion-card h2 { font-size:26px; margin:0; letter-spacing:-.7px; color:#ebf5e8; }
.completion-card p { font-size:14px; line-height:1.6; color:#c0d9cf; margin:10px 0 0; }
.completion-card .completion-count { font-weight:750; color:#b7e99d; font-size:12px; margin-top:18px; }
.reset-overlay[hidden],.reset-world[hidden] { display:none!important; }
.reset-overlay { position:fixed; inset:0; background:rgba(2,15,22,.78); backdrop-filter:blur(4px); z-index:110; display:flex; justify-content:center; align-items:center; padding:22px; }
.reset-dialog { width:min(510px,100%); border:1px solid rgba(183,220,205,.28); background:#0d2c36; border-radius:18px; box-shadow:0 20px 80px #0008; padding:27px; }
.reset-dialog h2 { font-size:26px; margin:13px 0 8px; }
.reset-dialog p { color:#b6cdd0; font-size:14px; line-height:1.55; margin:0 0 22px; }
.reset-actions { display:flex; gap:10px; flex-wrap:wrap; }
.reset-confirm { background:rgba(186,101,76,.16); border:1px solid rgba(245,162,131,.43); color:#f0bdad; border-radius:12px; padding:13px 14px; font-weight:750; }
.reset-confirm:hover,.reset-confirm:focus { background:rgba(186,101,76,.27); }
.reset-world { color:#ffd1bc; }
@media(max-width:1100px){.progress-pair{gap:9px}.progress-track-text{font-size:9px}.region-progress{gap:9px}}
@media(max-width:760px){.region-progress{margin-bottom:17px}.reset-dialog{padding:23px}.orbit-label-a{left:20px;top:42px}}

/* v0.4 — align the N/S compass with the coordinate line below the heading. */
.compass { top: 49px; right: 7.3%; }
@media (max-width: 760px) { .compass { top: 42px; right: 20px; } }

/* v0.5: vector line overlay and map-safe on-screen instruments. */
#border-overlay {
  position:absolute;inset:0;width:100%;height:100%;z-index:2;
  pointer-events:none;user-select:none;
}
.planet-area::after {
  content:"";position:absolute;inset:0;z-index:3;pointer-events:none;
  background:linear-gradient(180deg,rgba(3,17,27,.52) 0%,rgba(3,17,27,0) 19%,rgba(3,17,27,0) 74%,rgba(3,17,27,.44) 100%);
}
.planet-caption,
.orbit-label-a,
.compass,
.globe-legend,
.planet-controls {z-index:5;color:#d2e5df;text-shadow:0 1px 4px #001820;}
.planet-caption {
  top:17px;left:5.7%;padding:9px 13px;
  border-radius:9px;background:rgba(4,23,33,.91);
  border:1px solid rgba(154,209,198,.20);
  box-shadow:0 7px 24px #00182266;
  font-size:10px;letter-spacing:1.65px;
}
.orbit-label-a {
  top:61px;left:5.7%;padding:5px 10px;
  border-radius:6px;background:rgba(4,23,33,.86);
  border:1px solid rgba(154,209,198,.12);
  font-size:10px;color:#cee1db;
}
.compass {
  top:49px;right:5.7%;
  background:rgba(4,23,33,.87);border:1px solid rgba(154,209,198,.18);
  padding:7px 11px;border-radius:9px;
}
.compass i{height:23px;}
.globe-legend {
  left:5.7%;bottom:58px;padding:8px 12px;
  border:1px solid rgba(154,209,198,.12);
  background:rgba(4,23,33,.87);border-radius:8px;
  font-size:11px;color:#d4e8de;
}
.planet-controls {
  bottom:16px;left:5.7%;padding:8px 12px;
  background:rgba(4,23,33,.88);border:1px solid rgba(154,209,198,.12);
  border-radius:8px;color:#bacfd0;letter-spacing:1.05px;
}
@media(max-width:760px){
  .planet-caption{left:14px;top:13px;padding:7px 9px;font-size:9px;letter-spacing:1px}
  .orbit-label-a{left:14px;top:52px}
  .compass{right:14px;top:43px;padding:5px 8px}
  .globe-legend{left:14px;bottom:54px;padding:6px 7px;font-size:9px;gap:9px}
  .planet-controls{left:14px;bottom:10px;padding:6px 8px;font-size:8px;letter-spacing:.3px;gap:5px}
}


/* v0.6 — minimal HUD: all viewport help replaced by a compass-return control. */
.header {display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);column-gap:22px;}
.header .top-nav {margin:0;justify-self:center;}
.header-actions {justify-self:end;min-width:0;}
.header-mode {color:#f0d79b;background:rgba(39,43,35,.87);border-color:rgba(251,208,103,.3);font-size:12px;padding:10px 13px;}
.planet-caption {top:18px;left:5.7%;}
.globe-compass {
  position:absolute;right:5.7%;top:17px;z-index:6;
  width:76px;height:76px;border:1px solid rgba(189,236,209,.32);
  border-radius:50%;color:#d7efe5;
  background:radial-gradient(circle at 45% 35%,rgba(25,75,76,.94),rgba(5,29,41,.95));
  box-shadow:0 5px 28px rgba(1,10,16,.5),inset 0 0 0 3px rgba(9,33,43,.94);
  text-shadow:0 1px 3px #00121a;transition:background .15s,transform .2s;
}
.globe-compass:hover {background:radial-gradient(circle at 45% 35%,rgba(37,98,93,.98),rgba(8,43,55,.95));transform:scale(1.05);}
.globe-compass .direction {position:absolute;font-size:10px;line-height:1;font-weight:800;letter-spacing:0;color:#b7e6d1;}
.globe-compass .north {top:8px;left:50%;transform:translateX(-50%);color:#cef5ba;}
.globe-compass .south {bottom:8px;left:50%;transform:translateX(-50%);}
.globe-compass .east {right:9px;top:50%;transform:translateY(-50%);}
.globe-compass .west {left:9px;top:50%;transform:translateY(-50%);}
.globe-compass .compass-center {position:absolute;inset:22px;border:1px solid rgba(184,239,211,.28);border-radius:50%;display:grid;place-items:center;font-size:21px;font-weight:700;color:#d4f3bd;}
.globe-compass:focus-visible {outline-offset:4px;}
@media(max-width:760px){
  .header {display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;row-gap:8px;padding-top:10px;padding-bottom:10px;height:auto;min-height:102px;}
  .header .brand {grid-column:1;grid-row:1;}
  .header-actions {grid-column:2;grid-row:1;}
  .header .top-nav {grid-column:1/-1;grid-row:2;justify-self:center;}
  .header-mode {padding:8px 10px;font-size:10px;}
  .globe-compass {right:14px;top:14px;width:66px;height:66px;}
  .globe-compass .compass-center {inset:19px;font-size:17px;}
  .globe-compass .north {top:7px;}.globe-compass .south {bottom:7px;}
  .globe-compass .east {right:7px;}.globe-compass .west {left:7px;}
}


/* v0.7: region selection screen, single-purpose geography colors, no footer. */
.layout {min-height:calc(100vh - 102px);}
.shell:after {pointer-events:none;}
.start-card {border:1px solid rgba(179,231,215,.26);background:linear-gradient(142deg,rgba(19,62,69,.83),rgba(12,39,53,.91));border-radius:17px;padding:26px 24px 24px;margin-top:4px;}
.start-card h2 {font-size:clamp(24px,2.5vw,34px);letter-spacing:-.7px;line-height:1.12;margin:12px 0 12px;color:#eaf8e9;}
.start-card p {font-size:14px;line-height:1.65;color:#b7d4d2;max-width:530px;margin:0 0 17px;}
.start-card .actions {margin-top:7px;}
.start-card .primary-action {background:#b8eda1;color:#123126;}
.explore-prompt {margin:0 0 5px;font-size:13px;color:#a2c3bf;line-height:1.5;padding:12px 15px;background:rgba(17,52,61,.62);border:1px solid rgba(163,222,201,.12);border-radius:10px;}
@media(max-width:900px){.layout{min-height:0}.planet-area{min-height:340px}}
@media(max-width:760px){.start-card{padding:21px 18px}}


/* v0.7.1: Offline image flags, independent of TV emoji-font support. */
.flag { flex:0 0 40px; width:40px; min-width:40px; height:30px; display:inline-flex; align-items:center; justify-content:center; position:relative; vertical-align:middle; }
.flag-image { width:40px; height:28px; object-fit:contain; display:block; filter:drop-shadow(0 1px 2px rgba(0,0,0,.28)); }
.flag-fallback { display:none; font-size:12px; font-weight:800; color:#d5e8e3; letter-spacing:1px; }
.flag.missing .flag-image { display:none; }
.flag.missing .flag-fallback { display:inline; }
.choice .flag { flex-basis:40px; min-width:40px; }
.country-row .flag { flex-basis:40px; min-width:40px; }
.result-head .flag { flex-basis:44px; min-width:44px; width:44px; height:34px; }
.result-head .flag-image { width:44px; height:32px; }

/* v0.8 — geography anchors and TV-first map layer toggles */
#geography-overlay { position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none;user-select:none; }
.planet-area::after {z-index:4;}
.planet-caption,.globe-compass {z-index:6;}
.header-actions {display:flex;align-items:center;gap:9px;}
.music-toggle {cursor:pointer;color:#9fc8ca;background:rgba(16,45,57,.8);border:1px solid rgba(160,209,200,.25);font-size:12px;white-space:nowrap;}
.music-toggle[aria-pressed="true"] {color:#b7ef9e;border-color:rgba(183,239,158,.6);background:rgba(38,83,68,.5);}
.geo-layer-controls {display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin: -3px 0 17px;}
.layer-title {font-size:9px;letter-spacing:1.6px;color:#9bb9c0;font-weight:800;margin-right:3px;white-space:nowrap;}
.layer-chip {color:#98b4bb;white-space:nowrap;font-size:11px;font-weight:700;cursor:pointer;background:rgba(21,53,62,.65);border:1px solid rgba(136,183,193,.25);padding:8px 10px;border-radius:10px;line-height:1.05;}
.layer-chip.on {color:#d6f3e8;border-color:rgba(135,207,173,.66);background:rgba(42,100,87,.47);}
.layer-chip:focus-visible,.music-toggle:focus-visible {outline:2px solid #c7f5ad;outline-offset:2px;}
@media(max-width:1100px){.layer-chip{font-size:10px;padding:7px 9px}.geo-layer-controls{gap:5px}.music-toggle{font-size:10px;padding:8px}}
@media(max-width:760px){.header-actions{margin-left:auto}.geo-layer-controls{gap:6px}}


/* v0.8.1 — icon-first, viewport-attached controls and responsive progress placement. */
.icon-defs {position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.ui-icon {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto;display:block}
.mobile-region-controls {display:none}
.geo-layer-controls {
  position:absolute;z-index:8;left:50%;bottom:15px;transform:translateX(-50%);
  width:max-content;max-width:calc(100% - 25px);margin:0;padding:6px;
  display:flex;align-items:stretch;flex-wrap:nowrap;gap:5px;
  background:rgba(4,23,33,.9);border:1px solid rgba(160,211,207,.26);
  border-radius:13px;box-shadow:0 8px 28px #001b2488;
  overflow-x:auto;scrollbar-width:none;touch-action:pan-x;
}
.geo-layer-controls::-webkit-scrollbar {display:none}
.layer-chip {min-width:0;display:flex;align-items:center;justify-content:center;gap:7px;
  padding:9px 11px;min-height:39px;line-height:1;white-space:nowrap;
  color:#aec8ce;background:rgba(20,55,65,.67);border:1px solid rgba(156,204,203,.23);border-radius:9px;
  font-size:11px;font-weight:700;box-shadow:none;transition:background .15s,border-color .15s;
}
.layer-chip .ui-icon {width:20px;height:20px}
.layer-chip.on {color:#c8f5cf;background:rgba(49,103,83,.56);border-color:rgba(139,223,172,.64)}
.layer-chip:hover {background:rgba(49,103,83,.62)}
.layer-title {display:none}
.music-toggle {
  position:absolute;z-index:8;right:calc(5.7% + 13px);top:100px;
  width:50px;height:44px;padding:0;display:flex;justify-content:center;align-items:center;
  color:#a6cad0;background:rgba(4,28,40,.92);border:1px solid rgba(164,218,211,.28);
  border-radius:16px;box-shadow:0 7px 23px #001a2277;cursor:pointer;
}
.music-toggle .ui-icon {width:22px;height:22px}
.music-toggle[aria-pressed="true"] {color:#c6f1a9;border-color:rgba(188,234,169,.76);background:rgba(32,83,68,.94)}
.music-off-strike {position:absolute;top:21px;left:14px;width:23px;height:2px;transform:rotate(-43deg);background:#ddb9a5;border-radius:5px;box-shadow:0 0 1px #05202c;pointer-events:none}
.music-toggle[aria-pressed="true"] .music-off-strike {display:none}
/* Reserve the upper and lower edges of the globe for controls without changing map interaction. */
@media (max-width: 900px) {
  .planet-area {height:clamp(350px,72vw,520px);min-height:350px;max-height:520px}
  .planet-caption {display:none}
  .mobile-region-controls {display:block;position:absolute;left:14px;top:14px;z-index:9;max-width:calc(100% - 95px)}
  .mobile-region-trigger {display:flex;align-items:center;justify-content:space-between;gap:7px;
    max-width:100%;min-height:42px;padding:9px 12px;border-radius:11px;
    border:1px solid rgba(173,232,200,.38);background:rgba(5,32,43,.94);
    color:#cff2cf;font-size:12px;font-weight:750;text-align:left;box-shadow:0 5px 25px #001b2499;
  }
  .mobile-region-trigger .ui-icon {width:17px;height:17px}
  .mobile-region-picker {position:absolute;top:49px;left:0;width:min(286px,calc(100vw - 35px));max-height:240px;overflow-y:auto;
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px;
    background:#092b39;border:1px solid rgba(169,223,209,.35);border-radius:12px;box-shadow:0 17px 37px #0009;
  }
  .mobile-region-picker[hidden] {display:none!important}
  .region-option {border:1px solid rgba(154,217,209,.2);background:#143844;color:#c1dad9;
    border-radius:9px;padding:11px 7px;min-height:41px;font-size:12px;font-weight:750;text-align:center;
  }
  .region-option.selected {background:#b7ec9e;color:#163629;border-color:#cff3c0}
  .game-panel {padding:11px 18px 32px;}
  .game-panel > .eyebrow,.game-panel > .filter-group {display:none}
  .region-progress {margin:0 0 12px;gap:7px}
  .progress-pair {gap:9px}
  .progress-track-text {font-size:10px;letter-spacing:0;gap:5px;white-space:nowrap}
  .reset-link {min-width:62px;min-height:42px;margin-left:0}
  .geo-layer-controls {bottom:12px}
  .layer-chip {min-width:42px;width:42px;height:43px;padding:8px}
  .layer-label {display:none}
  .music-toggle {right:calc(14px + 10px);top:89px;width:44px;height:42px;border-radius:14px}
  .music-off-strike {left:11px;top:20px}
}
@media (max-width: 480px) {
  .header {grid-template-columns:minmax(0,1fr) auto;padding:12px 15px;min-height:112px;gap:10px}
  .header .brand {min-width:0}
  .brand-text {font-size:12px;letter-spacing:1.45px}
  .brand-text small {font-size:8px;letter-spacing:1.6px}
  .brand-mark {width:34px;height:34px;flex:0 0 34px}
  .header-actions {grid-row:1;grid-column:2}
  .header-mode {padding:9px 10px;font-size:11px}
  .header .top-nav {grid-column:1/-1;width:100%;display:flex;justify-content:center}
  .nav-btn {flex:1;padding:10px 12px}
  .planet-area {height:clamp(330px,92vw,420px);min-height:330px}
  .game-panel {padding:11px 13px 27px}
  .progress-pair {gap:7px}
  .progress-track-text {font-size:9px}
  .reset-link {min-width:60px;padding:7px 8px;font-size:10px}
  .region-progress {margin-bottom:10px}
  .globe-compass {top:13px;right:13px}
  .music-toggle {top:87px;right:24px}
  #screen {padding-bottom:20px}
  .question-top {margin-bottom:10px}
}


/* v0.8.2 – compact mobile header, card-contained Next and persistent viewport audio controls. */
#screen {overflow-anchor:none;}
.nav-label-short,.mode-short {display:none;}
.quiz-reveal .quiz-country-card {
  display:flex; flex-direction:column; min-height:245px;
  padding:17px 19px; margin:0;
  border-color:rgba(181,236,164,.38);
  background:linear-gradient(130deg,rgba(25,71,66,.86),rgba(13,43,54,.9));
}
.quiz-country-card .card-details {flex:1;}
.quiz-country-card .celebrate {margin:0 0 10px;}
.card-next-row {display:flex;justify-content:flex-end;align-items:center;margin-top:15px;}
.card-next-row .primary-action {min-height:43px;}
.narration-toggle {
  position:absolute;z-index:8;right:calc(5.7% + 13px);top:154px;
  width:50px;height:44px;padding:0;display:flex;align-items:center;justify-content:center;
  border:1px solid rgba(164,218,211,.28);background:rgba(4,28,40,.92);
  color:#b7e1df;border-radius:16px;box-shadow:0 7px 23px #001a2277;
}
.narration-toggle .ui-icon {width:23px;height:23px;}
.narration-toggle:disabled {opacity:.48;cursor:default;}
.narration-toggle:focus-visible {outline:2px solid #c7f5ad;outline-offset:2px;}
@media(max-width:900px) {
  .narration-toggle {right:calc(14px + 10px);top:140px;width:44px;height:42px;border-radius:14px;}
}
@media(max-width:760px) {
  .header {
    display:grid;grid-template-columns:minmax(0,1fr) auto auto;
    align-items:center;gap:7px;height:62px;min-height:62px;
    padding:7px 10px;
  }
  .header .brand {grid-column:1;grid-row:1;gap:7px;min-width:0;flex:initial;}
  .brand-mark {width:30px;height:30px;flex:0 0 30px;font-size:23px;}
  .brand-text {font-size:10px;letter-spacing:.7px;white-space:nowrap;}
  .brand-text small {font-size:7px;letter-spacing:.5px;margin-top:3px;}
  .header .top-nav {grid-column:2;grid-row:1;justify-self:end;display:flex;width:auto;min-width:0;
    padding:3px;margin:0;gap:1px;border-radius:9px;
  }
  .nav-btn {padding:8px 7px;min-height:36px;font-size:11px;line-height:1.1;}
  .nav-label-long {display:none;}.nav-label-short {display:inline;}
  .header-actions {grid-column:3;grid-row:1;justify-self:end;margin:0;min-width:0;}
  .header-mode {padding:8px 7px;min-height:36px;font-size:10px;letter-spacing:0;}
  .mode-long {display:none;}.mode-short {display:inline;}
  .quiz-country-card {min-height:258px;}
  .card-next-row .primary-action {min-height:48px;min-width:132px;}
}
@media(max-width:390px) {
  .header {padding-inline:7px;gap:5px;}
  .header .brand {gap:5px;}
  .brand-mark {width:27px;height:27px;flex-basis:27px;}
  .brand-text {font-size:9px;letter-spacing:.35px;}
  .brand-text small {font-size:6px;letter-spacing:.35px;}
  .nav-btn {font-size:10px;padding-inline:6px;}
  .header-mode {font-size:9px;padding-inline:6px;}
}

/* v0.8.3 — optional mistake heatmap, readable legend, extra icon in viewport. */
.heatmap-legend[hidden]{display:none!important}
.heatmap-legend{
  position:absolute;z-index:7;bottom:85px;left:50%;transform:translateX(-50%);
  display:flex;align-items:center;justify-content:center;gap:10px;padding:7px 12px;
  background:rgba(4,25,35,.86);border:1px solid rgba(158,205,199,.25);
  border-radius:999px;color:#d0e6e0;font-size:11px;font-weight:650;white-space:nowrap;
  box-shadow:0 6px 20px #00182177;pointer-events:none;
}
.heatmap-legend span {display:inline-flex;align-items:center;gap:4px;}
.heatmap-legend-title{letter-spacing:.1px;color:#acc9c5;}
.hm-dot{display:inline-block;height:9px;width:9px;border-radius:50%;}
.hm-green{background:#42bf8c}.hm-yellow{background:#f7d145}.hm-orange{background:#f48b36}.hm-red{background:#dc4a54}
.layer-chip[data-value="heatmap"].on{color:#ffe6b5;border-color:#f6ca87;background:rgba(138,87,46,.63)}
@media(max-width:760px){
  .heatmap-legend{bottom:77px;font-size:10px;padding:6px 10px;gap:8px;max-width:95%;}
  .geo-layer-controls{gap:4px;}
  .layer-chip{min-width:39px;width:39px;height:42px;padding:7px;}
  .layer-chip .ui-icon{width:19px;height:19px;}
}
@media(max-width:370px){
  .geo-layer-controls{gap:3px;padding:5px;max-width:calc(100% - 12px);}
  .layer-chip{width:38px;min-width:38px;padding:6px;}
}


/* v0.9 — modular rich country cards, consistent between LG TV and mobile.
   Changing sections only re-renders the fixed-size panel; no screen jump. */
.rich-country-card{
  --country-accent:#b5eba7;
  position:relative;overflow:hidden;
  background:linear-gradient(135deg,rgba(27,75,69,.90),rgba(12,42,53,.95));
  border:1px solid rgba(189,235,180,.33);
  padding:17px 18px 16px;
}
.rich-country-card::before{
  content:"";pointer-events:none;position:absolute;right:-80px;top:-110px;
  width:250px;height:250px;border-radius:50%;
  background:radial-gradient(circle,rgba(196,233,191,.10),transparent 73%);
}
.rich-card-head{display:flex;gap:12px;align-items:center;justify-content:space-between;min-width:0;}
.rich-card-heading{display:flex;align-items:center;gap:11px;min-width:0;}
.rich-card-heading .flag {display:flex;align-items:center;flex:0 0 auto;}
.rich-card-heading .flag-image{width:49px;height:32px;object-fit:contain;}
.rich-card-identity{min-width:0;}
.rich-card-identity h2{font-size:clamp(20px,1.8vw,25px);line-height:1.16;margin:0 0 5px;font-weight:850;}
.rich-card-identity > span{color:#b2cdc7;font-size:12px;line-height:1.35;}
.rich-card-tagline{
  color:var(--country-accent);font-size:10px;line-height:1.35;font-weight:750;
  letter-spacing:.4px;max-width:148px;flex:0 1 148px;text-align:right;
}
.card-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-top:16px;}
.card-tab{
  border:1px solid rgba(167,214,204,.22);background:rgba(10,41,54,.62);
  border-radius:10px;color:#a7c8c6;min-width:0;height:50px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;padding:5px 2px;transition:background .15s,border-color .15s;
}
.card-tab .ui-icon{width:19px;height:19px;stroke-width:1.8;}
.card-tab span{font-size:10px;font-weight:750;line-height:1.1;white-space:nowrap;}
.card-tab.selected{background:rgba(140,206,153,.19);border-color:var(--country-accent);color:#e0f5db;}
.card-tab:disabled{opacity:.31;cursor:not-allowed;}
.card-tab:focus-visible,.module-item:focus-visible{outline:2px solid #dbf8b9;outline-offset:1px;}
.card-panel{
  height:192px;min-height:192px;max-height:192px;overflow-y:auto;
  scrollbar-width:thin;scrollbar-color:#4f8580 transparent;
  margin-top:9px;padding:11px 12px;border-radius:12px;
  background:rgba(5,27,38,.43);border:1px solid rgba(164,219,207,.11);
  overscroll-behavior:contain;
}
.card-facts .card-summary{color:#eff3e9;font-size:13px;line-height:1.55;font-weight:650;margin:0 0 9px;}
.card-facts .fact-bullet{display:flex;gap:9px;align-items:start;color:#c7dfd8;font-size:12px;line-height:1.45;margin:7px 0;}
.fact-bullet .ui-icon{width:15px;height:15px;color:var(--country-accent);flex:0 0 15px;margin-top:2px;}
.module-hint{color:#92b8b5;font-size:10px;line-height:1.35;margin-bottom:8px;}
.module-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
.module-item{
  display:flex;align-items:center;gap:7px;min-width:0;min-height:39px;
  border:1px solid rgba(162,219,204,.17);border-radius:9px;
  padding:6px 8px;background:rgba(25,70,76,.62);color:#d3e4df;text-align:left;
}
.module-item.selected{border-color:var(--country-accent);background:rgba(71,115,96,.35);}
.module-item .ui-icon{width:21px;height:21px;flex:0 0 21px;stroke-width:1.6;color:#b3d6c9;}
.module-item span{flex:1;min-width:0;font-size:11px;font-weight:750;line-height:1.2;}
.module-item small{font-size:14px;color:#f7df9d;}
.module-detail{
  display:flex;flex-direction:column;gap:4px;margin-top:8px;border-top:1px solid rgba(160,215,195,.13);
  padding-top:8px;font-size:12px;line-height:1.45;color:#cadcd8;
}
.module-detail-label{color:var(--country-accent);font-weight:750;font-size:12px;}
.card-empty{min-height:125px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;opacity:.72;}
.card-empty .ui-icon{width:33px;height:33px;color:#b8d8c7;}
.card-empty p{font-size:12px;text-align:center;margin:0;}
.quiz-country-card .card-next-row{margin-top:12px;}
.quiz-country-card .card-next-row button{min-height:43px;}
/* On desktop, preserve the globe's viewport and scroll only the cards panel. */
@media(min-width:901px){
 .rich-country-card{padding:15px 17px;}
 .card-panel{height:178px;min-height:178px;max-height:178px;}
 .rich-card-tagline{max-width:115px;}
}
@media(max-width:760px){
 .rich-country-card{padding:12px 14px 13px;}
 .rich-card-heading .flag-image{width:43px;height:29px;}
 .rich-card-identity h2{font-size:21px;}
 .rich-card-identity>span{font-size:11px;}
 .rich-card-tagline{display:none;}
 .card-tab{height:49px;}
 .card-tab span{font-size:9px;}
 .card-tab .ui-icon{width:20px;height:20px;}
 .card-panel{height:184px;min-height:184px;max-height:184px;padding:10px;}
 .quiz-country-card .card-next-row{margin-top:10px;}
 .quiz-country-card .card-next-row .primary-action{min-width:140px;min-height:46px;}
}
@media(max-width:370px){
 .card-tabs{gap:4px;}
 .card-tab span{font-size:8px;}
 .module-item{padding:5px 6px;}
 .module-item span{font-size:10px;}
}


/* v0.9.1: do not hide the seventh (Heatmap) layer outside the mobile viewport.
   The previous single-row flexbox needed horizontal scrolling. */
@media (max-width: 900px) {
  .geo-layer-controls {
    box-sizing:border-box;
    display:grid;
    grid-template-columns:repeat(7,minmax(0,1fr));
    width:min(440px,calc(100% - 16px));
    max-width:calc(100% - 16px);
    padding:5px;
    gap:3px;
    overflow:visible;
    touch-action:manipulation;
  }
  .geo-layer-controls .layer-chip {
    box-sizing:border-box;
    width:100%;min-width:0;max-width:none;
    height:42px;min-height:42px;
    margin:0;padding:5px 0;
    border-radius:8px;
  }
  .geo-layer-controls .layer-chip .ui-icon {width:19px;height:19px;}
  .geo-layer-controls .layer-label {display:none;}
}
@media (max-width: 350px) {
  .geo-layer-controls {width:calc(100% - 10px);max-width:calc(100% - 10px);gap:2px;padding:3px;}
  .geo-layer-controls .layer-chip {height:38px;min-height:38px;}
  .geo-layer-controls .layer-chip .ui-icon {width:17px;height:17px;}
}
