/* ВЫКРУТИСЬ — режим расследования и главная страница.
   Тот же язык, что и у всей игры: тёмное стекло, тёплый белый, один оранжевый акцент. */

:root {
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  --paper: #f3eee2;
  --paper-ink: #1f1b16;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---------- Прячем старый интерфейс в режиме расследования ---------- */
body.quest-mode #topbar, body.quest-mode #dock, body.quest-mode #panel, body.quest-mode #intro,
body.quest-mode .city-top, body.quest-mode .city-help, body.quest-mode #tip { display: none !important; }
body.quest-mode .city-view { bottom: calc(22px + var(--safe-b)); right: 18px; display: flex; gap: 6px; }
body.quest-mode .city-view .btn { height: 38px; padding: 0 12px; font-size: 13px; }
@media (max-width: 860px) { body.quest-mode .city-view { bottom: calc(104px + var(--safe-b)); right: 12px; } body.quest-mode .city-view .btn:nth-child(n+3) { display: none; } }
body.quest-scene .city-pins, body.quest-scene .city-card, body.quest-scene .qh-dock, body.quest-scene .city-view { pointer-events: none !important; }
body.quest-scene .qh-dock { opacity: 0.35; }
body.quest-scene .city-card { opacity: 0 !important; }

#quest { position: absolute; inset: 0; pointer-events: none; }
#quest > * { pointer-events: auto; }
#quest > .qhud { pointer-events: none; }

/* ---------- Логотип ---------- */
.logo-mark { display: inline-grid; width: 30px; height: 30px; flex: none; filter: drop-shadow(0 6px 16px rgba(255, 110, 20, 0.35)); }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-mark.xl { width: 64px; height: 64px; }

/* ---------- HUD ---------- */
.qhud { position: absolute; inset: 0; z-index: 20; opacity: 0; transition: opacity 0.6s var(--ease); }
.qhud.on { opacity: 1; }
.qhud:not(.on) * { pointer-events: none !important; }
.qh-top { position: absolute; top: calc(14px + var(--safe-t)); left: 16px; right: 16px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.qh-top > * { pointer-events: auto; }
.qh-brand { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 9px; border-radius: 999px; background: linear-gradient(180deg, var(--glass-a), var(--glass-b)); backdrop-filter: blur(30px) saturate(170%); -webkit-backdrop-filter: blur(30px) saturate(170%); border: 1px solid var(--stroke); box-shadow: 0 16px 40px rgba(0,0,0,.4); transition: transform .4s var(--spring); }
.qh-brand:active { transform: scale(.96); }
.qh-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.qh-brand b { font-size: 14px; font-weight: 680; letter-spacing: -0.01em; white-space: nowrap; }
.qh-brand small { font-size: 11px; color: var(--ink-3); }
.qh-obj { flex: 1 1 auto; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px 0 7px; border-radius: 999px; text-align: left; background: linear-gradient(180deg, rgba(52, 44, 38, .8), rgba(24, 21, 19, .82)); backdrop-filter: blur(30px) saturate(170%); -webkit-backdrop-filter: blur(30px) saturate(170%); border: 1px solid rgba(255, 150, 80, .28); box-shadow: 0 16px 44px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08); transition: transform .4s var(--spring), border-color .3s; min-width: 0; }
.qh-obj:hover { border-color: rgba(255, 150, 80, .55); }
.qh-obj:active { transform: scale(.98); }
.qh-obj-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 19px; flex: none; box-shadow: 0 6px 18px rgba(255,122,26,.45); }
.qh-obj-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.qh-obj-t small { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.qh-obj-t b { font-size: 15px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qh-obj.flash .qh-obj-ic { animation: qh-flash 1.2s var(--ease); }
@keyframes qh-flash { 0% { transform: scale(1); } 30% { transform: scale(1.25); box-shadow: 0 0 0 10px rgba(255,122,26,.25); } 100% { transform: scale(1); } }
.qh-turn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); font-size: 12px; font-weight: 700; white-space: nowrap; }
.qh-turn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.qh-right { display: flex; align-items: center; gap: 2px; height: 48px; padding: 0 6px; border-radius: 999px; }
.qh-chip { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px; border-radius: 999px; font-size: 14px; color: var(--ink); white-space: nowrap; position: relative; }
.qh-chip + .qh-chip::before { content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 1px; background: var(--stroke-2); }
.qh-chip .i { font-size: 16px; color: var(--ink-3); }
.qh-chip b { font-weight: 650; }
.qh-clock span { display: flex; flex-direction: column; line-height: 1.05; }
.qh-clock small { font-size: 10.5px; color: var(--ink-3); }
.qh-clock b { font-size: 15px; }
.qh-ring { width: 20px; height: 20px; display: block; }
.qh-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.qh-ring circle { fill: none; stroke-width: 4; }
.qh-ring .bg { stroke: rgba(255,255,255,.14); }
.qh-ring .fg { stroke: var(--accent); stroke-dasharray: 100; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.qh-timer.warn b { color: var(--neg); }
.qh-timer.warn .fg { stroke: var(--neg); }
.qh-hints { color: var(--gold); transition: background .2s; }
.qh-hints:hover { background: var(--fill-2); }
.qh-hints .i { color: var(--gold); }
.qh-hints.empty, .qh-hints.empty .i { color: var(--ink-4); }
.qh-money.bump b { animation: bump .6s var(--spring); }
@keyframes bump { 40% { transform: scale(1.18); } }
.qh-float { position: absolute; top: 100%; right: 6px; font-size: 13px; font-weight: 700; animation: float-up 1.5s var(--ease) forwards; pointer-events: none; }
.qh-float.pos { color: var(--pos); } .qh-float.neg { color: var(--neg); }
@keyframes float-up { 0% { opacity: 0; transform: translateY(-4px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(18px); } }
.qh-bat .cell { width: 24px; height: 12px; border: 1.5px solid var(--ink-3); border-radius: 4px; padding: 1.5px; position: relative; }
.qh-bat .cell::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; border-radius: 1px; background: var(--ink-3); }
.qh-bat .cell i { display: block; height: 100%; border-radius: 2px; background: var(--pos); transition: width .6s var(--ease); }
.qh-bat.low .cell i { background: var(--neg); }
.qh-bat.low b { color: var(--neg); }
.qh-bat.dead { animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .45; } }

.qh-dock { position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; border-radius: 26px; pointer-events: auto; transition: opacity .3s; }
.qh-dock button { position: relative; width: 84px; height: 62px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-2); transition: background .2s, color .2s, transform .4s var(--spring); }
.qh-dock button:hover { background: var(--fill-2); color: var(--ink); }
.qh-dock button:active { transform: scale(.92); }
.qh-dock .ic { position: relative; font-size: 23px; display: grid; }
.qh-dock small { font-size: 11.5px; font-weight: 600; }
.qh-dock .badge { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--neg); color: #fff; font: 700 11px/18px var(--font); text-align: center; box-shadow: 0 0 0 2px #1a1a1d; }
.qh-dock button.pulse .ic { animation: dock-pulse .8s var(--spring); }
@keyframes dock-pulse { 30% { transform: scale(1.35); color: var(--accent); } }

.qh-banners { position: absolute; top: calc(86px + var(--safe-t)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.qh-banner { display: flex; align-items: center; gap: 12px; padding: 10px 20px 10px 10px; border-radius: 999px; background: rgba(20, 20, 22, .9); backdrop-filter: blur(24px); border: 1px solid rgba(255,122,26,.4); box-shadow: 0 20px 50px rgba(0,0,0,.5); opacity: 0; transform: translateY(-16px) scale(.96); transition: opacity .45s var(--ease), transform .7s var(--spring); }
.qh-banner.on { opacity: 1; transform: none; }
.qh-banner .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 18px; }
.qh-banner.done { border-color: rgba(48,209,88,.45); }
.qh-banner.done .ic { background: var(--pos); }
.qh-banner span { display: flex; flex-direction: column; line-height: 1.2; }
.qh-banner small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.qh-banner b { font-size: 15px; }
.qh-banner ul { margin: 2px 0 0; padding-left: 16px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.qh-item { position: absolute; left: 50%; top: 42%; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 14px 20px 14px 14px; border-radius: 20px; background: rgba(28, 26, 24, .94); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 80px rgba(0,0,0,.6); opacity: 0; transform: translate(-50%, -50%) scale(.9); transition: opacity .35s var(--ease), transform .6s var(--spring); pointer-events: none; }
.qh-item.on { opacity: 1; transform: translate(-50%, -50%); }
.qh-item.fly { transition: transform .5s var(--ease-io), opacity .5s; opacity: 0; }
.qh-item > .i { font-size: 30px; color: var(--accent); }
.qh-item span { display: flex; flex-direction: column; }
.qh-item small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.qh-item b { font-size: 16px; }

@media (max-width: 860px) {
  .qh-top { flex-wrap: wrap; gap: 8px; top: calc(10px + var(--safe-t)); left: 10px; right: 10px; }
  .qh-brand { height: 42px; padding: 0 6px; }
  .qh-brand > span:last-child { display: none; }
  .qh-right { height: 42px; margin-left: auto; padding: 0 2px; }
  .qh-chip { padding: 0 7px; font-size: 13px; }
  .qh-clock small { display: none; }
  .qh-bat .cell { display: none; }
  .qh-obj { order: 3; flex-basis: 100%; max-width: none; height: 48px; }
  .qh-dock { bottom: calc(10px + var(--safe-b)); }
  .qh-dock button { width: 74px; height: 58px; }
  .qh-banners { top: calc(118px + var(--safe-t)); }
}
@media (max-width: 420px) { .qh-clock > .i, .qh-ring, .qh-hints .i { display: none; } .qh-chip { padding: 0 6px; gap: 4px; font-size: 12.5px; } .qh-clock b { font-size: 13.5px; } }

/* ---------- Карта в режиме расследования ---------- */
.city-pin.quest-known { background: rgba(40, 22, 10, .92); border-color: rgba(255,122,26,.65); box-shadow: 0 0 0 4px rgba(255,122,26,.16), 0 10px 26px rgba(0,0,0,.45); }
.city-pin.quest-known .pi { color: #fff; }
.city-pin.bus { padding: 3px 8px 3px 3px; font-size: 11px; background: rgba(12, 32, 48, .86); }
.city-pin.bus .pi { width: 18px; height: 18px; font-size: 11px; color: #002; }
.city-card .ds.closed { color: var(--neg); }
.q-go { display: flex; flex-direction: column; gap: 8px; }
.q-go-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; }
.q-go-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 10px 9px; border-radius: 16px; background: var(--fill-2); border: 1px solid var(--stroke); text-align: left; transition: background .2s, transform .35s var(--spring), border-color .2s; }
.q-go-opt:hover { background: var(--fill-3); border-color: var(--stroke-2); }
.q-go-opt:active { transform: scale(.96); }
.q-go-opt .i { font-size: 19px; color: var(--ink-2); margin-bottom: 4px; }
.q-go-opt b { font-size: 13.5px; }
.q-go-opt small { font-size: 12px; color: var(--ink-3); }
.q-go-opt span { font-size: 12px; font-weight: 650; color: var(--ink-2); }
.q-go-opt.taxi { background: rgba(255, 214, 10, .1); border-color: rgba(255,214,10,.25); }
.q-go-opt.taxi .i { color: var(--gold); }
.q-go-opt.bus .i { color: var(--sky); }
.q-go-opt[disabled] { opacity: .38; pointer-events: none; }
.city-browser-group { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 12px 4px 4px; }

/* ---------- Сцена разговора ---------- */
.qstage { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.qstage.on { pointer-events: auto; }
.qs-interior { position: absolute; inset: 0; opacity: 0; transition: opacity .9s var(--ease); overflow: hidden; background: #000; }
.qstage.on.inside .qs-interior { opacity: 1; }
.qs-interior i { position: absolute; inset: -3%; background: #111 center / cover no-repeat; transform-origin: 50% 45%; }
.qs-interior i.enter { animation: walk-in-room 1.6s var(--ease) both, room-drift 28s 1.6s ease-in-out infinite alternate; }
@keyframes walk-in-room { from { transform: scale(1.22); filter: blur(10px) brightness(.6); } to { transform: scale(1.04); filter: none; } }
@keyframes room-drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); } }
.qstage.inside .qs-shade { background: radial-gradient(120% 90% at 50% 30%, rgba(0,0,0,0) 40%, rgba(0,0,0,.45)), linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,.25) 50%, rgba(0,0,0,.85) 100%); }
.qs-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.82)); opacity: 0; transition: opacity .5s var(--ease); }
.qstage.on .qs-shade { opacity: 1; }
.qs-card { position: absolute; left: 50%; bottom: calc(22px + var(--safe-b)); width: min(780px, calc(100% - 24px)); transform: translate(-50%, 30px); opacity: 0; transition: transform .7s var(--spring), opacity .35s var(--ease); display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 18px; border-radius: 30px; background: linear-gradient(180deg, rgba(34, 32, 30, .86), rgba(16, 15, 14, .9)); backdrop-filter: blur(34px) saturate(160%); -webkit-backdrop-filter: blur(34px) saturate(160%); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 40px 120px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08); max-height: calc(100% - 150px); }
.qstage.on .qs-card { transform: translate(-50%, 0); opacity: 1; }
.qs-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 22px; }
.qs-place { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); }
.qs-place .i { color: var(--accent); font-size: 15px; }
.qs-place b { font-weight: 650; color: var(--ink); }
.qs-place small { color: var(--ink-3); }
.qs-title { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-left: auto; }
.qs-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pos); font-weight: 700; }
.qs-live .i { font-size: 15px; animation: blink 1.2s infinite; }
.qstage.call .qs-card { border-color: rgba(48, 209, 88, .35); }
.qs-who { display: flex; align-items: center; gap: 12px; opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .5s var(--spring); }
.qs-who.on { opacity: 1; transform: none; }
.qs-who b { display: block; font-size: 17px; font-weight: 680; letter-spacing: -0.01em; }
.qs-who small { font-size: 13px; color: var(--ink-3); }
.qs-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--c) 80%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 60%, #000)); color: #fff; font-weight: 750; font-size: 14px; letter-spacing: -0.02em; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px rgba(0,0,0,.35); }
.qs-av.lg { width: 50px; height: 50px; font-size: 18px; }
.qs-av.xl { width: 116px; height: 116px; font-size: 42px; }
.qs-log { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 36vh; padding-right: 4px; scrollbar-width: thin; }
.qs-line { font-size: 17px; line-height: 1.52; opacity: 0; transform: translateY(6px); transition: opacity .35s var(--ease), transform .45s var(--ease); user-select: text; -webkit-user-select: text; }
.qs-line.on { opacity: 1; transform: none; }
.qs-line.old { opacity: .42; }
.qs-line.narration { color: var(--ink-2); font-family: var(--serif); font-style: italic; font-size: 17.5px; }
.qs-line.line .qs-name { display: block; font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
.qs-line.self { align-self: flex-end; max-width: 80%; padding: 9px 14px; border-radius: 18px 18px 6px 18px; background: rgba(255,122,26,.16); border: 1px solid rgba(255,122,26,.3); color: #ffd9bd; font-size: 15.5px; }
.qs-foot { display: flex; flex-direction: column; gap: 10px; min-height: 20px; }
.qs-tap { align-self: flex-end; font-size: 12px; color: var(--ink-3); animation: blink 1.6s infinite; }
.qs-prompt { font-size: 13px; color: var(--ink-3); }
.qs-turn { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--c); }
.qs-turn i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
.qs-opts { display: flex; flex-direction: column; gap: 7px; }
.qs-opt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 16px 12px 12px; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); font-size: 15.5px; font-weight: 560; line-height: 1.35; opacity: 0; transform: translateY(8px); animation: opt-in .5s var(--spring) forwards; animation-delay: calc(var(--i) * 60ms); transition: background .18s, border-color .18s, transform .3s var(--spring); }
.qs-opt:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.2); }
.qs-opt:active { transform: scale(.985); }
.qs-opt .k { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 750; background: rgba(255,255,255,.1); color: var(--ink-3); }
@keyframes opt-in { to { opacity: 1; transform: none; } }
.qs-extra { display: flex; gap: 8px; flex-wrap: wrap; }
.qs-ghost { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 620; color: var(--ink-2); border: 1px solid var(--stroke-2); transition: background .2s, color .2s; }
.qs-ghost:hover { background: var(--fill-2); color: var(--ink); }
.qs-ghost.show { color: var(--accent-2); border-color: rgba(255,122,26,.4); background: rgba(255,122,26,.08); }
.qs-ghost.show:hover { background: rgba(255,122,26,.16); }
.qs-ghost .i { font-size: 17px; }
@media (max-width: 860px) {
  .qs-card { bottom: calc(10px + var(--safe-b)); padding: 14px 14px 14px; border-radius: 24px; max-height: calc(100% - 130px); }
  .qs-line { font-size: 16px; } .qs-line.narration { font-size: 16.5px; }
  .qs-log { max-height: 42vh; }
  .qs-opt { font-size: 15px; padding: 11px 12px 11px 10px; }
}

/* ---------- Улики ---------- */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ev-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 20px; background: var(--fill); border: 1px solid var(--stroke); text-align: left; transition: transform .45s var(--spring), background .2s, border-color .2s; animation: opt-in .5s var(--spring) both; animation-delay: calc(var(--i) * 40ms); opacity: 0; transform: translateY(8px); }
.ev-card:hover { background: var(--fill-2); border-color: var(--stroke-2); transform: translateY(-2px); }
.ev-card.fresh { border-color: rgba(255,122,26,.5); }
.ev-t { display: flex; flex-direction: column; gap: 2px; padding: 0 2px 2px; }
.ev-t b { font-size: 14px; font-weight: 640; line-height: 1.25; }
.ev-t small { font-size: 12px; color: var(--ink-3); }
.ev-new { position: absolute; top: 16px; right: 16px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 10.5px/18px var(--font); font-style: normal; }
.mthumb { aspect-ratio: 4 / 3; border-radius: 14px; display: grid; place-items: center; font-size: 34px; color: rgba(0,0,0,.55); background: linear-gradient(145deg, color-mix(in srgb, var(--t) 100%, #fff 10%), color-mix(in srgb, var(--t) 80%, #000 18%)); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 18px rgba(0,0,0,.25); position: relative; overflow: hidden; }
.mthumb.k-newspaper::after { content: ""; position: absolute; inset: 18% 14%; background: repeating-linear-gradient(180deg, rgba(0,0,0,.18) 0 2px, transparent 2px 7px); opacity: .5; }
.mthumb.k-chat, .mthumb.k-email, .mthumb.k-voice { color: #fff; }

/* ---------- Просмотр материала ---------- */
.qm { position: absolute; inset: 0; z-index: 77; display: flex; flex-direction: column; background: radial-gradient(120% 90% at 50% 30%, #2d2824 0%, #141210 60%, #0a0908 100%); opacity: 0; transition: opacity .4s var(--ease); }
.qm.on { opacity: 1; }
.qm::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.012) 0 2px, transparent 2px 7px); pointer-events: none; }
.qm-head { position: relative; display: flex; align-items: center; gap: 14px; padding: calc(16px + var(--safe-t)) 20px 10px; }
.qm-ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qm-ttl small { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.qm-ttl b { font-size: 19px; font-weight: 680; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qm-player { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); font-weight: 700; font-size: 13px; }
.qm-player i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.qm-x { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); font-size: 18px; }
.qm-tabs { position: relative; display: flex; gap: 6px; padding: 0 20px 6px; overflow-x: auto; }
.qm-tabs button { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 620; color: var(--ink-2); background: var(--fill); border: 1px solid var(--stroke); white-space: nowrap; }
.qm-tabs button.on { background: #f5f5f7; color: #000; border-color: transparent; }
.qm-stage { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 30px; display: flex; justify-content: center; align-items: flex-start; }
.qm-object { animation: obj-in .7s var(--spring) both; user-select: text; -webkit-user-select: text; }
@keyframes obj-in { from { opacity: 0; transform: translateY(26px) rotate(-1deg) scale(.97); } }
.qm-foot { position: relative; display: flex; justify-content: center; padding: 10px 20px calc(18px + var(--safe-b)); }

/* Газета */
.m-paper { width: min(820px, 100%); background: linear-gradient(180deg, #f5f0e3, #ece5d3); color: var(--paper-ink); font-family: var(--serif); padding: 26px 30px 30px; border-radius: 3px; box-shadow: 0 40px 90px rgba(0,0,0,.6), 0 2px 0 rgba(255,255,255,.4) inset; transform: rotate(-.35deg); position: relative; }
.m-paper::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 80% at 80% 0%, rgba(120,90,40,.08), transparent 60%), radial-gradient(90% 60% at 0% 100%, rgba(120,90,40,.1), transparent 60%); }
.mp-top { display: flex; justify-content: space-between; font: 600 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: #6b6153; }
.m-paper h1 { font-family: var(--serif); font-size: clamp(30px, 5.4vw, 52px); font-weight: 700; text-align: center; letter-spacing: -0.01em; margin: 10px 0 6px; line-height: 1; }
.mp-rule { border-top: 3px double #2b2620; margin-bottom: 14px; }
.mp-sheet + .mp-sheet { margin-top: 26px; }
.mp-sheet-h { font: 700 11px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: #8c2f1d; border-bottom: 1px solid rgba(0,0,0,.25); padding-bottom: 8px; margin-bottom: 14px; }
.mp-cols { columns: 2; column-gap: 28px; column-rule: 1px solid rgba(0,0,0,.14); }
.mp-cols > * { break-inside: avoid; margin: 0 0 12px; }
.mp-kicker { font: 700 11px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #a3321c; }
.mp-hl { font-size: 26px; line-height: 1.12; font-weight: 700; column-span: all; margin-bottom: 8px; }
.mp-lead { font-style: italic; font-size: 16px; line-height: 1.45; }
.mp-text { font-size: 15px; line-height: 1.5; text-align: justify; hyphens: auto; }
.mp-side { border: 1.5px solid #2b2620; padding: 12px 14px; background: rgba(255,255,255,.35); }
.mp-side b { display: block; font-family: var(--font); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.mp-side ol { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.mp-sec { font: 700 12px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; border-top: 2px solid #2b2620; padding-top: 8px; }
.mp-ad { position: relative; font-size: 14px; line-height: 1.42; padding: 8px 10px; border: 1px solid rgba(0,0,0,.28); background: rgba(255,255,255,.28); }
.mp-ad b { font-family: var(--font); font-size: 13px; text-transform: uppercase; letter-spacing: .02em; }
.mp-ad .pen { position: absolute; inset: -16px -20px; pointer-events: none; }
.mp-ad .pen svg { width: 100%; height: 100%; overflow: visible; }
.mp-ad .pen path { fill: none; stroke: #1d47b8; stroke-width: 2.4; stroke-linecap: round; opacity: .82; stroke-dasharray: 700; stroke-dashoffset: 700; animation: pen 1.6s .5s var(--ease) forwards; vector-effect: non-scaling-stroke; }
@keyframes pen { to { stroke-dashoffset: 0; } }
.mp-box { border: 2px solid #2b2620; padding: 10px 12px; }
.mp-box b { display: block; font-size: 16px; margin-bottom: 4px; }
.mp-box p { font-size: 14px; line-height: 1.45; }
.mp-weather { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4a4239; }
.mp-quote { margin: 0; padding: 6px 0 6px 14px; border-left: 3px solid #a3321c; font-style: italic; font-size: 16px; }
.mp-quote cite { display: block; font-size: 12.5px; font-style: normal; color: #6b6153; margin-top: 4px; }
.mp-photo { margin: 0; } .mp-photo .ph { aspect-ratio: 16 / 10; background: #b9b2a2 center / cover; filter: grayscale(1) contrast(1.1); }
.mp-photo figcaption { font-size: 12px; color: #5a5146; margin-top: 4px; }
@media (max-width: 640px) { .m-paper { padding: 18px 16px 22px; } .mp-cols { columns: 1; } .mp-hl { font-size: 22px; } }

/* Переписка */
.m-chat { width: min(420px, 100%); border-radius: 26px; background: #111214; border: 1px solid rgba(255,255,255,.1); overflow: hidden; box-shadow: 0 40px 90px rgba(0,0,0,.6); }
.m-chat header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #1c1d20; border-bottom: 1px solid rgba(255,255,255,.08); }
.m-chat header .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #3a3b40; font-weight: 700; }
.m-chat header b { display: block; font-size: 15px; } .m-chat header small { font-size: 12px; color: var(--ink-3); }
.mc-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 12px 18px; background: radial-gradient(100% 60% at 50% 0%, #1a1c22, #0e0f12); }
.mc-msg { max-width: 84%; align-self: flex-start; padding: 8px 12px 6px; border-radius: 18px 18px 18px 6px; background: #26282e; font-size: 14.5px; line-height: 1.38; display: flex; flex-direction: column; }
.mc-msg.me { align-self: flex-end; background: #0a84ff; border-radius: 18px 18px 6px 18px; }
.mc-msg time { align-self: flex-end; font-size: 10.5px; color: rgba(255,255,255,.55); margin-top: 2px; }
.mc-sys { align-self: center; text-align: center; font-size: 12px; color: var(--ink-3); padding: 6px 12px; border-radius: 12px; background: rgba(255,255,255,.06); max-width: 90%; }

/* Чек */
.m-receipt { width: 300px; background: #fbfaf5; color: #222; font: 13px/1.5 var(--mono); padding: 22px 20px 34px; box-shadow: 0 30px 70px rgba(0,0,0,.55); position: relative; transform: rotate(1.2deg); -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 10px repeat-x; mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 10px repeat-x; }
.mr-shop { text-align: center; font-weight: 700; font-size: 15px; }
.mr-c { text-align: center; color: #555; }
.mr-dash { border-top: 1px dashed #999; margin: 10px 0; }
.mr-row { display: flex; justify-content: space-between; gap: 10px; }
.mr-row.total { font-weight: 700; font-size: 15px; }
.mr-bar { height: 38px; margin-top: 12px; background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px, #111 8px 11px, transparent 11px 12px); }

/* Документ */
.m-doc { width: min(580px, 100%); background: #fdfdfa; color: #1b1f2a; padding: 28px 30px 34px; border-radius: 4px; box-shadow: 0 40px 90px rgba(0,0,0,.6); position: relative; font-family: var(--serif); }
.md-h { font: 700 11px/1.3 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #3a4f8a; border-bottom: 2px solid #3a4f8a; padding-bottom: 8px; }
.m-doc h3 { font-size: 21px; margin: 14px 0 16px; line-height: 1.2; }
.m-doc dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 16px; margin: 0; font-size: 14.5px; }
.m-doc dt { color: #5b6273; font-family: var(--font); font-size: 12.5px; padding-top: 2px; }
.m-doc dd { margin: 0; border-bottom: 1px dotted #aab; padding-bottom: 4px; }
.md-photo { position: absolute; right: 30px; top: 60px; width: 76px; height: 96px; border: 1px solid #99a; display: grid; place-items: center; font-size: 34px; color: #99a; background: #eef0f4; }
.m-doc .md-photo + dl { margin-right: 96px; }
.md-text { margin-top: 14px; font-size: 14.5px; line-height: 1.5; }
.md-stamp { position: absolute; right: 36px; bottom: 26px; width: 120px; height: 120px; border-radius: 50%; border: 3px double rgba(58, 70, 180, .75); display: grid; place-items: center; transform: rotate(-16deg); color: rgba(58, 70, 180, .8); font: 800 15px/1 var(--font); letter-spacing: .08em; text-align: center; animation: stamp .5s .4s var(--spring) both; }
@keyframes stamp { from { opacity: 0; transform: rotate(-16deg) scale(1.6); } }
.md-sign { margin-top: 26px; font-family: var(--hand); font-size: 24px; color: #22326b; }

/* Фото */
.m-photo { margin: 0; width: min(360px, 100%); padding: 14px 14px 18px; background: #fafafa; box-shadow: 0 30px 70px rgba(0,0,0,.55); transform: rotate(-2deg); }
.m-photo .pic { aspect-ratio: 1; background: linear-gradient(160deg, #c7c9ce, #8a8d94) center / cover; display: grid; place-items: center; font-size: 80px; color: rgba(255,255,255,.7); }
.m-photo .pic.portrait { aspect-ratio: 35 / 45; width: 60%; margin: 0 auto; }
.m-photo figcaption { font-family: var(--hand); font-size: 22px; color: #333; margin-top: 10px; text-align: center; }

/* Визитка */
.m-card { width: min(380px, 100%); aspect-ratio: 1.75; background: linear-gradient(145deg, #ffffff, #eceef2); color: #1a1d24; padding: 22px 24px; border-radius: 8px; box-shadow: 0 30px 70px rgba(0,0,0,.55); display: flex; flex-direction: column; transform: rotate(-1.5deg); }
.mcard-org { font: 700 10.5px/1.2 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #3a4f8a; }
.mcard-name { font-family: var(--serif); font-size: 22px; font-weight: 700; margin-top: auto; }
.mcard-role { font-size: 13px; color: #5b6273; }
.mcard-lines { margin-top: auto; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.mcard-lines .ph { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }

/* Записка */
.m-note { width: min(400px, 100%); background: #fff5c4 repeating-linear-gradient(180deg, transparent 0 31px, rgba(60, 90, 160, .2) 31px 32px); color: #23304f; font-family: var(--hand); font-size: 26px; line-height: 32px; padding: 30px 28px 26px; box-shadow: 0 30px 70px rgba(0,0,0,.5); transform: rotate(1.6deg); }
.m-note .sign { text-align: right; margin-top: 10px; }

/* Бирка */
.m-label { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }
.m-label .sticker { width: 280px; padding: 16px 18px; border-radius: 10px; background: linear-gradient(150deg, #e9eaee, #b9bcc4); color: #1b1d22; font: 600 13px/1.5 var(--mono); box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 1px 0 #fff; }
.m-label .sticker .big { font-size: 17px; font-weight: 800; }
.m-label .bars { height: 34px; margin-top: 10px; background: repeating-linear-gradient(90deg, #111 0 1px, transparent 1px 3px, #111 3px 5px, transparent 5px 6px); }
.m-label .tag { position: relative; width: 210px; padding: 26px 16px 16px; background: #d8b889; color: #3b2a14; font: 15px/1.5 var(--hand); font-size: 21px; clip-path: polygon(14% 0, 86% 0, 100% 12%, 100% 100%, 0 100%, 0 12%); box-shadow: 0 20px 50px rgba(0,0,0,.5); transform: rotate(3deg); }
.m-label .tag .b { font: 800 12px/1.4 var(--font); letter-spacing: .08em; }
.m-label .tag .hole { position: absolute; top: 8px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #1d1a15; }

/* Письмо */
.m-email { width: min(560px, 100%); background: #f7f8fa; color: #1b1d22; border-radius: 16px; padding: 20px 22px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.m-email header { display: flex; align-items: center; gap: 10px; }
.m-email .av { width: 38px; height: 38px; border-radius: 50%; background: #0a84ff; color: #fff; display: grid; place-items: center; font-size: 18px; }
.m-email header b { display: block; } .m-email header small { color: #6b7280; font-size: 12px; }
.m-email h3 { font-size: 18px; margin: 14px 0 8px; }
.m-email p { font-size: 14.5px; line-height: 1.5; margin: 6px 0; }
.m-email .attach { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: #e7e9ee; font-size: 13px; }

/* Договор */
.m-contract { width: min(640px, 100%); background: #fbf9f3; color: #1d1b17; font-family: var(--serif); padding: 30px 34px; box-shadow: 0 40px 90px rgba(0,0,0,.6); }
.m-contract h3 { text-align: center; font-size: 20px; text-transform: uppercase; letter-spacing: .04em; }
.m-contract .sub { text-align: center; font-size: 13px; color: #555; margin: 4px 0 16px; }
.m-contract ol { padding-left: 22px; margin: 0; font-size: 14.5px; line-height: 1.55; display: flex; flex-direction: column; gap: 6px; }
.m-contract .small { font-size: 10.5px; color: #555; margin-top: 14px; line-height: 1.4; }
.m-contract .signs { display: flex; justify-content: space-between; margin-top: 22px; font-size: 13px; }

/* Билет */
.m-ticket { display: flex; width: min(600px, 100%); background: linear-gradient(135deg, #fff7ec, #ffe4c4); color: #2a1d10; border-radius: 16px; box-shadow: 0 30px 70px rgba(0,0,0,.55); overflow: hidden; }
.tk-l { flex: 1; padding: 18px 20px; }
.tk-carrier { font: 800 11px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #b3521a; }
.tk-route { display: flex; align-items: center; gap: 10px; font-size: 22px; margin: 10px 0 14px; }
.tk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; font-size: 14px; }
.tk-grid small { display: block; font-size: 10.5px; color: #8a6a4a; text-transform: uppercase; letter-spacing: .08em; }
.tk-r { width: 120px; border-left: 2px dashed rgba(0,0,0,.2); padding: 18px 14px; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; }
.tk-code { width: 84px; height: 84px; background: conic-gradient(#111 25%, transparent 0 50%, #111 0 75%, transparent 0) 0 0 / 14px 14px; border: 4px solid #111; }

/* Листовка и памятка */
.m-flyer { width: min(420px, 100%); background: var(--fc, #ffd75a); color: #1d1a10; padding: 26px 24px 0; box-shadow: 0 30px 70px rgba(0,0,0,.55); transform: rotate(-1deg); font-family: var(--font); }
.m-flyer h3 { font-size: 30px; font-weight: 900; line-height: 1; text-transform: uppercase; letter-spacing: -0.02em; }
.m-flyer .sub { font-size: 15px; font-weight: 700; margin: 8px 0 12px; }
.m-flyer p { font-size: 15px; line-height: 1.45; margin: 6px 0; }
.m-flyer .tear { display: flex; margin: 18px -24px 0; border-top: 2px dashed rgba(0,0,0,.4); }
.m-flyer .tear span { flex: 1; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; font-weight: 700; padding: 10px 4px; border-left: 1px dashed rgba(0,0,0,.3); height: 110px; }
.m-leaflet { width: min(480px, 100%); background: #eaf6ee; color: #10301c; padding: 22px 24px; border-radius: 8px; box-shadow: 0 30px 70px rgba(0,0,0,.5); border-top: 8px solid #2f8a4f; }
.lf-h { display: flex; align-items: center; gap: 8px; font: 700 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: #2f8a4f; }
.m-leaflet h3 { font-size: 21px; margin: 10px 0; }
.m-leaflet ol { padding-left: 20px; margin: 0; font-size: 14.5px; line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }
.m-leaflet .foot { font-size: 12.5px; color: #3c5a46; margin-top: 12px; }

/* Бумажное письмо */
.m-letter { width: min(560px, 100%); background: #f4ecd9; color: #2b2317; font-family: var(--hand); font-size: 25px; line-height: 1.3; padding: 34px 36px; box-shadow: 0 40px 90px rgba(0,0,0,.6); transform: rotate(.6deg); }
.m-letter .date { text-align: right; font-size: 21px; color: #6b5a3d; }
.m-letter p { margin: 10px 0; }
.m-letter .sign { text-align: right; margin-top: 16px; }
.m-letter .ps { font-size: 21px; color: #5a4a30; }

/* Выписка */
.m-statement { width: min(620px, 100%); background: #fbfcfe; color: #1b1f2a; padding: 22px 24px; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.55); font-size: 14px; }
.st-h { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #1b1f2a; padding-bottom: 8px; }
.m-statement h3 { font-size: 17px; margin: 12px 0; }
.m-statement table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.m-statement th { text-align: left; font-size: 11.5px; color: #6b7280; font-weight: 600; padding: 6px 4px; border-bottom: 1px solid #d5d9e0; }
.m-statement td { padding: 7px 4px; border-bottom: 1px solid #eceef2; }
.m-statement td:last-child, .m-statement th:last-child { text-align: right; white-space: nowrap; }
.m-statement .neg { color: #c0262d; } .m-statement .pos { color: #1c8a3a; }
.m-statement .foot { font-size: 12px; color: #6b7280; margin-top: 10px; }

/* Схема, голосовое, список */
.m-map { width: min(600px, 100%); background: #efe7d2; padding: 18px; box-shadow: 0 30px 70px rgba(0,0,0,.55); color: #2b2317; }
.m-map svg { width: 100%; height: auto; display: block; }
.m-map p { font-family: var(--hand); font-size: 22px; margin-top: 8px; }
.m-voice { width: min(420px, 100%); background: #16171b; border-radius: 22px; padding: 16px; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 70px rgba(0,0,0,.55); }
.m-voice header { display: flex; align-items: center; gap: 10px; } .m-voice header .av { width: 36px; height: 36px; border-radius: 50%; background: #bf5af2; display: grid; place-items: center; font-weight: 700; }
.m-voice header b { display: block; } .m-voice header small { color: var(--ink-3); font-size: 12px; }
.m-voice .wave { display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 10px 14px; border-radius: 16px; background: #0a84ff; }
.m-voice .wave i { flex: 1; height: 22px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.9) 0 2px, transparent 2px 5px); -webkit-mask: linear-gradient(90deg, #000 60%, rgba(0,0,0,.4)); mask: linear-gradient(90deg, #000 60%, rgba(0,0,0,.4)); clip-path: polygon(0 40%, 5% 20%, 10% 60%, 15% 10%, 20% 50%, 25% 30%, 30% 70%, 35% 20%, 40% 55%, 45% 5%, 50% 45%, 55% 25%, 60% 65%, 65% 35%, 70% 15%, 75% 50%, 80% 30%, 85% 60%, 90% 40%, 100% 50%, 100% 100%, 0 100%); }
.m-voice .tr { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.m-voice .tr small { display: block; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.m-list { width: min(420px, 100%); background: #fbfaf5; color: #1d1b17; padding: 22px 24px; box-shadow: 0 30px 70px rgba(0,0,0,.5); }
.m-list h3 { font-family: var(--hand); font-size: 28px; } .m-list ul { padding-left: 18px; font-family: var(--hand); font-size: 23px; line-height: 1.35; }

/* ---------- Экран «передай устройство» ---------- */
.q-handover { position: absolute; inset: 0; z-index: 88; display: grid; place-items: center; padding: 24px; background: radial-gradient(90% 70% at 50% 40%, color-mix(in srgb, var(--c) 35%, #111), #050505 75%); opacity: 0; transition: opacity .45s var(--ease); }
.q-handover.on { opacity: 1; }
.qh-in { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 440px; }
.qh-av { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #111; font-size: 48px; font-weight: 800; box-shadow: 0 0 0 12px color-mix(in srgb, var(--c) 25%, transparent), 0 30px 80px rgba(0,0,0,.5); animation: pop .8s var(--spring) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.qh-in small { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-top: 10px; }
.qh-in h2 { font-size: 42px; font-weight: 800; letter-spacing: -0.03em; }
.qh-in p { color: var(--ink-2); font-size: 16px; }
.qh-in .why { font-size: 14px; color: var(--ink-3); }
.qh-in .btn { margin-top: 14px; }

/* ---------- Телефон ---------- */
.q-phone { position: absolute; inset: 0; z-index: 68; pointer-events: none; }
.ph-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .4s; pointer-events: auto; }
.q-phone.on .ph-scrim { opacity: 1; }
.ph-frame { position: absolute; right: 28px; bottom: calc(96px + var(--safe-b)); width: 372px; height: min(760px, calc(100% - 120px)); border-radius: 54px; padding: 11px; background: linear-gradient(145deg, #3b3b40, #151517 40%, #2a2a2e); box-shadow: 0 0 0 1.5px #56565c inset, 0 60px 140px rgba(0,0,0,.75); transform: translateY(40px) rotate(2deg); opacity: 0; transition: transform .7s var(--spring), opacity .35s var(--ease); pointer-events: auto; }
.q-phone.on .ph-frame { transform: none; opacity: 1; }
.ph-island { position: absolute; top: 22px; left: 50%; width: 104px; height: 30px; margin-left: -52px; border-radius: 20px; background: #000; z-index: 3; }
.ph-screen { position: relative; height: 100%; border-radius: 44px; overflow: hidden; display: flex; flex-direction: column; background: radial-gradient(90% 60% at 20% 0%, #ff7a1a55, transparent 60%), radial-gradient(80% 70% at 100% 100%, #5e5ce655, transparent 60%), #0b0b0d; }
.ph-status { display: flex; justify-content: space-between; align-items: center; padding: 18px 30px 8px; font-size: 14px; flex: none; }
.ph-status b { font-weight: 650; font-variant-numeric: tabular-nums; }
.ph-bat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; }
.ph-bat > i { width: 24px; height: 12px; border: 1.5px solid rgba(255,255,255,.6); border-radius: 4px; padding: 1.5px; }
.ph-bat > i > i { display: block; height: 100%; background: #fff; border-radius: 2px; }
.ph-bat.low > i > i { background: var(--neg); } .ph-bat.low { color: var(--neg); }
.ph-home { flex: 1; display: flex; flex-direction: column; padding: 20px 22px; }
.ph-clock { text-align: center; margin: 18px 0 34px; }
.ph-clock b { display: block; font-size: 64px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ph-clock small { color: var(--ink-2); font-size: 14px; }
.ph-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 10px; }
.ph-app { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: opt-in .5s var(--spring) both; animation-delay: calc(var(--i) * 35ms); opacity: 0; transform: translateY(8px); }
.ph-app .ic { position: relative; width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; color: #fff; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 85%, #fff), var(--c) 60%); box-shadow: 0 8px 20px rgba(0,0,0,.35); transition: transform .35s var(--spring); }
.ph-app:active .ic { transform: scale(.9); }
.ph-app small { font-size: 11.5px; color: var(--ink); }
.ph-app .badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--neg); font: 700 12px/20px var(--font); padding: 0 6px; font-style: normal; }
.ph-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 4px 14px 10px; flex: none; }
.ph-nav b { font-size: 16px; font-weight: 650; }
.ph-back { display: inline-flex; align-items: center; gap: 2px; color: #0a84ff; font-size: 15px; }
.ph-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 20px; scrollbar-width: none; }
.ph-body.in-chat .m-chat, .ph-body.in-email .m-email { width: 100%; box-shadow: none; }
.ph-body.in-chat .m-chat header { display: none; }
.ph-list { display: flex; flex-direction: column; }
.ph-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; text-align: left; position: relative; }
.ph-row:hover { background: rgba(255,255,255,.06); }
.ph-row .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-row b { font-size: 15px; } .ph-row small { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-row time { font-size: 12px; color: var(--ink-3); align-self: flex-start; margin-top: 3px; }
.ph-row.unread b { color: #fff; } .ph-row .dot { width: 9px; height: 9px; border-radius: 50%; background: #0a84ff; flex: none; }
.ph-row .ic-call, .ph-row .ic-mail { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); font-size: 16px; color: var(--ink-2); flex: none; }
.ph-row .ic-call.go { background: var(--pos); color: #fff; }
.ph-empty { text-align: center; color: var(--ink-3); padding: 40px 0; font-size: 14px; }
.ph-thread { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.ph-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.07); margin: 0 4px 12px; }
.ph-tabs button { flex: 1; height: 32px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ph-tabs button.on { background: rgba(255,255,255,.16); color: #fff; }
.kp { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.kp-disp { height: 44px; font-size: 30px; font-weight: 400; letter-spacing: .02em; font-variant-numeric: tabular-nums; text-align: center; min-width: 200px; }
.kp-grid { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px 22px; }
.kp-k { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; flex-direction: column; align-items: center; justify-content: center; transition: background .15s; }
.kp-k:active { background: rgba(255,255,255,.3); }
.kp-k b { font-size: 30px; font-weight: 400; line-height: 1; }
.kp-k small { font-size: 9.5px; letter-spacing: .12em; color: var(--ink-2); font-weight: 600; }
.kp-k.del { background: none; }
.kp-act { display: grid; grid-template-columns: repeat(3, 72px); gap: 22px; align-items: center; margin-top: 4px; }
.kp-call { width: 72px; height: 72px; border-radius: 50%; background: var(--pos); display: grid; place-items: center; font-size: 30px; color: #fff; box-shadow: 0 10px 26px rgba(48,209,88,.4); }
.kp-cancel { font-size: 14px; color: var(--ink-2); }
.ph-bank { display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 0; }
.bk-card { border-radius: 20px; padding: 18px; aspect-ratio: 1.6; display: flex; flex-direction: column; background: linear-gradient(135deg, #ff8a2a, #b93b00 55%, #2a1406); box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.bk-card.blocked { filter: grayscale(.9) brightness(.7); }
.bk-card small { font-size: 13px; opacity: .85; } .bk-card b { font-size: 30px; margin-top: auto; font-variant-numeric: tabular-nums; } .bk-card span { font-size: 12px; opacity: .8; }
.bk-note { font-size: 13px; color: var(--ink-2); }
.bk-h { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.bk-ops { display: flex; flex-direction: column; }
.bk-op { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 14px; }
.bk-op span:first-child { display: flex; flex-direction: column; } .bk-op small { color: var(--ink-3); font-size: 12px; }
.bk-op .neg { color: var(--ink); } .bk-op .pos { color: var(--pos); }
.ph-notes, .ph-courses { display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.ph-hint { font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }
.ph-note { padding: 12px 14px; border-radius: 14px; background: rgba(255, 214, 10, .09); border: 1px solid rgba(255, 214, 10, .18); font-size: 14px; line-height: 1.4; }
.ph-course { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.06); text-align: left; }
.ph-course .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #bf5af2; font-size: 20px; flex: none; }
.ph-course.done .ic { background: var(--pos); }
.ph-course .mid { display: flex; flex-direction: column; } .ph-course b { font-size: 14.5px; } .ph-course small { font-size: 12.5px; color: var(--ink-3); }
.ph-dead { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 30px; background: #000; }
.ph-dead .i { font-size: 64px; color: var(--neg); animation: blink 1.4s infinite; }
.ph-dead small { color: var(--ink-3); font-size: 13.5px; }
@media (max-height: 760px) and (min-width: 641px) { .ph-frame { bottom: 12px; height: calc(100% - 24px); max-height: 760px; } }
@media (max-width: 640px) {
  .ph-frame { inset: calc(8px + var(--safe-t)) 8px calc(8px + var(--safe-b)); width: auto; height: auto; border-radius: 40px; padding: 8px; }
  .ph-screen { border-radius: 34px; }
  .ph-island { top: 16px; }
  .kp-grid, .kp-act { grid-template-columns: repeat(3, 66px); gap: 10px 20px; }
  .kp-k, .kp-call { width: 66px; height: 66px; }
}

/* Входящий звонок и уведомления */
.q-incoming { position: absolute; inset: 0; z-index: 86; display: grid; place-items: center; background: rgba(8, 8, 10, .78); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); opacity: 0; transition: opacity .4s var(--ease); }
.q-incoming.on { opacity: 1; }
.qi-in { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.qi-in > small { color: var(--ink-3); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.qi-in .qs-av { animation: ring 1.4s infinite; }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(48,209,88,.4), 0 20px 50px rgba(0,0,0,.5); } 60% { box-shadow: 0 0 0 26px rgba(48,209,88,0), 0 20px 50px rgba(0,0,0,.5); } }
.qi-in h2 { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin-top: 10px; }
.qi-in p { color: var(--ink-3); }
.qi-btns { display: flex; gap: 80px; margin-top: 48px; }
.qi-btns button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.qi-btns .i { width: 74px; height: 74px; padding: 20px; border-radius: 50%; color: #fff; }
.qi-no .i { background: var(--neg); } .qi-yes .i { background: var(--pos); animation: wiggle 1.4s infinite; }
@keyframes wiggle { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-12deg); } 80% { transform: rotate(12deg); } 90% { transform: rotate(-8deg); } }
.q-banner { position: absolute; z-index: 85; top: calc(10px + var(--safe-t)); left: 50%; width: min(420px, calc(100% - 20px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; text-align: left; background: rgba(38, 38, 42, .92); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 24px 60px rgba(0,0,0,.55); transform: translate(-50%, -140%); transition: transform .7s var(--spring); }
.q-banner.on { transform: translate(-50%, 0); }
.qb-app { width: 38px; height: 38px; border-radius: 10px; background: var(--pos); display: grid; place-items: center; font-size: 20px; flex: none; }
.q-banner .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.q-banner b { font-size: 14.5px; } .q-banner small { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q-banner time { font-size: 12px; color: var(--ink-3); align-self: flex-start; }
.q-dial { position: absolute; inset: 0; z-index: 72; display: grid; place-items: center; background: rgba(0,0,0,.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; transition: opacity .35s; }
.q-dial.on { opacity: 1; }
.qd-in { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 26px 26px; border-radius: 34px; background: #121214; border: 1px solid var(--stroke-2); box-shadow: 0 40px 100px rgba(0,0,0,.7); transform: scale(.94); transition: transform .6s var(--spring); }
.q-dial.on .qd-in { transform: none; }
.qd-in > b { font-size: 18px; } .qd-in > small { color: var(--ink-3); font-size: 13px; }
.qd-ev { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent-2); padding: 6px 12px; border-radius: 999px; background: rgba(255,122,26,.1); margin-bottom: 6px; }

/* ---------- Мини-игры и курсы ---------- */
.qg, .ql { position: absolute; inset: 0; z-index: 62; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; transition: opacity .35s var(--ease); }
.qg.on, .ql.on { opacity: 1; }
.qg-card, .ql-card { width: min(640px, 100%); max-height: calc(100% - 20px); overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 30px; background: linear-gradient(180deg, #232225, #161518); border: 1px solid var(--stroke-2); box-shadow: 0 50px 120px rgba(0,0,0,.7); transform: translateY(24px) scale(.97); transition: transform .7s var(--spring); }
.qg.on .qg-card, .ql.on .ql-card { transform: none; }
.qg-card > header, .ql-card > header { display: flex; align-items: center; gap: 12px; }
.qg-card > header > div, .ql-card > header > div { flex: 1; display: flex; flex-direction: column; }
.qg-card header b, .ql-card header b { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.qg-card header small, .ql-card header small { font-size: 13px; color: var(--ink-3); }
.qg-ic, .ql-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font-size: 21px; flex: none; }
.qg-prog { font-size: 13px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.qg-body { display: flex; flex-direction: column; gap: 14px; }
.qg-foot, .ql-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.qg-tip { font-size: 12.5px; color: var(--ink-3); }
.qg-verdict { flex: 1; display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.4; }
.qg-verdict .i { font-size: 20px; margin-top: 1px; }
.qg-verdict.pos .i { color: var(--pos); } .qg-verdict.neg .i { color: var(--gold); }
.gc-order { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gc-order > div { padding: 12px; border-radius: 16px; background: var(--fill); border: 1px solid var(--stroke); display: flex; flex-direction: column; gap: 2px; }
.gc-order small { font-size: 12px; color: var(--ink-3); } .gc-order b { font-size: 22px; font-weight: 700; }
.gc-order > div:last-child { border-color: rgba(255,122,26,.4); background: rgba(255,122,26,.08); }
.gc-bar { height: 4px; border-radius: 2px; background: var(--fill-2); overflow: hidden; }
.gc-time { display: block; height: 100%; background: var(--accent); transform-origin: left; animation: gc-shrink linear forwards; }
@keyframes gc-shrink { to { transform: scaleX(0); } }
.gc-tray { min-height: 64px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px; border-radius: 16px; border: 1.5px dashed var(--stroke-2); }
.gc-till { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.gc-note { height: 50px; min-width: 88px; padding: 0 12px; border-radius: 8px; font: 800 17px/1 var(--font); color: #1a1a1a; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 6px 14px rgba(0,0,0,.3); transition: transform .3s var(--spring); }
.gc-note:active { transform: scale(.92); }
.gc-note.n1000 { background: linear-gradient(135deg, #7fd4c4, #3b9a8a); }
.gc-note.n500 { background: linear-gradient(135deg, #c9a7e8, #8a5fb8); }
.gc-note.n100 { background: linear-gradient(135deg, #e9cfa2, #b58d53); }
.gc-note.n50 { background: linear-gradient(135deg, #a9c8f0, #5f86c0); }
.gc-note.n10 { min-width: 50px; width: 50px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fbe7a6, #c99a2e 70%); }
.gc-tray .gc-note { height: 38px; min-width: 64px; font-size: 14px; }
.gc-tray .gc-note.n10 { min-width: 38px; width: 38px; }
.g-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.g-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 0 10px; }
.g-table td { padding: 11px 10px; background: var(--fill); border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke); }
.g-table td:first-child { border-left: 1px solid var(--stroke); border-radius: 12px 0 0 12px; }
.g-table td:last-child { border-right: 1px solid var(--stroke); border-radius: 0 12px 12px 0; text-align: right; }
.g-table th:last-child { text-align: right; }
.g-table tbody tr { cursor: pointer; }
.g-table tbody tr:hover td { background: var(--fill-2); }
.g-table tr.bad td { background: rgba(255, 69, 58, .14); border-color: rgba(255,69,58,.35); }
.g-table tr.picked:not(.bad) td { background: rgba(255,214,10,.1); }
.gf-field { display: flex; flex-direction: column; gap: 8px; }
.gf-field label { font-size: 14px; font-weight: 650; }
.gf-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.gf-opts.col { flex-direction: column; }
.gf-opt { padding: 10px 14px; border-radius: 14px; background: var(--fill); border: 1px solid var(--stroke); font-size: 14.5px; text-align: left; transition: background .15s, border-color .15s; }
.gf-opt:hover { background: var(--fill-2); }
.gf-opt.on { background: rgba(255,122,26,.16); border-color: rgba(255,122,26,.5); }
.gf-opt.ok { background: rgba(48,209,88,.15); border-color: rgba(48,209,88,.5); }
.gf-opt.bad { background: rgba(255,69,58,.14); border-color: rgba(255,69,58,.5); }
.gf-field.ok label { color: var(--pos); } .gf-field.bad label { color: var(--neg); }
.gf-why { font-size: 13px; color: var(--ink-3); }
.gq-q { font-size: 17px; font-weight: 600; line-height: 1.4; } .gq-note { font-size: 14px; color: var(--ink-2); }
.gch-cards { display: flex; flex-direction: column; gap: 8px; }
.gch-card { position: relative; text-align: left; padding: 14px 16px; border-radius: 18px; background: var(--fill); border: 1px solid var(--stroke); display: flex; flex-direction: column; gap: 4px; animation: opt-in .5s var(--spring) both; animation-delay: calc(var(--i) * 70ms); opacity: 0; transform: translateY(8px); transition: background .15s, border-color .15s; }
.gch-card:hover { background: var(--fill-2); }
.gch-card b { font-size: 15.5px; } .gch-card p { font-size: 14px; color: var(--ink-2); line-height: 1.42; }
.gch-card .tag { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 700; color: var(--ink-3); padding: 2px 8px; border-radius: 999px; background: var(--fill-2); }
.gch-card.ok { border-color: rgba(48,209,88,.6); background: rgba(48,209,88,.1); }
.gch-card.bad { border-color: rgba(255,69,58,.6); background: rgba(255,69,58,.1); }
.gp-list { display: flex; flex-direction: column; gap: 6px; }
.gp-item { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 11px 14px; border-radius: 14px; background: var(--fill); border: 1px solid var(--stroke); font-size: 14.5px; line-height: 1.4; }
.gp-item > i { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--stroke-2); display: grid; place-items: center; flex: none; color: transparent; font-size: 14px; margin-top: 1px; }
.gp-item.on > i { background: var(--accent); border-color: var(--accent); color: #fff; }
.gp-item.ok { border-color: rgba(48,209,88,.55); } .gp-item.bad { border-color: rgba(255,69,58,.55); background: rgba(255,69,58,.1); }
.gcn-street { position: relative; height: 150px; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, #2a3140, #1a1d24 60%, #3a3d44 60%, #2c2f35); }
.gcn-street .door { position: absolute; left: 50%; top: 18%; width: 54px; height: 50%; margin-left: -27px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #ffcf8a, #d98a3a); box-shadow: 0 0 40px rgba(255,190,110,.5); }
.gcn-p { position: absolute; left: -20px; width: 14px; height: 30px; border-radius: 7px; background: #e6e6ea; animation: walk linear forwards; }
.gcn-p.in { animation-name: walk-in; background: #ffd08a; }
@keyframes walk { to { left: 105%; } }
@keyframes walk-in { 60% { left: calc(50% - 7px); opacity: 1; } 80% { left: calc(50% - 7px); opacity: 0; transform: scale(.7); } 100% { left: calc(50% - 7px); opacity: 0; } }
.gcn-num { display: flex; align-items: baseline; gap: 10px; justify-content: center; } .gcn-num small { color: var(--ink-3); } .gcn-num b { font-size: 34px; }
.ql-dots { display: flex; gap: 5px; }
.ql-dots i { flex: 1; height: 3px; border-radius: 2px; background: var(--fill-2); transition: background .3s; }
.ql-dots i.on { background: var(--accent); }
.ql-body { display: flex; flex-direction: column; gap: 12px; min-height: 180px; opacity: 0; transform: translateX(14px); transition: opacity .35s, transform .5s var(--spring); }
.ql-body.in { opacity: 1; transform: none; }
.ql-k { font-size: 12px; font-weight: 700; color: var(--accent-2); letter-spacing: .08em; text-transform: uppercase; }
.ql-body h3 { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.ql-body > p { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.ql-why { font-size: 14px; color: var(--ink-2); padding: 10px 12px; border-radius: 12px; background: var(--fill); }
.ql-result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 20px 0; }
.ql-result .i { font-size: 54px; } .ql-result.pos .i { color: var(--pos); } .ql-result.neg .i { color: var(--gold); }

/* ---------- Время бежит ---------- */
.q-timelapse { position: absolute; inset: 0; z-index: 64; display: grid; place-items: center; background: rgba(0,0,0,0); transition: background .4s; pointer-events: auto; }
.q-timelapse.on { background: rgba(0,0,0,.62); }
.qtl-in { display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0; transform: scale(.9); transition: opacity .35s, transform .6s var(--spring); text-align: center; padding: 0 20px; }
.q-timelapse.on .qtl-in { opacity: 1; transform: none; }
.qtl-face { position: relative; width: 110px; height: 110px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); margin-bottom: 8px; background: radial-gradient(circle, rgba(255,255,255,.06), transparent 70%); }
.qtl-face::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--accent); }
.qtl-face i { position: absolute; left: 50%; bottom: 50%; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #fff; transform-origin: 50% 100%; }
.qtl-face .hh { height: 28px; transform: rotate(var(--h, 0deg)); }
.qtl-face .mm { height: 42px; width: 2px; margin-left: -1px; background: var(--accent-2); transform: rotate(var(--m, 0deg)); }
.qtl-in > b { font-size: 44px; font-weight: 300; letter-spacing: -0.02em; }
.qtl-in > small { font-size: 15px; color: var(--ink-2); max-width: 30em; }
.qtl-dur { font-size: 12px; font-weight: 700; color: var(--accent-2); letter-spacing: .08em; }

/* ---------- Такси, автобус и дальние поездки: видео ---------- */
.q-ride, .q-trip { position: absolute; inset: 0; z-index: 66; background: #000; opacity: 0; transition: opacity .5s var(--ease); overflow: hidden; }
.q-ride.on, .q-trip.on { opacity: 1; }
.q-trip.out { opacity: 0; }
.q-ride video, .q-trip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: drift 12s linear both; }
@keyframes drift { to { transform: scale(1.12); } }
.qr-shade, .qt-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 60%, rgba(0,0,0,.7)); }
.qr-hud { position: absolute; left: 50%; bottom: calc(28px + var(--safe-b)); transform: translateX(-50%); width: min(460px, calc(100% - 32px)); display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 22px; flex-wrap: wrap; }
.qr-hud .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold); color: #111; font-size: 21px; }
.qr-hud > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.qr-hud small { font-size: 12px; color: var(--ink-3); } .qr-hud b { font-size: 16px; }
.qr-bar { flex-basis: 100%; height: 3px; border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden; }
.qr-bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width linear; }
.qr-skip { position: absolute; top: calc(18px + var(--safe-t)); right: 18px; height: 38px; padding: 0 16px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.25); font-size: 13.5px; font-weight: 620; backdrop-filter: blur(12px); }
.qt-top { position: absolute; top: calc(40px + var(--safe-t)); left: 0; right: 0; text-align: center; padding: 0 20px; }
.qt-top small { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.qt-top h2 { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: clamp(30px, 6vw, 60px); font-weight: 800; letter-spacing: -0.03em; margin-top: 8px; text-shadow: 0 6px 30px rgba(0,0,0,.6); flex-wrap: wrap; }
.qt-top h2 span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--accent); font-size: 26px; box-shadow: 0 10px 30px rgba(255,122,26,.5); }
.qt-bottom { position: absolute; left: 50%; bottom: calc(30px + var(--safe-b)); transform: translateX(-50%); width: min(620px, calc(100% - 32px)); display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 22px; font-size: 13.5px; color: var(--ink-2); }
.qt-clock { display: flex; align-items: center; gap: 8px; } .qt-clock b { font-size: 22px; color: #fff; }
.qt-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.15); overflow: hidden; }
.qt-bar i { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- Поездка: карта России ---------- */
.q-travel .sheet-body { padding-bottom: 20px; }
.tv-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; min-height: 420px; }
.tv-map-box { position: relative; border-radius: 22px; background: radial-gradient(120% 90% at 40% 30%, #1b2330, #0c0f14); border: 1px solid var(--stroke); overflow: hidden; }
.tv-map, .tv-map svg { width: 100%; height: 100%; display: block; }
.tv-map svg { min-height: 400px; }
.tv-land { fill: rgba(255,255,255,.07); stroke: rgba(255,255,255,.28); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.tv-city { cursor: pointer; }
.tv-city .hit { fill: transparent; }
.tv-city .dot { fill: #f5f5f7; stroke: rgba(0,0,0,.6); stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill .2s; }
.tv-city text { fill: rgba(245,245,247,.72); font-family: var(--font); font-weight: 600; paint-order: stroke; stroke: rgba(0,0,0,.7); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.tv-city:hover .dot { fill: var(--accent-2); }
.tv-city:hover text { fill: #fff; }
.tv-city.here .dot { fill: var(--accent); }
.tv-city.here text { fill: var(--accent-2); }
.tv-city.sel .dot { fill: var(--sky); } .tv-city.sel text { fill: #fff; }
.tv-route { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 8 7; vector-effect: non-scaling-stroke; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -15; } }
.tv-zoom { position: absolute; left: 12px; bottom: 12px; }
.tv-side { display: flex; flex-direction: column; gap: 12px; }
.tv-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--ink-3); padding: 20px; }
.tv-empty .i { font-size: 44px; color: var(--ink-4); } .tv-empty b { color: var(--ink); font-size: 18px; }
.tv-dest small { font-size: 12.5px; color: var(--ink-3); } .tv-dest b { display: block; font-size: 28px; font-weight: 750; letter-spacing: -0.02em; }
.tv-opts { display: flex; flex-direction: column; gap: 6px; }
.tv-opt { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 16px; background: var(--fill); border: 1px solid var(--stroke); text-align: left; transition: background .15s, border-color .15s; }
.tv-opt:hover { background: var(--fill-2); }
.tv-opt.on { border-color: rgba(255,122,26,.6); background: rgba(255,122,26,.1); }
.tv-opt .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--fill-2); font-size: 19px; flex: none; }
.tv-opt.on .ic { background: var(--accent); color: #fff; }
.tv-opt .mid { flex: 1; display: flex; flex-direction: column; min-width: 0; } .tv-opt b { font-size: 15px; } .tv-opt small { font-size: 12px; color: var(--ink-3); }
.tv-opt .pr { font-weight: 700; font-size: 14.5px; }
@media (max-width: 760px) { .tv-wrap { grid-template-columns: 1fr; } .tv-map svg { min-height: 280px; } }

/* ---------- Дело ---------- */
.q-case .sheet-body { gap: 10px; }
.qc-sec { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }
.qc-obj { display: flex; gap: 12px; padding: 14px; border-radius: 18px; background: var(--fill); border: 1px solid var(--stroke); }
.qc-obj.main { border-color: rgba(255,122,26,.3); }
.qc-obj .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); font-size: 17px; flex: none; }
.qc-obj.main .ic { background: var(--accent); color: #fff; }
.qc-obj.done { opacity: .65; padding: 10px 14px; align-items: center; } .qc-obj.done .ic { background: var(--pos); color: #fff; width: 26px; height: 26px; font-size: 14px; }
.qc-obj .mid { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qc-obj b { font-size: 15.5px; } .qc-obj small { font-size: 13px; color: var(--ink-3); }
.qc-hint { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.42; padding: 10px 12px; border-radius: 12px; background: rgba(255,214,10,.08); border: 1px solid rgba(255,214,10,.2); animation: opt-in .5s var(--spring) both; }
.qc-hint i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: #111; font: 800 11px/20px var(--font); text-align: center; flex: none; margin-top: 1px; }
.qc-hint-btn { align-self: flex-start; color: var(--gold); }
.qc-notes { display: flex; flex-direction: column; gap: 6px; }
.qc-notes p { font-size: 14px; line-height: 1.45; padding: 10px 12px; border-radius: 12px; background: var(--fill); }
.qm-menu { display: flex; flex-direction: column; gap: 8px; }
.qm-menu .btn { justify-content: flex-start; }

/* ---------- Конверт ---------- */
.q-envelope { position: absolute; inset: 0; z-index: 70; display: flex; flex-direction: column; overflow-y: auto; opacity: 0; transition: opacity .6s var(--ease); }
.q-envelope.on { opacity: 1; }
.q-envelope.out { opacity: 0; transition-duration: .6s; }
.env-bg { position: fixed; inset: 0; background: radial-gradient(80% 60% at 50% 45%, rgba(40, 28, 18, .72), rgba(0,0,0,.92)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.env-scene { position: relative; display: flex; flex-direction: column; align-items: center; gap: 26px; padding: 40px 16px; perspective: 1400px; width: 100%; margin: auto 0; }
.env { position: relative; width: min(480px, 88vw); aspect-ratio: 1.55; cursor: pointer; transform-style: preserve-3d; animation: env-in 1.2s var(--spring) both; }
@keyframes env-in { from { transform: translateY(60px) rotate(-6deg) scale(.9); opacity: 0; } }
.env-back, .env-front, .env-flap { position: absolute; inset: 0; border-radius: 10px; }
.env-back { background: linear-gradient(160deg, #b98d57, #8e6536); box-shadow: 0 50px 120px rgba(0,0,0,.7); }
.env-letter { position: absolute; left: 6%; right: 6%; top: 6%; height: 88%; background: #faf6ec; border-radius: 4px; padding: 18% 10% 0; display: flex; flex-direction: column; gap: 9px; transition: transform 1s var(--spring); }
.env-letter i { height: 6px; border-radius: 3px; background: #d8d0bf; } .env-letter i:nth-child(2) { width: 70%; } .env-letter i:nth-child(3) { width: 84%; }
.env-front { background: linear-gradient(160deg, #d2a86f 0%, #b88a52 60%, #a57a44 100%); clip-path: polygon(0 0, 50% 60%, 100% 0, 100% 100%, 0 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.env-front::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 3px, transparent 3px 9px); }
.env-flap { background: linear-gradient(180deg, #c89b61, #b0834a); clip-path: polygon(0 0, 100% 0, 50% 64%); transform-origin: 50% 0; transition: transform .8s var(--ease-io); z-index: 3; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); }
.env-stamp { position: absolute; left: 8%; bottom: 12%; border: 3px solid rgba(150, 30, 20, .75); color: rgba(150, 30, 20, .85); padding: 6px 12px; border-radius: 6px; transform: rotate(-8deg); display: flex; flex-direction: column; align-items: center; font: 900 20px/1 var(--font); letter-spacing: .14em; }
.env-stamp small { font-size: 10px; letter-spacing: .1em; margin-top: 4px; }
.env-to { position: absolute; right: 8%; bottom: 13%; text-align: right; color: #3b2a14; font-family: var(--hand); display: flex; flex-direction: column; }
.env-to small { font: 700 10px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: rgba(59,42,20,.6); }
.env-to b { font-size: 28px; font-weight: 600; line-height: 1.1; } .env-to span { font-size: 22px; }
.env-post { position: absolute; right: 7%; top: 40%; width: 56px; height: 64px; border: 2px dashed rgba(59,42,20,.4); display: grid; place-items: center; color: rgba(59,42,20,.5); font-size: 28px; transform: rotate(4deg); }
.env-seal { position: absolute; left: 50%; top: 64%; width: 84px; height: 84px; margin: -42px 0 0 -42px; z-index: 5; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #e04a3a, #a3180f 55%, #6d0c07); box-shadow: 0 8px 20px rgba(0,0,0,.45), inset 0 -4px 10px rgba(0,0,0,.35), inset 0 3px 6px rgba(255,255,255,.25); display: grid; place-items: center; transition: transform .45s var(--spring); animation: seal-pulse 2.2s 1.2s infinite; }
.env-seal::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: radial-gradient(circle, transparent 58%, #a3180f 60%, transparent 72%); filter: blur(.5px); opacity: .7; }
.env-seal span { font: 800 34px/1 var(--serif); color: rgba(60, 5, 2, .7); text-shadow: 0 1px 0 rgba(255,255,255,.25); }
.env-seal:hover { transform: scale(1.07); }
@keyframes seal-pulse { 0%, 100% { box-shadow: 0 8px 20px rgba(0,0,0,.45), 0 0 0 0 rgba(224,74,58,.45); } 50% { box-shadow: 0 8px 20px rgba(0,0,0,.45), 0 0 0 16px rgba(224,74,58,0); } }
.env-hint { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; animation: blink 1.8s infinite; }
.q-envelope.opening .env-seal { animation: seal-break .5s var(--ease) forwards; }
@keyframes seal-break { 40% { transform: scale(1.15) rotate(-8deg); } 100% { transform: translateY(80px) rotate(40deg) scale(.6); opacity: 0; } }
.q-envelope.flap .env-flap { transform: rotateX(180deg); z-index: 0; }
.q-envelope.slide .env-letter { transform: translateY(-62%); z-index: 1; }
.q-envelope.slide .env { animation: none; transition: transform 1s var(--ease-io); transform: translateY(40px); }
.dossier { width: min(720px, 100%); border-radius: 26px; overflow: hidden; background: #f7f3ea; color: #1f1b16; box-shadow: 0 60px 140px rgba(0,0,0,.8); opacity: 0; transform: translateY(60px) scale(.94); transition: opacity .5s var(--ease), transform .9s var(--spring); }
.dossier.on { opacity: 1; transform: none; }
.ds-cover { position: relative; height: 210px; background: #222 center / cover; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px 24px; color: #fff; }
.ds-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.75)); }
.ds-cover > * { position: relative; }
.ds-case { display: flex; justify-content: space-between; font: 700 11.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.ds-cover h1 { font-family: var(--serif); font-size: clamp(34px, 6vw, 50px); font-weight: 700; letter-spacing: -0.01em; margin-top: 8px; line-height: 1; }
.ds-body { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 16px; }
.ds-hero { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid rgba(0,0,0,.12); }
.ds-av { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #1f1b16; color: #f7f3ea; font: 700 22px/1 var(--serif); flex: none; }
.ds-hero > div { flex: 1; display: flex; flex-direction: column; }
.ds-hero small { font-size: 12px; color: #7a6f60; } .ds-hero b { font-size: 21px; font-family: var(--serif); } .ds-hero span { font-size: 13.5px; color: #5a5146; }
.ds-city { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #1f1b16; color: #fff !important; font-weight: 650; }
.ds-city .i { color: var(--accent); }
.dossier section h4 { display: flex; align-items: center; gap: 6px; font: 800 11.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #a3321c; margin-bottom: 8px; }
.dossier section p { font-family: var(--serif); font-size: 16px; line-height: 1.55; margin: 0 0 8px; }
.ds-goal { padding: 14px 16px; border-radius: 16px; background: #1f1b16; color: #f7f3ea; }
.ds-goal h4 { color: var(--accent-2) !important; }
.ds-goal p { margin: 0 !important; font-size: 17px !important; }
.ds-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ds-rule { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 16px; background: #ece5d6; text-align: center; }
.ds-rule .i { font-size: 20px; color: #a3321c; } .ds-rule b { font-size: 20px; } .ds-rule small { font-size: 12px; color: #6b6153; }
.ds-note { font-size: 13.5px !important; color: #6b6153; font-family: var(--font) !important; text-align: center; }
.dossier .btn.primary { margin-top: 4px; }
@media (max-width: 560px) { .ds-cover { height: 160px; } .ds-body { padding: 18px; } .ds-hero { flex-wrap: wrap; } }

/* ---------- Тур по интерфейсу ---------- */
.q-tour { position: absolute; inset: 0; z-index: 74; opacity: 0; transition: opacity .4s var(--ease); }
.q-tour.on { opacity: 1; }
.qt-hole { position: absolute; left: 0; top: 0; box-shadow: 0 0 0 9999px rgba(0,0,0,.72), 0 0 0 2px rgba(255,122,26,.9), 0 0 30px 6px rgba(255,122,26,.35); transition: transform .6s var(--spring), width .6s var(--spring), height .6s var(--spring), border-radius .4s; pointer-events: none; }
.qt-bubble { position: absolute; left: 0; top: 0; padding: 16px 18px; border-radius: 22px; display: flex; flex-direction: column; gap: 8px; opacity: 0; transition: transform .6s var(--spring), opacity .3s; }
.qt-bubble.in { opacity: 1; }
.qt-bubble small { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
.qt-bubble p { font-size: 15px; line-height: 1.45; }
.qt-btns { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.qt-skip { font-size: 13px; color: var(--ink-3); }

/* ---------- Финал ---------- */
.qr { position: absolute; inset: 0; z-index: 73; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 40px 16px; opacity: 0; transition: opacity .6s var(--ease); }
.qr.on { opacity: 1; }
.qr-bg { position: fixed; inset: -40px; background: #111 center / cover; filter: blur(30px) brightness(.35) saturate(1.2); }
.qr-in { position: relative; margin: auto 0; width: min(860px, 100%); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.qr-kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.qr-stars { display: flex; gap: 8px; }
.qr-stars span { font-size: 52px; color: rgba(255,255,255,.18); animation: star-pop .8s var(--spring) both; animation-delay: calc(.3s + var(--i) * .22s); }
.qr-stars span.on { color: var(--gold); filter: drop-shadow(0 0 20px rgba(255,214,10,.6)); }
.qr-stars span.on svg { fill: currentColor; }
@keyframes star-pop { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
.qr h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 850; letter-spacing: -0.04em; line-height: 1; }
.qr-text { font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 40em; font-family: var(--serif); }
.qr-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; margin-top: 8px; }
.qr-stat { padding: 14px 8px; border-radius: 18px; background: rgba(255,255,255,.07); border: 1px solid var(--stroke); display: flex; flex-direction: column; gap: 2px; }
.qr-stat b { font-size: 22px; font-weight: 750; } .qr-stat small { font-size: 12px; color: var(--ink-3); }
.qr-stat.accent { background: rgba(255,122,26,.14); border-color: rgba(255,122,26,.4); } .qr-stat.accent b { color: var(--accent-2); }
.qr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; text-align: left; }
.qr-cols > div { padding: 16px; border-radius: 20px; background: rgba(255,255,255,.06); border: 1px solid var(--stroke); display: flex; flex-direction: column; gap: 8px; }
.qr-cols > div > b { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.qr-cols > div > div { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; }
.qr-obj > div .i { color: var(--neg); margin-top: 3px; } .qr-obj > div.ok .i { color: var(--pos); }
.qr-learn > div .i { color: var(--gold); margin-top: 3px; }
.qr-learn small { font-size: 12.5px; color: var(--ink-3); }
.qr-truth { width: 100%; text-align: left; padding: 16px 18px; border-radius: 20px; background: rgba(0,0,0,.35); border: 1px solid var(--stroke-2); }
.qr-truth summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 700; list-style: none; }
.qr-truth summary::-webkit-details-marker { display: none; }
.qr-truth p { margin-top: 10px; font-family: var(--serif); font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.qr-team { font-size: 13.5px; color: var(--ink-3); }
.qr-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
@media (max-width: 700px) { .qr-stats { grid-template-columns: repeat(3, 1fr); } .qr-cols { grid-template-columns: 1fr; } }

/* ================================================================
   Главная страница
   ================================================================ */
.landing { position: absolute; inset: 0; z-index: 70; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; user-select: text; -webkit-user-select: text; opacity: 0; transition: opacity .9s var(--ease-io); scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.landing.on { opacity: 1; }
.landing.out { opacity: 0; pointer-events: none; }
.ln-nav { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: calc(14px + var(--safe-t)) clamp(16px, 4vw, 48px) 14px; transition: background .4s, backdrop-filter .4s, border-color .4s; border-bottom: 1px solid transparent; }
.ln-nav.solid { background: rgba(10,10,12,.72); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); border-color: var(--stroke); }
.ln-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: .22em; font-size: 13px; }
.ln-logo b { color: var(--accent); }
.ln-links { display: flex; gap: 4px; margin-left: auto; }
.ln-links button { height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 580; color: var(--ink-2); transition: background .2s, color .2s; }
.ln-links button:hover { background: var(--fill-2); color: var(--ink); }
@media (max-width: 720px) { .ln-links { display: none; } .ln-nav .btn { margin-left: auto; } }

.ln-hero { position: relative; min-height: calc(100vh - 70px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 24px; padding: 0 clamp(16px, 5vw, 72px) 70px; background: linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.45) 50%, rgba(0,0,0,.1) 100%); }
.ln-hero-copy { display: flex; flex-direction: column; gap: 24px; max-width: 660px; }
.ln-brand { display: flex; align-items: center; gap: 16px; animation: rise 1s var(--ease) both .1s; }
.ln-brand b { display: block; font-size: 22px; font-weight: 850; letter-spacing: .24em; }
.ln-brand em { font-style: normal; color: var(--accent); }
.ln-brand small { font-size: 13px; color: var(--ink-3); letter-spacing: .08em; }
.ln-hero h1 { font-size: clamp(40px, 5.8vw, 82px); font-weight: 820; letter-spacing: -0.045em; line-height: .98; }
.ln-hero h1 span { display: inline-block; animation: rise 1.1s var(--ease) both; animation-delay: calc(var(--i) * 55ms + 250ms); white-space: pre; }
.ln-lead { font-size: clamp(16px, 1.5vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 34em; animation: rise 1.1s var(--ease) both .75s; }
.ln-cta { display: flex; gap: 12px; flex-wrap: wrap; animation: rise 1.1s var(--ease) both .9s; }
.ln-facts { display: flex; gap: clamp(18px, 3vw, 40px); flex-wrap: wrap; padding-top: 6px; animation: rise 1.1s var(--ease) both 1.05s; }
.ln-fact b { display: block; font-size: clamp(22px, 2.2vw, 30px); font-weight: 760; letter-spacing: -0.02em; }
.ln-fact span { font-size: 12.5px; color: var(--ink-3); font-weight: 560; }
.ln-hero-art { position: relative; height: min(620px, 72vh); animation: rise 1.4s var(--ease) both .6s; }
.ha { position: absolute; inset: 0; transform: translateY(calc(var(--sy, 0) * -60px)); }
.ha > * { position: absolute; box-shadow: 0 40px 90px rgba(0,0,0,.6); animation: bob 7s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -12px; } }
.ha-paper { left: 4%; top: 6%; width: 58%; padding: 18px 20px; background: linear-gradient(180deg, #f5f0e3, #e9e1cd); color: #1f1b16; font-family: var(--serif); transform: rotate(-6deg); display: flex; flex-direction: column; gap: 8px; }
.ha-paper small { font: 700 10px/1 var(--font); letter-spacing: .14em; color: #8c2f1d; }
.ha-paper b { font-size: 21px; line-height: 1.15; }
.ha-paper i { height: 6px; border-radius: 3px; background: rgba(0,0,0,.14); } .ha-paper i:nth-of-type(2) { width: 88%; } .ha-paper i:nth-of-type(3) { width: 70%; }
.ha-ad { position: relative; margin-top: 6px; padding: 8px 10px; border: 1px solid rgba(0,0,0,.3); font-size: 13px; }
.ha-ad::after { content: ""; position: absolute; inset: -8px -12px; border: 2.2px solid #1d47b8; border-radius: 50%; transform: rotate(-3deg); opacity: .8; }
.ha-receipt { right: 8%; top: 2%; width: 190px; padding: 16px 14px 20px; background: #fbfaf5; color: #222; font: 11.5px/1.6 var(--mono); transform: rotate(7deg); display: flex; flex-direction: column; animation-delay: -2s; }
.ha-receipt b { text-align: center; font-size: 12px; } .ha-receipt span { white-space: nowrap; overflow: hidden; }
.ha-receipt i { height: 26px; margin-top: 8px; background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px); }
.ha-sms { right: 2%; top: 44%; width: 290px; padding: 12px 14px; border-radius: 20px; background: rgba(38,38,42,.94); border: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 4px; transform: rotate(-3deg); animation-delay: -4s; }
.ha-sms small { font-size: 12px; color: var(--ink-3); font-weight: 600; } .ha-sms span { font-size: 14px; line-height: 1.4; }
.ha-card { left: 12%; bottom: 8%; width: 260px; padding: 16px 18px; border-radius: 8px; background: linear-gradient(145deg, #fff, #e9ebef); color: #1a1d24; display: flex; flex-direction: column; gap: 2px; transform: rotate(4deg); animation-delay: -1s; }
.ha-card small { font: 700 9.5px/1.2 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #3a4f8a; }
.ha-card b { font-family: var(--serif); font-size: 20px; margin-top: 12px; } .ha-card span { font-size: 12px; color: #5b6273; } .ha-card .ph { font-weight: 700; font-size: 13px; color: #1a1d24; margin-top: 8px; }
.ha-timer { right: 18%; bottom: 14%; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: rgba(20,20,22,.9); border: 1px solid rgba(255,122,26,.45); font-size: 22px; animation-delay: -3s; }
.ha-timer .i { color: var(--accent); } .ha-timer b { font-weight: 700; }
.ln-scroll { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.ln-scroll i { width: 24px; height: 38px; border-radius: 12px; border: 2px solid rgba(255,255,255,.35); position: relative; }
.ln-scroll i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: scroll-dot 1.8s infinite; }
@keyframes scroll-dot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (max-width: 960px) {
  .ln-hero { grid-template-columns: 1fr; padding-top: 30px; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.85) 60%); }
  .ln-hero-art { height: 420px; order: -1; margin: 0 -8px; }
  .ha-paper { width: 70%; } .ha-sms { width: 240px; } .ha-card { display: none; } .ha-timer { right: 6%; bottom: 4%; }
  .ln-scroll { display: none; }
}

.ln-sec { position: relative; padding: clamp(70px, 10vw, 130px) clamp(16px, 5vw, 72px); background: #000; opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.ln-sec.in { opacity: 1; transform: none; }
.ln-how { background: linear-gradient(180deg, rgba(0,0,0,.6), #000 30%); }
.ln-h { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-bottom: 40px; }
.ln-h small { font-size: 13px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.ln-h small.accent { color: var(--accent-2); }
.ln-h h2 { font-size: clamp(34px, 5vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; }
.ln-h p { font-size: 18px; color: var(--ink-2); line-height: 1.5; }
.ln-h.small { margin: 60px 0 20px; } .ln-h.small h3 { font-size: 24px; font-weight: 750; letter-spacing: -0.02em; }
.ln-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ln-step { padding: 22px; border-radius: 26px; background: linear-gradient(180deg, #151517, #0d0d0e); border: 1px solid var(--stroke); display: flex; flex-direction: column; gap: 12px; transition: transform .6s var(--spring), border-color .3s; opacity: 0; transform: translateY(24px); }
.ln-step.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform 1s var(--spring); }
.ln-step:nth-child(2) { transition-delay: .08s; } .ln-step:nth-child(3) { transition-delay: .16s; } .ln-step:nth-child(4) { transition-delay: .24s; }
.ln-step:hover { border-color: rgba(255,122,26,.35); }
.ln-step-top { display: flex; justify-content: space-between; align-items: center; }
.ln-step .ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font-size: 24px; }
.ln-step-top small { font-size: 13px; font-weight: 800; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.ln-step b { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.ln-step p { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.ln-learn-strip { margin-top: 18px; display: flex; gap: 14px; align-items: center; padding: 18px 22px; border-radius: 22px; background: rgba(191, 90, 242, .09); border: 1px solid rgba(191, 90, 242, .25); font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.ln-learn-strip > .i { font-size: 26px; color: #d69cff; flex: none; }
.ln-learn-strip b { color: var(--ink); }
@media (max-width: 960px) { .ln-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ln-steps { grid-template-columns: 1fr; } }

.ln-free { background: radial-gradient(80% 60% at 70% 20%, rgba(255,122,26,.16), transparent 60%), #000; }
.ln-free-card { display: grid; grid-template-columns: 1.05fr 1fr; border-radius: 34px; overflow: hidden; background: linear-gradient(180deg, #19161a, #0f0d0f); border: 1px solid rgba(255,122,26,.35); box-shadow: 0 60px 160px rgba(255,122,26,.12), 0 40px 100px rgba(0,0,0,.6); opacity: 0; transform: translateY(40px) scale(.98); transition: opacity 1s var(--ease), transform 1.2s var(--spring); }
.ln-free-card.in { opacity: 1; transform: none; }
.lf-cover { position: relative; min-height: 520px; background: #222 center / cover; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; }
.lf-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.25) 50%, rgba(0,0,0,.85)); }
.lf-cover > * { position: relative; }
.lf-badge { align-self: flex-start; padding: 8px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 10px 30px rgba(255,122,26,.5); animation: badge 2.6s ease-in-out infinite; }
@keyframes badge { 50% { transform: scale(1.05); box-shadow: 0 10px 40px rgba(255,122,26,.75); } }
.lf-title small { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.lf-title h3 { font-size: clamp(44px, 5.4vw, 72px); font-weight: 850; letter-spacing: -0.04em; line-height: 1; }
.lf-body { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 18px; }
.lf-pitch { font-size: 17.5px; line-height: 1.55; color: var(--ink); font-family: var(--serif); }
.lf-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.lf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lf-cols b { font-size: 12.5px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.lf-cols ul { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.lf-cols li { font-size: 14.5px; color: var(--ink-2); padding-left: 18px; position: relative; line-height: 1.4; }
.lf-cols li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.lf-team > b { display: block; font-size: 12.5px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.lf-play { height: 62px; font-size: 19px; }
.lf-note { text-align: center; font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 900px) { .ln-free-card { grid-template-columns: 1fr; } .lf-cover { min-height: 300px; } }
@media (max-width: 520px) { .lf-cols { grid-template-columns: 1fr; } }

.tp { display: flex; flex-direction: column; gap: 10px; }
.tp-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tp-pills button { width: 42px; height: 42px; border-radius: 14px; background: var(--fill); border: 1px solid var(--stroke); font-weight: 700; font-size: 15px; transition: background .2s, transform .35s var(--spring), border-color .2s; }
.tp-pills button:hover { background: var(--fill-2); }
.tp-pills button.on { background: #f5f5f7; color: #000; border-color: transparent; transform: scale(1.06); }
.tp-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.tp-name { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 14px; background: var(--fill); border: 1px solid var(--stroke); animation: opt-in .4s var(--spring) both; }
.tp-name:focus-within { border-color: var(--c); }
.tp-name i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.tp-name input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 14.5px; user-select: text; }
.tp-hint { font-size: 12.5px; color: var(--ink-3); }

.ln-stories { background: #000; }
.ln-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ln-card { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform 1s var(--spring), border-color .3s; }
.ln-card.in { opacity: 1; transform: none; }
.ln-story { cursor: pointer; border-radius: 28px; overflow: hidden; background: linear-gradient(180deg, #151517, #0d0d0e); border: 1px solid var(--stroke); display: flex; flex-direction: column; }
.ln-story:hover { border-color: rgba(255,255,255,.25); }
.ln-story:hover .ls-cover { transform: scale(1.03); }
.ls-cover { position: relative; aspect-ratio: 16 / 10; background: #222 center / cover; transition: transform 1s var(--ease); }
.ls-price { position: absolute; top: 14px; right: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.6); backdrop-filter: blur(10px); font-weight: 750; font-size: 14px; border: 1px solid rgba(255,255,255,.2); }
.ls-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ls-body small { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.ls-body h3 { font-size: 26px; font-weight: 780; letter-spacing: -0.03em; }
.ls-body p { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; flex: 1; }
.ls-inside { display: flex; flex-wrap: wrap; gap: 5px; }
.ls-inside span { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--fill); border: 1px solid var(--stroke); color: var(--ink-2); }
.ln-soon { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ln-soon-card { display: flex; gap: 12px; padding: 10px; border-radius: 20px; background: var(--fill); border: 1px solid var(--stroke); opacity: .75; }
.ln-soon-card .cv { width: 84px; aspect-ratio: 1; border-radius: 14px; background: #222 center / cover; flex: none; filter: grayscale(.4); }
.ln-soon-card small { font-size: 11.5px; color: var(--ink-3); } .ln-soon-card b { display: block; font-size: 16px; } .ln-soon-card p { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; margin-top: 2px; }
@media (max-width: 960px) { .ln-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .ln-grid { grid-template-columns: 1fr; } }

.ln-team { background: radial-gradient(70% 60% at 20% 30%, rgba(90,200,250,.1), transparent 60%), #000; }
.ln-team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ln-team-grid .ln-card { padding: 22px; border-radius: 26px; background: linear-gradient(180deg, #121417, #0c0d0f); border: 1px solid var(--stroke); display: flex; flex-direction: column; gap: 10px; }
.ln-team-grid .ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: rgba(90,200,250,.12); color: var(--sky); font-size: 24px; }
.ln-team-grid b { font-size: 18px; font-weight: 700; } .ln-team-grid p { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 960px) { .ln-team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ln-team-grid { grid-template-columns: 1fr; } }
.ln-learn { background: #000; }
.ln-lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ln-lesson { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 22px; background: var(--fill); border: 1px solid var(--stroke); }
.ln-lesson .i { font-size: 24px; color: #d69cff; } .ln-lesson b { font-size: 16px; } .ln-lesson small { font-size: 13px; color: var(--ink-3); line-height: 1.4; }
.ln-foot { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 60px 20px calc(60px + var(--safe-b)); text-align: center; background: #000; border-top: 1px solid var(--stroke); }
.ln-foot p { max-width: 560px; font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.ln-buy .sheet-body { gap: 16px; }
.lb-cover { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 20px; }
.lb-pitch { font-family: var(--serif); font-size: 17px; line-height: 1.55; }
.lb-pay { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 22px; background: rgba(255,122,26,.08); border: 1px solid rgba(255,122,26,.3); flex-wrap: wrap; }
.lb-pay b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; } .lb-pay small { font-size: 12.5px; color: var(--ink-3); }

/* Уведомления в режиме расследования — над нижней панелью, чтобы не спорить с баннерами целей. */
body.quest-mode #toasts { top: auto; bottom: calc(96px + var(--safe-b)); flex-direction: column-reverse; }
@media (max-width: 860px) { body.quest-mode #toasts { bottom: calc(84px + var(--safe-b)); } }
body.quest-scene #toasts { bottom: auto; top: calc(78px + var(--safe-t)); }
/* Внутри здания верхняя панель остаётся поверх интерьера, нижняя прячется. */
body.quest-scene .qhud { z-index: 35; }
body.quest-scene .qh-dock { opacity: 0; transform: translate(-50%, 20px); }
body.quest-scene .qh-top { pointer-events: none; }
body.quest-scene .qh-top > * { pointer-events: auto; }

/* Кроссворд */
.m-cross { width: min(620px, 100%); background: linear-gradient(180deg, #f5f0e3, #ebe3cf); color: #1f1b16; font-family: var(--serif); padding: 22px 24px 26px; box-shadow: 0 40px 90px rgba(0,0,0,.6); transform: rotate(.4deg); }
.mx-h { font: 700 12px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: #8c2f1d; border-bottom: 2px solid #2b2620; padding-bottom: 8px; margin-bottom: 12px; }
.mx-rows { display: flex; flex-direction: column; gap: 7px; }
.mx-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; font-size: 14.5px; }
.mx-n { color: #6b6153; font-size: 13px; }
.mx-clue { line-height: 1.25; }
.mx-cells { display: flex; }
.mx-cells i { width: 26px; height: 26px; border: 1px solid #2b2620; margin-left: -1px; display: grid; place-items: center; font: 600 16px/1 var(--hand); font-style: normal; background: rgba(255,255,255,.45); position: relative; }
.mx-cells i.on::after { content: ""; position: absolute; inset: -4px; border: 2px solid #1d47b8; border-radius: 50%; transform: rotate(-8deg); opacity: .85; }
.mx-note { font-family: var(--hand); font-size: 22px; color: #1d47b8; margin-top: 14px; transform: rotate(-1deg); }
@media (max-width: 560px) { .mx-row { grid-template-columns: 18px 1fr; } .mx-cells { grid-column: 1 / -1; } .mx-cells i { width: 23px; height: 23px; } }

.q-othertab { position: absolute; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(0,0,0,.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); text-align: center; padding: 20px; }
.q-othertab > div { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 380px; }
.q-othertab b { font-size: 22px; } .q-othertab p { color: var(--ink-2); }
