
:root{color-scheme:dark;font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;background:#07101d;color:#eaf1fb}*{box-sizing:border-box}body{margin:0}.app{display:grid;grid-template-columns:310px minmax(0,1fr);height:100vh;min-height:650px}.sidebar{background:#0d1929;border-right:1px solid #27374a;padding:20px;overflow:auto}.brand{font-size:23px;font-weight:850;letter-spacing:-.7px}.muted{color:#9aafc6;font-size:12px;line-height:1.5}.eyebrow{color:#5cd7c4;text-transform:uppercase;letter-spacing:1.7px;font-size:10px;font-weight:800;margin-bottom:7px}.section{margin-top:23px}.field{display:block;color:#b4c7da;font-size:12px;font-weight:650;margin-bottom:8px}select,button{font:inherit}select{width:100%;padding:11px;background:#14253a;color:#fff;border:1px solid #34506a;border-radius:10px;outline:none}button{border:1px solid #34516b;background:#172d44;color:#edf7ff;border-radius:10px;padding:11px 13px;cursor:pointer;transition:background .18s,transform .18s}button:hover{background:#24445f}button:active{transform:scale(.98)}button.primary{background:#11a994;color:#051a1b;border-color:#35ddc8;font-weight:800}button.primary:hover{background:#4be0ce}button.alt{background:#5c4628;border-color:#a78943}.buttons{display:grid;gap:9px}.buttons.two{grid-template-columns:1fr 1fr}.prompt{padding:16px;border:1px solid #2d4a64;border-radius:13px;background:linear-gradient(135deg,#19334a,#102235);margin-top:15px}.prompt .name{font-size:24px;font-weight:850;margin:7px 0}.status{font-size:13px;color:#b9cde1;min-height:37px;line-height:1.5}.stat{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid #23384b;color:#bbcbda;font-size:13px}.stat strong{color:#fff}.workspace{min-width:0;min-height:0;overflow:hidden;display:grid;grid-template-rows:minmax(0,1fr) 20px 168px;padding:9px 12px 10px;gap:6px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:3px 5px}.mapwrap{position:relative;min-width:0;min-height:0;height:100%;overflow:hidden;border:1px solid #29435b;border-radius:16px;background:radial-gradient(ellipse at 50% 40%,#102d48,#071827 80%)}svg{width:100%;height:100%;display:block;touch-action:none;cursor:grab}svg.drag{cursor:grabbing}.country{fill:#26435a;stroke:#66829b;stroke-width:.65;vector-effect:non-scaling-stroke;transition:fill .25s,opacity .25s;cursor:pointer}.country:hover{fill:#427f8e}.country.dim{opacity:.24}.country.featured{fill:#1cbda8;stroke:#b0fff0;stroke-width:1.3;animation:pulse 2.6s ease-in-out infinite}.country.correct{fill:#4de3c6;stroke:#e0fff5;stroke-width:1.8}.country.wrong{fill:#ed6e7e}.country.answer{fill:#e8b85a;stroke:#ffe8a2;stroke-width:1.7;animation:pulse 2s infinite}@keyframes pulse{50%{fill:#4bdac8;filter:drop-shadow(0 0 4px #35d6bc)}}.gridline{fill:none;stroke:#32536a;stroke-width:.6;opacity:.6;pointer-events:none}.label{font-size:11px;font-weight:700;fill:#ecf8ff;stroke:#091b2d;stroke-width:3px;paint-order:stroke;pointer-events:none}.label.main{font-size:15px;fill:#ffdf92}.label.neighbor{fill:#a6f4e6}.ocean{font-size:17px;letter-spacing:2px;fill:#4d819c;pointer-events:none}.compass{position:absolute;top:18px;right:18px;width:76px;height:76px;background:#091a2bd9;border:1px solid #426078;border-radius:50%;display:grid;place-items:center;pointer-events:none}.compass b{font-size:20px;color:#63e5d1}.compass span{position:absolute;font-size:11px;color:#d1e2f2}.compass .n{top:5px}.compass .s{bottom:4px}.compass .w{left:7px}.compass .e{right:7px}.maptools{position:absolute;bottom:15px;right:15px;display:flex;gap:6px}.maptools button{background:#0d2437d9;padding:9px 12px}.legend{display:flex;gap:16px;flex-wrap:nowrap;overflow:hidden;white-space:nowrap;align-items:center;color:#93adc3;font-size:12px;padding:0 5px}.legend b{color:#f0f8ff}.list{display:flex;align-content:flex-start;gap:7px;flex-wrap:wrap;height:168px;min-height:168px;max-height:168px;overflow-y:auto;overflow-x:hidden;padding:2px 5px;scrollbar-gutter:stable}.chip{padding:6px 9px;border-radius:7px;font-size:12px;background:#162d41;border:1px solid #34516a}.chip:hover{background:#1b615d}.section.locked{opacity:.46}.section.locked select{cursor:not-allowed}.section:not(.locked) #subgroup{border-color:#30a997;box-shadow:0 0 0 1px #164a4a}.note{font-size:11px;color:#839bb2;line-height:1.5;margin-top:14px}@media(max-width:850px){.app{display:flex;flex-direction:column;height:auto;min-height:100vh}.sidebar{overflow:visible}.workspace{height:75vh;min-height:520px;grid-template-rows:minmax(0,1fr) 20px 168px}.topbar{align-items:flex-start}.brand{font-size:20px}}

.hint-toggle{width:100%;border-color:#3d647d;background:#102c40;color:#d5eaf4;font-weight:750}.hint-toggle.enabled{background:linear-gradient(110deg,#0a776e,#0c5e78);border-color:#5ce9d4;color:#f2fffc;box-shadow:0 0 0 1px #0c7269 inset}.hint-tooltip{position:absolute;z-index:25;left:0;top:0;pointer-events:none;opacity:0;transform:translate(-50%,-115%) scale(.96);transition:opacity .13s,transform .13s;background:#061b2af2;border:1px solid #60e6d4;box-shadow:0 12px 35px #0008,0 0 20px #1dc7ad30;border-radius:11px;padding:9px 13px;color:#f5ffff;font-size:14px;font-weight:800;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis}.hint-tooltip.visible{opacity:1;transform:translate(-50%,-115%) scale(1)}.country.hint-hover{fill:#41a9b0!important;stroke:#b7fff4!important;stroke-width:2!important;filter:drop-shadow(0 0 5px #36f3d2);animation:none!important}.hint-tooltip small{display:block;color:#8fd5d3;font-size:10px;letter-spacing:.5px;font-weight:650;margin-bottom:2px}

/* Search is independent of the quiz and does not change its counters. */
.sidebar .search-group{margin-top:38px}
.country-search .search-line{display:grid;grid-template-columns:minmax(0,1fr) 67px;gap:6px}
.country-search input{min-width:0;width:100%;padding:10px 9px;background:#14253a;border:1px solid #34506a;color:#fff;border-radius:9px;outline:none;font:inherit;font-size:12px}
.country-search input:focus{border-color:#55e0ce;box-shadow:0 0 0 2px #42d5c526}
.country-search button{padding:9px 6px;background:#0c9288;border-color:#45d5c6;font-weight:750}
.search-message{color:#9cb6ca;font-size:11px;line-height:1.45}
.search-info{padding:10px;background:#091b2b;border:1px solid #315a69;border-radius:10px;font-size:12px;line-height:1.5}
.search-info strong{color:#85efe2}
.search-info .info-line{padding:4px 0;border-bottom:1px solid #1e384a}
.search-info .info-line:last-child{border-bottom:0}
.country.search-target{stroke:#f7e7a0!important;stroke-width:1.8!important;filter:drop-shadow(0 0 4px #e6c86b9a)}
.country.search-target:not(.answer):not(.wrong):not(.correct){fill:#32c7c0!important}
.search-map-tooltip{position:absolute;z-index:29;max-width:340px;min-width:240px;max-height:min(70vh,460px);overflow-y:auto;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .13s;left:0;top:0;background:#071a2bf2;border:1px solid #6de9d8;border-radius:12px;padding:12px;box-shadow:0 12px 38px #000a;color:#eafaff;font-size:12px;line-height:1.5}
.search-map-tooltip.visible{opacity:1;visibility:visible}
.search-map-tooltip .info-line{padding:3px 0;border-bottom:1px solid #2a4b59}
.search-map-tooltip .info-line:last-child{border-bottom:0}
.search-map-tooltip strong{color:#75e8dc}
/* Vatican: a clearly identifiable location point, not an invented border. */
.vatican-locator{fill:#a6d5dc;stroke:#143448;stroke-width:1;vector-effect:non-scaling-stroke;pointer-events:none;opacity:0;transition:opacity .12s ease}
.vatican-center{fill:#143448;pointer-events:none;opacity:0;transition:opacity .12s ease}
.vatican-label{fill:#e8f5fa!important;paint-order:stroke;stroke:#08192a;stroke-width:3px}
 .area-order-row{display:flex;flex-wrap:wrap;gap:8px 16px}.area-order-row label{display:inline-flex;align-items:center;gap:5px}
/* Five fixed controls in one row on desktop and phones */
.training-group .auto-player{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(72px,1.4fr)!important;gap:5px!important;width:100%;align-items:stretch;min-width:0}
.training-group .auto-player>button{min-width:0!important;width:100%!important}
.training-group .auto-speed-compact{min-width:0;display:flex;align-items:center;justify-content:center;gap:2px;height:100%;padding:0 3px;border:1px solid #34516b;border-radius:8px;background:#172d44;color:#edf7ff}
.training-group .auto-speed-compact svg{flex:0 0 16px}
.training-group .auto-speed-compact select{flex:1;min-width:0;width:100%;height:100%;border:0!important;background:transparent!important;color:inherit;padding:0 1px!important;font-size:12px!important;cursor:pointer;outline:none}
.training-group .auto-speed-compact:has(select:disabled){opacity:.35}
@media(max-width:480px){.training-group .auto-player{grid-template-columns:repeat(4,minmax(0,1fr)) minmax(70px,1.45fr)!important;gap:4px!important}.training-group .auto-speed-compact{padding:0 2px}.training-group .auto-speed-compact svg{flex-basis:14px;width:14px}}


/* Atlas palette: distinct neighboring tones and precise borders, without a uniform cyan flood. */
.country.featured{fill:var(--atlas-tone,#35b7ae);stroke:#d4f1f4;stroke-width:1.05;opacity:1;animation:atlasGlow 3.8s ease-in-out infinite;filter:drop-shadow(0 0 1.2px #5de5df45)}
@keyframes atlasGlow{0%,100%{filter:drop-shadow(0 0 1px #61e5df35)}50%{filter:drop-shadow(0 0 3px #61e5df75)}}
.country.dim{opacity:.35}
.country.featured:hover{filter:brightness(1.22) drop-shadow(0 0 4px #8ef5ed88);stroke:#fff;stroke-width:1.7}
.country.featured.correct{fill:#4de3c6;stroke:#e0fff5}
.country.featured.answer{fill:#e8b85a;stroke:#ffe8a2}
.country.featured.wrong{fill:#ed6e7e;stroke:#fff0f0}
.country.microstate{stroke:#e5f6ff;stroke-width:1.15;cursor:pointer;paint-order:stroke fill;vector-effect:non-scaling-stroke}.country.microstate.featured{stroke:#fff;stroke-width:1.4}.country.microstate.dim{opacity:.18}.country.microstate:hover{stroke:#fff;stroke-width:2}.country.microstate.answer{fill:#f1bd62}.country.microstate.wrong{fill:#ff6079}.country.microstate.correct{fill:#42e6b8}

/* Microstates: no fake shapes; invisible click target only. */
.country.microstate{stroke:#c9ecf1;stroke-width:.65;fill:#5ca5b4;filter:none;vector-effect:non-scaling-stroke}
.country.microstate.featured{stroke:#f2ffff;stroke-width:.9}
.micro-hit{fill:transparent!important;stroke:none!important;pointer-events:all;cursor:pointer;opacity:0!important}
.micro-hit:hover + *{opacity:1}

/* Country-level hover: ALL polygons of one state react together, regardless of tooltip setting. */
#lands g[data-id] .country { transition:fill .18s ease,stroke .18s ease,opacity .18s ease; }
#lands g[data-id]:hover .country:not(.answer):not(.wrong):not(.correct),
#lands g[data-id]:focus-within .country:not(.answer):not(.wrong):not(.correct) {
 fill:#41a9b0 !important;
 stroke:#b7fff4 !important;
 stroke-width:1.65 !important;
 opacity:1 !important;
 filter:drop-shadow(0 0 3px #36f3d270) !important;
 animation:none !important;
}
/* A selected answer must keep its semantic color even while the cursor is over it. */
#lands g[data-id]:hover .country.answer {fill:#e8b85a !important;}
#lands g[data-id]:hover .country.wrong {fill:#ed6e7e !important;}
#lands g[data-id]:hover .country.correct {fill:#4de3c6 !important;}

/* Компактная профессиональная панель: постоянные кнопки и четкая иерархия. */
.sidebar{padding:14px 13px 16px;scrollbar-gutter:stable;overscroll-behavior:contain}
.sidebar>.brand{font-size:21px;line-height:1.15;letter-spacing:-.4px;padding:2px 2px 11px;border-bottom:1px solid #24394d}
.sidebar>.section{margin-top:14px}
.sidebar>.section.buttons{position:sticky;top:8px;z-index:40;margin-top:14px;padding:10px;background:linear-gradient(180deg,#11243a 0%,#0c1b2c 100%);border:1px solid #38556b;border-radius:13px;box-shadow:0 12px 26px #020a14bb;gap:7px}
.sidebar>.section.buttons button{min-height:38px;padding:8px 9px;line-height:1.25;font-size:12px;border-radius:8px;transition:background .18s ease,border-color .18s ease,transform .12s ease}
.sidebar>.section.buttons .primary{min-height:43px;font-size:12px}
.sidebar>.section.buttons .two{gap:7px}
.sidebar>.section.buttons button:focus-visible{outline:2px solid #81f0df;outline-offset:2px}
.sidebar .field{margin-bottom:6px}
.sidebar select{padding:9px 10px}
.sidebar>.prompt{margin-top:14px}
@media(max-width:850px){.sidebar>.section.buttons{position:relative;top:auto}.sidebar{scrollbar-gutter:auto}}

/* Group controls by task: selection, labels, training. */
.sidebar .panel-group{margin-top:12px;padding:12px 10px;background:linear-gradient(160deg,#12243a,#0c1b2d);border:1px solid #2b4960;border-radius:13px;display:grid;gap:9px}
.sidebar .panel-heading{font-size:10px;font-weight:850;letter-spacing:1.1px;text-transform:uppercase;color:#76e5da;padding-bottom:7px;border-bottom:1px solid #2c4659}
.sidebar .panel-group .section{margin:0}.sidebar .panel-group .field{margin-bottom:5px}.sidebar .panel-group button{width:100%;min-height:39px;font-size:12px;padding:9px 8px;line-height:1.25}
.sidebar .panel-group .buttons{display:grid;gap:7px}.sidebar .panel-group .buttons.two{grid-template-columns:1fr 1fr}.sidebar .panel-group .primary{min-height:46px}
.sidebar .panel-group .section.buttons{position:static;padding:0;border:0;background:none;box-shadow:none;margin:0}
.sidebar .training-group{position:sticky;top:8px;z-index:30;box-shadow:0 12px 24px #0005}
.maptools #reset{font-size:11px;font-weight:700;padding:9px 12px;white-space:nowrap}
@media(max-width:850px){.sidebar .training-group{position:static}}

/* Distinct visual separation between control sections. */
.sidebar .panel-group{margin-top:0;}
.sidebar .panel-group + .panel-group{margin-top:38px;}
.sidebar .category-group{margin-top:17px;}
.sidebar .names-group{margin-top:38px;}
.sidebar .training-group{margin-top:38px;}
.sidebar .panel-group{box-shadow:0 5px 16px rgba(0,0,0,.16);}

/* Search suggestions only appear after actual text input, not on focus. */
.country-search{position:relative}
.country-suggestions[hidden]{display:none!important}
.country-suggestions{position:absolute;left:0;right:0;top:calc(100% + 4px);max-height:244px;overflow-y:auto;z-index:90;background:#0e2035;border:1px solid #41617d;border-radius:10px;box-shadow:0 14px 30px #0009;padding:4px}
.country-suggestion{display:block!important;width:100%;min-height:34px!important;text-align:left!important;padding:8px 11px!important;border:0!important;border-radius:6px!important;background:transparent!important;color:#e6f5ff!important;font-size:12px!important;cursor:pointer}
.country-suggestion:hover,.country-suggestion.active{background:#214762!important;color:white!important}

/* Search results belong on the map, not in the fixed-height sidebar. */
.search-group #searchMessage,.search-group #searchInfo{display:none!important}


.training-group #trainingType{margin-bottom:11px}
.country.group-correct,.country.group-correct:hover{fill:#26c88d!important;stroke:#d5fff1!important;stroke-width:1.7}
.country.group-wrong,.country.group-wrong:hover{fill:#ed526e!important;stroke:#ffd7df!important;stroke-width:1.7}
.country.group-answer,.country.group-answer:hover{fill:#e8b85a!important;stroke:#ffe8a2!important;stroke-width:1.7}
.country.group-correct,.country.group-wrong,.country.group-answer{animation:none!important;opacity:1!important}

#peninsulaAuditNote,#islandAuditNote,#groupnote{display:none!important}

/* Training question belongs directly below its controls. */
.sidebar>.training-group + .prompt{margin-top:10px;padding:12px 13px;min-height:0}
.sidebar>.training-group + .prompt .name{margin:5px 0 0;font-size:22px;line-height:1.2}
.sidebar>.training-group + .prompt .status{display:none!important}
.sidebar>.training-group + .prompt + .names-group{margin-top:38px}
.group-counter{display:flex;align-items:center;justify-content:space-between;margin-top:12px;padding:10px 12px;border:1px solid #31536d;border-radius:9px;background:#132b40;color:#dceefa;font-size:13px;gap:12px}.group-counter strong{font-size:21px;font-weight:750;color:#55e4c4;font-variant-numeric:tabular-nums;white-space:nowrap}

/* The question card keeps the same footprint in study and quiz modes. */
.sidebar>.training-group + .prompt{height:82px;min-height:82px;max-height:82px;overflow:hidden;display:flex;flex-direction:column;justify-content:center;padding:9px 13px}
.sidebar>.training-group + .prompt .eyebrow{flex:0 0 auto;margin:0 0 5px;font-size:10px;line-height:13px}
.sidebar>.training-group + .prompt .name{flex:0 1 auto;margin:0;font-size:22px;line-height:1.12;overflow-wrap:break-word;hyphens:auto}
.sidebar>.training-group + .prompt .name.compact{font-size:17px;line-height:1.12}
.sidebar>.training-group + .prompt .name.very-compact{font-size:14px;line-height:1.12}


/* Permanent single-row controls: switching training modes never adds/removes rows. */
.training-group .training-bottom{display:flex;align-items:stretch;gap:8px;margin-top:8px;min-height:39px}
.training-group .training-bottom #next{flex:1;min-width:0;margin:0!important}
.training-group .group-counter{display:flex!important;flex:0 0 63px;align-items:center;justify-content:center;box-sizing:border-box;margin:0;padding:4px 5px;min-height:39px;border:1px solid #31536d;border-radius:9px;background:#132b40;gap:0}
.training-group .group-counter strong{font-size:15px;line-height:1.1;color:#55e4c4;font-variant-numeric:tabular-nums;white-space:nowrap}
.training-group .group-counter.paused{opacity:.48}
.training-group .group-counter.paused strong{color:#a5b9c9}

.training-group #next.finished-restart{border-color:#43dcb9;color:#baffeb;background:#17463f}.prompt .name{overflow-wrap:anywhere}

/* One immutable task card geometry and typography in every mode. */
.sidebar > .training-group + .prompt {
 box-sizing:border-box !important;
 height:90px !important; min-height:90px !important; max-height:90px !important;
 padding:10px 12px !important;
 overflow:hidden !important;
 display:flex !important; flex-direction:column !important;
 justify-content:center !important; gap:3px !important;
}
.sidebar > .training-group + .prompt .eyebrow {
 flex:none !important; margin:0 !important;
 font-size:10px !important; line-height:13px !important;
}
.sidebar > .training-group + .prompt .name,
.sidebar > .training-group + .prompt .name.compact,
.sidebar > .training-group + .prompt .name.very-compact {
 flex:none !important; margin:0 !important;
 font-size:15px !important; line-height:17px !important;
 font-weight:800 !important;
 overflow-wrap:normal !important; word-break:normal !important;
 hyphens:auto !important;
 max-height:51px !important; overflow:hidden !important;
}
.sidebar > .training-group + .prompt .status{display:none !important}


.auto-controls{display:flex;align-items:center;gap:9px;min-height:38px;margin:9px 0}
.auto-controls label{flex:0 0 auto;font-size:11px;color:#a7bfd4}
.auto-controls select{flex:1;min-width:0;margin:0!important;padding:7px!important;font-size:12px!important}
.auto-controls.inactive{opacity:.38}
.country.auto-current,.country.auto-current:hover{fill:#38dfbe!important;stroke:#e4fff7!important;stroke-width:2!important;opacity:1!important}

#waterLabels{pointer-events:none;user-select:none}
.water-name{font-family:Arial,system-ui,sans-serif;fill:#a2bfcb;opacity:.34;text-anchor:middle;dominant-baseline:middle;font-weight:400;letter-spacing:.15px;paint-order:stroke;stroke:#071827;stroke-width:1.15px;stroke-opacity:.35}
.water-name.ocean-name{font-size:12px;letter-spacing:1px;opacity:.38;font-weight:500}
.water-name.sea-name{font-size:9.5px;font-style:italic;opacity:.39}
.water-name.lake-name{font-size:8.5px;opacity:.43}


/* Permanent player layout: no control changes its dimensions or position. */
.training-group .auto-player{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:8px 0 12px;height:37px;min-height:37px}
.training-group .auto-player button{height:37px;min-height:37px;width:100%;padding:0;font-size:17px;line-height:1;font-family:Arial,sans-serif;font-weight:600;display:flex;align-items:center;justify-content:center;border-radius:8px}
.training-group .auto-player button:disabled{opacity:.35;cursor:not-allowed;filter:saturate(.55)}
.training-group .auto-player button:not(:disabled):hover{border-color:#4bdcca}


/* One fixed player for every training mode; icon-only controls. */
.training-group .auto-player{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:12px 0 8px}
.training-group .auto-player button{min-width:0;height:39px;min-height:39px;font-size:18px;line-height:1;padding:0}
.training-group .legacy-training-control{display:none!important}
.training-group .buttons.two{display:flex!important;align-items:center;justify-content:center;min-height:39px;height:39px;margin:0!important}
.training-group .buttons.two #reveal{width:100%;height:39px;min-height:39px;font-size:13px;line-height:1.2;padding:0 8px}
.training-group .training-bottom{height:39px;min-height:39px;justify-content:flex-end}
.training-group .training-bottom #next{display:none!important}
.training-group .training-bottom .group-counter{flex:0 0 63px}
.san-marino-locator{fill:#183b50;stroke:#b4dfed;stroke-width:.85;vector-effect:non-scaling-stroke;pointer-events:none}
.andorra-boundary{stroke:#c6e5ed;stroke-width:1.15;stroke-linejoin:round}

.area-order-row{min-height:35px;display:flex;align-items:center;margin:6px 0 8px}
.area-order-row label{display:flex;align-items:center;gap:8px;font-size:11.5px;color:#c6d7e5;cursor:pointer}
.area-order-row input{width:15px;height:15px;accent-color:#23c6b6;margin:0;flex:none}
.area-order-row:has(input:disabled){opacity:.38}

.maldives-atoll{fill:#83dfd5;stroke:#c9ffff;stroke-width:.24;vector-effect:non-scaling-stroke;pointer-events:all;cursor:pointer;opacity:0}
#lands g[data-id="MDV"]:hover .maldives-atoll{fill:#d6fff6}
#lands g[data-id="MDV"]:has(.country.answer) .maldives-atoll{fill:#ffd27d}
.monaco-locator{fill:#8fe4dd;stroke:#e2ffff;stroke-width:1.1;vector-effect:non-scaling-stroke;opacity:0;pointer-events:none;cursor:pointer}

.micro-locator{fill:#183b50!important;stroke:#b4dfed!important;stroke-width:.85!important;vector-effect:non-scaling-stroke;cursor:pointer}
.micro-locator:hover{fill:#4dd9cb!important;stroke:#e9ffff!important}


.taiwan-note{font-size:11px;color:#7f9cae;padding:7px 3px 2px;line-height:1.35}

/* Responsive mobile atlas: map remains accessible while controls scroll below it. */
@media (max-width: 850px) {
 html,body{width:100%;max-width:100%;overflow-x:hidden}
 .app{display:flex!important;flex-direction:column!important;height:auto!important;min-height:100dvh!important;overflow:visible!important}
 .workspace{order:0!important;display:grid!important;grid-template-rows:minmax(0,1fr) auto auto minmax(52px,auto)!important;height:60dvh!important;min-height:380px!important;max-height:690px!important;padding:6px 7px!important;gap:5px!important;overflow:hidden!important;width:100%!important}
 .sidebar{order:1!important;width:100%!important;max-width:100%!important;padding:12px!important;overflow:visible!important;border-right:0!important;border-top:1px solid #2b455b!important}
 .mapwrap{width:100%!important;min-height:0!important;border-radius:12px!important}
 .compass{width:47px!important;height:47px!important;top:8px!important;right:8px!important}
 .compass b{font-size:15px!important}.compass span{font-size:8px!important}
 .maptools{bottom:8px!important;right:8px!important;gap:5px!important}
 .maptools button{min-width:38px!important;min-height:38px!important;padding:7px 8px!important;font-size:12px!important}
 .legend{font-size:10px!important;overflow-x:auto!important;gap:10px!important;white-space:nowrap!important;scrollbar-width:none!important}
 .taiwan-note{font-size:10px!important;line-height:1.2!important;padding:0 3px!important;overflow:hidden!important;max-height:30px!important}
 .list{height:auto!important;min-height:52px!important;max-height:86px!important;overflow:auto!important;padding:3px!important;gap:5px!important}
 .chip{font-size:11px!important;padding:6px 8px!important;min-height:31px!important}
 .sidebar>.brand{font-size:19px!important}
 .sidebar .panel-group{max-width:650px;margin-left:auto;margin-right:auto}
 .sidebar .panel-group + .panel-group{margin-top:18px!important}
 .sidebar>.training-group + .prompt{max-width:650px;margin-left:auto;margin-right:auto}
 .sidebar .training-group{position:static!important;top:auto!important}
 .sidebar select,.sidebar button,.sidebar input[type=search]{min-height:44px;font-size:14px}
 .training-group .auto-player{height:44px!important;min-height:44px!important}
 .training-group .auto-player button{height:44px!important;min-height:44px!important}
 .training-group .buttons.two,.training-group .buttons.two #reveal{height:44px!important;min-height:44px!important}
 .training-group .training-bottom,.training-group .group-counter{min-height:44px!important}
 .sidebar .panel-group .section.buttons{position:static!important}
}
@media(max-width:480px){
 .workspace{height:55dvh!important;min-height:340px!important}
 .sidebar{padding:9px!important}
 .sidebar .panel-group{padding:11px 10px!important}
 .maptools button{font-size:11px!important}
 .sidebar .search-line{display:flex!important;gap:6px!important;min-width:0!important}
 .sidebar .search-line input{min-width:0!important;flex:1!important;width:0!important}
 .sidebar .search-line button{flex:0 0 auto!important}
}
@media(orientation:landscape) and (max-height:500px) and (max-width:950px){
 .workspace{height:85dvh!important;min-height:300px!important}
}


.maptools .eye-map-control{display:inline-flex;align-items:center;justify-content:center;min-width:43px;min-height:43px;padding:8px!important;flex:0 0 auto}
.maptools .eye-icon{width:23px!important;height:23px!important;display:block;overflow:visible;fill:none;stroke:#eaf7ff;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;cursor:inherit;touch-action:auto}
.maptools .eye-icon .eye-slash{display:none}
.maptools .eye-map-control.eye-open{background:#116e67!important;border-color:#4de3c6!important}
.maptools .eye-map-control.eye-open .eye-pupil{fill:#4de3c6;stroke:#4de3c6}
.maptools .eye-map-control.eye-open .eye-slash{display:block;stroke:#eaf7ff;stroke-width:2.1}
@media(max-width:850px){.maptools .eye-map-control{min-width:38px!important;min-height:38px!important;padding:7px!important}.maptools .eye-icon{width:21px!important;height:21px!important}}

/* Approved compact atlas interface */
.app{grid-template-columns:minmax(260px,330px) minmax(0,1fr);height:100vh;min-height:0}
.sidebar{display:flex;flex-direction:column;gap:10px;overflow:auto;padding:14px}
.brand-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.brand{font-size:20px}
#settingsToggle{border:1px solid #35536c;background:#1a3045;color:#e9f5ff;border-radius:10px;padding:10px 12px;white-space:nowrap;cursor:pointer}
#settingsPanel{display:none!important}
#settingsPanel.is-open{display:flex!important}
.sidebar .panel-group + .panel-group,.sidebar .training-group,.sidebar .category-group{margin-top:0!important}
.sidebar .panel-group{box-shadow:none}
.sort-block{display:grid;gap:8px}
.sort-options{display:grid;grid-template-columns:1fr 1.15fr 1fr;gap:6px}
.sort-choice{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:46px!important;padding:7px 4px!important;border:1px solid #36546b;border-radius:9px;background:#203449;color:#f0f7fa;cursor:pointer;font-size:12px!important;white-space:nowrap}
.sort-choice.active{border:2px solid #4bdcca;background:#164c52}
.sort-choice span{font-size:18px;line-height:1}
.training-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:6px 0 12px}
.training-tabs button{width:100%;min-width:0;padding:10px 4px!important;font-size:12px!important;border-radius:9px;background:#203449;border:1px solid #3c5670;color:#eaf1fb;cursor:pointer}
.training-tabs button.active{background:#164c52;border-color:#4bdcca}
.sidebar .training-group{position:static;z-index:auto}
.auto-controls[hidden]{display:none!important}
.mapwrap>.prompt{position:absolute;top:12px;left:50%;transform:translateX(-50%);z-index:9;width:max-content;max-width:calc(100% - 130px);min-width:0;height:auto!important;min-height:0!important;margin:0!important;padding:8px 13px!important;background:#10283eea;border:1px solid #3a5870;border-radius:10px;pointer-events:none;text-align:center}
.mapwrap>.prompt .eyebrow,.mapwrap>.prompt .status{display:none!important}
.mapwrap>.prompt .name{font-size:14px!important;margin:0!important;line-height:1.3}
.mapwrap>.prompt:not(.find-prompt){display:none!important}
.mapwrap>.prompt.find-prompt{display:block!important;visibility:visible!important}
.sidebar .search-group{order:2}
.sidebar .training-group{order:3}
.sidebar .brand-row{order:0}
.sidebar #settingsPanel{order:1}
.sidebar .search-group .panel-heading{margin-bottom:7px}
.sidebar .search-group .field{display:none}
.sidebar .training-group .panel-heading{margin-bottom:9px}
.sidebar .training-group .hint-toggle{font-size:11px}
@media(max-width:850px){
 .app{display:flex;flex-direction:column;height:auto;min-height:100vh}
 .sidebar{display:contents}
 .brand-row{order:0;margin:10px 12px 0}
 #settingsPanel{order:1;margin:0 12px!important}
 .workspace{order:2;min-height:0!important;overflow:visible!important}
 .sidebar .search-group{order:3;margin:8px 12px 0!important}
 .sidebar .training-group{order:4;margin:8px 12px 16px!important}
 .mapwrap{min-height:330px!important}
 .mapwrap>.prompt{top:10px}
 .sidebar .panel-group{padding:12px!important}
 .sidebar .training-group{position:static!important}
 .sidebar .panel-group + .panel-group{margin-top:0!important}
 .sidebar .search-group,.sidebar .training-group{display:block}
}
@media(max-width:380px){
 .sort-choice{font-size:11px!important}
 .training-tabs button{font-size:11px!important}
 .auto-player{gap:4px!important}
}

.sort-choice svg,.auto-speed-compact svg,.eye-map-control svg{display:inline-block!important;flex-shrink:0!important;cursor:inherit!important;touch-action:auto!important}
/* Final compact layout: map gets all remaining height, no phantom grid rows. */
html,body{width:100%;max-width:100%;overflow-x:hidden}
.app{display:grid!important;grid-template-columns:288px minmax(0,1fr)!important;height:100dvh!important;min-height:0!important;overflow:hidden}
.sidebar{display:flex!important;flex-direction:column!important;gap:9px!important;min-height:0!important;overflow-y:auto!important;padding:11px!important;scrollbar-gutter:auto!important}
.brand-row{flex:0 0 auto;min-height:36px}
.brand-row .brand{font-size:17px!important;white-space:nowrap}
#settingsToggle{padding:7px 9px!important;font-size:12px!important;min-height:34px!important}
#settingsPanel{display:none!important}
#settingsPanel.is-open{display:grid!important}
.sidebar .panel-group{padding:10px!important;gap:7px!important;border-radius:11px!important;margin:0!important}
.sidebar .panel-heading{font-size:10px!important;padding-bottom:5px!important}
.sidebar .panel-group button{min-height:34px!important;padding:6px 7px!important;font-size:11px!important;line-height:1.15!important}
.sidebar .panel-group select{padding:7px 8px!important;font-size:12px!important;min-height:34px!important}
.sidebar .panel-group .section{margin:0!important}
.sidebar .panel-group .field{font-size:11px!important;margin-bottom:4px!important}
.sidebar .training-group{position:static!important;box-shadow:none!important;order:3}
.sidebar .search-group{order:2}
.sidebar .brand-row{order:0}
.sidebar #settingsPanel{order:1}
.sidebar .training-tabs{gap:5px!important;margin:0!important}
.sidebar .training-tabs button{font-size:12px!important;min-height:36px!important;padding:7px 2px!important}
.sort-options{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
.sort-choice{height:36px!important;min-height:36px!important;font-size:11px!important;padding:5px 3px!important}
.sort-choice svg{width:18px!important;height:18px!important}
.sort-choice span{font-size:15px!important}
.training-group .auto-player{grid-template-columns:repeat(4,minmax(0,1fr)) minmax(64px,1.5fr)!important;gap:4px!important}
.training-group .auto-player>button{height:36px!important;min-height:36px!important;padding:3px!important;font-size:15px!important}
.training-group .auto-speed-compact{height:36px!important;min-height:36px!important}
.training-group .auto-speed-compact select{font-size:11px!important}
.sidebar .hint-toggle{font-size:11px!important}
.sidebar .training-group .buttons.two{grid-template-columns:1fr!important}
.sidebar .training-group #reveal{min-height:34px!important}
.sidebar .group-counter{font-size:12px!important}
.workspace{display:flex!important;flex-direction:column!important;gap:7px!important;min-width:0!important;min-height:0!important;height:100%!important;overflow:hidden!important;padding:9px!important}
.mapwrap{flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:hidden!important}
.mapwrap #map{width:100%!important;height:100%!important}
.legend,.taiwan-note{display:none!important}
.list{flex:0 0 auto!important;height:auto!important;min-height:0!important;max-height:104px!important;overflow-y:auto!important;overflow-x:hidden!important;align-content:flex-start!important;gap:5px!important;padding:5px 2px!important;scrollbar-gutter:stable!important}
.chip{font-size:11px!important;padding:5px 7px!important;line-height:1.25!important;min-height:27px!important;width:auto!important;max-width:100%}
.maptools button{font-size:12px!important;padding:7px 9px!important;min-height:34px!important}
.maptools .eye-map-control svg{width:19px!important;height:19px!important}
.compass{width:52px!important;height:52px!important;top:9px!important;right:9px!important}
.compass b{font-size:14px!important}
.compass span{font-size:9px!important}
.mapwrap>.prompt{top:8px!important;left:12px!important;transform:none!important;max-width:calc(100% - 150px)!important;padding:6px 10px!important}
.mapwrap>.prompt .name{font-size:13px!important}
@media(max-width:850px){
 .app{display:flex!important;flex-direction:column!important;height:auto!important;min-height:100dvh!important;overflow:visible!important}
 .sidebar{display:contents!important}
 .brand-row{order:0;margin:9px 10px 0!important}
 #settingsPanel{order:1;margin:0 10px!important}
 .workspace{order:2!important;flex:0 0 auto!important;height:auto!important;min-height:0!important;overflow:visible!important;padding:8px 10px!important}
 .mapwrap{flex:none!important;height:min(64vh,540px)!important;min-height:280px!important}
 .list{max-height:94px!important}
 .sidebar .search-group{order:3;margin:0 10px 8px!important}
 .sidebar .training-group{order:4;margin:0 10px 14px!important}
 .sidebar .panel-group{padding:10px!important}
 .training-tabs button{min-height:42px!important;font-size:12px!important}
 .training-group .auto-player>button,.training-group .auto-speed-compact{min-height:42px!important;height:42px!important}
}
@media(max-width:380px){.brand-row .brand{font-size:15px!important}.mapwrap{height:52vh!important;min-height:245px!important}.maptools{gap:3px!important;right:6px!important;bottom:6px!important}.maptools button{padding:6px!important}}

/* Fixed map viewport: country-list contents must never resize the map. */
@media (min-width:851px){
 .app{height:100dvh!important;min-height:0!important}
 .workspace{display:grid!important;grid-template-rows:minmax(0,1fr) 104px!important;grid-template-columns:minmax(0,1fr)!important;height:100%!important;min-height:0!important;align-content:stretch!important;overflow:hidden!important}
 .mapwrap{grid-row:1!important;grid-column:1!important;min-width:0!important;min-height:0!important;width:100%!important;height:100%!important;flex:none!important}
 .list{grid-row:2!important;grid-column:1!important;box-sizing:border-box!important;height:104px!important;min-height:104px!important;max-height:104px!important;overflow-y:auto!important;overflow-x:hidden!important;align-content:flex-start!important;flex:none!important}
}
@media (max-width:850px){
 .workspace{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:min(64vh,540px) 94px!important;height:auto!important;min-height:0!important;align-content:start!important;overflow:visible!important}
 .mapwrap{grid-row:1!important;grid-column:1!important;height:100%!important;min-height:0!important;max-height:none!important;flex:none!important}
 .list{grid-row:2!important;grid-column:1!important;height:94px!important;min-height:94px!important;max-height:94px!important;overflow-y:auto!important;overflow-x:hidden!important;flex:none!important}
}
@media (max-width:380px){.workspace{grid-template-rows:max(245px,52vh) 94px!important}}


/* Structural isolation: country chips never participate in sizing the map. */
@media (min-width:851px) {
 .app .workspace {
   position:relative!important;display:block!important;
   height:100dvh!important;min-height:0!important;max-height:100dvh!important;
   overflow:hidden!important;box-sizing:border-box!important;
   padding:9px!important;
 }
 .workspace > .mapwrap {
   position:absolute!important;
   top:9px!important;left:9px!important;right:9px!important;bottom:119px!important;
   width:auto!important;height:auto!important;
   min-height:0!important;max-height:none!important;
   margin:0!important;flex:none!important;grid-area:auto!important;
 }
 .workspace > .list {
   position:absolute!important;
   left:9px!important;right:9px!important;bottom:9px!important;top:auto!important;
   width:auto!important;height:104px!important;
   min-height:104px!important;max-height:104px!important;
   box-sizing:border-box!important;
   overflow-y:auto!important;overflow-x:hidden!important;
   flex:none!important;grid-area:auto!important;
   margin:0!important;
 }
}
@media (max-width:850px) {
 .app .workspace {
   position:relative!important;display:block!important;
   height:calc(min(64dvh, 540px) + 110px)!important;
   min-height:390px!important;max-height:none!important;
   padding:8px 10px!important;box-sizing:border-box!important;
   overflow:hidden!important;flex:none!important;
 }
 .workspace > .mapwrap {
   position:absolute!important;
   top:8px!important;left:10px!important;right:10px!important;bottom:104px!important;
   width:auto!important;height:auto!important;min-height:0!important;
   max-height:none!important;margin:0!important;flex:none!important;grid-area:auto!important;
 }
 .workspace > .list {
   position:absolute!important;
   bottom:8px!important;left:10px!important;right:10px!important;top:auto!important;
   width:auto!important;height:90px!important;min-height:90px!important;max-height:90px!important;
   overflow-y:auto!important;overflow-x:hidden!important;box-sizing:border-box!important;
   margin:0!important;flex:none!important;grid-area:auto!important;
 }
}
@media (max-width:380px) {
 .app .workspace {height:calc(max(245px, 52dvh) + 110px)!important}
}
