/* The Tale Caravan — оформление сайта. Цвета и объём плашек — из прототипа v5;
   тёмно-красный #c0392b там, где на красном белый текст (контраст 5,4:1). */

@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 1000; font-display: swap;
  src: url('../fonts/nunito-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 1000; font-display: swap;
  src: url('../fonts/nunito-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 1000; font-display: swap;
  src: url('../fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 1000; font-display: swap;
  src: url('../fonts/nunito-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; }

:root {
  --cream: #fff4dc;
  --cream-edge: #b9875a;
  --ink: #3b2a20;
  --ink-soft: #6e5038;
  --red: #e8503a;
  --red-deep: #c0392b;
  --red-dark: #8f2a1a;
  --sky: #a9dbf2;
  --green: #23804c;
  --plaque-shadow: inset 0 3px 0 rgba(255,255,255,.9), inset 0 -4px 0 rgba(185,135,90,.3), 0 5px 0 var(--cream-edge), 0 12px 18px rgba(20,50,80,.3);
  --chip-shadow: inset 0 2px 0 rgba(255,255,255,.9), 0 4px 0 var(--cream-edge), 0 8px 12px rgba(20,50,80,.25);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--sky); -webkit-text-size-adjust: 100%; }
a { color: #a8321f; }
a:hover { color: var(--red-dark); }
button { font-family: inherit; color: inherit; }
:focus-visible { outline: 3px solid #0b4f8a; outline-offset: 2px; box-shadow: 0 0 0 7px #ffffff; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@keyframes pop { 0% { transform: scale(0,0); opacity: 0 } 55% { transform: scale(1.2,.85); opacity: 1 } 75% { transform: scale(.92,1.08) } 100% { transform: scale(1,1) } }
@keyframes march { to { stroke-dashoffset: -40 } }
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
@keyframes squish { 0% { opacity: 0; transform: scale(.85) } 60% { opacity: 1; transform: scale(1.02) } 100% { opacity: 1; transform: scale(1) } }
@keyframes breathe { 0%,100% { transform: scale(1,1) } 50% { transform: scale(1.025,.975) } }
@keyframes sway { 0%,100% { transform: rotate(-1.5deg) } 50% { transform: rotate(1.5deg) } }
@keyframes globein { 0% { opacity: 0; transform: scale(.7) } 60% { opacity: 1; transform: scale(1.03) } 100% { opacity: 1; transform: scale(1) } }
@keyframes spin { to { transform: rotate(360deg) } }

.plaque { background: var(--cream); border-radius: 22px; box-shadow: var(--plaque-shadow); }

.btn-round { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--cream); color: var(--ink); font-size: 23px; font-weight: 900; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; flex: none;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.9), inset 0 -4px 0 rgba(185,135,90,.3), 0 5px 0 var(--cream-edge), 0 10px 14px rgba(20,50,80,.25); }
.btn-round:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255,255,255,.9), 0 1px 0 var(--cream-edge); }
.btn-round[aria-pressed="true"] { background: var(--green); color: #fff; box-shadow: inset 0 3px 0 rgba(255,255,255,.4), inset 0 -4px 0 rgba(0,0,0,.12), 0 5px 0 #155a33, 0 10px 14px rgba(20,50,80,.25); }
.btn-round svg { width: 21px; height: 21px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 16px; border-radius: 999px; border: 0;
  background: #fff; color: var(--ink); font-size: 15px; font-weight: 900; text-decoration: none; cursor: pointer; line-height: 1.15; text-align: center;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.08), 0 4px 0 var(--cream-edge); }
.btn:hover { color: var(--ink); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cream-edge); }
.btn-red { background: var(--red-deep); color: #fff; box-shadow: inset 0 3px 0 rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.15), 0 4px 0 var(--red-dark); }
.btn-red:hover { color: #fff; }
.btn-red:active { box-shadow: 0 1px 0 var(--red-dark); }

.num { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 900; width: 34px; height: 34px; font-size: 15px; text-shadow: 0 1px 1px rgba(0,0,0,.5); }
.num.big { width: 130px; height: 130px; font-size: 54px; }

/* ================= Страница с глобусом ================= */
body.globe-page { height: 100%; overflow: hidden; overscroll-behavior: none; }
html:has(body.globe-page) { height: 100%; overflow: hidden; }
.globe-root { position: fixed; inset: 0; overflow: hidden; transition: background .5s ease; background: radial-gradient(ellipse at 50% 40%, #e3f5fc 0%, #a9dbf2 55%, #7cc3e6 100%); }
.globe-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; transform-origin: 50% 52%; animation: globein 1.1s cubic-bezier(.3,1.3,.5,1) both; -webkit-tap-highlight-color: transparent; }
.globe-svg.grabbing { cursor: grabbing; }

.markers { position: absolute; inset: 0; pointer-events: none; z-index: 10; touch-action: none; }
.markers.labels { z-index: 11; }
.mkl { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform, opacity; }
.mkl-in { position: absolute; width: 0; height: 0; transform-origin: 0 0; }
.mkl.soon .mk-pill { cursor: default; color: #5c4430; font-weight: 700; }
.mk { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform, opacity; }
.mk-in { position: absolute; width: 0; height: 0; transform-origin: 0 0; }
.mk-shadow { position: absolute; left: 0; top: 0; transform: translate(-46%,-38%); border-radius: 50%; background: radial-gradient(closest-side, rgba(12,38,60,.5), rgba(12,38,60,0)); }
.mk-base { position: absolute; left: 0; top: 0; transform: translate(-50%,-50%); border-radius: 50%; }
.mk button, .mkl button { touch-action: none; -webkit-tap-highlight-color: transparent; font-family: inherit; }
.mk-fig { position: absolute; left: 0; transform: translate(-50%,-100%); background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; min-width: 44px; min-height: 44px; }
.mk-pop { display: block; transform-origin: 50% 100%; animation: pop .8s cubic-bezier(.3,1.5,.5,1) both; }
.mk-hover { display: block; transition: transform .25s cubic-bezier(.3,1.6,.5,1); transform-origin: 50% 100%; }
.mk-fig:hover .mk-hover { transform: translateY(-5px) scale(1.08); }
.mk-sway { display: block; transform-origin: 50% 100%; animation: sway 4.2s ease-in-out infinite; }
.mk-img { display: flex; align-items: center; justify-content: center; background-size: contain; background-repeat: no-repeat; background-position: 50% 100%; transform-origin: 50% 100%;
  animation: breathe 2.8s ease-in-out infinite; filter: drop-shadow(0 1px 0 rgba(255,255,255,.6)) drop-shadow(0 3px 3px rgba(12,38,60,.32)); color: #fff; font-weight: 900; }
.mk-img.round { border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 3px #fff; }
/* Подпись страны — маленький светлый ярлык: шар главнее подписей (слово владельца 23.10) */
.mk-pill { position: absolute; left: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 1px 6px 2px 4px; border: 0; border-radius: 7px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; cursor: pointer; line-height: 1.25;
  background: rgba(255,244,220,.93); color: #3b2a20; box-shadow: 0 1px 0 rgba(59,42,32,.28), 0 2px 4px rgba(12,38,60,.18); }
.mk-pill .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(59,42,32,.25); }
.mk.soon .mk-fig { cursor: default; }

.gh { position: absolute; left: 0; right: 0; top: 0; padding: 12px 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; pointer-events: none; z-index: 20; }
.gh > * { pointer-events: auto; }
.brand { display: flex; flex-direction: column; gap: 1px; padding: 8px 16px 10px; border-radius: 20px; text-decoration: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand h1, .brand .brand-name { margin: 0; font-weight: 900; font-size: clamp(22px, 2.5vw, 30px); line-height: 1.05; color: var(--red); letter-spacing: -.01em; text-shadow: 0 2px 0 var(--red-dark); }
.brand .slogan { font-size: 13px; font-weight: 700; color: #7a5a3e; white-space: nowrap; }
.gh-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.lang-pill { display: flex; gap: 4px; padding: 5px; border-radius: 999px; }
.lang-pill a, .lang-pill span { min-width: 40px; min-height: 34px; display: flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 999px; font-size: 14px; font-weight: 900; text-decoration: none; color: #7a5a3e; }
.lang-pill [aria-current] { background: var(--red-deep); color: #fff; box-shadow: inset 0 3px 0 rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.15), 0 3px 0 var(--red-dark); }
.info-wrap { position: relative; }
.popover { position: absolute; right: 0; top: calc(100% + 12px); min-width: 250px; padding: 10px; border-radius: 22px; background: var(--cream); box-shadow: var(--plaque-shadow); z-index: 40; display: none; }
.popover.open { display: block; animation: fadein .15s ease both; }
.popover a { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 14px; font-weight: 800; color: var(--ink); text-decoration: none; }
.popover a:hover { background: #fde9c4; }
.popover .chan { display: flex; gap: 8px; padding: 6px 4px 2px; flex-wrap: wrap; }
.popover .chan a { min-height: 40px; padding: 6px 12px; font-size: 14px; background: #fff; box-shadow: 0 2px 0 var(--cream-edge); }
.popover hr { border: 0; border-top: 2px dashed #e6cfa8; margin: 6px 4px; }

.controls { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 20; }
.styles-wrap { position: relative; }
.styles.popover { right: calc(100% + 12px); top: auto; bottom: 0; min-width: 200px; flex-direction: column; gap: 4px; padding: 8px; }
.styles.popover.open { display: flex; }
.styles-title { font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #7a5a3e; padding: 4px 8px 2px; }
.styles button { display: flex; align-items: center; gap: 8px; background: transparent; color: #6e5038; border: 0; min-height: 44px; padding: 6px 12px 6px 8px; border-radius: 999px; font-size: 15px; font-weight: 900; cursor: pointer; text-align: left; }
.styles button[aria-pressed="true"] { background: var(--red-deep); color: #fff; box-shadow: inset 0 3px 0 rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.15), 0 3px 0 var(--red-dark); }
.styles .sw { width: 18px; height: 18px; flex: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--cream), 0 0 0 3px rgba(59,42,32,.25); }

.strip { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 18px 8px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; pointer-events: none; z-index: 20; }
/* одна строка, листается вбок: при 195 сказках полоса не растёт вверх и не отнимает место у шара */
/* Список сказок — выпадает над кнопкой «Сказки» внизу экрана (слово владельца 23.10: вместо полосы плашек) */
.tales-wrap { position: relative; pointer-events: auto; }
.tales-btn { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px 6px 16px; border: 0; border-radius: 999px; cursor: pointer; color: var(--ink); font-size: 15px; font-weight: 900; }
.tales-btn .tb-count { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.tales-btn .tb-arrow { font-size: 12px; color: var(--ink-soft); transition: transform .2s ease; }
.tales-btn[aria-expanded="true"] .tb-arrow { transform: rotate(180deg); }
.tales-list.popover { left: 0; right: auto; top: auto; bottom: calc(100% + 10px); width: min(380px, calc(100vw - 20px)); max-height: min(62vh, 560px); overflow-y: auto; overscroll-behavior: contain; padding: 8px; }
.tales-list .progress { display: flex; flex-direction: column; gap: 6px; padding: 6px 8px 10px; margin-bottom: 4px; border-bottom: 2px dashed #e6cfa8; }
.progress-text { font-size: 13px; font-weight: 800; }
.progress-bar { display: block; width: 100%; height: 7px; border-radius: 6px; background: #e6cfa8; box-shadow: inset 0 2px 3px rgba(0,0,0,.15); overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: #45c07a; border-radius: 6px; box-shadow: inset 0 2px 0 rgba(255,255,255,.5); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.chip { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px; border-radius: 12px; color: var(--ink); text-decoration: none; }
a.chip:hover, a.chip:focus-visible { background: #fde9c4; color: var(--ink); text-decoration: none; }
.chip img, .chip .num { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; flex: none; box-shadow: 0 0 0 2px var(--ring, #fff); }
.chip .c-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.chip .c-text b { font-size: 14px; font-weight: 900; }
.chip .c-title { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.chip-soon { color: #5c4430; }
.chip-soon img { box-shadow: none; border-radius: 0; object-fit: contain; }
/* на странице глобуса плашки легче: тени короче, шар главнее */
.globe-page .plaque { box-shadow: inset 0 2px 0 rgba(255,255,255,.9), inset 0 -3px 0 rgba(185,135,90,.25), 0 3px 0 var(--cream-edge), 0 6px 10px rgba(20,50,80,.22); }
.globe-page .chip { box-shadow: inset 0 2px 0 rgba(255,255,255,.9), 0 2px 0 var(--cream-edge), 0 4px 8px rgba(20,50,80,.2); }
.noscript { position: absolute; left: 50%; top: 40%; transform: translate(-50%,-50%); padding: 18px 20px; max-width: 340px; z-index: 30; font-weight: 700; }

/* ================= Окно сказки ================= */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(22,62,98,.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 8px; overscroll-behavior: contain; animation: fadein .25s ease both; }
.dialog { position: relative; display: grid; gap: 8px 18px; background: var(--cream); border-radius: 24px; padding: 12px 14px;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.9), inset 0 -6px 0 rgba(185,135,90,.3), 0 8px 0 var(--cream-edge), 0 26px 50px rgba(0,0,0,.4);
  animation: squish .35s cubic-bezier(.3,1.4,.5,1) both; overflow: hidden; max-width: calc(100vw - 16px); }
.d-head { grid-area: head; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.d-ep { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 900; }
.d-close { width: 44px; height: 44px; }
.d-close svg { width: 22px; height: 22px; }
.d-title { grid-area: title; margin: 0; font-weight: 900; font-size: 24px; line-height: 1.12; text-wrap: pretty; overflow-wrap: anywhere; }
.d-stop { grid-area: stop; margin: 0; font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.d-media { grid-area: media; display: flex; justify-content: center; }
.d-actions { grid-area: actions; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.d-actions .watch { display: contents; }
.d-actions .btn { padding: 6px 10px; font-size: 13.5px; }
.d-scroll { grid-area: scroll; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.d-scroll p { margin: 0 0 10px; font-size: 15.5px; line-height: 1.45; font-weight: 600; }
.d-scroll h3 { margin: 4px 0 6px; font-size: 16px; font-weight: 900; }
.d-scroll .meta { font-size: 14px; color: var(--ink-soft); font-weight: 700; }
.d-nav { grid-area: nav; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.video-box { position: relative; flex: none; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #000;
  border: 5px solid #fff; box-shadow: 0 5px 0 var(--cream-edge); }
.video-box iframe, .video-box video, .video-box .yt-host, .video-box .yt-host iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.video-box video { object-fit: cover; background: #000; }
.video-poster { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px; text-align: center; background: var(--cream); }
.video-poster img { width: 42%; max-width: 130px; aspect-ratio: 1; height: auto; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 5px #fff, 0 5px 0 5px var(--cream-edge); }
.video-poster p { margin: 0; font-size: 17px; font-weight: 800; color: var(--ink); text-wrap: pretty; }
.video-poster p:empty { display: none; }
.video-poster .spinner { width: 30px; height: 30px; border-radius: 50%; border: 4px solid #e6cfa8; border-top-color: var(--red-deep); animation: spin 1s linear infinite; }

/* Компьютер и альбомная ориентация: ролик слева, текст справа */
.dialog { grid-template-columns: auto minmax(0, 400px); grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  grid-template-areas: "media head" "media title" "media stop" "media actions" "media scroll" "media nav"; height: min(calc(100vh - 16px), 780px); }
.dialog .d-media { align-self: stretch; }
.dialog .video-box { height: 100%; }
/* Книжная ориентация: сверху вниз; высоту ролика подбирает программа (не меньше половины экрана) */
@media (orientation: portrait) {
  .dialog { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
    grid-template-areas: "head" "title" "stop" "media" "actions" "scroll" "nav"; width: min(calc(100vw - 16px), 560px);
    height: calc(100vh - 16px); height: calc(100dvh - 16px); }
  .dialog .video-box { height: 50vh; }
  .dialog { padding: 10px 12px; gap: 6px; }
  .d-actions { gap: 6px; }
  .d-actions .btn { font-size: 13px; line-height: 1.12; padding: 5px 8px; }
  .dialog.tight { padding: 8px 10px; gap: 4px; }
  .dialog.tight .d-actions .btn { font-size: 12px; padding: 4px 6px; }
  .dialog.tight .d-head { min-height: 44px; }
  .d-scroll { box-shadow: inset 0 -10px 8px -8px rgba(59,42,32,.25); border-radius: 8px; }
}
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 800; z-index: 70; animation: fadein .2s ease both; }
.copy-box { display: flex; flex-direction: column; gap: 6px; grid-column: 1 / -1; font-size: 14px; font-weight: 700; }
.copy-box input { font: inherit; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--cream-edge); background: #fff; color: var(--ink); width: 100%; }

/* ================= Узкие экраны ================= */
@media (max-width: 640px) {
  .gh { padding: 8px 10px; gap: 8px; align-items: center; }
  .brand { padding: 5px 11px 6px; border-radius: 16px; }
  .brand h1, .brand .brand-name { font-size: 19px; text-shadow: 0 1px 0 var(--red-dark); white-space: nowrap; }
  .brand .slogan { font-size: 10px; line-height: 1.25; white-space: nowrap; }
  .gh-right { gap: 8px; flex-wrap: nowrap; }
  /* на телефоне переключатель — одна кнопка со вторым языком */
  .lang-pill { padding: 0; gap: 0; }
  .lang-pill span[aria-current] { display: none; }
  .lang-pill a, .lang-pill span { min-height: 44px; min-width: 44px; padding: 0 8px; font-size: 14px; }
  .btn-round { width: 44px; height: 44px; font-size: 22px; }
  .btn-round svg { width: 20px; height: 20px; }
  .controls { right: 10px; top: auto; bottom: var(--strip-h, 96px); transform: none; gap: 8px; flex-direction: row; padding-bottom: 8px; }
  .styles.popover { right: 0; bottom: calc(100% + 10px); }
  .strip { padding: 4px 10px 10px; }
  .tales-btn { min-height: 44px; }
  .mk-pill { font-size: 10px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .gh { padding: 6px 10px; }
  .controls { top: 50%; bottom: auto; transform: translateY(-50%); flex-direction: column; padding: 0; }
  .styles.popover { right: calc(100% + 10px); bottom: 0; }
  .strip { padding: 4px 10px 6px; }
  .tales-list.popover { max-height: calc(100vh - 80px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ================= Обычные страницы ================= */
body.page { background: linear-gradient(180deg, #cfeefa 0%, #e9f7fc 320px, #fbf4e4 640px); min-height: 100vh; }
.page-head { max-width: 1060px; margin: 0 auto; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; }
.page-head .brand { padding: 8px 18px 10px; }
.page-head .brand-name { font-size: 26px; }
.page-head-right { display: flex; align-items: center; gap: 10px; }
.page-nav a[aria-current] { background: #fde9c4; }
main.content { max-width: 1060px; margin: 0 auto; padding: 8px 20px 40px; }
.tale { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 36px; align-items: start; }
.tale-media .video-box { width: 100%; height: auto; }
.tale-media .watch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tale-share { margin: 10px 0 0; }
.tale-text h1 { margin: 2px 0 6px; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.08; font-weight: 900; }
.tale-meta { margin: 0 0 12px; font-weight: 800; color: var(--ink-soft); font-size: 16px; }
.tale-stop { margin: 0 0 10px; font-weight: 700; font-style: italic; color: var(--ink-soft); }
.tale-meta2 { color: var(--ink-soft); font-weight: 700; }
.lead { font-size: 19px; line-height: 1.5; font-weight: 600; margin: 0 0 16px; }
.box { background: var(--cream); border-radius: 22px; padding: 18px 20px; box-shadow: var(--plaque-shadow); margin: 18px 0; }
.box h2 { margin: 0 0 8px; font-size: 20px; font-weight: 900; }
.box p { margin: 0 0 8px; font-size: 16px; line-height: 1.5; font-weight: 600; }
.box p:last-child { margin-bottom: 0; }
.box .source { font-size: 15px; color: var(--ink-soft); }
.tale-fig { margin: 18px 0 0; }
.tale-fig img { display: block; max-height: 220px; max-width: 100%; margin: 0 auto; filter: drop-shadow(0 6px 5px rgba(12,38,60,.25)); }
.pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.08; margin: 6px 0 14px; font-weight: 900; }
.prose h2 { font-size: 24px; margin: 26px 0 8px; font-weight: 900; }
.prose p, .prose li { font-size: 18px; line-height: 1.55; font-weight: 600; }
.prose .motto { font-size: 22px; font-weight: 900; color: #a8321f; }
.thanks-map { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 12px; }
.thanks-map li { background: var(--cream); border-radius: 18px; padding: 14px 16px; box-shadow: var(--chip-shadow); font-size: 16px; }
.thanks-map a { font-weight: 900; }
.page-foot { max-width: 1060px; margin: 0 auto; padding: 22px 20px 40px; font-size: 15px; font-weight: 700; color: var(--ink-soft); display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; border-top: 2px dashed #e6cfa8; }
.page-foot nav { display: flex; gap: 6px 16px; flex-wrap: wrap; }
.page-foot a { display: inline-flex; align-items: center; min-height: 32px; }
@media (max-width: 760px) {
  .tale { grid-template-columns: 1fr; gap: 18px; }
  .tale-media .video-box { width: min(100%, calc((100vh - 120px) * 9 / 16)); margin: 0 auto; }
  .lead { font-size: 17px; }
  .prose p, .prose li { font-size: 17px; }
}
@media (max-width: 640px) {
  .page-head { padding: 8px 10px; }
  .page-head .brand { padding: 6px 12px 7px; border-radius: 18px; }
  .page-head .brand-name { font-size: 20px; }
  .page-head .slogan { font-size: 10.5px; }
  .page-head-right { gap: 8px; }
  .page-head .lang-pill { padding: 0; }
  .page-head .lang-pill a, .page-head .lang-pill span { min-height: 44px; padding: 0 10px; font-size: 14px; }
  main.content { padding: 4px 12px 32px; }
}
.play-btn { font-size: 17px; padding: 10px 20px; }
.vk-cover { z-index: 2; }
