/* cyrillic-ext */
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/literata-italic-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/literata-italic-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/literata-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/literata-normal-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/literata-normal-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/literata-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/onest-normal-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/onest-normal-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/onest-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =========================================================
   Tarikh MAP — стили. Светлая и тёмная темы, адаптив, печать.
   ========================================================= */
:root {
  color-scheme: light;
  --bg: #f4eee2; --bg-2: #ebe3d1; --surface: #fffcf5; --surface-2: #f8f2e6;
  --ink: #1b2622; --ink-2: #3a4640; --muted: #6a726b; --line: #e3d9c5; --line-2: #d2c6ad;
  --brand: #1f5c55; --brand-2: #174842; --brand-soft: #dcebe6; --on-brand: #f7f2e7;
  --accent: #b4532a; --accent-soft: #f4e0d2; --on-accent: #fff;
  --gold: #a87b1e; --gold-soft: #f3e6c6;
  --ok: #2c7a4b; --ok-soft: #dcefe1; --warn: #a76b12; --warn-soft: #f6e7c8; --bad: #b3412a; --bad-soft: #f7ddd4;
  --m-sea: #c7d7d4; --m-other: #e3e0d4; --m-other-edge: #c9c2b0; --m-kz: #f8efd8; --m-edge: #7c5d3a;
  --m-river: #6d9a97; --m-lake: #b3cbc5; --m-grat: rgba(90, 120, 110, .22); --m-relief: .55; --m-label: #6c6a5d; --m-halo: #f8efd8;
  --shadow-1: 0 1px 2px rgba(40, 30, 10, .06), 0 2px 8px rgba(40, 30, 10, .05);
  --shadow-2: 0 2px 6px rgba(40, 30, 10, .08), 0 14px 34px rgba(40, 30, 10, .12);
  --serif: 'Literata', 'PT Serif', Georgia, serif;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-s: 10px; --r-m: 16px; --r-l: 24px;
  --hdr: 64px;
  --tabbar: 0px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111613; --bg-2: #0c100e; --surface: #181e1b; --surface-2: #1f2723;
    --ink: #ece6d8; --ink-2: #cdc6b6; --muted: #9aa198; --line: #29322d; --line-2: #3a453f;
    --brand: #6fc2b4; --brand-2: #8fd3c6; --brand-soft: #1b302b; --on-brand: #0d1512;
    --accent: #e98c5f; --accent-soft: #3a261b; --on-accent: #1a0f09;
    --gold: #d8ae56; --gold-soft: #33290f;
    --ok: #63c48f; --ok-soft: #173022; --warn: #e3b25a; --warn-soft: #33270f; --bad: #f08068; --bad-soft: #3a1d17;
    --m-sea: #142228; --m-other: #1a201d; --m-other-edge: #2f3833; --m-kz: #252e28; --m-edge: #cfae7d;
    --m-river: #4f8b8d; --m-lake: #1d3a40; --m-grat: rgba(160, 190, 180, .1); --m-relief: .85; --m-label: #9d9f92; --m-halo: #252e28;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 14px 34px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111613; --bg-2: #0c100e; --surface: #181e1b; --surface-2: #1f2723;
  --ink: #ece6d8; --ink-2: #cdc6b6; --muted: #9aa198; --line: #29322d; --line-2: #3a453f;
  --brand: #6fc2b4; --brand-2: #8fd3c6; --brand-soft: #1b302b; --on-brand: #0d1512;
  --accent: #e98c5f; --accent-soft: #3a261b; --on-accent: #1a0f09;
  --gold: #d8ae56; --gold-soft: #33290f;
  --ok: #63c48f; --ok-soft: #173022; --warn: #e3b25a; --warn-soft: #33270f; --bad: #f08068; --bad-soft: #3a1d17;
  --m-sea: #142228; --m-other: #1a201d; --m-other-edge: #2f3833; --m-kz: #252e28; --m-edge: #cfae7d;
  --m-river: #4f8b8d; --m-lake: #1d3a40; --m-grat: rgba(160, 190, 180, .1); --m-relief: .85; --m-label: #9d9f92; --m-halo: #252e28;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 14px 34px rgba(0, 0, 0, .45);
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 12px); }
html.no-scroll, html.has-fullmap { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100dvh; padding-bottom: var(--tabbar); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0 0 .8em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
svg { display: block; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 70%, transparent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot svg { animation: boot 1.2s ease-in-out infinite alternate; }
@keyframes boot { to { transform: translateY(-6px); opacity: .7; } }
.loading { padding: 40px 24px; color: var(--muted); text-align: center; }
.empty, .muted { color: var(--muted); }
.errorbox { padding: 32px 24px; text-align: center; color: var(--ink-2); }
.eyebrow { font: 600 12.5px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
kbd { font: 600 11px/1 var(--sans); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; color: var(--muted); background: var(--surface); }
.print-only { display: none; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 15px/1.2 var(--sans); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn--ghost { background: transparent; }
.btn--done { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.btn--lg { min-height: 52px; padding: 12px 28px; font-size: 16px; }
.ibtn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; }
.ibtn:hover { background: var(--surface-2); border-color: var(--line); }
.ibtn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ibtn .i-sun { display: none; }
:root[data-theme="dark"] .ibtn .i-sun { display: block; } :root[data-theme="dark"] .ibtn .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ibtn .i-sun { display: block; } :root:not([data-theme="light"]) .ibtn .i-moon { display: none; } }

/* ---------- шапка ---------- */
.hdr { position: sticky; top: 0; z-index: 50; height: var(--hdr); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.hdr__in { height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand__mark { width: 36px; height: 36px; }
.brand__bg { fill: var(--brand); }
.brand__pin { fill: var(--on-brand); }
.brand__ring { fill: none; stroke: var(--brand); stroke-width: 1.5; }
.brand__name { font: 600 20px/1 var(--serif); letter-spacing: -.01em; }
.brand__name b { font: 700 13px/1 var(--sans); letter-spacing: .16em; color: var(--accent); margin-left: 2px; vertical-align: 2px; }
.hdr__nav { display: flex; gap: 2px; margin-right: auto; }
.hdr__a { padding: 8px 13px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.hdr__a:hover { background: var(--surface-2); color: var(--ink); }
.hdr__a.is-on { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.hdr__tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.hdr__search { display: inline-flex; align-items: center; width: auto; gap: 8px; padding: 0 10px 0 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.hdr__searchtxt { font-size: 14px; }
.langsw { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; padding: 3px; background: var(--surface); text-decoration: none; }
.langsw span { padding: 6px 9px; border-radius: 9px; font: 700 12px/1 var(--sans); letter-spacing: .06em; color: var(--muted); }
.langsw span.on { background: var(--ink); color: var(--bg); }
.hdr__menu { display: none; }
.drawer { position: fixed; top: var(--hdr); left: 0; right: 0; z-index: 49; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2); }
.drawer__nav { display: grid; padding: 8px 12px 16px; }
.drawer__a { padding: 14px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 17px; }
.drawer__a.is-on { background: var(--surface-2); color: var(--brand); }

/* ---------- нижняя панель (телефон) ---------- */
.tabbar { display: none; }

/* ---------- подвал ---------- */
.ftr { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 72px; }
.ftr__in { max-width: 1240px; margin: 0 auto; padding: 44px 24px 36px; display: grid; grid-template-columns: 1.2fr .8fr 1.4fr; gap: 36px; font-size: 14px; color: var(--ink-2); }
.ftr__brand p { margin-top: 14px; max-width: 34ch; }
.ftr__nav { display: grid; align-content: start; gap: 6px; }
.ftr__a { color: var(--ink-2); text-decoration: none; }
.ftr__a:hover { color: var(--brand); }
.ftr__note p { color: var(--muted); }
.ftr__copy { margin-top: 18px; }
body[data-view="atlas"] .ftr, body[data-view="heritage"] .ftr, body[data-view="game"] .ftr { display: none; }

/* ---------- общие секции ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 32px 24px 0; }
.sec__title { font: 650 clamp(24px, 2.6vw, 32px)/1.15 var(--serif); letter-spacing: -.015em; margin-bottom: 18px; }
.sec__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.sec__head .sec__title { margin: 0; }
.sec__lead { color: var(--muted); margin: 0; max-width: 46ch; }

/* ---------- главная ---------- */
.home { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 44px; align-items: center; padding: 48px 0 40px; }
.hero__title { font: 700 clamp(44px, 6.2vw, 84px)/.98 var(--serif); letter-spacing: -.035em; margin: 0 0 22px; text-wrap: balance; }
.hero__lead { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); max-width: 46ch; margin-bottom: 28px; }
.hero__picklabel { font-weight: 600; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.gradepick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; max-width: 520px; }
.gradepick__b { display: grid; justify-items: center; gap: 2px; padding: 12px 4px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s, background .15s; }
.gradepick__b b { font: 650 26px/1 var(--serif); }
.gradepick__b span { font-size: 11.5px; color: var(--muted); }
.gradepick__b:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-2px); }
.hero__search { margin-top: 18px; width: 100%; max-width: 520px; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: text; text-align: left; font-size: 15px; }
.hero__search svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hero__search span { flex: 1; }
.stats { display: flex; gap: 34px; margin: 28px 0 0; padding: 0; flex-wrap: wrap; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-size: 13.5px; color: var(--muted); }
.stats dd { margin: 0; font: 650 34px/1.1 var(--serif); letter-spacing: -.02em; }
.hero__progress { margin-top: 16px; font-size: 14px; color: var(--ok); }
.hero__map { position: relative; }
.hero__mapbox { height: clamp(380px, 46vw, 600px); border-radius: var(--r-l); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.today { position: absolute; left: 18px; bottom: 18px; max-width: min(380px, calc(100% - 36px)); display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow-2); text-decoration: none; color: var(--ink); }
.today__k { font: 600 12px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.today__t { font: 600 17px/1.3 var(--serif); }
.today__go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--brand); }
.today__go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.today:hover .today__go svg { transform: translateX(3px); transition: transform .2s; }

.how { padding: 56px 0 24px; }
.how__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how__item { position: relative; padding: 26px 24px 22px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.how__n { position: absolute; top: 20px; right: 22px; font: 600 15px/1 var(--serif); color: var(--muted); }
.how__ill { width: 120px; height: 80px; margin-bottom: 16px; }
.how__ill svg { width: 100%; height: 100%; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.how__ill .fill { fill: var(--accent-soft); stroke: var(--accent); }
.how__ill .dash { stroke: var(--brand); stroke-dasharray: 4 6; }
.how__ill .hole { fill: var(--surface); stroke: var(--accent); }
.how__ill .tick { stroke: var(--accent); stroke-width: 3; }
.how__ill text { font: 650 20px var(--serif); fill: var(--muted); stroke: none; }
.how__ill text.on { fill: var(--accent); }
.how__item h3 { font: 650 19px/1.3 var(--serif); margin-bottom: 8px; }
.how__item p { color: var(--ink-2); margin: 0; font-size: 15px; }

.grades { padding: 56px 0 8px; }
.grades__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gcard { display: flex; gap: 16px; padding: 20px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; min-height: 190px; }
.gcard:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow-1); }
.gcard__n { font: 700 58px/.85 var(--serif); letter-spacing: -.04em; color: var(--brand); }
.gcard__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.gcard__era { font: 600 12px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.gcard__t { font: 650 18px/1.2 var(--serif); }
.gcard__units { display: grid; gap: 3px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.gcard__units span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.gcard__foot { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gcard__pr { flex: 1; height: 5px; background: var(--line); border-radius: 9px; overflow: hidden; }
.gcard__pr i { display: block; height: 100%; background: var(--ok); }

.bento { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: 14px; padding: 56px 0 0; }
.bento__card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: var(--r-l); text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--surface); transition: transform .15s, box-shadow .15s; }
.bento__card:hover { transform: translateY(-3px); box-shadow: var(--shadow-1); }
.bento__card h3 { font: 650 22px/1.2 var(--serif); }
.bento__card p { color: var(--ink-2); max-width: 44ch; margin: 0; }
.bento__ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 6px; }
.bento__ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bento__go { margin-top: auto; padding-top: 12px; font-weight: 600; color: var(--brand); font-size: 15px; }
.bento__card--her { grid-row: span 2; background: linear-gradient(160deg, var(--gold-soft), var(--surface) 60%); }
.bento__card--her .bento__ico { background: var(--gold-soft); color: var(--gold); }
.hmini { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; position: relative; z-index: 1; max-width: 560px; }
.hmini li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--gold) 25%, transparent); }
.hmini span { font: 600 16px/1.3 var(--serif); }
.hmini em { font-style: normal; font-size: 12.5px; color: var(--muted); text-align: right; }
.hmini .badge-unesco { font-size: 9px; padding: 3px 5px; }
.bento__art { position: absolute; right: -10px; bottom: -6px; width: 42%; max-width: 260px; fill: none; stroke: var(--gold); stroke-width: 1.6; opacity: .45; }
.bento__card--game .bento__ico { background: var(--accent-soft); color: var(--accent); }
.minitl { display: flex; gap: 4px; margin-top: 10px; max-width: 360px; }
.minitl span { height: 30px; border-radius: 8px; display: grid; place-items: center; font: 600 12px var(--sans); color: var(--on-brand); background: var(--brand); }
.minitl span:nth-child(2) { background: var(--accent); color: var(--on-accent); }
.minitl span:nth-child(3) { background: var(--gold); color: var(--on-brand); }

/* ---------- карта ---------- */
.tmap { position: relative; overflow: hidden; background: var(--m-sea); user-select: none; -webkit-user-select: none; isolation: isolate; }
.tmap__stage { position: absolute; inset: 0; touch-action: none; cursor: grab; outline: none; }
.tmap__stage.is-drag { cursor: grabbing; }
.tmap.is-task .tmap__stage { cursor: crosshair; }
.tmap__stage > svg { width: 100%; height: 100%; }
.tmap.is-full { position: fixed; inset: 0; z-index: 300; border-radius: 0 !important; border: 0 !important; }
.m-sea { fill: var(--m-sea); }
.m-grat { fill: none; stroke: var(--m-grat); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.m-other { fill: var(--m-other); stroke: var(--m-other-edge); stroke-width: .8px; vector-effect: non-scaling-stroke; }
.m-kz { fill: var(--m-kz); }
.m-relief { opacity: var(--m-relief); mix-blend-mode: multiply; pointer-events: none; }
.m-hist { fill: var(--m-lake); opacity: .5; stroke: var(--m-river); stroke-width: .7px; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.m-lake { fill: var(--m-lake); stroke: var(--m-river); stroke-width: .5px; vector-effect: non-scaling-stroke; }
.m-river { fill: none; stroke: var(--m-river); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m-river-big { stroke-width: 1.5px; }
.m-river-mid { stroke-width: .9px; }
.m-kz-edge { fill: none; stroke: var(--m-edge); stroke-width: 1.6px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.route { fill: none; stroke: var(--gold); stroke-width: 3px; stroke-dasharray: .1 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lbl { pointer-events: none; }
.lbl text { fill: var(--m-label); paint-order: stroke; stroke: var(--m-halo); stroke-width: 3px; stroke-linejoin: round; font-family: var(--serif); font-style: italic; font-size: 12.5px; }
.lbl.is-off { display: none; }
.lbl--country text { font: 600 11px var(--sans); letter-spacing: .32em; fill: var(--muted); stroke: none; opacity: .75; }
.lbl--country-main text { font: 700 24px var(--sans); letter-spacing: .7em; fill: var(--ink); opacity: .1; stroke: none; }
.lbl--sea text, .lbl--lake text { fill: color-mix(in srgb, var(--m-river) 80%, var(--ink)); stroke: none; font-size: 14px; letter-spacing: .06em; }
.lbl--desert text { font-size: 12px; letter-spacing: .12em; }
.lbl--mountain text { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; font-style: normal; font-family: var(--sans); font-weight: 600; fill: color-mix(in srgb, var(--m-label) 85%, var(--accent)); }
.lbl--region-base text { font-size: 15px; letter-spacing: .3em; text-transform: uppercase; font-style: normal; font-family: var(--sans); font-weight: 600; opacity: .55; stroke: none; }
.lbl--river text { fill: var(--m-river); font-size: 11.5px; }

.pin { cursor: pointer; --pc: var(--brand); }
.pin--t-ancient, .pin--t-monument { --pc: var(--gold); }
.pin--t-battle { --pc: var(--bad); }
.pin--t-soviet { --pc: #5e6f80; }
.pin--t-nature, .pin--t-mountain { --pc: #4c8a5c; }
.pin--t-region { --pc: var(--accent); }
.pin__hit { fill: transparent; }
.pin--dot .pin__body { fill: var(--pc); stroke: var(--surface); stroke-width: 1.6; transition: r .15s; }
.pin--dot.is-off .pin__body { fill: var(--muted); opacity: .4; stroke-width: 1; }
.pin--dot.is-off { cursor: default; }
.pin__label { font: 600 12.5px var(--sans); fill: var(--ink); paint-order: stroke; stroke: var(--m-halo); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
.pin--dot .pin__label { opacity: 0; transition: opacity .15s; }
.pin--dot:hover .pin__label, .is-z2 .pin--dot:not(.is-off) .pin__label { opacity: 1; }
.pin--dot.is-off:hover .pin__label { opacity: .85; font-weight: 500; }
.pin--num .pin__body { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; }
.pin--num .pin__halo { fill: var(--accent); opacity: .16; animation: halo 2.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.pin--num .pin__num { font: 700 12.5px var(--sans); fill: var(--on-accent); pointer-events: none; }
.pin--num .pin__label { font-size: 13.5px; font-weight: 650; }
@keyframes halo { 0%, 100% { transform: scale(.7); opacity: .22; } 50% { transform: scale(1.15); opacity: .06; } }
.pin--heritage .pin__body { fill: var(--gold); stroke: var(--surface); stroke-width: 2; }
.pin--heritage .pin__dot { fill: var(--surface); }
.pin--heritage .pin__halo { fill: none; stroke: none; }
.pin--heritage.is-unesco .pin__halo { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 3 3; }
.pin--heritage .pin__label { opacity: 0; }
.pin--heritage:hover .pin__label, .pin--heritage.is-on .pin__label, .is-z2 .pin--heritage:not(.is-off) .pin__label { opacity: 1; }
.pin--heritage.is-off { opacity: .55; }
.pin--heritage.is-on .pin__body { fill: var(--accent); }
.task-line { stroke: var(--accent); stroke-width: 2px; stroke-dasharray: 7 6; vector-effect: non-scaling-stroke; }
.task-click path { stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.task-target circle { fill: var(--ok); stroke: var(--surface); stroke-width: 2; }
.task-target .task-ring { fill: none; stroke: var(--ok); stroke-width: 2; opacity: .6; }

.tmap__ctrl { position: absolute; top: 14px; right: 14px; display: grid; gap: 6px; z-index: 2; }
.tmap__btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); cursor: pointer; }
.tmap__btn:hover { background: var(--surface-2); }
.tmap__btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tmap__btn .i-close { display: none; }
.tmap.is-full .tmap__btn .i-close { display: block; } .tmap.is-full .tmap__btn .i-open { display: none; }
.tmap__pop { position: absolute; left: 0; top: 0; z-index: 3; width: min(310px, calc(100% - 16px)); padding: 14px 16px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); font-size: 14px; }
.tmap__popx { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; background: transparent; border-radius: 8px; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; }
.tmap__popx:hover { background: var(--surface-2); }
.pop { display: grid; gap: 6px; padding-right: 18px; }
.pop__type { font: 600 11.5px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pop__t { display: flex; align-items: center; gap: 8px; font: 650 17px/1.25 var(--serif); }
.pop p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.pop__list { display: grid; gap: 4px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.pop__list span { font-size: 12px; color: var(--muted); }
.pop__list a { text-decoration: none; font-weight: 500; line-height: 1.35; }
.pop__list a:hover { text-decoration: underline; }
.pop__list em { color: var(--muted); font-size: 12.5px; }
.tmap__hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2; max-width: calc(100% - 120px); padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-2); text-align: center; animation: hintIn .3s ease; }
@keyframes hintIn { from { opacity: 0; transform: translate(-50%, -8px); } }
.num { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 700 12px/1 var(--sans); flex: none; }

/* ---------- атлас ---------- */
.atlas { display: grid; grid-template-columns: minmax(380px, 440px) minmax(0, 1fr); grid-template-areas: "panel map"; height: calc(100dvh - var(--hdr)); }
.atlas__map { grid-area: map; position: relative; min-height: 0; }
.atlas__mapbox { position: absolute; inset: 0; }
.atlas__note { position: absolute; left: 14px; bottom: 10px; margin: 0; font-size: 11.5px; color: var(--m-label); background: color-mix(in srgb, var(--m-halo) 75%, transparent); padding: 3px 9px; border-radius: 99px; pointer-events: none; z-index: 1; }
.atlas__panel { grid-area: panel; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-right: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.maptoggle { position: absolute; left: 14px; top: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); font-weight: 600; font-size: 14px; cursor: pointer; }
.maptoggle input { accent-color: var(--gold); width: 16px; height: 16px; }

.plist__head { padding: 22px 22px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.plist__title { font: 650 30px/1.1 var(--serif); letter-spacing: -.02em; margin: 14px 0 4px; }
.plist__meta { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.plist__lead { color: var(--ink-2); font-size: 15px; }
.gtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.gtabs__a { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font: 650 15px/1 var(--serif); }
.gtabs__a:hover { border-color: var(--brand); color: var(--brand); }
.gtabs__a.is-on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.pbar { position: relative; height: 22px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin-bottom: 14px; }
.pbar i { position: absolute; inset: 0 auto 0 0; background: var(--ok-soft); }
.pbar span { position: relative; display: block; text-align: center; font: 600 12px/20px var(--sans); color: var(--ok); }
.segw { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.segw__l { font-size: 13px; font-weight: 600; color: var(--muted); flex: none; }
.segw .seg { flex: 1; margin: 0; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.seg__b { flex: 1 0 auto; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg__b:hover { color: var(--ink); }
.seg__b.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg--sm { display: inline-flex; margin: 4px 0 6px; }
.seg--sm .seg__b { flex: none; min-height: 30px; padding: 4px 14px; }
.field { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.field:focus-within { border-color: var(--brand); background: var(--surface); }
.field svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.field__in { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); outline: none; }
.plist__body { padding: 6px 12px 28px; }
.qhead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; margin: 0 -12px; padding: 12px 22px 8px; background: var(--surface); font: 700 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.qhead::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.uhead { margin: 10px 10px 4px; font: 600 13px/1.35 var(--sans); color: var(--muted); }
.trow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 10px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.trow:hover { background: var(--surface-2); }
.trow__n { font: 600 14px/1.5 var(--serif); color: var(--muted); text-align: right; padding-top: 1px; }
.trow__b { display: grid; gap: 2px; min-width: 0; }
.trow__t { font-size: 15px; line-height: 1.4; font-weight: 500; }
.trow__m { font-size: 12.5px; color: var(--muted); }
.trow--review .trow__t { font-style: italic; color: var(--ink-2); }
.trow--review .trow__n { color: var(--accent); }
.trow__s { align-self: center; font: 700 11.5px/1 var(--sans); padding: 5px 7px; border-radius: 99px; }
.is-great { color: var(--ok); background: var(--ok-soft); } .is-good { color: var(--warn); background: var(--warn-soft); } .is-low { color: var(--bad); background: var(--bad-soft); }
.trow__s.is-done { color: var(--ok); background: var(--ok-soft); width: 22px; height: 22px; padding: 0; display: grid; place-items: center; }

/* ---------- тема ---------- */
.topic { padding: 16px 24px 32px; }
.topic__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px 6px 8px; margin-left: -8px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.back:hover { background: var(--surface-2); color: var(--ink); }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.topic__crumb { font-size: 13px; color: var(--muted); }
.topic__title { font: 650 clamp(26px, 2.4vw, 33px)/1.16 var(--serif); letter-spacing: -.02em; margin: 0 0 14px; text-wrap: balance; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.chip--period { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip--kind { background: var(--gold-soft); border-color: transparent; color: var(--gold); }
.chip--done { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.topic__lead { font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.pchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.pchip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 12px 4px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; cursor: pointer; }
.pchip:hover { border-color: var(--accent); }
.tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: 4px; margin: 0 -24px 18px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs__b { position: relative; flex: none; min-height: 48px; padding: 10px 12px; border: 0; background: transparent; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer; }
.tabs__b:hover { color: var(--ink); }
.tabs__b.is-on { color: var(--ink); }
.tabs__b.is-on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.rq { margin: 0 0 16px; padding: 14px 16px 14px 18px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 12px 12px 0; font: 500 16px/1.5 var(--serif); font-style: italic; }
.rq span { display: block; font: 700 11.5px/1.4 var(--sans); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.notes { list-style: none; counter-reset: n; margin: 10px 0 8px; padding: 0; display: grid; gap: 4px; }
.notes li { counter-increment: n; position: relative; padding: 12px 0 12px 46px; border-bottom: 1px solid var(--line); }
.notes li:last-child { border-bottom: 0; }
.notes li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: 12px; font: 600 19px/1.2 var(--serif); color: var(--accent); }
.notes h3 { font: 650 16px/1.35 var(--sans); margin-bottom: 4px; }
.notes p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.blk { margin-top: 26px; }
.blk__t { font: 700 12.5px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.gloss { margin: 0; display: grid; gap: 8px; }
.gloss div { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.gloss dt { font: 650 16px/1.3 var(--serif); margin-bottom: 3px; }
.gloss dd { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.tl { list-style: none; margin: 0; padding: 0 0 0 20px; position: relative; }
.tl::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line-2); border-radius: 2px; }
.tl li { position: relative; padding: 4px 0 14px 8px; }
.tl li::before { content: ''; position: absolute; left: -20px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.tl time { display: block; font: 650 15px/1.3 var(--serif); color: var(--accent); }
.tl p { margin: 2px 0 0; font-size: 15px; color: var(--ink-2); }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.people li { display: flex; gap: 12px; align-items: center; }
.people__av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); font: 650 18px/1 var(--serif); }
.people b { display: block; font-weight: 650; }
.people li > span:last-child > span { font-size: 14px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.pn__a { display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-width: 0; }
.pn__a:hover { border-color: var(--brand); }
.pn__a span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pn__a b { font-weight: 550; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pn__a--next { text-align: right; }
.task { display: flex; gap: 14px; padding: 18px; border-radius: var(--r-m); background: var(--accent-soft); margin-bottom: 8px; }
.task__ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.task__ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.task__b { flex: 1; min-width: 0; }
.task .blk__t { color: var(--accent); margin-bottom: 6px; }
.task__q { font: 500 17px/1.45 var(--serif); margin-bottom: 12px; }
.task__out { font-weight: 650; padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; }
.task__out.is-ok { background: var(--ok-soft); color: var(--ok); } .task__out.is-near { background: var(--warn-soft); color: var(--warn); } .task__out.is-far { background: var(--bad-soft); color: var(--bad); }
.pnotes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pnotes li { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.pnotes__b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; }
.pnotes__b b { font: 650 16px/1.3 var(--serif); }
.pnotes__ty { font-size: 12px; color: var(--muted); }
.pnotes p { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-2); }

/* ---------- тест ---------- */
.quiz--intro { display: grid; justify-items: start; gap: 6px; padding: 18px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); }
.quiz__badge svg { width: 54px; height: 54px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quiz__badge .quiz__badge-c { fill: var(--accent); stroke: var(--surface); }
.quiz__badge .quiz__badge-k { stroke: var(--on-accent); stroke-width: 2.4; }
.quiz__lead { font: 500 17px/1.45 var(--serif); margin: 6px 0 2px; }
.quiz__best { color: var(--ok); font-weight: 600; font-size: 14px; }
.quiz__top { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.quiz__bar { flex: 1; height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; }
.quiz__bar i { display: block; height: 100%; background: var(--accent); border-radius: 9px; transition: width .3s ease; }
.quiz__q { border: 0; margin: 0; padding: 0; min-width: 0; }
.quiz__q legend { font: 600 19px/1.4 var(--serif); margin-bottom: 14px; padding: 0; }
.quiz__opts { display: grid; gap: 8px; }
.quiz__opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); text-align: left; font-size: 15.5px; line-height: 1.4; cursor: pointer; transition: border-color .15s, background .15s; }
.quiz__opt:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); }
.quiz__opt:disabled { cursor: default; }
.quiz__l { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font: 700 13px/1 var(--sans); color: var(--muted); }
.quiz__opt.is-right { border-color: var(--ok); background: var(--ok-soft); color: var(--ink); }
.quiz__opt.is-right .quiz__l { background: var(--ok); color: var(--surface); border-color: var(--ok); }
.quiz__opt.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.quiz__opt.is-wrong .quiz__l { background: var(--bad); color: var(--surface); border-color: var(--bad); }
.quiz__opt:disabled:not(.is-right):not(.is-wrong) { opacity: .55; }
.quiz__fb { margin-top: 14px; display: grid; gap: 12px; justify-items: start; }
.quiz__fb:empty { display: none; }
.quiz__why { width: 100%; padding: 12px 14px; border-radius: 12px; }
.quiz__why.is-ok { background: var(--ok-soft); } .quiz__why.is-bad { background: var(--bad-soft); }
.quiz__why strong { display: block; margin-bottom: 3px; }
.quiz__why.is-ok strong { color: var(--ok); } .quiz__why.is-bad strong { color: var(--bad); }
.quiz__why p { margin: 0; font-size: 15px; color: var(--ink-2); }
.quiz__res { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.ring { width: 86px; height: 86px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring__bg { stroke: var(--line); }
.ring__fg { stroke-linecap: round; background: none !important; }
.ring__fg.is-great { stroke: var(--ok); } .ring__fg.is-good { stroke: var(--warn); } .ring__fg.is-low { stroke: var(--bad); }
.quiz__pct { font: 700 38px/1 var(--serif); letter-spacing: -.02em; }
.quiz__score { color: var(--muted); font-weight: 600; font-size: 14px; }
.quiz__msg { font: 500 17px/1.45 var(--serif); }
.quiz__review { display: grid; gap: 8px; margin: 10px 0 18px; }
.qrev { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.qrev summary { display: flex; gap: 10px; padding: 12px 0; cursor: pointer; font-weight: 550; font-size: 15px; list-style: none; }
.qrev summary::-webkit-details-marker { display: none; }
.qrev__i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.qrev.is-ok .qrev__i { background: var(--ok-soft); color: var(--ok); } .qrev.is-bad .qrev__i { background: var(--bad-soft); color: var(--bad); }
.qrev p { margin: 0 0 10px 32px; font-size: 14.5px; }
.qrev s { color: var(--bad); margin-left: 6px; }
.qrev__why { color: var(--muted); }

/* ---------- наследие ---------- */
.fchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.fchip { min-height: 34px; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.fchip:hover { border-color: var(--brand); }
.fchip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.hlist { padding: 10px 12px 28px; display: grid; gap: 4px; }
.hcard { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; text-decoration: none; color: var(--ink); }
.hcard:hover { background: var(--surface-2); }
.hcard__ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.hcard__ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hcard__ico--nature { background: color-mix(in srgb, #4c8a5c 18%, var(--surface)); color: #4c8a5c; }
.hcard__ico--rock_art { background: var(--accent-soft); color: var(--accent); }
.hcard__b { display: grid; gap: 2px; min-width: 0; flex: 1; }
.hcard__t { font: 600 15.5px/1.3 var(--serif); }
.hcard__m { font-size: 12.5px; color: var(--muted); }
.badge-unesco { flex: none; font: 700 10px/1 var(--sans); letter-spacing: .12em; padding: 5px 7px; border-radius: 6px; border: 1.5px solid var(--gold); color: var(--gold); }
.badge-unesco--lg { font-size: 11.5px; padding: 7px 10px; align-self: center; }
.extlink { font-weight: 600; }

/* ---------- игра ---------- */
.game { padding: 22px 22px 32px; }
.game .btn--lg { margin-top: 18px; }
.game__sum { font: 700 18px/1 var(--serif); color: var(--accent); min-width: 40px; text-align: right; }
.gq { padding: 20px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); }
.gq__type { font: 600 12px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.gq__name { font: 700 clamp(28px, 3vw, 36px)/1.1 var(--serif); letter-spacing: -.02em; margin: 6px 0 6px; }
.gq p { margin: 0; color: var(--ink-2); }
.game__res { margin-top: 14px; display: grid; gap: 12px; justify-items: start; }
.gres { display: flex; align-items: baseline; gap: 12px; padding: 12px 16px; border-radius: 12px; width: 100%; }
.gres b { font: 700 28px/1 var(--serif); }
.gres.is-ok { background: var(--ok-soft); color: var(--ok); } .gres.is-near { background: var(--warn-soft); color: var(--warn); } .gres.is-far { background: var(--bad-soft); color: var(--bad); }
.gtotal { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }
.gtotal span { width: 100%; color: var(--muted); font-weight: 600; }
.gtotal b { font: 700 64px/1 var(--serif); letter-spacing: -.03em; color: var(--accent); }
.gtotal em { font-style: normal; color: var(--muted); font-size: 20px; }
.gres-rec { color: var(--gold); font-weight: 700; }
.glist { list-style: none; margin: 12px 0 18px; padding: 0; display: grid; gap: 2px; counter-reset: g; }
.glist li { counter-increment: g; display: grid; grid-template-columns: 24px 1fr auto 48px; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.glist li::before { content: counter(g); color: var(--muted); font-family: var(--serif); }
.glist li span:nth-child(2) { color: var(--muted); }
.glist li b { text-align: right; color: var(--accent); }

/* ---------- страницы-документы ---------- */
.doc { max-width: 1120px; }
.doc__head { padding: 28px 0 8px; max-width: 820px; }
.doc__title { font: 700 clamp(40px, 5.2vw, 64px)/1.02 var(--serif); letter-spacing: -.03em; margin-bottom: 18px; }
.doc__lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); max-width: 58ch; }
.doc__sec { padding: 44px 0 0; }
.doc__sec p { max-width: 70ch; color: var(--ink-2); }
.doc__sec--split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.doc__big { font: 500 clamp(20px, 2vw, 26px)/1.35 var(--serif); color: var(--ink); }
.stats--doc { margin-top: 18px; }
.lesson { border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); padding: 22px; }
.lesson__bar { display: flex; gap: 6px; margin-bottom: 18px; }
.lesson__bar span { height: 46px; border-radius: 12px; display: flex; align-items: center; padding: 0 14px; color: var(--on-brand); background: var(--brand); }
.lesson__bar span:nth-child(2) { background: var(--accent); color: var(--on-accent); }
.lesson__bar span:nth-child(3) { background: var(--gold); }
.lesson__bar b { font: 700 18px var(--serif); }
.lesson__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 5fr 12fr 8fr; gap: 18px; }
.lesson__m { font: 700 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lesson__steps h3 { font: 650 18px/1.3 var(--serif); margin: 6px 0; }
.lesson__steps p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.lesson__ex { margin-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); text-decoration: none; color: var(--ink); }
.lesson__ex b { color: var(--brand); }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 14px; }
.tool { padding: 20px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); }
.tool__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 12px; }
.tool__ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool h3 { font: 650 17px/1.3 var(--serif); margin-bottom: 6px; }
.tool p { margin: 0; font-size: 14.5px; }
.skills { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.skills li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.skills span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 700 15px var(--serif); flex: none; }
.cards3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cards3 li, .cards2 > div { padding: 22px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.cards3__n { font: 600 15px var(--serif); color: var(--accent); }
.cards3 h3, .cards2 h3 { font: 650 19px/1.3 var(--serif); margin: 8px 0 6px; }
.cards3 p, .cards2 p { margin: 0; font-size: 15px; }
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.goal { padding: 26px; border-radius: var(--r-l); background: var(--brand); color: var(--on-brand); }
.goal .sec__title { color: var(--on-brand); }
.goal__t { font: 500 clamp(20px, 2vw, 25px)/1.38 var(--serif); color: var(--on-brand) !important; margin: 0; }
.tasks { list-style: none; counter-reset: tk; margin: 0; padding: 0; display: grid; gap: 14px; }
.tasks li { counter-increment: tk; position: relative; padding-left: 44px; }
.tasks li::before { content: counter(tk, decimal-leading-zero); position: absolute; left: 0; top: 0; font: 600 18px var(--serif); color: var(--accent); }
.tasks h3 { font: 650 17px/1.3 var(--sans); margin-bottom: 2px; }
.tasks p { margin: 0; font-size: 15px; }
.checks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.checks li { position: relative; padding-left: 32px; color: var(--ink-2); }
.checks li::before { content: ''; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 10 3 3 5-6' fill='none' stroke='%232c7a4b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.srcs { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.nf { text-align: center; padding: 80px 24px; }
.nf__code { font: 700 96px/1 var(--serif); color: var(--accent); opacity: .5; margin: 0; }
.nf h1 { font: 650 32px var(--serif); margin: 12px 0; }

/* ---------- поиск ---------- */
.search { position: fixed; inset: 0; z-index: 400; background: rgba(15, 20, 18, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 9vh 16px 16px; }
.search[hidden] { display: none; }
.search__box { width: min(680px, 100%); max-height: 80vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow-2); overflow: hidden; }
.search__bar { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); }
.search__bar svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; flex: none; }
.search__in { flex: 1; min-width: 0; height: 58px; border: 0; background: transparent; font: inherit; font-size: 17px; color: var(--ink); outline: none; }
.search__x { border: 0; background: var(--surface-2); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.search__res { overflow-y: auto; padding: 8px 8px 14px; overscroll-behavior: contain; }
.search__hint { padding: 18px 12px; color: var(--muted); margin: 0; }
.search__grp h3 { font: 700 11.5px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); padding: 14px 10px 6px; }
.search__item { display: grid; gap: 1px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.search__item:hover, .search__item:focus-visible { background: var(--surface-2); }
.search__t { font-weight: 550; line-height: 1.35; }
.search__m { font-size: 12.5px; color: var(--muted); }

/* ---------- проектор ---------- */
html.projector .hdr, html.projector .tabbar, html.projector .topic__bar .back, html.projector .pn { display: none !important; }
html.projector .atlas { height: 100dvh; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); }
html.projector .topic { font-size: 120%; padding: 28px 36px; }
html.projector .topic__title { font-size: 44px; }
html.projector .topic__lead, html.projector .notes p { font-size: 21px; }
html.projector .notes h3 { font-size: 21px; }
html.projector .quiz__q legend { font-size: 27px; }
html.projector .quiz__opt { font-size: 21px; min-height: 64px; }
html.projector .tabs { margin: 0 -36px 18px; padding: 0 36px; }
html.projector .tabs__b { font-size: 19px; }
html.projector .pin--num .pin__label { font-size: 16px; }
html.projector [data-act-t="projector"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---------- адаптив ---------- */
@media (max-width: 1239px) {
  .grades__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hdr__searchtxt, .hdr__search kbd { display: none; }
  .hdr__search { width: 42px; padding: 0; justify-content: center; }
}
@media (max-width: 1099px) {
  .hdr__nav { display: none; }
  .hdr__menu { display: inline-grid; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
  .hero__mapbox { height: clamp(320px, 56vw, 520px); }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento__card--her { grid-row: auto; grid-column: span 2; }
  .lesson__steps { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  .atlas { display: block; height: auto; }
  .atlas__map { height: clamp(300px, 52vh, 520px); position: relative; }
  .atlas__panel { overflow: visible; border-right: 0; border-top: 1px solid var(--line); min-height: 50vh; }
  .plist__head { position: static; }
  .qhead { top: var(--hdr); }
  .tabs { top: var(--hdr); }
  html.projector .atlas { display: grid; height: 100dvh; }
  html.projector .atlas__map { height: auto; }
  html.projector .atlas__panel { overflow-y: auto; }
  body[data-view="atlas"] .ftr, body[data-view="heritage"] .ftr, body[data-view="game"] .ftr { display: block; }
  .ftr { margin-top: 0; }
  .doc__sec--split { grid-template-columns: 1fr; gap: 24px; }
  .cards3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --hdr: 56px; --tabbar: calc(62px + env(safe-area-inset-bottom)); }
  .hdr__in { padding: 0 12px; gap: 10px; }
  .brand__mark { width: 32px; height: 32px; }
  .brand__name { font-size: 18px; }
  .hdr__menu { display: none; }
  .langsw span { padding: 6px 7px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); padding: 4px 4px env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabbar__a { display: grid; justify-items: center; gap: 3px; padding: 7px 2px 6px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 10.5px; font-weight: 600; line-height: 1.1; text-align: center; }
  .tabbar__a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar__a.is-on { color: var(--brand); }
  .tabbar__a.is-on svg { stroke-width: 2.2; }
  .home { padding: 0 16px; }
  .page { padding: 20px 16px 0; }
  .hero { padding: 24px 0 20px; }
  .hero__title { font-size: clamp(38px, 11vw, 52px); }
  .gradepick { gap: 6px; }
  .gradepick__b { padding: 10px 2px 8px; border-radius: 12px; }
  .gradepick__b b { font-size: 22px; }
  .gradepick__b span { font-size: 10px; }
  .hero__search kbd { display: none; }
  .stats { gap: 22px; }
  .stats dd { font-size: 28px; }
  .hero__mapbox { height: 320px; border-radius: 18px; }
  .today { position: relative; left: auto; bottom: auto; margin: -38px 12px 0; max-width: none; }
  .how { padding-top: 36px; }
  .how__list { grid-template-columns: 1fr; }
  .how__item { display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; padding: 18px; }
  .how__ill { grid-row: span 2; width: 96px; height: 64px; margin: 0; }
  .grades { padding-top: 40px; }
  .grades__list { grid-template-columns: 1fr; gap: 10px; }
  .gcard { min-height: 0; padding: 16px; }
  .gcard__n { font-size: 46px; }
  .bento { grid-template-columns: 1fr; padding-top: 40px; }
  .bento__card--her { grid-column: auto; }
  .hmini li { grid-template-columns: 1fr auto; row-gap: 2px; }
  .hmini em { grid-column: 1; grid-row: 2; text-align: left; }
  .hmini .badge-unesco { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .atlas__map { height: clamp(260px, 46vh, 420px); }
  .atlas--game .atlas__map { height: clamp(230px, 36vh, 340px); }
  .game .fchips { gap: 5px; }
  .game .fchip { min-height: 32px; padding: 4px 11px; font-size: 13px; }
  .tmap__ctrl { top: auto; bottom: 12px; right: 12px; }
  .tmap__btn { width: 38px; height: 38px; }
  .tmap__btn[data-z="in"], .tmap__btn[data-z="out"] { display: none; }
  .tmap__hint { top: 10px; max-width: calc(100% - 24px); font-size: 13.5px; padding: 8px 14px; }
  .atlas__note { display: none; }
  .maptoggle { top: 10px; left: 10px; font-size: 13px; padding: 6px 12px; }
  .plist__head { padding: 18px 16px 12px; }
  .plist__body { padding: 4px 6px 24px; }
  .qhead { margin: 0 -6px; padding: 12px 16px 8px; }
  .topic { padding: 14px 16px 28px; }
  .tabs { margin: 0 -16px 16px; padding: 0 12px; }
  .tabs__b { flex: 1 0 auto; padding: 10px 8px; font-size: 14.5px; }
  .notes li { padding-left: 40px; }
  .pn { grid-template-columns: 1fr; }
  .pn__a--next { text-align: left; }
  .game { padding: 18px 16px 28px; }
  .doc__title { font-size: clamp(36px, 10vw, 48px); }
  .cards2, .checks { grid-template-columns: 1fr; }
  .lesson { padding: 16px; }
  .lesson__bar span { padding: 0 10px; }
  .ftr__in { grid-template-columns: 1fr; gap: 22px; padding: 32px 16px 28px; }
  .search { padding: 0; align-items: stretch; }
  .search__box { max-height: none; height: 100%; border-radius: 0; border: 0; }
  .tmap__pop { width: calc(100% - 16px); }
}
@media (max-width: 380px) {
  .langsw span { padding: 6px 5px; font-size: 11px; }
  .gradepick__b span { display: none; }
  .gradepick__b { padding: 12px 0; }
}
@media (hover: none) {
  .gradepick__b:hover, .gcard:hover, .bento__card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- печать: рабочий лист ---------- */
@media print {
  @page { margin: 16mm 14mm; }
  body { background: #fff; color: #000; padding: 0; font-size: 11.5pt; }
  .hdr, .tabbar, .ftr, .drawer, .search, .atlas__map, .topic > *:not(.sheet), .skip { display: none !important; }
  .atlas, .atlas__panel { display: block !important; height: auto !important; overflow: visible !important; border: 0 !important; }
  .topic { padding: 0 !important; }
  .print-only { display: block !important; }
  .sheet header { font-size: 9.5pt; color: #444; border-bottom: 1px solid #999; padding-bottom: 4pt; margin-bottom: 10pt; }
  .sheet h1 { font: 700 19pt/1.2 var(--serif); margin: 0 0 6pt; }
  .sheet h2 { font: 700 12pt var(--sans); margin: 12pt 0 4pt; text-transform: uppercase; letter-spacing: .06em; }
  .sheet li { margin-bottom: 5pt; line-height: 1.45; }
  .sheet__key { margin-top: 18pt; font-size: 8.5pt; color: #666; transform: rotate(180deg); text-align: right; }
  .sheet footer { margin-top: 12pt; font-size: 8.5pt; color: #777; }
}
.prerender { max-width: 820px; padding-bottom: 40px; } .prerender h1 { font: 650 34px/1.15 var(--serif); margin: 8px 0 12px; } .prerender h2 { font: 600 17px var(--sans); }

/* ---------- 3D-карта (MapLibre) ---------- */
.tmap--gl .tmap__stage { touch-action: auto; cursor: auto; }
.tmap--gl .maplibregl-canvas { outline: none; }
.tmap--gl .maplibregl-ctrl-attrib { font: 11px var(--sans); background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--muted); }
.tmap--gl .maplibregl-ctrl-attrib a { color: var(--muted); }
.tmap--gl .maplibregl-cooperative-gesture-screen { font: 600 15px/1.4 var(--sans); background: rgba(15, 20, 18, .55); }
.tmap__btn--txt { font: 800 12.5px/1 var(--sans); letter-spacing: .02em; }
.tmap__btn[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.tmap.is-task .maplibregl-canvas-container { cursor: crosshair; }
.gpin { display: grid; place-items: center; cursor: pointer; --pc: var(--brand); }
.gpin--t-ancient, .gpin--t-monument { --pc: var(--gold); }
.gpin--t-battle { --pc: var(--bad); }
.gpin--t-soviet { --pc: #5e6f80; }
.gpin--t-nature, .gpin--t-mountain { --pc: #4c8a5c; }
.gpin--t-region { --pc: var(--accent); }
.gpin__b { display: grid; place-items: center; box-sizing: border-box; }
.gpin--dot .gpin__b { border-radius: 50%; background: var(--pc); border: 1.6px solid var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.gpin--dot.is-off .gpin__b { background: var(--muted); opacity: .55; width: 7px !important; height: 7px !important; border-width: 1px; }
.gpin--dot.is-off { cursor: default; }
.gpin--num .gpin__b { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); border: 2.5px solid var(--surface); font: 700 13px/1 var(--sans); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.gpin--num.is-on::before { content: ''; position: absolute; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); opacity: .2; animation: halo 2.4s ease-in-out infinite; }
.gpin--heritage .gpin__b { width: 22px; height: 22px; transform: rotate(45deg); border-radius: 4px; background: var(--gold); border: 2px solid var(--surface); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.gpin--heritage .gpin__b i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface); }
.gpin--heritage.is-unesco::before { content: ''; position: absolute; width: 38px; height: 38px; border-radius: 50%; border: 1.5px dashed var(--gold); }
.gpin--heritage.is-on .gpin__b { background: var(--accent); }
.gpin--heritage.is-off { opacity: .6; }
.gpin__l { position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); white-space: nowrap; font: 650 13px/1.2 var(--sans); color: var(--ink); text-shadow: 0 0 3px var(--m-halo), 0 0 3px var(--m-halo), 0 0 6px var(--m-halo); pointer-events: none; }
.gpin.is-left .gpin__l { left: auto; right: calc(100% + 6px); }
.gpin--dot .gpin__l, .gpin--heritage .gpin__l { opacity: 0; transition: opacity .15s; }
.gpin--dot:hover .gpin__l, .gpin--heritage:hover .gpin__l, .gpin--heritage.is-on .gpin__l { opacity: 1; }
.gpin--num .gpin__l { font-size: 14px; }
.gmark--click { width: 18px; height: 18px; background: linear-gradient(45deg, transparent 42%, var(--ink) 42% 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, var(--ink) 42% 58%, transparent 58%); }
.gmark--target { width: 16px; height: 16px; border-radius: 50%; background: var(--ok); border: 2.5px solid var(--surface); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 30%, transparent); }
.gmark--target .gpin__l { left: 22px; }
html.projector .gpin--num .gpin__l { font-size: 17px; }
.tmap--gl .gpin--num .gpin__l, .tmap--gl .gpin--heritage.is-on .gpin__l, .tmap--gl .gmark--target .gpin__l { background: var(--surface); color: var(--ink); text-shadow: none; padding: 4px 9px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.tmap--gl .gpin--dot:hover .gpin__l, .tmap--gl .gpin--heritage:hover .gpin__l { background: var(--surface); text-shadow: none; padding: 3px 8px; border-radius: 7px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }

@media (max-width: 760px) {
  .tmap--gl .tmap__ctrl { top: auto; bottom: 10px; right: 10px; grid-auto-flow: column; }
  .tmap--gl .maplibregl-ctrl-bottom-right { bottom: 54px; }
}

/* ---------- сцена темы на карте ---------- */
.btn--story { width: 100%; justify-content: flex-start; gap: 10px; margin: 2px 0 14px; min-height: 52px; padding: 10px 16px; border-radius: 14px; background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-size: 16px; }
.btn--story:hover { filter: brightness(1.06); border-color: var(--accent); }
.btn--story svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.btn--story span { margin-left: auto; font-size: 13px; font-weight: 600; opacity: .85; }
.trow__sc { position: absolute; left: 4px; top: 13px; font-size: 9px; color: var(--accent); }
.trow { position: relative; }
.story { position: absolute; left: 14px; bottom: 14px; z-index: 4; width: min(440px, calc(100% - 28px)); padding: 14px 16px 12px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow-2); animation: storyIn .35s ease; }
@keyframes storyIn { from { opacity: 0; transform: translateY(10px); } }
.story__top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.story__year { font: 700 12.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); padding: 6px 10px; border-radius: 99px; }
.story__n { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.story__x { margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; }
.story__x:hover { background: var(--surface-2); }
.story__t { font: 650 19px/1.25 var(--serif); margin: 4px 0 4px; }
.story__p { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); margin: 0 0 10px; }
.story__ctl { display: flex; align-items: center; gap: 8px; }
.story__b { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; font: 600 14px var(--sans); }
.story__b svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.story__b:disabled { opacity: .4; cursor: default; }
.story__b--play { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.story__b--play svg { fill: currentColor; stroke: none; }
.story__b--play[aria-pressed="true"] svg { fill: none; stroke: currentColor; stroke-width: 2.6; }
.story__b--next { margin-left: auto; background: var(--brand); color: var(--on-brand); border-color: var(--brand); padding: 0 12px 0 14px; }
.story__dots { display: flex; gap: 5px; flex-wrap: wrap; }
.story__dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: var(--line-2); cursor: pointer; }
.story__dot.is-done { background: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.story__dot.is-on { background: var(--accent); width: 22px; border-radius: 9px; }
.story__src { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }
.story__src a { color: var(--muted); }
.tmap.is-story .tmap__ctrl { top: 14px; bottom: auto; }
.atlas__map:has(.is-story) .atlas__note { display: none; }
.spt { display: flex; align-items: center; gap: 6px; --sc: var(--accent); }
.spt__i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sc); border: 2.5px solid var(--surface); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.spt__i svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spt__l { position: absolute; left: 36px; white-space: nowrap; font: 650 13px/1.2 var(--sans); background: var(--surface); color: var(--ink); padding: 4px 8px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .22); }
.spt:not(.is-cur) { opacity: .7; }
.spt:not(.is-cur) .spt__i { width: 24px; height: 24px; }
.spt:not(.is-cur) .spt__l { font-size: 12px; font-weight: 600; }
.spt.is-cur .spt__i { animation: sptIn .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes sptIn { from { transform: scale(.2); } }
@media (max-width: 760px) {
  .story { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 10px 12px; }
  .story__t { font-size: 16.5px; }
  .story__p { font-size: 13.5px; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .tmap.is-story .tmap__ctrl { top: 8px; bottom: auto; }
  .atlas__map:has(.is-story) { height: clamp(380px, 62vh, 560px); }
}
html.projector .story { width: min(620px, calc(100% - 28px)); }
html.projector .story__t { font-size: 26px; }
html.projector .story__p { font-size: 19px; }

.spt.is-left { flex-direction: row-reverse; }
.spt.is-left .spt__l { left: auto; right: 36px; }

/* ---------- панорама 360° ---------- */
.btn--pano { width: 100%; justify-content: flex-start; gap: 10px; margin: 0 0 14px; min-height: 50px; padding: 8px 16px 8px 8px; border-radius: 14px; background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-size: 15.5px; }
.btn--pano:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn--pano__b { display: grid; place-items: center; width: 44px; height: 34px; border-radius: 10px; background: var(--on-brand); color: var(--brand); font: 800 12.5px var(--sans); }
.btn--pano > span:last-child { margin-left: auto; font-size: 13px; opacity: .85; }
.panoslot:empty { display: none; }
.pano { position: fixed; inset: 0; z-index: 500; background: #000; color: #fff; }
.pano__view { position: absolute; inset: 0; }
.pano__top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: linear-gradient(rgba(0,0,0,.6), transparent); z-index: 3; pointer-events: none; }
.pano__title { display: flex; align-items: center; gap: 10px; min-width: 0; font: 650 18px/1.25 var(--serif); text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.pano__title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.pano__badge { flex: none; font: 800 12px var(--sans); padding: 5px 8px; border-radius: 8px; background: var(--accent); color: var(--on-accent); }
.pano__x { pointer-events: auto; margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.pano__hint { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; padding: 10px 16px; border-radius: 99px; background: rgba(0,0,0,.55); font-weight: 600; font-size: 14.5px; pointer-events: none; transition: opacity .6s; }
.pano__hint.is-gone { opacity: 0; }
.pano__bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.pano__strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.pano__th { flex: none; width: 92px; height: 52px; border-radius: 10px; border: 2px solid rgba(255,255,255,.4); background-size: cover; background-position: center; cursor: pointer; }
.pano__th.is-on { border-color: var(--accent); }
.pano__credit { margin: 0; font-size: 12px; color: rgba(255,255,255,.8); }
.pano__credit a { color: #fff; }
.pano__err { padding: 40vh 20px 0; text-align: center; }
.pano .pnlm-load-box { background: rgba(0,0,0,.6); }
