/* Цвета стола — токены темы (тёмная: кожа, светлая: пергамент). Жёстких цветов в правилах ниже нет — только var(--vt-*) и токены сайта */
:root, [data-theme="dark"] { --vt-bg: #1e1510; --vt-field: #140e0a; --vt-card: #241912; --vt-card2: #2a1d14; --vt-sel: #3a2a1d; --vt-line: #5a4330; --vt-line2: #8a6a3e; --vt-line3: #4a3626;
  --vt-gold: #d8ae62; --vt-hi: #ffd27a; --vt-hi2: #f0c98a; --vt-ink: #e8d6b4; --vt-ink-hi: #f3e2bd; --vt-on-gold: #1c140e; --vt-good: #9fd28a; --vt-label: #c9b089; --vt-glass: rgba(28,20,14,.95);
  --vt-bad: #ff9d7a; --vt-bad-line: #6e2a1c; --vt-good-line: #3e6a32; --vt-warn: #f0b35a; --vt-info: #9fc3e8; --vt-hp: #5fb36b; --vt-track: rgba(255,255,255,.1);
  --vt-desk: #0d0a08; --vt-bar: linear-gradient(#2a1d15, #221811); --vt-shade: rgba(0,0,0,.22); --vt-spell: linear-gradient(#33253a, #241a24); --vt-night: linear-gradient(#25304a, #1b2233); }
[data-theme="light"] { --vt-bg: #efe4cc; --vt-field: #fbf6e8; --vt-card: #f6eedb; --vt-card2: #ebdfc2; --vt-sel: #e2cd9e; --vt-line: #c9b086; --vt-line2: #a07c48; --vt-line3: #d9c7a0;
  --vt-gold: #8a5a18; --vt-hi: #6a3c06; --vt-hi2: #7a4b10; --vt-ink: #3a2a1a; --vt-ink-hi: #1a1109; --vt-on-gold: #fbf4e4; --vt-good: #2f6b2a; --vt-label: #7a5a30; --vt-glass: rgba(248,241,224,.97);
  --vt-bad: #9a3020; --vt-bad-line: #b5523a; --vt-good-line: #4f8a45; --vt-warn: #8a5a10; --vt-info: #2a5282; --vt-hp: #3f8f4a; --vt-track: rgba(90,60,20,.16);
  --vt-desk: #3b3530; --vt-bar: linear-gradient(#f4ead3, #eadcbd); --vt-shade: rgba(90,60,20,.08); --vt-spell: linear-gradient(#efe2f3, #e3d3ea); --vt-night: linear-gradient(#dfe6f2, #ccd7ea); }
/* Игровой стол (VTT): лобби, стол, редактор карт, телефон. Токены темы — из styles.css (тёмная и светлая схемы). */
body.vtt-on .footer { display: none; }
body.vtt-on #view { max-width: none; padding: 0; margin: 0; }
.vtt-lobby { max-width: 1180px; margin: 0 auto; padding: 18px 16px 40px; }
.vtt-sub { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--line2); border-radius: var(--radius-lg); background: var(--panel); margin: 12px 0; }
.vtt-sub.ok { border-left-color: var(--good); } .vtt-sub.bad { border-left-color: var(--bad); }
.vtt-sub b { color: var(--ink-strong); } .vtt-sub span { flex: 1; min-width: 220px; color: var(--ink-dim); font-size: .9rem; }
.vtt-qbar { display: block; height: 6px; border-radius: 99px; background: var(--panel2); overflow: hidden; margin-top: 4px; max-width: 260px; }
.vtt-qbar i { display: block; height: 100%; background: var(--accent); } .vtt-qbar.big { max-width: none; height: 10px; margin: 10px 0; }
.vtt-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
@media (max-width: 860px) { .vtt-cols { grid-template-columns: 1fr; } }
.vtt-camp { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.vtt-camp:first-of-type { border-top: 0; } .vtt-camp.live b::after { content: ' ●'; color: var(--good); font-size: .8em; }
.vc-main { display: flex; flex-direction: column; min-width: 0; } .vc-main span { font-size: .82rem; } .vc-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.vtt-slots { margin-top: 14px; font-size: .9rem; }
.vtt-gate { max-width: 560px; margin: 40px auto; text-align: center; }
.vtt-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.vtt-tier { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel2); }
.vtt-tier.best { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.vt-name { text-transform: uppercase; letter-spacing: .08em; font-size: .84rem; color: var(--ink-dim); } .vt-price { font-size: 1.8rem; font-weight: 800; color: var(--ink-strong); } .vt-price span { font-size: .9rem; font-weight: 400; color: var(--ink-dim); }
.vt-q { color: var(--accent); font-weight: 700; } .vtt-tier ul { margin: 4px 0 8px; padding-left: 18px; font-size: .86rem; } .vtt-tier .btn { margin-top: auto; } .vt-foot { text-align: center; font-size: .86rem; }
.vtt-tierrow { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Стол ---------- */
.vtt { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h, 56px)); height: calc(100dvh - var(--topbar-h, 56px)); min-height: 480px; background: var(--vt-desk); color: var(--ink); }
.vtt-bar { display: flex; align-items: center; gap: 8px 12px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: .88rem; }
.vb-back { color: var(--ink-dim); text-decoration: none; } .vb-name { color: var(--ink-strong); }
.vb-status { padding: 2px 10px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); font-size: .86rem; white-space: nowrap; }
.vb-status.combat { color: var(--vt-bad); border-color: #8e3526; } .vb-status.live { color: var(--good); border-color: var(--good-line); } .vb-status.off { color: var(--bad); }
.vb-scenes { display: flex; gap: 4px; flex: 1; overflow-x: auto; min-width: 120px; }
.vb-scene { white-space: nowrap; padding: 3px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel2); color: var(--ink); cursor: pointer; font-size: .82rem; }
.vb-scene.cur { border-color: var(--accent); color: var(--accent); } .vb-scene.act::before { content: '● '; color: var(--good); } .vb-scene i { font-style: normal; background: var(--accent); color: var(--bg2); border-radius: 99px; padding: 0 6px; margin-left: 4px; font-size: .78rem; } .vb-scene.add { border-style: dashed; }
.vb-net { color: var(--ink-dim); font-size: .84rem; white-space: nowrap; } .vb-net .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-right: 5px; } .vb-net .dot.on { background: var(--good); }
.vb-party { display: flex; gap: 3px; } .vb-av { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--panel3); border: 1px solid var(--line2); font-size: .78rem; font-weight: 700; } .vb-av.gm { border-color: var(--accent); color: var(--accent); }
.vtt-main { flex: 1; display: grid; grid-template-columns: 46px 1fr 340px; min-height: 0; }
.vtt-tools { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 6px 0; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; position: relative; }
.vt-tool { width: 38px; height: 38px; border-radius: var(--radius-md); border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; font-size: 1.05rem; }
.vt-tool:hover { background: var(--panel2); } .vt-tool.on { background: var(--accent); color: var(--bg2); }
.vt-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.vt-opts { position: absolute; left: 50px; top: 6px; z-index: 5; display: flex; flex-direction: column; gap: 6px; padding: 8px; width: 210px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 6px 18px rgba(0,0,0,.4); font-size: .82rem; }
.vt-opts.ed-hint { color: var(--ink-dim); top: auto; bottom: 6px; position: absolute; }
.vtt-board { position: relative; overflow: hidden; touch-action: none; }
.vtt-board-gl, .vtt-board-gl canvas { position: absolute; inset: 0; }
.vtt-overlay { position: absolute; inset: 0; pointer-events: none; }
.vtt-info { position: absolute; left: 10px; top: 8px; padding: 4px 10px; border-radius: var(--radius-md); background: var(--vt-glass); color: #e8dcc0; font-size: .84rem; z-index: 3; }
.vtt-turn { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: var(--radius-lg); background: rgba(20,15,10,.9); border: 1px solid var(--accent); color: var(--vt-ink-hi); z-index: 3; font-size: .88rem; white-space: nowrap; }
.vtt-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8,6,5,.72); z-index: 6; text-align: center; color: var(--vt-ink-hi); padding: 20px; }
.vtt-wait:not(.hub) div { max-width: 380px; } .vtt-wait:not(.hub) b { font-size: 1.3rem; }
.vtt-offline { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 18px 22px; background: rgba(20,10,8,.95); border: 1px solid var(--bad); border-radius: var(--radius-lg); color: #f6d5cb; z-index: 9; text-align: center; max-width: 360px; }
.vtt-hotbar { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 4px; align-items: center; padding: 5px; border-radius: var(--radius-lg); background: var(--vt-glass); border: 1px solid var(--line); z-index: 4; }
.vh-who { color: var(--vt-ink-hi); font-size: .86rem; padding: 0 6px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-slot { position: relative; width: 54px; height: 54px; border-radius: var(--radius-md); border: 1px solid var(--line2); background: var(--panel2); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px; }
.vh-slot i { position: absolute; left: 3px; top: 1px; font-style: normal; font-size: .72rem; color: var(--ink-dim); } .vh-slot.empty { opacity: .45; } .vh-slot.spent { opacity: .5; filter: grayscale(1); }
.vh-slot:hover:not(.empty) { border-color: var(--accent); } .vh-ic { font-size: 1.05rem; } .vh-nm { font-size: .7rem; line-height: 1.05; text-align: center; overflow: hidden; max-height: 2.2em; }
.vtt-hud { position: absolute; right: 10px; bottom: 80px; width: 270px; padding: 10px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--line); z-index: 5; box-shadow: 0 6px 18px rgba(0,0,0,.4); font-size: .86rem; }
.vh-top { display: flex; gap: 8px; align-items: baseline; } .vh-top b { color: var(--ink-strong); } .vh-top .x { margin-left: auto; background: none; border: 0; color: var(--ink-dim); cursor: pointer; }
.vh-hp { display: flex; align-items: center; gap: 8px; margin: 6px 0; } .vh-hp .hp-bar { flex: 1; }
.vh-stats { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 4px 0 8px; } .vh-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.vtt-pending { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: 92%; padding: 8px 12px; border-radius: var(--radius-lg); background: rgba(40,18,10,.95); border: 1px solid #ff6b3d; color: #ffe0cf; z-index: 6; font-size: .86rem; }
.vtt-pending select { width: auto; } .vp-n { color: #ffb08a; font-weight: 700; }
.vtt-oa-box { position: absolute; right: 12px; top: 64px; display: flex; flex-direction: column; gap: 8px; z-index: 8; max-width: min(340px, 92vw); }
.vt-oa { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 10px 12px; border-radius: var(--radius-lg); background: rgba(48,16,12,.96); border: 1px solid #e0563b; color: #ffe0cf; font-size: .86rem; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.vt-oa b { width: 100%; color: var(--vt-bad); }
.vt-oa span { width: 100%; }
.vc-smite { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.vc-smite select { width: auto; min-height: 30px; padding: 3px 26px 3px 8px; }
.vc-extra { color: #ffcf7a; font-size: .86rem; }
.vtt-side { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid var(--line); }
.vtt-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); }
.vtt-tabs button { flex: 1; padding: 6px 4px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-dim); cursor: pointer; font-size: .84rem; white-space: nowrap; }
.vtt-tabs button.on { background: var(--panel2); color: var(--accent); font-weight: 700; }
.vtt-panel { flex: 1 1 55%; overflow-y: auto; padding: 8px 10px; min-height: 120px; font-size: .86rem; }
.vtt-chat { flex: 1 1 45%; display: flex; flex-direction: column; min-height: 180px; border-top: 1px solid var(--line); }
.vtt.chat-tab .vtt-panel { flex: 0 0 0; padding: 0; min-height: 0; } .vtt.chat-tab .vtt-chat { flex: 1; }
.vp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 4px 0 8px; } .vp-head b { color: var(--ink-strong); }
.vp-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; } .vp-row input[type=search] { flex: 1; min-width: 120px; }
.vp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vp-drop { display: flex; flex-direction: column; } .vp-drop button { text-align: left; padding: 5px 8px; border: 0; border-bottom: 1px solid var(--line); background: var(--panel2); color: var(--ink); cursor: pointer; font-size: .82rem; }
.vp-init td { padding: 4px; vertical-align: middle; } .vp-init tr.cur td { background: color-mix(in srgb, var(--accent) 12%, transparent); } .vp-init tr.dead { opacity: .5; text-decoration: line-through; }
.vp-init .tr-num { width: 44px; } .vp-hint { font-size: .82rem; }
.vp-ref summary { cursor: pointer; padding: 6px 0; font-weight: 600; } .vp-ref { border-bottom: 1px solid var(--line); }
.vp-scene { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-md); margin-bottom: 6px; background: var(--panel2); }
.vp-scene.cur { border-color: var(--accent); } .vps-main { display: flex; flex-direction: column; min-width: 0; } .vps-main span { font-size: .82rem; } .vps-act { display: flex; gap: 4px; }
.vp-menu { display: flex; flex-direction: column; gap: 4px; } .vp-menu button { text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel2); color: var(--ink); cursor: pointer; }
.vp-new { display: grid; gap: 8px; } .vp-big { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel2); color: var(--ink); cursor: pointer; } .vp-big:hover { border-color: var(--accent); } .vp-big span { color: var(--ink-dim); font-size: .84rem; }
.vp-comp .vp-cg { display: flex; flex-direction: column; margin-bottom: 8px; } .vp-cg button { text-align: left; padding: 4px 6px; border: 0; background: transparent; color: var(--ink); cursor: pointer; border-radius: var(--radius-sm); } .vp-cg button:hover { background: var(--panel2); }
.vp-track { display: flex; justify-content: space-between; align-items: center; padding: 5px 6px; border-bottom: 1px solid var(--line); } .vp-track.on { color: var(--accent); }
.vp-chk { display: flex; align-items: center; gap: 6px; font-size: .84rem; } .vp-conds { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 8px; }
.vp-sheet { font-size: .86rem; } .vp-sheet .sheet-layout { display: block; } .vp-sheet .char-rail { display: none; }
.vp-upload { display: flex; flex-direction: column; gap: 4px; }
/* Чат */
.vc-head { display: flex; justify-content: space-between; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: .82rem; }
.vc-log { flex: 1; overflow-y: auto; padding: 6px 10px; font-size: .84rem; display: flex; flex-direction: column; gap: 6px; }
.vc-msg time { float: right; color: var(--ink-dim); font-size: .76rem; margin-left: 6px; } .vc-msg.whisper { color: #c8a2ff; } .vc-msg.priv { opacity: .85; border-left: 3px solid var(--line2); padding-left: 6px; }
.vc-tag { display: inline-block; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; padding: 0 6px; border-radius: 99px; background: var(--panel3); color: var(--ink-dim); margin-right: 4px; }
.vc-sys { color: var(--ink-dim); font-style: italic; } .vc-total { font-size: 1.05rem; color: var(--ink-strong); } .vc-total.crit { color: var(--good); } .vc-total.fail { color: var(--bad); }
.vc-card { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel2); padding: 6px 8px; margin-top: 3px; }
.vc-msg.undone .vc-card { opacity: .45; text-decoration: line-through; }
.vc-title { font-weight: 600; color: var(--ink-strong); } .vc-line { margin-top: 2px; } .vc-note { color: var(--vt-info); } .vc-actname { font-size: .8rem; color: var(--ink-dim); }
.vr { display: inline-block; padding: 0 8px; border-radius: 4px; font-size: .8rem; font-weight: 800; letter-spacing: .05em; }
.vr.hit { background: #2f5d2a; color: #d6f5c8; } .vr.crit { background: #8a6a12; color: #fff1c0; } .vr.miss { background: #5a2a22; color: #f6d5cb; } .vr.ok { background: #2a4a5d; color: #cfe8ff; }
.vc-tools { display: flex; gap: 4px; margin-top: 4px; } .vc-tools button { border: 1px solid var(--line); background: var(--panel); color: var(--ink-dim); border-radius: var(--radius-sm); font-size: .78rem; cursor: pointer; padding: 1px 6px; }
.vc-dice { display: flex; flex-wrap: wrap; gap: 3px; padding: 6px 10px; border-top: 1px solid var(--line); }
.vc-dice button { position: relative; padding: 3px 7px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel2); color: var(--ink); font-size: .82rem; cursor: pointer; } .vc-dice button.on { border-color: var(--accent); color: var(--accent); } .vc-dice i { font-style: normal; font-size: .72rem; margin-left: 2px; }
.vc-dice .vc-roll { margin-left: auto; background: var(--accent); color: var(--bg2); font-weight: 700; }
.vc-form { display: flex; gap: 4px; padding: 6px 10px 8px; align-items: center; } .vc-form input { flex: 1; min-width: 0; } .vc-form select { width: 90px; } .vc-priv { font-size: .78rem; white-space: nowrap; }
/* Редактор */
.vtt.editing .vtt-hotbar, .vtt.editing .vtt-turn, .vtt.editing .vtt-chat { display: none; }
.vtt.editing .vtt-panel { flex: 1; }
.ed-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; pointer-events: auto; }
.vtt.editing .vtt-info { right: 10px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.ed-groups { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; } .ed-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-height: 210px; overflow-y: auto; }
.ed-presets button, .ed-zones button { text-align: left; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel2); color: var(--ink); cursor: pointer; font-size: .82rem; }
.ed-presets button.on, .ed-zones button.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.ed-vars { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .ed-var { display: flex; flex-direction: column; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel2); color: var(--ink-dim); cursor: pointer; font-size: .78rem; } .ed-var canvas { width: 100%; height: auto; border-radius: 4px; } .ed-var:hover { border-color: var(--accent); }
.ed-zones { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; } .ed-zone { border-top: 1px solid var(--line); padding-top: 6px; }
.ed-assets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-height: 360px; overflow-y: auto; margin: 6px 0; }
.ed-assets button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #d6aa80; color: #2a1d14; cursor: pointer; font-size: .72rem; } .ed-assets button.on { outline: 3px solid var(--accent); } .ed-assets img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.ed-tpls { display: flex; flex-wrap: wrap; gap: 4px; } .ed-tpls span { display: inline-flex; } .ed-tpls button { border: 1px solid var(--line); background: var(--panel2); color: var(--ink); padding: 2px 6px; font-size: .84rem; cursor: pointer; } .ed-tpls .x { color: var(--ink-dim); }
.ed-seg { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; } .ed-seg button { flex: 1; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel2); color: var(--ink); cursor: pointer; } .ed-seg button.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.ed-lights div { display: flex; align-items: center; gap: 6px; padding: 3px 0; border-bottom: 1px solid var(--line); font-size: .86rem; } .ed-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
/* Скрыть интерфейс */
.vtt.hide-ui .vtt-side, .vtt.hide-ui .vtt-hotbar, .vtt.hide-ui .vtt-info, .vtt.hide-ui .vtt-bar { display: none; } /* Телефон игрока: карта на весь экран, снизу — Карта / Лист / Кости / Чат */
.vtt.phone .vtt-main { grid-template-columns: 1fr; position: relative; }
.vtt.phone .vtt-tools { position: absolute; left: 6px; top: 46px; z-index: 5; background: rgba(39,29,22,.9); border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 6px 4px; }
.vtt.phone .vt-opts { left: 48px; }
.vtt.phone .vtt-side { position: absolute; inset: 0; z-index: 7; display: none; }
.vtt.phone[data-ph="sheet"] .vtt-side, .vtt.phone[data-ph="chat"] .vtt-side, .vtt.phone[data-ph="dice"] .vtt-side { display: flex; }
.vtt.phone[data-ph="chat"] .vtt-panel, .vtt.phone[data-ph="dice"] .vtt-panel { display: none; } .vtt.phone[data-ph="sheet"] .vtt-chat { display: none; }
.vtt.phone[data-ph="dice"] .vc-log { flex: 0 0 30%; } .vtt.phone[data-ph="dice"] .vc-dice button { flex: 1 0 22%; padding: 12px 4px; font-size: 1rem; }
.vtt-phone-nav { display: flex; border-top: 1px solid var(--line); background: var(--panel); } .vtt-phone-nav button { flex: 1; padding: 12px 4px; border: 0; background: transparent; color: var(--ink-dim); font-size: .9rem; } .vtt-phone-nav button.on { color: var(--accent); font-weight: 700; box-shadow: inset 0 3px 0 var(--accent); }
.vtt.phone .vtt-hotbar { bottom: 6px; max-width: 98%; overflow-x: auto; } .vtt.phone .vh-slot { width: 46px; height: 46px; } .vtt.phone .vh-who { display: none; }
.vtt.phone .vtt-hud { left: 6px; right: 6px; width: auto; bottom: 64px; } .vtt.phone .vtt-bar { font-size: .82rem; } .vtt.phone .vb-party, .vtt.phone .vb-scenes { display: none; }
.vtt.phone .vtt-info { top: auto; bottom: 64px; left: 6px; font-size: .76rem; }
@media (max-width: 1100px) and (min-width: 761px) { .vtt-main { grid-template-columns: 46px 1fr 290px; } }
.vp-init { table-layout: fixed; width: 100%; font-size: .86rem; } .vp-init th:nth-child(1), .vp-init td:nth-child(1) { width: 52px; } .vp-init th:nth-child(3), .vp-init td:nth-child(3) { width: 84px; } .vp-init th:nth-child(4), .vp-init td:nth-child(4) { width: 34px; } .vp-init th:nth-child(5), .vp-init td:nth-child(5) { width: 30px; }
.vp-init td:nth-child(2) { overflow-wrap: anywhere; } .vp-init .tag { font-size: .72rem; } .vp-init td:nth-child(3) .tr-num { width: 40px; }
.vtt-panel { overflow-x: hidden; }
/* Генератор v2: сочетания, постройки */
.ed-combos { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.ed-combos .chip { font-size: .84rem; }
.ed-sites { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; margin-bottom: 6px; }
.ed-site { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 3px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .86rem; }
.ed-site.on { border-color: var(--accent); background: rgba(216,174,98,.08); }
.ed-site input { width: 46px; padding: 2px 4px; }
.ed-classic { margin-top: 10px; } .ed-classic summary { cursor: pointer; color: var(--ink-dim); font-size: .85rem; }
/* Трекер боя на поле — только во время боя */
.vtt-combat { position: absolute; left: 10px; top: 46px; width: 340px; max-height: calc(100% - 150px); overflow-y: auto; z-index: 4; padding: 8px 10px; border-radius: var(--radius-lg); background: var(--vt-glass); border: 1px solid var(--accent-dim); box-shadow: 0 8px 22px rgba(0,0,0,.45); font-size: .84rem; color: var(--ink); }
.vtt-combat.folded { width: auto; }
.vtt.editing .vtt-combat, .vtt.hide-ui .vtt-combat { display: none; }
.vc-tr-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.vc-tr-head b { flex: 1 1 auto; color: var(--ink-head); }
.vc-tr-fold { background: none; border: 0; color: var(--ink-dim); cursor: pointer; font-size: 1rem; padding: 0 4px; }
.vc-tr-list { display: flex; flex-direction: column; gap: 3px; }
.vc-tr-row { display: grid; grid-template-columns: 38px 1fr auto auto auto; gap: 6px; align-items: center; padding: 4px 6px; border-radius: var(--radius-sm); background: rgba(255,255,255,.03); border: 1px solid transparent; }
.vc-tr-row.cur { border-color: var(--accent); background: rgba(216,174,98,.12); }
.vc-tr-row.mine .vc-tr-name a { color: var(--accent); }
.vc-tr-row.dead { opacity: .5; text-decoration: line-through; }
.vc-tr-name { min-width: 0; overflow-wrap: anywhere; }
.vc-tr-name a { cursor: pointer; font-weight: 600; }
.vc-tr-init input, .vc-tr-hp input { width: 40px; padding: 2px 4px; text-align: center; }
.vc-tr-hp, .vc-tr-ac { white-space: nowrap; font-size: .86rem; }
.vc-tr-kit { margin: 2px 0 6px 40px; }
.vc-tr-add { display: flex; gap: 6px; margin-top: 8px; } .vc-tr-add input[type=search] { flex: 1; min-width: 0; }
.vc-tr-out { margin-top: 6px; } .vc-tr-out summary { cursor: pointer; color: var(--ink-dim); font-size: .86rem; }
.vc-tr-out .vc-tr-row { grid-template-columns: 1fr auto; }
.vtt-combat .enc-bar { font-size: .84rem; margin: 4px 0 6px; }
.vtt-combat .kit-act { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin: 3px 0; }
.vtt-combat .kit-btn.main { font-weight: 600; }
.vtt.phone .vtt-combat { left: 6px; right: 6px; width: auto; top: 44px; max-height: 40%; }

.vh-hpv, .vh-ac { white-space: nowrap; } .vh-ac { padding: 1px 7px; border: 1px solid var(--line2); border-radius: var(--radius-sm); font-weight: 700; }

/* Боковая панель: ширина и высота чата — перетаскиванием */
.vtt-main { grid-template-columns: 46px 1fr var(--side-w, 340px); }
.vtt.hide-ui .vtt-main { grid-template-columns: 46px 1fr; }
.vtt-side { position: relative; }
.vtt-rz { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 6; }
.vtt-rz:hover, .vtt-rz.on { background: linear-gradient(90deg, transparent 3px, var(--accent) 3px, var(--accent) 5px, transparent 5px); }
.vtt-rzh { flex: none; height: 8px; margin: -4px 0; cursor: row-resize; position: relative; z-index: 3; }
.vtt-rzh::after { content: ''; position: absolute; left: 40%; right: 40%; top: 3px; height: 2px; border-radius: 2px; background: var(--line2); }
.vtt-rzh:hover::after, .vtt-rzh.on::after { background: var(--accent); left: 0; right: 0; }
.vtt.editing .vtt-rzh, .vtt.chat-tab .vtt-rzh { display: none; }
/* Вкладки — кнопки */
.vtt-tabs { gap: 4px; padding: 6px; }
.vtt-tabs button { flex: 1 1 auto; padding: 6px 8px; border: 1px solid var(--line2); background: var(--bg2); color: var(--ink); font-weight: 600; }
.vtt-tabs button:hover { border-color: var(--accent-dim); color: var(--ink-strong); }
.vtt-tabs button.on { border-color: var(--accent); background: rgba(216,174,98,.14); color: var(--accent); }
/* Блок настроек инструмента — над полем */
.vtt-toolopts { position: absolute; left: 50%; top: 46px; transform: translateX(-50%); z-index: 5; max-width: min(720px, calc(100% - 20px)); padding: 8px 10px; border-radius: var(--radius-lg); background: var(--vt-glass); border: 1px solid var(--accent-dim); box-shadow: 0 6px 18px rgba(0,0,0,.45); font-size: .82rem; display: flex; flex-direction: column; gap: 6px; }
.vtt.editing .vtt-toolopts.ed { display: flex; }
.to-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; } .to-head b { color: var(--ink-head); }
.to-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.to-l { min-width: 64px; color: var(--ink-dim); }
.to-seg { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.to-seg button, .to-tg { padding: 4px 9px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--bg2); color: var(--ink); cursor: pointer; font-size: .86rem; white-space: nowrap; }
.to-seg button:hover, .to-tg:hover { border-color: var(--accent-dim); }
.to-seg button.on, .to-tg.on { border-color: var(--accent); background: rgba(216,174,98,.18); color: var(--accent); font-weight: 700; }
.to-seg .to-col { width: 22px; height: 22px; padding: 0; border-radius: 50%; }
.to-seg .to-col.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.to-seg input[type=color] { width: 30px; height: 24px; padding: 0; border: 0; background: none; }
.vt-opts { display: none; }
.vtt.phone .vtt-toolopts { top: 40px; left: 52px; right: 6px; transform: none; max-width: none; }
.vtt.editing .vtt-toolopts { top: auto; bottom: 12px; left: 12px; transform: none; max-width: min(560px, calc(100% - 24px)); }

/* Лист в боковой панели стола: раскладка по ширине самой панели (container queries), а не окна */
.vp-sheet { container-type: inline-size; container-name: vpsheet; }
.vp-sheet .sheet-bar { display: none; }
@container vpsheet (max-width: 760px) {
  .lss-top { grid-template-columns: 1fr; padding: 10px; gap: 10px; }
  .lss-id { align-items: flex-start; }
  .lss-idtext { flex-wrap: wrap; }
  .lss-sub { flex-wrap: wrap; white-space: normal; }
  .lss-sub input { flex: 1 1 70px; min-width: 0; width: auto; }
  .lss-xp { gap: 6px; }
  .lss-xpbar { min-width: 0; max-width: none; flex: 1 1 120px; }
  .lss-vit { justify-content: flex-start; gap: 10px 14px; }
  .lss-cols { grid-template-columns: 1fr; }
  .lss-statline .lss-sbox { flex: 1 1 calc(33% - 8px); min-width: 0; }
  .lss-sbox.cond-box { flex: 1 1 100%; }
  .lss-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .lss-tabs button { flex: none; }
}
@container vpsheet (max-width: 420px) {
  .lss-abil-grid { grid-template-columns: 1fr; }
  .lss-ab-head .nm { font-size: 12px; }
  .lss-name input { font-size: 1.1rem; }
}

/* ===== Карта мира и локации (оверлей поверх поля) ===== */
.vtt-world, .vtt-setup { position: absolute; inset: 0; z-index: 7; background: var(--vt-desk); }
.vtt-world.hidden, .vtt-setup.hidden { display: none; }
.vtt.world-on .vtt-hotbar, .vtt.world-on .vtt-hud, .vtt.world-on .vtt-toolopts, .vtt.world-on .vtt-combat { display: none; }
.vw-view { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; }
.vw-view:active { cursor: grabbing; } .vw-view.adding { cursor: crosshair; }
.vw-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.vw-img { display: block; width: 100%; height: 100%; user-select: none; pointer-events: none; box-shadow: 0 0 0 1px rgba(216,174,98,.25), 0 20px 60px rgba(0,0,0,.6); }
.vw-blank { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px; border: 2px dashed var(--line2); color: var(--ink-dim); font-size: 28px; background: repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 20px, transparent 20px 40px); }
.vw-pins { position: absolute; inset: 0; }
.vw-pin { position: absolute; transform: translate(-50%, -100%) scale(calc(1 / var(--vwz, 1))); transform-origin: 50% 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--vt-ink-hi); }
.vw-badge { width: 40px; height: 40px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, #3a2a1c, #1d140d); border: 2px solid var(--vt-gold); box-shadow: 0 3px 10px rgba(0,0,0,.6); }
.vw-badge .vw-ico { width: 24px; height: 24px; transform: rotate(45deg); color: #f0c97a; }
.vw-name { margin-top: 4px; padding: 2px 8px; border-radius: 6px; background: rgba(18,12,8,.88); border: 1px solid rgba(216,174,98,.5); font: 600 13px/1.3 var(--font-ui); white-space: nowrap; }
.vw-name i { font-style: normal; color: #9fd68a; font-weight: 700; margin-left: 4px; }
.vw-pin:hover .vw-badge, .vw-pin.sel .vw-badge { border-color: #fff1c9; background: linear-gradient(145deg, #6b4a26, #2c1d10); }
.vw-pin.sel .vw-name { border-color: #fff1c9; }
.vw-pin.party .vw-badge { border-color: var(--vt-good); box-shadow: 0 0 0 4px rgba(143,210,122,.35), 0 3px 10px rgba(0,0,0,.6); }
.vw-pin.hid { opacity: .55; } .vw-pin.hid .vw-badge { border-style: dashed; }
.vw-top { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-radius: var(--radius-lg); background: rgba(24,17,12,.9); border: 1px solid var(--accent-dim); color: var(--ink); z-index: 2; }
.vw-top b { font-family: var(--font-display); font-size: 1.15rem; color: var(--vt-ink-hi); }
.vw-acts { display: flex; gap: 6px; flex-wrap: wrap; } .vw-hint { font-size: .85rem; }
.vw-zoom { margin-left: auto; display: flex; gap: 4px; }
.vw-zoom button { width: 30px; height: 28px; border-radius: var(--radius-sm); border: 1px solid var(--line2); background: var(--bg2); color: var(--ink); cursor: pointer; }
.vw-loc { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 70px 20px 20px; overflow: auto; background: radial-gradient(ellipse at center, #2a1d13 0%, #120d09 70%); }
.vw-loc-card { max-width: 640px; width: 100%; text-align: center; padding: 26px 30px; border-radius: 14px; background: #efe2c4; color: #2a1d14; border: 1px solid #b48a4a; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.vw-loc-card h2 { font-family: var(--font-display); margin: 4px 0 10px; color: #7a2a18; font-size: 1.8rem; }
.vw-loc-card p { text-align: left; line-height: 1.55; }
.vw-loc-card .muted { color: #7a6448; }
.vw-loc-ico .vw-ico { width: 56px; height: 56px; color: #8a5a22; }
.vw-scenes { display: flex; flex-direction: column; gap: 6px; text-align: left; margin-top: 12px; }
.vw-sc { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px 6px calc(10px + var(--d, 0) * 16px); border-radius: 8px; background: rgba(0,0,0,.06); border: 1px solid rgba(120,80,40,.25); }
.vw-sc > span:last-child { display: flex; gap: 4px; }
.vw-side { position: absolute; right: 10px; top: 64px; width: min(340px, 45%); max-height: calc(100% - 80px); overflow: auto; padding: 10px; border-radius: var(--radius-lg); background: rgba(24,17,12,.94); border: 1px solid var(--accent-dim); z-index: 2; }
.vw-side .vw-sc { background: rgba(255,255,255,.04); border-color: var(--line); }

/* ===== Навигация мастера и дерево сцен ===== */
.vb-place { white-space: nowrap; font-size: .85rem; padding: 3px 8px; border-radius: var(--radius-md); background: rgba(143,210,122,.1); border: 1px solid rgba(143,210,122,.35); }
.vb-watch { white-space: nowrap; font-size: .86rem; color: var(--accent); align-self: center; }
.vb-mode { font-size: .85rem; color: var(--accent); padding: 2px 10px; border: 1px solid var(--accent-dim); border-radius: 99px; }
a.vb-scene { text-decoration: none; }
.nv-here { padding: 8px 10px; border-radius: var(--radius-md); background: rgba(143,210,122,.08); border: 1px solid rgba(143,210,122,.3); margin: 6px 0; }
.nv-world { margin: 10px 0; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 6px; }
.nv-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 6px 4px calc(6px + var(--d, 0) * 14px); border-radius: var(--radius-sm); }
.nv-row:hover { background: rgba(255,255,255,.03); }
.nv-name { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; background: none; border: 0; color: inherit; font: inherit; text-align: left; padding: 0; }
button.nv-name { cursor: pointer; } button.nv-name:hover { color: var(--accent); }
.nv-act { display: flex; gap: 4px; flex: none; }
.nv-ico { width: 18px; height: 18px; color: var(--accent); flex: none; }
.nv-loc { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 4px; }
.nv-loc.focus { outline: 1px solid var(--accent); border-radius: var(--radius-sm); }
.nv-l .nv-name { font-weight: 600; }
.nv-scene.on { background: rgba(216,174,98,.14); } .nv-scene.on .nv-name { color: var(--accent); }

/* ===== Страница настройки кампании ===== */
.vtt.mode-setup .vtt-chat, .vtt.mode-setup .vtt-rzh, .vtt.mode-setup .vtt-hotbar, .vtt.mode-setup .vtt-combat, .vtt.mode-setup .vtt-turn { display: none; }
.vtt.mode-setup .vtt-panel { flex: 1; }
.vtt-setup { overflow: auto; background: var(--bg); }
.vs-page { max-width: 1100px; margin: 0 auto; padding: 18px 20px 40px; }
.vs-page h1 { margin: 0 0 12px; }
.vs-page .card { margin-bottom: 14px; }
.vs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 12px; }
.vs-stats div { text-align: center; padding: 8px 4px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg2); }
.vs-stats b { display: block; font-size: 1.4rem; color: var(--ink-strong); } .vs-stats span { font-size: .78rem; color: var(--muted); }
.vs-steps ol { padding-left: 18px; margin: 6px 0 14px; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; }
.vs-box { border: 1px solid var(--line2); border-radius: var(--radius-lg); padding: 10px; margin: 8px 0; background: var(--bg2); display: flex; flex-direction: column; gap: 8px; }
.vs-box label { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; color: var(--ink-dim); }
.vs-box label.vp-chk { flex-direction: row; align-items: center; }
.vs-box input:not([type]), .vs-box input[type=text], .vs-box textarea, .vs-box select { width: 100%; }
.vs-wlist, .vs-locs { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.vs-wlist button, .vs-locs button { display: flex; align-items: center; gap: 6px; justify-content: space-between; text-align: left; padding: 6px 10px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--bg2); color: var(--ink); cursor: pointer; font: inherit; }
.vs-locs button { justify-content: flex-start; } .vs-locs button .muted { margin-left: auto; font-size: .84rem; }
.vs-wlist button.on, .vs-locs button.on { border-color: var(--accent); background: rgba(216,174,98,.14); color: var(--accent); }
.vs-wlist button.add { border-style: dashed; justify-content: center; color: var(--accent); }
.vs-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 4px; }
.vs-icons button { height: 34px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--panel); color: var(--ink-dim); cursor: pointer; padding: 4px; }
.vs-icons button .vw-ico { width: 22px; height: 22px; }
.vs-icons button.on { border-color: var(--accent); color: var(--accent); background: rgba(216,174,98,.16); }
.vs-mapbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vs-scene { border-color: var(--accent-dim); }

/* Трекер: пройдено за раунд / скорость */
.vc-tr-row { grid-template-columns: 38px 1fr auto auto auto auto; }
.vc-tr-mv { font-size: .84rem; color: var(--ink-dim); white-space: nowrap; }
.vc-tr-mv.over, .vt-mv.over { color: #ffb067; font-weight: 700; }
.nv-br { white-space: nowrap; padding: 2px 8px; font-size: .8rem; }
.vp-head { flex-wrap: wrap; row-gap: 2px; }
.vw-loc-card .btn.ghost { color: #5a3a1a; border-color: #b48a4a; background: rgba(255,255,255,.35); }
.vw-loc-card .btn.ghost:hover { background: rgba(255,255,255,.6); }

/* ===== Заметки кампании, документы, NPC, экран кампании игрока ===== */
.nt-filter { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 8px; }
.nt-filter button { padding: 3px 8px; border: 1px solid var(--line2); border-radius: 99px; background: var(--bg2); color: var(--ink-dim); font-size: .8rem; cursor: pointer; }
.nt-filter button.on { border-color: var(--accent); color: var(--accent); background: rgba(216,174,98,.12); }
.nt-list, .np-list { display: flex; flex-direction: column; gap: 6px; }
.nt-item { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--line2); border-radius: var(--radius-md); background: var(--bg2); color: var(--ink); cursor: pointer; font: inherit; }
.nt-item:hover { border-color: var(--accent-dim); }
.nt-item.shared { border-left: 3px solid var(--good); }
.nt-item.gmdoc { border-left: 3px solid var(--accent); }
.nt-item .muted { font-size: .8rem; }
.nt-prev { font-size: .86rem; color: var(--ink-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-form label { display: flex; flex-direction: column; gap: 4px; }
.nt-doc { background: #efe2c4; color: #2a1d14; border: 1px solid #b48a4a; border-radius: 10px; padding: 18px 22px; box-shadow: inset 0 0 40px rgba(120,80,30,.18); }
.nt-doc-head { font-family: var(--font-display); font-size: 1.4rem; color: #7a2a18; border-bottom: 1px solid rgba(122,42,24,.35); padding-bottom: 6px; margin-bottom: 10px; }
.nt-doc-body { line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.np-item { display: flex; align-items: center; gap: 10px; text-align: left; padding: 6px 8px; border: 1px solid var(--line2); border-radius: var(--radius-md); background: var(--bg2); color: var(--ink); cursor: pointer; font: inherit; }
.np-item:hover { border-color: var(--accent-dim); }
.np-ava { width: 38px; height: 38px; border-radius: 50%; flex: none; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--panel3); color: var(--ink-strong); font-weight: 700; border: 1px solid var(--accent-dim); }
.np-ava img { width: 100%; height: 100%; object-fit: cover; }
.np-main { display: flex; flex-direction: column; min-width: 0; } .np-main .muted { font-size: .8rem; }
.np-top { display: grid; grid-template-columns: 150px 1fr; gap: 14px; }
.np-img { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.np-img img, .np-img span { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-dim); display: flex; align-items: center; justify-content: center; font-size: .8rem; color: var(--muted); background: var(--bg2); text-align: center; }
.np-fields { display: flex; flex-direction: column; gap: 6px; }
.np-form label { display: flex; flex-direction: column; gap: 3px; }
.np-form label.vp-chk { flex-direction: row; align-items: center; }
@media (max-width: 640px) { .np-top { grid-template-columns: 1fr; } }
.vtt-wait.hub { align-items: stretch; justify-content: stretch; padding: 0; background: var(--bg); color: var(--ink); text-align: left; overflow: auto; }
.ph-wrap { max-width: 1200px; margin: 0 auto; padding: 18px 20px 30px; width: 100%; }
.ph-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ph-head h2 { margin: 0; font-family: var(--font-display); }
.ph-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; margin-top: 12px; }
.ph-place h3, .ph-notes h3 { margin: 8px 0; color: var(--accent); }
.ph-loc { padding: 12px 14px; border-radius: var(--radius-lg); background: #efe2c4; color: #2a1d14; border: 1px solid #b48a4a; }
.ph-loc b { font-family: var(--font-display); font-size: 1.3rem; color: #7a2a18; margin-right: 8px; }
.ph-loc .muted { color: #7a6448; }
.ph-map { position: relative; height: 420px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line2); }
.ph-notes { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px; background: var(--panel); align-self: start; }
@media (max-width: 900px) { .ph-cols { grid-template-columns: 1fr; } .ph-map { height: 300px; } }
.vtt-wait.hub{z-index:8}
.gen-btns{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0 10px}.gen-btns .btn{flex:1 1 auto}.gen-btns .btn.on{border-color:var(--accent);color:var(--accent)}
#vtPanel #genOut .card{padding:10px}
.vb-prev{flex:none;width:30px;height:28px;border:1px solid var(--line2);border-radius:var(--radius-md);background:var(--panel2);color:var(--ink);cursor:pointer;font-size:1rem}.vb-prev:disabled{opacity:.4;cursor:default}
.vb-crumbs{display:flex;align-items:center;gap:4px;min-width:0;flex-wrap:nowrap;overflow:hidden}
.vb-crumb{white-space:nowrap;font-size:.86rem;background:none;border:0;padding:2px 4px;color:var(--accent);cursor:pointer;text-decoration:none;font:inherit;font-size:.86rem;max-width:220px;overflow:hidden;text-overflow:ellipsis}
a.vb-crumb:hover,button.vb-crumb:hover{text-decoration:underline}.vb-crumb.cur{color:var(--ink-strong);cursor:default}.vb-sep{color:var(--muted)}
.vp-party{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin:6px 0}.vp-pc{padding:3px 9px;border:1px solid var(--line2);border-radius:99px;background:var(--bg2);color:var(--ink);cursor:grab;font:inherit;font-size:.8rem}.vp-pc.on{border-color:var(--good);color:var(--good)}.np-item{cursor:grab}
/* Лист в окне стола (мастер открывает лист игрока) и в широкой панели: шапка в одну колонку, характеристики над вкладками */
@container vpsheet (max-width: 1100px) {
  .lss-top { grid-template-columns: 1fr; gap: 12px; }
  .lss-vit { justify-content: flex-start; flex-wrap: wrap; gap: 10px 16px; }
  .lss-idtext { flex-wrap: wrap; }
  .lss-sub { flex-wrap: wrap; white-space: normal; }
}
@container vpsheet (max-width: 980px) { .lss-cols { grid-template-columns: 1fr; } }
.vt-sheet-card, .modal-card.wide:has(.vp-sheet) { max-width: min(1180px, calc(100vw - 32px)); width: 100%; }
#vtSheetModal { z-index: 69; }

/* Источники перетаскивания на поле — блоки с ролью кнопки (Firefox не перетаскивает <button>) */
.vp-drop [data-m] { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); background: var(--panel2); color: var(--ink); cursor: grab; font-size: .82rem; }
.vp-drop [data-m]:hover, .vp-cg [role=button]:hover { background: var(--panel3, var(--panel2)); }
.vp-cg [role=button] { text-align: left; padding: 4px 6px; color: var(--ink); cursor: grab; border-radius: var(--radius-sm); }
[draggable=true][role=button]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Окно «Попадание!» — раздельный бросок урона */
.vt-hit { position: fixed; left: 50%; top: 20%; transform: translateX(-50%); z-index: 40; width: min(440px, 92vw); padding: 18px 20px 16px; border-radius: 16px; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, #4a1a12 0%, #24120d 70%); border: 2px solid var(--vt-gold); box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 0 4px rgba(217,164,65,.15); color: #fbe7c6; animation: vhIn .25s cubic-bezier(.2,1.6,.4,1); }
.vt-hit.crit { border-color: #ffb03a; box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 30px rgba(255,140,40,.55); }
.vh-word { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; line-height: 1.1; color: var(--vt-hi); text-shadow: 0 2px 0 #6e1712, 0 0 18px rgba(255,170,60,.45); letter-spacing: .01em; }
.vt-hit.crit .vh-word { color: #fff1c2; text-shadow: 0 0 6px #ff9a2e, 0 0 22px #ff5a1a, 0 2px 0 #6e1712; }
.vh-sub { margin: 4px 0 10px; color: #e6c9a0; font-size: .92rem; }
.vh-row { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--vt-shade); border: 1px solid rgba(217,164,65,.25); }
.vh-tgt { font-weight: 700; } .vh-crit { color: #ffb03a; font-weight: 700; font-size: .86rem; }
.vh-f { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.vh-dice { padding: 3px 10px; border-radius: 99px; background: #6e1712; border: 1px solid var(--vt-gold); font-weight: 800; color: #fff3d6; }
.vh-dice i { font-style: normal; font-weight: 500; color: var(--vt-hi2); } .vh-dice em { font-style: normal; font-weight: 600; color: #9fe0a0; font-size: .82em; }
.vh-plus { color: var(--vt-gold); }
.vh-roll { margin-top: 4px; font-size: 1.05rem; padding: 10px 22px; }
.vh-res { margin-top: 8px; font-size: 1rem; } .vh-res b { font-size: 1.6rem; color: var(--vt-hi); margin-right: 4px; }
.vh-x { position: absolute; right: 8px; top: 6px; border: 0; background: transparent; color: #e6c9a0; font-size: 22px; cursor: pointer; }
.vc-wait { color: var(--accent); }
@keyframes vhIn { from { transform: translateX(-50%) scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .vt-hit { animation: none; } }

/* Игровой стол на экранах от 2500 px: шапка, инструменты и боковая панель крупнее (~+2 пункта), поле — во всю ширину */
@media (min-width: 2500px) {
  .vtt-bar, .vtt-tools, .vtt-side, .vtt-hotbar, .vtt-combat, .vtt-toolopts, .vt-hit, body.vtt-on > .topbar { zoom: 1.14; }
  .vtt-side { min-width: 0; }
}
@media (min-width: 2900px) {
  .vtt-bar, .vtt-tools, .vtt-side, .vtt-hotbar, .vtt-combat, .vtt-toolopts, .vt-hit, body.vtt-on > .topbar { zoom: 1.3; }
}

/* Полёт: кнопки высоты на выбранном токене */
.vt-fly { position: absolute; z-index: 6; display: flex; align-items: center; gap: 2px; padding: 2px; border-radius: 99px; background: rgba(18,30,48,.92); border: 1px solid #8fc4ff; box-shadow: 0 4px 12px rgba(0,0,0,.45); }
.vt-fly.hidden { display: none; }
/* Верхом и призванные: кнопки под выбранным токеном (mount.js); окно призыва (summon.js) */
.vt-mount { position: absolute; z-index: 6; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 280px; }
.vt-mount.hidden { display: none; }
.vt-mount button { border: 1px solid #b08a4a; background: rgba(36,26,16,.94); color: var(--vt-ink-hi); border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.vt-mount button:hover { background: #5a3e1e; }
.sm-dlg input[type=search] { width: 100%; margin: 6px 0; }
.sm-dlg label { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.sm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; max-height: 46vh; overflow: auto; padding: 2px; }
.sm-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border, #555); background: var(--panel, transparent); color: inherit; cursor: pointer; }
.sm-item span { font-size: 12px; }
.sm-item.on { border-color: var(--accent, var(--vt-gold)); box-shadow: 0 0 0 2px var(--accent, var(--vt-gold)) inset; }
.sm-pick { margin: 10px 0 4px; }
.sm-pick input { width: 64px; }
.vt-fly button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: #2b5b93; color: #fff; font-weight: 800; font-size: 16px; line-height: 1; cursor: pointer; }
.vt-fly button:hover:not(:disabled) { background: #3d78bd; }
.vt-fly button:disabled { opacity: .35; cursor: default; }
.vt-fly-v { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; color: #e6f1ff; font-size: .85rem; }
.vt-fly-v svg { width: 16px; height: 16px; fill: #cfe6ff; }
.vt-fly-v b { min-width: 2.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.vt-fly-v i { font-style: normal; opacity: .75; font-size: .8rem; }

/* Страница кампании: вкладка «Генераторы» */
.vs-gen-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.vs-gen-row label { display: flex; flex-direction: column; gap: 4px; min-width: 220px; font-size: .85rem; color: var(--ink-dim); }
.vs-gen-map h2, .vs-page .card h2 { margin-top: 0; }

/* ===================== Стол v2 (дизайн-система: экраны F6/F7) ===================== */
/* За столом шапка сайта скрыта — своя полоса: ←, место, статус боя, игроки онлайн, задержка, громкость */
body.vtt-play .vtt-bar { min-height: 50px; padding: 8px 14px; gap: 10px 14px; background: var(--vt-bar); border-bottom: 1px solid var(--vt-line3); }
body.vtt-play .vb-prev { width: 36px; height: 34px; border-radius: 10px; }
body.vtt-play .vb-crumb.cur { font-family: var(--font-display); font-weight: 700; font-size: .95rem; }
.vb-status.combat { background: rgba(142,53,38,.22); font-weight: 700; }
.vb-ping { display: inline-flex; align-items: center; gap: 2px; color: var(--vt-good); font-size: .86rem; white-space: nowrap; } .vb-ping.slow { color: var(--vt-warn); }
.vb-vol { position: relative; display: inline-flex; align-items: center; }
.vb-chip { padding: 4px 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink-strong); cursor: pointer; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.vb-vol input[type=range] { position: absolute; right: 0; top: calc(100% + 6px); width: 160px; z-index: 30; padding: 8px; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; }
.vb-net { display: inline-flex; align-items: center; gap: 10px; }
.vb-party { gap: 6px; } .vb-av { position: relative; width: 30px; height: 30px; border: 2px solid var(--vt-line2); background: var(--vt-sel); color: var(--vt-ink-hi); font-size: .84rem; }
.vb-av.on::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; background: #6cc56a; border: 2px solid #221811; }
.vb-av.gm { border-color: var(--vt-gold); }

/* Панель инструментов — цветные иконки */
.vt-tool { display: inline-flex; align-items: center; justify-content: center; }
.vt-tool .vt-ico { width: 26px; height: 26px; }
body.vtt-play .vtt-tools { gap: 8px; padding: 10px 0; }
body.vtt-play .vt-tool { width: 42px; height: 42px; border-radius: 10px; }
.vt-tool.on { background: #4a3520; border-color: var(--vt-gold); box-shadow: inset 0 0 0 1px rgba(217,164,65,.4); color: var(--vt-hi); }

/* Hotbar на 4 страницы */
.vtt-hotbar { gap: 8px; padding: 8px 10px; border-radius: 14px; background: var(--vt-glass); border: 1px solid var(--vt-line); box-shadow: 0 10px 30px rgba(0,0,0,.45); max-width: calc(100% - 20px); }
.vh-pg { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 2px; padding: 4px 6px; align-self: stretch; border-radius: 10px; background: var(--vt-shade); border: 1px solid var(--vt-line3); }
.vh-pg b { font-family: var(--font-display); font-size: 1.05rem; color: var(--vt-ink-hi); }
.vh-pgb { border: 0; background: none; color: var(--vt-gold); cursor: pointer; font-size: .86rem; padding: 2px 6px; }
.vh-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vh-tabs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vh-tab { padding: 3px 9px; border-radius: 7px; border: 1px solid var(--vt-line3); background: var(--vt-shade); color: var(--vt-ink); cursor: pointer; font-size: .8rem; white-space: nowrap; }
.vh-tab i { font-style: normal; opacity: .65; } .vh-tab.on { background: var(--vt-sel); border-color: var(--vt-gold); color: var(--vt-hi); } .vh-tab.dim { opacity: .45; }
.vh-hint { margin-left: auto; color: #9a8466; font-size: .76rem; white-space: nowrap; padding-left: 8px; }
.vh-who { font-weight: 700; margin-right: 4px; }
.vh-slots { display: flex; gap: 6px; }
.vh-slot { width: 62px; height: 62px; border-radius: 9px; border: 1px solid var(--vt-line); background: linear-gradient(var(--vt-sel), var(--vt-card2)); gap: 1px; }
.vh-slot:hover:not(.empty) { border-color: var(--vt-gold); box-shadow: 0 0 0 1px rgba(217,164,65,.35); }
.vh-slot .vh-svg { width: 30px; height: 30px; }
.vh-slot .vh-nm { font-size: .7rem; color: var(--vt-ink); max-width: 58px; white-space: nowrap; text-overflow: ellipsis; display: block; }
.vh-bd { position: absolute; right: 2px; bottom: 14px; padding: 0 4px; border-radius: 5px; background: var(--vt-on-gold); border: 1px solid var(--vt-line2); color: var(--vt-ink-hi); font-size: .7rem; line-height: 1.4; }
.vh-bd.cant { color: #9fc3e6; border-color: #4f6f8e; }
.vh-lv { position: absolute; right: 4px; top: 4px; width: 15px; height: 15px; display: flex; align-items: center; justify-content: center; border-radius: 3px; background: var(--lv); color: var(--vt-on-gold); font-size: .7rem; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.vh-slot.spell { background: var(--vt-spell); }

/* Полоса хода над hotbar */
.vtt-turn { width: max-content; top: auto; bottom: 128px; gap: 12px; padding: 8px 14px; border-radius: 12px; background: var(--vt-glass); border: 1px solid var(--vt-line2); box-shadow: 0 8px 24px rgba(0,0,0,.4); flex-wrap: wrap; justify-content: center; max-width: calc(100% - 20px); white-space: normal; }
.vtt-turn.mine { border-color: var(--vt-gold); }
.vt-who { font-family: var(--font-display); font-size: 1rem; color: var(--vt-hi); }
.vt-mvw { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; } .vt-mvw b { white-space: nowrap; }
.vt-mvbar { width: 100px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; } .vt-mvbar i { display: block; height: 100%; background: var(--vt-good); }
.vt-mvw.over .vt-mvbar i { background: #e0563b; } .vt-mvw.over b { color: var(--vt-bad); }
.vt-ec { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; border: 1px solid var(--vt-gold); background: rgba(217,164,65,.08); color: var(--vt-ink-hi); cursor: pointer; font-size: .86rem; font-weight: 600; }
.vt-ec i { width: 9px; height: 9px; border-radius: 50%; background: var(--vt-gold); }
.vt-ec.used { border-color: var(--vt-line3); color: #8a7558; background: transparent; } .vt-ec.used i { background: transparent; border: 1px solid #6a5540; }
.vt-tag { padding: 2px 8px; border-radius: 99px; background: rgba(143,210,122,.12); border: 1px solid rgba(143,210,122,.4); color: #b6e3a6; font-size: .82rem; }
.vt-end { background: #7a2e1c; border-color: #b0462a; }

/* Окно попадания */
.vt-hit { top: 12%; width: min(480px, 92vw); padding: 24px 26px 22px; background: linear-gradient(#3d2316, #2a170f); border: 2px solid var(--vt-gold); border-radius: 18px; }
.vh-word { font-size: 2.8rem; }
.vh-box { margin: 6px 0 14px; padding: 12px; border-radius: 12px; background: var(--vt-shade); border: 1px solid rgba(217,164,65,.3); }
.vh-box .vh-row { background: none; border: 0; padding: 4px; margin: 0; }
.vh-dice { padding: 6px 14px; font-size: 1.05rem; background: #6e1712; }
.vh-roll { display: inline-flex; align-items: center; gap: 10px; padding: 12px 28px; background: linear-gradient(#8a4a2a, #6e3520); border: 1px solid var(--vt-gold); }
.vh-roll .vh-d20 { width: 26px; height: 26px; }

/* Лист игрока в боковой панели */
.vtt-head { padding: 12px 12px 8px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--panel2), var(--panel)); }
.vtt-head.hidden { display: none; }
.ps-top { display: flex; align-items: center; gap: 12px; }
.ps-av { flex: none; width: 52px; height: 52px; border-radius: 12px; border: 2px solid var(--vt-line2); background: var(--vt-sel); color: var(--vt-ink-hi); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.3rem; object-fit: cover; }
.ps-who { display: flex; flex-direction: column; min-width: 0; flex: 1; } .ps-who b { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink-strong); line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ps-who span { font-size: .84rem; color: var(--ink-dim); }
.ps-full { border: 0; background: none; color: var(--ink-dim); cursor: pointer; font-size: 1.1rem; align-self: flex-start; }
.ps-stats { display: grid; grid-template-columns: 1fr 52px 52px 52px; gap: 6px; margin-top: 10px; }
.ps-hp, .ps-tile { border: 1px solid var(--line2); border-radius: 10px; background: var(--panel2); padding: 6px 8px; }
.ps-hpl { display: flex; justify-content: space-between; align-items: baseline; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); }
.ps-hpl b { font-size: .86rem; color: var(--ink-dim); } .ps-hpl em { font-style: normal; font-size: 1.15rem; color: var(--vt-good); } .ps-hpl em.mid { color: var(--vt-warn); } .ps-hpl em.bad { color: var(--vt-bad); }
.ps-bar { position: relative; display: block; height: 5px; border-radius: 99px; background: var(--vt-track); overflow: hidden; margin: 4px 0 5px; } .ps-bar i { display: block; height: 100%; background: var(--vt-good); } .ps-bar u { position: absolute; right: 0; top: 0; height: 100%; background: #7ab0e6; }
.ps-hpb { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; } .ps-hpb button { border: 1px solid var(--vt-bad-line); background: color-mix(in srgb, var(--vt-bad) 10%, transparent); color: var(--vt-bad); font-weight: 600; border-radius: 6px; font-size: .78rem; padding: 2px; cursor: pointer; } .ps-hpb button + button { border-color: var(--vt-good-line); color: var(--vt-good); background: color-mix(in srgb, var(--vt-good) 10%, transparent); }
.ps-hpf { display: flex; gap: 6px; margin-top: 6px; } .ps-hpf input { width: 100%; min-height: 30px; padding: 3px 8px; }
.ps-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 2px; } .ps-tile b { font-size: 1.15rem; color: var(--ink-strong); } .ps-tile span { font-size: .7rem; text-transform: uppercase; color: var(--ink-dim); }
.ps-tile.click { cursor: pointer; } .ps-tile.click:hover { border-color: var(--accent); }
.ps-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ps-chip { padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line2); background: transparent; color: var(--ink); font-size: .8rem; cursor: default; }
button.ps-chip { cursor: pointer; } .ps-chip.good { border-color: #b08a4a; color: var(--vt-hi2); } .ps-chip.conc { border-color: #5a8ad6; color: #a9c8f5; background: rgba(90,138,214,.12); } .ps-chip.on { border-color: var(--vt-gold); color: var(--vt-hi); background: rgba(217,164,65,.15); } .ps-chip.bad { border-color: #8e3526; color: var(--vt-bad); }
.vtt.pl-sheet .vtt-tabs { flex-wrap: nowrap; gap: 0; padding: 0 4px; }
.vtt.pl-sheet .vtt-tabs button { border-radius: 0; padding: 10px 2px 8px; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid transparent; background: none; }
.vtt.pl-sheet .vtt-tabs button.on { border-bottom-color: var(--vt-gold); color: var(--vt-hi); }
.ps-sec { margin: 12px 0 6px; font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--vt-gold); }
.ps-body > .ps-sec:first-child { margin-top: 4px; }
.ps-abs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.ps-ab { display: flex; flex-direction: column; align-items: center; padding: 5px 2px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel2); color: var(--ink); cursor: pointer; }
.ps-ab:hover { border-color: var(--accent); } .ps-ab span { font-size: .7rem; color: var(--ink-dim); } .ps-ab b { font-size: 1.05rem; color: var(--ink-strong); } .ps-ab i { font-style: normal; font-size: .7rem; color: var(--ink-dim); }
.ps-abs.sv .ps-ab.prof { border-color: #b08a4a; } .ps-abs.sv .ps-ab b { font-size: .95rem; }
.ps-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.ps-sk { display: flex; align-items: center; gap: 7px; padding: 3px 2px; border: 0; background: none; color: var(--ink); cursor: pointer; font-size: .86rem; text-align: left; border-radius: 4px; }
.ps-sk:hover { background: var(--panel2); } .ps-sk span { flex: 1; } .ps-sk b { color: var(--ink-strong); }
.pd { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #8a7558; flex: none; } .pd.on { background: var(--vt-gold); border-color: var(--vt-gold); } .pd.ex { background: var(--vt-gold); border-color: #fff3d6; box-shadow: 0 0 0 1px var(--vt-gold); }
.ps-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; } .ps-foot span { display: flex; justify-content: space-between; gap: 6px; padding: 6px 10px; border: 1px solid var(--line2); border-radius: 8px; font-size: .84rem; } .ps-foot b { color: var(--ink-strong); }
.ps-list { display: flex; flex-direction: column; } .ps-li { display: flex; align-items: center; gap: 6px; padding: 4px 2px; border-bottom: 1px solid var(--line); } .ps-li .ps-ln { flex: 1; min-width: 0; }
button.ps-ln { border: 0; background: none; color: var(--accent); text-align: left; cursor: pointer; padding: 0; font: inherit; } .ps-li.eq .ps-ln { color: var(--ink-strong); } .ps-li i { font-style: normal; color: var(--ink-dim); }
.ps-det { border-bottom: 1px solid var(--line); padding: 4px 0; } .ps-det summary { cursor: pointer; font-weight: 700; color: #d27a5a; } .ps-det div { font-size: .82rem; padding: 4px 0 4px 12px; }
.ps-text { font-size: .82rem; line-height: 1.45; } .ps-row b { font-size: 1.2rem; }
.ps-sl { margin: 0; }

/* Чат: лоток костей — по кнопке «Кости» */
.vtt-chat:not(.dice-open) .vc-dice { display: none; }
.vc-form { gap: 6px; }
.vc-dt { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 9px; border: 1px solid #b0462a; background: linear-gradient(#8a4a2a, #6e3520); color: #fff3d6; font-weight: 700; cursor: pointer; white-space: nowrap; font-size: .82rem; }
.vc-dt .vc-dti { width: 20px; height: 20px; } .vtt-chat.dice-open .vc-dt { box-shadow: inset 0 0 0 2px var(--vt-gold); }

/* Телефон (F7): полоса хода сверху, hotbar листается */
.vtt.phone .vtt-turn { top: 6px; bottom: auto; padding: 6px 10px; gap: 6px; font-size: .84rem; }
.vtt.phone .vt-mvbar { width: 60px; } .vtt.phone .vh-hint, .vtt.phone .vh-pg { display: none; }
.vtt.phone .vtt-hotbar { padding: 5px; } .vtt.phone .vh-slots { gap: 4px; } .vtt.phone .vh-tab { font-size: .74rem; padding: 2px 6px; }
.vtt.phone .vh-slot .vh-svg { width: 24px; height: 24px; }

/* Приглашение в кампанию (дизайн-система v2, экран F7): выбор персонажа и «Войти за стол» */
.join-v2 { max-width: 460px; margin: 0 auto; padding: 20px 16px 28px; display: flex; flex-direction: column; min-height: calc(100dvh - var(--topbar-h, 56px) - 40px); }
.jv-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.25rem; color: var(--ink-strong); margin-bottom: 18px; }
.jv-brand .jv-logo { width: 30px; height: 30px; }
.jv-inv { color: var(--ink-dim); font-size: .85rem; }
.join-v2 h1 { margin: 4px 0 4px; font-size: 2rem; line-height: 1.1; }
.jv-meta { color: var(--ink-dim); font-size: .86rem; }
.jv-sec { margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line2); font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.jv-list { display: flex; flex-direction: column; gap: 10px; }
.jv-ch { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel); color: var(--ink); cursor: pointer; text-align: left; }
.jv-ch.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.jv-av { flex: none; width: 46px; height: 46px; border-radius: 10px; border: 1.5px solid var(--vt-line2); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink-strong); }
.jv-who { flex: 1; min-width: 0; display: flex; flex-direction: column; } .jv-who b { color: var(--ink-strong); } .jv-who span { font-size: .86rem; color: var(--ink-dim); }
.jv-radio { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--vt-line2); position: relative; }
.jv-ch.on .jv-radio { border-color: var(--accent); } .jv-ch.on .jv-radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); }
.jv-new { margin-top: 14px; font-weight: 700; font-size: .88rem; color: var(--accent); }
.jv-foot { margin-top: auto; padding-top: 28px; text-align: center; }
.jv-go { width: 100%; padding: 14px; font-size: 1.05rem; border-radius: 12px; }
.jv-foot p { font-size: .82rem; margin: 10px 0 0; }

/* Телефон: полоска хитов под полосой хода, нижнее меню с цветными иконками */
.vt-phhp { display: none; }
.vtt.phone .vt-phhp { position: absolute; left: 8px; right: 8px; top: 54px; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 12px; background: var(--vt-glass); border: 1px solid var(--vt-line); font-size: .82rem; }
.vtt.phone .vt-phhp.hidden { display: none; }
.vt-phhp b { color: var(--vt-ink-hi); white-space: nowrap; } .vt-phhp .ps-bar { flex: 1; margin: 0; height: 6px; } .vt-phhp em { font-style: normal; color: var(--vt-good); font-weight: 700; white-space: nowrap; }
.vt-phhp span.ac { padding: 1px 7px; border: 1px solid var(--vt-line2); border-radius: 6px; font-weight: 700; white-space: nowrap; }
.vtt-phone-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vtt-phone-nav .pn-ico { width: 26px; height: 26px; }
.vtt-phone-nav button.on { color: var(--vt-hi); box-shadow: inset 0 2px 0 var(--vt-gold); }
.vtt.phone .vtt-turn .vt-mvbar, .vtt.phone .vtt-turn #vtDash, .vtt.phone .vtt-turn #vtDis { display: none; }
.vtt.phone .vt-ec { padding: 2px 7px; font-size: .76rem; }
/* Телефон F7: полоса — только текущее место; поле без панели инструментов и трекера; карточка хода во всю ширину */
.vtt.phone .vtt-bar { flex-wrap: nowrap; padding: 6px 8px; gap: 8px; min-height: 0; }
.vtt.phone .vb-crumbs .vb-crumb:not(.cur), .vtt.phone .vb-sep, .vtt.phone .vb-ping { display: none; }
.vtt.phone .vb-crumbs { flex: 1; min-width: 0; } .vtt.phone .vb-crumb.cur { max-width: none; overflow: hidden; text-overflow: ellipsis; }
.vtt.phone .vb-net { margin-left: auto; }
.vtt.phone .vtt-tools, .vtt.phone .vtt-combat, .vtt.phone .vtt-info { display: none; }
.vtt.phone .vtt-turn { left: 8px; right: 8px; top: 8px; transform: none; width: auto; flex-wrap: nowrap; justify-content: space-between; font-size: .86rem; }
.vtt.phone .vtt-turn .vt-ec, .vtt.phone .vtt-turn .vt-tag { display: none; }
.vtt.phone .vt-phhp { top: 64px; }
.vtt.phone .vtt-turn:not(.hidden) ~ .vt-phhp { top: 64px; }
.vtt.phone .vtt-turn.hidden ~ .vt-phhp { top: 8px; }
.vtt.phone .vb-crumbs > :not(:last-child) { display: none; }

.vc-big { font-size: 1.4rem; color: var(--vt-hi); } .vc-card.fall { border-left: 3px solid #5a8ad6; } .vt-mount button i { font-style: normal; color: var(--vt-hi2); font-weight: 500; }
.sm-sel { font-style: normal; font-size: .78rem; color: var(--accent); margin-left: 4px; } .sm-ride { color: var(--vt-good); font-weight: 600; }
.vh-tab.sum { border-color: #6a3fb0; color: #cdb0ff; } .vh-tab.sum.on { background: #2f2140; border-color: #9b4dff; color: #e3d0ff; }
.vp-ico { width: 18px; height: 18px; vertical-align: -4px; }
.vc-svt { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; } .vc-sv { display: grid; grid-template-columns: 1fr auto 48px; gap: 8px; align-items: center; padding: 3px 6px; border-radius: 6px; background: rgba(0,0,0,.18); } .vc-svn i { display: block; font-style: normal; font-size: .78rem; color: var(--ink-dim); } .vc-dmg { text-align: right; color: var(--vt-bad); } .vp-slots { display: inline-flex; gap: 4px; flex-wrap: wrap; } .vp-sl { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink); cursor: pointer; font-size: .82rem; } .vp-sl b { width: 18px; height: 18px; border-radius: 4px; background: var(--lv); color: var(--vt-on-gold); display: inline-flex; align-items: center; justify-content: center; } .vp-sl.on { border-color: var(--lv); box-shadow: 0 0 0 1px var(--lv); } .vp-zone { font-size: .86rem; } .vp-ally { color: #ff6b6b; }

/* ===================== Стол мастера v2 (экран F5) ===================== */
/* Полоса инициативы над полем */
.vtt-strip { position: absolute; left: 12px; right: 12px; top: 10px; z-index: 5; display: flex; align-items: stretch; gap: 8px; padding: 8px; border-radius: 14px; background: var(--vt-glass); border: 1px solid var(--vt-line); box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.vtt-strip.hidden { display: none; }
.vs-round { display: flex; flex-direction: column; justify-content: center; padding: 0 10px; } .vs-round span { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #b89a70; } .vs-round b { font-family: var(--font-display); font-size: 1.4rem; color: var(--vt-ink-hi); line-height: 1; }
.vs-cards { flex: 1; display: flex; gap: 6px; overflow-x: auto; min-width: 0; scrollbar-width: thin; }
.vs-card { position: relative; flex: none; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 8px; min-width: 116px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--vt-line3); background: var(--vt-card2); color: var(--vt-ink-hi); cursor: pointer; }
.vs-card:hover { border-color: var(--vt-line2); } .vs-card.cur { border-color: var(--vt-gold); box-shadow: 0 0 0 1px var(--vt-gold), 0 0 14px rgba(217,164,65,.3); background: var(--vt-sel); }
.vs-card.dead { opacity: .45; } .vs-card.drag { opacity: .4; } .vs-card.over { box-shadow: -3px 0 0 var(--vt-gold); }
.vs-av { grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--vt-gold); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; }
.vs-card.foe .vs-av { border-color: #c0503a; } .vs-card.sum .vs-av { border-color: #9b4dff; }
.vs-nm { font-size: .86rem; font-weight: 700; white-space: nowrap; } .vs-in { font-style: normal; font-size: .78rem; color: var(--vt-label); }
.vs-hp { grid-column: 2 / span 2; height: 4px; border-radius: 99px; background: var(--vt-track); overflow: hidden; } .vs-hp u { display: block; height: 100%; background: var(--vt-good); } .vs-card.foe .vs-hp u { background: #d8613f; }
.vs-next { flex: none; align-self: stretch; padding: 0 18px; background: linear-gradient(#8a4a2a, #6e3520); border-color: #b0462a; }
.vtt-strip:not(.hidden) ~ .vtt-combat { top: 92px; }
.vtt-board:has(.vtt-strip:not(.hidden)) .vtt-info { top: 90px; }
.vtt.phone .vtt-strip { display: none; }

/* Полоса мастера: вкладки сцен, команда, онлайн, «Завершить» */
.vb-stabs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--vt-shade); }
.vb-stab { padding: 5px 12px; border-radius: 8px; border: 0; background: none; color: var(--vt-ink); cursor: pointer; font-size: .82rem; white-space: nowrap; text-decoration: none; }
.vb-stab i { font-style: normal; font-size: .76rem; padding: 0 6px; border-radius: 99px; background: var(--vt-shade); margin-left: 4px; }
.vb-stab.cur { background: var(--vt-sel); color: var(--vt-hi); font-weight: 700; box-shadow: inset 0 0 0 1px var(--vt-line2); } .vb-stab.act i { background: var(--vt-good-line); color: #d6f5c8; } .vb-stab.add { font-weight: 700; }
.vb-cmd { display: inline-flex; align-items: center; gap: 10px; padding: 5px 10px; min-width: 210px; border-radius: 9px; border: 1px solid var(--line2); background: var(--vt-shade); color: var(--ink-dim); cursor: pointer; font-size: .86rem; }
.vb-cmd kbd { margin-left: auto; font: inherit; font-size: .76rem; padding: 0 5px; border-radius: 4px; border: 1px solid var(--line2); }
.vb-online { color: var(--vt-good); font-size: .84rem; white-space: nowrap; }
.vb-end { background: #7a2e1c; border: 1px solid #b0462a; color: #fff3d6; }
.vb-act { display: inline-flex; align-items: center; gap: 8px; }

/* Правая колонка значков (мастер за столом) */
.vtt.gm-rail .vtt-side { padding-right: 71px; }
.vtt.gm-rail #vtTabs { position: absolute; right: 0; top: 0; bottom: 0; width: 71px; flex-direction: column; flex-wrap: nowrap; gap: 4px; padding: 8px 4px; border-bottom: 0; border-left: 1px solid var(--line); background: var(--panel); overflow-y: auto; z-index: 2; }
.vtt.gm-rail #vtTabs button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: .7rem; white-space: normal; line-height: 1.1; }
.vtt.gm-rail #vtTabs button.on { background: var(--vt-sel); box-shadow: inset 0 0 0 1px var(--vt-line2); }
.vt-tico { width: 26px; height: 26px; }

/* Ширма */
.sh-title { font-family: var(--font-display); font-size: 1.35rem; }
.sh-list { display: flex; flex-direction: column; gap: 5px; margin: 6px 0 10px; }
.sh-row { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink); cursor: pointer; text-align: left; }
.sh-row.cur { border-color: var(--vt-gold); box-shadow: inset 0 0 0 1px rgba(217,164,65,.4); } .sh-row.dead { opacity: .5; }
.sh-row i { font-style: normal; color: var(--ink-dim); font-weight: 700; } .sh-row b { display: block; color: var(--ink-strong); font-size: .86rem; } .sh-row em { font-style: normal; font-size: .78rem; color: var(--ink-dim); }
.sh-hp { font-weight: 700; color: var(--ink-strong); font-size: .84rem; } .sh-ac { font-size: .82rem; color: var(--ink-dim); }
.sh-sec { margin: 14px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--vt-gold); }
.sh-chips { display: flex; flex-wrap: wrap; gap: 6px; } .sh-chips button { padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink); cursor: pointer; font-size: .84rem; } .sh-chips button:hover { border-color: var(--accent); }
.sh-rest { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .sh-rest button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--vt-line2); background: linear-gradient(var(--vt-sel), var(--vt-card2)); color: var(--vt-ink-hi); cursor: pointer; }
.sh-rest button + button { border-color: #4f6f8e; background: var(--vt-night); } .sh-rest .vp-ico { width: 26px; height: 26px; }

/* HUD токена: быстрый урон / лечение */
.vh-q { display: flex; gap: 6px; margin: 6px 0; } .vh-q input { flex: 1; min-height: 32px; padding: 4px 10px; }

/* Палитра команд (Ctrl+K) */
.vt-pal { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; background: rgba(8,6,5,.55); }
.vt-pal-card { width: min(620px, 94vw); border-radius: 14px; border: 1px solid var(--vt-line2); background: var(--panel); box-shadow: 0 20px 60px rgba(0,0,0,.6); overflow: hidden; }
.vt-pal-card input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 16px; font-size: 1rem; background: transparent; }
.vt-pal-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.vt-pal-it { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; text-align: left; }
.vt-pal-it.on, .vt-pal-it:hover { background: var(--panel2); } .vt-pal-g { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-dim); } .vt-pal-it i { font-style: normal; font-size: .82rem; color: var(--ink-dim); }
.vt-pal-foot { padding: 8px 14px; border-top: 1px solid var(--line); font-size: .8rem; }
.vtt.gm-rail .vtt-turn { display: none; }
.vc-form { flex-wrap: wrap; } .vc-form #vcText { flex: 1 1 160px; min-width: 0; }
.vtt.gm-rail .vc-form #vcText { flex-basis: 100%; order: -1; }

/* ===================== Лобби, кампания, итоги боя (сценарии M1–M4) ===================== */
.lb-v2 { max-width: 760px; }
.lb-card { padding: 20px 22px; }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; } .lb-head h1 { margin: 0; font-size: 1.8rem; }
.lb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; } .lb-chips span { padding: 3px 12px; border-radius: 99px; border: 1px solid var(--line2); font-size: .86rem; color: var(--ink-dim); }
.lb-list { display: flex; flex-direction: column; gap: 10px; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel2); }
.lb-row.live { border-color: var(--good-line, var(--vt-good-line)); }
.lb-th { flex: none; width: 64px; height: 48px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #3a4a2a, #2a3420); border: 1px solid var(--line2); }
.lb-th .lb-ico { width: 30px; height: 30px; }
.lb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .lb-name { font-weight: 800; font-size: 1.05rem; color: var(--ink-strong); text-decoration: none; } .lb-name:hover { text-decoration: underline; } .lb-main span { font-size: .86rem; }
.lb-role { flex: none; padding: 2px 12px; border-radius: 99px; font-size: .82rem; font-weight: 700; } .lb-role.gm { border: 1px solid #b08a4a; color: var(--vt-hi2); } .lb-role.pl { border: 1px solid #4f6f8e; color: #a9c8f5; }
.lb-act { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.lb-foot { font-size: .86rem; margin-top: 10px; }
@media (max-width: 640px) { .lb-row { flex-wrap: wrap; } .lb-act { width: 100%; justify-content: flex-start; } }

/* Новая кампания: переключатели */
.nc-form .nc-l { display: block; margin: 12px 0 6px; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-dim); }
.nc-form label.nc-l input { margin-top: 6px; font-size: 1rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
.nc-seg { display: flex; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.nc-seg button { flex: 1; padding: 9px 6px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-weight: 600; font-size: .86rem; }
.nc-seg button + button { border-left: 1px solid var(--line2); } .nc-seg button.on { background: var(--accent); color: var(--bg2, var(--vt-on-gold)); }
.nc-hint { font-size: .86rem; margin: 12px 0 0; }

/* Готовность к сессии */
.rd { margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel2); }
.rd-head { margin-bottom: 6px; font-size: .86rem; color: var(--ink-dim); } .rd-head b { font-size: 1.3rem; color: var(--ink-strong); }
.rd-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: .86rem; } .rd-row span { flex: 1; }
.rd-row i { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: .8rem; }
.rd-row.ok i { background: rgba(143,210,122,.18); color: var(--vt-good); } .rd-row.warn i { background: rgba(240,179,90,.2); color: var(--vt-warn); }
.rd p { margin: 6px 0 0; font-size: .82rem; }

/* Итоги боя */
.ec-head { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 10px; }
.ec-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ec-stats div { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2); }
.ec-stats b { font-size: 1.5rem; color: var(--ink-strong); } .ec-stats span { font-size: .8rem; color: var(--ink-dim); text-align: center; }
.ec .vp-chk { display: flex; gap: 8px; align-items: center; margin: 6px 0; }

/* Реакция: таймер, концентрация */
.vt-oa-t { margin-left: auto; padding: 1px 8px; border-radius: 99px; background: var(--vt-shade); font-weight: 800; color: var(--vt-hi); width: auto !important; }
.vc-card.conc { border-left: 3px solid #5a8ad6; background: rgba(90,138,214,.08); }

/* ===================== Страница кампании мастера v2 (макеты F1–F4) ===================== */
.vtt.mode-setup .vtt-main { grid-template-columns: 270px 0 minmax(0, 1fr) auto; }
.vtt.mode-setup.vs-mode-scene .vtt-main { grid-template-columns: 270px 46px minmax(0, 1fr) auto; }
.vtt.mode-setup:not(.vs-mode-scene) .vtt-tools { visibility: hidden; padding: 0; border: 0; overflow: hidden; }
.vtt.mode-setup .vtt-side { width: calc(var(--side-w, 340px) + 71px); }
.vtt.mode-setup.side-closed .vtt-side { width: 71px; }
.vtt.mode-setup.side-closed .vtt-panel, .vtt.mode-setup.side-closed .vtt-rz { display: none; }
.vtt.mode-setup .vtt-info { display: none; }
.vtt.mode-setup.editing .vtt-info { display: block; }

/* Полоса */
.vtt.mode-setup .vtt-bar { flex-wrap: nowrap; gap: 14px; padding: 9px 14px; min-height: 56px; }
.vs-logo { flex: none; display: inline-flex; } .vs-logo img { width: 32px; height: 32px; }
.vs-camp { border: 0; background: none; color: var(--ink-strong); cursor: pointer; font-family: var(--font-display); font-size: 1.25rem; white-space: nowrap; padding: 2px 4px; }
.vs-camp b { font-weight: 700; }
.vs-path { color: var(--ink-dim); font-size: .9rem; white-space: nowrap; }
.vs-title { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.vs-seg { display: inline-flex; border: 1px solid var(--vt-line2); border-radius: 10px; overflow: hidden; flex: none; }
.vs-seg button { border: 0; background: transparent; color: var(--vt-ink); padding: 7px 18px; cursor: pointer; font-weight: 700; font-size: .84rem; }
.vs-seg button + button { border-left: 1px solid var(--vt-line); }
.vs-seg button.on { background: var(--vt-gold); color: var(--vt-on-gold); }
.vs-seg button:disabled { opacity: .4; cursor: default; }
.vs-seg.sm button { padding: 6px 14px; }
.vs-gap { flex: 1; }
.vs-chip { padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line2); font-size: .8rem; white-space: nowrap; color: var(--ink-dim); }
.vs-chip.act { border-color: var(--vt-good-line); color: var(--vt-good); background: rgba(143,210,122,.1); } .vs-chip.draft, .vs-chip.warn { border-color: var(--vt-line2); color: var(--vt-hi2); } .vs-chip.ready { border-color: var(--vt-line); } .vs-chip.hid { border-color: #6a5540; color: #b89a70; }
.vs-menu { position: fixed; z-index: 70; min-width: 260px; padding: 6px; border-radius: 12px; border: 1px solid var(--vt-line2); background: var(--panel); box-shadow: 0 14px 40px rgba(0,0,0,.5); display: flex; flex-direction: column; }
.vs-menu a, .vs-menu button { text-align: left; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; text-decoration: none; font: inherit; }
.vs-menu a:hover, .vs-menu button:hover { background: var(--panel2); }
.vs-mh { padding: 8px 12px 2px; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-dim); border-top: 1px solid var(--line); margin-top: 4px; }
.vs-mlist { display: flex; flex-direction: column; padding: 2px 0; } .vs-mlist.muted { padding: 6px 12px; }

/* Атлас */
.vtt-atlas { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; background: var(--vt-bg); border-right: 1px solid var(--line); padding: 14px 10px 10px; }
.at-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px 8px; } .at-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.45rem; color: var(--ink-strong); }
.at-add { border: 0; background: none; color: var(--accent); cursor: pointer; font-size: .82rem; }
.at-tree { display: flex; flex-direction: column; gap: 1px; }
.at-row { display: flex; align-items: center; gap: 4px; padding: 3px 6px 3px calc(6px + var(--d, 0) * 14px); border-radius: 8px; min-height: 28px; }
.at-row.on { background: var(--vt-sel); } .at-row:hover { background: rgba(255,255,255,.04); }
.at-row.on .at-name, .at-scene.on span { color: var(--vt-hi); font-weight: 700; }
.at-tog { flex: none; width: 16px; border: 0; background: none; color: var(--ink-dim); cursor: pointer; font-size: .76rem; padding: 0; }
.at-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--ink); cursor: pointer; text-align: left; font: inherit; font-size: .9rem; padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-world .at-name { font-weight: 700; color: var(--ink-strong); }
.at-n { flex: none; font-size: .78rem; color: var(--ink-dim); }
.at-more { flex: none; border: 0; background: none; color: var(--ink-dim); cursor: pointer; padding: 0 4px; opacity: 0; }
.at-row:hover .at-more, .at-more:focus-visible { opacity: 1; }
.at-scene { border: 0; background: none; color: var(--ink); cursor: pointer; text-align: left; font: inherit; font-size: .86rem; width: 100%; padding-left: calc(10px + var(--d, 0) * 14px); }
.at-scene span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-st { flex: none; display: inline-block; width: 9px; height: 9px; transform: rotate(45deg); border: 1.5px solid var(--vt-gold); }
.at-st.vis, .at-st.ready { background: var(--vt-gold); } .at-st.hid, .at-st.draft { background: transparent; } .at-st.warn { background: #b07a2a; border-color: #b07a2a; }
.at-st.act { transform: none; border-radius: 50%; background: var(--vt-good); border-color: var(--vt-good); }
.at-new { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; font-size: .84rem; text-align: left; padding: 6px 10px; }
.at-legend { display: flex; gap: 10px; flex-wrap: wrap; padding: 10px 6px; margin-top: 8px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--ink-dim); }
.at-legend span { display: inline-flex; align-items: center; gap: 5px; } .at-legend .at-st { width: 7px; height: 7px; }
.at-sess { margin-top: auto; padding: 12px 6px 4px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.at-sh { display: flex; justify-content: space-between; align-items: baseline; } .at-sh b { color: var(--ink-strong); font-size: .9rem; } .at-sh .ok, .at-pl .ok { color: var(--vt-good); font-size: .82rem; }
.at-pl { display: flex; align-items: center; gap: 10px; font-size: .82rem; } .at-pl > span:last-child { margin-left: auto; font-size: .8rem; }
.at-av { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--vt-line2); display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800; color: var(--vt-ink-hi); }
.at-pn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-dim); } .at-pn b { color: var(--ink-strong); font-weight: 600; }
.at-hint { font-size: .84rem; margin: 0; }
.at-inv { display: flex; gap: 6px; } .at-inv input { flex: 1; min-width: 0; min-height: 32px; padding: 3px 8px; font-size: .84rem; }
.at-plan { font-size: .8rem; color: var(--ink-dim); }

/* Мир: переключатели над картой и карточка точки */
.vs-maptog { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--vt-glass); border: 1px solid var(--vt-line); }
.vs-maptog button { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--vt-line); background: transparent; color: var(--vt-ink); cursor: pointer; font-size: .84rem; font-weight: 700; }
.vs-maptog button.on { background: var(--vt-sel); border-color: var(--vt-gold); color: var(--vt-hi); }
.vtt-world.no-pins .vw-pin { display: none; }
.vs-pop { position: absolute; right: 16px; top: 76px; z-index: 6; width: min(360px, calc(100% - 32px)); max-height: calc(100% - 92px); overflow: auto; border-radius: 14px; border: 1px solid var(--vt-line2); background: var(--vt-card); box-shadow: 0 16px 40px rgba(0,0,0,.55); }
.vs-pop-x { position: absolute; right: 8px; top: 6px; z-index: 1; border: 0; background: rgba(0,0,0,.4); color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 18px; }
.vs-pop-img { height: 130px; background: var(--vt-sel) center/cover no-repeat; }
.vs-pop-b { padding: 12px 16px 14px; }
.vs-pop-k { font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-dim); } .vs-pop-k .ok { color: var(--vt-good); }
.vs-pop h2 { margin: 2px 0 6px; font-family: var(--font-display); font-size: 1.6rem; color: var(--ink-strong); }
.vs-pop-d { font-size: .9rem; line-height: 1.45; max-height: 140px; overflow: auto; }
.vs-pop-sc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.vs-pop-sc button { border: 0; background: none; color: var(--vt-good); cursor: pointer; padding: 0; text-align: left; font-size: .78rem; display: flex; flex-direction: column; gap: 3px; }
.vs-th { display: block; aspect-ratio: 16 / 10; border-radius: 6px; border: 1px solid var(--vt-line); background: var(--vt-sel) center/cover no-repeat; }
.vs-pop-t { display: flex; gap: 14px; margin: 6px 0 10px; font-size: .82rem; }
.vs-sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; } .vs-sw input { position: absolute; opacity: 0; } .vs-sw i { width: 34px; height: 18px; border-radius: 99px; background: var(--vt-line); position: relative; transition: background .15s; }
.vs-sw i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--vt-ink-hi); transition: left .15s; }
.vs-sw input:checked + i { background: var(--vt-gold); } .vs-sw input:checked + i::after { left: 18px; } .vs-sw input:focus-visible + i { outline: 2px solid var(--accent); }
.vs-pop-a { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .vs-pop-a .btn { justify-content: center; } .ok-b { border-color: var(--vt-good-line) !important; color: var(--vt-good) !important; }

/* Локация (F2) */
.vtt.mode-setup .vtt-setup { background: var(--vt-bg); }
.lp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 28px; padding: 26px 30px 40px; max-width: 1400px; }
.lp-k { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }
.lp-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; } .lp-h h1 { margin: 0; font-size: 2.4rem; }
.lp-edit { margin-left: auto; border: 0; background: none; color: var(--accent); cursor: pointer; font-size: .86rem; }
.lp-desc { font-size: 1.05rem; line-height: 1.55; margin-bottom: 18px; }
.lp-read { margin: 0 0 18px; padding: 14px 18px; border-radius: 10px; border-top: 3px solid #b8322a; background: #f1e3c4; color: #2a1d14; }
.lp-rh { display: flex; justify-content: space-between; align-items: baseline; } .lp-read h3 { margin: 0 0 6px; color: #8a2a1c; font-family: var(--font-display); }
.lp-rt { font-style: italic; line-height: 1.5; font-size: 1rem; }
.lp-link { border: 0; background: none; color: #8a2a1c; cursor: pointer; font-size: .86rem; font-weight: 700; }
.lp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lp-card { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--vt-line3); background: var(--vt-card); }
.lp-card h4 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }
.lp-card.lp-row { display: flex; gap: 12px; align-items: center; } .lp-card.lp-row h4 { margin-bottom: 2px; }
.lp-li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .88rem; } .lp-li b { color: var(--ink-strong); }
.lp-ic { width: 22px; height: 22px; flex: none; } .lp-ic.big { width: 30px; height: 30px; }
.lp-rt2 { font-size: .88rem; line-height: 1.45; }
.lp-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.lp-f { display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: var(--ink-dim); } .lp-f textarea { min-height: 80px; }
.lp-mus { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink); }
.lp-sh { display: flex; align-items: baseline; justify-content: space-between; } .lp-sh h2 { margin: 0 0 10px; font-family: var(--font-display); } .lp-sh .muted { font-size: .8rem; }
.lp-scenes { display: flex; flex-direction: column; gap: 10px; }
.lp-sc { display: grid; grid-template-columns: 130px 1fr; border-radius: 10px; border: 1px solid var(--vt-line3); background: var(--vt-card); overflow: hidden; margin-left: calc(var(--d, 0) * 16px); cursor: grab; }
.lp-sc.act { border-color: var(--vt-good-line); } .lp-sc.drag { opacity: .4; } .lp-sc.over { box-shadow: 0 -3px 0 var(--vt-gold); }
.lp-th { grid-row: 1 / span 2; min-height: 96px; border: 0; padding: 0; cursor: pointer; background: var(--vt-sel) center/cover no-repeat; color: var(--ink-dim); font-size: .78rem; }
.lp-sb { padding: 8px 10px 4px; min-width: 0; }
.lp-st { display: flex; align-items: baseline; gap: 4px; } .lp-st b { color: var(--ink-strong); } .lp-more { margin-left: auto; border: 0; background: none; color: var(--ink-dim); cursor: pointer; }
.lp-si { font-size: .8rem; margin: 2px 0 6px; }
.lp-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.lp-tag { padding: 1px 9px; border-radius: 99px; border: 1px solid var(--vt-line2); font-size: .76rem; color: var(--vt-hi2); } .lp-tag.act { border-color: var(--vt-good-line); color: var(--vt-good); background: rgba(143,210,122,.1); } .lp-tag.warn { border-color: #6a5540; color: #b89a70; }
.lp-btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--vt-sel); }
.lp-new { margin-top: 14px; padding: 12px; border-radius: 12px; border: 1px dashed var(--vt-line2); } .lp-new > b { color: var(--accent); }
.lp-newb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.lp-newb button { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px; border-radius: 8px; border: 1px solid var(--vt-line); background: var(--vt-card); color: var(--ink-strong); cursor: pointer; } .lp-newb button:first-child { background: var(--vt-sel); border-color: var(--vt-line2); }
.lp-newb span { font-size: .76rem; color: var(--ink-dim); }
.lp-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.lp-lib button { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 8px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink); cursor: pointer; }
@media (max-width: 1200px) { .lp { grid-template-columns: 1fr; } }

/* Сцена: правая колонка «Сцена» */
.vs-scbtns { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.vs-scbtns .vp-big b { display: inline-flex; align-items: center; gap: 8px; } .vs-ic { width: 22px; height: 22px; }
.vs-wmenu label { display: flex; flex-direction: column; gap: 4px; }
/* Лист игрока: «Атаки» — все действия списком */
.ps-acts { display: flex; flex-direction: column; gap: 4px; }
.ps-act { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink); cursor: pointer; text-align: left; }
.ps-act:hover:not(:disabled) { border-color: var(--accent); } .ps-act:disabled { opacity: .6; cursor: default; }
.ps-aic { width: 26px; height: 26px; flex: none; }
.ps-an { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ps-an b { color: var(--ink-strong); font-size: .86rem; } .ps-an i { font-style: normal; font-size: .8rem; color: var(--ink-dim); }
.ps-lv { flex: none; width: 18px; height: 18px; border-radius: 4px; background: var(--lv); color: var(--vt-on-gold); font-size: .72rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ps-res .ps-ln i { font-style: normal; font-size: .78rem; color: var(--ink-dim); } .ps-rc { font-size: .82rem; color: var(--ink-dim); white-space: nowrap; }
.ps-info { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font-size: .72rem; align-items: center; justify-content: center; cursor: help; }
/* Редактор сцены: полоса «Применить у игроков» внизу поля (F4) */
.vtt.mode-setup.editing .vtt-info { top: auto; bottom: 14px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 28px); padding: 8px 12px; border-radius: 12px; border: 1px solid var(--vt-line2); background: var(--vt-glass); }
.vh-dm { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
/* Стол мастера (F5): без крошек и строки «Вид мастера…»; колонка инструментов шире, значки по центру */
.vtt.gm-rail:not(.mode-setup) .vb-crumbs, .vtt.gm-rail:not(.mode-setup) .vtt-info { display: none; }
.vtt.gm-rail:not(.mode-setup) .vtt-main { grid-template-columns: 60px minmax(0, 1fr) calc(var(--side-w, 340px) + 71px); }
.vtt.gm-rail:not(.mode-setup) .vtt-tools { align-items: center; gap: 8px; padding: 10px 0; }
.vtt.gm-rail:not(.mode-setup) .vt-tool { width: 44px; height: 44px; border-radius: 10px; }
.vtt.gm-rail:not(.mode-setup) .vt-tool .vt-ico { width: 26px; height: 26px; }
.vtt.gm-rail:not(.mode-setup) .vt-sep { width: 32px; }
.vb-stabs .vb-stab { text-decoration: none; }

/* ===================== Сцена на странице кампании: «Создание» (F3) и «Редактор» (F4) ===================== */
.vtt-edleft { display: none; }
.vtt.mode-setup.editing .vtt-atlas, .vtt.mode-setup.editing .vtt-tabs, .vtt.mode-setup.editing .vtt-rz { display: none; }
.vtt.mode-setup.editing .vtt-edleft { grid-column: 1; grid-row: 1; }
.vtt.mode-setup.editing .vtt-tools { grid-column: 2; grid-row: 1; }
.vtt.mode-setup.editing .vtt-board { grid-column: 3; grid-row: 1; }
.vtt.mode-setup.editing .vtt-side { grid-column: 4; grid-row: 1; padding-right: 0; width: auto; background: var(--vt-bg); }
.vtt.mode-setup.editing.ed-create .vtt-main { grid-template-columns: 300px 0 minmax(0, 1fr) 320px; }
.vtt.mode-setup.editing.ed-edit .vtt-main { grid-template-columns: 0 76px minmax(0, 1fr) 330px; }
.vtt.mode-setup.editing.ed-create .vtt-tools { visibility: hidden; padding: 0; border: 0; overflow: hidden; }
.vtt.mode-setup.editing.ed-create .vtt-edleft { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; padding: 14px; background: var(--vt-bg); border-right: 1px solid var(--line); }
.vtt.mode-setup.editing .vtt-panel { padding: 0; overflow: hidden; display: flex; flex-direction: column; }

/* Левая колонка: Генератор / Файл / Библиотека */
.el-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--vt-line2); border-radius: 10px; overflow: hidden; flex: none; }
.el-tabs button { border: 0; background: transparent; color: var(--vt-ink); padding: 8px 4px; font-weight: 700; font-size: .82rem; cursor: pointer; }
.el-tabs button + button { border-left: 1px solid var(--vt-line); } .el-tabs button.on { background: var(--vt-gold); color: var(--vt-on-gold); }
.el-q { width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--vt-line); background: var(--vt-field); color: var(--ink); flex: none; }
.el-cats { display: flex; flex-direction: column; gap: 2px; flex: none; }
.el-cats button { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; text-align: left; font: inherit; font-size: .9rem; }
.el-cats button i { font-style: normal; font-size: .78rem; color: var(--ink-dim); white-space: nowrap; }
.el-cats button:hover { background: rgba(255,255,255,.04); } .el-cats button.on { background: var(--vt-sel); font-weight: 700; color: var(--ink-strong); }
.el-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.el-tile { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--vt-line); border-radius: 6px; overflow: hidden; background: var(--vt-field); cursor: pointer; color: var(--ink-strong); text-align: left; }
.el-tile canvas { width: 100%; height: auto; aspect-ratio: 150 / 96; display: block; }
.el-tile span { padding: 4px 8px 5px; font-size: .82rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.el-tile:hover { border-color: var(--vt-line2); } .el-tile.on { border-color: var(--vt-gold); box-shadow: 0 0 0 1px var(--vt-gold); }
.el-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 14px; border: 2px dashed var(--vt-line); border-radius: 12px; text-align: center; }
.el-drop.over { border-color: var(--vt-gold); background: rgba(216,174,98,.08); } .el-drop p { font-size: .82rem; margin: 4px 0 0; }
.el-hint { font-size: .86rem; margin: 0; }
.el-lib { display: flex; flex-direction: column; gap: 6px; }
.el-lib button { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; gap: 0 10px; align-items: center; padding: 6px; border: 1px solid var(--vt-line); border-radius: 8px; background: var(--vt-field); color: var(--ink); cursor: pointer; text-align: left; }
.el-lib .el-th { grid-row: span 2; width: 64px; height: 42px; border-radius: 4px; background: var(--vt-card2) center / cover; }
.el-lib b { font-size: .84rem; } .el-lib i { font-style: normal; font-size: .78rem; color: var(--ink-dim); }

/* Поле «Создания»: под ним подпись и варианты */
.vtt.mode-setup.ed-create .vtt-board-gl { bottom: 142px; }
.vtt.mode-setup.editing.ed-create .vtt-info { position: absolute; top: auto; left: 0; right: 0; bottom: 0; transform: none; max-width: none; height: 142px; padding: 8px 14px 12px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--vt-bg); }
.ec-bar { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.ec-cap { display: flex; align-items: baseline; gap: 4px; font-size: .86rem; white-space: nowrap; overflow: hidden; } .ec-cap b { color: var(--ink-strong); }
.ec-st { margin-left: auto; color: var(--ink-dim); }
.ec-vars { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; min-height: 0; }
.ec-var { position: relative; padding: 0; border: 1px solid var(--vt-line); border-radius: 6px; overflow: hidden; background: var(--vt-field); cursor: pointer; }
.ec-var canvas { width: 100%; height: 100%; display: block; }
.ec-var i { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; background: var(--vt-glass); color: var(--vt-ink-hi); font-style: normal; font-size: .76rem; font-weight: 700; }
.ec-var.on { border-color: var(--vt-gold); box-shadow: 0 0 0 1px var(--vt-gold); }
.ec-var.more { border-style: dashed; color: var(--vt-ink); font-weight: 700; font-size: .82rem; }
.ec-var.more:hover, .ec-var:hover { border-color: var(--vt-line2); }

/* Правая колонка: «Параметры», свойства, «Слои» */
.ep-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.ep { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.vtt-panel > .ep { flex: 1; min-height: 0; overflow-y: auto; }
.ep-h { margin: 0; font-family: var(--font-display); font-size: 1.35rem; color: var(--ink-strong); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ep-h .muted { margin-left: auto; font-family: inherit; font-size: .8rem; font-weight: 400; }
.ep-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ep-f > span, .ep-sl > span, .ep-sub { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vt-label); }
.ep-f input:not([type=checkbox]):not([type=color]), .ep-f select, .ep select, .ep input[type=search] { width: 100%; padding: 9px 12px; border-radius: 6px; border: 1px solid var(--vt-line); background: var(--vt-field); color: var(--ink-strong); font: inherit; }
.ep-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; } .ep-row > .ep-f { flex: 1; }
.ep-seg { display: flex; border: 1px solid var(--vt-line); border-radius: 6px; overflow: hidden; }
.ep-seg button { flex: 1; border: 0; background: transparent; color: var(--vt-ink); padding: 8px 6px; font-weight: 700; font-size: .86rem; cursor: pointer; white-space: nowrap; }
.ep-seg button + button { border-left: 1px solid var(--vt-line); } .ep-seg button.on { background: var(--vt-gold); color: var(--vt-on-gold); }
.ep-sl { display: flex; flex-direction: column; gap: 4px; }
.ep-sl > span { display: flex; justify-content: space-between; } .ep-sl b { color: var(--ink-strong); letter-spacing: 0; }
.ep-sl input[type=range] { width: 100%; accent-color: var(--vt-gold); }
.ep-seed { display: flex; gap: 8px; } .ep-seed input { flex: 1; } .ep-seed .btn { width: 40px; flex: none; }
.ep-cks { display: flex; flex-direction: column; gap: 8px; }
.ep-ck { display: flex; align-items: center; gap: 10px; font-size: .88rem; cursor: pointer; }
.ep-ck input { width: 18px; height: 18px; accent-color: var(--vt-gold); } .ep-ck i { display: none; }
.ep-adv summary { cursor: pointer; color: var(--ink-dim); font-size: .85rem; margin-bottom: 8px; } .ep-adv[open] { display: flex; flex-direction: column; gap: 10px; }
.ep-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.ep-foot .btn { width: 100%; justify-content: center; padding: 11px; }
.ep-foot .btn.primary, .eb-bar .btn.primary { background: #8a3a24; border-color: #b0563a; color: #ffe9c8; }
.ep-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-chips span, .ep-chips button { padding: 3px 10px; border-radius: 99px; border: 1px solid var(--vt-line2); color: var(--vt-hi2); font-size: .8rem; background: none; }
.ep-chips.sel button { cursor: pointer; } .ep-chips.sel button.on { background: var(--vt-gold); color: var(--vt-on-gold); }
.ep-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ep-tabs { display: inline-flex; margin-left: auto; border: 1px solid var(--vt-line); border-radius: 6px; overflow: hidden; }
.ep-tabs button { border: 0; background: none; color: var(--vt-ink); padding: 3px 8px; font-size: .76rem; font-family: inherit; cursor: pointer; } .ep-tabs button.on { background: var(--vt-gold); color: var(--vt-on-gold); }
.ep-list { display: flex; flex-direction: column; gap: 4px; }
.ep-li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; } .ep-li b { flex: 1; min-width: 0; font-size: .84rem; } .ep-li .muted { font-size: .78rem; }
.ep-layers { padding: 14px 10px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.ep-lh { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px 4px; }
.ep-layer { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--vt-sel); border-radius: 8px; background: var(--vt-card); color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.ep-layer:hover { border-color: var(--vt-line2); } .ep-layer:disabled { cursor: default; }
.ep-lic { width: 26px; height: 26px; flex: none; }
.ep-layer span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ep-layer b { font-size: .84rem; color: var(--ink-strong); }
.ep-layer span i { font-style: normal; font-size: .76rem; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-layer em { font-style: normal; font-size: .8rem; font-weight: 700; color: var(--vt-good); } .ep-layer.off em { color: #e07a5a; } .ep-layer.off b { opacity: .6; }

/* «Редактор»: группы слева, режимы над полем, полоса правок внизу */
.vtt.mode-setup.ed-edit .vtt-tools { align-items: stretch; gap: 4px; padding: 8px 6px; background: var(--vt-bg); }
.vtt.mode-setup.ed-edit .vtt-tools { overflow: visible; }
.vt-tool.ed-g { margin: 2px; text-decoration: none; width: auto; height: auto; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px; border-radius: 10px; font-size: .74rem; color: var(--vt-ink); }
.vt-tool.ed-g .vt-ico { width: 28px; height: 28px; }
.vt-tool.ed-g.on { background: var(--vt-sel); outline: 1px solid var(--vt-gold); color: var(--vt-hi); }
.vtt.mode-setup.ed-edit .vtt-toolopts.ed { top: 12px; bottom: auto; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 6px; border-radius: 12px; border-color: var(--vt-line2); gap: 6px; align-items: center; }
.et-bar { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; justify-content: center; white-space: nowrap; }
.et-bar > b { padding: 0 10px; color: var(--ink-strong); font-size: .86rem; }
.et-bar button { border: 1px solid var(--vt-line); border-radius: 6px; background: transparent; color: var(--vt-ink); padding: 5px 11px; font-size: .86rem; cursor: pointer; }
.et-bar button.on { border-color: var(--vt-gold); background: var(--vt-sel); color: var(--vt-hi); font-weight: 700; }
.et-bar.sub { font-size: .82rem; } .et-bar.sub .muted { padding: 0 6px; }
.et-snap { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; margin-left: 4px; border-left: 1px solid var(--vt-line); color: var(--vt-ink); font-size: .86rem; cursor: pointer; }
.et-snap input { position: absolute; opacity: 0; width: 0; height: 0; }
.et-snap i { width: 32px; height: 18px; border-radius: 99px; background: var(--vt-line); position: relative; transition: background .15s; }
.et-snap i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--vt-ink); transition: left .15s; }
.et-snap input:checked + i { background: var(--vt-gold); } .et-snap input:checked + i::after { left: 16px; background: var(--vt-on-gold); }
.et-snap input:focus-visible + i { outline: 2px solid var(--vt-hi); }
.et-hint { font-size: .78rem; color: var(--ink-dim); text-align: center; max-width: 620px; }
.et-relief { display: flex; flex-direction: column; gap: 6px; }
.vtt.mode-setup.editing.ed-edit .vtt-info { bottom: 14px; left: 14px; right: 14px; transform: none; max-width: none; padding: 8px 10px 8px 16px; }
.eb-bar { display: flex; align-items: center; gap: 12px; font-size: .86rem; }
.eb-bar > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-dot { width: 10px; height: 10px; border-radius: 50%; background: #e0b04a; flex: none; } .eb-dot.ok { background: #7fbf6a; }
.eb-k { font-size: .8rem; white-space: nowrap; }

/* Настройки сцены (M2.3) под карточкой сцены */
.lp-set { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding: 14px; border: 1px solid var(--vt-line); border-radius: 10px; background: var(--vt-bg); }
.lp-set-h { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink-strong); }
.lp-set-r { display: flex; flex-direction: column; gap: 5px; } .lp-set-r > span { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vt-label); }
.lp-set-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp-set-in { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--vt-line); border-radius: 6px; background: var(--vt-field); font-size: .84rem; }
.lp-set-in input { width: 58px; padding: 2px 4px; border: 0; background: none; color: var(--ink-strong); font: inherit; }
.lp-set-in select { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink-strong); font: inherit; }
.lp-set-n { margin: 0; font-size: .82rem; }
.lp-btns .btn.on { border-color: var(--vt-gold); color: var(--vt-hi); }
@media (max-width: 1100px) {
  .vtt.mode-setup.editing.ed-create .vtt-main { grid-template-columns: 240px 0 minmax(0, 1fr) 280px; }
  .vtt.mode-setup.editing.ed-edit .vtt-main { grid-template-columns: 0 70px minmax(0, 1fr) 290px; }
}
.vtt.mode-setup.ed-edit .vtt-toolopts.ed { overflow-x: auto; }

/* ===================== Стол мастера по F5 (пересборка): полоса, лента, Ширма, карточка токена, хотбар существа ===================== */
/* Полоса: ← · вкладки сцен · «● Бой» · поиск · игроки · «онлайн · мс · FPS» · Завершить */
.vtt.gm-rail:not(.mode-setup) .vb-prev { order: 0; }
.vtt.gm-rail:not(.mode-setup) .vb-scenes { order: 1; }
.vtt.gm-rail:not(.mode-setup) .vb-status { order: 2; cursor: pointer; }
.vtt.gm-rail:not(.mode-setup) .vb-act { order: 3; margin-left: auto; }
.vtt.gm-rail:not(.mode-setup) .vb-party { order: 4; }
.vtt.gm-rail:not(.mode-setup) .vb-net { order: 5; }
.vb-status.hidden { display: none; }
/* Чат мастера — вкладка ленты; закрыта — чата нет, на значке — число новых */
.vtt.gm-rail:not(.mode-setup):not(.chat-tab) .vtt-chat, .vtt.gm-rail:not(.mode-setup):not(.chat-tab) .vtt-rzh { display: none; }
.vtt.gm-rail:not(.mode-setup):not(.chat-tab) .vtt-panel { flex: 1; }
.vtt-tabs button { position: relative; }
.vt-badge { position: absolute; top: 2px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #c0392b; color: #fff; font-style: normal; font-size: .72rem; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--panel); }
/* Ширма */
.sh-row { width: 100%; text-align: left; font: inherit; cursor: pointer; color: var(--ink); }
.sh-row:hover { border-color: var(--vt-line2); } .sh-row.sel { border-color: var(--vt-line2); background: var(--vt-sel); }
.sh-row span { min-width: 0; } .sh-row em { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-add { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 2px; }
.sh-q { position: relative; flex: 1; min-width: 0; } .sh-q input { width: 100%; }
.sh-q .vp-drop { position: absolute; left: 0; right: 0; top: 100%; z-index: 6; background: var(--panel); border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.45); }
.sh-q .vp-drop:empty { display: none; }
.vp-partybox { margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; } .vp-partybox .sh-sec { margin-top: 0; }
/* Карточка токена у токена (F5) */
.vtt.gm-rail:not(.mode-setup) .vtt-hud { right: auto; bottom: auto; width: 290px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--vt-line2); background: var(--vt-glass); box-shadow: 0 14px 34px rgba(0,0,0,.55); }
.vtt-hud .vh-top { align-items: baseline; margin-bottom: 8px; } .vtt-hud .vh-top b { font-size: .98rem; } .vtt-hud .vh-top .muted { font-size: .8rem; }
.vtt-hud .vh-hp { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .vtt-hud .vh-hp .hp-bar { flex: 1; }
.vtt-hud .vh-hpv { font-weight: 700; color: var(--ink-strong); white-space: nowrap; }
.vtt-hud .vh-ac { padding: 2px 8px; border-radius: 6px; border: 1px solid var(--vt-line2); font-weight: 800; color: var(--ink-strong); white-space: nowrap; }
.vh-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 8px; }
.vh-c { padding: 2px 9px; border-radius: 99px; border: 1px solid var(--vt-line2); font-size: .78rem; color: var(--vt-hi2); }
.vh-c.bad { border-color: #8e3526; background: rgba(142,53,38,.25); color: #ff9a7a; } .vh-c.conc { border-color: #4f6f8e; color: #9cc3ff; }
.vh-leg { display: flex; align-items: center; gap: 5px; margin: 0 0 8px; font-size: .8rem; color: var(--ink-dim); } .vh-leg span { margin-right: auto; }
.vtt-hud .vh-btns { display: grid; grid-template-columns: repeat(4, auto); gap: 6px; } .vtt-hud .vh-btns .btn.on { border-color: var(--vt-gold); color: var(--vt-hi); }
/* Хотбар существа у мастера: «имя / действия» + одна строка */
.vtt-hotbar.hidden { display: none; }
.vtt-hotbar.gm-hot { gap: 10px; }
.vh-who2 { display: flex; flex-direction: column; padding: 0 8px; max-width: 110px; } .vh-who2 b { color: var(--vt-ink-hi); font-size: .86rem; line-height: 1.15; } .vh-who2 span { color: var(--ink-dim); font-size: .76rem; }
.sv-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
/* Полоса инициативы: «Следующий ход →» в две строки как на F5 */
.vs-next span { display: block; font-size: 1.1rem; line-height: 1; }
.vtt.gm-rail:not(.mode-setup) .vb-scenes { flex: 0 1 auto; min-width: 0; }
.vtt-hud .vh-top { flex-wrap: nowrap; } .vtt-hud .vh-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vtt-hud .vh-top .muted { white-space: nowrap; flex: none; }
.vtt-hud .vh-btns { grid-template-columns: repeat(4, minmax(0, 1fr)); } .vtt-hud .vh-btns .btn { padding-left: 4px; padding-right: 4px; justify-content: center; }
.vtt.gm-rail:not(.mode-setup) .vtt-hud { width: 320px; }
.vs-next { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
/* Перетаскивание файла карты: подсветка места, куда упадёт */
.file-over { outline: 2px dashed var(--vt-gold); outline-offset: -4px; background-color: rgba(216,174,98,.06); }
.vtt-world.file-over::after, .vtt-setup.file-over::after { content: "Отпустите файл — карта загрузится"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 12px 18px; border-radius: 12px; background: var(--vt-glass); border: 1px solid var(--vt-gold); color: var(--vt-hi); font-weight: 700; z-index: 20; pointer-events: none; }
.vw-empty .vw-loc-card .btn { margin-top: 8px; }
/* Светлая тема: акцентные тексты — тёмные оттенки (светлые пастельные на пергаменте не читаются) */
[data-theme="light"] .vb-status.combat, [data-theme="light"] .vh-c.bad, [data-theme="light"] .ps-hpl em.bad, [data-theme="light"] .vt-mvw.over b, [data-theme="light"] .ep-layer.off em, [data-theme="light"] .vp-n { color: #9a3020; }
[data-theme="light"] .vtt-info { color: var(--vt-ink); }
[data-theme="light"] .vc-extra, [data-theme="light"] .vc-tr-mv.over, [data-theme="light"] .vt-mv.over, [data-theme="light"] .vb-ping.slow, [data-theme="light"] .ps-hpl em.mid { color: #8a5a10; }
[data-theme="light"] .vc-msg.whisper, [data-theme="light"] .vh-tab.sum { color: #5a2fa0; } [data-theme="light"] .vh-tab.sum.on { background: #e7dcf5; color: #3d1a78; }
[data-theme="light"] .vh-sub, [data-theme="light"] .vs-round span { color: var(--vt-label); }
[data-theme="light"] .vt-tag { color: #2f6b2a; } [data-theme="light"] .ps-chip.conc, [data-theme="light"] .vh-c.conc { color: #234f8a; }
[data-theme="light"] .ps-det summary { color: #8a3a1a; }
/* Размер карты в футах (редактор: «Создание» и «Сетка и размер») */
.ep-sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ep-sizes button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border: 1px solid var(--vt-line); border-radius: 8px; background: var(--vt-field); color: var(--vt-ink); cursor: pointer; font: inherit; }
.ep-sizes button b { font-size: .8rem; } .ep-sizes button i { font-style: normal; font-size: .72rem; color: var(--ink-dim); }
.ep-sizes button.on { border-color: var(--vt-gold); background: var(--vt-sel); color: var(--vt-hi); }
.ep-own { margin-top: 6px; }
[data-theme="light"] .vs-chip.hid { color: var(--vt-label); }
.vtt-panel .statblock { overflow-x: auto; } .vtt-panel .statblock table { font-size: .82rem; }
.vc-apply { display: inline-flex; gap: 4px; margin-left: 6px; } .vc-apply .btn { padding: 1px 8px; font-size: .78rem; }
.ps-arow { display: flex; flex-direction: column; gap: 2px; }
.ps-free { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px 4px 44px; }
.ps-fr { font-size: .8rem; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--vt-line); text-decoration: none; color: var(--vt-hi2); cursor: pointer; }
.ps-fr:hover { border-color: var(--vt-gold); color: var(--vt-hi); }
.vp-note { font-size: .78rem; }
.vtt.chat-tab .vtt-chat { flex: 1 1 auto !important; min-height: 0; }   /* вкладка «Чат»: на всю высоту, сохранённая высота чата не действует */
/* Стол мастера: полоса кампании (как на странице кампании) над полосой стола */
.vtt-navbar { flex-wrap: nowrap; gap: 14px; padding: 7px 14px; min-height: 50px; border-bottom: 1px solid var(--vt-line3); background: var(--vt-bar); }
.vtt-navbar .vs-seg button.on { cursor: default; }
/* Карточка токена: компактнее; полоса хитов и число — интерактивные; «Убрать со сцены» */
.vtt.gm-rail:not(.mode-setup) .vtt-hud { width: 272px; height: auto; max-height: none; padding: 10px 12px; }
.vtt-hud .vh-btns { gap: 5px; } .vtt-hud .vh-btns .btn { font-size: .78rem; min-height: 30px; }
.vtt-hud .vh-del { margin-left: auto; border: 0; background: none; cursor: pointer; font-size: .95rem; opacity: .75; padding: 0 4px; }
.vtt-hud .vh-del:hover { opacity: 1; } .vtt-hud .vh-top .x { margin-left: 2px; }
.vh-hpbar { cursor: pointer; height: 10px; border-radius: 99px; } .vh-hpbar:hover { outline: 1px solid var(--vt-gold); }
.vtt-hud button.vh-hpv { border: 0; background: none; color: var(--ink-strong); font: inherit; font-weight: 700; cursor: text; padding: 0 2px; border-bottom: 1px dashed var(--vt-line2); }
.vh-hpin { width: 64px; padding: 2px 6px; }
/* Ширма: портрет/токен, полоса хитов, «👁» и «🗑», перетаскивание на поле */
.sh-row { grid-template-columns: 24px 34px minmax(0, 1fr) auto auto auto; cursor: grab; }
.sh-av { position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--vt-card2) center / cover; border: 2px solid var(--vt-line2); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--vt-ink); font-size: .9rem; }
.sh-av.pc { border-color: var(--vt-gold); } .sh-av.foe { border-color: #c0503a; }
.sh-skull { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; background: rgba(0,0,0,.55); border-radius: 50%; font-size: 1rem; }
.sh-nm { min-width: 0; display: flex; flex-direction: column; } .sh-hb { display: block; height: 3px; margin-top: 3px; border-radius: 99px; background: var(--vt-shade); overflow: hidden; text-decoration: none; }
.sh-hb s { display: block; height: 100%; background: var(--vt-hp); text-decoration: none; }
.sh-row.dead .sh-hb s { background: #c0392b; }
.sh-ic { display: inline-flex; gap: 2px; } .sh-ic .lss-iconbtn { width: 26px; height: 26px; font-size: .85rem; }
.np-put { flex: none; margin-left: auto; align-self: center; }
/* Ширма: значки «👁 / 🗑» ровно по центру кнопок */
.sh-ic { align-items: center; } .sh-ic .lss-iconbtn { display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.sh-ic .sh-ico { width: 18px; height: 18px; display: block; }
/* Партия на поле — карточки как в Ширме */
.sh-row.sh-party i { color: var(--vt-hp); font-size: .7rem; } .sh-row.sh-party.on { border-color: var(--vt-good-line); }
.sh-row.sh-party { grid-template-columns: 14px 34px minmax(0, 1fr) auto auto 0; }
/* Ширма: «👁 / 🗑» — крупнее и заметнее */
.sh-ic { gap: 4px; }
.sh-ic .lss-iconbtn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--vt-line2); background: var(--vt-field); font-size: 1.05rem; }
.sh-ic .lss-iconbtn:hover { border-color: var(--vt-gold); background: var(--vt-sel); }
.sh-ic .sh-ico { width: 24px; height: 24px; filter: drop-shadow(0 0 1px rgba(0,0,0,.6)); }
.sh-row.dead .sh-ic .lss-iconbtn { opacity: 1; }
.sh-ic .sh-trash { width: 20px; height: 20px; color: #e0654a; filter: none; }
.sh-ic [data-rdel]:hover { border-color: #e0654a; background: rgba(192,57,43,.18); }
.sh-row.dead .sh-ic [data-rdel] .sh-trash { color: #e0654a; }
.sh-skull { background: rgba(0,0,0,.25); font-size: 1.15rem; }
[data-theme="light"] .sh-ic .sh-trash { color: #b0391f; }
/* Поверженный: тусклые портрет и текст, кнопки — как обычно */
.sh-row.dead { opacity: 1; } .sh-row.dead > i, .sh-row.dead .sh-av, .sh-row.dead .sh-nm, .sh-row.dead .sh-hp, .sh-row.dead .sh-ac { opacity: .5; }
/* Имя — не больше двух строк, без наложения на хиты */
.sh-nm b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; word-break: break-word; }
.sh-row { column-gap: 8px; } .sh-hp { white-space: nowrap; }
/* Череп поверженного — строго по центру портрета */
.sh-av .sh-skull { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(20,16,14,.82); }
.sh-av .sh-skull svg { width: 22px; height: 22px; display: block; }
.sh-row.dead .sh-av { opacity: .8; }
/* Инициатива на полосе боя — мастер меняет щелчком */
.vs-in-ed { border: 1px dashed var(--vt-line2); border-radius: 6px; background: var(--vt-field); color: var(--vt-hi); font: inherit; font-weight: 800; font-size: .82rem; padding: 0 6px; min-width: 26px; cursor: text; line-height: 1.5; }
.vs-in-ed:hover { border-color: var(--vt-gold); border-style: solid; }
.vs-in-inp { width: 46px; padding: 1px 4px; font-size: .82rem; font-weight: 800; text-align: center; border: 1px solid var(--vt-gold); border-radius: 6px; background: var(--vt-field); color: var(--vt-hi); }
/* Лист за столом: «Умения» со счётчиками, опциональные способности */
.ps-res .ps-rc{display:inline-flex;align-items:center;gap:4px}
.ps-rb{width:22px;height:22px;border-radius:6px;border:1px solid var(--vt-line);background:var(--vt-field);color:var(--vt-text);cursor:pointer;line-height:1;padding:0}
.ps-rb[disabled]{opacity:.4;cursor:default}
.ps-res.spent b{color:var(--vt-muted,#888)}
.ps-res{flex-wrap:wrap}
.ps-rdet{flex-basis:100%;margin:2px 0 0}
.ps-opt{font-weight:400;font-size:11px;opacity:.75;margin-left:4px}
.ps-tag{font-style:normal;font-size:10px;opacity:.65;margin-left:4px}
.ps-ad{font-size:12px;line-height:1.45;padding:4px 0}
.ps-ad ul,.ps-ad ol{margin:4px 0;padding-left:18px}
button.ps-chip{cursor:pointer;border:1px solid var(--vt-line);background:var(--vt-field);color:var(--vt-text)}
/* Окно «Промах!» — как «Попадание!», холодный серо-синий тон; единица на к20 — тёмнее */
.vt-hit.miss { background: radial-gradient(120% 90% at 50% 0%, #1e2a3a 0%, #121821 70%); border-color: #6f8aa8; box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 0 4px rgba(111,138,168,.18); color: #dfe8f3; }
.vt-hit.miss .vh-word { color: #cfe0f5; text-shadow: 0 2px 0 #0d1520, 0 0 18px rgba(120,160,210,.45); }
.vt-hit.miss .vh-sub { color: #a9bcd3; }
.vt-hit.miss .vh-row { border-color: rgba(111,138,168,.35); }
.vt-hit.fumble { border-color: #7a3b8f; box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 26px rgba(122,59,143,.55); }
.vt-hit.fumble .vh-word { color: #e8c7f5; text-shadow: 0 0 6px #7a3b8f, 0 2px 0 #1a0d20; }
/* Эффекты заклинаний на токене (карточка токена мастера, «Эффекты» игрока) и карточки в чате */
.vh-fx { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; }
.vh-fxr { display: flex; align-items: center; gap: 6px; font-size: .82rem; }
.vh-fxr > span { flex: 1; min-width: 0; }
.vh-fxr i { font-style: normal; color: var(--vt-muted, #a99); }
.vh-fxr .btn.sm { padding: 1px 7px; min-height: 0; }
.vc-card.fx { border-left: 3px solid #9b6dff; }
.vc-smitefx { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* Выбор ячейки при наложении заклинания: круг цветом, остаток, урон на этой ячейке */
.vp-slotpick { display: flex; flex-direction: column; gap: 6px; }
.vp-sp { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 4px 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--vt-line); border-left: 4px solid var(--lv, var(--vt-line2)); background: var(--vt-card); color: var(--vt-ink); text-align: left; cursor: pointer; font: inherit; }
.vp-sp:hover:not(:disabled), .vp-sp:focus-visible { border-color: var(--lv, var(--vt-gold)); background: var(--vt-card2); }
.vp-sp b { color: var(--vt-ink-hi); white-space: nowrap; }
.vp-sp-n { font-size: .8rem; color: var(--vt-label); white-space: nowrap; }
.vp-sp-d { font-size: .82rem; color: var(--vt-ink); }
.vp-sp.empty { opacity: .45; cursor: not-allowed; }
.vp-sp.none { grid-template-columns: auto 1fr; border-left-color: var(--vt-line2); }
/* Хотбар в свой ход — золотая подсветка */
#vtHot.my-turn { box-shadow: 0 0 0 2px var(--vt-hi), 0 0 18px rgba(255,210,122,.45); }
#vtHot.my-turn .vh-slot:not(.empty) { border-color: var(--vt-gold); }
/* Окно попадания у зрителей: кто бросает урон */
.vh-wait { margin-top: 8px; font-size: .86rem; text-align: center; }
/* Срабатывание эффекта — решает мастер (плашка над полем и карточка в чате) */
.vt-ask { background: var(--vt-glass); border-color: var(--vt-gold); color: var(--vt-ink); }
.vt-ask b { color: var(--vt-hi); }
.vc-card.ask { border-color: var(--vt-gold); }
.vc-ask { display: flex; gap: 6px; margin-top: 6px; }
/* Ширма: цвет обводки токена */
.sh-col i { display: block; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.ring-pop { position: fixed; z-index: 3000; width: 232px; padding: 10px; border-radius: 12px; border: 1px solid var(--vt-line2); background: var(--vt-glass); color: var(--vt-ink); box-shadow: 0 10px 28px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 8px; }
.ring-head { font-size: .84rem; color: var(--vt-label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ring-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ring-grid button { aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(0,0,0,.35); background: var(--c); cursor: pointer; padding: 0; }
.ring-grid button:hover, .ring-grid button:focus-visible { transform: scale(1.12); outline: 2px solid var(--vt-hi); outline-offset: 1px; }
.ring-grid button.on { outline: 3px solid var(--vt-hi); outline-offset: 1px; }
/* Ширма: три кнопки в строке (цвет, лист, убрать) — компактнее, имени остаётся место */
.sh-list .sh-row { gap: 6px; padding-left: 8px; padding-right: 8px; }
.sh-list .sh-ic { gap: 2px; }
.sh-list .sh-ic .lss-iconbtn { width: 27px; height: 27px; }
.sh-list .sh-nm b { overflow-wrap: anywhere; word-break: normal; }
/* Настройки кампании: анимации, кубики, звуки */
.cs-fx { border: 1px solid var(--vt-line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.cs-fx legend { font-size: .82rem; color: var(--vt-label); padding: 0 4px; }
/* Окно «Попадание!»: число урона появляется, когда легли кубики урона (fxlayer.js) */
.vt-hit .vh-later { visibility: hidden; }
/* Лист за столом: расходуемые умения в узкой панели — как на телефоне */
@container vpsheet (max-width: 760px) {
  .res-row.res-use { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name acts" "ctl ctl"; gap: 6px 8px; align-items: center; }
  .res-use .res-name { grid-area: name; }
  .res-use .res-acts { grid-area: acts; align-self: start; margin-left: 0; }
  .res-use .res-ctl { grid-area: ctl; justify-content: flex-start; flex-wrap: wrap; }
}
/* Заметки игрока за столом: персонажа (как в листе) сверху, кампании — ниже */
.pn-camp { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--vt-line); }
/* Подпись ячейки хотбара не шире ячейки: многоточие; на телефоне длинная — бегущая строка (combat.js marquee) */
.vh-slot .vh-nm { max-width: calc(100% - 4px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vh-slot .vh-nm.mq { text-overflow: clip; text-align: left; }
.vh-slot .vh-nm.mq > span { display: inline-block; animation: vhMq var(--mqt, 4s) ease-in-out infinite alternate; }
@keyframes vhMq { 0%, 18% { transform: translateX(0); } 82%, 100% { transform: translateX(var(--mq, 0)); } }
/* Полоса инициативы: мастер передаёт ход — «▶» в углу карточки (видна при наведении, на сенсорных экранах — всегда) */
.vs-turn { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--vt-gold); background: var(--vt-card); color: var(--vt-gold); font-size: .62rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0 0 0 2px; cursor: pointer; opacity: 0; transition: opacity .15s; z-index: 2; }
.vs-card:hover .vs-turn, .vs-card:focus-within .vs-turn, .vs-turn:focus-visible { opacity: 1; }
.vs-turn:hover { background: var(--vt-gold); color: var(--vt-on-gold); }
@media (hover: none) { .vs-turn { opacity: .9; } }
