@font-face { font-family: Onest; src: url('/fonts/Onest-wght.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --y: #FFD43B; --k: #16181B; --p: #F6F5F2; --f: #FF4F1F; --n: #2F5BEA; --v: #14744B; --g: #6B6E73; --line: #E4E2DC;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--k); color: var(--k); font-family: Onest, system-ui, sans-serif; }

/* Рамка держит 16:9 и вписывается в окно. */
.ramka { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
.scena {
  position: relative; width: min(100vw, calc(100vh * 16 / 9)); width: min(100vw, calc(100dvh * 16 / 9)); aspect-ratio: 16 / 9;
  container-type: inline-size; overflow: hidden; background: #ddd; user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
.scena__fon { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.scena__sloi { position: absolute; inset: 0; }
.scena__om { position: absolute; pointer-events: none; transition: transform .2s; filter: drop-shadow(0 .4cqw 0 rgba(0,0,0,.12)); }
.scena__om.prygaet { animation: pryg .35s; }
@keyframes pryg { 40% { transform: translateY(-1.2cqw); } }

.predmet { position: absolute; pointer-events: none; }
/* Предмет картинкой (kart в данных объекта): тень на пол и стену — как у SVG после отделки (4×6 px из 1536). */
.predmet.kartinka img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(.26cqw .39cqw .3cqw rgba(42,28,14,.24)); -webkit-user-drag: none; user-select: none; }
.predmet .v-ploskosti { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.predmet.kartinka .nadpis { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.zona { position: absolute; background: transparent; border: 0; padding: 0; cursor: pointer; border-radius: .6cqw; }
.zona:focus-visible { outline: .3cqw dashed var(--n); }
.zona.naydeno { outline: .35cqw solid var(--y); box-shadow: 0 0 0 .7cqw rgba(255,212,59,.35); cursor: default; }
.zona.obmanka { outline: .3cqw solid #9A9DA2; cursor: default; }
.zona.mig { animation: mig .5s; }
@keyframes mig { 50% { box-shadow: 0 0 0 1.4cqw rgba(255,212,59,.6); } }

/* Табло */
.tablo {
  position: absolute; top: 1cqw; left: 1cqw; right: 1cqw; display: flex; gap: .8cqw; align-items: stretch;
  font-size: 1.15cqw; pointer-events: none;
}
/* Поля табло только показывают: нажатие проходит сквозь них к точке под табло. Нажимаются лишь кнопки. */
.tablo__knopki { pointer-events: auto; }
.tablo__insp { width: 4.6cqw; height: 4.6cqw; border-radius: 50%; overflow: hidden; background: var(--n); border: .2cqw solid var(--k); flex: none; }
.tablo__insp img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Эмоция видна и цветом рамки: доволен — зелёная, сомневается — красная. */
.tablo__insp { transition: border-color .2s, transform .2s; }
.tablo__insp[data-emociya="4"] { border-color: #2E9E5B; transform: scale(1.08); }
.tablo__insp[data-emociya="3"] { border-color: #E0412A; transform: scale(1.08); }
.tablo__pole { background: rgba(22,24,27,.88); color: var(--p); border-radius: .7cqw; padding: .55cqw 1cqw; display: flex; flex-direction: column; justify-content: center; position: relative; }
.tablo__mt { font-size: max(.8cqw, 10px); color: #C9CCD1; text-transform: uppercase; letter-spacing: .04em; }
.tablo__pole b { font-size: max(1.7cqw, 12px); font-variant-numeric: tabular-nums; }
.tablo__pole--shtraf { margin-left: auto; }
.tablo__pole--shtraf b { color: var(--y); font-size: max(1.35cqw, 11px); }
.tablo__pole--shtraf.mig { animation: shtraf .6s; }
@keyframes shtraf { 30% { background: var(--f); } }
.bally-plus { position: absolute; right: .6cqw; top: -1.6cqw; color: var(--y); font-weight: 800; font-size: 1.6cqw; animation: vverh .9s forwards; }
@keyframes vverh { to { transform: translateY(-2cqw); opacity: 0; } }
.seriya { position: absolute; left: 50%; bottom: -1.5cqw; transform: translateX(-50%); background: var(--f); color: #fff; border-radius: 1cqw; padding: .1cqw .7cqw; font-size: max(.9cqw, 9px); font-weight: 800; white-space: nowrap; }
.tablo__knopki { display: flex; gap: .5cqw; }
.ikn { width: 3.4cqw; height: 3.4cqw; border-radius: .7cqw; border: 0; background: rgba(22,24,27,.88); color: var(--p); font-size: 1.6cqw; cursor: pointer; }

/* Стрелки между комнатами */
.strelki { position: absolute; bottom: 1.2cqw; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: .8cqw; }
.strelka { width: max(3.6cqw, 44px); height: max(3.6cqw, 44px); border-radius: 50%; border: .2cqw solid var(--k); background: var(--y); font-size: 2.4cqw; line-height: 1; cursor: pointer; font-weight: 700; }
.strelka:disabled { opacity: .3; cursor: default; }
.strelki__nazv { background: rgba(22,24,27,.88); color: var(--p); padding: .5cqw 1.2cqw; border-radius: 2cqw; font-weight: 700; font-size: max(1.3cqw, 11px); min-width: 10cqw; text-align: center; }
.akt-knopka { position: absolute; right: 1.2cqw; bottom: 1.2cqw; background: var(--k); color: var(--y); border: .2cqw solid var(--y); border-radius: .8cqw; padding: .8cqw 1.4cqw; font: 700 max(1.3cqw, 11px) Onest, sans-serif; cursor: pointer; }

/* Облачко с отговоркой и штамп */
.oblako { position: absolute; max-width: 24cqw; background: #fff; border: .2cqw solid var(--k); border-radius: 1.2cqw; padding: 1cqw 1.3cqw; font-size: max(1.35cqw, 12px); font-weight: 600; pointer-events: none; }
.oblako p { margin: 0; }
.oblako::after { content: ''; position: absolute; bottom: -1.1cqw; left: 3cqw; border: .6cqw solid transparent; border-top: 1cqw solid var(--k); }
.shtamp { position: absolute; right: -1.2cqw; bottom: -2.2cqw; color: #D62B12; border: .35cqw solid #D62B12; border-radius: .5cqw; padding: .1cqw .7cqw; font-weight: 900; font-size: 1.5cqw; transform: rotate(-12deg) scale(2); opacity: 0; background: rgba(255,255,255,.85); }
.shtamp.est { animation: shtamp .25s forwards; }
@keyframes shtamp { to { transform: rotate(-12deg) scale(1); opacity: 1; } }
.scena.tryaska { animation: tr .2s; }
@keyframes tr { 25% { transform: translate(.3cqw, .2cqw); } 75% { transform: translate(-.3cqw, -.1cqw); } }

/* Тост — шутки и подсказки */
.tost { z-index: 5; position: absolute; left: 50%; top: 7.5cqw; transform: translateX(-50%); background: var(--p); border: .2cqw solid var(--k); border-radius: 1cqw; padding: .7cqw 1.4cqw; font-size: max(1.3cqw, 12px); font-weight: 600; max-width: 50cqw; text-align: center; pointer-events: none; }

/* Карточки вопроса и обманки */
.karta {
  position: absolute; left: 50%; bottom: 1.2cqw; transform: translateX(-50%); width: min(max(56cqw, 520px), 96%);
  background: var(--p); border: .25cqw solid var(--k); border-radius: 1.4cqw; padding: 1.4cqw 1.8cqw; font-size: max(1.25cqw, 12px); box-shadow: 0 .6cqw 0 var(--k);
}
/* Предмет в нижней половине сцены — окно уходит наверх, под табло, чтобы не закрыть находку. */
.karta--verh { bottom: auto; top: max(6.6cqw, 48px); }
.karta h2 { margin: .2cqw 0 .6cqw; font-size: max(1.8cqw, 15px); line-height: 1.15; }
.karta__mt { margin: 0; font-size: .95cqw; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--v); }
.karta--o .karta__mt { color: var(--g); }
.karta--konec { bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(max(40cqw, 420px), 92%); z-index: 6; }
.karta__replika { margin: .3cqw 0 .2cqw; font-size: max(1.1cqw, 11px); font-style: italic; color: var(--g); }
.karta__shtamp { display: inline-block; margin-left: .4em; padding: 0 .4em; border: 2px solid #D62B12; border-radius: 4px; color: #D62B12; font-style: normal; font-weight: 900; text-transform: uppercase; font-size: .85em; transform: rotate(-4deg); }
.karta__knopki { display: flex; flex-wrap: wrap; gap: .8cqw; margin-top: 1cqw; }
.karta__q { margin: 0 0 .6cqw; font-weight: 700; }
.varianty { display: grid; gap: .6cqw; }
.variant { text-align: left; background: #fff; border: .18cqw solid var(--k); border-radius: .8cqw; padding: .7cqw 1cqw; font: 500 max(1.2cqw, 12px) Onest, sans-serif; cursor: pointer; }
.variant:hover:not(:disabled) { background: #FFF6CC; }
.variant.verno { background: #D9F2E4; border-color: var(--v); }
.variant.neverno { background: #FDE0D9; border-color: var(--f); }
.variant:disabled { cursor: default; }
.otvet p { margin: .8cqw 0 .4cqw; font-weight: 600; }
blockquote { margin: .4cqw 0 .8cqw; padding: .5cqw 1cqw; border-left: .4cqw solid var(--y); background: #fff; font-size: max(1.05cqw, 11px); color: #2F3237; }
.minus { color: var(--f); font-weight: 700; }
.knopka { background: #fff; border: .2cqw solid var(--k); border-radius: .8cqw; padding: .7cqw 1.5cqw; font: 700 max(1.25cqw, 12px) Onest, sans-serif; cursor: pointer; }
.knopka--glav { background: var(--y); }

/* Экраны: распоряжение и акт */
.ekran { position: absolute; inset: 0; background: rgba(22,24,27,.72); display: grid; place-items: center; padding: 2cqw; }
.blank { background: var(--p); border: .25cqw solid var(--k); border-radius: 1.4cqw; padding: 2.4cqw 3cqw; width: min(60cqw, 100%); font-size: max(1.3cqw, 12px); max-height: 100%; overflow: auto; }
.blank h1 { margin: .2cqw 0 1.2cqw; font-size: max(2.6cqw, 18px); line-height: 1.1; }
.blank h2 { font-size: 1.6cqw; margin: 1.2cqw 0 .5cqw; }
.blank__mt { margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--f); font-size: 1cqw; }
.blank dl { display: grid; grid-template-columns: max-content 1fr; gap: .4cqw 1.4cqw; margin: 0 0 1cqw; }
.blank dt { color: var(--g); }
.blank dd { margin: 0; font-weight: 600; }
.blank__zadacha { background: #fff; border-left: .4cqw solid var(--y); padding: .8cqw 1.2cqw; }
.blank__knopki { display: flex; gap: 1cqw; margin-top: 1.4cqw; }
.zvanie { display: inline-block; background: var(--y); border: .2cqw solid var(--k); border-radius: 2cqw; padding: .3cqw 1.2cqw; font-weight: 800; margin: 0; }
.f-ochki { display: flex; gap: 1.4cqw; flex-wrap: wrap; margin: 1cqw 0; color: var(--g); }
.f-ochki b { color: var(--k); }
.f-spisok { margin: 0; padding-left: 2cqw; display: grid; gap: .5cqw; }
.f-spisok li span { color: var(--g); font-size: max(1.1cqw, 11px); display: block; }
.f-spisok .propushcheno { color: var(--f); }
.f-shtraf { background: #fff; border: .2cqw solid var(--k); border-radius: .8cqw; padding: 1cqw 1.2cqw; }

/* Полный экран: и настоящий, и «псевдо» для iPhone */
.ramka:fullscreen, .ramka.psevdo { position: fixed; inset: 0; z-index: 10; background: var(--k); }

/* Телефон в книжной ориентации: сцена 16:9 слишком мелкая — просим повернуть. */
.povorot { display: none; }
@media (orientation: portrait) and (max-width: 700px) {
  .povorot { display: grid; position: fixed; inset: 0; z-index: 20; place-items: center; background: var(--k); color: var(--p); text-align: center; padding: 24px; font-size: 20px; font-weight: 700; }
  .povorot p { margin: 0; max-width: 300px; line-height: 1.3; }
  .povorot__tel { display: block; width: 88px; height: 88px; margin: 0 auto 16px; color: var(--y); transform-origin: 50% 50%; animation: povorot 2.4s ease-in-out infinite; }
}
@keyframes povorot { 0%, 25% { transform: none; } 55%, 85% { transform: rotate(-90deg); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .povorot__tel { animation: none; transform: rotate(-90deg); } }

/* Маскировка и события: предмет появляется на глазах */
.predmet.poyavilsya { animation: poyav .5s ease-out; }
@keyframes poyav { from { opacity: 0; transform: translateY(-1cqw) scale(.9); } }
.par path { animation: par 1.6s infinite; }
.par path:nth-child(2) { animation-delay: .5s; }
@keyframes par { 0% { opacity: 0; transform: translateY(.6cqw); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-1cqw); } }
.ssylka { color: var(--n); font-weight: 700; white-space: nowrap; }

/* ---------- Карта района ---------- */
.ekran--karta { background: var(--p); padding: 0; display: block; }
.rayon { position: absolute; inset: 0; }
.rayon > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rayon__dom--skoro, .rayon__dom--zamok { filter: grayscale(1); opacity: .45; }
.rayon__dom { cursor: pointer; }
.rayon__dom--skoro { cursor: default; }
.rayon__dom--otkryt:hover { filter: brightness(1.06); }
/* Подпись стоит над крышей: левый верх кнопки = якорь, сдвиг на ширину и высоту. */
.rayon__plashka { position: absolute; transform: translate(-50%, -100%); background: transparent; border: 0; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: .2cqw; font: inherit; color: inherit; }
.rayon__plashka::after { content: ''; width: 0; height: 0; margin-top: -.25cqw; border: .55cqw solid transparent; border-top: .7cqw solid var(--k); }
.rayon__plashka:focus-visible { outline: .3cqw dashed var(--n); outline-offset: .2cqw; border-radius: 1cqw; }
.rayon__plashka--otkryt:hover .rayon__tablichka, .rayon__plashka.navedeno .rayon__tablichka { transform: translateY(-.3cqw); }
.rayon__tablichka { display: grid; justify-items: center; white-space: nowrap; transition: transform .15s;
  background: var(--y); border: .18cqw solid var(--k); border-radius: .9cqw; padding: .3cqw .9cqw; box-shadow: 0 .25cqw 0 rgba(0,0,0,.25); }
.rayon__nazv { font-weight: 800; font-size: max(1.2cqw, 10px); line-height: 1.1; }
.rayon__pod { font-size: max(.9cqw, 8.5px); color: #4A4D52; line-height: 1.15; }
.rayon__zvezdy { color: var(--k); font-size: max(1cqw, 9px); font-weight: 800; letter-spacing: .06em; }
.rayon__flag { background: var(--f); color: #fff; border: .18cqw solid var(--k); border-radius: 1cqw; padding: .05cqw .8cqw; font-weight: 800;
  font-size: max(.85cqw, 8.5px); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.rayon__plashka--skoro .rayon__tablichka { background: #ECEAE4; box-shadow: none; }
.rayon__shapka { position: absolute; left: 1.6cqw; top: 1cqw; display: flex; align-items: baseline; gap: 1.6cqw; pointer-events: none; }
.rayon__mt { margin: 0; font-weight: 900; font-size: max(1.8cqw, 13px); text-transform: uppercase; letter-spacing: .04em; }
.rayon__zv { margin: 0; display: flex; gap: .8cqw; align-items: baseline; font-size: max(1.3cqw, 11px); }
.rayon__zv span { background: var(--k); color: var(--y); border-radius: 2cqw; padding: .2cqw 1cqw; font-weight: 800; }
.rayon__knopki { position: absolute; right: 1.6cqw; top: .8cqw; display: flex; gap: .8cqw; align-items: center; }
.rayon__knopki .knopka { padding: .5cqw 1.2cqw; }
.knopka:disabled { opacity: .45; cursor: default; }
/* «Проверка дня» на карте: пока сегодня не сыграна — тёмная с жёлтым и огоньком. */
.knopka--den { background: #16181B; color: #FFD43B; border-color: #16181B; position: relative; }
.knopka--den::after { content: ''; position: absolute; right: -.35cqw; top: -.35cqw; width: .9cqw; height: .9cqw; min-width: 8px; min-height: 8px; border-radius: 50%; background: #FF4F1F; box-shadow: 0 0 0 .2cqw #fff; animation: den-ogonek 1.6s ease-in-out infinite; }
@keyframes den-ogonek { 50% { transform: scale(.7); opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .knopka--den::after { animation: none; } }
.ikn--svet { background: #fff; color: var(--k); border: .2cqw solid var(--k); }

/* Распоряжение без подсказок, звёзды и открытие в акте, итоги района */
.blank__ekzamen { background: #FDE0D9; border-left: .4cqw solid var(--f); padding: .6cqw 1.2cqw; font-weight: 600; }
.f-zvezdy { margin: .8cqw 0 0; color: var(--g); }
.f-zv { color: var(--k); font-size: max(2cqw, 16px); letter-spacing: .08em; }
.f-otkryto { margin: .6cqw 0 0; padding: .6cqw 1.2cqw; border-left: .4cqw solid var(--n); background: #fff; font-weight: 600; }
.f-otkryto--da { border-color: var(--v); background: #D9F2E4; }
.i-dalshe { color: var(--g); margin: .8cqw 0; }
.i-tablica { width: 100%; border-collapse: collapse; margin: .6cqw 0; }
.i-tablica th { text-align: left; font-size: max(.95cqw, 10px); color: var(--g); font-weight: 700; border-bottom: .15cqw solid var(--k); padding: .3cqw .6cqw; }
.i-tablica td { padding: .3cqw .6cqw; border-bottom: .1cqw solid var(--line); }
.i-tablica .i-zv { letter-spacing: .08em; white-space: nowrap; }
.i-tablica .i-skoro { color: var(--g); }
.i-vremya { color: var(--g); margin: .4cqw 0 0; }

/* ---------- Объект человека на карте и зоны объекта (уровни) ---------- */
.rayon__plashka--moy .rayon__tablichka { background: #fff; }
.zony { list-style: none; margin: .8cqw 0 0; padding: 0; display: grid; gap: .7cqw; }
.zony__knopka { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 1cqw; align-items: center; text-align: left; cursor: pointer;
  background: var(--y); border: .2cqw solid var(--k); border-radius: 1cqw; padding: .7cqw 1.1cqw; font: inherit; color: var(--k); box-shadow: 0 .3cqw 0 var(--k); transition: transform .15s; }
.zony__knopka:hover { transform: translateY(-.2cqw); }
.zony__knopka:focus-visible { outline: .3cqw dashed var(--n); outline-offset: .2cqw; }
.zony__knopka--zamok { background: #ECEAE4; box-shadow: none; cursor: default; }
.zony__knopka--zamok:hover { transform: none; }
.zony__nom { width: 2.6cqw; height: 2.6cqw; min-width: 22px; min-height: 22px; border-radius: 50%; background: #fff; border: .18cqw solid var(--k);
  display: grid; place-items: center; font-weight: 900; }
.zony__tekst { display: grid; gap: .15cqw; }
.zony__nazv { font-weight: 800; font-size: max(1.45cqw, 13px); line-height: 1.15; }
.zony__pod { font-size: max(1cqw, 11px); color: #4A4D52; line-height: 1.25; }
.zony__zv { font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
/* Строка зоны: сама зона (игра) и рядом «▶ С инспектором» — просмотр без игры, открыт для любой зоны. */
.zony li { display: grid; grid-template-columns: 1fr auto; gap: .6cqw; align-items: stretch; }
.zony__smotr { border: .2cqw solid var(--k); border-radius: 1cqw; background: var(--k); color: var(--y); font: 700 max(1.1cqw, 12px)/1.15 Onest, sans-serif;
  padding: .5cqw 1cqw; cursor: pointer; max-width: 9.5em; text-align: center; min-height: 44px; }
.zony__smotr:hover { background: #2A3D6B; }
.zony__smotr:focus-visible { outline: .3cqw dashed var(--n); outline-offset: .2cqw; }
.knopka--smotret { margin-top: 1.2cqw; }

/* ---------- Вызов и «Поделиться» (igra/PODELITSYA.md) ---------- */
.blank__vyzov, .f-vyzov { background: #fff; border: .2cqw solid var(--k); border-left: .6cqw solid var(--n); border-radius: .8cqw; padding: .8cqw 1.2cqw; margin: 1cqw 0; }
.f-vyzov--da { border-left-color: var(--v); background: #E7F5EC; }
.ekran--podel { z-index: 6; }
.blank--podel { width: min(84cqw, 100%); }
.podel { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; align-items: start; margin-top: 1cqw; }
.podel__prevyu { background: #ECEAE4; border-radius: .8cqw; display: grid; place-items: center; height: 26cqw; padding: .8cqw; }
.podel__prevyu img { max-width: 100%; max-height: 100%; border: .15cqw solid var(--k); border-radius: .4cqw; background: #fff; }
.podel__upr { display: flex; flex-direction: column; gap: .9cqw; }
.podel__formaty { display: flex; gap: .5cqw; }
.vkladka { flex: 1; background: #fff; border: .2cqw solid var(--k); border-radius: .8cqw; padding: .55cqw .8cqw; font: 700 max(1.15cqw, 12px) Onest, sans-serif; cursor: pointer; }
.vkladka[aria-pressed="true"] { background: var(--k); color: var(--y); }
.podel__pod { margin: 0; color: var(--g); font-size: max(1.05cqw, 11px); }
.podel__imya { display: flex; flex-direction: column; gap: .3cqw; font-size: max(1.05cqw, 11px); color: var(--g); }
.podel__imya input { font: 600 max(1.25cqw, 13px) Onest, sans-serif; padding: .6cqw .9cqw; border: .2cqw solid var(--k); border-radius: .7cqw; color: var(--k); }
.podel__kanaly { display: flex; flex-wrap: wrap; gap: .6cqw; }
.podel__kanaly .knopka { padding: .6cqw 1.1cqw; }
.kanal--vk { border-color: #0077FF; } .kanal--tg { border-color: #229ED9; } .kanal--ok { border-color: #EE8208; } .kanal--wa { border-color: #25D366; }
/* «Не сейчас» прилипает к верху окна: на телефоне окно прокручивается, а закрыть можно всегда. */
.podel__zakryt { position: sticky; top: 0; float: right; z-index: 1; background: var(--p); border: 0; border-radius: .6cqw; padding: .3cqw .6cqw; color: var(--g); font: 600 max(1.1cqw, 12px) Onest, sans-serif; text-decoration: underline; cursor: pointer; }
.knopka:focus-visible, .vkladka:focus-visible, .podel__zakryt:focus-visible { outline: .3cqw dashed var(--n); outline-offset: .2cqw; }

/* Печать грамоты: только лист А4 с картинкой. */
.pechat { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff; height: auto; }
  .ramka, .povorot { display: none !important; }
  .pechat { display: block; }
  .pechat img { display: block; width: 210mm; height: 297mm; }
}

/* ---------- Режимы: выбор на распоряжении, ночь с фонариком, строка экзамена в акте ---------- */
.rezhimy { margin: 1cqw 0 0; }
.rezhimy__mt { margin: 0 0 .4cqw; font-weight: 800; font-size: max(1cqw, 11px); text-transform: uppercase; letter-spacing: .05em; color: var(--g); }
.rezhimy__knopki { display: flex; gap: .6cqw; }
.vkladka--zamok { background: #ECEAE4; color: #7A7D82; }
.rezhimy__pod { margin: .5cqw 0 0; font-size: max(1.05cqw, 11px); color: #4A4D52; line-height: 1.3; }
/* Темнота с мягким краем круга. Радиус — 12cqw, от пальца — 15cqw (палец закрывает середину); те же числа в vSvete(). */
.fonar {
  position: absolute; inset: 0; pointer-events: none; --fx: 50%; --fy: 55%; --fr: 12cqw;
  background: radial-gradient(circle at var(--fx) var(--fy), rgba(255,240,190,.10) 0, rgba(255,240,190,.05) calc(var(--fr) * .72), rgba(5,8,16,.95) var(--fr));
}
.fonar--palec { --fr: 15cqw; }
.scena--noch { touch-action: none; }
.f-ekzamen { margin: .6cqw 0 0; padding: .6cqw 1.2cqw; border-left: .4cqw solid var(--f); background: #FDE0D9; font-weight: 600; }
.f-ekzamen--da { border-color: var(--v); background: #D9F2E4; }

/* ---------- Экран зон: разрез здания + список (11.11.2026) ---------- */
.blank--zony { width: min(88cqw, 100%); }
.zony-ryad { display: grid; grid-template-columns: 38% 1fr; gap: 2cqw; align-items: start; }
.zony-ryad .zony { margin-top: 0; }
.zony__razrez { position: sticky; top: 0; }
.razrez { width: 100%; height: auto; display: block; }
.razrez .rz-komnata { color: #FFF3B8; cursor: pointer; }
.razrez .rz-komnata[data-k="otkryt"] { color: var(--y); }
.razrez .rz-komnata[data-k="gotovo"] { color: #C9EBD6; }
.razrez .rz-komnata[data-k="zam"] { color: #ECEAE4; }
.razrez .rz-komnata[data-k="net"] { color: #DCD9D0; cursor: default; }
.razrez .rz-komnata:hover polygon { filter: brightness(.94); }
.razrez .rz-komnata:focus-visible { outline: none; }
.razrez .rz-komnata:focus-visible polygon { stroke: var(--n); stroke-width: 4; }
.razrez .rz-metka { pointer-events: none; }
.razrez .rz-metka circle { fill: var(--k); }
.razrez .rz-metka[data-k="gotovo"] circle { fill: #14744B; }
.razrez .rz-metka[data-k="zam"] circle, .razrez .rz-metka[data-k="net"] circle { fill: #9A9CA0; }
.razrez .rz-n { font: 800 11px Onest, system-ui, sans-serif; fill: #fff; text-anchor: middle; }
.razrez .rz-t { font: 700 10px Onest, system-ui, sans-serif; fill: var(--k); text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 2.5px; }
.razrez .rz-metka[data-k="net"] .rz-t { fill: #6B6E73; }
/* Телефон лёжа (кадр уже ~900 px): заголовок карты уступает место званию и кнопкам. */
@container (max-width: 900px) { .rayon__mt { display: none; } }

/* ---------- озвученный разбор зоны ---------- */
.knopka--razbor { display: block; width: 100%; margin: 1cqw 0 .4cqw; background: var(--k); color: var(--y); border-color: var(--k); text-align: left; padding: 1cqw 1.5cqw; font-size: max(1.5cqw, 14px); }
.knopka--razbor span { display: block; color: #fff; opacity: .75; font-weight: 500; font-size: max(1.05cqw, 11px); margin-top: .2cqw; }
.razbor { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2cqw; pointer-events: none; }
.razbor__plashka { pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto; gap: 1.2cqw; align-items: center; background: rgba(255,255,255,.97); border: .2cqw solid var(--k); border-radius: 1.2cqw; padding: 1cqw 1.3cqw; box-shadow: 0 .5cqw 0 rgba(22,24,27,.35); }
.razbor__lico { width: 6.4cqw; height: 6.4cqw; border-radius: 50%; border: .2cqw solid var(--k); background: var(--n); object-fit: cover; }
.razbor__tekst { min-width: 0; }
.razbor__metka { display: inline-block; margin: 0 0 .3cqw; padding: .15cqw .7cqw; border-radius: 99px; font: 700 max(1cqw, 11px) Onest, sans-serif; background: var(--line); }
.razbor__metka--naydeno { background: #D9F2E3; color: var(--v); }
.razbor__metka--propushcheno, .razbor__metka--oshibka, .razbor__metka--smotr { background: #FFE1D8; color: #B3300F; }
.razbor__metka--obmanka, .razbor__metka--punkt { background: #FFF3C4; color: #6B5300; }
.razbor__nazv { margin: 0; font: 800 max(1.45cqw, 13px)/1.2 Onest, sans-serif; }
.razbor__titr { margin: .3cqw 0 0; font: 500 max(1.3cqw, 12px)/1.35 Onest, sans-serif; }
.razbor__knopki { display: grid; grid-template-columns: repeat(3, auto); gap: .5cqw; align-items: center; justify-items: center; }
.razbor__schet { grid-column: 1 / -1; font: 600 max(.95cqw, 10px) Onest, sans-serif; color: var(--g); }
.razbor__zakryt { grid-column: 1 / -1; padding: .45cqw 1cqw; }
.razbor-ramka { position: absolute; border: .35cqw solid var(--y); border-radius: .8cqw; box-shadow: 0 0 0 100cqw rgba(22,24,27,.45); animation: razbor-puls 1.2s ease-in-out infinite; pointer-events: none; z-index: 3; }
.razbor-ramka--naydeno { border-color: #2E9E5B; }
.razbor-ramka--punkt { border-color: var(--y); }
.razbor--verh { bottom: auto; top: 0; padding-right: calc(max(4.6cqw, 44px) + 2cqw); }
.razbor-ramka--propushcheno, .razbor-ramka--oshibka, .razbor-ramka--smotr { border-color: #E0412A; }
@keyframes razbor-puls { 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .razbor-ramka { animation: none; } }

/* ---------- UX 13.11 ---------- */
/* Распоряжение на низком экране прокручивается, а кнопки «Начать проверку» всегда на виду. */
.blank__knopki:has([data-nachat]) { position: sticky; bottom: -2.4cqw; background: var(--p); padding: .8cqw 0 2.4cqw; margin-bottom: -2.4cqw; box-shadow: 0 -.8cqw .8cqw -.6cqw rgba(22,24,27,.25); }
/* Персонаж объекта стоит на полу, а не поверх картинки: мягкая тень, как у предметов. */
.scena__om { filter: drop-shadow(.35cqw .45cqw .35cqw rgba(42,28,14,.3)); }

/* ---------- экран победы (Figma umGfdxeSQ8DkJVsQXfrge6, 38:2): 1 cqw = 15,36 px макета ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pobeda { position: absolute; inset: 0; z-index: 5; background: rgba(22,24,27,.62); backdrop-filter: blur(1.2cqw); -webkit-backdrop-filter: blur(1.2cqw);
  display: grid; place-items: center; padding: 1.5cqw; animation: pb-fon .2s ease-out; }
.pobeda__insp { position: absolute; right: 7cqw; bottom: -1cqw; height: 88%; pointer-events: none; animation: pb-insp .45s cubic-bezier(.2,1.4,.4,1) .15s both; }
.pobeda__karta { position: relative; width: 53.4cqw; max-height: 100%; overflow: auto; margin-right: 12cqw; background: var(--p); border: .26cqw solid var(--k); border-radius: 2.1cqw;
  box-shadow: 0 .65cqw 0 var(--k); padding: 2cqw 3.1cqw 2.1cqw; display: grid; justify-items: center; gap: .9cqw; text-align: center;
  font-size: max(1.3cqw, 12px); animation: pb-karta .35s cubic-bezier(.2,1.3,.4,1) both; }
.pobeda__akt { position: absolute; top: .9cqw; right: 1cqw; background: none; border: 0; padding: .5cqw .8cqw; font: 600 max(1.17cqw, 12px) Onest, sans-serif; color: var(--g); text-decoration: underline; cursor: pointer; }
.pobeda__mt { margin: 0; color: var(--f); font-weight: 700; font-size: max(1.17cqw, 11px); letter-spacing: .1em; text-transform: uppercase; }
.pobeda__zag { margin: -.6cqw 0 0; font-size: max(2.6cqw, 20px); font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.pobeda__pod { margin: -.8cqw 0 0; color: var(--g); font-weight: 500; }
.pobeda__zvezdy { position: relative; width: 32.6cqw; height: 11.5cqw; }
.pz { position: absolute; top: 2.9cqw; left: 2cqw; width: 8.3cqw; height: 8.3cqw; transform: rotate(8deg); }
.pz--sred { top: 0; left: 11.1cqw; width: 10.4cqw; height: 10.4cqw; transform: none; }
.pz:last-of-type { left: 22.3cqw; transform: rotate(-8deg); }
.pz svg { width: 100%; height: 100%; overflow: visible; }
.pz path { fill: var(--line); stroke: #C9C6BE; stroke-width: 5; stroke-linejoin: round; }
.pz.est path { fill: var(--y); stroke: var(--k); filter: drop-shadow(0 4px 0 var(--k)); }
.pz.est svg { animation: pb-zvezda .45s cubic-bezier(.3,1.6,.5,1) both; }
.pobeda__konfetti { position: absolute; inset: 0; pointer-events: none; }
.pobeda__konfetti i { position: absolute; left: 50%; top: 45%; width: 1cqw; height: .5cqw; border-radius: .15cqw; opacity: 0; animation: pb-konf 1.1s ease-out forwards; }
.pobeda__stroka { display: flex; align-items: center; gap: 1.4cqw; flex-wrap: wrap; justify-content: center; }
.pobeda__zvanie { background: #fff; border: .2cqw solid var(--k); border-radius: 99px; box-shadow: 0 .26cqw 0 var(--k); padding: .6cqw 1.8cqw; font-weight: 800; font-size: max(1.8cqw, 15px); visibility: hidden; }
.pobeda__zvanie.est { visibility: visible; animation: pb-shtamp .35s cubic-bezier(.3,1.5,.5,1) both; }
.pobeda__zvanie--3 { background: var(--y); }
.pobeda__bally { display: flex; align-items: center; gap: .65cqw; color: var(--g); font-weight: 600; font-size: max(1.43cqw, 13px); }
.pobeda__bally b { color: var(--k); font-size: max(4.2cqw, 30px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.pobeda__rekord { font-style: normal; background: var(--n); color: #fff; border-radius: 99px; padding: .25cqw .65cqw; font-size: max(1cqw, 11px); font-weight: 700; animation: pb-poyav .3s cubic-bezier(.3,1.6,.5,1) both; }
.pobeda__pokaz { display: flex; gap: .9cqw; }
.pobeda__pokaz span { display: grid; background: #fff; border: .13cqw solid var(--line); border-radius: .9cqw; padding: .65cqw 1.3cqw; color: var(--g); font-size: max(1.05cqw, 11px); font-weight: 500; }
.pobeda__pokaz b { color: var(--k); font-size: max(1.7cqw, 15px); font-weight: 800; }
.pobeda__lenty { display: grid; gap: .6cqw; width: 100%; }
.pobeda__lenty p { margin: 0; text-align: left; padding: .8cqw 1.3cqw; border-radius: .8cqw; border-left: .4cqw solid var(--n); background: #E3EAFD; font-weight: 600; }
.pobeda__lenty .lenta-den { display: flex; align-items: center; gap: 1cqw; flex-wrap: wrap; }
.pobeda__lenty .pb-kv { display: inline-flex; gap: .4cqw; }
.pobeda__lenty .pb-kv i { width: max(1.9cqw, 18px); height: max(1.9cqw, 18px); border-radius: .3cqw; border: 2px solid #16181B; background: #fff; }
.pobeda__lenty .pb-kv i.pb-kv--z { background: #14744B; }
.pobeda__lenty .pb-kv i.pb-kv--j { background: #FFD43B; }
.pobeda__lenty .pb-kv i.pb-kv--k { background: #FF4F1F; }
.pobeda__lenty .da { border-color: var(--v); background: #D9F2E4; }
.pobeda__knopki { display: flex; gap: 1cqw; padding-top: .3cqw; }
.pobeda__knopki .knopka { font-size: max(1.56cqw, 14px); padding: 1.1cqw 2.1cqw; border-radius: 1cqw; box-shadow: 0 .33cqw 0 var(--k); }
.pobeda__knopki .knopka:active, .pobeda__akt:active { transform: translateY(.2cqw) scale(.97); box-shadow: 0 .1cqw 0 var(--k); }
.pobeda__pozzhe { opacity: 0; transition: opacity .15s; }
.pobeda__pozzhe.est { opacity: 1; }
.pobeda--tryaska .pobeda__karta { animation: tr .18s 2; }
@keyframes pb-fon { from { opacity: 0; } }
@keyframes pb-karta { from { opacity: 0; transform: translateY(3cqw) scale(.92); } }
@keyframes pb-insp { from { opacity: 0; transform: translateX(4cqw); } }
@keyframes pb-zvezda { 0% { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes pb-shtamp { 0% { transform: scale(1.6) rotate(-4deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes pb-poyav { from { transform: scale(0); } }
@keyframes pb-konf { 0% { opacity: 1; transform: translate(0,0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } }
@media (prefers-reduced-motion: reduce) {
  .pobeda, .pobeda *, .pobeda__karta { animation: none !important; transition: none !important; }
  .pobeda__konfetti { display: none; }
}
.pobeda__pozzhe:not(.est) { pointer-events: none; }

/* ---------- переходы: заставка зоны, подсказка, стрелка зовёт (RAZBOR-PEREHODY-2026-11-15) ---------- */
.pomoshch-knopka { position: absolute; left: 1.2cqw; bottom: 1.2cqw; background: var(--p); color: var(--k); border: .2cqw solid var(--k); border-radius: .8cqw; padding: .8cqw 1.4cqw; font: 700 max(1.3cqw, 11px) Onest, sans-serif; cursor: pointer; }
.pomoshch-knopka:active, .akt-knopka:active { transform: scale(.96); }
.zastavka { position: absolute; inset: 0; z-index: 8; display: grid; place-content: center; justify-items: center; gap: .8cqw; background: rgba(22,24,27,.72); color: #F6F5F2; text-align: center; cursor: pointer; animation: zs-fon .25s ease both; }
.zastavka__mt { margin: 0; font: 700 max(1.3cqw, 12px) Onest, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--y); animation: zs-tekst .4s .05s ease both; }
.zastavka__zag { margin: 0; font: 800 max(4.2cqw, 26px)/1.1 Onest, sans-serif; animation: zs-tekst .45s .12s ease both; }
.zastavka__pod { margin: 0; font: 600 max(1.5cqw, 13px) Onest, sans-serif; color: rgba(246,245,242,.8); animation: zs-tekst .45s .2s ease both; }
.zastavka--uhodit { animation: zs-uhod .3s ease both; }
@keyframes zs-fon { from { opacity: 0; } }
@keyframes zs-tekst { from { opacity: 0; transform: translateY(1.2cqw); } }
@keyframes zs-uhod { to { opacity: 0; } }
.strelka.zovet { animation: zovet 1s ease-in-out infinite; box-shadow: 0 0 0 0 rgba(255,212,59,.7); }
@keyframes zovet { 50% { transform: scale(1.12); box-shadow: 0 0 0 .9cqw rgba(255,212,59,0); } }
.podskazka-krug { position: absolute; border-radius: 50%; border: .35cqw dashed var(--y); background: rgba(255,212,59,.12); pointer-events: none; z-index: 2; animation: razbor-puls 1.4s ease-in-out infinite; }
.knopka--sdayus { background: transparent; border-color: transparent; text-decoration: underline; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .zastavka, .zastavka *, .strelka.zovet, .podskazka-krug { animation: none; } }
/* Низкий экран (телефон лёжа): на экране победы одна лента, иначе кнопки уходят под край. */
@media (max-height: 460px) { .pobeda__lenty p + p { display: none; } }

/* ---------- Телефон лёжа (16.11.2026) ---------- */
/* Карточки вопроса и обманки не выходят за сцену: длинный ответ с выпиской прокручивается внутри. */
.karta { max-height: calc(100% - 2.4cqw); overflow-y: auto; overscroll-behavior: contain; }
.karta--verh { max-height: calc(100% - max(6.6cqw, 48px) - 1.2cqw); }
.karta--konec { max-height: calc(100% - 2.4cqw); }
/* «Дальше» и «Понятно» прилипают к низу карточки: если ответ с выпиской не влез, кнопка всё равно на виду. */
.karta [data-dalee], .karta [data-o-dalee] { position: sticky; bottom: 0; box-shadow: 0 0 0 .6cqw var(--p); }
@media (orientation: landscape) and (max-height: 500px) {
  /* Окна прокручиваются, а кнопки действий прилипают к низу окна и всегда на виду. */
  .blank__knopki { position: sticky; bottom: -2.4cqw; z-index: 1; background: var(--p); padding: 8px 0 2.4cqw; margin-bottom: -2.4cqw; box-shadow: 0 -8px 8px -6px rgba(22,24,27,.25); flex-wrap: wrap; gap: 6px; }
  .ekran--akt .blank__knopki { margin-bottom: 0; }
  .blank, .mn-list, .pobeda__karta { overscroll-behavior: contain; }
  .blank { padding: 14px 18px; }
  .blank h1 { margin-bottom: 8px; }
  /* Экран победы на низком окне: звёзды мельче, кнопки прилипают к низу карточки. */
  .pobeda__karta { gap: 6px; padding-top: 12px; padding-bottom: 0; }
  .pobeda__zvezdy { zoom: .72; }
  .pobeda__knopki { position: sticky; bottom: 0; background: var(--p); padding: 6px 0 10px; width: 100%; justify-content: center; }
}
/* Пальцем и на низком окне телефона: кнопки не ниже 38 px. */
@media (pointer: coarse), (orientation: landscape) and (max-height: 500px) {
  .knopka, .vkladka, .mn-punkt, .mn-tumbler, .pomoshch-knopka, .akt-knopka, .rt-vkl { min-height: 38px; }
  .variant { min-height: 38px; padding-top: 7px; padding-bottom: 7px; }
  .podel__zakryt { min-height: 32px; }
}

/* Поля по бокам сцены (html.igra-polya — скрипт в igra.html): табло слева, меню, штраф и «Составить акт» справа,
   окна и карточки — во всю ширину экрана. --pole — ширина одного поля. */
.igra-polya .scena { overflow: visible; }
.igra-polya .scena__sloi { overflow: hidden; }
.igra-polya .scena .tablo {
  top: 0; bottom: 0; left: calc(-1 * var(--pole)); right: calc(-1 * var(--pole));
  display: grid; grid-template-columns: var(--pole) 1fr var(--pole); grid-template-rows: 48px; grid-auto-rows: min-content;
  align-content: start; justify-items: center; gap: 6px 0; padding: 8px 0; font-size: 11px;
}
.igra-polya .tablo > * { grid-column: 1; width: calc(var(--pole) - 14px); }
.igra-polya .tablo__insp { width: 44px; height: 44px; border-width: 2px; }
.igra-polya .tablo__pole { padding: 5px 7px; border-radius: 8px; background: #262A31; }
.igra-polya .tablo__mt { font-size: 9px; letter-spacing: .02em; }
.igra-polya .tablo__pole b { font-size: 15px; }
.igra-polya .tablo__pole--shtraf { grid-column: 3; grid-row: 2; margin-left: 0; }
.igra-polya .tablo__pole--shtraf b { font-size: 11px; line-height: 1.2; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.igra-polya .seriya { bottom: -9px; font-size: 9px; padding: 1px 6px; }
.igra-polya .bally-plus { top: -8px; right: 6px; font-size: 14px; }
.igra-polya .mn-knopka { top: 8px; right: calc(var(--pole) / -2 - 22px); width: 44px; height: 44px; }
.igra-polya .pomoshch-knopka, .igra-polya .akt-knopka {
  bottom: 8px; width: calc(var(--pole) - 14px); min-height: 48px; padding: 6px 4px; border-width: 2px; border-radius: 10px;
  font-size: 12px; line-height: 1.15; white-space: normal;
}
.igra-polya .pomoshch-knopka { left: calc(7px - var(--pole)); }
.igra-polya .akt-knopka { right: calc(7px - var(--pole)); }
/* Окна, победа, меню и заставка — на весь экран вместе с полями. Карта района остаётся в кадре, поля — цвета её фона. */
.igra-polya :is(.ekran:not(.ekran--karta), .pobeda, .mn-okno, .zastavka) { left: calc(-1 * var(--pole)); right: calc(-1 * var(--pole)); }
.igra-polya .ekran--karta { box-shadow: 0 0 0 var(--pole) var(--p); }
.igra-polya .blank { width: min(calc(60cqw + var(--pole)), 100%); }
.igra-polya .blank--zony, .igra-polya .blank--podel { width: min(calc(88cqw + var(--pole) * 2), 100%); }
.igra-polya .pobeda__karta { width: calc(53.4cqw + var(--pole)); }
.igra-polya .pobeda__insp { right: calc(7cqw + var(--pole) / 2); }
.igra-polya .karta { z-index: 7; width: min(680px, calc(100% + var(--pole) * 2 - 16px)); bottom: 8px; max-height: calc(100% - 16px); }
.igra-polya .karta--verh { bottom: auto; top: 8px; }
.igra-polya .karta--konec { bottom: auto; top: 50%; width: min(560px, calc(100% + var(--pole) * 2 - 16px)); }
/* Главное меню: синяя панель доходит до левого края экрана, район остаётся справа. */
.igra-polya .mn-glav { left: calc(-1 * var(--pole)); right: calc(-1 * var(--pole)); }
.igra-polya .mn-glav__panel { width: calc(44cqw + var(--pole)); padding-left: 16px; }
.igra-polya .mn-glav__insp { left: calc(41cqw + var(--pole)); }
.igra-polya .razbor { left: calc(-1 * var(--pole)); right: calc(-1 * var(--pole)); padding: 8px; }
/* Главное меню на низком окне: пункты под «Играть» в две колонки, чтобы всё влезло без прокрутки. */
@media (orientation: landscape) and (max-height: 420px) {
  .mn-glav__logo { margin-bottom: 6px; }
  .mn-glav__logo img { width: min(100%, 190px); }
  .mn-glav__zv { margin-bottom: 8px; }
  .mn-glav .mn-spisok { grid-template-columns: 1fr 1fr; gap: 6px; }
  .mn-glav .mn-punkt { padding: 6px 9px; font-size: 12px; line-height: 1.2; }
  .mn-glav .mn-punkt--glav { grid-column: 1 / -1; padding: 7px 12px; }
  .mn-sayt { padding-top: 8px; }
}
