/* ============================================
   БУНКЕР НА ЭКРАНЕ МАФИИ (08.11.2026)
   Почти всё — копии стилей Мафии (style.css) под элементы bunker.js;
   источник указан у каждого блока.
   ============================================ */

/* ---------- ссылка на другую игру под девизом главного меню ----------
   Вид — пилюля «Нашли ошибку?» Мафии (style.css: .feedback-trigger-btn), крупнее */
.other-game-link {
    position: relative;
    z-index: 1;
    display: inline-block;
    margin: 10px auto 0;
    font-size: 14px;
    font-weight: 700;
    color: #5a3a1a;
    background: rgba(255,255,255,0.92);
    border: 2px solid #c8a070;
    border-radius: 20px;
    padding: 6px 18px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    white-space: nowrap;
}
/* В партии script.js прячет девиз (hideMenuDecorations) — ссылку вместе с ним */
#site-slogan[style*="none"] + .other-game-link { display: none; }
.other-game-link[hidden] { display: none; }

/* ---------- пасхалки Мафии (тостер, Дэн) — на Бункере их нет ---------- */
html.site-bunker #easter-egg-corner,
html.site-bunker #easter-egg-corner-den { display: none !important; }
.other-game-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(0,0,0,0.18);
}

/* ---------- окно создания: время Бункера столбиком ---------- */
.crm-steppers-col { flex-direction: column; align-items: flex-start; }

/* ---------- партия: что от Мафии на экране не нужно ---------- */
body.bunker-game #voting-history { display: none; }

/* ---------- кнопки у поля ввода (Мафия: #pass-word-btn) ---------- */
/* Отдельной строкой под полем ввода: в одной строке кнопки сжимали поле до буквы */
#bunker-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 100%; }
#bunker-actions .bunker-act { flex: 1 1 auto; }
#bunker-actions:empty { display: none; }
.bunker-act {
    padding: 10px 16px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    white-space: nowrap;
}
.bunker-act:hover {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.3);
}
#bunker-cards-btn { background: linear-gradient(135deg, #5c6bc0 0%, #3f51b5 100%); }
#bunker-cards-btn:hover { background: linear-gradient(135deg, #3f51b5 0%, #303f9f 100%); box-shadow: 0 3px 8px rgba(63, 81, 181, 0.35); }
/* Ждёт действия — пульс, как кнопка бога (god-pulse в style.css) */
.bunker-pulse { animation: god-pulse 1s ease-in-out infinite; }

/* ---------- карточка катастрофы и бункера (фаза intro) ---------- */
/* Показывается 9 секунд, пока партия не началась: что снаружи и в каком бункере
   сидят. Слева по центру — сцена и чат остаются видны. */
#bunker-intro {
    position: fixed;
    z-index: 9400;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, calc(100vw - 32px));
    max-height: 72vh;
    overflow-y: auto;
    padding: 14px 16px;
    color: #e9edf0;
    font-size: 13px;
    line-height: 1.45;
    background: rgb(18, 22, 28);   /* непрозрачный: сквозь него просвечивали выноски */
    border: 1px solid rgba(129, 199, 132, 0.35);
    border-left: 3px solid #81c784;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
    animation: bunker-intro-in 0.35s ease-out;
}
/* Затемнение под брифингом: клик мимо окна закрывает его */
#bunker-intro-shade { position: fixed; inset: 0; z-index: 9390; background: rgba(0, 0, 0, 0.45); }
/* Конечная точка анимации — та же, что у окна: раньше окно уезжало вправо на полширины */
@keyframes bunker-intro-in {
    from { opacity: 0; transform: translate(-50%, -46%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}
.bunker-intro-head { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 6px; }
.bunker-intro-emoji { font-size: 22px; line-height: 1; }
.bunker-intro-text { margin: 0 0 10px; color: #c8d0d6; }
.bunker-intro-bunker { margin: 0 0 10px; padding: 8px 10px; background: rgba(255, 255, 255, 0.04); border-radius: 8px; }
.bunker-intro-bunker-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bunker-intro-bunker-head b { font-size: 14px; }
.bunker-intro-bunker-text { margin: 6px 0 0; color: #c8d0d6; }
.bunker-intro-state { font-size: 11px; padding: 1px 7px; border-radius: 10px; border: 1px solid; }
.bunker-intro-state--good { color: #a5d6a7; border-color: rgba(165, 214, 167, 0.5); background: rgba(76, 175, 80, 0.12); }
.bunker-intro-state--medium { color: #ffe082; border-color: rgba(255, 224, 130, 0.5); background: rgba(255, 193, 7, 0.12); }
.bunker-intro-state--bad { color: #ef9a9a; border-color: rgba(239, 154, 154, 0.5); background: rgba(244, 67, 54, 0.12); }
.bunker-intro-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.bunker-intro-facts span { display: flex; flex-direction: column; background: rgba(255, 255, 255, 0.05); border-radius: 6px; padding: 5px 8px; }
.bunker-intro-facts small,
.bunker-intro-features small { color: #8f9aa3; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
.bunker-intro-features { margin-top: 10px; }
.bunker-intro-features ul { margin: 4px 0 0; padding-left: 18px; color: #c8d0d6; }
.bunker-intro-features li { margin: 2px 0; }
@media (max-width: 700px) {
    #bunker-intro { width: calc(100vw - 24px); max-height: 70vh; }
}

/* ---------- окна «Мои карты» и досье (Мафия: #god-roles-panel) ---------- */
#bunker-cards-panel,
#bunker-spec-panel,
#bunker-dossier {
    position: fixed;
    z-index: 9999;
    min-width: 240px;
    max-width: min(340px, calc(100vw - 32px));
    max-height: 60vh;
    overflow-y: auto;
    background: rgba(20, 10, 30, 0.95);
    border: 2px solid #9c27b0;
    border-radius: 8px;
    padding: 8px 10px;
    color: #eee;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
/* Справа под таймером: в центре окно закрывало игрока за столом */
#bunker-cards-panel { top: 140px; right: 28px; }
#bunker-spec-panel { top: 140px; right: 28px; }
#bunker-dossier { top: 118px; left: 50%; transform: translateX(-50%); }
#bunker-cards-panel .god-roles-head,
#bunker-spec-panel .god-roles-head,
#bunker-dossier .god-roles-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
#bunker-cards-panel .god-roles-close,
#bunker-spec-panel .god-roles-close,
#bunker-dossier .god-roles-close { background: none; border: none; color: #bbb; cursor: pointer; font-size: 14px; }
#bunker-dossier .god-roles-row { display: flex; gap: 6px; align-items: baseline; padding: 3px 0; }
#bunker-dossier .god-roles-num { min-width: 22px; text-align: center; }
#bunker-dossier .god-roles-name { flex: 1; min-width: 0; white-space: normal; }
#bunker-dossier .god-roles-name small,
.bunker-card-body small { display: block; color: #999; font-size: 11px; }
#bunker-dossier .god-roles-role { color: #999; white-space: nowrap; font-size: 11px; }
#bunker-dossier .god-roles-empty { color: #999; padding: 6px 0; }
.bunker-closed { opacity: 0.55; }

.bunker-cards-hint { color: #81c784; font-size: 12px; margin-bottom: 6px; }
.bunker-card {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    margin: 4px 0;
    padding: 6px 8px;
    text-align: left;
    color: #eee;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    cursor: default;
}
.bunker-card-icon { font-size: 18px; }
.bunker-card-body { flex: 1; min-width: 0; }
.bunker-card.revealed { border-color: rgba(76, 175, 80, 0.6); }
.bunker-card.closed:disabled { opacity: 0.75; }
.bunker-card.can-reveal { cursor: pointer; border-color: #4caf50; }
.bunker-card.can-reveal:hover { background: rgba(76, 175, 80, 0.2); box-shadow: 0 0 8px rgba(76, 175, 80, 0.4); }

/* Спецкарта: разовое действие в обсуждении */
.bunker-spec-title { font-weight: 700; color: #ce93d8; margin-bottom: 4px; }
.bunker-spec-text { color: #c8d0d6; margin-bottom: 8px; }
.bunker-spec-lbl { display: block; margin: 8px 0 3px; color: #999; font-size: 11px; }
#bunker-spec-panel select { width: 100%; padding: 4px 6px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(0, 0, 0, 0.35); color: #eee; font-size: 13px; }
#bunker-spec-panel .bunker-act { width: 100%; margin-top: 8px; }
.bunker-spec-used { color: #999; font-size: 12px; margin-top: 6px; }
.bunker-spec-peek { margin-top: 8px; padding: 6px 8px; border-radius: 6px; background: rgba(156, 39, 176, 0.15); border: 1px solid rgba(206, 147, 216, 0.4); color: #e1bee7; font-size: 12px; }


/* Вкладки и поля одной игры (bunker.js → applyCreateModalGame): у .crm-tab свой
   display: flex, и атрибут hidden без этого правила ничего бы не прятал. */
[data-game-only][hidden] { display: none !important; }

/* Подписи времени длиннее мафиозных «Минимум/Максимум» — даём им место */
.crm-steppers-col .crm-stepper label { min-width: 150px; }

/* ============================================
   СЦЕНА У КОСТРА (из bunker-game/public/style.css, блок «над сценой»)
   Классы те же, что у стола Мафии (.me-indicator, .player-tag, .speech-bubble…),
   поэтому всё — только внутри слоёв Бункера #overlay и #screen-game: вид Мафии
   эти правила не трогают. Цвета — переменные Бункера (жёлтого нет, «ВЫ» белый).
   ============================================ */
#scene, #overlay, #screen-game { display: none; }
/* Холст под всем: z-index −1, чтобы панели Мафии остались на своих местах и слоях */
body.bunker-scene #scene { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }
body.bunker-scene #overlay,
body.bunker-scene #screen-game { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 1000; }
#overlay, #screen-game {
    --ui-ink: #1f2630; --ui-ink-2: #5d6878; --ui-steel: #4f6d8f; --ui-card-rgb: 244 246 248;
    color: #e9e6df;
}
/* Сцена вместо стола: стол Мафии и её фон прячем, панели игры — поверх холста */
body.bunker-scene #game-table-container { display: none !important; }
/* #setup-ui (relative, z-index 2) — свой слой: внутри него любой z-index у #game-ui
   остаётся «2» и проигрывает табличкам и выноскам (#overlay/#screen-game, 1000).
   В сцене этот слой снимаем, и #game-ui встаёт над ними (1001), но под плавающими
   кнопками (тоже 1001, идут в разметке позже). */
body.bunker-scene #setup-ui { z-index: auto; }
body.bunker-scene #game-ui { background: transparent !important; z-index: 1001; pointer-events: none; }
body.bunker-scene #game-ui > * { pointer-events: auto; }

/* Имя и номер (.player-name-table / .player-number Мафии) */
#overlay .plate { position: fixed; transform: translate(-50%, 0); text-align: center; pointer-events: auto; transition: opacity .4s; cursor: default; }
#overlay .plate .player-number { display: inline-block; margin-right: 6px; background: rgba(255, 255, 255, 0.85); padding: 4px 12px; border-radius: 12px; font-weight: bold; font-size: 13px; color: #333; pointer-events: none; white-space: nowrap; }
#overlay .plate .player-number:empty { display: none; }
#overlay .plate .name { display: inline-block; background: rgba(255, 255, 255, .85); padding: 4px 12px; border-radius: 12px; font-weight: bold; font-size: 13px; color: #333; white-space: nowrap; }
#overlay .plate.me .name { box-shadow: 0 0 0 2px var(--ui-steel); }
#overlay .plate.speaker .name { color: #2e7d32; box-shadow: 0 0 10px rgba(76, 175, 80, .9); }
#overlay .plate.votable { cursor: pointer; }
#overlay .plate.votable:hover .name { box-shadow: 0 0 0 3px #ff9800; }
/* Весь персонаж как цель голосования */
#overlay .player-hit { position: fixed; transform: translateX(-50%); border-radius: 40px; pointer-events: auto; }
#overlay .player-hit.votable { cursor: pointer; }
/* Подсветка при наведении — на самом персонаже (director.js: контур / кольцо), рамки нет.
   У колобка область клика — круг по шару */
#overlay .player-hit.round { border-radius: 50%; transform: translateX(-50%); }


/* ▼ ВЫ, 🎤, 💭 — столбиком над головой; 🤖 — у макушки справа, как в Мафии (--head-r ставит director.js).
   ✓ «ход сделан» — в табличке с именем, как на схеме (на лице людей он смотрелся плохо) */
#screen-game .me-indicator { color: #fff; font-size: 40px; font-weight: bold; line-height: 1; text-shadow: 0 0 10px var(--ui-steel), 0 4px 4px rgba(0,0,0,0.5);
    pointer-events: none; animation: bounce 1.5s infinite ease-in-out; order: -1; display: flex; flex-direction: column; align-items: center; position: static; transform: none; }
#screen-game .me-indicator::after { content: 'ВЫ'; display: block; font-size: 14px; text-align: center; color: white; }
#screen-game .speaker-indicator { position: static; font-size: 36px; line-height: 1; animation: speakerPulse 1s infinite ease-in-out; pointer-events: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
#screen-game .bot-thinking-indicator { position: static; font-size: 22px; line-height: 1; pointer-events: none; animation: botThinkPulse 1s ease-in-out infinite; }
/* Анимации Мафии рассчитаны на значок, сдвинутый translateX(-50%); здесь значки стоят в столбике —
   без своих ключевых кадров они уезжали влево и налезали друг на друга */
#screen-game .speaker-indicator { animation-name: bunkerSpeakerPulse; }
#screen-game .bot-thinking-indicator { animation-name: bunkerThinkPulse; }
@keyframes bunkerSpeakerPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes bunkerThinkPulse { 0%, 100% { opacity: .4; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
#screen-game .player-badges { position: fixed; right: auto; bottom: auto; width: 0; height: 0; pointer-events: none; z-index: 1049; }
#screen-game .bot-badge-table { position: absolute; top: -16px; left: -12px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
    pointer-events: none; font-size: 18px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.28)); transform: none; }
/* ✓ — зелёный кружок Мафии (.has-spoken-indicator); высоту ставит director.js (--ok-y) */
#screen-game .has-spoken-indicator { position: absolute; top: var(--ok-y, 30px); left: -15px; width: 30px; height: 30px; background: #4CAF50; color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: bold; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); transform: none; }
/* 💭 «бот думает» — на теле, там же, где ✓ */
#screen-game .player-badges .bot-thinking-indicator { position: absolute; top: var(--ok-y, 30px); left: -15px; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center; font-size: 24px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
/* «Мой голос ✓» — как в Мафии (script.js: player-tag my-vote) */
#screen-game .player-tag.my-vote { padding: 5px 10px; border-radius: 12px; background: rgba(76, 175, 80, 0.9); color: #fff; font-size: 12px; font-weight: 700; }

/* Над головой: голоса */
/* right/bottom/margin — сброс .player-top-tags Мафии (там bottom: 190px от места за столом) */
#screen-game .player-top-tags { position: fixed; right: auto; bottom: auto; margin: 0; width: auto; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 1050; transition: opacity .2s; }
#screen-game .player-tag.votes { flex-direction: column; gap: 4px; min-width: 98px; max-width: 170px; padding: 8px 10px; font-size: 12px; line-height: 1.3; white-space: normal; text-align: center; color: #3d2415;
    background: rgba(255, 248, 235, .96); border: 1px solid rgba(155, 105, 63, .35); border-radius: 12px; }
#screen-game .player-tag.votes .vote-count { width: 100%; font-size: 18px; font-weight: 800; line-height: 1; color: #8f5e37; }
#screen-game .player-tag.votes .vote-names { font-size: 13px; font-weight: 600; line-height: 1.25; color: #4e2f1d; }

/* Выноска (.speech-bubble Мафии, но position: fixed — её ставит director.js) */
#screen-game .speech-bubble { position: fixed; width: 360px; max-width: calc(100vw - 32px); z-index: 1100; pointer-events: none; transform: none; }

/* Плашка фазы — наверху, как в Мафии (top: 20px из style.css): своих правил нет */
/* Ряд кнопок справа — как у Мафии: 🔊 🔈 🎚️ ☰ 📄 (озвучка и микшер с 26.11.2026 есть) */

/* ============================================
   САЙТ БУНКЕРА (svetobunker.ru): своё лицо на общей разметке.
   Цвета кнопок, окон и списков — bunker/lobby.css (из bunker-game/ui.css);
   здесь — то, что bunker-game/style.css делал поверх («МЕНЮ И КОМНАТЫ»).
   ============================================ */

/* Фон — разрушенный город bunker-game вместо ночного города Мафии */
html.site-bunker #menu-bg-art > svg { display: none; }
html.site-bunker #menu-bg-art {
    background: #151b24 url(/bunker/menu-bg-art.svg) center bottom / cover no-repeat;
}
/* Экран комнат у Мафии на дневном фоне страницы (body.day-mode), у bunker-game —
   на том же городе, что и меню. В партии город закрыт сценой (#scene). */
html.site-bunker body {
    background: #151b24 url(/bunker/menu-bg-art.svg) center bottom / cover no-repeat fixed;
}

/* Логотип текстом (bunker-game/style.css: #site-title, #site-title-sub) */
/* С 26.11.2026 — картинка title.png Бункера (её ставит sites.ts в #site-title, как у Мафии);
   текстовый логотип больше не показывается */
#bunker-site-title { display: none; }
html.site-bunker #bunker-site-title { display: none; }
/* В партии script.js прячет картинку-логотип (style.display = 'none') — текст за ней следом */
html.site-bunker #site-title[style*="none"] + #bunker-site-title { display: none; }
html.site-bunker #bunker-site-title .bst-main {
    display: block; margin: 0; font: italic 700 52px/1.05 Georgia, "Times New Roman", serif;
    color: var(--ui-card); text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}
html.site-bunker #bunker-site-title .bst-sub {
    display: block; margin: 0 0 0 46%; font: italic 700 40px/1.05 Georgia, "Times New Roman", serif;
    color: var(--ui-card); text-shadow: 0 2px 10px rgba(0, 0, 0, .55); white-space: nowrap;
}

/* Заголовок «Комнаты» — цвет у Мафии задан в разметке (style=), перебиваем */
html.site-bunker .rooms-header h2 { color: var(--ui-mist) !important; }

/* «Все игры» в гамме бункера (как .feedback-trigger-btn в bunker/lobby.css) */
html.site-bunker .other-game-link { color: var(--ui-ink); background: rgb(var(--ui-card-rgb) / 0.92); border-color: var(--ui-line); }

/* Тёмная тема у Бункера есть с 26.11.2026 — кнопка 🌙 Мафии, правила в конце файла */

/* ============================================
   ВНЕШНОСТЬ БУНКЕРА (12.11.2026, bunker.js: putBunkerLook)
   Колобка Бункера в меню, профиле, лобби и окне бота рисует сам код Мафии.
   Человечку (24.11.2026) контейнер Мафии отдаёт место под портрет из 3D
   (js/portrait.js): маска-колобок, заливка, узор и лицо Мафии прячутся.
   ============================================ */
html.site-bunker .bunker-look {
    background: none !important;
    box-shadow: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    border-radius: 0 !important;
    transform: none !important;
    display: grid;
    place-items: center;
    overflow: visible;
}
html.site-bunker .bunker-look::before,
html.site-bunker .bunker-look::after { display: none !important; }
html.site-bunker .bunker-look > :not(.bunker-portrait):not(.bunker-look-dice) { display: none !important; }
html.site-bunker .bunker-portrait {
    display: block;
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: radial-gradient(circle at 50% 38%, #eef2f7 0%, #c8d0dc 100%);
    user-select: none;
}
/* Пока каталог внешности грузится, Мафия успела бы нарисовать свой колобок — не мигаем им */
html.site-bunker:not(.bunker-look-ready) :is(#current-avatar-preview, #mini-profile-avatar, #lobby-players .player-sprite, #botAvatarPreview) { visibility: hidden; }
/* В лобби портрет — с колобка Мафии: шар там занимает не весь квадрат спрайта */
html.site-bunker #lobby-players .bunker-look > .bunker-portrait { width: 74%; height: 74%; }
html.site-bunker .bunker-look-dice {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgb(var(--ui-ink-rgb, 31 38 48) / 0.08);
    font-size: 28px;
}
/* Шапки Мафии — не у персонажей Бункера: ни в лобби, ни в меню, ни в профиле */
html.site-bunker:not(.bunker-mafia-look) :is(#lobby-players, #avatar-preview-container) .lobby-hat-layer { display: none !important; }
html.site-bunker:not(.bunker-mafia-look) #botAvatarPreview { cursor: pointer; }
/* Панель колобков Мафии в окне бота: у Бункера вместо неё — редактор */
html.site-bunker:not(.bunker-mafia-look) #botAvatarPicker { display: none !important; }
/* Профиль (24.11.2026): в баннере персонаж Бункера (bunker.js renderProfileBunkerLook).
   Колобок — с лицом Мафии, но без шапки; человечку и 🎲 слои Мафии вокруг
   аватара не нужны совсем. Правая колонка «Обзора» (стороны и достижения
   Мафии) на Бункере спрятана — оставшаяся занимает всю ширину. */
html.site-bunker:not(.bunker-mafia-look) :is(#profile-banner-hat, #profile-banner-hat-back) { display: none !important; }
html.site-bunker .profile-banner-avatar-wrap.bunker-human > :not(.profile-banner-avatar) { display: none !important; }
html.site-bunker :is(#profile-modal, #model-profile-modal) .pfm-overview { grid-template-columns: 1fr; }

/* ---------- редактор внешности (js/avatarEditor.js; из bunker-game style.css) ---------- */
/* Поверх окна «Добавить бота» — у всех .modal один z-index */
#bunker-avatar-editor-modal { z-index: 10050; }
#bunker-avatar-editor-modal .ae { width: min(880px, 94vw); max-height: 92vh; display: flex; flex-direction: column; color: var(--ui-ink, #1f2630); }
.ae-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.ae-gap { flex: 1; }
.ae-tab, .ae-choice {
    padding: 6px 12px; border-radius: 8px; border: 1px solid var(--ui-line, #cfd6de);
    background: rgb(var(--ui-card-rgb, 244 246 248)); color: inherit; cursor: pointer; font-size: 13px; font-weight: 600;
}
.ae-tab:hover, .ae-choice:hover { border-color: var(--ui-slate, #4a5a6e); }
.ae-tab.active, .ae-choice.selected, .ae-choice.active { background: var(--ui-red, #b8322a); border-color: transparent; color: #fff; }
.ae-choice.unique { border-color: #e8b04a; }
.ae-body { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.1fr); gap: 16px; min-height: 0; overflow: hidden; flex: 1; }
.ae-preview { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.ae-scene { width: 100%; height: min(52vh, 420px); border-radius: 10px; background: radial-gradient(circle at 50% 40%, #3a404d, #181b21); display: block; touch-action: none; cursor: grab; }
.ae-scene:active { cursor: grabbing; }
.ae-emotions, .ae-choices, .ae-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.ae-panel { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 6px; max-height: min(62vh, 520px); text-align: left; }
.ae-row { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.ae-row-title { font-size: 12px; font-weight: 700; opacity: .75; }
.ae-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(0,0,0,.15); cursor: pointer; padding: 0; }
.ae-swatch.selected { border-color: #fff; box-shadow: 0 0 0 2px var(--ui-red, #b8322a); }
/* Колобок: сетки и вкладки как в редакторе Мафии */
.ae-panel .avatar-editor-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ae-panel .tab-btn { padding: 6px 12px; border: 1px solid var(--ui-line, #cfd6de); border-radius: 8px; background: none; color: inherit; cursor: pointer; font-size: 13px; }
.ae-panel .tab-btn.active { background: var(--ui-red, #b8322a); border-color: transparent; color: #fff; }
.ae-panel .tab-description { margin: 2px 0; font-size: 12px; opacity: .75; }
.ae-panel .color-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 6px; }
.ae-panel .pattern-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 6px; }
@media (max-width: 640px) {
    .ae-body { grid-template-columns: 1fr; overflow-y: auto; }
    .ae-scene { height: 38vh; }
    .ae-panel { max-height: none; }
    .ae-panel .color-grid { grid-template-columns: repeat(5, 1fr); }
    .ae-panel .pattern-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================
   ПАРТИЯ 2.0 (23.11.2026): табличка бункера, карточки игроков, рука карт
   ============================================ */

/* ---------- катастрофа и бункер: карточка справа под кнопками ----------
   Вид — панель Мафии в дневной гамме (как чат слева: #chat-panel, .chat-title). */
/* По центру под плашкой фазы: справа его закрывало меню жестов (Света, 24.11.2026) */
#bunker-status {
    position: fixed; top: 116px; left: 50%; transform: translateX(-50%); z-index: 900;
    width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 330px);
    display: flex; flex-direction: column;
    background: rgba(255, 248, 240, 0.95); color: #5a4030;
    border: 2px solid #d4a574; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.3);
    overflow: hidden;
    font-size: 13px; line-height: 1.4; text-align: left;
}
#bunker-status .bs-title {
    padding: 8px 12px; font-size: 15px; font-weight: 700;
    background: rgba(212, 165, 116, 0.3); border-bottom: 1px solid #d4a574;
}
#bunker-status .bs-body { padding: 8px 12px 10px; overflow-y: auto; }
#bunker-status .bs-text { margin: 0 0 8px; color: #6b5040; font-size: 12.5px; }
#bunker-status .bs-bunker { margin: 2px 0 4px; font-size: 14px; }
#bunker-status .bs-state { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; border: 1px solid; vertical-align: 1px; }
#bunker-status .bs-state--good { color: #2e7d32; border-color: #81c784; background: rgba(76, 175, 80, .12); }
#bunker-status .bs-state--medium { color: #9a6a00; border-color: #e0b25a; background: rgba(255, 193, 7, .14); }
#bunker-status .bs-state--bad { color: #c62828; border-color: #e08a8a; background: rgba(244, 67, 54, .12); }
#bunker-status .bs-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 6px 0; }
#bunker-status .bs-num { padding: 4px 6px; border-radius: 8px; background: rgba(212, 165, 116, 0.16); border: 1px solid rgba(212, 165, 116, 0.45); text-align: center; }
#bunker-status .bs-num b { display: block; font-size: 13.5px; color: #4e3424; white-space: nowrap; }
#bunker-status .bs-row { display: flex; gap: 6px; align-items: flex-start; padding: 2px 0; font-size: 12.5px; color: #4e3424; }
#bunker-status .bs-row small { font-size: 12.5px; font-weight: 700; color: #8b5a3c; }
#bunker-status .bs-row-ico { font-size: 14px; line-height: 1.25; }
#bunker-status .bs-num small,
#bunker-status .bs-features small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #9a7a5c; }
#bunker-status .bs-text { margin: 8px 0 0; }
#bunker-status .bs-more {
    display: block; margin: 6px auto 0; padding: 2px 10px;
    background: none; border: none; box-shadow: none; color: #8b5a3c;
    font-size: 12px; font-weight: 700; cursor: pointer;
}
#bunker-status .bs-more:hover { text-decoration: underline; }
#bunker-status .bs-features { margin-top: 8px; }
#bunker-status .bs-features ul { margin: 2px 0 0; padding-left: 18px; font-size: 12.5px; }


/* ---------- вскрытые карты игрока ----------
   Свёрнутые — маленькими карточками-значками СБОКУ от таблички, наружу от костра
   (под табличкой крупные карты у ближних к костру игроков закрывали полкостра).
   Раскрытые (наведение на табличку, клик или ☰ → «Карты игроков: раскрыты») —
   компактной сеткой ПОД именем: карточка по размеру текста, ряды растут вниз,
   где места много, а не вбок. Значки при этом остаются на месте — наведение не
   срывается. (Света, 23.11.2026) */
#overlay .plate .plate-cards {
    position: absolute; top: 50%; left: calc(100% + 6px);
    display: flex; align-items: center;
    transform: translateY(-50%);
    pointer-events: auto; cursor: pointer;
}
/* слева от таблички стоит номер (у Мафии он вынесен влево: margin-left −50px) — значки левее него */
#overlay .plate.cards-left .plate-cards { left: auto; right: calc(100% + 56px); flex-direction: row-reverse; }
#overlay .plate .plate-cards:empty { display: none; }
#overlay .plate-card {
    width: 20px; height: 27px; margin-left: -5px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(168deg, #2b333c, #191f25);
    border: 1px solid #46525e; border-top: 2px solid var(--pc, #7fa8d9);
    border-radius: 3px;
    box-shadow: 0 3px 7px rgba(0, 0, 0, .45);
    transform: rotate(var(--r, 0deg));
}
#overlay .plate-card:first-child { margin-left: 0; }
#overlay .plate.cards-left .plate-card { margin-left: 0; margin-right: -5px; }
#overlay .plate.cards-left .plate-card:first-child { margin-right: 0; }
#overlay .plate-card:nth-child(odd) { --r: -4deg; }
#overlay .plate-card:nth-child(even) { --r: 4deg; }
#overlay .plate-card--profession { --pc: #7fa8d9; }
#overlay .plate-card--biology { --pc: #9fc7c3; }
#overlay .plate-card--health { --pc: #e08a8a; }
#overlay .plate-card--hobby { --pc: #e0b25a; }
#overlay .plate-card--baggage { --pc: #81c784; }
#overlay .plate-card--fact { --pc: #b48ad6; }
#overlay .plate-card .pc-ico { font-size: 11px; line-height: 1; }
/* Только что вскрытая карта — подсвечена несколько секунд (вместо дубля над головой) */
#overlay .plate-card.fresh,
#overlay .open-card.fresh { box-shadow: 0 0 0 2px var(--pc), 0 0 12px var(--pc); }

/* Раскрытые: сетка под табличкой, по центру; --dx сдвигает её от края экрана */
#overlay .plate .plate-open {
    display: none;
    position: absolute; top: calc(100% + 4px); left: 50%;
    transform: translateX(calc(-50% + var(--dx, 0px)));
    width: max-content; max-width: 250px;
    flex-wrap: wrap; justify-content: center; gap: 3px;
    pointer-events: auto; cursor: pointer;
}
#overlay .plate:hover { z-index: 3; }
/* Раскрываются только кликом (или «Карты игроков: раскрыты»), не наведением */
#overlay .plate.expanded .plate-open:not(:empty) { display: flex; }
/* раскрыто — значки сбоку не нужны */
#overlay .plate.expanded .plate-cards { display: none; }
#overlay .open-card {
    max-width: 120px; padding: 2px 6px 3px;
    background: linear-gradient(168deg, #2b333c, #191f25);
    border: 1px solid #46525e; border-top: 2px solid var(--pc, #7fa8d9);
    border-radius: 4px;
    box-shadow: 0 3px 7px rgba(0, 0, 0, .45);
    text-align: left; white-space: normal;
}
#overlay .open-card .pc-kind {
    display: block; font-size: 8px; letter-spacing: .05em; text-transform: uppercase; color: #8fa0ad; line-height: 1.3;
}
#overlay .open-card .pc-text { display: block; font-size: 11px; line-height: 1.25; color: #e8eef3; font-weight: 500; }

/* ---------- рука своих карт (как на схеме: веером внизу справа) ---------- */
/* Сдвиг вниз в покое и подъём при наведении — ОДНО число (--hand-drop): когда подъём был
   больше сдвига (132 против 120), поднятая рука висела над краем экрана, курсор внизу
   оказывался под ней, рука опускалась, снова ловила курсор — и дёргалась */
#bunker-hand {
    --hand-drop: 118px;  /* в покое видны только заголовки карт (Света, 24.11.2026) */
    position: fixed; right: 20px; bottom: calc(-1 * var(--hand-drop));
    z-index: 1100;
    display: flex; align-items: flex-end;
    padding: 30px 6px 6px;
    transition: transform .2s ease;
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card {
    position: relative;
    width: 96px; height: 136px; margin-left: -24px;
    padding: 8px 8px 7px;
    text-align: left; color: #e8eef3;
    background: linear-gradient(168deg, #242c36 0%, #171d24 62%, #12171c 100%);
    border: 1px solid #3c4855; border-radius: 11px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .09);
    transform: rotate(var(--r, 0deg)); transform-origin: 50% 100%;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    cursor: default;
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card:first-child { margin-left: 0; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card:nth-child(1) { --r: -8deg; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card:nth-child(2) { --r: -6deg; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card:nth-child(3) { --r: -4deg; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card:nth-child(4) { --r: -2deg; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card:nth-child(5) { --r: 0deg; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card:nth-child(6) { --r: 2deg; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card:nth-child(7) { --r: 4deg; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card:nth-child(8) { --r: 6deg; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card:nth-child(9) { --r: 8deg; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-kind {
    font-size: 8.5px; letter-spacing: .09em; text-transform: uppercase;
    color: #8494a1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-ico {
    width: 32px; height: 32px; margin: 6px auto 5px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 17px;
    background: radial-gradient(circle at 38% 32%, #33404c, #1c242c 72%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 2px 6px rgba(0, 0, 0, .35);
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-text {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 10px; line-height: 1.3; text-align: center; overflow-wrap: anywhere;
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-foot {
    position: absolute; left: 8px; right: 8px; bottom: 6px;
    font-size: 9px; color: #75818b; text-align: center;
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card.is-open { border-color: rgba(111, 191, 115, .55); }
:is(#bunker-hand, #bunker-cards-modal) .bh-card.is-open .bh-foot { color: #8fd18f; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card.can-reveal { cursor: pointer; border-color: #6fbf73; box-shadow: 0 12px 24px rgba(0, 0, 0, .48), 0 0 0 1px rgba(111, 191, 115, .45), 0 0 22px rgba(111, 191, 115, .2); }
:is(#bunker-hand, #bunker-cards-modal) .bh-card.can-reveal .bh-foot { color: #8fd18f; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card.is-spec {
    background: linear-gradient(168deg, #3c2549 0%, #261630 62%, #1b1022 100%);
    border-color: #8e44ad; cursor: pointer;
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card.is-spec .bh-kind { color: #b98fc9; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card.is-spec .bh-foot { color: #b98fc9; }
/* Навёл на руку, свой ход или «Мои карты» — поднимается вся рука целиком (а не карты внутри):
   рука остаётся под курсором, и наведение не срывается. Раньше поднималась сама карта,
   уходила из-под курсора, падала обратно — и дёргалась. Карта под курсором только
   выходит вперёд и чуть растёт от нижнего края, не сдвигаясь. */
/* Поднимается по клику (bunker.js), а не наведением: наведение давало случайные срабатывания */
#bunker-hand.open { transform: translateY(calc(-1 * var(--hand-drop))); }
#bunker-hand:not(.open) { cursor: pointer; }
#bunker-hand:not(.open):hover .bh-card { border-color: #8c7a52; }
/* Карта под курсором только выходит вперёд и подсвечивается — форму не меняет: раньше она
   выпрямлялась из наклона, край уезжал из-под курсора, наклон возвращался — карта дрожала */
:is(#bunker-hand, #bunker-cards-modal) .bh-card:hover { z-index: 5; border-color: #8fa6bd; box-shadow: 0 14px 28px rgba(0, 0, 0, .55), 0 0 0 1px rgba(143, 166, 189, .5); }

@media (max-width: 700px) {
    #bunker-hand { --hand-drop: 98px; right: 8px; padding: 24px 4px 4px; }
    :is(#bunker-hand, #bunker-cards-modal) .bh-card { width: 84px; height: 118px; margin-left: -12px; padding: 6px; }
    :is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-text { font-size: 9px; -webkit-line-clamp: 3; }
    :is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-ico { width: 26px; height: 26px; font-size: 14px; margin: 4px auto; }
    #bunker-hand.open { transform: translateY(calc(-1 * var(--hand-drop))); }
}

#bunker-hand::before {
    content: "мои карты";
    position: absolute; right: 10px; top: -16px;
    font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
    color: #8d9aa4; text-shadow: 0 1px 2px #000; pointer-events: none;
}
@media (max-width: 700px) {
    #bunker-hand::before { display: none; }
}

/* ---------- крестик у брифинга ---------- */
.bunker-intro-close {
    position: absolute; top: 6px; right: 8px;
    background: none; border: none; color: #9aa6ad; cursor: pointer; font-size: 15px;
}

/* ---------- панель спецкарты — рядом с рукой ---------- */
#bunker-spec-panel { top: auto; bottom: 168px; right: 22px; }
@media (max-width: 700px) {
    #bunker-spec-panel { bottom: 132px; right: 12px; }
}

/* На десктопе рука видна и поднимается сама; кнопка нужна только на тач-экранах */
#bunker-hand-btn { display: none; }
@media (hover: none) {
    #bunker-hand-btn { display: inline-block; }
}

/* На узких экранах карточка уже */
@media (max-width: 1000px) {
    #bunker-status { font-size: 12px; }
}

/* На телефоне открытый чат должен быть выше руки карт */
@media (max-width: 700px) {
    body.bunker-game #chat-panel.mobile-shown { z-index: 1200; }
}



/* ============================================
   ЦВЕТА ПАРТИИ — гамма Бункера (Света, 23.11.2026: «не бежевый и не коричневый,
   у бункера тема — синий и красный»). Токены --ui-* те же, что у меню и лобби
   Бункера (lobby.css); форма и расположение панелей Мафии не меняются.
   ============================================ */
html.site-bunker body.bunker-scene #chat-panel {
    background: rgb(var(--ui-card-rgb) / 0.95); color: var(--ui-ink);
    border: 2px solid var(--ui-line); box-shadow: 0 4px 15px rgb(var(--ui-ink-rgb) / 0.35);
}
html.site-bunker body.bunker-scene #chat-panel .chat-title { background: var(--ui-card-2); border-bottom: 1px solid var(--ui-line); color: var(--ui-ink); }
html.site-bunker body.bunker-scene #chat-panel .chat-tab.active { background: var(--ui-slate); color: #fff; }
html.site-bunker body.bunker-scene #chat-panel .chat-input-area { background: var(--ui-card-2); border-top: 1px solid var(--ui-line); }
html.site-bunker body.bunker-scene #chat-panel #chatInput { background: #fff; border: 1px solid var(--ui-line); color: var(--ui-ink); }
html.site-bunker body.bunker-scene #chat-panel #chatInput::placeholder { color: var(--ui-ink-3); }
html.site-bunker body.bunker-scene #chat-panel #sendChatBtn { background: var(--ui-red); color: #fff; }
html.site-bunker body.bunker-scene #chat-panel .chat-message .sender { color: var(--ui-steel); }
html.site-bunker body.bunker-scene #chat-panel .chat-message.system { color: var(--ui-ink-3); }

html.site-bunker body.bunker-scene #phase-display,
html.site-bunker body.bunker-scene #phase-timer {
    background: rgb(var(--ui-card-rgb) / 0.95); color: var(--ui-ink);
    border: 2px solid var(--ui-line); box-shadow: 0 4px 15px rgb(var(--ui-ink-rgb) / 0.35);
}
html.site-bunker body.bunker-scene :is(#game-menu-btn, #audio-toggle-btn, #tts-toggle-btn, #volume-mixer-btn, #my-context-btn):not(.active) {
    background: rgb(var(--ui-card-rgb) / 0.95); color: var(--ui-ink); border-color: var(--ui-line);
}
html.site-bunker body.bunker-scene :is(#game-menu-btn, #audio-toggle-btn, #tts-toggle-btn, #volume-mixer-btn, #my-context-btn):not(.active):hover { background: #fff; border-color: var(--ui-slate); }

/* карточка катастрофы и бункера */
html.site-bunker #bunker-status { background: rgb(var(--ui-card-rgb) / 0.95); color: var(--ui-ink); border-color: var(--ui-line); box-shadow: 0 4px 15px rgb(var(--ui-ink-rgb) / 0.35); }
html.site-bunker #bunker-status .bs-title { background: var(--ui-card-2); border-bottom-color: var(--ui-line); }
html.site-bunker #bunker-status .bs-text { color: var(--ui-ink-2); }
html.site-bunker #bunker-status .bs-num { background: var(--ui-card-2); border-color: var(--ui-line); }
html.site-bunker #bunker-status .bs-num b,
html.site-bunker #bunker-status .bs-row { color: var(--ui-ink); }
html.site-bunker #bunker-status .bs-row small { color: var(--ui-red); }
html.site-bunker #bunker-status .bs-num small,
html.site-bunker #bunker-status .bs-features small { color: var(--ui-ink-3); }
html.site-bunker #bunker-status .bs-more { color: var(--ui-red); }

/* табличка голосов над головой */
html.site-bunker #screen-game .player-tag.votes { background: rgb(var(--ui-card-rgb) / 0.96); border-color: var(--ui-line); color: var(--ui-ink); }
html.site-bunker #screen-game .player-tag.votes .vote-count { color: var(--ui-red); }
html.site-bunker #screen-game .player-tag.votes .vote-names { color: var(--ui-ink); }

/* ---------- жесты (система жестов Мафии, 24.11.2026) ----------
   Пузырь — .gesture-bubble Мафии, но висит над 3D-персонажем: место ставит director.js.
   Кнопка и меню жестов — в левом нижнем углу: справа внизу у Бункера рука карт. */
#screen-game .gesture-bubble.bunker-gesture { position: fixed; transform: translate(-50%, -100%); z-index: 1060; }
/* Жесты — справа, как в Мафии; рука карт — слева внизу (Света, 24.11.2026) */
body.bunker-scene #bunker-hand { right: auto; left: 20px; }
/* Свои анимации: у Мафии в gesturePop/gestureFade зашит translateX(-50%) — пузырь прыгал бы */
#screen-game .gesture-bubble.bunker-gesture { animation: bunkerGesturePop .3s ease-out; }
#screen-game .gesture-bubble.bunker-gesture.fade-out { animation: none; opacity: 0; transition: opacity .4s; }
@keyframes bunkerGesturePop {
    0% { transform: translate(-50%, -100%) scale(0); opacity: 0; }
    60% { transform: translate(-50%, -100%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -100%) scale(1); opacity: 1; }
}

/* ---------- презентация катастрофы и бункера (bunker.js renderBunkerPresentation) ----------
   15 с: 0–6 с — катастрофа, с 6 с — бункер и его условия по одному. Шрифт заголовков —
   как у логотипа Бункера (Georgia italic), цвета — гамма Бункера. */
#bunker-presentation {
    position: fixed; inset: 0; z-index: 9500;
    display: grid; place-items: center;
    background: radial-gradient(ellipse at 50% 40%, rgba(120, 24, 18, .35), transparent 60%), rgba(8, 10, 14, .9);
    color: #eef1f4; text-align: center;
    animation: bp-in .6s ease-out;
}
@keyframes bp-in { from { opacity: 0; } to { opacity: 1; } }
#bunker-presentation .bp-skip {
    position: absolute; right: 24px; bottom: 24px;
    background: none; border: 1px solid rgba(255, 255, 255, .3); border-radius: 18px;
    padding: 6px 16px; color: #cfd6de; font-size: 14px; cursor: pointer; box-shadow: none;
}
#bunker-presentation .bp-skip:hover { border-color: #fff; color: #fff; }
#bunker-presentation .bp-step { grid-area: 1 / 1; width: min(760px, calc(100vw - 48px)); opacity: 0; }
#bunker-presentation .bp-step { pointer-events: none; }
#bunker-presentation.step-cat .bp-cat,
#bunker-presentation.step-bunker .bp-bunker { animation: bp-step-in .7s ease-out forwards; pointer-events: auto; }
#bunker-presentation { cursor: pointer; }
#bunker-presentation .bp-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); font-size: 13px; color: #8a94a3; }
@keyframes bp-step-out {
    0% { opacity: 0; transform: translateY(24px); }
    12% { opacity: 1; transform: none; }
    88% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: translateY(-16px); }
}
@keyframes bp-step-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
#bunker-presentation .bp-emoji { font-size: 76px; line-height: 1; margin-bottom: 10px; filter: drop-shadow(0 0 24px rgba(255, 90, 60, .45)); }
#bunker-presentation .bp-kicker { font-size: 13px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: #e5675c; }
#bunker-presentation .bp-title { margin: 8px 0 12px; font: italic 700 46px/1.1 Georgia, "Times New Roman", serif; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .6); }
#bunker-presentation .bp-text { margin: 0 auto; max-width: 620px; font-size: 18px; line-height: 1.5; color: #c9d1da; }
#bunker-presentation .bp-state { vertical-align: 8px; font: 700 14px/1 system-ui, sans-serif; font-style: normal; padding: 4px 10px; border-radius: 12px; border: 1px solid; }
#bunker-presentation .bp-state--good { color: #8fd18f; border-color: #6fbf73; }
#bunker-presentation .bp-state--medium { color: #f0c66a; border-color: #e0b25a; }
#bunker-presentation .bp-state--bad { color: #f08a80; border-color: #e5675c; }
#bunker-presentation .bp-conds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
#bunker-presentation .bp-cond, #bunker-presentation .bp-feat {
    opacity: 0;
}
#bunker-presentation.step-bunker .bp-cond, #bunker-presentation.step-bunker .bp-feat {
    animation: bp-cond .45s ease-out forwards; animation-delay: calc(.6s + var(--i) * .35s);
}
#bunker-presentation .bp-cond {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 12px 10px; border-radius: 10px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
}
#bunker-presentation .bp-cond--main { border-color: #e5675c; background: rgba(184, 50, 42, .18); }
#bunker-presentation .bp-cond-ico { font-size: 24px; }
#bunker-presentation .bp-cond small, #bunker-presentation .bp-feat small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8a94a3; }
#bunker-presentation .bp-cond b { font-size: 16px; color: #fff; }
#bunker-presentation .bp-cond--main b { font-size: 22px; }
#bunker-presentation .bp-feat { margin-top: 16px; font-size: 15px; color: #c9d1da; }
@keyframes bp-cond { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
    #bunker-presentation .bp-title { font-size: 32px; }
    #bunker-presentation .bp-text { font-size: 15px; }
    #bunker-presentation .bp-conds { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- карточка катастрофы и бункера: тёмная и компактная (Света, 24.11.2026:
   белая слишком большая и тянет внимание на тёмной сцене) ---------- */
html.site-bunker #bunker-status {
    top: 112px; width: auto; max-width: min(560px, calc(100vw - 32px));
    background: rgba(18, 22, 28, .72); color: #dfe5ec;
    border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35); backdrop-filter: blur(4px);
    font-size: 12px;
}
html.site-bunker #bunker-status .bs-title { display: none; }
html.site-bunker #bunker-status .bs-body { padding: 6px 12px 7px; }
html.site-bunker #bunker-status .bs-bunker { font-size: 13px; margin: 0 0 4px; text-align: center; color: #fff; }
html.site-bunker #bunker-status .bs-bunker .bs-cat { color: #f08a80; font-weight: 700; margin-right: 6px; }
html.site-bunker #bunker-status .bs-nums { display: flex; justify-content: center; gap: 12px; margin: 0 0 3px; }
html.site-bunker #bunker-status .bs-num { background: none; border: none; padding: 0; display: flex; gap: 4px; align-items: baseline; }
html.site-bunker #bunker-status .bs-num small { display: inline; font-size: 10px; color: #8a94a3; }
html.site-bunker #bunker-status .bs-num b { font-size: 12.5px; color: #fff; }
html.site-bunker #bunker-status .bs-rows { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px 14px; }
html.site-bunker #bunker-status .bs-row { color: #c9d1da; font-size: 12px; padding: 0; }
html.site-bunker #bunker-status .bs-row small { color: #e5675c; font-size: 12px; }
html.site-bunker #bunker-status .bs-row-ico { font-size: 12px; }
html.site-bunker #bunker-status .bs-text,
html.site-bunker #bunker-status .bs-features { color: #aab4bf; text-align: left; }
html.site-bunker #bunker-status .bs-features small { color: #8a94a3; }
html.site-bunker #bunker-status .bs-more { color: #8fa6bd; font-size: 11px; margin-top: 2px; padding: 0 8px; }
/* Пока идёт презентация — карточки нет: катастрофу и бункер объявляют */
body.bunker-presenting #bunker-status { display: none; }

/* Выбывший: имя и карты остаются у его места, приглушённо, имя зачёркнуто */
#overlay .plate.out { opacity: .6 !important; filter: grayscale(.6); }
#overlay .plate.out .name { text-decoration: line-through; text-decoration-color: #e5675c; }

/* ============================================
   КАРТЫ — «ЛИЧНОЕ ДЕЛО» (Света, 24.11.2026: «любые, только не типичные»).
   Желтоватая бумага в клетку, машинопись, цветной корешок по типу карты,
   красный штамп «ВСКРЫТО». Спецкарта — красная папка «СЕКРЕТНО».
   ============================================ */
:is(#bunker-hand, #bunker-cards-modal) .bh-card {
    --paper: #ece3cc;
    background:
        linear-gradient(90deg, var(--pc, #8a7d69) 0 5px, transparent 5px),
        repeating-linear-gradient(0deg, transparent 0 15px, rgba(90, 110, 140, .13) 15px 16px),
        linear-gradient(170deg, #f4ecd6 0%, var(--paper) 60%, #ddd1b3 100%);
    color: #2a2620;
    border: 1px solid #b9ab88; border-radius: 3px 3px 3px 12px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .5), inset 0 0 18px rgba(120, 95, 50, .18);
    font-family: "Courier New", Courier, monospace;
    padding: 9px 8px 7px 13px;
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-kind {
    color: #2a2620; font-family: "Courier New", monospace; font-weight: 700;
    font-size: 9.5px; letter-spacing: .12em;
    border-bottom: 1px dashed rgba(42, 38, 32, .45); padding-bottom: 3px;
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-ico {
    width: auto; height: auto; margin: 7px 0 4px; background: none; box-shadow: none;
    font-size: 18px; justify-content: flex-start; filter: grayscale(.25) sepia(.25);
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-text {
    text-align: left; font-family: "Courier New", monospace; font-weight: 700;
    font-size: 11.5px; line-height: 1.25; color: #1f1b16;
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-foot {
    left: 13px; right: 8px; text-align: left; font-family: "Courier New", monospace;
    font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: #6d6150;
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-stamp {
    position: absolute; right: 4px; top: 24px; transform: rotate(-12deg);
    padding: 1px 6px; border: 2px solid rgba(178, 34, 34, .8); border-radius: 3px;
    color: rgba(178, 34, 34, .85); font: 700 9px/1.2 "Courier New", monospace;
    letter-spacing: .14em; text-transform: uppercase; pointer-events: none;
    mix-blend-mode: multiply;
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card.is-open { border-color: #b9ab88; opacity: 1; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card.is-open .bh-foot { color: #6d6150; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card.can-reveal {
    border-color: #2f7d34;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .5), 0 0 0 2px rgba(111, 191, 115, .8), 0 0 18px rgba(111, 191, 115, .45);
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card.can-reveal .bh-foot { color: #2f7d34; font-weight: 700; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card:hover { border-color: #8c7a52; box-shadow: 0 14px 28px rgba(0, 0, 0, .55), inset 0 0 18px rgba(120, 95, 50, .18); }
:is(#bunker-hand, #bunker-cards-modal) .bh-card.is-spec {
    background:
        repeating-linear-gradient(45deg, transparent 0 9px, rgba(0, 0, 0, .05) 9px 10px),
        linear-gradient(170deg, #9e3328 0%, #7d2219 70%, #5f1812 100%);
    color: #f6e7d6; border-color: #4d120d;
}
:is(#bunker-hand, #bunker-cards-modal) .bh-card.is-spec .bh-kind { color: #f6e7d6; border-bottom-color: rgba(246, 231, 214, .5); }
:is(#bunker-hand, #bunker-cards-modal) .bh-card.is-spec .bh-text,
:is(#bunker-hand, #bunker-cards-modal) .bh-card.is-spec .bh-foot { color: #f6e7d6; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card.is-spec .bh-kind::after { content: " · секретно"; }
#bunker-hand::before { color: #cfc4a8; }

/* Карты других игроков — те же бумажки, только маленькие */
#overlay .plate-card,
#overlay .open-card {
    background:
        linear-gradient(90deg, var(--pc, #8a7d69) 0 3px, transparent 3px),
        linear-gradient(170deg, #f4ecd6 0%, #e6dcc2 100%);
    border: 1px solid #b9ab88; border-top: 1px solid #b9ab88;
    box-shadow: 0 3px 7px rgba(0, 0, 0, .45);
}
#overlay .plate-card .pc-ico { filter: grayscale(.25) sepia(.25); }
#overlay .open-card { padding: 2px 6px 3px 8px; border-radius: 2px 2px 2px 7px; }
#overlay .open-card .pc-kind { color: #6d6150; font-family: "Courier New", monospace; font-weight: 700; }
#overlay .open-card .pc-text { color: #1f1b16; font-family: "Courier New", monospace; font-weight: 700; font-size: 11px; }

/* ============================================
   ВЕРХНЯЯ ПЛАШКА = КАТАСТРОФА И БУНКЕР (24.11.2026)
   Плашки фазы в Бункере нет (фаза — в таймере справа и в строке «Говорит» в чате).
   На её месте: катастрофа крупно, описание одной фразой, ниже бункер и коротко о нём.
   ============================================ */
body.bunker-scene #phase-display { display: none !important; }
/* Плашка катастрофы — по образцу плашки фазы Мафии (#phase-display): та же форма
   (радиус 20, рамка 2px, отступы 12/30), те же цвета, крупный жирный заголовок как
   #phase-title. Под ним — описание и одна строка о бункере; запасы — по «подробнее». */
html.site-bunker #bunker-status {
    top: 20px; left: 50%; transform: translateX(-50%);
    width: max-content; max-width: min(460px, calc(100vw - 32px)); min-width: 0;
    max-height: none; overflow: visible; display: block;
    padding: 10px 28px 8px; text-align: center;
    background: rgb(var(--ui-card-rgb) / 0.95); color: var(--ui-ink);
    border: 2px solid var(--ui-line); border-radius: 20px;
    box-shadow: 0 4px 15px rgb(var(--ui-ink-rgb) / 0.3); backdrop-filter: blur(10px);
    font-size: 13px; line-height: 1.35;
}
html.site-bunker #bunker-status .bs-round { display: none; }
html.site-bunker #bunker-status .bs-cat { font-family: inherit; font-style: normal; font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--ui-ink); }
html.site-bunker #bunker-status .bs-cat-text {
    margin: 4px 0 0; font-family: inherit; font-style: normal; font-size: 13px; line-height: 1.4; color: var(--ui-ink-2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
html.site-bunker #bunker-status .bs-sep { display: none; }
html.site-bunker #bunker-status .bs-shelter { display: inline; margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--ui-ink); }
html.site-bunker #bunker-status .bs-shelter::before { content: ""; display: block; height: 6px; }
html.site-bunker #bunker-status .bs-state { font-size: 11px; font-weight: 700; vertical-align: 1px; padding: 0 7px; border-radius: 10px; border: 1px solid; background: none; }
html.site-bunker #bunker-status .bs-state--good { color: var(--ui-green); border-color: var(--ui-green); }
html.site-bunker #bunker-status .bs-state--medium { color: #9a6a00; border-color: #e0b25a; }
html.site-bunker #bunker-status .bs-state--bad { color: var(--ui-red); border-color: var(--ui-red); }
html.site-bunker #bunker-status .bs-brief { margin-top: 1px; font-size: 13px; color: var(--ui-ink-2); }
html.site-bunker #bunker-status .bs-brief b { color: var(--ui-red); }
html.site-bunker #bunker-status .bs-supplies { display: none; }
html.site-bunker #bunker-status.more .bs-supplies { display: block; margin-top: 6px; text-align: left; }
html.site-bunker #bunker-status .bs-supplies span { display: block; font-size: 12.5px; color: var(--ui-ink); }
html.site-bunker #bunker-status .bs-supplies i { font-style: normal; font-weight: 700; color: var(--ui-ink-3); }
html.site-bunker #bunker-status .bs-more-text,
html.site-bunker #bunker-status .bs-feat { color: var(--ui-ink-2); font-size: 12px; text-align: left; }
html.site-bunker #bunker-status .bs-more-text { margin: 6px 0 0; }
html.site-bunker #bunker-status .bs-feat { margin: 4px 0 0; padding-left: 18px; }
html.site-bunker #bunker-status .bs-more { display: block; margin: 2px auto 0; padding: 0 8px; background: none; border: none; box-shadow: none; color: var(--ui-ink-3); font-size: 11px; font-weight: 700; cursor: pointer; }
html.site-bunker #bunker-status .bs-more:hover { color: var(--ui-red); }

/* ---------- карты игроков у имени: без подписи вида, текст крупнее ---------- */
#overlay .open-card { max-width: 130px; padding: 3px 7px 4px 9px; }
#overlay .open-card .pc-text { font-size: 13px; line-height: 1.2; }
/* У ведущего: все карты, ещё не вскрытые — бледнее и пунктиром, вскрытые — с зелёной меткой */
#overlay .open-card.is-closed { opacity: .55; border-style: dashed; }
#overlay .open-card.is-open { box-shadow: 0 0 0 2px #6fbf73, 0 3px 7px rgba(0, 0, 0, .45); }

/* ---------- своя рука: крупнее, без эмодзи и без подписи вида ---------- */
:is(#bunker-hand, #bunker-cards-modal) .bh-card { width: 104px; height: 140px; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-ico { display: none; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-text { margin-top: 6px; font-size: var(--fs, 13px); line-height: 1.2; -webkit-line-clamp: 6; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-kind { font-size: 9px; color: #6d6150; }
:is(#bunker-hand, #bunker-cards-modal) .bh-card .bh-foot { font-size: 10px; }
#bunker-hand::before { display: none; }

/* ---------- ведущий: все 8 карт каждого — компактнее, чтобы не заваливать костёр ---------- */



/* Карты игрока у имени — не шире двух столбиков, чтобы соседи не наезжали друг на друга */
#overlay .plate .plate-open { max-width: 220px; }
#overlay .open-card { max-width: 108px; }
/* Невскрытые карты у ведущего — маленькими значками (текст — по клику на игрока) */
#overlay .closed-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; width: 100%; }
#overlay .closed-chip {
    width: 18px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 10px; border-radius: 2px; opacity: .6;
    background: linear-gradient(90deg, var(--pc, #8a7d69) 0 2px, #e6dcc2 2px);
    border: 1px dashed #8c7a52;
}

/* ---------- карты игроков: окошки с текстом сбоку от персонажа (director.js placeCards) ----------
   Столбик сверху вниз; если не влезает до низа — следующий столбик дальше наружу
   (to-left: столбики растут влево). Место и число строк (--rows) считает кадр. */
#overlay .player-cards {
    position: fixed; z-index: 2;
    display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 8), auto);
    gap: 3px; align-items: start; justify-items: start;
    pointer-events: auto; cursor: pointer;
}
#overlay .player-cards.to-left { direction: rtl; justify-items: end; }
#overlay .player-cards > * { direction: ltr; }
#overlay .player-cards .open-card { max-width: 150px; }
#overlay .player-cards .closed-chips { display: flex; gap: 2px; width: auto; }
/* Окошки не прямо под именем — номер игрока (как кружок у имени), чтобы было видно, чьи */
#overlay .player-cards.tagged::before {
    content: attr(data-num);
    position: absolute; top: -9px; left: -9px; z-index: 1;
    min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.9); color: #333; font: 700 12px/1 system-ui, sans-serif;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
#overlay .player-cards.tagged.to-left::before { left: auto; right: -9px; }

/* Колобки Мафии у костра (26.11.2026): место за столом Мафии (.player-at-table) поверх
   холста, под табличками и выносками. Положение и размер ставит director.js. */
#overlay #bunker-kolobki { position: fixed; inset: 0; pointer-events: none; }
#overlay .bunker-kolobok { position: fixed; width: 0; height: 0; transform-origin: 0 0; pointer-events: none; }
#overlay .bunker-kolobok .player-at-table,
#overlay .bunker-kolobok .player-at-table > * { pointer-events: none; }
/* Выноска речи — Мафии (showSpeechBubble кладёт её в место за столом, как в Мафии).
   Говорящий — поверх соседей, а выноска ловит клики не нужно */
#overlay .bunker-kolobok:has(.speech-bubble) { z-index: 3000 !important; }

/* ============================================
   КАРТЫ ПОД КОЛОБКОМ И ОКНО КАРТ (Света, 26.11.2026)
   Под именем — веер карт (её рисунок cards-fan.png) с числом вскрытых; клик —
   окно .modal Мафии с картами игрока («личное дело», как своя рука) и таблицей
   «Все игроки». Ведущему все карты — панелью «📋 Карты» справа снизу.
   ============================================ */
#overlay .plate .plate-cards { position: static; display: flex; justify-content: center; margin: 3px auto 0; transform: none; }
#overlay .plate.cards-left .plate-cards { flex-direction: row; }
#overlay .plate-fan { position: relative; width: 44px; height: 38px; cursor: pointer; pointer-events: auto; transition: transform .15s; }
#overlay .plate-fan img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); user-select: none; }
#overlay .plate-fan:hover { transform: scale(1.1); }
#overlay .plate-fan .fan-count {
    position: absolute; right: -4px; bottom: -2px; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box;
    border-radius: 9px; background: rgba(255, 255, 255, .92); color: #333; font: 700 11px/18px system-ui, sans-serif; text-align: center;
}
#overlay .plate-fan.fresh img { animation: bkFanPulse 1s ease-in-out 3; }
@keyframes bkFanPulse { 50% { filter: drop-shadow(0 0 8px #ffd54f) drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); transform: scale(1.12); } }

#bunker-cards-modal .modal-content { max-width: min(860px, calc(100vw - 32px)); width: auto; }
#bunker-cards-modal .bk-body { max-height: 70vh; overflow: auto; padding: 6px 2px; }
#bunker-cards-modal .bk-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 8px; }
#bunker-cards-modal .bk-cards .bh-card { margin: 0; transform: none; width: 118px; height: 160px; }
#bunker-cards-modal .bk-cards .bh-card .bh-text { font-size: 12px; }
#bunker-cards-modal .bh-card.is-secret { opacity: .75; border-style: dashed; }
#bunker-cards-modal .bh-card.is-back {
    background: repeating-linear-gradient(45deg, #3b4756 0 8px, #33404e 8px 16px);
    color: #e9e6df; border-color: #56677a;
}
#bunker-cards-modal .bh-card.is-back .bh-kind { color: #e9e6df; border-bottom-color: rgba(233, 230, 223, .4); }
#bunker-cards-modal .bh-card.is-back .bh-foot { color: #c9d2dc; }
#bunker-cards-modal .bh-back { margin-top: 26px; text-align: center; font: 700 40px/1 "Courier New", monospace; color: rgba(233, 230, 223, .6); }
#bunker-cards-modal .modal-footer { display: flex; justify-content: space-between; gap: 8px; }
#bunker-cards-modal .bk-table-wrap { overflow: auto; }
#bunker-cards-modal .bk-table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
#bunker-cards-modal .bk-table th, #bunker-cards-modal .bk-table td { padding: 6px 8px; border: 1px solid var(--ui-line, #ccd3dc); text-align: left; vertical-align: top; }
#bunker-cards-modal .bk-table thead th { font-size: 12px; white-space: nowrap; background: var(--ui-card-2, #eef1f4); }
#bunker-cards-modal .bk-table tbody th { white-space: nowrap; cursor: pointer; }
#bunker-cards-modal .bk-table tbody th:hover { text-decoration: underline; }
#bunker-cards-modal .bk-table td.is-closed { color: #9aa4b0; text-align: center; }
#bunker-cards-modal .bk-table td.is-secret { color: #8a94a0; font-style: italic; }
#bunker-cards-modal .bk-table tr.is-out { opacity: .55; }

/* Панель «📋 Карты» ведущего — справа снизу, над кнопкой жестов */
body.bunker-scene #god-roles-panel { top: auto; bottom: 84px; right: 16px; max-height: 46vh; }

/* ============================================
   ПОЛОСКА КАТАСТРОФЫ, ТАБЛИЧКА КАРТ, КОЛОНКА «ДОССЬЕ» (Света, 26.11.2026, макет Д)
   ============================================ */
/* Узкая полоска наверху между чатом и кнопками (left и max-width ставит bunker.js) */
#bunker-statusbar {
    position: fixed; top: 14px; z-index: 1002;
    display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none;
    font: 13.5px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; color: #e9edf2;
}
body.bunker-presenting #bunker-statusbar { display: none; }
#bunker-statusbar .bs-line, #bunker-statusbar .bs-block { pointer-events: auto; }
#bunker-statusbar .bs-line {
    max-width: 100%; box-sizing: border-box;
    padding: 7px 14px; border-radius: 12px; cursor: pointer;
    background: rgba(20, 26, 34, .84); border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}
#bunker-statusbar .bs-l1, #bunker-statusbar .bs-l2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bunker-statusbar .bs-l1 { font-size: 15px; display: flex; justify-content: space-between; gap: 10px; }
#bunker-statusbar .bs-l2 { font-size: 13px; color: #cfd6de; margin-top: 2px; }
#bunker-statusbar .bs-line:hover { background: rgba(28, 36, 46, .92); }
#bunker-statusbar .bs-line b { color: #fff; }
#bunker-statusbar i { font-style: normal; opacity: .45; margin: 0 7px; }
#bunker-statusbar .bs-seats { color: #ff8a72; font-weight: 700; }
#bunker-statusbar .bs-arrow { opacity: .7; margin-left: 9px; }
#bunker-statusbar .bs-state { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; border: 1px solid; vertical-align: 1px; }
#bunker-statusbar .bs-state--good { color: #8fd18f; border-color: #6fbf73; background: rgba(76, 175, 80, .16); }
#bunker-statusbar .bs-state--medium { color: #ffd36b; border-color: #e0b25a; background: rgba(255, 193, 7, .14); }
#bunker-statusbar .bs-state--bad { color: #ff8a80; border-color: #e57373; background: rgba(244, 67, 54, .16); }
/* Раскрыто — два блока друг под другом: катастрофа, ниже бункер */
#bunker-statusbar .bs-block {
    width: min(560px, var(--bs-free, 560px)); box-sizing: border-box; max-height: 34vh; overflow-y: auto;
    padding: 10px 14px 11px; border-radius: 12px;
    background: rgba(20, 26, 34, .9); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
    color: #cfd6de; font-size: 13px;
}
#bunker-statusbar .bs-title { color: #fff; font-weight: 700; font-size: 14.5px; margin-bottom: 4px; }
#bunker-statusbar .bs-block p { margin: 0 0 6px; }
#bunker-statusbar .bs-supplies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; margin: 6px 0 2px; }
#bunker-statusbar .bs-supplies span { color: #e9edf2; }
#bunker-statusbar .bs-supplies span i { display: block; margin: 0; opacity: .6; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
#bunker-statusbar .bs-feat { margin: 6px 0 0; padding-left: 18px; }

/* Табличка карт над игроком (по нажатию) */
#bunker-card-pop {
    position: fixed; z-index: 1003; width: 260px; box-sizing: border-box; pointer-events: auto;
    background: rgba(250, 246, 236, .98); color: #1f1b16; border: 1px solid #b9ab88; border-radius: 10px;
    padding: 9px 11px 8px; box-shadow: 0 8px 22px rgba(0, 0, 0, .5);
    font: 13px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
}
#bunker-card-pop .bp-h { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
#bunker-card-pop .bp-h small { font-weight: 500; color: #8a8170; }
#bunker-card-pop .bp-r { display: flex; gap: 8px; padding: 4px 0; border-top: 1px dashed rgba(0, 0, 0, .15); }
#bunker-card-pop .bp-k { flex: 0 0 96px; color: #6d6150; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
#bunker-card-pop .bp-t { flex: 1; min-width: 0; }
#bunker-card-pop .bp-r.is-secret .bp-t { opacity: .55; font-style: italic; }
#bunker-card-pop .bp-cl, #bunker-card-pop .bp-none { color: #8a8170; font-size: 12px; padding-top: 5px; border-top: 1px dashed rgba(0, 0, 0, .15); }

/* Колонка «Досье» справа: кончается выше кнопки жестов (Света, 26.11.2026) */
#bunker-dossier-col {
    position: fixed; right: 12px; top: 112px; bottom: 90px; z-index: 1001; pointer-events: auto;
    width: 320px; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden;
    background: rgba(244, 246, 248, .97); color: #1f2630; border: 2px solid #ccd3dc; border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .45); font: 13px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
}
body.bunker-godbar #bunker-dossier-col { top: 118px; }
body.bunker-dossier-mini #bunker-dossier-col { width: 46px; }
body.bunker-presenting #bunker-dossier-col { display: none; }
#bunker-dossier-col .bk-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 8px 12px; font-weight: 700; font-size: 14px; background: #e3e8ee; border-bottom: 1px solid #ccd3dc; }
#bunker-dossier-col .bk-toggle { background: none; border: none; cursor: pointer; font-size: 16px; color: #4f6d8f; padding: 2px 6px; border-radius: 6px; }
#bunker-dossier-col .bk-toggle:hover { background: rgba(79, 109, 143, .15); }
body.bunker-dossier-mini #bunker-dossier-col .bk-toggle { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 12px; font-size: 18px; }
#bunker-dossier-col .bk-list { overflow-y: auto; padding: 4px 8px 8px; }
#bunker-dossier-col .bk-row { padding: 7px 5px; border-bottom: 1px solid #dde2e8; cursor: pointer; border-radius: 8px; }
#bunker-dossier-col .bk-row:hover { background: rgba(79, 109, 143, .08); }
#bunker-dossier-col .bk-row.is-hl { background: #fff3c9; }
#bunker-dossier-col .bk-row.is-out { opacity: .55; }
#bunker-dossier-col .bk-name { font-weight: 800; margin-bottom: 4px; }
#bunker-dossier-col .bk-row.is-me .bk-name { color: #4f6d8f; }
#bunker-dossier-col .bk-name small { font-weight: 500; color: #8a94a0; }
#bunker-dossier-col .bk-chips { display: flex; flex-wrap: wrap; gap: 3px; }
#bunker-dossier-col .bk-chip { font-size: 12px; line-height: 16px; padding: 2px 7px 2px 6px; border-radius: 7px; background: #fff; border: 1px solid #d5dbe2; border-left: 4px solid var(--c); }
#bunker-dossier-col .bk-chip.is-prof { font-weight: 800; }
#bunker-dossier-col .bk-chip.is-secret { opacity: .5; font-style: italic; border-style: dashed; border-left-style: solid; }
#bunker-dossier-col .bk-none { color: #9aa4b0; font-size: 12px; }
/* Жесты ведущего и зрителей — левее колонки, а не под ней */
body.bunker-dossier-open #offtable-gesture-layer { right: 352px; }
body.bunker-dossier-mini #offtable-gesture-layer { right: 78px; }
/* Старая карточка катастрофы больше не рисуется */
#bunker-status { display: none !important; }

/* ============================================
   ТЁМНАЯ ТЕМА БУНКЕРА (Света, 26.11.2026: «сделай настоящую тёмную тему»)
   Кнопка 🌙 и класс html.dark-theme — Мафии (toggleTheme в script.js). Бункер
   подменяет свои токены --ui-* (lobby.css) на тёмные, а токены тёмной темы
   Мафии --dk-* — на свою серо-синюю гамму: общие с Мафией окна в тёмной теме
   тоже бункерные, а не коричневые. Сцена у костра темой не меняется.
   ============================================ */
html.site-bunker.dark-theme {
    --ui-ink: #e3e8ee;
    --ui-ink-rgb: 0 0 0;            /* в тенях: тень остаётся тёмной */
    --ui-ink-2: #aab4c0;
    --ui-ink-3: #7f8a98;
    --ui-card: #1e2630;
    --ui-card-rgb: 30 38 48;
    --ui-card-2: #27313d;
    --ui-line: #3a4654;
    --ui-mist: #dfe5ec;
    --ui-red-lt: #4a2724;
    --dk-surface: #1e2630;
    --dk-surface-2: #27313d;
    --dk-surface-3: #313c49;
    --dk-border: #3a4654;
    --dk-text: #e3e8ee;
    --dk-text-2: #b6c0cc;
    --dk-muted: #8a95a3;
    --dk-accent-text: #8fb0d4;
}
/* Светлый текст на тёмных кнопках и плашках: в lobby.css он задан токеном светлой
   подложки (--ui-card), который в тёмной теме сам стал тёмным */
html.site-bunker.dark-theme :is(.support-author-btn, .lobby-player-summary__count, .help-popup-box b,
    .help-popup-close:hover, .about-tab.active, .lobby-ico-btn, .bcm-ico-blue, .bcm .bcm-conn-load,
    #profile-modal .pfm-rank-help, .bcm .bcm-seg input:checked + .gender-label) { color: #f4f6f8; }
html.site-bunker.dark-theme .gender-option input[type="radio"]:checked + .gender-label { color: #e8ecf0; }
html.site-bunker.dark-theme .profile-banner-caption { color: rgb(244 246 248 / 0.85); }
html.site-bunker.dark-theme .profile-banner-caption:empty::before { color: rgb(244 246 248 / 0.4); }

/* Свои панели партии */
html.site-bunker.dark-theme #bunker-dossier-col { background: rgba(30, 38, 48, .97); color: #e3e8ee; border-color: #3a4654; }
html.site-bunker.dark-theme #bunker-dossier-col .bk-head { background: #27313d; border-bottom-color: #3a4654; }
html.site-bunker.dark-theme #bunker-dossier-col .bk-toggle { color: #8fb0d4; }
html.site-bunker.dark-theme #bunker-dossier-col .bk-row { border-bottom-color: #2f3a47; }
html.site-bunker.dark-theme #bunker-dossier-col .bk-row:hover { background: rgba(143, 176, 212, .08); }
html.site-bunker.dark-theme #bunker-dossier-col .bk-row.is-hl { background: rgba(255, 214, 102, .16); }
html.site-bunker.dark-theme #bunker-dossier-col .bk-row.is-me .bk-name { color: #8fb0d4; }
html.site-bunker.dark-theme #bunker-dossier-col .bk-name small,
html.site-bunker.dark-theme #bunker-dossier-col .bk-none { color: #7f8a98; }
html.site-bunker.dark-theme #bunker-dossier-col .bk-chip { background: #27313d; border-color: #3a4654; color: #e3e8ee; }
html.site-bunker.dark-theme #bunker-card-pop { background: rgba(30, 38, 48, .98); color: #e3e8ee; border-color: #3a4654; }
html.site-bunker.dark-theme #bunker-card-pop .bp-k { color: #8a95a3; }
html.site-bunker.dark-theme #bunker-card-pop :is(.bp-r, .bp-cl, .bp-none) { border-top-color: rgba(255, 255, 255, .12); }
html.site-bunker.dark-theme #bunker-card-pop :is(.bp-h small, .bp-cl, .bp-none) { color: #8a95a3; }
/* Рамки панелей меню в lobby.css — цветом текста (--ui-ink); в тёмной теме текст светлый,
   а рамка должна остаться тёмной */
html.site-bunker.dark-theme :is(#online-counter, .side-card, #name-panel) { border-color: #3a4654; }
