/* Платформа симуляций — стиль по брендбуку «Агенты будущего» (brand-tokens v0.2) */
:root {
  --ab-night: #0D1B2A; --ab-deep: #06111C; --ab-surface: #142638; --ab-raised: #1B2F46; --ab-line: #22344E;
  --ab-light: #F4F7FA; --ab-text: #E8EDF2; --ab-text-2: #A9BDD0; --ab-sky: #5DADE2; --ab-orange: #E67E22; --ab-stamp: #C8462E;
  --ab-self: #3498DB; --ab-act: #E67E22; --ab-act-300: #F1B885; --ab-inter: #9B59B6; --ab-inter-300: #C8A4D7; --ab-think: #27AE60; --ab-think-300: #88D2A8;
  --side0: #5DADE2; --side1: #E8EDF2;
  --r-card: 20px; --r-media: 16px;
  --font: 'Manrope', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--font); color: var(--ab-text); font-size: 16px; line-height: 1.5;
  background-color: var(--ab-night);
  background-image: radial-gradient(rgba(93,173,226,.13) 1px, transparent 1.5px);
  background-size: 22px 22px;
}
button, input { font: inherit; color: inherit; }
a { color: var(--ab-sky); }
[hidden] { display: none !important; }

.top { display: flex; align-items: center; gap: 14px; padding: 18px 28px; }
.top .logo img { height: 26px; display: block; }
.top .divider { width: 1px; height: 22px; background: var(--ab-line); }
.top .product { font-weight: 700; color: var(--ab-text-2); }

main { max-width: 1240px; margin: 0 auto; padding: 8px 24px 48px; }

h1 { font-size: 40px; font-weight: 800; line-height: 1.1; margin-bottom: 8px; }
h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.sub { color: var(--ab-text-2); font-size: 17px; margin-bottom: 26px; max-width: 720px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ab-sky); }
.muted { color: var(--ab-text-2); }

.card {
  background: var(--ab-surface); border: 1px solid var(--ab-line); border-radius: var(--r-card); padding: 24px;
}
.glass {
  background: linear-gradient(160deg, rgba(27,47,70,.82), rgba(20,38,56,.72));
  border: 1px solid rgba(93,173,226,.35); border-radius: var(--r-card); padding: 22px;
  box-shadow: 0 0 0 1px rgba(93,173,226,.06) inset, 0 18px 40px rgba(0,0,0,.25);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } h1 { font-size: 32px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 12px 24px; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--ab-sky); background: transparent; color: var(--ab-text); transition: background .15s, opacity .15s;
}
.btn:hover { background: rgba(93,173,226,.12); }
.btn.primary { background: var(--ab-orange); border-color: var(--ab-orange); color: #fff; }
.btn.primary:hover { background: #d4711b; }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.ghost { border-color: var(--ab-line); color: var(--ab-text-2); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.on { background: var(--ab-sky); color: var(--ab-night); border-color: var(--ab-sky); }

input.field {
  width: 100%; padding: 14px 18px; border-radius: 14px; border: 1.5px solid var(--ab-line);
  background: var(--ab-deep); font-size: 18px; outline: none;
}
input.field:focus { border-color: var(--ab-sky); }
input.code { font-family: var(--mono); font-size: 30px; letter-spacing: .3em; text-transform: uppercase; text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 14px; }

/* каталог игр */
.game-tile { cursor: pointer; transition: border-color .15s, transform .15s; position: relative; overflow: hidden; }
.game-tile:hover { border-color: var(--ab-sky); transform: translateY(-2px); }
.game-tile.soon { cursor: default; opacity: .55; }
.game-tile.soon:hover { border-color: var(--ab-line); transform: none; }
.game-tile .art { height: 120px; border-radius: var(--r-media); margin-bottom: 14px;
  background-color: var(--ab-deep);
  background-image: linear-gradient(rgba(93,173,226,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(93,173,226,.18) 1px, transparent 1px);
  background-size: 22px 22px; display: flex; align-items: center; justify-content: center; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--ab-line); color: var(--ab-text-2); }

/* метка Силы */
.sila { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #16202E; border-radius: 999px;
  padding: 5px 12px 5px 6px; font-size: 13px; font-weight: 700; border: 2px solid var(--c); }
.sila img { width: 22px; height: 22px; background: color-mix(in srgb, var(--c) 14%, white); border-radius: 50%; padding: 3px; }

/* код игры */
.bigcode { font-family: var(--mono); font-weight: 600; font-size: 64px; letter-spacing: .25em; color: #fff; line-height: 1; }
.corners { position: relative; padding: 22px 28px; display: inline-block; }
.corners::before, .corners::after, .corners > i::before, .corners > i::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-color: var(--ab-sky); border-style: solid; }
.corners::before { left: 0; top: 0; border-width: 3px 0 0 3px; }
.corners::after { right: 0; top: 0; border-width: 3px 3px 0 0; }
.corners > i::before { left: 0; bottom: 0; border-width: 0 0 3px 3px; }
.corners > i::after { right: 0; bottom: 0; border-width: 0 3px 3px 0; }

/* лобби */
.team { border-radius: var(--r-card); padding: 18px; border: 1.5px solid var(--ab-line); background: var(--ab-surface); min-height: 140px; }
.team.s0 { border-color: color-mix(in srgb, var(--side0) 55%, transparent); }
.team.s1 { border-color: color-mix(in srgb, var(--side1) 45%, transparent); }
.team h3 { display: flex; align-items: center; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.pl { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ab-line); }
.pl:last-child { border-bottom: 0; }
.pl .name { font-weight: 700; flex: 1; }
.pl .st { font-size: 13px; color: var(--ab-text-2); }
.pl .off { color: var(--ab-stamp); }

/* правила */
.rules { display: grid; grid-template-columns: 1fr; gap: 12px; }
.rule { display: flex; gap: 16px; align-items: flex-start; }
.rule .n { font-family: var(--mono); color: var(--ab-sky); font-size: 14px; min-width: 28px; padding-top: 2px; }
.brief { border-left: 3px solid var(--ab-sky); padding: 4px 0 4px 16px; font-size: 17px; }
.brief b { color: #fff; }

/* игровой экран */
.play { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .play { grid-template-columns: 1fr; } }
.board-wrap { position: relative; }
.board-wrap svg { width: 100%; height: auto; max-height: calc(100vh - 330px); min-height: 300px; display: block; margin: 0 auto; touch-action: manipulation; user-select: none; }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; margin-bottom: 14px;
  background: var(--ab-surface); border: 1.5px solid var(--ab-line); font-weight: 700; }
.banner.mine { border-color: var(--ab-orange); background: rgba(230,126,34,.12); }
.banner .who { flex: 1; }
.side-card { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ab-line); }
.side-card:last-child { border-bottom: 0; }
.side-card .nm { font-weight: 800; }
.energy { display: flex; gap: 4px; margin-top: 4px; }
.energy i { width: 14px; height: 8px; border-radius: 3px; background: var(--ab-line); }
.energy i.on { background: var(--ab-sky); }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tools .btn { padding: 10px 8px; font-size: 14px; }
.shift { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ab-text-2); }
.log { height: 260px; overflow: auto; font-size: 13.5px; }
.log div { padding: 5px 0; border-bottom: 1px solid rgba(34,52,78,.6); }
.log .flag { color: var(--ab-orange); font-weight: 700; }
.log .sys { color: var(--ab-text-2); }
.hint { font-size: 13.5px; color: var(--ab-text-2); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ab-raised); color: #fff;
  border: 1px solid var(--ab-sky); padding: 12px 20px; border-radius: 14px; font-weight: 600; z-index: 10; max-width: 90vw; text-align: center; }

.stamp { display: inline-block; border: 3px solid var(--ab-stamp); color: var(--ab-stamp); font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; padding: 8px 16px; border-radius: 8px; transform: rotate(-9deg); font-size: 20px; background: rgba(255,255,255,.92); }
.over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  background: rgba(6,17,28,.72); border-radius: var(--r-card); text-align: center; padding: 20px; }
.over.pause .stamp { border-color: var(--ab-sky); color: var(--ab-night); }

table.mt { width: 100%; border-collapse: collapse; font-size: 14px; }
table.mt th { text-align: left; color: var(--ab-text-2); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 6px 6px; border-bottom: 1px solid var(--ab-line); }
table.mt td { padding: 7px 6px; border-bottom: 1px solid var(--ab-line); white-space: nowrap; }
table.mt td.nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }

.note { display: flex; gap: 8px; }
.note input { flex: 1; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--ab-line); background: var(--ab-deep); font-size: 14px; outline: none; }
.note input:focus { border-color: var(--ab-sky); }
.log .thought { font-style: italic; color: var(--ab-text-2); margin-top: 2px; }

/* звук */
.audio-ctl { margin-left: auto; display: flex; gap: 8px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 999px; border: 1.5px solid var(--ab-line); background: transparent;
  color: var(--ab-sky); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { border-color: var(--ab-sky); }
.icon-btn .slash { display: none; position: absolute; width: 24px; height: 2px; background: var(--ab-stamp); transform: rotate(-45deg); }
.icon-btn.off { color: var(--ab-text-2); }
.icon-btn.off .slash { display: block; }

/* анимация ходов */
.appear { animation: appear .45s cubic-bezier(.3,1.4,.5,1); transform-box: fill-box; transform-origin: center; }
@keyframes appear { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
.dying { animation: dying .9s ease-in .45s forwards; transform-box: fill-box; transform-origin: center; }
@keyframes dying { 0% { opacity: 1; transform: scale(1); } 30% { opacity: 1; transform: scale(1.3); } 100% { opacity: 0; transform: scale(.1) rotate(120deg); } }
.shake { animation: shake .45s ease .38s; }
@keyframes shake { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-5px,2px); } 40% { transform: translate(5px,-2px); } 60% { transform: translate(-3px,1px); } 80% { transform: translate(2px,0); } }

.sel { margin-left: 6px; padding: 6px 10px; border-radius: 999px; border: 1.5px solid var(--ab-line); background: var(--ab-deep); color: var(--ab-text); font: inherit; font-size: 14px; }
.team label.hint { display: inline-flex; align-items: center; }

/* приманка */
.lure { animation: lure 2.6s ease forwards; }
@keyframes lure { 0% { opacity: 0; } 10% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
.lure-line { animation: lureDash .6s linear infinite; }
@keyframes lureDash { to { stroke-dashoffset: -15; } }
.lure-ring { transform-box: fill-box; transform-origin: center; animation: lureRing 1s ease-out infinite; }
@keyframes lureRing { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

/* рамка симуляции */
.board-wrap.sim { border-color: rgba(93,173,226,.45); box-shadow: 0 0 0 1px rgba(93,173,226,.08) inset, 0 0 40px rgba(93,173,226,.08); }
.sim-head { display: flex; align-items: center; gap: 10px; margin: 0 4px 10px; }
.sim-head img { height: 28px; }
.sim-head img.flip { transform: scaleX(-1); }
.sim-head .mono { flex: 1; text-align: center; }
.sim-theme { display: flex; gap: 6px; }
.sim-theme .btn { padding: 5px 12px; font-size: 13px; }
svg.lab .piece image { image-rendering: auto; }
svg.lab g[data-w].appear { transform-box: fill-box; transform-origin: center; }
.sim-head .mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 1200px) { .sim-head img { display: none; } }

/* слои поля: неподвижный фон + динамика поверх */
#boardHolder.layered { position: relative; }
#boardHolder.layered .board-static svg { width: 100%; height: auto; max-height: calc(100vh - 330px); min-height: 300px; display: block; margin: 0 auto; }
#boardHolder.layered #board { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; min-height: 0; }
/* пыль от пробитой стены */
.dust circle { opacity: 0; transform-box: fill-box; transform-origin: center; animation: dust .9s ease-out forwards; }
@keyframes dust { 0% { opacity: .85; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.8); } }
/* плашка хода не меняет высоту */
.banner { min-height: 54px; }
.banner .who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card.actions { min-height: 168px; }

/* ---------- игровой экран v2: поле, под ним панель хода; справа порядок ходов и лента ---------- */
.main-col > * + * { margin-top: 14px; }
.board-wrap { padding: 14px; }

/* метка стороны — как фишка на поле */
.tok { display: inline-block; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; vertical-align: -3px; margin-right: 6px;
  background: radial-gradient(circle, #0D1B2A 0 34%, var(--c) 37%); box-shadow: 0 0 0 2px #0D1B2A; }
.tok.mino { background: #C8462E url(/assets/labirint/minotaur.webp) center 18% / 150% no-repeat; box-shadow: 0 0 0 2px #0D1B2A; }
h1 .tok { width: 26px; height: 26px; vertical-align: -2px; margin-left: 6px; }
.h1-note { font-size: 15px; font-weight: 600; color: var(--ab-text-2); vertical-align: middle; }

/* панель хода под полем */
.turnbar { border-radius: 18px; padding: 14px 18px; background: var(--ab-surface); border: 1.5px solid var(--ab-line); }
.turnbar.player { min-height: 64px; }
.turnbar.mine { border-color: var(--ab-orange); background: linear-gradient(90deg, rgba(230,126,34,.16), rgba(230,126,34,.05)); }
.tb-who { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 18px; min-height: 32px; }
.tb-who .who { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-who .tok { width: 22px; height: 22px; }
.tb-tools { margin-top: 12px; }
.tb-tools .tools { display: flex; flex-wrap: wrap; gap: 10px; }
.tb-tools .tools .btn { padding: 11px 22px; font-size: 15px; min-width: 130px; }
.turnbar .hint { margin-top: 10px; }
.tools.take .btn { gap: 10px; }

/* порядок ходов */
.roster { margin-top: 8px; }
.rr { display: flex; align-items: center; gap: 8px; padding: 10px 10px; border-radius: 14px; border: 1.5px solid transparent; }
.rr + .rr { margin-top: 4px; }
.rr.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }
.rr.out { opacity: .45; }
.rr .tok { width: 22px; height: 22px; }
.rr-main { flex: 1; min-width: 0; }
.rr-name { font-weight: 800; display: flex; align-items: center; gap: 8px; min-width: 0; }
.rr-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rr-name .you { font-style: normal; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ab-night); background: var(--ab-orange); border-radius: 999px; padding: 1px 8px; }
.rr-name .won { font-size: 12px; color: #F1C40F; font-weight: 800; }
.rr-sub { font-size: 13px; color: var(--ab-text-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.rr-team { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rr-mate { font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--ab-line); color: var(--ab-text-2); }
.rr-mate.cur { background: var(--c); border-color: var(--c); color: #0D1B2A; }
.rr-mate.next { border-color: var(--c); color: var(--ab-text); }
.rr-sub .res { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--ab-text); }
.rr-right { text-align: right; line-height: 1.1; white-space: nowrap; }
.rr-right b { display: block; font-size: 20px; font-weight: 800; }
.rr-right small { font-size: 12px; color: var(--ab-text-2); }
.rr-out { color: #E8826E; font-weight: 800; font-size: 13px; }
.rr.mino { margin-top: 8px; border-top: 1px dashed var(--ab-line); border-radius: 0; padding-top: 12px; }
.rr.mino .rr-name { color: #E8826E; }
.rr-note { margin-top: 10px; font-size: 13.5px; color: var(--ab-text-2); border-top: 1px dashed var(--ab-line); padding-top: 10px; }

/* лента «Ход игры» */
.feed { height: 300px; overflow: auto; font-size: 14px; margin-top: 6px; }
.feed > div { padding: 6px 2px; border-bottom: 1px solid rgba(34,52,78,.6); }
.feed .tok { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; }
.feed .thought { font-style: italic; color: var(--ab-text-2); margin: 3px 0 0 19px; font-size: 13px; }
.feed .fd-mino { color: #E8A090; }
.feed .fd-bad { color: #E8826E; font-weight: 700; }
.feed .fd-good, .feed .fd-over { color: #88D2A8; font-weight: 700; }
.feed .fd-flag { color: var(--ab-orange); font-weight: 700; display: flex; gap: 6px; align-items: center; }
.feed .fd-sys { color: var(--ab-text-2); font-size: 13px; }
.feed .fd-div { border-bottom: 0; text-align: center; font-size: 12px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ab-sky); padding: 10px 0 6px; }
.feed .fd-div .tok { margin-left: 4px; }

/* меню «Вид» над полем */
.view-menu { position: relative; }
.view-menu summary { list-style: none; padding: 5px 14px; font-size: 13px; }
.view-menu summary::-webkit-details-marker { display: none; }
.view-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; background: var(--ab-raised); border: 1px solid var(--ab-line); border-radius: 14px; padding: 12px; display: grid; gap: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.4); white-space: nowrap; }
.view-menu .menu .btn { padding: 5px 12px; font-size: 13px; }

@media (max-width: 980px) { .feed { height: 240px; } .tb-tools .tools .btn { min-width: 0; flex: 1; padding: 11px 12px; } }
/* колонки не распирает длинный заголовок симуляции */
.play > * { min-width: 0; }
@media (max-width: 980px) { .play { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .top { padding: 14px 16px; gap: 10px; } main { padding: 8px 12px 40px; } .sim-head .mono { font-size: 10.5px; } .board-wrap { padding: 10px; } }
.mod-ctl { padding: 16px 18px; }
.mod-ctl .btn { padding: 8px 16px; font-size: 14px; }
.tb-tools.off { opacity: .4; pointer-events: none; filter: grayscale(.6); }
.turnbar .hint { min-height: 20px; }
.rr { min-height: 66px; }

/* режим «до конца»: вышедший из лабиринта */
.rr.done .rr-right b { color: #88D2A8; }
.rr.done .rr-sub { color: #88D2A8; }
.escaping { animation: escaping 1.1s ease-out .35s forwards; transform-box: fill-box; transform-origin: center; }
@keyframes escaping { 0% { opacity: 1; transform: scale(1); } 40% { opacity: 1; transform: scale(1.35); } 100% { opacity: 0; transform: scale(1.8); } }
label.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
label.check input { accent-color: var(--ab-orange); width: 16px; height: 16px; }

/* реальное время: «Колония» */
.rt-hud { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 18px; padding: 8px 18px 14px; flex-wrap: wrap; pointer-events: none; background: linear-gradient(rgba(5,13,22,.9) 55%, rgba(5,13,22,0)); }
.rt-time { display: flex; flex-direction: column; line-height: 1.05; min-width: 62px; }
.rt-time b { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.rt-label { font-size: 11px; color: var(--ab-text-2); text-transform: uppercase; letter-spacing: .06em; }
.rt-meter { flex: 1 1 170px; min-width: 150px; }
.rt-meter.rt-core { flex: 0 1 90px; min-width: 80px; }
.rt-mh { display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--ab-text-2); white-space: nowrap; }
.rt-mh b { color: #fff; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rt-goal { margin-left: auto; font-size: 12px; }
.rt-bar { position: relative; height: 10px; border-radius: 5px; background: var(--ab-deep); margin-top: 3px; border: 1px solid var(--ab-line); }
.rt-bar i { display: block; height: 100%; border-radius: 4px; width: 0; transition: width .2s linear; }
.rt-bar u { position: absolute; top: -3px; bottom: -3px; width: 3px; background: #fff; border-radius: 2px; margin-left: -1px; box-shadow: 0 0 0 1px var(--ab-night); }
.rt-ping { position: absolute; right: 14px; top: 62px; z-index: 2; font-family: var(--mono); font-size: 11px; color: var(--ab-text-2); white-space: nowrap; background: rgba(5,13,22,.75); padding: 1px 6px; border-radius: 6px; pointer-events: none; }
.rt-ping.bad { color: #E8826E; font-weight: 700; }
body.rt-mode .top { padding: 7px 16px; height: 44px; }
body.rt-mode .top .logo img { height: 20px; }
body.rt-mode main { max-width: none; padding: 0 8px 8px; }
.rt-stage { position: relative; height: calc(100dvh - 52px); min-height: 460px; padding: 0; overflow: hidden; border-radius: 14px; background: #050D16; }
.rt-canvas-box { position: absolute; inset: 0; }
.rt-canvas-box canvas { display: block; touch-action: none; user-select: none; }
.rt-stage #rtOver { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.rt-stage #rtOver > * { pointer-events: auto; }
.rt-side { position: absolute; bottom: 10px; width: 204px; z-index: 2; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.rt-side .btn, #rtStats { pointer-events: auto; }
.rt-left { left: 10px; }
.rt-right { right: 10px; }
.rt-right:has(#rtStats .card) { width: 360px; }
.rt-panel { background: rgba(7,17,29,.78); border: 1px solid var(--ab-line); border-radius: 12px; padding: 9px 12px; }
.rt-panel h3 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ab-text-2); margin-bottom: 4px; }
.rt-side .row { flex-wrap: wrap; gap: 6px; }
.rt-side .btn.small { padding: 5px 10px; font-size: 12.5px; background-color: rgba(7,17,29,.85); }
.rt-bottom { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2; width: max-content; max-width: calc(100% - 490px); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.rt-bottom .mod-ctl { pointer-events: auto; padding: 8px 12px; }
.rt-bottom .mod-ctl .btn { padding: 6px 12px; font-size: 13px; }
.rt-rules { position: fixed; inset: 6vh 12vw; overflow: auto; z-index: 60; background: rgba(9,20,33,.97); }
.rt-legend { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; font-size: 12.5px; color: var(--ab-text-2); background: rgba(7,17,29,.72); border-radius: 10px; padding: 5px 12px; }
.rt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rt-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.rt-tip { color: var(--ab-text); font-weight: 600; }
.rt-row { display: flex; align-items: center; gap: 8px; padding: 4px 1px; border-bottom: 1px solid var(--ab-line); min-width: 0; }
.rt-row:last-child { border-bottom: 0; }
.rt-row b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rt-row .you { font-style: normal; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--ab-night); background: var(--ab-orange); border-radius: 999px; padding: 1px 8px; }
.rt-num { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #06111C; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.rt-st { margin-left: auto; font-size: 13px; color: var(--ab-text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rt-st.off { color: #E8826E; font-weight: 700; }
.rt-feed .feed { height: 112px; font-size: 12.5px; }
.feed .fd-rt-bad { color: #F0A0D0; }
.feed .fd-rt-good { color: #88D2A8; font-weight: 700; }

/* «Парк аттракционов»: панели поверх поля */
.rt-stage[data-game="park"] { background: #4E8F3C; }
.rt-stage[data-game="park"] .rt-side.rt-left { left: auto; right: 10px; bottom: 10px; width: 232px; }
.rt-stage[data-game="park"] .rt-side.rt-right { top: 226px; bottom: 150px; right: 10px; width: 232px; display: flex; flex-direction: column; justify-content: flex-start; }
.rt-stage[data-game="park"] .rt-feed { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rt-stage[data-game="park"] .rt-feed > div { flex: 1; min-height: 0; }
.rt-stage[data-game="park"] .rt-feed .feed { height: 100%; font-size: 12px; }
.rt-stage[data-game="park"] .rt-feed .feed > div { padding: 3px 2px; }
.rt-stage[data-game="park"] .rt-bottom { left: 10px; transform: none; width: auto; max-width: 620px; align-items: flex-start; }
.rt-stage[data-game="park"] #rtHud { z-index: 3; }
.rt-stage[data-game="park"] .rt-panel { background: rgba(7,17,29,.84); padding: 7px 10px; }
.rt-stage[data-game="park"] .rt-ping { display: none; }
.pk-hud { gap: 12px !important; padding: 6px 12px 16px !important; flex-wrap: nowrap !important; background: linear-gradient(rgba(7,17,29,.94) 66%, rgba(7,17,29,0)) !important; }
.pk-hud .rt-label { font-size: 10px; }
.pk-ic { display: inline-block; vertical-align: middle; flex-shrink: 0; object-fit: contain; }
.pk-clock { display: flex; flex-direction: column; line-height: 1.05; min-width: 86px; }
.pk-clock b { font-size: 25px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.pk-dayfill { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); margin-top: 3px; overflow: hidden; }
.pk-dayfill u { display: block; height: 100%; background: #FFE27A; width: 0; }
.pk-stat { display: flex; align-items: center; gap: 6px; line-height: 1.1; white-space: nowrap; }
.pk-stat div { display: flex; flex-direction: column; }
.pk-stat b { font-size: 20px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.pk-stat em { font-style: normal; font-size: 11px; color: var(--ab-text-2); font-variant-numeric: tabular-nums; }
.pk-meter { flex: 1 1 120px; min-width: 110px; }
.pk-meter .rt-mh { font-size: 12px; align-items: center; }
.pk-meter .rt-bar i { transition: width .25s linear; }
.pk-speed { display: flex; gap: 3px; pointer-events: auto; margin-left: auto; }
.pk-sp { background: rgba(255,255,255,.08); border: 1px solid var(--ab-line); color: var(--ab-text); border-radius: 8px; padding: 6px 9px; font-weight: 800; font-size: 13px; cursor: pointer; min-width: 36px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.pk-sp:hover { background: rgba(93,173,226,.2); }
.pk-sp.on { background: var(--ab-orange); border-color: var(--ab-orange); color: #fff; }
.pk-sp:disabled { opacity: .4; cursor: not-allowed; }
.pk-hot { color: #FF9C8A !important; font-weight: 700; }
.pk-ok { color: #88D2A8 !important; }
.pk-ui { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.pk-dock { position: absolute; left: 10px; top: 66px; display: flex; flex-direction: column; gap: 5px; width: 152px; pointer-events: auto; }
.pk-act { display: flex; align-items: center; gap: 7px; text-align: left; background: rgba(7,17,29,.86); border: 1px solid var(--ab-line); border-radius: 12px; color: var(--ab-text); padding: 4px 8px 4px 5px; cursor: pointer; font-family: inherit; }
.pk-act:hover { background: rgba(27,47,70,.95); border-color: var(--ab-sky); }
.pk-act.on { background: var(--ab-orange); border-color: #FFC58A; color: #fff; }
.pk-act.on em { color: #FFE9D5; }
.pk-act span { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.pk-act b { font-size: 13.5px; font-weight: 800; }
.pk-act em { font-style: normal; font-size: 11px; color: var(--ab-text-2); }
.pk-fly { position: absolute; left: 170px; top: 66px; bottom: 10px; width: 360px; max-height: calc(100% - 76px); height: max-content; overflow: auto; background: rgba(9,20,33,.96); border: 1px solid var(--ab-line); border-radius: 14px; padding: 12px; pointer-events: auto; }
.pk-fly h3 { margin-bottom: 6px; }
.pk-note { font-size: 12.5px; color: var(--ab-text-2); line-height: 1.35; }
.pk-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.pk-tabs button { flex: 1; background: rgba(255,255,255,.06); color: var(--ab-text-2); border: 1px solid var(--ab-line); border-radius: 8px; padding: 4px 2px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.pk-tabs button.on { background: var(--ab-sky); color: var(--ab-night); }
.pk-list { display: flex; flex-direction: column; gap: 5px; }
.pk-item { display: flex; gap: 8px; align-items: center; text-align: left; background: rgba(255,255,255,.05); border: 1px solid var(--ab-line); border-radius: 10px; padding: 5px 7px 5px 3px; color: var(--ab-text); cursor: pointer; font-family: inherit; width: 100%; }
.pk-item:hover { background: rgba(93,173,226,.16); border-color: var(--ab-sky); }
.pk-item.off { opacity: .5; cursor: not-allowed; }
.pk-thumb { width: 62px; height: 62px; object-fit: contain; flex-shrink: 0; }
.pk-item-b { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pk-item-t { display: flex; justify-content: space-between; gap: 6px; font-size: 13.5px; line-height: 1.15; }
.pk-price { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; color: #FFE27A; white-space: nowrap; }
.pk-item-s { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 11px; color: var(--ab-text-2); }
.pk-item-a { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; margin: 2px 0; }
.pk-item-n { font-size: 11px; color: var(--ab-text-2); }
.pk-age { font-size: 10.5px; font-weight: 800; border-radius: 6px; padding: 0 5px; line-height: 16px; white-space: nowrap; }
.pk-age.lv0 { color: rgba(169,189,208,.45); box-shadow: inset 0 0 0 1px rgba(169,189,208,.2); }
.pk-age.lv1 { color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.pk-age.lv2 { background: var(--c); color: #07111D; }
.pk-theme { font-size: 10.5px; color: var(--ab-text-2); margin-left: auto; font-style: italic; }
.pk-adrow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--ab-line); }
.pk-adinfo { flex: 1; font-size: 12px; color: var(--ab-text-2); }
.pk-adrow .btn, .pk-loanrow + .row .btn, .pk-fly .row .btn { padding: 5px 10px; font-size: 12.5px; }
.pk-loanrow { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; margin: 8px 0; }
.pk-loanrow b { color: #fff; }
.pk-live { position: absolute; right: 10px; top: 64px; width: 232px; background: rgba(7,17,29,.84); border: 1px solid var(--ab-line); border-radius: 12px; padding: 7px 10px; pointer-events: auto; font-size: 12px; }
.pk-live h3 { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ab-text-2); margin-bottom: 3px; }
.pk-lg { display: grid; grid-template-columns: 76px 30px 1fr; gap: 0 4px; align-items: center; margin-bottom: 2px; position: relative; font-variant-numeric: tabular-nums; }
.pk-lg b { color: #fff; text-align: right; }
.pk-of { color: var(--ab-text-2); font-size: 11px; }
.pk-bar { grid-column: 1 / -1; display: block; height: 3px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.pk-bar u { display: block; height: 100%; }
.pk-adtag { position: absolute; right: 0; top: 1px; font-size: 9.5px; font-weight: 800; background: #FF8A3D; color: #07111D; border-radius: 4px; padding: 0 3px; }
.pk-lost-line { display: flex; gap: 6px; align-items: baseline; margin-top: 4px; }
.pk-lost-line b { font-size: 19px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.pk-lost-line.hot b { color: #FF7A66; }
.pk-lost-line span { font-size: 11.5px; }
.pk-lost-sub { font-size: 11px; color: var(--ab-text-2); }
.pk-lost-sub b { color: var(--ab-text); }
.pk-eff { font-size: 11px; color: #FFE27A; margin: 1px 0; }
.pk-pop { position: absolute; width: 272px; background: rgba(9,20,33,.97); border: 1px solid var(--ab-sky); border-radius: 14px; padding: 10px 12px; pointer-events: auto; }
.pk-x { position: absolute; right: 7px; top: 4px; background: none; border: 0; color: var(--ab-text-2); font-size: 20px; cursor: pointer; line-height: 1; }
.pk-mini { width: 100%; font-size: 12.5px; border-collapse: collapse; margin: 5px 0; }
.pk-mini td { padding: 1.5px 0; color: var(--ab-text-2); }
.pk-mini td + td { text-align: right; color: var(--ab-text); }
.pk-mini b { color: #fff; font-variant-numeric: tabular-nums; }
.pk-cond { display: inline-block; width: 74px; height: 6px; background: rgba(255,255,255,.14); border-radius: 3px; vertical-align: middle; overflow: hidden; }
.pk-cond i { display: block; height: 100%; }
.pk-btns { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 4px; }
.pk-btns .btn { padding: 5px 9px; font-size: 12.5px; }
.pk-card { position: absolute; left: 50%; top: 66px; transform: translateX(-54%); width: min(600px, calc(100% - 430px)); background: rgba(250,246,234,.98); color: #24180C; border: 3px solid #E67E22; border-radius: 16px; padding: 10px 14px 9px; pointer-events: auto; box-shadow: 0 12px 32px rgba(0,0,0,.42); }
.pk-card.big { border-color: #B8307E; }
.pk-card .rt-label { color: #A1550E; font-weight: 800; }
.pk-card.big .rt-label { color: #B8307E; }
.pk-card h3 { font-size: 19px; font-weight: 800; margin: 0; }
.pk-card p { font-size: 14px; line-height: 1.32; margin-bottom: 6px; }
.pk-opts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.pk-opt { display: flex; flex-direction: column; gap: 1px; text-align: left; background: #fff; border: 2px solid #D9C9A8; border-radius: 11px; padding: 6px 8px; cursor: pointer; font-family: inherit; color: inherit; }
.pk-opt:hover:not(:disabled) { border-color: #E67E22; background: #FFF4E2; }
.pk-opt:disabled { opacity: .5; cursor: not-allowed; }
.pk-opt b { font-size: 13px; line-height: 1.18; }
.pk-opt em { font-style: normal; font-size: 11.5px; color: #6F5C44; line-height: 1.22; }
.pk-opt-m { font-weight: 800; font-size: 13px; color: #2E8B57; }
.pk-opt-m.minus { color: #C8462E; }
.pk-opt-m.plus { color: #127A43; }
.pk-card-t { height: 5px; background: #E8DDC4; border-radius: 3px; overflow: hidden; margin-top: 7px; }
.pk-card-t i { display: block; height: 100%; background: #E67E22; transition: width .2s linear; }
.pk-card .pk-note { color: #6F5C44; font-size: 11.5px; margin: 3px 0 0; }
.pk-modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(5,13,22,.55); pointer-events: auto; z-index: 4; padding: 12px; }
.pk-modal-b { width: min(1050px, 100%); max-height: 100%; overflow: auto; background: rgba(9,20,33,.98); border: 1px solid var(--ab-sky); border-radius: 18px; padding: 14px 18px; }
.pk-sum-h { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-bottom: 8px; }
.pk-sum-h h2 { margin: 0; font-size: 23px; }
.pk-sum-k { display: flex; gap: 18px; }
.pk-sum-k div { display: flex; flex-direction: column; line-height: 1.15; }
.pk-sum-k b { font-size: 21px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.pk-sum-k em { font-style: normal; font-size: 12px; }
.pk-sum-g { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
.pk-table { width: 100%; font-size: 12.5px; margin-bottom: 8px; }
table.mt.pk-table th { font-size: 11px; padding: 3px 6px; }
table.mt.pk-table td { padding: 3px 6px; white-space: normal; }
.pk-table td b { color: #fff; }
.pk-why td { padding: 3px 5px; vertical-align: top; }
.pk-why td:nth-child(1) { min-width: 118px; }
.pk-why td:nth-child(2) { white-space: nowrap; }
.pk-why td:nth-child(3) { color: var(--ab-text-2); font-size: 12px; }
.pk-tips { font-size: 13px; color: #FFE27A; padding-left: 18px; line-height: 1.32; }
.pk-lost { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.pk-lost div { display: flex; gap: 6px; align-items: baseline; }
.pk-lost b { font-size: 20px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.pk-lost span { font-size: 11.5px; line-height: 1.2; color: var(--ab-text-2); }
.pk-cost { font-size: 12px; color: var(--ab-text-2); margin-top: 7px; }
.pk-tag { font-size: 10px; font-weight: 800; background: var(--ab-sky); color: var(--ab-night); padding: 0 4px; border-radius: 4px; }
.pk-tag.bad { background: #D94A3A; color: #fff; }
.pk-sum-f { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 10px; border-top: 1px solid var(--ab-line); padding-top: 10px; }
.pk-toast { position: absolute; left: calc(50% - 45px); bottom: 56px; transform: translateX(-50%); background: rgba(7,17,29,.94); color: #fff; border: 1px solid var(--ab-sky); padding: 6px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 700; max-width: 560px; text-align: center; }
.pk-toast.bad { border-color: #E8826E; }
.pk-fast { position: absolute; left: calc(50% - 45px); bottom: 12px; transform: translateX(-50%); font-weight: 800; font-size: 15px; color: #fff; background: rgba(230,126,34,.92); padding: 3px 14px; border-radius: 999px; letter-spacing: .06em; animation: pkPulse 0.8s infinite alternate; }
.pk-fast.sp0 { background: rgba(7,17,29,.88); animation: none; }
.pk-fast.sp2 { animation-duration: .5s; }
.pk-fast.sp4 { animation-duration: .28s; background: rgba(217,74,58,.94); }
.pk-fast.spskip { animation-duration: .16s; background: rgba(184,48,126,.94); }
@keyframes pkPulse { from { opacity: .72; } to { opacity: 1; } }
#pkLegend { display: block; max-width: 340px; font-weight: 700; font-size: 12.5px; color: #fff; background: rgba(7,17,29,.86); text-align: left; line-height: 1.3; }
#pkLegend.pk-hint-on { background: var(--ab-orange); }
.over.pk-over { justify-content: flex-start; overflow: auto; padding: 8px 16px; gap: 6px; background: rgba(5,13,22,.78); }
.over.pk-over .stamp { font-size: 15px; padding: 2px 12px; }
.over.pk-over h2 { font-size: 20px; margin: 0; }
.over.pk-over .btn { flex-shrink: 0; }
.pk-final { width: min(760px, 100%); background: rgba(9,20,33,.97); border: 1px solid var(--ab-line); border-radius: 16px; padding: 14px 18px; text-align: left; }
.pk-final-top { display: flex; gap: 26px; justify-content: center; margin-bottom: 10px; }
.pk-final-top div { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.pk-final-top b { font-size: 28px; font-weight: 800; color: #fff; }
.pk-final-top em { font-style: normal; font-size: 12px; color: var(--ab-text-2); }
.pk-stars { color: #FFD23F !important; letter-spacing: 3px; }
.pk-final h3 { margin: 8px 0 3px; font-size: 14px; }
.pk-final ul { padding-left: 18px; font-size: 13px; line-height: 1.34; }
.pk-quick { max-width: 520px; margin-top: 8px; }

/* парк: дашборд */
.rt-stage[data-game="park"] .rt-left { z-index: 6; }
.pk-dash-btn { position: absolute; left: 10px; top: 62px; width: 152px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; pointer-events: auto; background: linear-gradient(135deg, #2F7FC1, #1E5C96); color: #fff; border: 1px solid #7CC7F5; border-radius: 12px; cursor: pointer; font-size: 14px; z-index: 2; }
.pk-dash-btn:hover { filter: brightness(1.12); }
.pk-dash-btn.on { background: var(--ab-orange); border-color: #FFC58A; }
.pk-dock { top: 108px !important; }
.pk-dash { position: absolute; left: 172px; right: 12px; top: 62px; bottom: 10px; overflow: auto; pointer-events: auto; background: rgb(8,18,30); border: 1px solid var(--ab-sky); border-radius: 16px; padding: 12px 16px; z-index: 7; }
.rt-stage[data-game="park"] .pk-card, .rt-stage[data-game="park"] .pk-modal, .rt-stage[data-game="park"] .pk-pop, .rt-stage[data-game="park"] .pk-toast { z-index: 8; }
.rt-stage[data-game="park"] .pk-ui:has(.pk-dash:not([hidden])) { z-index: 7; }
.rt-stage[data-game="park"] .pk-ui:has(#pkSum:not([hidden])), .rt-stage[data-game="park"] .pk-ui:has(#pkIntro:not([hidden])) { z-index: 7; }
.pk-dash-h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; position: relative; padding-right: 30px; }
.pk-dash-h h2 { font-size: 20px; margin: 0; }
.pk-dash-adv { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pk-dash-adv div { flex: 1 1 260px; font-size: 13px; line-height: 1.3; padding: 7px 10px; border-radius: 10px; border-left: 4px solid; background: rgba(255,255,255,.04); }
.pk-dash-adv .hot { border-color: #E8826E; } .pk-dash-adv .warn { border-color: #F2B705; } .pk-dash-adv .ok { border-color: #5DD08A; }
.pk-dash-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 10px; margin-bottom: 10px; }
.pk-moodline { line-height: 1.35; }
.pk-dash section { background: rgba(255,255,255,.035); border: 1px solid var(--ab-line); border-radius: 12px; padding: 9px 11px; min-width: 0; }
.pk-dash h3 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ab-text-2); margin-bottom: 6px; }
.pk-dl { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 2px 0; color: var(--ab-text-2); }
.pk-dl b { color: #fff; font-variant-numeric: tabular-nums; text-align: right; }
.pk-dl.sum { border-top: 1px solid var(--ab-line); margin-top: 3px; padding-top: 4px; color: var(--ab-text); font-weight: 700; }
.pk-dl.neg b { color: #FF9C8A; } .pk-dl.pos b { color: #7FE3A6; }
.pk-good { color: #7FE3A6; font-weight: 700; }
.pk-dash-chart { width: 100%; display: block; }
.pk-dash-gr { display: grid; grid-template-columns: 66px 26px 38px 56px 1fr 30px; align-items: center; gap: 5px; font-size: 12px; padding: 2px 0; }
.pk-dash-gr .hint { font-size: 11px; margin: 0; }
.pk-dash-note { font-size: 10.5px; color: var(--ab-text-2); margin: 1px 0 5px; }
.pk-dash-load { display: inline-block; vertical-align: middle; width: 100%; max-width: 70px; height: 7px; background: rgba(255,255,255,.1); border-radius: 4px; overflow: hidden; margin-right: 5px; }
.pk-dash-load i { display: block; height: 100%; }
.pk-dash-t tr[data-dash-b] { cursor: pointer; }
.pk-dash-t tr[data-dash-b]:hover td { background: rgba(93,173,226,.12); }
.pk-dash-t td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-dash-a .pk-age { margin-right: 2px; }
.pk-dash-tip.hot { color: #FF9C8A; font-weight: 700; } .pk-dash-tip.warn { color: #F2C14E; } .pk-dash-tip.ok { color: #7FE3A6; }

/* ---------- «Аварийная смена» ---------- */
#rtWrap.av-stage { height: calc(100dvh - 52px); min-height: 560px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.av-top { display: flex; align-items: center; gap: 18px; padding: 6px 14px; background: var(--ab-surface); border: 1px solid var(--ab-line); border-radius: 14px; min-height: 54px; }
.av-t-title { display: flex; flex-direction: column; line-height: 1.15; min-width: 190px; }
.av-t-title .mono { font-size: 10px; }
.av-t-title b { font-size: 18px; font-weight: 800; color: #fff; }
.av-t-dots > div { display: flex; gap: 5px; margin-top: 3px; }
.av-t-dots i { width: 22px; height: 12px; border-radius: 3px; background: var(--ab-deep); border: 1px solid var(--ab-line); display: block; }
.av-t-dots i.on { background: var(--ab-think); border-color: var(--ab-think-300); }
.av-t-time { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 120px; }
.av-t-time b { font-family: var(--mono); font-size: 26px; color: #fff; font-variant-numeric: tabular-nums; }
.av-bar { flex: 1; height: 12px; border-radius: 6px; background: var(--ab-deep); border: 1px solid var(--ab-line); overflow: hidden; }
.av-bar i { display: block; height: 100%; width: 100%; background: var(--ab-sky); transition: width .25s linear, background-color .6s; }
.av-bar i.low { background: var(--ab-orange); }
.av-t-btns { display: flex; align-items: center; gap: 8px; }
.av-ping { font-family: var(--mono); font-size: 11px; color: var(--ab-text-2); min-width: 46px; text-align: right; }
.av-ping.bad { color: #E8826E; font-weight: 700; }
.av-strip { padding: 7px 14px; font-size: 16px; line-height: 1.35; background: rgba(27,47,70,.7); border-radius: 10px; border: 1px solid var(--ab-line); }
.av-strip b { color: #fff; }
.av-strip .muted { font-size: 14px; }
.av-chip { display: inline-block; font-weight: 800; padding: 1px 10px; border-radius: 999px; margin-right: 6px; font-size: 15px; }
.av-chip.op { background: var(--ab-orange); color: #fff; }
.av-chip.rd { background: var(--ab-sky); color: var(--ab-night); }
.av-body { flex: 1; min-height: 0; }
.av-box { background: var(--ab-surface); border: 1px solid var(--ab-line); border-radius: 12px; padding: 10px 12px; }
.av-box h4, .av-panel h4 { font-size: 13px; font-weight: 800; color: #fff; margin-bottom: 4px; letter-spacing: .01em; }
.av-box.tips, .tips { border-color: var(--ab-sky); }
.av-minilist { padding-left: 18px; font-size: 14px; line-height: 1.35; }
.av-minilist li + li { margin-top: 4px; }

/* щит Оператора */
.av-opgrid { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 6px; height: 100%; }
.av-opside { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: auto; }
.av-shield { background: #1a2632 url('/assets/avaria/shield.webp') center / cover; border-radius: 14px; padding: 12px; min-height: 0; border: 1px solid #000; overflow: hidden; }
.av-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; height: 100%; grid-auto-rows: minmax(0, 1fr); }
.av-block { position: relative; border-style: solid; border-width: 0; border-image: url('/assets/avaria/housing.webp') 100 110 fill / 38px 44px stretch; display: flex; flex-direction: column; min-height: 0; padding: 34px 42px 30px; }
.av-blocks[data-n="1"] { grid-template-columns: minmax(0, 620px); justify-content: center; align-content: center; grid-auto-rows: minmax(0, 400px); }
.av-blocks[data-n="2"] { align-content: center; grid-auto-rows: minmax(0, 390px); }
.av-block.pending { cursor: progress; }
.av-block.pending .av-b-body { filter: brightness(.82); }
.av-b-top { position: absolute; top: 9px; left: 66px; right: 66px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.av-b-n { font-family: var(--mono); font-weight: 600; font-size: 13px; color: #0d1b2a; background: #d7dee4; border-radius: 5px; padding: 0 7px; box-shadow: inset 0 -1px 0 rgba(0,0,0,.35); }
.av-b-lamp { width: 16px; height: 16px; border-radius: 50%; background: #3b4b57; box-shadow: inset 0 1px 2px rgba(0,0,0,.7), 0 0 0 2px rgba(0,0,0,.4); display: block; }
.av-b-lamp.solved { background: #54e38a; box-shadow: 0 0 12px #54e38a, 0 0 0 2px rgba(0,0,0,.4); }
.av-b-lamp.reserve { background: #e9a23b; box-shadow: 0 0 8px #e9a23b, 0 0 0 2px rgba(0,0,0,.4); }
.av-b-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 0; }
.av-b-state { flex: 1; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; letter-spacing: .08em; text-transform: uppercase; }
.av-b-state.ok { color: #9ff0bd; text-shadow: 0 0 14px rgba(84,227,138,.55); }
.av-b-state.res { color: #f0c98a; }
.av-block[data-st="solved"], .av-block[data-st="reserve"] { filter: saturate(.55) brightness(.75); }
.av-skip { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); background: rgba(13,27,42,.82); border: 0; border-radius: 5px; color: #dfe7ee; font-size: 12px; padding: 1px 9px; cursor: pointer; white-space: nowrap; }
.av-skip:hover { background: #0d1b2a; color: #fff; }
.av-answer { position: absolute; left: 44px; right: 44px; bottom: 32px; font-size: 12px; color: #ffe08a; background: rgba(5,13,22,.85); padding: 3px 7px; border-radius: 6px; line-height: 1.25; }
.shake { animation: avshake .42s ease; }
@keyframes avshake { 0%,100% { transform: translate(0,0); } 25% { transform: translate(-5px,1px); } 50% { transform: translate(5px,-1px); } 75% { transform: translate(-3px,0); } }

.av-cap { --s: 76px; width: var(--s); height: var(--s); border: 0; border-radius: 50%; background: #39485a url('/assets/avaria/cap.webp') center / 100% 100% no-repeat; color: #ffcf6b; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: transform .08s; padding: 0; }
.av-cap:hover:not(:disabled) { transform: scale(1.06); }
.av-cap:active:not(:disabled) { transform: scale(.95); }
.av-cap:disabled { cursor: default; }
.av-cap .av-shape { filter: drop-shadow(0 0 5px rgba(255,190,70,.65)); }
.av-cap.lamp { --s: clamp(54px, 5.2vw, 80px); color: #8ea3b2; }
.av-cap.lamp .av-shape { filter: none; }
.av-cap.lamp.lit { color: #ffd166; }
.av-cap.lamp.lit .av-shape { filter: drop-shadow(0 0 8px rgba(255,190,70,.85)); }
.av-cap.small { --s: 50px; }
.av-lamps, .av-caps, .av-signs { display: flex; gap: 2%; justify-content: center; flex-wrap: nowrap; width: 100%; }
.av-glass { width: clamp(70px, 6.6vw, 100px); aspect-ratio: 1; background: linear-gradient(160deg, #0c1a26, #15283a); border: 3px solid #566878; border-radius: 12px; color: #bfe7ff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: inset 0 0 14px rgba(93,173,226,.25); padding: 4px; }
.av-glass:hover:not(:disabled) { border-color: #bfe7ff; }
.av-glass.done { color: #9ff0bd; border-color: #54e38a; box-shadow: inset 0 0 16px rgba(84,227,138,.35); }
.av-glass:disabled { cursor: default; }
.av-glass .av-sign { width: 100%; height: 100%; }
.av-lcd { font-family: var(--mono); background: #081219; color: #ffcf6b; border-radius: 8px; border: 2px solid #4a5a68; box-shadow: inset 0 0 12px rgba(0,0,0,.8); text-shadow: 0 0 8px rgba(255,190,70,.5); text-align: center; }
.av-lcd.word { font-size: 38px; padding: 4px 26px; min-width: 200px; text-transform: lowercase; letter-spacing: .03em; font-family: var(--font); font-weight: 700; }
.av-lcd.num { font-size: 30px; font-weight: 600; width: 58px; padding: 1px 0; }
.av-lcd.val { font-size: 24px; width: 54px; }
.av-lcd.small { font-family: var(--font); font-size: 13px; padding: 4px 8px; color: #ffb48a; }
.av-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 5px; }
.av-grid.op { width: min(100%, 420px); }
.av-cell { display: flex; align-items: center; justify-content: center; gap: 6px; background: #0d1a26; color: #dfeaf2; border: 2px solid #4a5a68; border-radius: 8px; padding: 3px 4px; min-height: 36px; font: inherit; }
.av-grid.op .av-cell { min-height: 40px; }
button.av-cell { cursor: pointer; }
button.av-cell:hover:not(:disabled) { border-color: #bfe7ff; }
.av-cell b { font-family: var(--mono); font-size: 21px; color: #ffcf6b; font-weight: 600; }
.av-ringwrap { position: relative; height: 100%; aspect-ratio: 1; max-height: min(100%, 300px); min-height: 0; flex: 1 1 auto; display: flex; }
.av-ring { width: 100%; height: 100%; background: url('/assets/avaria/ringbase.webp') center / 113% 113% no-repeat; border-radius: 50%; }
.av-sec > path { fill: #16283a; stroke: #6c8092; stroke-width: 2; transition: fill .06s; }
.av-sec[data-av] { cursor: pointer; }
.av-sec[data-av]:hover > path { fill: #24405a; stroke: #bfe7ff; }
.av-sec-ic { color: #dfeaf2; }
.av-sec.flash > path { fill: #ffd166; stroke: #fff; }
.av-sec.flash .av-sec-ic { color: #2a1a00; }
.av-show { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 34%; aspect-ratio: 1; border-radius: 50%; border: 2px solid #8ea3b2; background: #23384c; color: #fff; font-weight: 800; font-size: clamp(11px, 1vw, 14px); cursor: pointer; padding: 0; }
.av-show:hover { background: #2f4c68; }
.av-steps { display: flex; gap: 6px; justify-content: center; }
.av-steps i { width: 14px; height: 14px; border-radius: 50%; background: #0d1a26; border: 2px solid #5b6d7c; display: block; }
.av-steps i.on { background: #54e38a; border-color: #9ff0bd; }
.av-crossrow { display: flex; align-items: center; gap: 22px; }
.av-window { width: 96px; height: 96px; border-radius: 12px; background: linear-gradient(160deg, #0c1a26, #15283a); border: 3px solid #566878; color: #bfe7ff; display: flex; align-items: center; justify-content: center; text-align: center; }
.av-window span { font-size: 13px; color: #a9bdd0; line-height: 1.2; }
.av-regrow { display: flex; align-items: center; justify-content: center; gap: 26px; width: 100%; }
.av-regnums { display: flex; flex-direction: column; gap: 6px; }
.av-knobwrap { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.av-knob { width: 92px; height: 92px; background: url('/assets/avaria/knob.webp') center / 100% 100% no-repeat, #39485a; border-radius: 50%; transform: rotate(var(--deg, 0deg)); transition: transform .12s; }
.av-regset { display: flex; align-items: center; gap: 6px; }
.av-mini { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid #6c8092; background: #1b2f46; color: #fff; font-weight: 800; cursor: pointer; font-size: 16px; padding: 0; }
.av-mini:hover { border-color: #bfe7ff; }
.av-range { width: 170px; accent-color: #e67e22; cursor: pointer; }
.av-do { padding: 6px 16px; border-radius: 10px; border: 0; background: var(--ab-orange); color: #fff; font-weight: 800; cursor: pointer; font-size: 15px; }
.av-do:hover:not(:disabled) { background: #d4711b; }
.av-do:disabled { opacity: .5; cursor: default; }
.av-planrow { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; flex: 1; min-height: 0; }
.av-planlabels { display: flex; flex-direction: column; gap: 10px; color: #ffcf6b; }
.av-plan-op { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 3px; height: 100%; max-height: 240px; aspect-ratio: 1; }
.av-pc { min-height: 0; background: #0d1a26; border: 2px solid #4a5a68; border-radius: 6px; color: #fff; font-size: 22px; font-weight: 800; cursor: pointer; padding: 0; line-height: 1; }
.av-pc:hover:not(:disabled) { border-color: #bfe7ff; }
.av-pc.x { color: #ffb48a; }
.av-pc.o { color: #9fe3ff; }
.av-plancol { display: flex; flex-direction: column; gap: 8px; align-items: center; max-width: 110px; }
.av-tagplate { background: #39485a url('/assets/avaria/plate.webp') center / 100% 100% no-repeat; border-radius: 10px; padding: 12px 18px 10px; text-align: center; color: #10202e; min-height: 66px; }
.av-tagplate .rt-label { color: #182a39; font-weight: 800; display: block; }
.av-tagplate b { font-family: var(--mono); font-size: 25px; font-weight: 600; color: #081219; letter-spacing: .04em; }
.av-stripbtns { display: flex; justify-content: space-between; margin: 6px 0; }

/* читатель */
.av-reader { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 6px; height: 100%; }
.av-reader.has-panel { grid-template-columns: 210px minmax(0, 1fr) 248px; }
.av-panel { background: #0f2030; border: 1px solid var(--ab-sky); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
.av-panel.bump .av-gauge:first-of-type { animation: avbump 1.2s ease; }
@keyframes avbump { 0%,60% { border-color: var(--ab-orange); background: rgba(230,126,34,.25); } 100% { border-color: var(--ab-line); background: #081219; } }
.av-gauge { background: #081219; border: 1.5px solid var(--ab-line); border-radius: 10px; padding: 6px 10px; }
.av-gauge .rt-label { display: block; }
.av-gauge b { font-family: var(--mono); font-size: 44px; color: #ffcf6b; line-height: 1.05; font-weight: 600; }
.av-gauge b.word { font-family: var(--font); font-size: 24px; font-weight: 800; }
.av-watch { border: 1.5px dashed var(--ab-line); border-radius: 10px; padding: 7px 9px; }
.av-watch.on { border: 2px solid var(--ab-orange); background: rgba(230,126,34,.14); }
.av-watch-code { display: flex; gap: 6px; color: #fff; margin: 5px 0; }
.av-watch-code .done { color: #54e38a; }
.av-book { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.av-tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.av-tab { padding: 5px 13px; border-radius: 9px; border: 1.5px solid var(--ab-line); background: var(--ab-surface); color: var(--ab-text); font-weight: 700; font-size: 15px; cursor: pointer; }
.av-tab:hover { border-color: var(--ab-sky); }
.av-tab.on { background: #F5F1E6; color: #1b2430; border-color: #F5F1E6; }
.av-size { margin-left: auto; display: inline-flex; gap: 4px; }
.av-size .av-mini { width: 38px; font-size: 13px; }
.av-page { flex: 1; min-height: 0; overflow: auto; border-radius: 12px; --av-size: 20px; }
.av-paper { background: #F5F1E6; color: #1b2430; padding: 14px 22px 22px; min-height: 100%; font-size: var(--av-size); line-height: 1.5; border-radius: 12px; text-align: left; }
.av-edition { font-size: 13px; color: #5c6670; margin-bottom: 8px; }
.av-part + .av-part { margin-top: 16px; padding-top: 12px; border-top: 2px solid #d8d1bd; }
.av-chap { display: inline-block; font-size: 13px; font-weight: 800; background: #1b2f46; color: #fff; padding: 1px 10px; border-radius: 6px; margin-bottom: 8px; }
.av-paper p { margin-bottom: .55em; max-width: 62ch; }
.av-paper .av-strong { font-weight: 800; }
.av-lines { padding-left: 0; list-style: none; counter-reset: ln; margin: 6px 0 10px; max-width: 66ch; }
.av-lines li { counter-increment: ln; position: relative; padding: 6px 8px 6px 44px; border-bottom: 1.5px solid #e2dcca; }
.av-lines li::before { content: counter(ln); position: absolute; left: 6px; top: 6px; width: 28px; height: 28px; border-radius: 7px; background: #1b2f46; color: #fff; font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.av-tb { border-collapse: collapse; margin: 6px 0 10px; }
.av-tb th { text-align: left; font-size: .8em; color: #4c5660; padding: 4px 12px; border-bottom: 2px solid #1b2f46; }
.av-tb td { padding: 6px 12px; border-bottom: 1.5px solid #e2dcca; }
.av-tb.rh td:first-child { font-weight: 800; font-size: 1.15em; }
.av-shape.inl { vertical-align: -4px; color: #1b2f46; margin-right: 2px; }
.av-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 6px 0 10px; max-width: 800px; }
.av-album.six { grid-template-columns: repeat(3, minmax(0, 120px)); }
.av-al { display: flex; align-items: center; gap: 8px; background: #fffdf6; border: 1.5px solid #d8d1bd; border-radius: 10px; padding: 4px 10px; color: #1b2430; }
.av-al b { font-size: 1.35em; font-weight: 800; }
.av-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 8px 0; max-width: 1020px; }
.av-plan-mini { background: #fffdf6; border: 1.5px solid #d8d1bd; border-radius: 10px; padding: 6px; color: #1b2430; }
.av-plan-lab { display: flex; align-items: center; gap: 4px; font-weight: 800; margin-bottom: 4px; justify-content: center; }
.av-plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.av-plan-grid i { aspect-ratio: 1; background: #ebe5d3; border-radius: 3px; font-style: normal; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .9em; }
.av-plan-grid i.x { color: #b4380f; }
.av-plan-grid i.o { color: #125e8a; }
.av-live { margin: 6px 0; padding: 10px; border-radius: 12px; background: #1b2f46; max-width: 520px; color: #fff; }
.av-live-empty { color: #a9bdd0; font-size: .85em; margin: 0; }
.av-bigsign { color: #bfe7ff; display: flex; justify-content: center; }
.av-side { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: auto; }
.av-mate { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 14px; flex-wrap: wrap; }
.av-mate em { font-style: normal; color: var(--ab-text-2); font-size: 13px; margin-left: auto; }
.av-mate.big { font-size: 17px; padding: 7px 0; border-bottom: 1px solid var(--ab-line); }
.av-mate.big em { color: var(--ab-orange); font-weight: 700; }
.av-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ab-stamp); display: block; }
.av-dot.on { background: #54e38a; }
.av-ok { color: #54e38a; font-weight: 800; font-size: 13px; }
.av-notes { width: 100%; height: 90px; background: var(--ab-deep); color: var(--ab-text); border: 1px solid var(--ab-line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 14px; resize: vertical; }
.av-dict { list-style: none; font-size: 14px; }
.av-dict li { display: flex; gap: 6px; padding: 3px 0; border-bottom: 1px solid var(--ab-line); align-items: flex-start; }
.av-dict li span { flex: 1; }
.av-x { background: none; border: 0; color: var(--ab-text-2); cursor: pointer; font-size: 16px; line-height: 1; }

/* сообщения */
.av-msg { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); background: #16304a; color: #fff; border: 2px solid var(--ab-sky); padding: 9px 20px; border-radius: 12px; font-weight: 700; z-index: 8; font-size: 17px; max-width: 80%; text-align: center; pointer-events: none; }
.av-msg.bad { border-color: #e9a23b; }
.av-banner { position: absolute; left: 50%; top: 66px; transform: translateX(-50%); background: #0f2a41; border: 2px solid var(--ab-sky); padding: 7px 20px; border-radius: 12px; z-index: 7; color: #fff; font-weight: 700; }
.av-veil { position: absolute; inset: 0; background: rgba(5,13,22,.82); z-index: 9; display: flex; align-items: center; justify-content: center; border-radius: 14px; }
.av-veil-box { background: var(--ab-surface); border: 1px solid var(--ab-sky); padding: 26px 34px; border-radius: 16px; text-align: center; max-width: 480px; display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* вход, передача, итоги */
.av-intro { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 14px; height: 100%; }
.av-intro-l, .av-intro-r { background: var(--ab-surface); border: 1px solid var(--ab-line); border-radius: 14px; padding: 16px 22px; overflow: auto; }
.av-intro-l p { font-size: 18px; margin-bottom: 9px; max-width: 62ch; }
.av-hero { display: block; width: 100%; max-height: 34vh; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.av-pact { border-left: 4px solid var(--ab-orange); padding: 7px 14px; background: rgba(230,126,34,.1); font-size: 17px; border-radius: 0 8px 8px 0; }
.av-hand { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; height: 100%; }
.av-hand.with-pages { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.av-hand-l, .av-hand-r { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
.av-hand-r .av-book { flex: 1; min-height: 240px; }
.av-sumrows { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.av-sumrow { display: grid; grid-template-columns: 158px 96px minmax(0, 1fr); gap: 8px; font-size: 14px; padding: 4px 8px; border-radius: 7px; background: var(--ab-deep); align-items: baseline; }
.av-sumrow em { font-style: normal; color: var(--ab-text-2); font-size: 13px; }
.av-sumrow.solved span { color: #54e38a; }
.av-sumrow.reserve span { color: #e9a23b; }
.av-nextnote { margin-top: 8px; color: #ffe08a; font-weight: 700; font-size: 14px; }
h4.q { font-size: 18px !important; line-height: 1.3; }
.av-dictadd { display: flex; gap: 8px; margin: 8px 0; align-items: center; }
.av-dictadd .field { flex: 1; padding: 8px 12px; font-size: 15px; }
.av-rolesnow { margin-bottom: 6px; }
.av-wait { padding: 20px; }
.av-wait.center { text-align: center; margin-top: 12vh; }
.av-deb { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 10px; height: 100%; }
.av-deb-l, .av-deb-r { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
.av-final { display: flex; align-items: center; gap: 28px; background: var(--ab-surface); border: 1px solid var(--ab-line); padding: 14px 24px; border-radius: 14px; }
.stamp.ok { border-color: var(--ab-think); color: #17713f; }
.av-big { font-size: 28px; font-weight: 800; color: #fff; display: block; line-height: 1.15; margin-bottom: 4px; }
.av-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.av-res { background: var(--ab-surface); border: 1px solid var(--ab-line); padding: 10px 12px; border-radius: 12px; }
.av-res h4 { font-size: 14px; color: #fff; margin-bottom: 5px; }
.av-res .av-sumrow { grid-template-columns: 110px minmax(0, 1fr); }
.av-qbox h3 { font-size: 24px; margin: 4px 0 8px; }
.av-qs { padding-left: 20px; font-size: 19px; line-height: 1.4; margin-bottom: 10px; }
.av-qs li + li { margin-top: 6px; }
.av-qbox .btn { margin-top: 10px; }
/* модератор */
.av-modgrid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 6px; height: 100%; }
.av-modl { min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.av-opgrid.inmod { grid-template-columns: minmax(0, 1fr) 156px; flex: 1; min-height: 0; height: auto; }
.av-modl .av-blocks { zoom: .62; height: auto; align-content: start; grid-auto-rows: 390px; }
.av-modl .av-blocks[data-n] { grid-auto-rows: 390px; align-content: start; }
.av-modl .av-stripbtns { flex-wrap: wrap; gap: 4px; }
.av-answers { font-size: 13.5px; line-height: 1.3; max-height: 30%; overflow: auto; color: #ffe08a; }
.av-answers div + div { margin-top: 3px; }
.av-modr { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 6px; min-height: 0; }
.av-panel.small .av-gauge b { font-size: 28px; }
.av-panel.small .av-gauge b.word { font-size: 15px; }
@media (max-width: 1180px) {
  .av-reader.has-panel { grid-template-columns: 170px minmax(0, 1fr) 190px; }
  .av-reader { grid-template-columns: minmax(0, 1fr) 190px; }
  .av-opgrid { grid-template-columns: minmax(0, 1fr) 200px; }
}

.av-opside .av-box { padding: 7px 10px; }
.av-opside .hint { font-size: 12.5px; line-height: 1.25; }
.av-opside .av-tb { font-size: 14px; margin: 3px 0 0; width: 100%; }
.av-opside .av-tb th { color: #a9bdd0; padding: 1px 5px; border-bottom-color: var(--ab-line); }
.av-opside .av-tb td { padding: 2px 5px; border-bottom-color: var(--ab-line); }
.av-opside .av-album.six { grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 4px 0 0; }
.av-opside .av-al { flex-direction: column; gap: 0; padding: 1px 2px; }
.av-opside .av-al svg { width: 42px; height: 42px; }
.av-opside .av-al b { font-size: 16px; line-height: 1.1; }
.av-opside .av-stripbtns { margin: 3px 0; }
.av-modeline { font-size: 13px; color: #182a39; font-weight: 800; margin-top: 2px; }
.av-modeline b { font-family: var(--font); font-size: 15px; font-weight: 800; letter-spacing: 0; }
.pk-item-role { font-size: 12px; color: #FFE0A8; line-height: 1.25; margin: 2px 0 3px; }
.pk-dash-t { margin-bottom: 10px; }
.pk-parkv { font-size: 12px; color: #BFE3FF; font-weight: 700; white-space: nowrap; }
.pk-repbox { margin: 6px 0; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.04); font-size: 12.5px; }
.pk-repbox > b { display: block; margin-bottom: 3px; }

/* парк: уровни 2–5 */
.pk-tag.up { background: #7A4FD0; color: #FFE27A; }
.pk-ups { margin: 6px 0 4px; display: flex; flex-direction: column; gap: 3px; }
.pk-ups-h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ab-text-2); }
.pk-up { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; background: rgba(27,47,70,.75); border: 1px solid var(--ab-line); border-radius: 8px; padding: 3px 7px 3px 4px; color: var(--ab-text); font-family: inherit; cursor: pointer; }
.pk-up:hover:not(:disabled) { border-color: var(--ab-sky); background: rgba(27,47,70,1); }
.pk-up:disabled { opacity: .55; cursor: default; }
.pk-up.done { opacity: 1; border-color: #9A7BE8; background: rgba(122,79,208,.28); }
.pk-up span { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.pk-up b { font-size: 12.5px; font-weight: 800; }
.pk-up em { font-style: normal; font-size: 10.5px; color: var(--ab-text-2); }
.pk-up i { font-style: normal; font-size: 12px; font-weight: 800; color: #FFE27A; white-space: nowrap; }
.pk-intro { width: min(560px, 100%); }
.pk-intro h2 { margin: 2px 0 8px; }
.pk-intro p { margin: 6px 0; line-height: 1.4; }
.pk-intro ul { margin: 6px 0 10px; padding-left: 20px; line-height: 1.4; }
.pk-intro-goal { background: rgba(53,224,255,.1); border: 1px solid var(--ab-line); border-radius: 10px; padding: 7px 10px; }
.pk-pick { display: block; margin-top: 8px; text-align: center; }
.pk-pop { max-height: calc(100% - 74px); overflow: auto; }
