  html, body { margin: 0; height: 100%; overflow: hidden; background: #e8e8e8; font-family: "Play", sans-serif; }
  /* шрифты: Tektur — названия зон и крупные уведомления, Play — всё остальное */
  button, input { font-family: inherit; }
  canvas { display: block; }
  /* ---------- полоса времени суток (под картой) ---------- */
  /* рамка, панели неба, камни и трава — SVG из dayBarSvg(); тут только раскладка и бегунок */
  #daybar {
    position: fixed; right: 4px; top: 228px; z-index: 9; width: 250px; display: none;
    user-select: none; touch-action: none; cursor: pointer; filter: drop-shadow(0 4px 3px rgba(0,0,0,.35));
  }
  body.altai-active #daybar { display: block; }
  #daybar svg { display: block; width: 100%; height: auto; }
  /* зона полосы в координатах SVG: x 30…490, y 27…89 из 520×110 */
  #daybar .track { position: absolute; left: 5.77%; width: 88.46%; top: 24.5%; height: 56.4%; }
  #daybar .marker {
    position: absolute; top: 88%; width: 5.4%; aspect-ratio: 0.7; transform: translate(-50%, -50%); pointer-events: none;
    clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%); background: #efe3ae;
    filter: drop-shadow(0 2px 1px rgba(0,0,0,.4));
  }
  #daybar .marker::before {
    content: ""; position: absolute; inset: 14%; clip-path: inherit;
    background: linear-gradient(90deg, #d86a12 0 32%, #ffa53a 32% 50%, #ffc163 50% 58%, #f08a1c 58%);
  }
  @media (max-width: 640px) { #daybar { right: 2px; top: 164px; width: 190px; } }

  /* ---------- приборная панель ---------- */
  #dashboard {
    position: fixed; left: 18px; bottom: 18px; z-index: 10; width: 214px; box-sizing: border-box;
    padding: 10px 12px 12px; color: #f3efe2; background: rgba(28,32,30,.9);
    border: 2px solid #0f1311; border-radius: 12px; box-shadow: 0 5px 0 rgba(10,12,11,.6);
    font: 700 10px/1 "Play", sans-serif; letter-spacing: .06em; text-transform: uppercase; user-select: none;
  }
  #dashboard svg { display: block; width: 100%; height: auto; }
  #dashboard .arc { fill: none; stroke: #3c4440; stroke-width: 10; stroke-linecap: round; }
  #dashboard .arc-red { fill: none; stroke: #e2533b; stroke-width: 10; }
  #dashboard .tick { stroke: #c9c3ad; stroke-width: 2; }
  #dashboard .tick-label { fill: #b9b39b; font: 700 9px "Play", sans-serif; text-anchor: middle; }
  #dashboard .needle { stroke: #ff7a2f; stroke-width: 4; stroke-linecap: round; transition: transform .08s linear; transform-origin: 100px 108px; }
  #dashboard .hub { fill: #ff7a2f; stroke: #1c201e; stroke-width: 3; }
  #dashboard .readout { margin-top: 2px; text-align: center; }
  #dashboard .readout b { display: block; font: 700 26px/1 "Tektur", sans-serif; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
  #dashboard .readout small { color: #9d9780; font-size: 9px; }
  #dashboard .lamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 9px; }
  #dashboard .lamp {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0 3px;
    border-radius: 6px; background: #20262 3; background: #232a27; color: #6c716c; font-size: 8px;
  }
  #dashboard .lamp i { font-style: normal; font-size: 14px; line-height: 1; filter: grayscale(1) brightness(.6); }
  #dashboard .lamp.on { color: #f3efe2; background: #2f3a33; box-shadow: inset 0 0 0 1px #4f9b2a; }
  #dashboard .lamp.on i { filter: none; }
  #dashboard .lamp[data-lamp="boost"].on { box-shadow: inset 0 0 0 1px #ffb020; }
  #dashboard .throttle { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: #9d9780; font-size: 8px; }
  #dashboard .throttle span { flex: 1; height: 6px; border-radius: 99px; background: #232a27; overflow: hidden; }
  #dashboard .throttle b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4f9b2a, #ffb020); transition: width .1s linear; }
  @media (max-width: 640px) { #dashboard { left: 12px; bottom: 12px; transform: scale(.8); transform-origin: left bottom; } }

  /* ---------- прелоадер: до меню, пока грузится и прогревается мир ---------- */
  #preloader {
    position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    color: #f6f1de; transition: opacity .7s ease;
    /* картинка на весь экран под лёгким затемнением — белый логотип по центру читается на небе */
    background: linear-gradient(rgba(7,10,9,.42), rgba(7,10,9,.42)), url(img/menu/loading.webp) center / cover, #070a09;
  }
  #preloader img { width: min(300px, 62vw); height: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
  #preloader .pl-bar { width: min(260px, 60vw); height: 3px; border-radius: 2px; background: rgba(246,241,222,.14); overflow: hidden; }
  #preloader .pl-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb020, #ffd98a); }
  #preloader b { font: 700 15px/1 "Play", sans-serif; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
  #preloader.done { opacity: 0; pointer-events: none; }

  /* ---------- окно анонса слёта ГИД на пляже большого озера: тёмное, красный акцент ---------- */
  #gid { width: min(500px, calc(100vw - 280px)); max-height: calc(100vh - 36px); overflow-y: auto; background: rgba(12, 12, 14, .5); }
  #gid .gd-hero img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }   /* обложка со страницы анонса gid.allosta.com */
  #gid .gd-body { padding: 12px 18px 18px; }
  #gid .gd-eyebrow { font: 700 11px/1 "Play", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #ff4b5c; }
  #gid h3 { margin: 6px 0 6px; font: 400 36px/.95 "Bebas Neue", "Tektur", sans-serif; letter-spacing: .02em; text-transform: uppercase; }
  #gid p { margin: 0 0 12px; font: 400 12.5px/1.4 "Play", sans-serif; color: #e6e6e6; }
  #gid .gd-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  #gid .gd-facts div { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); }
  #gid .gd-facts small { display: block; margin-bottom: 4px; font: 700 9.5px/1 "Play", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #b3b3b3; }
  #gid .gd-facts b { font: 700 13.5px/1.2 "Play", sans-serif; }
  #gid .gd-results { display: grid; gap: 7px; margin: 0 0 14px; padding: 0; list-style: none; }
  #gid .gd-results li { display: flex; align-items: baseline; gap: 10px; font: 400 12.5px/1.35 "Play", sans-serif; }
  #gid .gd-results li b { flex: none; font: 400 22px/1 "Bebas Neue", sans-serif; color: #ff4b5c; }
  #gid .gd-apply {
    display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-radius: 12px;
    background: #d0112b; box-shadow: 0 4px 0 #7e0a1a; color: #fff; text-decoration: none;
    font: 700 14px/1 "Play", sans-serif; letter-spacing: .1em; text-transform: uppercase;
  }
  #gid .gd-apply:hover { filter: brightness(1.08); }
  #gid .gd-apply:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  /* ---------- задание «почини полный привод»: счётчик запчастей, анонс, ремонт ---------- */
  #quest {
    position: fixed; left: 50%; top: 14px; z-index: 11; transform: translateX(-50%); display: none; align-items: center; gap: 10px;
    padding: 7px 14px 7px 12px; border-radius: 99px; background: rgba(16, 24, 20, .5); border: 2px solid rgba(255,255,255,.4); color: #fff;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font: 700 12px/1 "Play", sans-serif; letter-spacing: .05em; pointer-events: none;
  }
  body.altai-active:not(.intro):not(.showcasing) #quest.on { display: flex; }
  #race-timer:not([hidden]) ~ #quest { display: none !important; }
  /* пока мотор сломан — плашка-задание не исчезает: куда ехать и сколько осталось */
  #limp-task {
    position: fixed; left: 50%; top: 14px; z-index: 11; transform: translateX(-50%); display: none; align-items: center; gap: 12px;
    padding: 9px 18px 9px 12px; border-radius: 14px; background: rgba(120, 26, 14, .82); border: 2px solid #ff7a4a; color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,.35); pointer-events: none; animation: limp-pulse 1.8s ease-in-out infinite;
  }
  body.altai-active:not(.intro):not(.showcasing) #limp-task.on { display: flex; }
  #limp-task i { font-style: normal; font-size: 22px; }
  #limp-task b { display: block; font: 700 14px/1.15 "Tektur", sans-serif; letter-spacing: .04em; text-transform: uppercase; }
  #limp-task small { display: block; margin-top: 3px; font: 600 12px/1.2 "Play", sans-serif; color: #ffd8c4; }
  @keyframes limp-pulse { 50% { border-color: #ffd35c; box-shadow: 0 6px 22px rgba(255,90,31,.55); } }
  #quest .q-gears { display: flex; gap: 3px; }
  #quest svg { width: 17px; height: 17px; fill: rgba(255,255,255,.28); transition: fill .3s ease, transform .4s ease; }
  #quest svg.got { fill: #ffb020; }
  #quest svg.new { transform: rotate(180deg) scale(1.35); }
  #quest.done { border-color: #b9ef95; }
  #quest-card {
    position: fixed; inset: 0; z-index: 35; display: none; place-items: center; padding: 20px; background: rgba(8,12,10,.55); backdrop-filter: blur(3px);
  }
  #quest-card.open { display: grid; }
  #quest-card .qc-box {
    width: min(460px, 100%); padding: 22px 22px 20px; border-radius: 18px; background: #1d2521; color: #f6f1de;
    border: 2px solid rgba(255,255,255,.18); box-shadow: 0 18px 40px rgba(0,0,0,.45);
  }
  #quest-card .qc-icon { display: flex; gap: 6px; margin-bottom: 12px; }
  #quest-card .qc-icon svg { width: 30px; height: 30px; fill: #ffb020; animation: qc-spin 6s linear infinite; }
  #quest-card .qc-icon svg:nth-child(2) { fill: #ff5a3c; animation-direction: reverse; }
  @keyframes qc-spin { to { transform: rotate(360deg); } }
  #quest-card span { font: 700 11px/1 "Play", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #ff5a3c; }
  #quest-card h3 { margin: 8px 0 10px; font: 700 26px/1.1 "Tektur", sans-serif; }
  #quest-card p { margin: 0 0 10px; font: 400 14px/1.45 "Play", sans-serif; color: #dfe6da; }
  #quest-card button {
    margin-top: 8px; padding: 12px 20px; border: 0; border-radius: 10px; background: #ffb020; color: #1f1402; cursor: pointer;
    font: 700 14px/1 "Play", sans-serif; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 4px 0 #a86f00;
  }
  #quest-card button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  /* пит-стоп: пояснительные сноски убраны, вместо них — ремонт с таймером */
  #showcase .sc-head, #showcase .sc-lines, #showcase .sc-callouts { display: none; }
  #showcase .sc-repair {
    position: absolute; left: 50%; top: 7vh; transform: translateX(-50%); display: none; flex-direction: column; align-items: center; gap: 10px;
    padding: 16px 26px 18px; border-radius: 18px; background: rgba(16,24,20,.5); border: 2px solid rgba(255,255,255,.4); color: #fff;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-shadow: 0 2px 6px rgba(0,0,0,.5); min-width: 300px;
  }
  #showcase.repair .sc-repair { display: flex; }
  #showcase.repair .sc-hint { display: none; }
  #showcase .sc-repair b { font: 700 22px/1 "Tektur", sans-serif; }
  #showcase .sc-repair .bar { width: 100%; height: 8px; border-radius: 99px; background: rgba(255,255,255,.2); overflow: hidden; }
  #showcase .sc-repair .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb020, #b9ef95); }
  #showcase .sc-repair small { font: 700 13px/1 "Play", sans-serif; letter-spacing: .08em; opacity: .9; }
  #showcase .sc-repair svg { width: 34px; height: 34px; fill: #ffb020; animation: qc-spin 1.6s linear infinite; }
  /* ---------- окно анонса слёта Kaizen Club: белое, чёрный жирный шрифт, моно-подписи ---------- */
  /* section#… — сильнее общего правила панелей (тёмное стекло, белый текст), оно объявлено ниже */
  section#kaizen { width: min(500px, calc(100vw - 280px)); max-height: calc(100vh - 36px); overflow-y: auto;
    background: rgba(250, 250, 247, .96); color: #151410; border-color: rgba(21,20,16,.18); }
  section#kaizen .films-close { border-color: rgba(21,20,16,.3); background: rgba(21,20,16,.06); color: #151410; }
  section#kaizen .films-close:hover { background: rgba(21,20,16,.14); }
  #kaizen .kz-hero img { display: block; width: 100%; aspect-ratio: 1280 / 620; object-fit: cover; }   /* афиша со страницы kaizenclub.kz/almaty-2026 */
  #kaizen .kz-body { padding: 12px 18px 18px; }
  #kaizen .kz-mono { font: 500 11px/1.2 "Roboto Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: #6b675c; }
  #kaizen h3 { margin: 6px 0 2px; font: 800 30px/1 "Onest", "Tektur", sans-serif; letter-spacing: -.01em; }
  #kaizen h3 span { color: #8a5a2b; }
  #kaizen .kz-sub { margin: 0 0 8px; font: 700 15px/1.2 "Onest", sans-serif; }
  #kaizen p { margin: 0 0 12px; font: 400 12.5px/1.4 "Play", sans-serif; color: #3a372f; }
  #kaizen .kz-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  #kaizen .kz-facts div { padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid rgba(21,20,16,.12); }
  #kaizen .kz-facts small { display: block; margin-bottom: 4px; font: 500 9.5px/1 "Roboto Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: #8b867a; }
  #kaizen .kz-facts b { font: 700 13px/1.25 "Onest", sans-serif; }
  #kaizen .kz-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
  #kaizen .kz-topics li { padding: 6px 9px; border-radius: 99px; border: 1px solid rgba(21,20,16,.2); font: 500 10.5px/1 "Roboto Mono", monospace; letter-spacing: .04em; text-transform: uppercase; }
  #kaizen .kz-apply {
    display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-radius: 10px;
    background: #151410; color: #fff; text-decoration: none; font: 700 13px/1 "Roboto Mono", monospace; letter-spacing: .1em; text-transform: uppercase;
  }
  #kaizen .kz-apply:hover { background: #2c2a23; }
  #kaizen .kz-apply:focus-visible { outline: 2px solid #8a5a2b; outline-offset: 2px; }
  /* ---------- телефон: джойстик, кнопки, «поверни экран», во весь экран ---------- */
  #touch-ui, #rotate-hint, #menu .touch-note { display: none; }
  body.touch #controls { display: none !important; }
  body.touch.altai-active:not(.intro) #touch-ui { display: block; }
  #touch-ui { position: fixed; inset: 0; z-index: 12; pointer-events: none; user-select: none; -webkit-user-select: none; }
  /* джойстик справа, над ним — зажигание и 4×4; слева — буст и тормоз; сверху слева — меню, сброс, во весь экран */
  #touch-ui .tb-right {
    position: absolute; right: calc(env(safe-area-inset-right) + 22px); bottom: 20px; pointer-events: auto;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
  }
  #touch-ui .tb-row { display: flex; gap: 14px; }
  #touch-ui .tb-left {
    position: absolute; left: calc(env(safe-area-inset-left) + 22px); bottom: 20px; pointer-events: auto;
    display: flex; gap: 8px; align-items: flex-end;
  }
  #touch-ui .tb-left .tbtn + .tbtn { margin-bottom: 56px; }   /* по диагонали: буст выше и правее тормоза */
  body.touch canvas { touch-action: none; }
  #stick {
    position: relative; width: 136px; height: 136px; border-radius: 50%;
    background: rgba(16,24,20,.32); border: 2px solid rgba(255,255,255,.4); touch-action: none;
  }
  #stick i {
    position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%;
    background: #ffb020; box-shadow: 0 4px 0 #a97816, 0 6px 12px rgba(0,0,0,.35);
  }
  #stick.active { background: rgba(16,24,20,.45); }
  #touch-ui .tbtn, #touch-ui .tb-top button {
    width: 72px; height: 72px; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); background: rgba(16,24,20,.55);
    color: #fff; font: 700 20px/1 "Play", sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 0; touch-action: none; -webkit-tap-highlight-color: transparent;
  }
  #touch-ui .tbtn small { font-size: 8px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
  #touch-ui .tb-row .tbtn { width: 46px; height: 46px; font-size: 14px; }
  #touch-ui .tbtn.down { background: #ffb020; border-color: #ffd98a; color: #1c1d20; }
  #touch-ui .tbtn[aria-pressed="true"] { border-color: #b9ef95; color: #b9ef95; background: rgba(40,70,30,.6); }
  #touch-ui .tb-top { position: absolute; left: calc(env(safe-area-inset-left) + 12px); top: 12px; display: flex; gap: 8px; pointer-events: auto; }
  #touch-ui .tb-top button, #touch-ui .tb-top .tbtn { width: 42px; height: 42px; font-size: 18px; }
  #touch-ui .tb-top button[hidden] { display: none; }
  body.touch #dashboard { display: none !important; }
  body.touch.showcasing #touch-ui #stick, body.touch.showcasing #touch-ui .tbtn:not([data-code="KeyE"]) { visibility: hidden; }
  @media (max-height: 500px) {
    body.touch #minimap { transform: scale(.5); transform-origin: right top; }
    body.touch #location-card, body.touch #expedition-stage, body.touch #daybar { display: none !important; }
  }
  #rotate-hint {
    position: fixed; inset: 0; z-index: 50; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
    background: radial-gradient(circle at 50% 40%, #16231d, #070a09 75%); color: #f6f1de; text-align: center; padding: 24px;
  }
  #rotate-hint .phone { width: 44px; height: 78px; border: 4px solid #f6f1de; border-radius: 10px; animation: rotate-phone 2.2s ease-in-out infinite; }
  #rotate-hint b { font: 700 20px/1.2 "Tektur", sans-serif; }
  #rotate-hint small { font-size: 13px; opacity: .7; max-width: 260px; }
  @keyframes rotate-phone { 0%, 20% { transform: rotate(0); } 50%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
  @media (orientation: portrait) { body.touch #rotate-hint { display: flex; } }
  body.touch #menu .touch-note { display: block; }
  body.touch #menu .keys-note { display: none; }

  /* ---------- стартовое меню ---------- */
  #menu {
    position: fixed; inset: 0; z-index: 30; display: none; place-items: center; padding: 24px; box-sizing: border-box;
    background: radial-gradient(circle at 50% 30%, rgba(20,34,28,.55), rgba(8,12,10,.86));
    backdrop-filter: blur(6px); color: #f6f1de; font-family: "Play", sans-serif;
  }
  #menu.open { display: grid; }
  #menu { overflow-y: auto; }
  #menu .menu-inner { width: min(1060px, 100%); margin: auto 0; }
  #menu .eyebrow { color: #ff5a3c; font: 700 11px/1 "Play", sans-serif; letter-spacing: .24em; text-transform: uppercase; }
  #menu h1 { margin: 10px 0 22px; font: 700 34px/1.05 "Tektur", sans-serif; letter-spacing: .01em; }
  #menu .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
  #menu .card {
    display: flex; flex-direction: column; overflow: hidden; padding: 0; text-align: left; color: inherit;
    background: #1d2521; border: 3px solid #0d110f; border-radius: 14px; box-shadow: 0 7px 0 #0d110f;
    font: inherit; transition: transform .15s ease, box-shadow .15s ease;
  }
  #menu .card.available { cursor: pointer; }
  #menu .card.available:hover, #menu .card.available:focus-visible { transform: translateY(-4px); box-shadow: 0 11px 0 #0d110f; outline: none; border-color: #ffb020; }
  #menu .preview { aspect-ratio: 16 / 9; background: #2b3a31 center / cover no-repeat; position: relative; }
  #menu .locked .preview { filter: grayscale(1) brightness(.6); }
  #menu .info { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
  #menu .info b { font: 700 18px/1.1 "Tektur", sans-serif; }
  #menu .info small { color: #a9b39f; font-size: 12px; line-height: 1.35; }
  #menu .tag {
    align-self: flex-start; margin-top: 6px; padding: 7px 12px 6px; border-radius: 99px;
    font: 700 11px/1 "Play", sans-serif; letter-spacing: .1em; text-transform: uppercase;
  }
  #menu .available .tag { color: #1f1402; background: #ffb020; box-shadow: 0 3px 0 #a86f00; }
  #menu .locked .tag { color: #9aa197; background: #2a332e; }
  #menu footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px;
    color: #a9b39f; font: 700 11px/1 "Play", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
  #menu footer label { display: flex; align-items: center; gap: 10px; }
  #menu footer input[type="range"] { width: 140px; accent-color: #ffb020; cursor: pointer; }
  #menu footer select { padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: inherit; font: inherit; cursor: pointer; }
  #menu footer select option { color: #111; }
  #new-game { padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255,176,32,.6); background: rgba(255,176,32,.12); color: #ffd98a; font: inherit; cursor: pointer; }
  #new-game:hover { background: rgba(255,176,32,.24); }
  /* телефон горизонтально: меню целиком в экран без прокрутки */
  @media (max-height: 500px) {
    #menu { padding: 12px 20px; place-items: start center; }
    #menu h1 { margin: 6px 0 10px; font-size: 22px; }
    #menu .cards { grid-template-columns: repeat(3, minmax(0, 210px)); justify-content: center; gap: 12px; }
    #menu .info b { font-size: 15px; }
    #menu .tag { padding: 5px 9px; font-size: 10px; }
    #menu .preview { aspect-ratio: 21 / 9; }
    #menu .info { padding: 8px 12px 10px; gap: 4px; }
    #menu .info small { display: none; }
    #menu footer { margin-top: 10px; }
  }
  #volume-value { min-width: 26px; text-align: right; font-variant-numeric: tabular-nums; }
  @media (max-width: 640px) { #menu h1 { font-size: 26px; } #menu .preview { height: 110px; } }

  #drive-hint {
    position: fixed; left: 50%; bottom: 24px; z-index: 11; transform: translate(-50%, 12px); opacity: 0;
    padding: 11px 16px 10px; color: #2a1c00; background: #ffd35c; border: 2px solid #a86f00; border-radius: 10px;
    box-shadow: 0 5px 0 #a86f00; font: 600 13px/1.2 "Tektur", sans-serif; letter-spacing: .06em;
    text-transform: uppercase; pointer-events: none; transition: opacity .2s ease, transform .25s ease; white-space: nowrap;
  }
  #drive-hint.visible { opacity: 1; transform: translate(-50%, 0); }
  /* узкое окно: между приборной панелью и управлением подсказке не хватает места — поднимаем её над ними */
  @media (max-width: 1000px) { body:not(.touch) #drive-hint { bottom: 250px; max-width: calc(100vw - 40px); white-space: normal; text-align: center; } }
  #crash {
    position: fixed; left: 50%; top: 16%; z-index: 12; transform: translateX(-50%); display: none; justify-items: center; gap: 6px;
    padding: 14px 26px 16px; color: #fff; background: #c8321e; border: 3px solid #6e1408; border-radius: 14px;
    box-shadow: 0 7px 0 #6e1408, 0 14px 30px rgba(0,0,0,.35); text-align: center; pointer-events: none;
  }
  #crash.on { display: grid; animation: crash-in .5s cubic-bezier(.2,1.6,.4,1) both; }
  #crash b { font: 700 34px/1 "Tektur", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
  #crash span { font: 600 14px/1.3 "Play", sans-serif; }
  #crash small { font: 700 13px/1 "Tektur", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #ffd35c; }
  /* телефон: баннер компактный и у самого верха — не наезжает на кнопки ключа и 4×4 справа */
  /* на телефоне баннер — сам кнопка «поставить колесо»; плавающая подсказка над машиной в это время не нужна — она упиралась в баннер */
  body.touch #crash { pointer-events: auto; cursor: pointer; }
  body.touch:has(#crash.on) #key-prompt { display: none !important; }
  body.touch #crash { top: 8px; gap: 2px; padding: 6px 16px 8px; border-width: 2px; border-radius: 10px; box-shadow: 0 4px 0 #6e1408; max-width: 46vw; }
  body.touch #crash b { font-size: 20px; }
  body.touch #crash span { font-size: 11px; }
  body.touch #crash small { font-size: 10px; }
  @keyframes crash-in { 0% { transform: translateX(-50%) scale(.4) rotate(-6deg); opacity: 0; } 100% { transform: translateX(-50%) scale(1); opacity: 1; } }
  #controls {
    position: fixed; right: 18px; bottom: 18px; z-index: 10; width: 292px; box-sizing: border-box;
    padding: 10px 12px 12px; color: #3f3f39; background: rgba(255,253,244,.94);
    border: 2px solid rgba(75,75,69,.22); border-radius: 10px; box-shadow: 0 5px 0 rgba(75,75,69,.16);
    font: 700 10px/1.1 "Play", sans-serif; letter-spacing: .06em; text-transform: uppercase;
    user-select: none; touch-action: none;
  }
  #controls header { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
  #controls header b { font-size: 11px; letter-spacing: .14em; }
  #controls header span { font-size: 13px; transition: transform .2s ease; }
  #controls.collapsed header span { transform: rotate(180deg); }
  #controls.collapsed .controls-body { display: none; }
  #controls .controls-body { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; margin-top: 9px; }
  #controls .pad { display: grid; grid-template-columns: repeat(3, 36px); grid-template-rows: repeat(2, 36px); gap: 4px; }
  #controls .pad [data-code="KeyW"] { grid-column: 2; }
  #controls .pad [data-code="KeyA"] { grid-column: 1; grid-row: 2; }
  #controls .pad [data-code="KeyS"] { grid-column: 2; grid-row: 2; }
  #controls .pad [data-code="KeyD"] { grid-column: 3; grid-row: 2; }
  #controls .wide { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-content: start; }
  #controls .actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
  #controls .key {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 36px; padding: 3px 2px; box-sizing: border-box; color: #2c2c28; background: #fff;
    border: 2px solid #c9c3ad; border-bottom-width: 4px; border-radius: 7px; cursor: pointer;
    font: 700 13px/1 "Play", sans-serif; letter-spacing: .02em; text-transform: none;
    transition: transform .06s ease, background .12s ease, border-color .12s ease;
  }
  #controls .key[hidden] { display: none; }
  #controls .key small { font: 700 8px/1.05 "Play", sans-serif; letter-spacing: .04em; text-transform: uppercase; color: #7a7560; text-align: center; }
  #controls .key.down { transform: translateY(2px); border-bottom-width: 2px; background: #ffe394; border-color: #a97816; }
  #controls .key[aria-pressed="true"] { background: #b9ef95; border-color: #4f9b2a; }
  #controls .key[aria-pressed="true"] small { color: #2f6b12; }
  #controls .note { grid-column: 1 / -1; color: #8a846d; font-size: 9px; letter-spacing: .05em; }
  #controls .key:focus-visible { outline: 3px solid #a97816; outline-offset: 2px; }
  @media (max-width: 640px) { #controls { right: 12px; bottom: 12px; transform: scale(.86); transform-origin: right bottom; } }
  #zone-tag {
    position: fixed; top: 166px; right: 18px; transform: translateY(-12px);
    font: 700 13px/1 "Tektur", sans-serif; letter-spacing: .14em;
    color: #073c47; background: #88e3e8; border: 2px solid #157480;
    padding: 10px 13px 9px; border-radius: 999px; box-shadow: 0 5px 0 #157480;
    opacity: 0; transition: opacity .18s ease, transform .22s cubic-bezier(.2,.8,.2,1);
    user-select: none; pointer-events: none;
  }
  #zone-tag.visible { opacity: 1; transform: translateY(0); }
  /* Route/status cards are temporarily removed from the game composition. */
  #location-card, #expedition-stage, #zone-tag { display: none !important; }
  #minimap {
    position: fixed; right: 18px; top: 18px; z-index: 9; display: none;
    border: 3px solid #1b2a1f; border-radius: 10px; overflow: hidden;
    box-shadow: 0 6px 0 rgba(20,30,22,.55); background: #2b4a30; line-height: 0;
    pointer-events: none;
  }
  #minimap canvas + canvas { position: absolute; left: 0; top: 0; }
  body.altai-active #minimap { display: block; }
  body.altai-active #minimap.hidden { display: none; }
  @media (max-width: 640px) { #minimap { right: 12px; top: 12px; transform: scale(.72); transform-origin: right top; } }
  #location-card {
    position: fixed; right: 18px; top: 18px; z-index: 9; min-width: 174px;
    padding: 12px 15px 13px; color: #f8f1d5; background: #203f35;
    border: 2px solid #142d26; border-radius: 7px; box-shadow: 0 6px 0 rgba(20,45,38,.78);
    pointer-events: none; user-select: none; transition: background .25s ease, border-color .25s ease;
  }
  #location-card .eyebrow { display: block; margin-bottom: 5px; color: #c7ddbc; font: 700 9px/1 "Play", sans-serif; letter-spacing: .2em; text-transform: uppercase; }
  #location-name { display: block; font: 700 17px/1.05 "Tektur", sans-serif; letter-spacing: .01em; }
  body.altai-active #location-card { color: #ffffff; background: #202020; border-color: #080808; box-shadow: 0 6px 0 #080808; }
  body.altai-active #location-card .eyebrow { color: #ff3b32; }
  #expedition-stage {
    position: fixed; right: 18px; top: 94px; z-index: 9; width: 208px;
    box-sizing: border-box; padding: 10px 13px 12px 17px; color: #202020; background: #f6f4ef;
    border: 2px solid #202020; border-radius: 3px; box-shadow: 5px 5px 0 rgba(0,0,0,.2);
    opacity: 0; transform: translateX(16px); transition: opacity .2s ease, transform .25s ease;
    pointer-events: none; user-select: none;
  }
  #expedition-stage::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: #ef1111; }
  #expedition-stage .day { display: block; margin-bottom: 4px; color: #ef1111; font: 700 9px/1 "Play", sans-serif; letter-spacing: .16em; }
  #stage-name { display: block; font: 600 14px/1.15 "Tektur", sans-serif; text-transform: uppercase; }
  body.altai-active #expedition-stage { opacity: 1; transform: translateX(0); }
  #biome-flash {
    position: fixed; inset: 0; z-index: 20; background: #d9e9d3; opacity: 0;
    pointer-events: none; transition: opacity .24s ease;
  }
  #biome-flash.visible { opacity: .72; }
  @media (max-width: 640px) {
    #location-card { right: 12px; top: 12px; min-width: 138px; padding: 10px 12px; }
    #location-name { font-size: 14px; }
    #expedition-stage { right: 12px; top: 82px; width: 156px; }
    #zone-tag { top: 154px; right: 12px; }
  }

  /* ---------- планшет экспедиции (editor/tablet.js): все окна — на его экране ---------- */
  .tablet-backdrop { background: radial-gradient(circle at 50% 45%, rgba(8,12,10,.35), rgba(4,6,5,.72)); opacity: 0; }
  .tablet-screen {
    container-type: inline-size;   /* размеры текста сообщений — от ширины экрана (cqw) */
    box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; color: #eef4ea;
    clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px);   /* скосы — как у рамки */
    background: linear-gradient(135deg, rgba(40,90,48,.35), transparent 40%), repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 9px), radial-gradient(circle at 30% 20%, #17331f, #08130c 75%);
    box-shadow: inset 0 0 0 2px rgba(110,220,120,.25), inset 0 0 60px rgba(0,0,0,.6);
  }
  .tablet-screen .tb-bar { flex: none; display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 18px;
    background: rgba(0,0,0,.35); border-bottom: 1px solid rgba(110,220,120,.25); font: 700 13px/1 "Tektur", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #cfd8c8; }
  .tablet-screen .tb-title i { margin-right: 10px; font-style: normal; color: #ffb020; }
  .tablet-screen .tb-status { display: flex; align-items: center; gap: 12px; }
  .tablet-screen .tb-signal { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
  .tablet-screen .tb-signal b { width: 3px; background: #ffb020; }
  .tablet-screen .tb-signal b:nth-child(1) { height: 25%; } .tablet-screen .tb-signal b:nth-child(2) { height: 50%; }
  .tablet-screen .tb-signal b:nth-child(3) { height: 75%; } .tablet-screen .tb-signal b:nth-child(4) { height: 100%; }
  .tablet-screen .tb-battery { width: 24px; height: 12px; border: 2px solid #ffb020; border-radius: 3px; background: linear-gradient(90deg, #ffb020 75%, transparent 75%) content-box; padding: 1px; }
  .tablet-screen .tb-content { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px; box-sizing: border-box; }
  .tablet-screen .tb-content > :not(.open):not(.tb-last) { display: none !important; }
  .tablet-screen .tb-content > .tb-last { display: block !important; pointer-events: none !important; }   /* уезжает вместе с планшетом */
  .tablet-screen .tb-content > * {
    position: relative !important; inset: auto !important; left: auto !important; top: auto !important; z-index: auto !important;
    width: auto !important; min-width: 0 !important; max-width: none !important; max-height: none !important; margin: 0 0 14px !important;
    transform: none !important; opacity: 1 !important; transition: none !important; pointer-events: auto !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important;
  }
  /* достижения — отдельная страница планшета: пока открыта, остальное (меню) скрыто; «← Назад» возвращает */
  .tablet-screen .tb-content:has(> #achievements-panel.open) > :not(#achievements-panel) { display: none !important; }
  .tablet-screen .tb-content:has(> #map-page.open) > :not(#map-page) { display: none !important; }
  .tablet-screen .tb-content > #achievements-panel.open { display: block !important; padding: 0 !important; background: none !important; }
  .tablet-screen #achievements-panel .ach-shell { width: auto; max-height: none; overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .tablet-screen #achievements-panel .ach-head { padding: 0 0 14px; }
  .tablet-screen #achievements-panel .ach-list { overflow: visible; padding: 0; }
  .tablet-screen #achievements-panel .ach-close { width: auto; padding: 0 14px; border-radius: 9px; font: 700 13px/34px "Tektur", sans-serif; letter-spacing: .06em; }
  .tablet-screen .tb-content > #menu.open, .tablet-screen .tb-content > #quest-card.open { display: block !important; padding: 0 !important; background: none !important; overflow: visible !important; }
  .tablet-screen .tb-content > #quest-card .qc-box { max-width: none; margin: 0; background: none; border: 0; box-shadow: none; padding: 4px 6px; }
  /* ---------- сообщения на планшете (showTabletMessage): «Мотор починен», «4×4 не в строю» ---------- */
  #quest-card .tm-msg { --tone: #48e05a; width: 100%; box-sizing: border-box; display: grid; grid-template-columns: 118px 1fr; gap: 0 26px; padding: 14px 10px 4px; }
  #quest-card .tm-msg.task { --tone: #ff7a2a; }

  #quest-card .tm-icon { width: 112px; height: 98px; display: grid; place-items: center; border: 3px solid var(--tone); background: color-mix(in srgb, var(--tone) 12%, transparent);
    clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px); }
  #quest-card .tm-icon svg { width: 82px; height: 70px; }
  #quest-card .tm-eyebrow { font: 700 15px/1 "Tektur", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--tone); margin: 8px 0 8px; }
  #quest-card .tm-title { margin: 0; padding-bottom: 12px; border-bottom: 3px solid var(--tone); font: 700 min(46px, calc((100cqw - 220px) / 13))/1 "Tektur", sans-serif;   /* в одну строку: ширина текста ≈ 12.7 × кегль, колонка = экран − 220 px (860 → 46 px, телефон 620 → 31 px) */ text-transform: uppercase; color: #f3ead6; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
  #quest-card .tm-body { grid-column: 1 / -1; margin-top: 18px; }
  #quest-card .tm-body p { margin: 0 0 12px; font: 400 17px/1.45 "Play", sans-serif; color: #e8ecdf; }
  #quest-card .tm-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; margin-top: 8px; }
  #quest-card .tm-go { min-width: 300px; padding: 14px 34px; border: 0; background: linear-gradient(180deg, #ffc23a, #f0a010); color: #1a1205; cursor: pointer;
    font: 700 22px/1 "Tektur", sans-serif; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 4px 0 #9a6400;
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px); }
  #quest-card .tm-go { white-space: nowrap; }
  #quest-card .tm-actions { flex-wrap: wrap; row-gap: 10px; }
  #quest-card .tm-go::after { content: "›"; margin-left: 26px; font-size: 30px; vertical-align: -3px; }
  #quest-card .tm-go:hover, #quest-card .tm-go:focus-visible { filter: brightness(1.1); outline: none; }
  #quest-card .tm-key { font: 400 15px/1 "Play", sans-serif; color: #c9d1c2; }
  #quest-card .tm-key kbd { display: inline-block; margin-right: 8px; padding: 5px 9px; border: 2px solid #9aa596; border-radius: 5px; font: 600 14px/1 "Play", sans-serif; color: #e6ecdf; }
  /* узкий экран планшета (телефон) — после основных правил, иначе они его перебивали и значок наезжал на текст */
  @container (max-width: 700px) {
    #quest-card .tm-msg { grid-template-columns: 84px 1fr; gap: 0 18px; padding: 6px 4px 0; }
    #quest-card .tm-icon { width: 80px; height: 70px; }
    #quest-card .tm-icon svg { width: 58px; height: 50px; }
    #quest-card .tm-body { margin-top: 10px; }
    #quest-card .tm-body p { margin-bottom: 6px; font-size: 14px; line-height: 1.35; }
    #quest-card .tm-go { min-width: 220px; padding: 11px 24px; font-size: 18px; }
  }
  /* ---------- карта экспедиции (M): карта, миссия и легенда ---------- */
  #map-page .mp-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
  #map-page .mp-head div { flex: 1; }
  #map-page .mp-head small { color: #e7b863; font: 700 11px/1 "Tektur", sans-serif; letter-spacing: .16em; }
  #map-page .mp-head h2 { margin: 4px 0 0; font: 700 28px/1 "Tektur", sans-serif; }
  #map-page .mp-back { padding: 0 14px; border: 1px solid #ffcc69a0; border-radius: 9px; background: #17251e; color: #ffda88; font: 700 13px/34px "Tektur", sans-serif; letter-spacing: .06em; cursor: pointer; }
  #map-page .mp-grid { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
  #map-page canvas { display: block; width: 400px; height: auto; border-radius: 10px; border: 2px solid rgba(110,220,120,.3); }
  #map-page .mp-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  #map-page .mp-mission { padding: 12px 14px; border: 2px solid #ff7a2a; border-radius: 10px; background: rgba(255,122,42,.1); }
  #map-page .mp-mission small { display: block; color: #ff9a5a; font: 700 11px/1 "Tektur", sans-serif; letter-spacing: .16em; text-transform: uppercase; }
  #map-page .mp-mission b { display: block; margin: 6px 0 4px; font: 700 18px/1.15 "Tektur", sans-serif; }
  #map-page .mp-mission p { margin: 0; font: 400 13px/1.4 "Play", sans-serif; color: #e3e8dc; }
  #map-page .mp-parts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
  #map-page .mp-parts span { padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,.07); font: 600 11px/1.2 "Play", sans-serif; color: #b9c2b3; }
  #map-page .mp-parts span.got { background: rgba(72,224,90,.18); color: #b9f5c0; }
  #map-page ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
  #map-page li button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; background: rgba(255,255,255,.04); color: inherit; text-align: left; cursor: pointer; }
  #map-page li button:hover, #map-page li button:focus-visible, #map-page li button.on { border-color: #ffcc69; background: rgba(255,204,105,.1); outline: none; }
  #map-page li i { flex: none; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
  #map-page li span { flex: 1; font: 600 13px/1.2 "Play", sans-serif; }
  #map-page li small { flex: none; font: 600 11px/1 "Play", sans-serif; color: #9fb09a; }
  #map-page li small.got { color: #7fe08a; }
  /* кнопка «Меню» слева сверху — вместо кнопки достижений (они — в меню) */
  #achievements-button { display: none !important; }
  #menu-button { position: fixed; left: 14px; top: 14px; z-index: 18; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid #ffca61a6; border-radius: 13px;
    background: #10201edb; color: #ffda88; font: 700 13px "Play", sans-serif; cursor: pointer; box-shadow: 0 8px 28px #0718148a; }
  #menu-button:hover { background: #23352e; }
  body.menu-open #menu-button, body.touch #menu-button, body.intro #menu-button { display: none; }

  /* ---------- окна лагерей в стиле планшета: без своих рамок и фона, единые шрифты и кнопки ---------- */
  .tablet-screen .tb-content > section { background: none !important; border: 0 !important; border-radius: 0 !important; color: #eef4ea !important; overflow: visible !important; }
  .tablet-screen .tb-content > section .films-close { display: none !important; }   /* вместо ✕ — «Вернуться к путешествию» */
  .tablet-screen .tb-content > section footer svg { display: none; }
  .tablet-screen .tb-content > #films :is(.films-grid, .films-player) { padding-left: 0 !important; padding-right: 0 !important; }
  .tablet-screen .tb-content > section :is(.film, .film img, .films-player iframe) { border: 0 !important; box-shadow: none !important; }
  .tablet-screen .tb-content > section :is(.films-head svg) { display: none; }
  .tablet-screen .tb-content > #films .films-head { height: auto; padding: 0 0 12px; text-shadow: none; }
  .tablet-screen .tb-content > #films .films-brand { position: static; }
  .tablet-screen .tb-content > section :is(.rv-head, .tr-head, .rf-head, .pt-head, .kz-body, .gd-body, .about-head) { padding-left: 0 !important; padding-right: 0 !important; background: none !important; }
  .tablet-screen .tb-content > section :is(.rv-head > span, .tr-head > span, .rf-head > span, .pt-head > span, .kz-mono, .gd-eyebrow, .about-head > span, .films-brand small) {
    display: block; font: 700 13px/1.2 "Tektur", sans-serif !important; letter-spacing: .14em !important; text-transform: uppercase; color: #ff9a3c !important; }
  .tablet-screen .tb-content > section :is(h3, .films-brand b) { font: 700 30px/1.08 "Tektur", sans-serif !important; color: #f3ead6 !important; letter-spacing: 0 !important; text-transform: none !important; }
  .tablet-screen .tb-content > section h3 span { color: #ffb020 !important; }
  .tablet-screen .tb-content > section :is(p, .kz-sub, .gd-results li, .about-stats dd) { color: #dfe6d6 !important; }
  .tablet-screen .tb-content > section :is(.kz-facts div, .gd-facts div, .about-stats div) { background: rgba(255,255,255,.05) !important; border: 1px solid rgba(110,220,120,.28) !important; border-radius: 8px !important; }
  .tablet-screen .tb-content > section :is(.kz-facts small, .gd-facts small) { color: #9fb09a !important; }
  .tablet-screen .tb-content > section :is(.kz-facts b, .gd-facts b) { color: #f0ead9 !important; }
  .tablet-screen .tb-content > section .kz-topics li { background: rgba(255,255,255,.06) !important; color: #dfe6d6 !important; border-color: rgba(110,220,120,.28) !important; }
  .tablet-screen .tb-content > section :is(.kz-hero, .gd-hero) { border-radius: 8px; overflow: hidden; }
  .tablet-screen .tb-content > section footer { background: none !important; border: 0 !important; padding: 12px 0 0 !important; }
  .tablet-screen .tb-content > section :is(.films-watch, .kz-apply, .gd-apply, .tr-apply, .rf-save, .rf-again, .pt-submit) {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 26px !important; border: 0 !important; border-radius: 0 !important;
    background: linear-gradient(180deg, #ffc23a, #f0a010) !important; color: #1a1205 !important; box-shadow: 0 4px 0 #9a6400 !important; cursor: pointer;
    font: 700 16px/1 "Tektur", sans-serif !important; letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); }
  .tablet-screen .tb-content > section .films-watch .yt { background: #1a1205 !important; }
  .tablet-screen .tb-content > section .films-watch .yt::after { border-left-color: #ffb020 !important; }
  /* экран планшета всегда одной ширины — «телефонные» перестройки окон по ширине окна здесь не нужны */
  /* портал: карточка следующей локации — с фото, пониже, кнопки в стиле планшета */
  .tablet-screen #portal .pt-head { padding: 0 !important; }
  .tablet-screen #portal .pt-next { margin: 0 !important; aspect-ratio: 16 / 4 !important; border: 1px solid rgba(110,220,120,.28) !important; }
  .tablet-screen #portal .pt-actions { padding: 12px 0 6px !important; }
  /* подписка на следующую локацию */
  #portal .pt-notify { margin-top: 14px; }
  #portal .pt-notify > b { display: block; margin-bottom: 8px; font: 700 15px/1.2 "Tektur", sans-serif; letter-spacing: .04em; text-transform: uppercase; color: #ffb020; }
  #portal .pt-fields { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 8px; }
  #portal .pt-fields[hidden], #portal .pt-consent[hidden] { display: none; }
  #portal .pt-fields input { min-width: 0; padding: 10px 12px; border: 1px solid rgba(110,220,120,.35); background: rgba(0,0,0,.35); color: #eef4ea; font: 400 14px/1.2 "Play", sans-serif; }
  #portal .pt-fields input:focus { outline: none; border-color: #ffb020; }
  #portal .pt-consent { display: flex; align-items: center; gap: 8px; margin-top: 8px; font: 400 12px/1.3 "Play", sans-serif; color: #c9d1c2; }
  #portal .pt-consent a { color: #ffda88; }
  #portal .pt-status { min-height: 1em; margin: 6px 0 0 !important; font: 400 13px/1.35 "Play", sans-serif !important; color: #ffda88 !important; }
  .tablet-screen #portal .pt-stay { border: 2px solid #6fdc7a !important; border-radius: 0 !important; background: rgba(72,224,90,.08) !important; color: #cdeecb !important;
    font: 700 15px/1 "Tektur", sans-serif !important; letter-spacing: .06em; text-transform: uppercase; }
  .tablet-screen #portal .pt-real { padding: 4px 0 0 !important; }
  .tablet-screen #trips .tr-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .tablet-screen #trips .tr-card { aspect-ratio: auto !important; }
  /* фото команды — крупно слева; справа цифры и под ними кнопки — колонка ровно по высоте фото */
  .tablet-screen #about .about-body { grid-template-columns: 300px 1fr !important; grid-template-rows: 1fr auto; gap: 0 22px !important; padding: 0 !important; }
  .tablet-screen #about .about-photo { grid-row: 1 / span 2; }
  .tablet-screen #about .about-stats { align-content: start; gap: 8px 10px; }   /* цифры — сверху плотно; кнопки (2-я строка сетки) — по низу фото */
  .tablet-screen #about .about-stats div { padding: 10px 14px 11px; }   /* текст — с отступом от левой рамки плашки */
  .tablet-screen #about .about-links { padding: 16px 0 0 !important; }
  .tablet-screen #about .about-photo { border: 1px solid rgba(110,220,120,.28); box-shadow: none; }
  .tablet-screen #about .about-stats dt { font-size: 28px; }
  .tablet-screen #about .about-stats dd { font-size: 13px; }
  .tablet-screen #reviews .rv-grid { grid-template-columns: 1.15fr 1fr 1fr !important; grid-template-rows: 150px 150px !important; padding: 0 !important; }
  .tablet-screen #reviews .rv-card:first-child { grid-row: span 2 !important; }
  .tablet-screen #reviews .rv-player { margin: 0 !important; }
  /* значок play: треугольник ровно по центру круга */
  .tablet-screen #reviews .rv-card .play::after { left: 50%; top: 50%; transform: translate(-35%, -50%); }
  /* единый стиль планшета: прямые углы (кнопки — со скосами, как у рамки); круглыми остаются только значки play и точки легенды */
  .tablet-screen .tb-content *:not(.play):not(.mp-legend i) { border-radius: 0 !important; }
  /* меню на планшете: качество, достижения, новая игра — в одном стиле с кнопками планшета */
  .tablet-screen #menu footer :is(select, #menu-achievements, #new-game) {
    height: 34px; box-sizing: border-box; padding: 0 14px; border: 1px solid rgba(255,204,105,.6) !important; background: rgba(23,37,30,.9) !important;
    color: #ffda88 !important; font: 700 12px/32px "Tektur", sans-serif !important; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
  .tablet-screen #menu footer :is(select, #menu-achievements, #new-game):hover { background: rgba(255,176,32,.2) !important; }
  .tablet-screen #menu footer select { padding-right: 8px; }
  .tablet-screen #menu footer label { font: 700 12px/1 "Tektur", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #cfd8c8; }
  /* прокрутка планшета — в стиле экрана: тонкая янтарная полоса с прямыми углами */
  .tablet-screen * { scrollbar-width: thin; scrollbar-color: #ffb020 rgba(0,0,0,.35); }
  .tablet-screen ::-webkit-scrollbar { width: 8px; height: 8px; }
  .tablet-screen ::-webkit-scrollbar-track { background: rgba(0,0,0,.35); border-left: 1px solid rgba(110,220,120,.2); }
  .tablet-screen ::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #ffc23a, #e8961c); border-radius: 0; }
  .tablet-screen ::-webkit-scrollbar-thumb:hover { background: #ffd35c; }
  .tablet-screen ::-webkit-scrollbar-button { display: none; }
  .tablet-screen .tb-back { margin-right: 12px; width: 30px; height: 26px; border: 1px solid rgba(255,176,32,.6); border-radius: 6px; background: rgba(255,176,32,.12); color: #ffb020; font: 700 17px/1 "Tektur", sans-serif; cursor: pointer; }
  .tablet-screen .tb-back:hover, .tablet-screen .tb-back:focus-visible { background: rgba(255,176,32,.3); color: #fff; outline: none; }
  .tablet-screen .tb-back[hidden] { display: none; }
  .tablet-screen .tb-title { display: flex; align-items: center; }

  /* ---------- HUD вне планшета — в стиле планшета: графитовый корпус, янтарная кромка, скосы, Tektur ---------- */
  #dashboard, #controls, #menu-button, #minimap {
    --hud-cut: 10px;
    clip-path: polygon(var(--hud-cut) 0, calc(100% - var(--hud-cut)) 0, 100% var(--hud-cut), 100% calc(100% - var(--hud-cut)), calc(100% - var(--hud-cut)) 100%, var(--hud-cut) 100%, 0 calc(100% - var(--hud-cut)), 0 var(--hud-cut));
  }
  #dashboard, #controls, #menu-button {
    border: 0 !important; border-radius: 0 !important; color: #e9e4d6 !important;
    background: linear-gradient(180deg, #34312d, #1f1d1a) !important;
    box-shadow: inset 0 0 0 1px #4a453e, inset 0 2px 0 #e8961c !important;
  }
  /* приборная панель */
  #dashboard { font-family: "Tektur", sans-serif !important; }
  #dashboard .lamp { border-radius: 0 !important; background: #13241a !important; color: #7f8f7c !important; box-shadow: inset 0 0 0 1px rgba(110,220,120,.18); }
  #dashboard .lamp.on { background: #1d3a24 !important; color: #e9f5e2 !important; box-shadow: inset 0 0 0 1px #48e05a !important; }
  #dashboard .lamp[data-lamp="boost"].on { box-shadow: inset 0 0 0 1px #ffb020 !important; }
  /* мотор заведён — лампа и клавиша E оранжевые */
  #dashboard .lamp[data-lamp="engine"].on { background: #ffb020 !important; color: #1a1205 !important; box-shadow: inset 0 0 0 1px #9a6400 !important; }
  #controls .key[data-code="KeyE"][aria-pressed="true"] { background: #ffb020 !important; color: #1a1205 !important; border-color: #9a6400 !important; }
  #controls .key[data-code="KeyE"][aria-pressed="true"] small { color: #3a2a05 !important; }
  #dashboard .throttle span { border-radius: 0 !important; background: #13241a !important; }
  #dashboard .readout small, #dashboard .throttle { color: #9fb09a !important; }
  /* управление */
  #controls { font-family: "Tektur", sans-serif !important; }
  #controls header b { color: #ffb020; }
  #controls .key {
    border-radius: 0 !important; color: #f0ead9 !important; background: #13241a !important;
    border: 1px solid rgba(110,220,120,.3) !important; border-bottom: 3px solid rgba(110,220,120,.3) !important;
    font-family: "Tektur", sans-serif !important;
  }
  #controls .key small { color: #8fa08b !important; }
  #controls .key.down { background: #ffb020 !important; color: #1a1205 !important; border-color: #9a6400 !important; }
  #controls .key.down small { color: #3a2a05 !important; }
  #controls .key[aria-pressed="true"] { background: #1d3a24 !important; border-color: #48e05a !important; }
  #controls .key[aria-pressed="true"] small { color: #9ff0a8 !important; }
  #controls .note { color: #8a8270 !important; }
  /* кнопка «Меню» */
  #menu-button { padding: 9px 16px !important; color: #ffda88 !important; font: 700 13px/1 "Tektur", sans-serif !important; letter-spacing: .08em; text-transform: uppercase; }
  #menu-button:hover { background: linear-gradient(180deg, #4a4339, #2a2621) !important; }
  /* миникарта: «стекло» в графитовой рамке со скосами */
  #minimap { border: 0 !important; border-radius: 0 !important; padding: 5px; background: linear-gradient(180deg, #34312d, #1f1d1a) !important;
    box-shadow: inset 0 0 0 1px #4a453e, inset 0 2px 0 #e8961c !important; }
  #minimap canvas { clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }
  #minimap canvas + canvas { left: 5px !important; top: 5px !important; }
  /* полоса времени суток — внутри плашки миникарты, под картой (переносится в #minimap при его создании) */
  #minimap #daybar { position: relative; right: auto; top: auto; width: 0; min-width: 100%; margin-top: 4px; clip-path: none; pointer-events: auto; }
  #minimap #daybar .marker { pointer-events: none; }
  #minimap.tappable { pointer-events: auto; cursor: pointer; }   /* касание — большая карта на планшете */
  /* плашка «Запчасти 4×4» — тот же корпус */
  #quest { border: 0 !important; border-radius: 0 !important; padding: 8px 16px 8px 14px !important; background: linear-gradient(180deg, #34312d, #1f1d1a) !important;
    box-shadow: inset 0 0 0 1px #4a453e, inset 0 2px 0 #e8961c !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    font: 700 12px/1 "Tektur", sans-serif !important; letter-spacing: .08em !important; text-transform: uppercase; color: #e9e4d6 !important;
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); }

  /* ---------- телефон: кнопки и джойстик — в стиле планшета (графит, янтарная кромка, скосы) ---------- */
  #touch-ui .tbtn, #touch-ui .tb-top button, #stick {
    --cut: 28%;
    clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
    border: 0 !important; border-radius: 0 !important;
  }
  #touch-ui .tbtn, #touch-ui .tb-top button {
    background: linear-gradient(180deg, rgba(52,49,45,.92), rgba(31,29,26,.92)) !important; color: #ffda88 !important;
    box-shadow: inset 0 0 0 2px #4a453e, inset 0 3px 0 #e8961c !important; font-family: "Tektur", sans-serif !important;
  }
  #touch-ui .tbtn small { color: #cfd8c8; }
  #touch-ui .tbtn.down { background: #ffb020 !important; color: #1a1205 !important; box-shadow: inset 0 0 0 2px #9a6400 !important; }
  #touch-ui .tbtn[aria-pressed="true"] { background: linear-gradient(180deg, #1d3a24, #13241a) !important; color: #9ff0a8 !important; box-shadow: inset 0 0 0 2px #48e05a !important; }
  #touch-ui .tbtn[data-code="KeyE"][aria-pressed="true"] { background: #ffb020 !important; color: #1a1205 !important; box-shadow: inset 0 0 0 2px #9a6400 !important; }   /* мотор заведён */
  #stick { --cut: 30%; background: rgba(31,29,26,.55) !important; box-shadow: inset 0 0 0 2px rgba(232,150,28,.55); }
  #stick.active { background: rgba(31,29,26,.75) !important; }
  #stick i { border-radius: 0 !important; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
    background: linear-gradient(180deg, #ffc23a, #e8961c) !important; box-shadow: none !important; }
  /* ---------- эпилог на вершине: полосы кино, интерфейс прячется ---------- */
  #cine { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
  #cine::before, #cine::after { content: ""; position: absolute; left: 0; right: 0; height: 11vh; background: #050806; transition: transform 1.2s cubic-bezier(.4,0,.2,1); }
  #cine::before { top: 0; transform: translateY(-100%); }
  #cine::after { bottom: 0; transform: translateY(100%); }
  #cine b { position: absolute; left: 0; right: 0; bottom: 3.5vh; text-align: center; font: 700 clamp(14px, 2.2vw, 22px)/1 "Tektur", sans-serif; letter-spacing: .3em;
    text-transform: uppercase; color: #ffda88; opacity: 0; transition: opacity 1.5s ease 1.2s; z-index: 1; }
  body.epilogue #cine::before, body.epilogue #cine::after { transform: none; }
  body.epilogue #cine b { opacity: 1; }
  body.epilogue :is(#dashboard, #controls, #minimap, #quest, #menu-button, #touch-ui, #key-prompt, #drive-hint, #limp-task) { opacity: 0 !important; pointer-events: none !important; transition: opacity .6s ease; }
  /* ---------- интро: сборка машины и открытие мира ---------- */
  body.intro #dashboard, body.intro #controls, body.intro #daybar, body.intro #minimap,
  body.intro #location-card, body.intro #expedition-stage, body.intro #drive-hint { opacity: 0 !important; pointer-events: none; }
  body.hud-in #dashboard, body.hud-in #controls, body.hud-in #daybar, body.hud-in #minimap,
  body.hud-in #location-card, body.hud-in #expedition-stage { animation: hud-in .8s ease both; }
  @keyframes hud-in { from { opacity: 0; } }
  /* ---------- окно «Фильмы экспедиций» на смотровой: стекло поверх сцены ---------- */
  #films, #about, #reviews, #trips, #portal, #race-finish, #gid, #kaizen {
    position: fixed; left: 18px; top: 18px; z-index: 14; width: min(460px, calc(100vw - 280px)); min-width: 300px;
    background: rgba(16, 24, 20, .26); border: 2px solid rgba(255,255,255,.45); border-radius: 18px; overflow: hidden; color: #fff;
    backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3);
    box-shadow: 0 14px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.35);
    transform: translateY(-14px) scale(.97); opacity: 0; pointer-events: none; transition: transform .35s cubic-bezier(.2,.9,.25,1.2), opacity .25s ease;
  }
  #films.open, #about.open, #reviews.open, #trips.open, #portal.open, #race-finish.open, #gid.open, #kaizen.open { transform: none; opacity: 1; pointer-events: auto; }
  body.intro #films, body.intro #about, body.intro #reviews, body.intro #trips, body.intro #portal, body.intro #gid, body.intro #kaizen, #films [hidden], #reviews [hidden], #trips [hidden] { display: none !important; }
  #films .films-head { position: relative; height: 80px; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
  #films .films-head svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
  #films .films-brand { position: absolute; left: 20px; top: 20px; display: flex; align-items: center; gap: 12px; }
  #films .films-brand b { display: block; font: 700 26px/1 "Tektur", sans-serif; }
  #films .films-brand small { display: block; margin-top: 4px; font: 700 15px/1 "Play", sans-serif; color: #eef4ea; }
  #films .yt, #reviews .yt { flex: none; width: 40px; height: 28px; border-radius: 8px; background: #e62117; position: relative; box-shadow: 0 2px 0 #9b1510; }
  #films .yt::after, #reviews .yt::after { content: ""; position: absolute; left: 15px; top: 8px; border-left: 12px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
  #films .films-close, #about .films-close, #reviews .films-close, #trips .films-close, #portal .films-close, #race-finish .films-close, #gid .films-close, #kaizen .films-close {
    position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; border-radius: 8px; border: 2px solid rgba(255,255,255,.55);
    background: rgba(255,255,255,.16); color: #fff; font: 700 16px/1 "Play", sans-serif; cursor: pointer;
  }
  #about .films-close { top: 14px; }
  #films .films-close:hover, #about .films-close:hover, #reviews .films-close:hover, #trips .films-close:hover, #portal .films-close:hover, #race-finish .films-close:hover, #gid .films-close:hover { background: rgba(255,255,255,.32); }
  #films .films-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 2px 16px 0; }
  #films .film {
    position: relative; aspect-ratio: 16 / 9; padding: 0; border: 2px solid rgba(255,255,255,.7); border-radius: 12px; overflow: hidden; cursor: pointer;
    background: #1d2521 center / cover no-repeat; box-shadow: 0 6px 16px rgba(0,0,0,.3); transition: transform .15s ease; text-align: left; color: #fff;
  }
  #films .film:hover, #films .film:focus-visible { transform: translateY(-3px); outline: none; }
  #films .film::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(8,14,12,.85)); }
  #films .film .play {
    position: absolute; left: 50%; top: 42%; z-index: 1; width: 56px; height: 40px; transform: translate(-50%, -50%); border-radius: 12px;
    background: #e62117; box-shadow: 0 4px 14px rgba(0,0,0,.4); transition: transform .15s ease;
  }
  #films .film .play::after { content: ""; position: absolute; left: 22px; top: 11px; border-left: 16px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
  #films .film:hover .play { transform: translate(-50%, -50%) scale(1.1); }
  #films .film b, #films .film small { position: absolute; left: 12px; right: 10px; z-index: 1; }
  #films .film b { bottom: 26px; font: 700 16px/1.1 "Tektur", sans-serif; text-shadow: 0 2px 4px rgba(0,0,0,.6); }
  #films .film small { bottom: 9px; font: 400 11.5px/1.1 "Play", sans-serif; color: #e8ecdf; }
  #films .films-player { margin: 2px 16px 0; }
  #films .films-player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; }
  #films .films-back { margin-top: 8px; padding: 6px 12px; border: 2px solid rgba(255,255,255,.55); border-radius: 8px; background: rgba(255,255,255,.16); color: #fff; font: 700 12px/1 "Play", sans-serif; cursor: pointer; }
  #films footer { position: relative; height: 66px; display: grid; place-items: center; }
  #films footer svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .3; }
  #films .films-watch, #reviews .films-watch {
    position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 10px 24px 10px 14px; border-radius: 10px;
    background: linear-gradient(#e8473b, #c92d22); color: #fff; text-decoration: none; font: 700 18px/1 "Play", sans-serif;
    box-shadow: 0 4px 0 #8d1b14, 0 6px 14px rgba(0,0,0,.25); border: 2px solid #f0776e;
  }
  #films .films-watch .yt, #reviews .films-watch .yt { width: 34px; height: 24px; background: #fff; box-shadow: none; }
  #films .films-watch .yt::after, #reviews .films-watch .yt::after { left: 13px; top: 6px; border-left-color: #e62117; border-left-width: 11px; border-top-width: 6px; border-bottom-width: 6px; }
  #films .films-watch:hover, #reviews .films-watch:hover { filter: brightness(1.08); }
  @media (max-width: 760px) { #films { width: calc(100vw - 24px); left: 12px; top: 12px; } #films .films-brand { left: 16px; } }

  /* окно «О TravelMind» в лагере: цифры как на слайде, фото команды */
  #about .about-head { display: flex; align-items: center; gap: 12px; padding: 18px 56px 0 18px; }
  #about .about-head img { height: 30px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
  #about .about-head span { font: 700 11px/1 "Play", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #ffd27a; }
  #about h3 { margin: 14px 18px 6px; font: 700 26px/1.05 "Tektur", sans-serif; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
  #about .about-lead { margin: 0 18px 14px; font: 400 13px/1.35 "Play", sans-serif; color: #eef4ea; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
  #about .about-body { display: grid; grid-template-columns: 132px 1fr; gap: 14px; padding: 0 18px 18px; }
  #about .about-photo { width: 100%; aspect-ratio: 480 / 630; object-fit: cover; border-radius: 12px; border: 2px solid rgba(255,255,255,.7); box-shadow: 0 6px 16px rgba(0,0,0,.3); }
  #about .about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin: 0; align-content: start; }
  #about .about-stats div { padding: 8px 0 9px; border-top: 1px solid rgba(255,255,255,.4); }
  #about .about-stats dt { font: 700 24px/1 "Tektur", sans-serif; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
  #about .about-stats dd { margin: 5px 0 0; font: 400 11px/1.2 "Play", sans-serif; color: #e6eee2; }
  #about .about-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 18px 18px; }
  #about .social {
    display: flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 12px; border-radius: 10px;
    color: #fff; text-decoration: none; font: 700 15px/1 "Play", sans-serif; border: 2px solid rgba(255,255,255,.35);
    box-shadow: 0 4px 0 rgba(0,0,0,.28), 0 6px 14px rgba(0,0,0,.2); transition: transform .15s ease, filter .15s ease;
  }
  #about .social svg { width: 20px; height: 20px; flex: none; }
  #about .social:hover, #about .social:focus-visible { transform: translateY(-2px); filter: brightness(1.08); outline: none; }
  #about .social.tg { background: linear-gradient(#37aee2, #1e96c8); }
  #about .social.ig { background: linear-gradient(45deg, #f9ce34 0%, #ee2a7b 45%, #6228d7 100%); }
  @media (max-width: 760px) { #about { width: calc(100vw - 24px); left: 12px; top: 12px; } #about .about-body { grid-template-columns: 100px 1fr; } }

  /* окно «Отзывы участников» в лагере у озера: сетка как на сайте, первое фото — большое */
  #reviews { width: min(620px, calc(100vw - 280px)); }
  #reviews .films-close { top: 14px; }
  #reviews .rv-head { padding: 16px 56px 0 18px; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
  #reviews .rv-head span { font: 700 11px/1 "Play", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #ffd27a; }
  #reviews .rv-head h3 { margin: 8px 0 6px; font: 700 24px/1.05 "Tektur", sans-serif; }
  #reviews .rv-head p { margin: 0 0 12px; font: 400 12.5px/1.35 "Play", sans-serif; color: #eef4ea; }
  #reviews .rv-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; grid-template-rows: 124px 124px; gap: 8px; padding: 0 18px; }
  #reviews .rv-card {
    position: relative; padding: 0; border: 2px solid rgba(255,255,255,.65); border-radius: 12px; overflow: hidden; cursor: pointer;
    background: #1d2521 center / cover no-repeat; color: #fff; text-align: left; transition: transform .15s ease;
  }
  #reviews .rv-card:first-child { grid-row: span 2; }
  #reviews .rv-card:hover, #reviews .rv-card:focus-visible { transform: translateY(-3px); outline: none; }
  #reviews .rv-card::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(8,14,12,.88)); }
  #reviews .rv-card i { position: absolute; left: 9px; top: 7px; z-index: 1; font: 700 10px/1 "Play", sans-serif; font-style: normal; opacity: .8; }
  #reviews .rv-card .play {
    position: absolute; right: 8px; top: 8px; z-index: 1; width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid #fff; background: rgba(0,0,0,.25); transition: background .15s ease;
  }
  #reviews .rv-card .play::after { content: ""; position: absolute; left: 9px; top: 6px; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
  #reviews .rv-card:hover .play { background: #e62117; border-color: #e62117; }
  #reviews .rv-text { position: absolute; left: 10px; right: 8px; bottom: 8px; z-index: 1; display: flex; flex-direction: column; gap: 3px; }
  #reviews .rv-card b { font: 700 14px/1.05 "Tektur", sans-serif; text-shadow: 0 2px 4px rgba(0,0,0,.6); }
  #reviews .rv-card:first-child b { font-size: 17px; }
  #reviews .rv-card small { font: 400 10px/1.15 "Play", sans-serif; color: #e3e9de; }
  #reviews .rv-player { margin: 0 18px; }
  #reviews .rv-player video, #reviews .rv-player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; }
  #reviews .rv-player .rv-caption { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 400 12px/1.2 "Play", sans-serif; }
  #reviews .rv-player .rv-caption b { font: 700 14px/1.1 "Tektur", sans-serif; }
  #reviews .rv-external {
    display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; text-decoration: none;
    background: #111 center / cover no-repeat; box-shadow: inset 0 0 0 999px rgba(0,0,0,.35);
  }
  #reviews .rv-external span {
    padding: 11px 20px; border-radius: 10px; color: #fff; font: 700 16px/1 "Play", sans-serif;
    background: linear-gradient(#1ab7ea, #0f8fbd); box-shadow: 0 4px 0 #0a6788, 0 6px 14px rgba(0,0,0,.3);
  }
  #reviews .rv-external:hover span { filter: brightness(1.08); }
  #reviews .rv-back { padding: 6px 12px; border: 2px solid rgba(255,255,255,.55); border-radius: 8px; background: rgba(255,255,255,.16); color: #fff; font: 700 12px/1 "Play", sans-serif; cursor: pointer; }
  #reviews footer { display: grid; place-items: center; padding: 14px 18px 16px; }
  /* окно «Ближайшие путешествия» в лагере перед горой: три афиши и заявка */
  #trips { width: min(660px, calc(100vw - 280px)); max-height: calc(100vh - 36px); overflow-y: auto; }
  #trips .films-close { top: 14px; }
  #trips .tr-head { padding: 16px 56px 0 18px; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
  #trips .tr-head span { font: 700 11px/1 "Play", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #ffd27a; }
  #trips .tr-head h3 { margin: 8px 0 6px; font: 700 24px/1.05 "Tektur", sans-serif; }
  #trips .tr-head p { margin: 0 0 12px; font: 400 12.5px/1.35 "Play", sans-serif; color: #eef4ea; }
  #trips .tr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 18px 18px; }
  /* карточка: крупное фото сверху (на нём только дата), под ним — текст и кнопка, без наложения */
  #trips .tr-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(110,220,120,.28); background: rgba(255,255,255,.04); }
  #trips .tr-photo { position: relative; aspect-ratio: 4 / 3; background: #1d2521 center / cover no-repeat; }
  #trips .tr-date { position: absolute; left: 8px; top: 8px; padding: 5px 8px; background: rgba(10,16,14,.75); font: 700 11px/1 "Play", sans-serif; letter-spacing: .03em; }
  #trips .tr-info { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 10px 12px 12px; }
  #trips .tr-card b { font: 700 18px/1.1 "Tektur", sans-serif; }
  #trips .tr-card small { font: 700 11px/1.2 "Play", sans-serif; color: #ffd27a; }
  #trips .tr-card p { flex: 1; margin: 0; font: 400 12px/1.4 "Play", sans-serif; color: #e3e9de; }
  #trips .tr-buttons { display: flex; gap: 6px; margin-top: 6px; }
  #trips .tr-apply {
    flex: 1; padding: 8px 10px; border: 2px solid #ffc75a; border-radius: 9px; background: linear-gradient(#ffb020, #e89400); color: #1f1402;
    font: 700 13px/1 "Play", sans-serif; box-shadow: 0 3px 0 #a86f00; cursor: pointer; text-align: center; text-decoration: none;
  }
  #trips .tr-apply:hover { filter: brightness(1.08); }
  /* витрина багги: заголовок, подписи к частям с пунктирными выносками, подсказка */
  #showcase { position: fixed; inset: 0; z-index: 12; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
  #showcase.open { opacity: 1; }
  #showcase .sc-head { position: absolute; left: 5vw; top: 5vh; max-width: min(640px, 60vw); color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.55); }
  #showcase h2 { margin: 0 0 12px; font: 700 clamp(34px, 4.4vw, 58px)/1 "Tektur", sans-serif; }
  #showcase .sc-head p { margin: 0; font: 400 clamp(14px, 1.35vw, 19px)/1.4 "Play", sans-serif; }
  #showcase .sc-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  #showcase .sc-lines line { stroke: #fff; stroke-width: 2; stroke-dasharray: 6 5; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
  #showcase .sc-lines circle { fill: #f5c518; stroke: #1c1c1c; stroke-width: 1.5; }
  #showcase .sc-lines text { fill: #1c1c1c; font: 700 14px/1 "Play", sans-serif; text-anchor: middle; dominant-baseline: central; }
  #showcase .sc-card {
    position: absolute; transition: opacity .35s ease, transform .2s ease, box-shadow .2s ease; width: min(300px, 26vw); padding: 14px 18px; border-radius: 12px; background: #fff; color: #1d2126;
    font: 400 14.5px/1.35 "Play", sans-serif; box-shadow: 0 8px 22px rgba(0,0,0,.25);
    opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease;
  }
  #showcase.parts .sc-card { opacity: 1; transform: none; pointer-events: auto; cursor: default; }
  #showcase .sc-card.hot { box-shadow: 0 0 0 3px #f5c518, 0 10px 26px rgba(0,0,0,.3); transform: scale(1.03); }
  #showcase .sc-hint {
    position: absolute; left: 50%; bottom: 4vh; transform: translateX(-50%); padding: 10px 18px; border-radius: 99px;
    background: rgba(16,24,20,.55); color: #eef4ea; font: 400 14px/1 "Play", sans-serif; white-space: nowrap;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  }
  #showcase .sc-hint b { color: #f5c518; }
  body.showcasing #dashboard, body.showcasing #controls, body.showcasing #minimap, body.showcasing #daybar,
  body.showcasing #location-card, body.showcasing #expedition-stage { opacity: 0; pointer-events: none; transition: opacity .4s ease; }
  @media (max-width: 760px) { #showcase .sc-card { width: 42vw; font-size: 12px; padding: 10px 12px; } #showcase .sc-head p { display: none; } }
  /* кольцевой заезд: таймер сверху по центру и окно финиша с таблицей лидеров */
  #race-timer {
    position: fixed; left: 50%; top: 14px; z-index: 13; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 20px 9px; border-radius: 14px; background: rgba(16, 24, 20, .42); border: 2px solid rgba(255,255,255,.45); color: #fff;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-shadow: 0 2px 6px rgba(0,0,0,.5); pointer-events: none;
  }
  #race-timer[hidden] { display: none; }
  #race-timer span { font: 700 10px/1 "Play", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #ffd27a; }
  #race-timer b { font: 700 30px/1 "Tektur", sans-serif; font-variant-numeric: tabular-nums; }
  #race-timer i { font: 700 12px/1 "Play", sans-serif; font-style: normal; letter-spacing: .3em; color: #cfe8d0; }
  #race-finish { width: min(400px, calc(100vw - 280px)); left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.97); }
  #race-finish.open { transform: translate(-50%, -50%); }
  #race-finish .films-close { top: 14px; }
  #race-finish .rf-head { padding: 16px 56px 0 18px; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
  #race-finish .rf-head span { font: 700 11px/1 "Play", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #ffd27a; }
  #race-finish .rf-head h3 { margin: 8px 0 4px; font: 700 26px/1 "Tektur", sans-serif; }
  #race-finish .rf-time { padding: 4px 18px 12px; display: flex; align-items: baseline; gap: 12px; }
  #race-finish .rf-time b { font: 700 40px/1 "Tektur", sans-serif; font-variant-numeric: tabular-nums; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
  #race-finish .rf-time small { font: 400 12px/1.3 "Play", sans-serif; color: #eef4ea; }
  #race-finish .rf-form { display: flex; gap: 8px; padding: 0 18px; }
  #race-finish [hidden] { display: none !important; }
  #race-finish input { flex: 1; min-width: 0; padding: 10px 12px; border: 2px solid rgba(255,255,255,.5); border-radius: 10px; background: rgba(10,16,14,.55); color: #fff; font: 400 15px/1.2 "Play", sans-serif; }
  #race-finish input:focus-visible { outline: 2px solid #ffb020; outline-offset: 1px; }
  #race-finish .rf-save, #race-finish .rf-again {
    padding: 10px 16px; border: 2px solid #ffc75a; border-radius: 10px; background: linear-gradient(#ffb020, #e89400); color: #1f1402;
    font: 700 14px/1 "Play", sans-serif; box-shadow: 0 3px 0 #a86f00; cursor: pointer;
  }
  #race-finish .rf-save:disabled { opacity: .6; cursor: default; }
  #race-finish .rf-status { margin: 8px 18px 0; min-height: 1em; font: 400 12.5px/1.3 "Play", sans-serif; color: #ffd27a; }
  #race-finish .rf-board { margin: 8px 18px 0; padding: 0; list-style: none; counter-reset: place; max-height: 250px; overflow-y: auto; }
  #race-finish .rf-board li { counter-increment: place; display: flex; gap: 10px; padding: 6px 8px; border-top: 1px solid rgba(255,255,255,.18); font: 400 13.5px/1.2 "Play", sans-serif; }
  #race-finish .rf-board li::before { content: counter(place); width: 20px; color: #ffd27a; font-weight: 700; }
  #race-finish .rf-board li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #race-finish .rf-board li b { font-variant-numeric: tabular-nums; }
  #race-finish .rf-board li.me { border-radius: 8px; background: rgba(255,176,32,.28); }
  #race-finish .rf-board:empty::after { content: "Пока нет результатов — стань первым!"; display: block; padding: 8px; color: #cfd8cb; font: 400 12.5px/1.3 "Play", sans-serif; }
  #race-finish .rf-actions { display: flex; justify-content: flex-end; padding: 12px 18px 16px; }
  #race-finish .rf-again { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.16); color: #fff; box-shadow: none; }
  body.intro #race-timer, body.intro #race-finish { display: none !important; }
  /* окно портала на вершине: экспедиция пройдена, дальше — следующая локация */
  #portal { width: min(460px, calc(100vw - 280px)); }
  #portal .films-close { top: 14px; }
  #portal .pt-head { padding: 16px 56px 0 18px; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
  #portal .pt-head span { font: 700 11px/1 "Play", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #9fe2ff; }
  #portal .pt-head h3 { margin: 8px 0 6px; font: 700 24px/1.08 "Tektur", sans-serif; }
  #portal .pt-head p { margin: 0 0 12px; font: 400 12.5px/1.35 "Play", sans-serif; color: #eef4ea; }
  #portal .pt-next {
    position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; margin: 0 18px; aspect-ratio: 16 / 8; padding: 12px;
    border: 2px solid rgba(255,255,255,.7); border-radius: 12px; overflow: hidden; background: #1d2521 url(img/menu/Namibia.webp) center / cover no-repeat;
  }
  #portal .pt-next::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(8,14,12,.9)); }
  #portal .pt-next > * { position: relative; z-index: 1; }
  #portal .pt-next i { position: absolute; left: 10px; top: 10px; padding: 5px 9px; border-radius: 99px; background: rgba(16,24,20,.65); font: 700 10.5px/1 "Play", sans-serif; font-style: normal; letter-spacing: .1em; text-transform: uppercase; }
  #portal .pt-next b { font: 700 20px/1 "Tektur", sans-serif; }
  #portal .pt-next small { font: 400 11.5px/1.3 "Play", sans-serif; color: #e3e9de; }
  #portal .pt-actions { display: flex; gap: 10px; padding: 14px 18px 8px; }
  #portal .pt-actions button { flex: 1; padding: 10px 12px; border-radius: 10px; font: 700 14px/1 "Play", sans-serif; cursor: pointer; }
  #portal .pt-stay { border: 2px solid rgba(255,255,255,.55); background: rgba(255,255,255,.16); color: #fff; }
  #portal .pt-actions button:hover { filter: brightness(1.08); }
  #portal .pt-real { display: block; padding: 4px 18px 16px; color: #ffd27a; font: 400 12px/1.3 "Play", sans-serif; }
  @media (max-width: 760px) { #portal { width: calc(100vw - 24px); left: 12px; top: 12px; } }
  @media (max-width: 760px) { #trips { width: calc(100vw - 24px); left: 12px; top: 12px; } #trips .tr-grid { grid-template-columns: 1fr; } }
  @media (max-width: 760px) { #reviews { width: calc(100vw - 24px); left: 12px; top: 12px; } #reviews .rv-grid { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 110px); } #reviews .rv-card:first-child { grid-row: auto; } }

  /* подсказки над машиной: E до первого запуска, F на осыпи, Shift — ускорение */
  #engine-prompt, #key-prompt {
    position: fixed; left: 0; top: 0; z-index: 12; display: none; flex-direction: column; align-items: center; gap: 7px;
    transform: translate(-50%, -100%); padding: 0; border: 0; background: none; cursor: pointer; color: #fff4d6;
    font: 700 11px/1 "Play", sans-serif; letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 2px 6px rgba(0,0,0,.7);
  }
  #engine-prompt.visible, #key-prompt.visible { display: flex; animation: prompt-in .6s ease both; }
  #engine-prompt b, #key-prompt b {
    position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 11px;
    color: #2a1c00; background: linear-gradient(#ffe08a, #ffb020); border: 3px solid #fff4d6;
    font: 700 24px/1 "Tektur", sans-serif; box-shadow: 0 4px 0 #a86f00, 0 0 22px 6px rgba(255,176,32,.75);
    animation: prompt-glow 1.4s ease-in-out infinite;
  }
  #engine-prompt b::after, #key-prompt b::after {
    content: ""; position: absolute; inset: -9px; border-radius: 16px; border: 2px solid rgba(255,208,110,.9);
    animation: prompt-ring 1.4s ease-out infinite;
  }
  #key-prompt b { width: auto; min-width: 46px; padding: 0 12px; }
  #key-prompt[data-key="Shift"] { cursor: default; }
  @keyframes prompt-glow { 50% { box-shadow: 0 4px 0 #a86f00, 0 0 34px 12px rgba(255,176,32,.95); transform: translateY(-3px); } }
  @keyframes prompt-ring { from { opacity: 1; transform: scale(.85); } to { opacity: 0; transform: scale(1.35); } }
  @keyframes prompt-in { from { opacity: 0; } }
  #intro-caption {
    position: fixed; left: 50%; bottom: 13vh; z-index: 25; transform: translateX(-50%); text-align: center;
    color: #f6f1de; pointer-events: none; opacity: 0; transition: opacity .6s ease;
    text-shadow: 0 2px 12px rgba(0,0,0,.6);
  }
  #intro-caption.visible { opacity: 1; }
  #intro-caption span { display: block; color: #ffb020; font: 700 11px/1 "Play", sans-serif; letter-spacing: .3em; text-transform: uppercase; }
  #intro-caption b { display: block; margin: 10px 0 8px; font: 700 32px/1 "Tektur", sans-serif; }
  #intro-caption small { color: #a9b39f; font: 700 11px/1 "Play", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
