/* Memory_Save.lv — скелет. Mobile-first. Чёрный фон, пиксельные окна и кнопки. Шрифтов два: Press Start 2P (большие заголовки) и Handjet (всё остальное) */

/* Handjet — пиксельный, но читаемый; узкий, поэтому увеличен на уровне шрифта (size-adjust) */
@font-face { font-family: 'Handjet UI'; src: url(fonts/handjet-cyrillic.woff2) format('woff2'); font-weight: 100 900; font-display: swap; size-adjust: 128%;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Handjet UI'; src: url(fonts/handjet-latin.woff2) format('woff2'); font-weight: 100 900; font-display: swap; size-adjust: 128%;
  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; }

/* знаки валют ₸ и ₽: в файлах Handjet на сайте их нет, берём из того же Handjet с Google Fonts (тот же масштаб 128 %).
   Лучше положить этот файл рядом в fonts/ и заменить адрес на локальный */
@font-face { font-family: 'Handjet UI'; src: url(https://fonts.gstatic.com/s/handjet/v23/oY108eXHq7n1OnbQrOY_2FrEwYEMLlcdP1mCtZaLaTutCwcIhGZelk3Fgt0.woff2) format('woff2'); font-weight: 100 900; font-display: swap; size-adjust: 128%;
  unicode-range: U+20B8, U+20BD, U+20B4, U+20AE; }

:root {
  --bg: #000;
  --fg: #F2F2F2;
  --muted: #B4B4BA;
  --line: #2E2E33;
  --tile: #0E0E10;
  --acc: #FFD25A;        /* жёлтый, как папка с воспоминаниями */
  --acc-lo: #D99A1E;
  --acc-hi: #FFE9A6;
  --ok: #3DDC97;
  --f-ui: 'Handjet UI', ui-monospace, monospace;        /* надписи интерфейса: тот же Handjet, жирный */
  --f-pix: var(--f-ui);                                  /* старое имя переменной, оставлено для совместимости */
  --f-big: 'Press Start 2P', 'Courier New', monospace;   /* большие заголовки. Сетка шрифта 8 px: ставить только в кеглях, кратных 8 (16, 24, 32, 40, 48), иначе пиксели плывут */
  --f-mono: 'Handjet UI', ui-monospace, monospace;
  --f-read: 'Handjet UI', ui-monospace, monospace;
  --dock-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --n: 3px;              /* размер «ступеньки» в углах */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 500 15px/1.45 var(--f-mono);
  padding-bottom: calc(var(--dock-h) + 24px + var(--safe-b));
  overflow-x: hidden;
}
img, canvas { image-rendering: pixelated; }
a { color: inherit; }
::selection { background: var(--acc); color: #000; }

/* ступенчатые углы для окон, кнопок и плиток */
.btn, .pill, .dock, .finder, .save-win, .dialog, .talk, .qr-card, .phone, .toast, .ach, .pack, .inv button, .faq details, .steps li, .lobby li, .slot-mini, .tape-screen, .phone-screen, .scene:not(.scene-fill), .ba, .rv-tabs button {
  clip-path: polygon(var(--n) 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) var(--n), 100% var(--n), 100% calc(100% - var(--n)), calc(100% - var(--n)) calc(100% - var(--n)), calc(100% - var(--n)) 100%, var(--n) 100%, var(--n) calc(100% - var(--n)), 0 calc(100% - var(--n)), 0 var(--n), var(--n) var(--n));
}

h2 { font: 400 24px/1.3 var(--f-big); letter-spacing: 0; word-spacing: -.375em; margin: 0 0 24px; }      /* пробел у шрифта шириной в букву: сужаем на 3 пикселя шрифта */
@media (min-width: 720px) { h2 { font-size: 32px; } }
@media (min-width: 960px) { h2 { font-size: 40px; } }
@media (min-width: 1200px) { h2 { font-size: 48px; line-height: 1.2; } }
.sub { display: block; word-spacing: 0; font: 500 17px/1.35 var(--f-mono); color: #C8C8CE; letter-spacing: 0; margin-top: 12px; }
.lead { font: 500 18px/1.4 var(--f-read); margin: 0 0 6px; }
.dim { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.row.end { justify-content: flex-end; }
.row.center, .center { justify-content: center; text-align: center; }
.kicker { font: 700 16px var(--f-ui); color: var(--acc); margin: 0 0 14px; }
.pix { display: inline-block; line-height: 0; }
.pix svg { display: block; }
.ico { display: block; image-rendering: pixelated; flex: none; }

/* ---------- секции ---------- */
section { position: relative; padding: 64px 0; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; position: relative; z-index: 1; }
.two { display: grid; gap: 28px; align-items: center; }

/* ---------- окно: рамка и шапка из PixelLab (assets/ui), пиксели ×2 ---------- */
.win {
  position: relative; background: #1A1A1C; color: var(--fg);
  border-style: solid; border-width: 0 16px 20px 16px;
  border-image: url(assets/ui/win-frame.png) 0 8 10 8 / 0 16px 20px 16px stretch;
  image-rendering: pixelated;
}
.win-bar {
  position: relative; height: 46px; margin: 0 -16px; display: flex; align-items: center; justify-content: center; padding: 14px 104px 2px 52px;
  background: url(assets/ui/bar-left.png) left top / 48px 46px no-repeat, url(assets/ui/bar-right.png) right top / 100px 46px no-repeat, url(assets/ui/bar-mid.png) left top / 2px 46px repeat-x;
  image-rendering: pixelated; color: #000; font: 700 16px/1 var(--f-ui); white-space: nowrap; user-select: none;
}
.wb-title { background: #D6D6DA; padding: 3px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.wb-close, .wb-min { position: absolute; top: 12px; width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; }
.wb-close { left: 18px; }
.wb-min { right: 76px; }
.wb-close:active, .wb-min:active { background: rgba(0,0,0,.25); }
.win.min > :not(.win-bar) { display: none; }
.win.min { border-bottom-width: 20px; }
.save-bar::before, .save-bar::after {
  content: ''; flex: 1; min-width: 12px; height: 9px;
  background: repeating-linear-gradient(0deg, #000 0 1px, transparent 1px 2px);
}
.save-bar {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  background: var(--fg); color: #000; font: 700 16px/1 var(--f-ui); white-space: nowrap; user-select: none;
}
.win-body { padding: 14px; }
.win-status { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 14px; font-size: 12px; color: var(--muted); border-top: 2px dashed var(--line); }
.toast { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 30px + var(--safe-b)); translate: -50% 0; z-index: 100; background: var(--fg); color: #000; padding: 12px 16px; font: 700 16px var(--f-ui); width: max-content; max-width: calc(100% - 32px); }

/* плитки внутри окон */
.pack, .inv button, .faq details, .steps li, .lobby li, .slot-mini, .ach { background: var(--tile); border: 2px solid var(--line); color: var(--fg); --n: 2px; }

/* ---------- пиксельные кнопки ---------- */
.btn, .pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none;
  min-height: 50px; padding: 12px 20px; border: 0;
  font: 700 18px/1 var(--f-ui); background: var(--fg); color: #000;
  box-shadow: inset -3px -3px 0 #9A9AA0, inset 3px 3px 0 #fff;
}
.btn-rec, .pill-rec { background: var(--acc); box-shadow: inset -3px -3px 0 var(--acc-lo), inset 3px 3px 0 var(--acc-hi); }
.btn:active, .pill:active { box-shadow: inset 3px 3px 0 #9A9AA0, inset -3px -3px 0 #fff; translate: 1px 1px; }
.btn-rec:active, .pill-rec:active { box-shadow: inset 3px 3px 0 var(--acc-lo), inset -3px -3px 0 var(--acc-hi); }
.btn-sm, .pill-sm { min-height: 40px; padding: 8px 14px; font-size: 15px; }
.btn:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px dashed var(--acc); outline-offset: 3px; }
.row-cta .btn { flex: 1 1 100%; }
.link { background: none; border: 0; color: var(--muted); font: 700 16px var(--f-ui); text-decoration: underline; cursor: pointer; margin-top: 36px; min-height: 44px; }

/* заглушка: только для настоящего фото */
.ph { display: flex; align-items: center; justify-content: center; text-align: center; font: 700 15px/1.3 var(--f-ui); color: var(--muted); border: 2px dashed var(--line); background: repeating-conic-gradient(rgba(255,255,255,.04) 0 25%, transparent 0 50%) 0 0 / 12px 12px; }

/* живые сценки из спрайтов */
.scene { display: block; width: 100%; aspect-ratio: 16 / 9; background: #050506; border: 2px solid var(--line); margin-bottom: 14px; --n: 2px; }
.scene-fill { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border: 0; margin: 0; background: transparent; }

/* ================= ЗАГРУЗЧИК ================= */
html.booting, html.booting body { overflow: hidden; }
.boot { position: fixed; inset: 0; z-index: 200; background: #000; display: grid; place-items: center; cursor: pointer; overflow: hidden; }
.boot.leaving { background: transparent; }
.boot-static { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; image-rendering: pixelated; z-index: 2; }
.pc { position: relative; opacity: 0; filter: brightness(.45); transition: opacity .6s steps(6), filter .25s steps(2); }
.pc.in { opacity: 1; }
.pc.power { filter: none; }
.pc.zoom { transition: transform .7s cubic-bezier(.7, 0, .9, .4), filter .7s; filter: brightness(1.4); }
.pc-img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.pc-led { position: absolute; background: #2A2A2A; }
.pc.power .pc-led { background: #3DDC97; box-shadow: 0 0 6px 2px rgba(61, 220, 151, .7); }
.pc-screen { position: absolute; overflow: hidden; background: #050806; opacity: 0; }
.pc-screen.on { opacity: 1; animation: crt-boot .6s steps(8) both; }
@keyframes crt-boot { 0% { clip-path: inset(49% 0 49% 0); filter: brightness(5); } 40% { clip-path: inset(49% 0 49% 0); filter: brightness(3); } 100% { clip-path: inset(0); filter: none; } }
.pc-screen { border-radius: 7% / 10%; background: #000; }
.pc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* блик на выпуклом стекле */
.pc-screen::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(ellipse 70% 55% at 28% 18%, rgba(255,255,255,.10), transparent 60%), radial-gradient(ellipse at center, transparent 62%, rgba(0,0,0,.6) 100%); }
.boot-skip { position: absolute; bottom: calc(24px + var(--safe-b)); left: 0; right: 0; margin: 0; text-align: center; font: 700 15px var(--f-ui); color: #55555B; }
.boot.leaving .boot-skip { opacity: 0; }

/* ================= 1. ПЕРВЫЙ ЭКРАН ================= */
.hero { position: relative; height: 100svh; min-height: 600px; padding: 0; overflow: hidden; background: #000; }
/* у Press Start 2P пробел шириной в букву: в коротких надписях этим шрифтом сужаем его на 3 пикселя шрифта */
.calc-sum b, .guar .g b, .off-screen, .demo-paused { word-spacing: -.375em; }
/* --- слайдер первого экрана: видео на весь экран.
   Вертикальный экран: заголовок и строка сверху под шапкой (герои внизу кадра остаются на виду), кнопка и шкала слайдов в самом низу.
   Альбомный экран: текст и кнопка слева внизу поверх видео, шкала по нижнему краю. --- */
.hx { position: relative; display: block; height: 100svh; min-height: 560px; }
.hx-stage { position: absolute; inset: 0; }
/* обложка первого слайда — фоном: видна сразу, до загрузки видео и скриптов. Под видео 112px чёрного под кнопку и шкалу */
.hx-media { position: absolute; inset: 0 0 112px 0; overflow: hidden; background: #000 url(assets/hero-slides/kuat-m.jpg) 50% 100% / cover no-repeat; }
.hx-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s linear; }
.hx-slide.on { opacity: 1; }
/* если экран шире кадра 9:16 (планшет), лишнее срезается сверху: герои стоят у нижнего края */
.hx-slide video, .hx-slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; image-rendering: auto; }
.hx-media::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(0,0,0,.84) 0, rgba(0,0,0,.6) 20%, transparent 44%), linear-gradient(to top, #000 0, transparent 7%); }
.hx .hero-top { padding: 10px 14px; }
.hx .hero-top .pill { min-height: 34px; padding: 6px 10px; font-size: 15px; }
.hx-logo { display: block; width: 100px; height: auto; image-rendering: pixelated; }
.hx-nav { display: none; }
/* WhatsApp и Instagram в шапке: пиксельные иконки 16×16 */
.hx-social { display: flex; margin: 0 4px 0 auto; }
.hx-social a { display: grid; place-items: center; width: 40px; height: 40px; }
.hx-social img { display: block; width: 24px; height: 24px; image-rendering: pixelated; filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)); }
.hx-social a:hover, .hx-social a:focus-visible { background: var(--acc); }
.hx-social a:hover img, .hx-social a:focus-visible img { filter: invert(1); }
.hx-text { position: absolute; z-index: 5; inset: 66px 16px 50px 16px; display: flex; flex-direction: column; pointer-events: none; }
.hx-text > * { pointer-events: auto; }
.hx-title { margin: 0; font: 400 24px/1.3 var(--f-big); letter-spacing: 0; word-spacing: -.375em; text-shadow: 0 3px 0 rgba(0,0,0,.55); }
.hx-sub { margin: 10px 0 0; max-width: 21em; font: 500 16px/1.35 var(--f-read); color: #E6E6EA; text-shadow: 0 1px 0 rgba(0,0,0,.7), 0 0 12px rgba(0,0,0,.6); }
.hx-text.swap .hx-title, .hx-text.swap .hx-sub { opacity: 0; }
.hx-title, .hx-sub { transition: opacity .25s linear; }
.hx-cta { display: flex; margin-top: auto; filter: drop-shadow(4px 4px 0 rgba(0,0,0,.75)); }
/* главная кнопка: карта памяти, надпись и цена в тёмной плашке; раз в несколько секунд по ней пробегает блик */
.hx-go { --n: 4px; position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 10px 8px 14px; text-decoration: none; cursor: pointer;
  font: 700 24px/1 var(--f-ui); color: #000; background: var(--acc); box-shadow: inset -4px -4px 0 var(--acc-lo), inset 4px 4px 0 var(--acc-hi);
  clip-path: polygon(var(--n) 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) var(--n), 100% var(--n), 100% calc(100% - var(--n)), calc(100% - var(--n)) calc(100% - var(--n)), calc(100% - var(--n)) 100%, var(--n) 100%, var(--n) calc(100% - var(--n)), 0 calc(100% - var(--n)), 0 var(--n), var(--n) var(--n));
  transition: translate .12s steps(2); }
.hx-go img { display: block; width: 32px; height: 32px; image-rendering: pixelated; }
.hx-go-price { font-style: normal; font-size: 18px; white-space: nowrap; color: var(--acc); background: #000; padding: 12px 12px 11px; margin-left: 4px; }
.hx-go-price[hidden] { display: none; }
.hx-go::after { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 22%; background: rgba(255,255,255,.55); transform: skewX(-24deg); animation: hx-glint 4.6s steps(9) infinite; pointer-events: none; }
@keyframes hx-glint { 0%, 78% { left: -40%; } 100% { left: 130%; } }
.hx-go:hover, .hx-go:focus-visible { translate: 0 -3px; filter: brightness(1.06); }
.hx-go:active { translate: 2px 2px; box-shadow: inset 4px 4px 0 var(--acc-lo), inset -4px -4px 0 var(--acc-hi); }
/* шкала: одна черта на слайд, длина по времени, заполняется по ходу; нажатие переключает слайд */
.hx-segs { position: absolute; z-index: 5; left: 16px; right: 16px; bottom: 2px; display: flex; gap: 5px; }
.hx-segs button { flex: 1 1 0; min-width: 0; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.hx-segs button i { position: relative; display: block; width: 100%; height: 4px; background: rgba(255,255,255,.28); overflow: hidden; }
.hx-segs button i::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); background: var(--acc); }
.hx-segs button:hover i, .hx-segs button:focus-visible i { background: rgba(255,255,255,.5); }
@media (min-width: 400px) { .hx-logo { width: 116px; } .hx-social img { width: 28px; height: 28px; } }
@media (min-aspect-ratio: 1/1) {
  .hx { min-height: 520px; }
  .hx-media { inset: 0; background-image: url(assets/hero-slides/kuat.jpg); background-position: 50% 80%; }
  .hx-slide video, .hx-slide img { object-position: 50% 80%; }
  /* затемнение сверху под шапку, слева под текст и тонкая полоска снизу под шкалу: героев внизу кадра не трогаем */
  .hx-media::after { background: linear-gradient(rgba(0,0,0,.7) 0, transparent 17%), linear-gradient(to right, rgba(0,0,0,.8) 0, rgba(0,0,0,.52) 24%, transparent 52%), linear-gradient(to top, rgba(0,0,0,.6) 0, transparent 9%); }
  .hx .hero-top { padding: 18px max(20px, 4.5vw); }
  .hx .hero-top .pill { min-height: 40px; padding: 8px 14px; font-size: 17px; }
  .hx-logo { width: 176px; }
  .hx-social { margin-right: 14px; }
  .hx-social a { width: 44px; height: 44px; }
  .hx-social img { width: 32px; height: 32px; }
  .hx-text { inset: auto auto 64px max(20px, 4.5vw); display: block; width: min(46vw, 620px); }
  .hx-text.hx-top { inset: 112px auto auto max(20px, 4.5vw); }      /* слайд с pos: 'top' */
  .hx-title { font-size: 24px; text-shadow: none; }
  .hx-sub { max-width: 30em; margin-top: 16px; font-size: clamp(17px, 1.5vw, 21px); color: #DADAE0; text-shadow: none; }
  .hx-cta { margin-top: 24px; }
  .hx-segs { left: max(20px, 4.5vw); right: max(20px, 4.5vw); bottom: 4px; }
  .hx-segs button { height: 36px; }
}
@media (min-aspect-ratio: 1/1) and (min-width: 960px) {
  .hx-title { font-size: 32px; }
  .hx-nav { display: flex; gap: 26px; margin: 0 0 0 40px; }
  .hx-nav a { font: 700 16px/1 var(--f-ui); color: var(--fg); text-decoration: none; padding: 8px 0; text-shadow: 0 2px 0 rgba(0,0,0,.6); }
  .hx-nav a:hover, .hx-nav a:focus-visible { color: var(--acc); }
}
@media (prefers-reduced-motion: reduce) { .hx-go::after { display: none; } }
/* нижняя панель с иконками (док) убрана на всех экранах: навигация — шапка и кнопка «Создать игру» */
:root { --dock-h: 0px; }
.dock { display: none !important; }
body { padding-bottom: 0; }
.stage { position: absolute; left: 0; top: 0; z-index: 1; }
.hero-top { position: absolute; z-index: 6; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; }
.slogan { margin: 0; font: 700 18px/1.15 var(--f-ui); color: var(--fg); max-width: 13em; }
.hero-cap { position: absolute; z-index: 6; left: 16px; right: 16px; top: 64px; margin: 0; font-size: 14px; color: var(--muted); max-width: 24em; }
.desk-icons { display: none; }
.desk-icons a { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 96px; padding: 6px 2px; font: 700 15px/1.2 var(--f-ui); text-decoration: none; text-align: center; }
.desk-icons img { image-rendering: pixelated; }
.desk-icons a:hover span, .desk-icons a:focus-visible { background: var(--fg); color: #000; }
.wordmark {
  position: absolute; z-index: 0; left: 50%; bottom: calc(var(--dock-h) + 20px + var(--safe-b)); translate: -50% 0; white-space: nowrap;
  font: 700 15.6vw/.8 var(--f-ui); color: #fff; letter-spacing: -.02em; pointer-events: none; user-select: none;
}

/* окно «Сохранить как…» поверх застывшего кадра */
.save-win { position: absolute; z-index: 4; display: flex; flex-direction: column; background: transparent; border: 3px solid var(--fg); transform-origin: center; }
.save-win[hidden] { display: none; }
.save-bar { padding: 5px 6px 7px; font-size: 14px; }
.save-view { flex: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.35) 0 1px, transparent 1px 3px); }
.save-foot { background: #000; color: var(--fg); padding: 8px 10px 10px; display: grid; gap: 7px; font-size: 12px; }
.save-name { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.save-name b { flex: 1; font: 700 15px var(--f-ui); font-weight: 400; color: var(--fg); border: 2px solid var(--line); padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save-prog { height: 12px; border: 2px solid var(--fg); padding: 1px; }
.save-prog div { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--acc) 0 5px, transparent 5px 7px); }
.save-state { font: 700 15px var(--f-ui); color: var(--muted); }
.save-win.done .save-prog div { background: repeating-linear-gradient(90deg, var(--ok) 0 5px, transparent 5px 7px); }
.save-win.done .save-state { color: var(--ok); }
.save-win.pop { animation: win-pop .32s steps(4); }
@keyframes win-pop { 0% { transform: scale(.6); opacity: 0; filter: drop-shadow(4px 0 #ff3b30) drop-shadow(-4px 0 #00d0ff); } 60% { transform: scale(1.03); opacity: 1; } 100% { transform: none; filter: none; } }
.save-win.shrink { transition: transform .38s steps(6), opacity .38s steps(6); transform: scale(.12); opacity: 0; }

/* папки */
.fold { position: absolute; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 0; color: var(--fg); font: 700 15px/1.2 var(--f-ui); text-align: center; }
.fold[hidden] { display: none; }
.fold > span { background: #000; padding: 2px 6px; max-width: 130px; overflow-wrap: anywhere; }
.fold-ico { display: block; line-height: 0; }
.fold-ico svg { display: block; }
.fold-new { translate: -50% -50%; }
.fold-ico img { display: block; width: 64px; height: 64px; image-rendering: pixelated; }
.fold-new.pop .fold-ico { animation: fold-pop .3s steps(3); }
@keyframes fold-pop { 0% { transform: scale(1.8); } 100% { transform: none; } }
.fold-new.lift .fold-ico { transform: translateY(-4px); filter: drop-shadow(4px 4px 0 #333); }
.fold-new.drop { transition: transform .25s steps(4), opacity .25s; transform: scale(.2); opacity: 0; }
.fold-dest { right: 14px; bottom: calc(var(--dock-h) + 34px + 14vw + var(--safe-b)); cursor: pointer; }
.fold-dest em { position: absolute; top: -8px; right: -10px; min-width: 24px; height: 24px; padding: 0 6px; background: var(--acc); color: #000; font: 700 16px/24px var(--f-ui); font-style: normal; }
.fold-dest.hot .fold-ico { transform: scale(1.12); filter: brightness(1.15); }
.fold-dest.gulp .fold-ico { animation: gulp .45s steps(5); }
@keyframes gulp { 30% { transform: scale(1.22, .86); } 60% { transform: scale(.94, 1.08); } 100% { transform: none; } }
.plus1 { position: absolute; z-index: 6; font: 700 21px var(--f-ui); color: var(--acc); pointer-events: none; animation: plus1 .9s steps(6) forwards; }
@keyframes plus1 { to { transform: translateY(-34px); opacity: 0; } }

.cursor { position: absolute; z-index: 7; left: 0; top: 0; pointer-events: none; line-height: 0; }
.cursor svg { display: block; width: 22px; height: 34px; transform-origin: 0 0; }
.cursor[hidden] { display: none; }
.cursor.press svg { transform: scale(.88); }

/* «папка» с сохранёнными моментами */
.finder { position: absolute; z-index: 8; right: 14px; bottom: calc(var(--dock-h) + 160px + 14vw + var(--safe-b)); width: min(300px, calc(100% - 28px)); background: #000; color: var(--fg); border: 3px solid var(--fg); }
.finder[hidden] { display: none; }
.finder ul { list-style: none; margin: 0; padding: 8px; max-height: 40vh; overflow: auto; }
.finder li { display: flex; align-items: center; gap: 10px; padding: 8px; font: 700 16px var(--f-ui); border-bottom: 2px dashed var(--line); }

.finder .pill { margin: 0 8px 10px; width: calc(100% - 16px); }

/* ---------- 1б. коротко ---------- */
.intro { padding: 56px 0; }
.intro-grid { display: grid; gap: 24px; align-items: center; }
.hello { margin: 0 0 14px; font: 400 16px/1.5 var(--f-big); word-spacing: -.375em; }
.accent { margin: 0 0 14px; font: 700 23px/1.25 var(--f-mono); color: var(--acc); }
.accent b { font: 700 .95em/1 var(--f-ui); background: var(--acc); color: #000; padding: 0 6px; }
.reaction { display: grid; gap: 8px; }
.reaction-cv { display: block; width: 100%; aspect-ratio: 4 / 3; image-rendering: pixelated; }
.reaction-cap { margin: 0; text-align: center; font: 400 16px/1.5 var(--f-big); word-spacing: -.375em; color: var(--fg); min-height: 3em; }
.price-chip { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.price-chip b { color: var(--acc); font: 700 20px var(--f-ui); }

/* ---------- ЭЛТ, VHS, шум ---------- */
.crt { overflow: hidden; }
/* развёртка и бегущая полоса — только внутри «экранов», фон блоков остаётся ровным чёрным */
.crt-screen::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.3) 0 1px, transparent 1px 3px);
}
.crt-screen::after {
  content: ''; position: absolute; left: 0; right: 0; height: 60px; top: -60px; pointer-events: none; z-index: 3;
  background: linear-gradient(transparent, rgba(255,255,255,.04), transparent);
  animation: roll 7s linear infinite;
}
@keyframes roll { to { top: 100%; } }
.vhs { position: absolute; z-index: 4; font: 700 16px var(--f-ui); letter-spacing: 1px; color: #fff; text-shadow: 2px 0 #ff3b30, -2px 0 #00d0ff; pointer-events: none; }
.vhs-tl { left: 12px; top: 8px; }
.vhs-br { right: 12px; bottom: 8px; }
.noise { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; opacity: .05; mix-blend-mode: screen; }
.glitch { animation: glitch .38s steps(3) 1; }
@keyframes glitch {
  0% { transform: none; filter: none; }
  33% { transform: translate(4px, -2px) skewX(-6deg); filter: drop-shadow(3px 0 #ff3b30) drop-shadow(-3px 0 #00d0ff); }
  66% { transform: translate(-4px, 2px) skewX(5deg); filter: drop-shadow(-3px 0 #ff3b30) drop-shadow(3px 0 #00d0ff); }
  100% { transform: none; filter: none; }
}
body.fx-off .crt::before, body.fx-off .crt::after, body.fx-off .crt-screen::before, body.fx-off .crt-screen::after, body.fx-off .noise { display: none; }
body.fx-off .vhs { text-shadow: none; }
body.fx-off .glitch { animation: none; }

/* ---------- 2. демо ---------- */
.screen { position: relative; aspect-ratio: 4 / 5; background: #000; overflow: hidden; }
.win .win-body:has(> .screen) { padding: 0; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2; }
#demo-screen { aspect-ratio: 16 / 9; }      /* демо на боковом движке всегда альбомное, и на телефоне тоже */
#demo-full[hidden] { display: none; }      /* «На весь экран» только на телефоне */
/* телефон: демо без окна и рамок, игра от края до края экрана (Азим, 21.11: «убери рамку полностью»). Окно остаётся на компьютере */
@media (max-width: 719px) {
  #demo .wrap { width: 100%; }
  #demo .wrap > h2, #demo .demo-note { padding-inline: 16px; }
  #demo-win { border: 0; border-image: none; background: none; transform: none !important; }
  #demo-win .win-bar { display: none; }
  #demo-win .demo-bar { border-top: 0; padding: 10px 16px 0; }
}
.dialog { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 2; width: min(360px, 88%); background: #000; color: var(--fg); padding: 16px 18px; border: 3px solid var(--fg); }
.dialog p { margin: 0; }
.dialog .dim { font-size: 13px; }
.dialog .btn { margin-top: 12px; }
.dlg-title { font: 400 16px/1.5 var(--f-big); word-spacing: -.375em; margin: 8px 0 10px !important; color: var(--acc); }
.demo-note { margin: 12px 2px 0; }
.demo-bar { gap: 8px; }
.demo-bar span { flex: 1 1 100%; }
.demo-bar .btn { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.demo-paused { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; gap: 6px; border: 0; cursor: pointer;
  background: rgba(0,0,0,.72); color: var(--fg); font: 400 32px/1 var(--f-big); letter-spacing: 2px; }
.demo-paused span { font: 500 16px var(--f-mono); color: var(--muted); letter-spacing: 0; }
.demo-paused[hidden] { display: none; }
#demo-win { will-change: transform; }

/* ---------- 3. копирование ---------- */
.copy-anim { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.folder { display: flex; flex-direction: column; align-items: center; gap: 8px; font: 700 15px/1.2 var(--f-ui); width: 96px; text-align: center; }
.flight { position: relative; flex: 1; height: 40px; }
.flight i { position: absolute; left: 0; top: 10px; width: 16px; height: 20px; background: #fff; border: 2px solid #000; border-bottom-width: 5px; animation: fly 2.4s steps(12) infinite; }
.flight i:nth-child(2) { animation-delay: .8s; }
.flight i:nth-child(3) { animation-delay: 1.6s; }
@keyframes fly { 0% { left: 0; top: 16px; opacity: 0; } 10% { opacity: 1; } 50% { top: -4px; } 90% { opacity: 1; } 100% { left: calc(100% - 16px); top: 16px; opacity: 0; } }
.copy-line { font: 700 16px var(--f-ui); margin: 0 0 8px; }
.bar { height: 16px; border: 2px solid var(--fg); padding: 2px; }
.bar > div { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--acc) 0 6px, transparent 6px 8px); transition: width .25s steps(4); }
.dialog .bar { margin: 10px 0 4px; }
.steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.steps li { display: flex; gap: 12px; align-items: baseline; padding: 12px 14px; font-size: 14px; line-height: 1.45; opacity: .4; transition: opacity .2s steps(2); }
.steps li.on { opacity: 1; border-color: var(--fg); }
.steps b { flex: none; width: 3.4em; color: var(--acc); font: 700 20px var(--f-ui); }

/* ---------- 4. фото → пиксель ---------- */
.ba { position: relative; aspect-ratio: 1; width: 100%; overflow: hidden; background: #050506; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.ba-before, .ba-after { position: absolute; inset: 0; }
.ba-after { clip-path: inset(0 0 0 50%); background: #000; }
.ba-before img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* спрайт совмещён с человеком на фото: голова и ноги на той же высоте */
.ba-sprite { position: absolute; left: 52%; bottom: -4%; height: 103.5%; width: auto; translate: -50% 0; image-rendering: pixelated; pointer-events: none; }
.ba-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px; background: var(--acc); }
.ba-line::after { content: '◂▸'; position: absolute; top: 50%; left: 50%; translate: -50% -50%; background: var(--acc); color: #000; font: 700 16px var(--f-ui); padding: 8px 6px; }
.win-body input[type=range] { width: 100%; height: 32px; margin-top: 8px; accent-color: var(--acc); }
/* ---------- 9. история: видео ---------- */
.story-win { max-width: 900px; margin: 0 auto; }
.win .story-body { padding: 0; }
.story-video { position: relative; aspect-ratio: 4 / 3; background: #000; }
.story-video video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.story-play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; white-space: nowrap; box-shadow: 0 0 0 6px rgba(0,0,0,.45), inset -3px -3px 0 var(--acc-lo), inset 3px 3px 0 var(--acc-hi); }
.story-video.playing .story-play { display: none; }
/* ---------- 1в. реакции: без окна. Живые видео в ряд (у каждого своя ширина, высота общая), под ними подпись и реплики ---------- */
.rvx-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; margin-bottom: 22px; }
.rvx-head h2 { margin: 0; }
.rv-tabs { display: flex; gap: 4px; }
.rv-tabs button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 2px solid var(--line); background: var(--tile); color: var(--fg); font: 700 17px/1 var(--f-ui); cursor: pointer; }
.rv-tabs button[aria-selected="true"] { border-color: var(--acc); background: var(--acc); color: #000; }
.rv-tabs i { font-style: normal; opacity: .55; }
/* телефон: лента листается пальцем, следующая карточка выглядывает сбоку */
.rv-pane { display: grid; grid-auto-flow: column; gap: 12px; align-items: start; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.rv-pane::-webkit-scrollbar { display: none; }
.rv-pane[hidden] { display: none; }
.rvx-live { grid-auto-columns: min(80%, 340px); }
.rv-chats { grid-auto-columns: min(82%, 320px); }
.rvx-tile, .rv-msg { margin: 0; scroll-snap-align: center; min-width: 0; }
.rvx-frame { --n: 4px; position: relative; aspect-ratio: 4 / 5; background: #0b0b0d; overflow: hidden; cursor: pointer;
  clip-path: polygon(var(--n) 0, calc(100% - var(--n)) 0, calc(100% - var(--n)) var(--n), 100% var(--n), 100% calc(100% - var(--n)), calc(100% - var(--n)) calc(100% - var(--n)), calc(100% - var(--n)) 100%, var(--n) 100%, var(--n) calc(100% - var(--n)), 0 calc(100% - var(--n)), 0 var(--n), var(--n) var(--n)); }
.rvx-frame video { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.rvx-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; pointer-events: none; transition: opacity .3s; }      /* обложка лежит поверх видео, пока оно не заиграло */
.rvx-frame.live .rvx-poster { opacity: 0; }
.rvx-wide .rvx-frame video, .rvx-wide .rvx-poster { object-position: 100% 50%; }      /* на телефоне широкое видео обрезается до 4:5 — держим лицо справа */
.rvx-snd { position: absolute; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 10px 4px 6px; border: 0; cursor: pointer; background: rgba(0,0,0,.72); color: var(--fg); font: 700 16px/1 var(--f-ui); }
.rvx-snd img { display: block; width: 32px; height: 32px; image-rendering: pixelated; opacity: .55; }
.rvx-snd[aria-pressed="true"] { background: var(--acc); color: #000; }
.rvx-snd[aria-pressed="true"] img { opacity: 1; }
.rvx-tile figcaption { padding: 12px 2px 0; }
.rvx-tile figcaption b, .rv-msg figcaption b { display: block; font: 700 19px/1.15 var(--f-ui); }
.rvx-sub { display: block; margin-top: 5px; min-height: 2.7em; font: 500 16px/1.35 var(--f-read); color: var(--muted); }
.rvx-sub.say { color: var(--acc); }
.rv-msg figcaption { padding: 0 2px 2px; }
.rv-msg figcaption span { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.rv-msg { display: grid; gap: 8px; }
.rv-msg img { display: block; width: 100%; height: auto; image-rendering: auto; border: 2px solid var(--line); }
.pix-try { display: grid; gap: 14px; }
.pix-try canvas { width: 100%; height: auto; background: #000; border: 2px solid var(--line); }
#pix-try { margin-top: 24px; }

/* ---------- 5. инвентарь ---------- */
.inv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.inv button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px 2px; font: 600 16px/1.05 var(--f-mono); cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
.inv .ico { width: 64px; height: 64px; }
@media (min-width: 400px) { .inv button { font-size: 13px; } }

.inv button.on { border-color: var(--acc); background: #1A1505; }
#inv-info { min-height: 3em; font: 500 18px/1.3 var(--f-mono); color: var(--fg); }

/* ---------- 6. режимы: на телефоне — свайп-карусель ---------- */
.modes { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 24px; margin: 0 -16px; scrollbar-width: none; }
.modes::-webkit-scrollbar { display: none; }
.modes > .win { scroll-snap-align: center; }
.modes p { font: 500 15px/1.5 var(--f-read); margin: 0 0 12px; }
.modes p b { font-weight: 500; }
.modes label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.swipe-hint { margin: -6px 0 14px; font-family: var(--f-pix); }
input[type=date] { font: 500 16px var(--f-mono); min-height: 44px; padding: 6px 10px; border: 2px solid var(--line); background: var(--tile); color: var(--fg); color-scheme: dark; }
.slot-mini { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 12px; }
.slot-name { font: 700 16px/1.15 var(--f-ui); }
.slot-meta { font-size: 12px; line-height: 1.3; color: var(--muted); }
.slot-mini .slot-meta { font: 700 17px var(--f-ui); color: var(--acc); }
.lobby { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font: 700 16px var(--f-ui); }
.lobby li { display: flex; justify-content: space-between; padding: 7px 10px; }
.lobby li.new { animation: join .5s steps(3); }
@keyframes join { from { background: #0D3B27; border-color: var(--ok); } }
.coop-sum { font: 700 17px var(--f-ui) !important; margin: 4px 0 0 !important; }
.coop-sum b { color: var(--acc); font-weight: 400; }
.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font: 700 16px var(--f-ui); }
.files li { display: flex; align-items: center; gap: 10px; }


/* ---------- 7. вручение ---------- */
.phone { width: 100%; }
.phone-screen { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #050506; border: 3px solid var(--fg); }
.qr-card { display: flex; gap: 14px; align-items: center; width: max-content; max-width: 100%; margin: 18px 0 0 4px; padding: 14px; background: #000; border: 3px solid var(--fg); rotate: -3deg; }
.qr-card div { display: grid; gap: 4px; justify-items: start; }
.qr-card b { font: 700 18px var(--f-ui); }
.qr-card span { font-size: 12px; color: var(--muted); }

.flow { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 6px; }
.flow li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 2px solid var(--line); background: var(--tile); font: 600 18px var(--f-mono); color: var(--muted); transition: color .2s steps(2), border-color .2s steps(2); }
.flow li .ico { width: 32px; height: 32px; }
.flow li.on { color: var(--fg); border-color: var(--acc); }
.gift-stage canvas { display: block; width: 100%; aspect-ratio: 1; image-rendering: pixelated; }

/* ---------- 8. калькулятор ---------- */
.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 8px; cursor: pointer; font: inherit; }

.pack .slot-meta { font-size: 11px; }
.pack-price { font: 700 18px var(--f-ui); color: var(--acc); margin-top: auto; }
.pack.on { border-color: var(--acc); background: #1A1505; }
.check { display: flex; gap: 10px; align-items: center; margin: 14px 0 0; font-size: 14px; cursor: pointer; min-height: 44px; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--acc); }
.calc-foot { margin-top: 6px; }
.calc-total { font: 700 23px var(--f-ui); margin: 0; }
.calc-total b { color: var(--acc); font-weight: 400; }

.calc-h { font: 700 16px var(--f-ui); color: var(--muted); margin: 0 0 10px; }
.calc-h + .packs + .calc-h, .packs + .calc-h { margin-top: 24px; }
.calc-grid { display: grid; gap: 16px; }
.calc-rows { display: grid; gap: 6px; align-content: start; }
.calc-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 10px; row-gap: 3px; padding: 10px; background: var(--tile); border: 2px solid var(--line); --n: 2px;
  clip-path: polygon(2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px), 0 2px, 2px 2px); }
.calc-row .ico { width: 32px; height: 32px; }
.calc-row > .ico { grid-row: span 2; }
.calc-lab { display: contents; }
.calc-lab b { grid-column: 2; min-width: 0; overflow-wrap: anywhere; }
.calc-lab span { grid-column: 2 / 4; grid-row: 2; }
.calc-row .stepper, .calc-row .tick { grid-column: 3; grid-row: 1; }
.calc-lab b { font: 700 16px/1.15 var(--f-ui); }
.calc-lab span { font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper button { width: 36px; height: 36px; padding: 0; border: 0; cursor: pointer; font: 700 24px/1 var(--f-ui); background: var(--fg); color: #000; box-shadow: inset -3px -3px 0 #9A9AA0, inset 3px 3px 0 #fff; }
.stepper button:active { box-shadow: inset 3px 3px 0 #9A9AA0, inset -3px -3px 0 #fff; }
.stepper output { min-width: 2em; text-align: center; font: 700 24px var(--f-ui); color: var(--acc); }
.calc-tog { cursor: pointer; }
.calc-tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tick { flex: none; width: 30px; height: 30px; border: 3px solid var(--fg); display: grid; place-items: center; font: 700 21px/1 var(--f-ui); color: #000; }
.calc-tog input:checked + .tick { background: var(--acc); }
.calc-tog input:checked + .tick::after { content: '✓'; }
.calc-tog input:focus-visible + .tick { outline: 2px dashed var(--acc); outline-offset: 3px; }
.calc-tog:has(input:checked) { border-color: var(--acc); }
.party-box { background: #050506; border: 2px solid var(--line); padding: 8px 8px 6px; }
.party { display: block; width: 100%; height: 148px; image-rendering: pixelated; }
.party-cap { margin: 4px 0 0; text-align: center; font: 700 15px var(--f-ui); color: var(--muted); }
.receipt { list-style: none; margin: 12px 0 0; padding: 10px 12px; border: 2px dashed var(--line); font-size: 13px; display: grid; gap: 4px; }
.receipt li { display: flex; justify-content: space-between; gap: 10px; }
.receipt b { font-weight: 500; white-space: nowrap; }
.calc-sum { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding: 0 2px; }
.calc-sum span { font: 700 21px var(--f-ui); color: var(--muted); }
.calc-sum b { font: 400 32px/1 var(--f-big); color: var(--acc); }
.calc-time { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.calc-time .ico { width: 32px; height: 32px; }
.split { margin-top: 12px; }
.calc .row-cta { margin-top: 14px; }

/* ---------- 9. кейс ---------- */
.tape-screen { position: relative; aspect-ratio: 4 / 3; background: #050506; border: 3px solid var(--fg); overflow: hidden; }
.tape .small { margin-top: 10px; }
.talk { position: relative; background: #000; color: var(--fg); padding: 16px 16px 26px; border: 3px solid var(--fg); }
.talk-name { margin: 0 0 8px; color: var(--acc); font: 700 17px var(--f-ui); }
.talk-text { margin: 0; min-height: 9em; font: 500 16px/1.6 var(--f-read); }
.talk-next { position: absolute; right: 14px; bottom: 6px; font-size: 14px; color: var(--acc); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 10. достижения ---------- */
.achs { display: grid; gap: 10px; margin-top: 16px; }
.ach { display: flex; gap: 14px; align-items: center; padding: 14px; }

.ach b { display: block; font: 700 18px var(--f-ui); }
.ach .dim { font-size: 12px; }
.ach.locked { opacity: .5; border-style: dashed; }

/* ---------- 11. справка ---------- */
.faq details { margin-bottom: 6px; }
.faq details[open] { border-color: var(--fg); }
.faq summary { padding: 13px 14px; cursor: pointer; font: 500 15px/1.4 var(--f-mono); list-style: none; min-height: 48px; display: flex; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '+'; color: var(--acc); flex: none; font: 700 19px/1.1 var(--f-ui); }
.faq details[open] summary::before { content: '−'; }
.faq details p { margin: 0; padding: 0 14px 14px 36px; font: 500 15px/1.55 var(--f-read); color: var(--muted); }

/* ---------- 12. финал ---------- */
#final { padding: 96px 0 80px; }
.big-h { font-size: 24px; }
@media (min-width: 720px) { .big-h { font-size: 32px; } }
@media (min-width: 960px) { .big-h { font-size: 48px; } }
.foot-logo { flex: 1 1 100%; width: 176px; height: auto; max-width: 176px; image-rendering: pixelated; margin-bottom: 8px; }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 16px; font: 700 15px var(--f-ui); color: var(--muted); border-top: 2px dashed var(--line); }
.foot-legal { flex: 1 1 100%; margin-top: 10px; padding-top: 12px; border-top: 2px dashed var(--line); font: 500 15px/1.5 var(--f-read); }
.foot-legal p { margin: 0 0 4px; }
.foot-legal a { color: var(--fg); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.foot-links a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
.consent { margin: 4px 0 0; line-height: 1.45; }
.consent a, .faq details p a { color: var(--acc); }
.todo { background: var(--acc); color: #000; padding: 0 4px; }
main.crt-on { animation: crt-on .55s ease-out; }
main.crt-off { animation: crt-off .5s ease-in forwards; }
@keyframes crt-on { 0% { transform: scale(1, .004); filter: brightness(4); } 55% { transform: scale(1, 1); filter: brightness(1.6); } 100% { transform: none; filter: none; } }
@keyframes crt-off { 0% { transform: none; filter: none; } 55% { transform: scale(1, .004); filter: brightness(4); } 100% { transform: scale(0, .004); filter: brightness(6); opacity: 0; } }
.off-screen { position: fixed; inset: 0; z-index: 50; background: #000; color: var(--fg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; font: 400 16px var(--f-big); padding: 16px; }
.off-screen[hidden] { display: none; }

/* ---------- док ---------- */
.dock {
  position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); height: var(--dock-h);
  display: flex; align-items: center; justify-content: space-around; gap: 2px; padding: 0 6px;
  background: #000; border: 3px solid var(--fg);
}
.dock a, .dock button { display: grid; place-items: center; width: 44px; height: 44px; color: var(--fg); background: none; border: 0; cursor: pointer; }
.dock a:active, .dock button:active, .dock a:hover, .dock button:hover { background: var(--fg); color: #000; }
.dock-fx[aria-pressed=false] img { opacity: .3; }
.dock-prog { position: absolute; left: 0; right: 0; top: 0; height: 4px; }
.dock-prog div { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--acc) 0 6px, transparent 6px 8px); }
.dock-save { display: none; font: 700 15px var(--f-ui); color: var(--muted); min-width: 5em; text-align: right; }
.dock.saved .dock-prog div { background: repeating-linear-gradient(90deg, var(--ok) 0 6px, transparent 6px 8px); }

/* ---------- планшет ---------- */
@media (min-width: 640px) {
  section { padding: 88px 0; }
  .win-body { padding: 18px; }
  .row-cta .btn { flex: 0 0 auto; }
  .steps { grid-template-columns: 1fr 1fr; }
  .inv button { font-size: 14px; }
  .packs { grid-template-columns: repeat(4, 1fr); }
  .achs { grid-template-columns: repeat(2, 1fr); }
  .rv-pane { margin: 0 -16px; padding: 0 16px 4px; }
  .modes { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); overflow: visible; padding: 0; margin: 0; align-items: start; }
  .swipe-hint { display: none; }
  .phone { justify-self: center; width: 300px; padding: 14px 12px 34px; background: #000; border: 3px solid var(--fg); --n: 9px; }
  .phone-screen { aspect-ratio: 9 / 18; border-width: 2px; }
  .calc-row .ico { width: 64px; height: 64px; }
  .calc-lab b { font-size: 17px; }
  .calc-lab span { font-size: 12.5px; }
  .dock { left: 50%; right: auto; translate: -50% 0; padding: 0 12px; gap: 6px; }
  .dock-save { display: block; }
  .hero-top { padding: 20px 28px; }
  .slogan { font-size: 20px; max-width: none; }
  .demo-bar span { flex: 1 1 auto; }
  .hero-cap { left: 28px; top: 70px; font-size: 15px; }
  .fold-dest { right: 28px; }
  .finder { right: 28px; }
}

/* ---------- ноутбук ---------- */
@media (min-width: 960px) {
  body { font-size: 16px; }
  section { padding: 110px 0; }
  .lead { font-size: 20px; }
  .two { grid-template-columns: 1fr 1fr; gap: 48px; }
  .intro { min-height: 86vh; display: flex; align-items: center; }
  .intro-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
  .accent { font-size: 30px; }
  .screen { aspect-ratio: 16 / 9; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { display: block; }
  .steps b { display: block; width: auto; margin-bottom: 4px; }
  .ba { max-height: 440px; }
  .pix-try { grid-template-columns: 320px 1fr; align-items: center; }
  .btn, .pill { min-height: 0; }
  .inv button:hover { border-color: var(--acc); }
  .achs { grid-template-columns: repeat(4, 1fr); }
  /* реакции: три видео в ряд на всю ширину, высота общая, ширина по пропорциям кадра (--ar) */
  .rv-pane { grid-auto-flow: row; margin: 0; padding: 0; overflow: visible; }
  .rvx-live { display: flex; gap: 22px; align-items: flex-start; }
  .rvx-tile { flex: var(--ar) 1 0; }
  .rvx-frame { aspect-ratio: var(--ar); }
  .rvx-wide .rvx-frame video, .rvx-wide .rvx-poster { object-position: 50% 50%; }
  .rv-chats { grid-template-columns: repeat(3, minmax(0, 320px)); justify-content: center; gap: 28px; }
  .dock { display: none; }
  body { padding-bottom: 0; }
  .calc-grid { grid-template-columns: 1.15fr .85fr; align-items: start; }
  .calc-side { position: sticky; top: 20px; }
  .wordmark { font: 700 16.4vw/1 var(--f-ui); bottom: -.2em; }
  .fold-dest { bottom: calc(16.4vw - 2px); right: 6vw; }
  .finder { bottom: calc(16.4vw + 130px); right: 6vw; }
  .fold-ico img { width: 96px; height: 96px; }
  .desk-icons { position: absolute; z-index: 6; left: 20px; top: 130px; display: grid; gap: 10px; }
  .save-bar { font-size: 15px; }
  .save-foot { font-size: 13px; padding: 10px 14px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- валюта в калькуляторе ---------- */
.cur-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cur-bar .calc-h { margin: 0; }
.cur-switch { display: flex; gap: 4px; flex-wrap: wrap; }
.cur-switch button { min-width: 64px; min-height: 44px; padding: 6px 8px; border: 2px solid var(--line); background: var(--tile); color: var(--fg); font: 700 16px/1 var(--f-ui); cursor: pointer; }
.cur-switch button[aria-pressed="true"] { border-color: var(--acc); background: var(--acc); color: #000; }
.cur-note { margin: 6px 2px 0; font-size: 12px; line-height: 1.35; color: var(--muted); text-align: right; }
.cur-note[hidden] { display: none; }

/* ---------- каталог мини-игр ---------- */
.mg-open { display: inline-block; margin: -12px 0; padding: 12px 4px; background: none; border: 0; color: var(--acc); font: 700 15px/1 var(--f-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mg-picked { display: block; margin-top: 4px; color: var(--fg); }
.mg-picked:empty { display: none; }

/* катсцены: телевизор с примерами — на компьютере всплывает при наведении на строку, на телефоне по кнопке «примеры».
   Окно — соседний с строкой блок (у .calc-row есть clip-path, внутри строки окно обрезалось бы) */
.calc-rows { position: relative; }
.cut-open { display: inline-block; margin: -12px 0; padding: 12px 4px; background: none; border: 0; color: var(--acc); font: 700 15px/1 var(--f-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cut-pop { display: none; padding: 12px 10px 10px; background: var(--tile); border: 2px solid var(--line); border-top: 0; margin-top: -8px; }
.cut-pop.open { display: block; }
.cut-pop .mstv { margin: 0 auto; }
.cut-intro { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .cut-pop { display: block; position: absolute; z-index: 30; right: 8px; width: 320px; margin: 0; padding: 10px; background: #0E0E10; border: 2px solid var(--acc); box-shadow: 6px 6px 0 rgba(0,0,0,.6);
    opacity: 0; visibility: hidden; transition: opacity .15s, visibility 0s .15s; pointer-events: none; }
  .cut-pop.show, .cut-pop.open { opacity: 1; visibility: visible; transition-delay: 0s; }
}
body.modal-open { overflow: hidden; }
.mg-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 12px; padding-bottom: calc(12px + var(--safe-b)); background: rgba(0, 0, 0, .8); }
.mg-modal[hidden] { display: none; }
.mg-win { width: min(760px, 100%); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; }
.mg-win .win-bar { flex: none; }
.mg-win .win-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.mg-lead { margin: 0 0 12px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.mg-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 6px; }
.mg-item { width: 100%; min-height: 60px; display: grid; grid-template-columns: 32px 1fr 26px; align-items: center; gap: 10px; padding: 10px; text-align: left; cursor: pointer; font: inherit; color: var(--fg); background: var(--tile); border: 2px solid var(--line); }
.mg-item .ico { width: 32px; height: 32px; image-rendering: pixelated; }
.mg-item b { display: block; font: 700 16px/1.15 var(--f-ui); }
.mg-item small { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.mg-check { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--muted); font: 700 17px/1 var(--f-ui); font-style: normal; color: #000; }
.mg-item[aria-pressed="true"] { border-color: var(--acc); background: #1A1505; }
.mg-item[aria-pressed="true"] .mg-check { background: var(--acc); border-color: var(--acc); }
.mg-item[aria-pressed="true"] .mg-check::after { content: '✓'; }
.mg-foot { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px 4px; border-top: 2px dashed var(--line); }
.mg-sum { flex: 1 1 100%; margin: 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.mg-sum b { color: var(--acc); font: 700 18px var(--f-ui); }
.mg-foot .btn { margin-left: auto; }
@media (min-width: 640px) {
  .mg-list { grid-template-columns: 1fr 1fr; }
  .mg-sum { flex: 1 1 auto; }
}

/* текст только для поисковиков и экранных дикторов */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- для кого (вместо блока «режимы») ---------- */
.for-whom { display: grid; gap: 8px; margin-top: 16px; font-size: 15px; line-height: 1.45; }
.for-whom p { margin: 0; }
.for-whom b { color: var(--acc); font-weight: 600; }
.for-whom a, .faq-more a, #guarantees a { color: var(--acc); }
.faq-more { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- гарантии ---------- */
.guar { display: grid; gap: 8px; grid-template-columns: 1fr; margin: 0 0 14px; }
.guar .g { display: grid; gap: 4px; padding: 14px; background: var(--tile); border: 2px solid var(--line); font-size: 14px; line-height: 1.45; }
.guar .g b { font: 400 16px/1.1 var(--f-big); color: var(--acc); }
@media (min-width: 640px) { .guar { grid-template-columns: repeat(3, 1fr); } }

/* ---------- липкая кнопка ---------- */
.sticky-cta {
  position: fixed; z-index: 210; left: 50%; translate: -50% 0; bottom: calc(var(--dock-h) + 22px + var(--safe-b));
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; white-space: nowrap;
  background: var(--acc); color: #000; text-decoration: none; font: 700 19px/1 var(--f-ui);
  box-shadow: 0 0 0 3px #000, 0 6px 0 3px rgba(0,0,0,.5); transition: opacity .2s, translate .2s;
}
.sticky-cta b { font-weight: 400; padding-left: 10px; border-left: 2px solid rgba(0,0,0,.35); }
.sticky-cta:hover { filter: brightness(1.08); }
.sticky-cta.away { opacity: 0; pointer-events: none; translate: -50% 20px; }
html.booting .sticky-cta { bottom: calc(56px + var(--safe-b)); }
@media (max-width: 420px) { .sticky-cta { font-size: 16px; padding: 12px 14px; gap: 8px; } .sticky-cta b { padding-left: 8px; } }
@media (max-width: 380px) { .sticky-cta { font-size: 14px; padding: 11px 10px; gap: 6px; } .sticky-cta b { padding-left: 6px; } }
@media print { .sticky-cta { display: none; } }
@media (max-width: 480px) { .sticky-cta { flex-direction: column; gap: 5px; padding: 10px 16px 9px; } .sticky-cta b { padding: 5px 0 0; border-left: 0; border-top: 2px solid rgba(0,0,0,.35); font-size: 13px; } }

/* «У вас есть начатый бриф — Продолжить» */
.resume-tip { position: fixed; z-index: 115; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); translate: -50% 0; display: flex; align-items: center; gap: 10px;
  width: max-content; max-width: calc(100% - 20px); padding: 8px 6px 8px 14px; background: #111; color: #fff; border: 2px solid var(--acc, #ffd400);
  font: 400 17px/1.2 var(--f-ui); box-shadow: 0 6px 0 rgba(0,0,0,.5); animation: rtip .35s ease-out; }
.resume-tip a { flex: none; padding: 8px 12px; background: var(--acc, #ffd400); color: #000; text-decoration: none; font-weight: 700; }
.resume-tip button { flex: none; width: 32px; height: 32px; border: 0; background: transparent; color: #fff; font: 700 20px var(--f-ui); cursor: pointer; }
@keyframes rtip { from { opacity: 0; translate: -50% -12px; } }
@media (prefers-reduced-motion: reduce) { .resume-tip { animation: none; } }

/* ---------- памятные предметы: брелок с героем и флешка с игрой (только сайт для СНГ) ----------
   Плашка NEW на первом экране → блок под строками калькулятора → окно с 3D-моделью (assets/phys/p3d.js грузится при первом открытии) */
.new-tag { position: relative; flex: none; display: inline-block; padding: 5px 6px 4px; background: var(--acc); color: #000; font: 400 8px/1 var(--f-big); letter-spacing: 0; }
.new-tag::after { content: ''; position: absolute; inset: -2px; border: 2px solid var(--acc); animation: new-ring 1.9s ease-out infinite; pointer-events: none; }
@keyframes new-ring { 0% { opacity: .95; transform: scale(1); } 75%, 100% { opacity: 0; transform: scale(1.55, 2); } }

.hx-new { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin: 0 0 12px; padding: 6px 12px 6px 6px; text-decoration: none; color: #fff;
  font: 700 15px/1.15 var(--f-ui); background: rgba(8, 8, 10, .74); border: 2px solid rgba(255, 210, 90, .6); box-shadow: 0 4px 0 rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: hx-new-glow 2.4s ease-in-out infinite; transition: translate .12s steps(2), border-color .15s; }
.hx-new b { font-weight: 700; }
.hx-new i { font-style: normal; color: var(--acc); }
.hx-new:hover, .hx-new:focus-visible { border-color: var(--acc); translate: 0 -2px; }
@keyframes hx-new-glow { 0%, 100% { box-shadow: 0 4px 0 rgba(0,0,0,.45), 0 0 0 0 rgba(255,210,90,0); } 50% { box-shadow: 0 4px 0 rgba(0,0,0,.45), 0 0 22px 2px rgba(255,210,90,.38); } }
@media (min-aspect-ratio: 1/1) { .hx-new { display: inline-flex; margin-bottom: 18px; font-size: 16px; } }

.phys { display: grid; gap: 6px; margin-top: 10px; padding: 12px 6px 8px; scroll-margin-top: 90px;
  border: 2px dashed rgba(255, 210, 90, .5); background: linear-gradient(180deg, rgba(255,210,90,.08), rgba(255,210,90,0) 72%); }
.phys.flash { animation: phys-flash 1.2s ease-out 2; }
@keyframes phys-flash { 0% { background-color: rgba(255,210,90,.28); border-color: var(--acc); } 100% { background-color: transparent; } }
.phys-h { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.phys-h b { font: 700 17px/1.15 var(--f-ui); }
.phys-h p { flex: 1 1 100%; margin: 0 0 4px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.phys-row { background: #131315; }
.calc-row > .phys-pic { grid-row: span 2; }
.phys-pic { position: relative; width: 40px; height: 40px; padding: 0; border: 0; cursor: pointer; display: grid; place-items: center; background: none; }
.phys-pic img { display: block; width: 32px; height: 32px; image-rendering: pixelated; transition: transform .12s steps(2); }
.phys-pic:hover img, .phys-pic:focus-visible img { transform: translateY(-3px); }
.phys-pic i { position: absolute; right: -4px; bottom: -2px; padding: 2px 3px 1px; background: var(--acc); color: #000; font: 700 10px/1 var(--f-ui); font-style: normal; }
.phys-more { display: inline-block; margin: -12px 0; padding: 12px 4px; background: none; border: 0; color: var(--acc); font: 700 15px/1 var(--f-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.phys-note { margin: 2px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
@media (min-width: 640px) { .phys-pic { width: 64px; height: 64px; } .phys-pic img { width: 64px; height: 64px; } .phys { padding: 14px 12px 12px; } }

.phys-modal { z-index: 95; }
.phys-win { width: min(1000px, 100%); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; }
.phys-win .win-bar { flex: none; }
.phys-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.phys-tabs { display: flex; gap: 6px; padding: 10px 12px; }
.phys-tabs button { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 8px; padding: 9px 8px; cursor: pointer;
  background: var(--tile); border: 2px solid var(--line); color: var(--fg); font: 700 16px/1.1 var(--f-ui); }
.phys-tabs button small { font-size: 13px; color: var(--muted); }
.phys-tabs button[aria-selected="true"] { border-color: var(--acc); background: #1A1505; color: var(--acc); }
.phys-grid { display: grid; }
.phys-info { display: grid; gap: 10px; align-content: start; padding: 14px 14px 8px; }
.phys-kick { margin: 0; display: flex; align-items: center; gap: 8px; font: 700 13px var(--f-ui); color: var(--acc); }
.phys-info h3 { margin: 0; font: 700 24px/1.15 var(--f-ui); }
.phys-price { margin: 0; font: 700 26px/1 var(--f-ui); color: var(--acc); }
.phys-price small { font-size: 15px; color: var(--muted); font-weight: 700; }
.phys-lead { margin: 0; font-size: 15px; line-height: 1.45; color: #E6E6EA; }
.phys-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 14px; line-height: 1.4; }
.phys-list li { position: relative; padding-left: 20px; }
.phys-list li::before { content: ''; position: absolute; left: 2px; top: 6px; width: 8px; height: 8px; background: var(--acc); box-shadow: 2px 2px 0 var(--acc-lo); }
.phys-fine { margin: 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.phys-foot .btn { margin-left: 0; }
.phys-foot .phys-acts { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.phys-foot a.btn[hidden] { display: none; }
@media (min-width: 760px) {
  .phys-grid { grid-template-columns: 1.15fr .85fr; }
  .phys-tabs { padding: 12px 14px; }
  .phys-info { padding: 18px 20px 12px; }
}

/* 3D-сцена: тёмная студия с мягким светом сверху и глянцевым полом */
.p3-stage { position: relative; height: min(46vh, 320px); min-height: 250px; overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none;
  background: radial-gradient(110% 85% at 50% 16%, #2d2d33 0%, #141417 48%, #060607 100%); }
.p3-stage::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: linear-gradient(to bottom, rgba(255,255,255,.035), rgba(0,0,0,.35)); pointer-events: none; }
.p3-stage:focus-visible { outline: 2px dashed var(--acc); outline-offset: -4px; }
.p3-grab { cursor: grabbing; }
.p3-view { position: absolute; left: 50%; top: 50%; transform-origin: 50% 50%; transition: opacity .5s; }
.p3-loading .p3-view { opacity: 0; }
.p3-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity .5s; }
.p3-loading .p3-cv { opacity: 0; }
.p3-scene, .p3-refl { position: absolute; left: 0; top: 0; perspective: 1100px; }
.p3-refl { opacity: .22; transform: scaleY(-1);
  -webkit-mask-image: linear-gradient(to top, transparent 0, transparent var(--fl, 48px), #000 var(--fl, 48px), transparent calc(var(--fl, 48px) + 120px));
  mask-image: linear-gradient(to top, transparent 0, transparent var(--fl, 48px), #000 var(--fl, 48px), transparent calc(var(--fl, 48px) + 120px)); }
.p3-world { position: absolute; inset: 0; transform-style: preserve-3d; }
.p3-obj { position: absolute; transform-style: preserve-3d; }
.p3-l { position: absolute; inset: 0; -webkit-mask: var(--m) center / 100% 100% no-repeat; mask: var(--m) center / 100% 100% no-repeat; background: var(--c1-black, #1a1a1c); }
.p3-obj[data-mat="black"] .p3-l.core { background: var(--c2-black, #222); }
.p3-obj[data-mat="yellow"] .p3-l { background: var(--c1-yellow, #111); }
.p3-obj[data-mat="yellow"] .p3-l.core { background: var(--c2-yellow, #b38b10); }
.p3-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.p3-face img { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.p3-face::before, .p3-face::after { content: ''; position: absolute; inset: 0; pointer-events: none; -webkit-mask: var(--m) center / 100% 100% no-repeat; mask: var(--m) center / 100% 100% no-repeat; }
.p3-face::before { background: #000; opacity: var(--fo, 0); }
.p3-back::before { opacity: var(--bo, 0); }
.p3-face::after { background: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.85) 50%, transparent 62%) var(--sx, 50%) 0 / 280% 100% no-repeat; opacity: var(--sp, 0); }
.p3-ring { position: absolute; }
.p3-ring svg { display: block; width: 100%; height: 100%; }
.p3-shadow { position: absolute; left: 0; top: 0; background: radial-gradient(closest-side, rgba(0,0,0,.9), rgba(0,0,0,.5) 55%, transparent); }
.p3-hint { position: absolute; left: 50%; bottom: 12px; translate: -50% 0; padding: 6px 10px; white-space: nowrap; pointer-events: none; color: #DDDDE2; font: 700 13px/1 var(--f-ui);
  background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.14); transition: opacity .4s; }
.p3-hint span { color: var(--acc); }
.p3-used .p3-hint, .p3-loading .p3-hint { opacity: 0; }
.p3-load { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font: 700 15px var(--f-ui); }
@media (min-width: 760px) { .p3-stage { height: 470px; } }
@media (prefers-reduced-motion: reduce) { .new-tag::after, .hx-new { animation: none; } }
.receipt .phys-li span { color: var(--muted); font-style: italic; }
.p3-obj[data-plug] .p3-l.core { background: linear-gradient(var(--c3, #888) 0 var(--pt), var(--c2-yellow, #b38b10) var(--pt)); }
.p3-l.np { -webkit-mask: var(--m) center / 100% 100% no-repeat, linear-gradient(transparent var(--pt), #000 var(--pt)); -webkit-mask-composite: source-in;
  mask: var(--m) center / 100% 100% no-repeat, linear-gradient(transparent var(--pt), #000 var(--pt)); mask-composite: intersect; }
/* крышка флешки: полость под разъём. Внутренние слои — с вырезом (flash-cap-c.webp), у стенок внутри темно */
.p3-l.cv { -webkit-mask-image: var(--mc); mask-image: var(--mc); }
.p3-obj[data-cav] .p3-l:not(.cv) { background-image: linear-gradient(#060607, #18181b); background-size: var(--cw) var(--ch); background-position: var(--cx) var(--cy, 0); background-repeat: no-repeat; }
.p3-btn { position: absolute; z-index: 2; right: 10px; top: 10px; min-height: 40px; padding: 8px 12px; cursor: pointer; border: 0; font: 700 15px/1 var(--f-ui); color: #000;
  background: var(--acc); box-shadow: inset -3px -3px 0 var(--acc-lo), inset 3px 3px 0 var(--acc-hi); }
.p3-btn[aria-pressed="true"] { background: var(--fg); box-shadow: inset -3px -3px 0 #9A9AA0, inset 3px 3px 0 #fff; }
.p3-loading .p3-btn { visibility: hidden; }
/* флешка: лицо и оборот корпуса — без разъёма; разъём — свои грани, тоньше корпуса */
.p3-face.cutp { clip-path: inset(var(--pt) 0 0 0); }
.p3-face.plugf { clip-path: inset(0 0 calc(100% - var(--pt)) 0); }
.p3-capped .p3-face.cutp { clip-path: inset(calc(var(--pt) + 6%) 0 0 0); }

/* ---------- акция «Новогодний подарок» (30.11–30.12.2026): красные плашки (первый экран, верх калькулятора), подсказка над чеком, строка в чеке ----------
   Плашки видны только во время акции (app.js снимает hidden). Карамельная трость — assets/ny/cane.svg (пиксели, 8 × 17). */
.ny-plate { position: relative; display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; padding: 12px 12px 9px; color: #fff; text-decoration: none;
  background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,.22) 0 1px, transparent 1.6px) 0 0 / 23px 23px,
    radial-gradient(circle at 70% 70%, rgba(255,255,255,.14) 0 1px, transparent 1.6px) 5px 9px / 31px 31px,
    linear-gradient(180deg, #E0303F 0%, #B5131F 100%);
  border: 2px solid #FFD25A; box-shadow: 0 4px 0 #4A070D, 0 0 0 2px #0b0b0d, inset 0 0 0 2px rgba(255,255,255,.12); }
.ny-plate[hidden] { display: none; }
/* гирлянда по верхнему краю: провод и мигающие огоньки */
.ny-plate::before { content: ''; position: absolute; left: 10px; right: 10px; top: -6px; height: 11px; pointer-events: none;
  background:
    radial-gradient(circle, #FFD25A 0 2.5px, transparent 3px) 0 6px / 40px 11px repeat-x,
    radial-gradient(circle, #5BD67F 0 2.5px, transparent 3px) 10px 6px / 40px 11px repeat-x,
    radial-gradient(circle, #5AB1FF 0 2.5px, transparent 3px) 20px 6px / 40px 11px repeat-x,
    radial-gradient(circle, #FF8A8A 0 2.5px, transparent 3px) 30px 6px / 40px 11px repeat-x,
    linear-gradient(#1b1b1f, #1b1b1f) 0 3px / 100% 2px no-repeat;
  animation: ny-lights 1.6s steps(1) infinite; }
@keyframes ny-lights { 50% { filter: brightness(.5) saturate(.6); } }
.ny-cane { flex: none; width: 16px; height: 34px; background: url(assets/ny/cane.svg) center / contain no-repeat; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.35)); }
.ny-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ny-lab { font: 700 10px/1.1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: #FFE6A3; }
.ny-main { font: 700 15px/1.2 var(--f-ui); }
.ny-big { font: 700 21px/1 var(--f-ui); color: #FFD25A; text-shadow: 2px 2px 0 #5A0A10; margin-right: 2px; unicode-bidi: isolate; direction: ltr; }
.ny-sub { font-weight: 400; color: #FFE2E2; white-space: nowrap; }
.ny-arr { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-left: 4px; font-style: normal; font: 700 17px/1 var(--f-ui); color: #2A0A0E; background: #FFD25A;
  box-shadow: inset -3px -3px 0 #C9951B, inset 3px 3px 0 #FFF1BF; transition: translate .12s steps(2); }
[dir="rtl"] .ny-arr { transform: scaleX(-1); }
.ny-hero { align-self: flex-start; display: inline-flex; max-width: 100%; cursor: pointer; animation: ny-glow 2.6s ease-in-out infinite; }
.ny-hero:hover .ny-arr, .ny-hero:focus-visible .ny-arr { translate: 2px 0; }
.ny-hero:focus-visible { outline: 2px dashed #FFD25A; outline-offset: 4px; }
@keyframes ny-glow { 0%, 100% { box-shadow: 0 4px 0 #4A070D, 0 0 0 2px #0b0b0d, inset 0 0 0 2px rgba(255,255,255,.12), 0 0 0 0 rgba(224,48,63,0); }
  50% { box-shadow: 0 4px 0 #4A070D, 0 0 0 2px #0b0b0d, inset 0 0 0 2px rgba(255,255,255,.12), 0 0 20px 3px rgba(224,48,63,.5); } }
.ny-calc { margin: 4px 0 18px; }
@media (max-width: 560px) {
  .ny-plate { gap: 8px; padding: 11px 9px 8px; }
  .ny-main { font-size: 14px; }
  .ny-big { font-size: 19px; }
  .ny-sub { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .ny-plate::before, .ny-hero { animation: none; } }
/* подсказка над чеком */
.ny-note { position: relative; margin: 0 0 12px; padding: 10px 12px 10px 42px; border: 2px solid #D7263D; font: 15px/1.3 var(--f-ui); color: var(--fg);
  background: linear-gradient(180deg, rgba(224,48,63,.22), rgba(181,19,31,.12)); }
.ny-note::before { content: ''; position: absolute; left: 12px; top: 10px; width: 18px; height: 38px; background: url(assets/ny/cane.svg) center / contain no-repeat; image-rendering: pixelated; }
.ny-note b { display: block; color: #FFD25A; font-weight: 700; }
.ny-note span { display: block; margin-top: 3px; color: #FFD9D9; }
.ny-note span b { display: inline; color: #fff; }
.ny-note.got { border-color: #FFD25A; background: linear-gradient(180deg, rgba(255,210,90,.18), rgba(224,48,63,.12)); }
.ny-bar { display: block; height: 6px; margin-top: 8px; background: rgba(255,255,255,.14); }
.ny-bar i { display: block; height: 100%; background: repeating-linear-gradient(135deg, #fff 0 6px, #E0303F 6px 12px); transition: width .3s steps(6); }
.receipt li.ny-li span, .receipt li.ny-li b { color: #FFD25A; }
.hx-new[hidden] { display: none; }
