.atlas-app { position: relative; display: grid; grid-template-rows: var(--atlas-header-h) minmax(0, 1fr); width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; background: var(--atlas-canvas); color: var(--atlas-ink); isolation: isolate; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.atlas-header { position: relative; z-index: 40; display: grid; grid-template-columns: minmax(210px, .7fr) minmax(300px, 1.25fr) minmax(310px, .85fr); gap: 22px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--atlas-line); background: rgba(255,255,255,.97); box-shadow: 0 4px 18px rgba(20,56,105,.08); }
.atlas-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.atlas-brand__mark { display: grid; flex: 0 0 46px; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: var(--atlas-blue); }
.atlas-brand__mark img { width: 28px; height: 28px; filter: brightness(0) invert(1); }
.atlas-brand__title { margin: 0; font-size: clamp(20px,2.1vw,30px); font-weight: 850; line-height: 1; letter-spacing: -.035em; white-space: nowrap; }
.atlas-brand__eyebrow { margin: 4px 0 0; color: var(--atlas-muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.atlas-search { position: relative; }
.atlas-search__icon { position: absolute; top: 50%; left: 16px; width: 21px; height: 21px; color: var(--atlas-muted); transform: translateY(-50%); pointer-events: none; }
.atlas-search__input { width: 100%; height: 50px; padding: 0 48px; border: 2px solid var(--atlas-line); border-radius: var(--atlas-radius-pill); background: #f9fbfe; color: var(--atlas-ink); font: 650 16px/1 var(--atlas-font); outline: none; transition: border-color 150ms ease, box-shadow 150ms ease; }
.atlas-search__input:focus { border-color: var(--atlas-blue); box-shadow: 0 0 0 4px rgba(18,104,238,.14); }
.atlas-search__clear { position: absolute; top: 50%; right: 10px; display: grid; width: 32px; height: 32px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; transform: translateY(-50%); }
.atlas-search__clear img { width: 18px; height: 18px; }
.atlas-search__results { position: absolute; top: calc(100% + 8px); right: 0; left: 0; z-index: 80; max-height: 270px; margin: 0; padding: 8px; overflow: auto; border: 1px solid var(--atlas-line); border-radius: 18px; background: var(--atlas-surface); box-shadow: var(--atlas-shadow); list-style: none; }
.atlas-search__result { width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: transparent; color: var(--atlas-ink); font-weight: 750; text-align: left; cursor: pointer; }
.atlas-search__result:hover, .atlas-search__result:focus-visible { background: var(--atlas-blue-soft); }
.atlas-search__empty { padding: 14px; color: var(--atlas-muted); font-size: 14px; font-weight: 650; }
.atlas-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 5px; border-radius: var(--atlas-radius-pill); background: #edf3fb; }
.atlas-mode { display: flex; height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 0; border-radius: var(--atlas-radius-pill); background: transparent; color: #41516d; font-size: 14px; font-weight: 800; cursor: pointer; }
.atlas-mode img { width: 20px; height: 20px; }
.atlas-mode[aria-pressed="true"] { background: var(--atlas-yellow); color: var(--atlas-ink); box-shadow: 0 4px 12px rgba(174,126,0,.18); }
.atlas-workspace { min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) var(--atlas-sidebar-w); }
.atlas-map-shell { position: relative; min-width: 0; overflow: hidden; background: #4bb6e9; }
.atlas-viewport { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; user-select: none; }
.atlas-viewport--dragging { cursor: grabbing; }
.atlas-stage { position: absolute; inset: 0; overflow: hidden; background: #bfe7f8; }
.atlas-map-object { display: block; width: 100%; height: 100%; border: 0; background: #bfe7f8; }
.atlas-map-fallback { padding: 24px; color: var(--atlas-ink); font-weight: 750; }
.atlas-map-status { position: absolute; top: 50%; left: 50%; z-index: 4; margin: 0; padding: 10px 16px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--atlas-ink); box-shadow: var(--atlas-shadow-soft); font-size: 13px; font-weight: 800; transform: translate(-50%,-50%); pointer-events: none; }
.atlas-stage[data-map-ready="true"] .atlas-map-status { display: none; }
.atlas-country { --country-color: var(--atlas-blue); position: absolute; z-index: 8; display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 3px solid #fff; border-radius: 50%; background: var(--country-color); color: #fff; box-shadow: 0 4px 12px rgba(8,47,96,.28); font: 850 10px/1 var(--atlas-font); cursor: pointer; transform: translate(-50%,-50%) scale(var(--atlas-ui-inverse,1)); transform-origin: center; transition: transform 150ms ease, box-shadow 150ms ease; }
.atlas-country::after { position: absolute; top: calc(100% + 5px); left: 50%; padding: 4px 7px; border-radius: 7px; background: rgba(255,255,255,.92); color: var(--atlas-ink); box-shadow: 0 2px 7px rgba(8,47,96,.13); content: attr(data-short); font-size: 10px; font-weight: 800; white-space: nowrap; transform: translateX(-50%); }
.atlas-country:hover, .atlas-country:focus-visible { z-index: 12; transform: translate(-50%,-50%) scale(calc(var(--atlas-ui-inverse,1) * 1.12)); }
.atlas-country[aria-pressed="true"] { z-index: 13; box-shadow: 0 0 0 7px rgba(18,104,238,.24),0 5px 14px rgba(8,47,96,.35); }
.atlas-country[aria-pressed="true"]::after { background: var(--atlas-blue); color: #fff; }
.atlas-country { display: none; }
.atlas-map-controls { position: absolute; top: 18px; right: 18px; z-index: 22; display: grid; gap: 8px; padding: 7px; border: 1px solid rgba(255,255,255,.85); border-radius: var(--atlas-radius-pill); background: rgba(255,255,255,.95); box-shadow: var(--atlas-shadow-soft); }
.atlas-map-control { display: grid; width: var(--atlas-control); height: var(--atlas-control); padding: 0; place-items: center; border: 1px solid var(--atlas-line); border-radius: 50%; background: #fff; cursor: pointer; }
.atlas-map-control img { width: 23px; height: 23px; }
.atlas-map-control:hover { background: var(--atlas-blue-soft); }
.atlas-gamebar { position: absolute; right: 18px; bottom: 18px; left: 18px; z-index: 24; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 14px; align-items: center; min-height: 72px; padding: 11px 12px 11px 16px; border: 1px solid rgba(255,255,255,.9); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: var(--atlas-shadow); backdrop-filter: blur(10px); }
.atlas-gamebar__icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: var(--atlas-yellow-soft); }
.atlas-gamebar__icon img { width: 24px; height: 24px; }
.atlas-gamebar__eyebrow { margin: 0 0 2px; color: var(--atlas-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.atlas-gamebar__title { margin: 0; font-size: 16px; font-weight: 850; line-height: 1.2; }
.atlas-gamebar__feedback { margin: 3px 0 0; color: var(--atlas-muted); font-size: 13px; font-weight: 700; }
.atlas-gamebar__status { display: flex; align-items: center; gap: 12px; }
.atlas-progress { display: flex; gap: 5px; align-items: center; }
.atlas-progress__dot { width: 9px; height: 9px; border-radius: 50%; background: #d8e1ee; }
.atlas-progress__dot--done { background: var(--atlas-blue); }
.atlas-progress__text { color: var(--atlas-muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.atlas-gamebar__next { display: flex; height: 44px; align-items: center; gap: 7px; padding: 0 16px; border: 0; border-radius: 13px; background: var(--atlas-blue); color: #fff; font-size: 14px; font-weight: 850; cursor: pointer; }
.atlas-gamebar__next img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.atlas-panel { position: relative; z-index: 28; display: flex; min-height: 0; flex-direction: column; gap: 18px; padding: 20px; overflow: auto; border-left: 1px solid var(--atlas-line); background: #fff; box-shadow: -10px 0 30px rgba(20,56,105,.08); }
.country-card__drag { display: none; }
.country-card__hero { position: relative; height: 190px; overflow: hidden; border-radius: 22px; background: var(--atlas-blue-soft); }
.country-card__image { display: block; width: 100%; height: 100%; object-fit: cover; }
.country-card__flag { position: absolute; right: 14px; bottom: 14px; display: grid; min-width: 44px; height: 44px; padding: 0 10px; place-items: center; border: 3px solid #fff; border-radius: 14px; background: var(--atlas-blue); color: #fff; box-shadow: var(--atlas-shadow-soft); font-size: 24px; }
.country-card__close { position: absolute; top: 12px; right: 12px; display: none; width: 40px; height: 40px; padding: 0; place-items: center; border: 1px solid var(--atlas-line); border-radius: 50%; background: #fff; box-shadow: var(--atlas-shadow-soft); cursor: pointer; }
.country-card__close img { width: 20px; height: 20px; }
.country-card__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.country-card__title { margin: 0; font-size: 32px; font-weight: 900; line-height: 1; letter-spacing: -.04em; }
.country-card__code { padding: 5px 8px; border-radius: 8px; background: var(--atlas-blue-soft); color: var(--atlas-blue-deep); font-size: 11px; font-weight: 900; }
.country-card__facts { display: grid; gap: 9px; margin: 18px 0 0; }
.country-card__fact { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; align-items: center; min-height: 42px; }
.country-card__fact-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--atlas-blue-soft); }
.country-card__fact-icon img { width: 19px; height: 19px; }
.country-card__label { display: block; color: var(--atlas-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.country-card__value { display: block; margin-top: 1px; font-size: 15px; font-weight: 800; }
.country-card__insight { margin-top: auto; padding: 15px; border-radius: 16px; background: var(--atlas-yellow-soft); }
.country-card__insight-head { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.country-card__insight-head img { width: 19px; height: 19px; }
.country-card__insight p { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.35; }
.atlas-app[data-mode="explore"] .atlas-gamebar { display: none; }
.atlas-app[data-mode="game"] .atlas-panel { background: #fbfdff; }
.atlas-app[data-mode="game"] .atlas-country[data-feedback="wrong"] { --country-color: var(--atlas-red); }
.atlas-app[data-mode="game"] .atlas-country[data-feedback="correct"] { --country-color: var(--atlas-green); }
@media (max-width: 1100px) {
  .atlas-header { grid-template-columns: 220px minmax(260px,1fr) 280px; gap: 12px; padding-inline: 16px; }
  .atlas-brand__eyebrow { display: none; }
  .atlas-brand__mark { width: 42px; height: 42px; flex-basis: 42px; }
  .atlas-panel { gap: 14px; padding: 16px; }
  .country-card__hero { height: 150px; }
  .country-card__title { font-size: 27px; }
  .atlas-gamebar { right: 14px; bottom: 14px; left: 14px; }
}
@media (max-width: 820px) {
  .atlas-header { grid-template-columns: 185px minmax(210px,1fr); }
  .atlas-modes { position: absolute; right: 16px; bottom: -58px; z-index: 50; width: 270px; box-shadow: var(--atlas-shadow-soft); }
  .atlas-workspace { grid-template-columns: minmax(0,1fr); }
  .atlas-panel { position: absolute; top: calc(var(--atlas-header-h) + 70px); right: 16px; z-index: 32; width: 300px; max-height: calc(100dvh - var(--atlas-header-h) - 88px); border: 1px solid var(--atlas-line); border-radius: 24px; box-shadow: var(--atlas-shadow); }
  .country-card__close { display: grid; }
  .atlas-map-controls { top: 78px; }
  .atlas-gamebar { right: 330px; }
}
@media (max-width: 720px) {
  .atlas-header { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: 48px 44px; gap: 8px; padding: 10px 12px; }
  .atlas-brand { position: absolute; top: 10px; left: 12px; }
  .atlas-brand__mark { width: 38px; height: 38px; flex-basis: 38px; }
  .atlas-brand__mark img { width: 23px; height: 23px; }
  .atlas-brand__title { font-size: 20px; }
  .atlas-search { grid-row: 2; }
  .atlas-search__input { height: 44px; font-size: 14px; }
  .atlas-modes { top: 10px; right: 12px; bottom: auto; width: 210px; height: 40px; padding: 3px; box-shadow: none; }
  .atlas-mode { height: 34px; gap: 5px; padding: 0 10px; font-size: 12px; }
  .atlas-mode img { width: 17px; height: 17px; }
  .atlas-stage { width: auto; }
  .atlas-map-controls { top: 12px; right: 12px; gap: 6px; padding: 5px; }
  .atlas-country { width: 31px; height: 31px; font-size: 9px; }
  .atlas-country::after { display: none; }
  .atlas-panel { top: auto; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 13px; width: 100%; max-height: 292px; padding: 38px 14px max(14px,env(safe-area-inset-bottom)); border: 0; border-radius: 28px 28px 0 0; overflow: auto; }
  .country-card__drag { position: absolute; top: 11px; left: 50%; display: block; width: 60px; height: 5px; border-radius: 999px; background: #d8e1ee; transform: translateX(-50%); }
  .country-card__hero { grid-row: 1/span 2; height: 132px; border-radius: 18px; }
  .country-card__flag { right: 8px; bottom: 8px; min-width: 36px; height: 36px; border-width: 2px; border-radius: 11px; font-size: 19px; }
  .country-card__close { top: 12px; right: 14px; width: 38px; height: 38px; }
  .country-card__heading { padding-right: 42px; }
  .country-card__title { font-size: 25px; }
  .country-card__facts { grid-template-columns: 1fr; gap: 5px; margin: 10px 0 0; }
  .country-card__fact { grid-template-columns: 27px minmax(0,1fr); gap: 7px; min-height: 30px; }
  .country-card__fact-icon { width: 27px; height: 27px; border-radius: 8px; }
  .country-card__fact-icon img { width: 16px; height: 16px; }
  .country-card__label { display: none; }
  .country-card__value { font-size: 13px; }
  .country-card__insight { grid-column: 1/-1; margin-top: 0; padding: 10px 12px; }
  .country-card__insight-head { margin-bottom: 3px; font-size: 10px; }
  .country-card__insight p { font-size: 12px; }
  .atlas-gamebar { right: 10px; bottom: 304px; left: 10px; grid-template-columns: 38px minmax(0,1fr) auto; gap: 9px; min-height: 62px; padding: 8px; border-radius: 17px; }
  .atlas-gamebar__icon { width: 38px; height: 38px; border-radius: 12px; }
  .atlas-gamebar__title { font-size: 14px; }
  .atlas-gamebar__feedback, .atlas-gamebar__eyebrow { display: none; }
  .atlas-gamebar__status { gap: 7px; }
  .atlas-progress__text { display: none; }
  .atlas-gamebar__next { width: 40px; height: 40px; padding: 0; justify-content: center; font-size: 0; }
  .atlas-search__results { max-height: 190px; }
}
@media (max-width: 430px) {
  .atlas-brand__eyebrow, .atlas-brand__text { display: none; }
  .atlas-modes { left: 62px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .atlas-search__input, .atlas-country { transition: none; } }
