@font-face { font-family: 'Alegreya SC'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/alegreya-sc-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Alegreya SC'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/alegreya-sc-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Alegreya SC'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/alegreya-sc-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Alegreya SC'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/alegreya-sc-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/alegreya-sans-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/alegreya-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Alegreya Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/alegreya-sans-cyrillic-400-italic.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Alegreya Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/alegreya-sans-latin-400-italic.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/alegreya-sans-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/alegreya-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Alegreya Sans'; font-style: italic; font-weight: 500; font-display: swap; src: url(fonts/alegreya-sans-cyrillic-500-italic.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Alegreya Sans'; font-style: italic; font-weight: 500; font-display: swap; src: url(fonts/alegreya-sans-latin-500-italic.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/alegreya-sans-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/alegreya-sans-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Alegreya Sans'; font-style: italic; font-weight: 700; font-display: swap; src: url(fonts/alegreya-sans-cyrillic-700-italic.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Alegreya Sans'; font-style: italic; font-weight: 700; font-display: swap; src: url(fonts/alegreya-sans-latin-700-italic.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  /* Инфернальный гроссбух: обсидиан, пламя Аверна, латунь контрактов. Один тёмный мир, без светлой темы. */
  --bg: #120d0c; --panel: #1b1412; --panel2: #231a17; --line: #3a2b25; --ink: #eadccb; --muted: #a8958a;
  --fire: #e04a2c; --fire2: #ff7a45; --brass: #c9a45c; --good: #7fb98a; --warn: #e0a83c; --bad: #ff6a55; --ice: #8cc3df;
  --f-disp: 'Alegreya SC', 'Cormorant SC', Georgia, serif; --f-body: 'Alegreya Sans', 'PT Sans', system-ui, sans-serif;
  --r: 10px; --nav: 76px;
  color-scheme: dark;
  /* Раскладка: верхняя панель + левая колонка навигации (на телефоне — нижняя полоса) + прокручиваемая рабочая область */
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; overflow: hidden; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(1200px 500px at 50% -200px, rgba(224, 74, 44, .14), transparent 70%); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-disp); font-weight: 500; letter-spacing: .02em; margin: 0; text-wrap: balance; line-height: 1.15; }
h1 { font-size: 30px; color: var(--ink); }
h2 { font-size: 20px; color: var(--brass); }
h3 { font-size: 18px; }
h4 { font-size: 15px; color: var(--brass); margin: 14px 0 6px; }
p { margin: 0 0 8px; }
small, .small { font-size: 13.5px; }
.muted { color: var(--muted); }
.good { color: var(--good); } .bad { color: var(--bad); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--fire2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* --- оболочка --- */
.app { display: grid; grid-template-columns: var(--nav) 1fr; grid-template-rows: 56px 1fr; height: 100%; position: relative; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 18px; border-bottom: 1px solid var(--line); background: rgba(18, 13, 12, .85); backdrop-filter: blur(6px); z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sigil { width: 30px; height: 30px; flex: none; }
#ctitle { font-family: var(--f-disp); font-size: 19px; color: var(--brass); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#topmeta { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.layerchip { --lc: var(--fire); font-size: 13px; padding: 3px 10px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--lc) 60%, transparent); color: color-mix(in srgb, var(--lc) 70%, white); background: color-mix(in srgb, var(--lc) 14%, transparent); white-space: nowrap; }
.rolechip { font-size: 13px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: default; }
button.rolechip { cursor: pointer; }
.rolechip.gm { color: var(--brass); border-color: color-mix(in srgb, var(--brass) 50%, transparent); }
.sync { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.sync.ok { background: var(--good); box-shadow: 0 0 8px var(--good); } .sync.warn { background: var(--warn); } .sync.loc { background: var(--muted); }
#nav { display: flex; flex-direction: column; gap: 2px; padding: 10px 6px; border-right: 1px solid var(--line); overflow-y: auto; }
.nv { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 12px; position: relative; }
.nv:hover { color: var(--ink); background: var(--panel); }
.nv.on { color: var(--fire2); background: color-mix(in srgb, var(--fire) 12%, transparent); }
.nv .dot { position: absolute; top: 6px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--fire2); }
#main { overflow-y: auto; padding: 24px clamp(16px, 3vw, 36px) 120px; scroll-behavior: auto; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); font-family: var(--f-disp); font-size: 20px; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 52px 1fr calc(62px + env(safe-area-inset-bottom)); }
  #nav { grid-row: 3; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); padding: 4px 4px env(safe-area-inset-bottom); overflow-x: auto; background: var(--bg); }
  .nv { min-width: 58px; padding: 6px 2px; font-size: 11px; }
  #nav { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  #nav:has(.nv:last-child:hover) { mask-image: none; }
  .nv .dot { right: 16px; top: 4px; }
  #main { padding: 18px 16px 100px; }
  h1 { font-size: 25px; }
  .layerchip { display: none; }
}

/* --- кнопки и поля --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-size: 15px; line-height: 1.2; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: #5a443a; background: #2c211d; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.pri { background: linear-gradient(180deg, #e65533, #b8361d); border-color: #e65533; color: #fff6ef; }
.btn.pri:hover { background: linear-gradient(180deg, #f2603d, #c83e22); }
.btn.ghost { background: transparent; }
.btn.on { border-color: var(--brass); color: var(--brass); }
.btn.bad { color: var(--bad); } .btn.good { color: var(--good); }
.btn.pri.bad { color: #fff; }
.btn.sm { padding: 6px 11px; font-size: 14px; } .btn.xs { padding: 3px 8px; font-size: 13px; border-radius: 6px; }
.btn.glow { animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(224, 74, 44, .25), 0 0 18px rgba(255, 122, 69, .4); } }
.lnk { color: var(--fire2); text-decoration: none; cursor: pointer; } .lnk:hover { text-decoration: underline; }
input, select, textarea { width: 100%; background: #160f0e; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--fire); outline: none; box-shadow: 0 0 0 3px rgba(224, 74, 44, .18); }
input[readonly], textarea[readonly] { background: transparent; border-style: dashed; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--fire); }
textarea { resize: vertical; }
label, .lab { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.chk { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-size: 15px; cursor: pointer; margin: 0; }
.chk.done { color: var(--muted); text-decoration: line-through; }
.chk.secret { margin-top: 12px; color: var(--brass); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 14px; }
.row.between { justify-content: space-between; }
.row .left { margin-right: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); white-space: nowrap; }
button.chip { cursor: pointer; }
.chip.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.chip.bad, .chip.cond.on, .chip.cond { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.chip.muted { color: var(--muted); }
.chip.sec, .tag.sec { color: var(--brass); border-color: color-mix(in srgb, var(--brass) 50%, transparent); background: color-mix(in srgb, var(--brass) 10%, transparent); }
.chip.gmb { color: var(--brass); border-color: var(--brass); background: transparent; font-size: 11.5px; padding: 0 7px; }
.chip.lay { --lc: #888; color: color-mix(in srgb, var(--lc) 75%, white); border-color: color-mix(in srgb, var(--lc) 50%, transparent); }
.chip.lnk { color: var(--ink); } .chip.lnk:hover { border-color: var(--fire); text-decoration: none; }
.tag { font-style: normal; font-size: 11.5px; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 12px; cursor: pointer; color: var(--muted); font-size: 14px; }
.seg button.on { background: color-mix(in srgb, var(--fire) 20%, transparent); color: var(--ink); }
.seg.small button { font-size: 13px; padding: 5px 10px; }
.seg.tabs { margin: 4px 0 16px; }
.seg.tabs small { color: var(--muted); margin-left: 3px; }

/* --- карточки и разделы --- */
.vhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sub { color: var(--muted); margin: 2px 0 0; }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.card.flat { background: transparent; margin-bottom: 14px; }
.card > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.card h3 { margin-bottom: 8px; }
.hubgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 6px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); color: var(--brass); }
.where { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-left: 3px solid var(--fire); background: var(--panel); border-radius: 0 8px 8px 0; min-width: 220px; }
.where b { font-family: var(--f-disp); font-size: 19px; }
.announce { border-color: color-mix(in srgb, var(--brass) 35%, var(--line)); }
.next { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.prose { overflow-wrap: anywhere; } .prose b { color: var(--brass); font-weight: 600; }
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty { border: 1px dashed var(--line); border-radius: var(--r); padding: 28px; text-align: center; color: var(--muted); max-width: 640px; margin: 20px auto; }
.empty.big { padding: 48px 24px; }
.empty .btn { margin-top: 8px; }
.sect { margin: 26px 0 10px; }
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--brass); border-radius: 8px; background: color-mix(in srgb, var(--brass) 10%, transparent); margin-bottom: 12px; }
.banner .btn { margin-left: auto; }
.warnline { color: var(--warn); font-size: 14px; margin: 6px 0; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: 15px; } .dl dt { color: var(--muted); } .dl dd { margin: 0; }
.steps { padding-left: 20px; margin: 0; } .steps li { margin-bottom: 6px; }
.vstat { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 14px; } .vstat b { font-family: var(--f-disp); font-size: 22px; color: var(--brass); display: block; }
.glist { list-style: none; margin: 0; padding: 0; } .glist li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.glist .row { margin-left: auto; }
.gnote { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; cursor: pointer; } .gnote:hover { border-color: var(--brass); }

/* --- отряд / мини --- */
.pt { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line); background: var(--panel2); }
.pt.sm { width: 40px; height: 40px; } .pt.lg { width: 68px; height: 68px; }
.pt.ph { display: inline-grid; place-items: center; font-family: var(--f-disp); font-size: 22px; color: var(--brass); }
.mini-party { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mini-party li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; cursor: pointer; padding: 6px; border-radius: 8px; }
.mini-party li:hover { background: var(--panel2); }
.mini-party small { display: block; color: var(--muted); }
.stat { text-align: center; font-family: var(--f-disp); font-size: 20px; } .stat small { display: block; font-family: var(--f-body); font-size: 11px; color: var(--muted); }
.hpbar { position: relative; display: block; height: 16px; border-radius: 4px; background: #2a1e1b; overflow: hidden; margin-top: 4px; min-width: 90px; }
.hpbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #6d9a5f, #8fbf7a); }
.hpbar.mid i { background: linear-gradient(90deg, #b9862b, #e0a83c); } .hpbar.low i { background: linear-gradient(90deg, #a52b1c, #e04a2c); }
.hpbar em { position: relative; display: block; font-style: normal; font-size: 11.5px; padding-left: 6px; line-height: 16px; color: #fff; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.party { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.pcard.dead { opacity: .55; filter: grayscale(.6); }
.pc-top { display: flex; gap: 12px; align-items: center; cursor: pointer; } .pc-top p { margin: 0; }
.kpis { display: flex; gap: 6px; flex-wrap: wrap; } .kpis span { flex: 1; min-width: 56px; text-align: center; background: var(--panel2); border-radius: 6px; padding: 4px; font-family: var(--f-disp); font-size: 18px; font-variant-numeric: tabular-nums; }
.kpis small { display: block; font-family: var(--f-body); font-size: 11px; color: var(--muted); }
.gmrow { border-top: 1px dashed var(--line); padding-top: 10px; }
.hpin { width: 74px; }
.fallen { display: flex; flex-wrap: wrap; gap: 10px; } .fcard { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; opacity: .75; } .fcard small { display: block; color: var(--muted); }

/* --- квесты --- */
.qmini { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.qmini li { cursor: pointer; } .qmini li b { display: block; } .qmini small { color: var(--muted); }
.qk { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 6px; } .qk.main { color: var(--fire2); }
.prog { display: block; height: 4px; background: #2a1e1b; border-radius: 2px; overflow: hidden; margin: 4px 0 2px; } .prog i { display: block; height: 100%; background: var(--brass); }
.qlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.qcard { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: var(--r); padding: 14px; }
.qcard.main { border-left-color: var(--fire); } .qcard.done { opacity: .75; border-left-color: var(--good); } .qcard.failed { opacity: .6; border-left-color: #555; } .qcard.hook { border-left-color: var(--ice); }
.qcard > header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.qcard h3 { cursor: pointer; margin: 4px 0; }
.objs { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.hid { outline: 1px dashed var(--brass); outline-offset: -1px; }

/* --- карточки НПС / мест --- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; } .filters input { flex: 2 1 220px; width: auto; } .filters select { flex: 1 1 150px; width: auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.cards.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.ecard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.ecard:hover { border-color: #6a4a3d; transform: translateY(-2px); }
.ecard .cover { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--panel2); }
.ecard.land .cover { aspect-ratio: 16 / 9; }
.cover.ph { display: grid; place-items: center; font-family: var(--f-disp); font-size: 54px; color: #4a3a33; background: repeating-linear-gradient(135deg, #1e1614 0 12px, #211816 12px 24px); }
.cover.ph.lay { --lc: #555; font-size: 22px; color: color-mix(in srgb, var(--lc) 80%, white); background: linear-gradient(160deg, color-mix(in srgb, var(--lc) 35%, #1b1412), #1b1412 70%); }
.eb { padding: 10px 12px 12px; } .eb h3 { font-size: 17px; margin-bottom: 2px; } .eb p { margin: 0 0 4px; }

/* --- модальные окна и формы --- */
.mback { position: fixed; inset: 0; background: rgba(5, 3, 3, .72); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border: 1px solid #4a372f; border-radius: 14px; width: min(560px, 100%); max-height: calc(100% - 20px); overflow-y: auto; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.modal.wide { width: min(820px, 100%); }
.modal > h3, .frm > h3 { margin-bottom: 12px; color: var(--brass); font-size: 21px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fld.full { grid-column: 1 / -1; }
.fld small { display: block; margin-top: 3px; }
.sticky { position: sticky; bottom: -20px; background: var(--panel); padding: 12px 0 2px; margin-bottom: -2px; }
.multi { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow-y: auto; padding: 2px; }
.mchip { display: inline-flex; margin: 0; cursor: pointer; }
.mchip input { position: absolute; opacity: 0; pointer-events: none; }
.mchip span { padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink); }
.mchip input:checked + span { border-color: var(--fire); background: color-mix(in srgb, var(--fire) 18%, transparent); }
.mchip input:focus-visible + span { outline: 2px solid var(--fire2); }
.imgfld { display: flex; flex-direction: column; gap: 8px; }
.imgprev { width: 140px; aspect-ratio: 4 / 5; border-radius: 8px; border: 1px dashed var(--line); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 13px; }
.imgprev.w { width: 100%; aspect-ratio: 16 / 9; }
.imgprev img { width: 100%; height: 100%; object-fit: cover; }
.detail { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.detail.col { grid-template-columns: 1fr; }
.dimg { width: 100%; border-radius: 10px; object-fit: cover; aspect-ratio: 4 / 5; }
.dimg.wide { aspect-ratio: 16 / 9; }
.detail h2 { font-size: 26px; color: var(--ink); margin-bottom: 4px; }
.secretbox { margin-top: 16px; padding: 10px 12px; border: 1px dashed var(--brass); border-radius: 8px; background: color-mix(in srgb, var(--brass) 6%, transparent); }
.secretbox h4 { margin-top: 0; }
blockquote { margin: 6px 0; padding: 6px 12px; border-left: 2px solid var(--brass); background: var(--panel2); border-radius: 0 6px 6px 0; }
@media (max-width: 640px) { .fgrid, .fgrid.three { grid-template-columns: 1fr 1fr; } .detail { grid-template-columns: 1fr; } .dimg { max-height: 300px; } .modal { padding: 16px; } .sticky { bottom: -16px; } }

/* --- тосты и броски --- */
#toasts { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(420px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; background: #2a1f1b; border: 1px solid #574238; border-radius: 10px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: tin .2s ease-out; transition: opacity .3s, transform .3s; width: 100%; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast.bad { border-color: var(--bad); } .toast.good { border-color: var(--good); } .toast.warn { border-color: var(--warn); }
@keyframes tin { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
.toast.roll { text-align: center; padding: 12px 16px 14px; }
.rt .rl { color: var(--muted); font-size: 14px; } .rt .rl em { color: var(--brass); font-style: normal; }
.rt .rv { font-family: var(--f-disp); font-size: 52px; line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; }
.rt .rd { font-size: 14px; color: var(--muted); } .rt .rd b { color: var(--ink); } .rt .rd s { opacity: .5; }
.rt .rn { font-family: var(--f-disp); margin-top: 4px; }
.rt .row { justify-content: center; margin-top: 8px; }
.toast.crit { border-color: var(--brass); box-shadow: 0 0 30px rgba(201, 164, 92, .35); } .toast.crit .rv, .toast.crit .rn { color: var(--brass); }
.toast.fumble .rv, .toast.fumble .rn { color: var(--bad); }
b.nat20 { color: var(--brass) !important; } b.nat1 { color: var(--bad) !important; }
.fab { position: fixed; right: 18px; bottom: 22px; z-index: 30; width: 60px; height: 60px; border-radius: 50%; border: 1px solid #e65533; background: radial-gradient(circle at 35% 30%, #f2603d, #9c2b16); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(224, 74, 44, .45); }
.fab svg { width: 30px; height: 30px; }
@media (max-width: 860px) { .fab { bottom: calc(76px + env(safe-area-inset-bottom)); right: 14px; width: 54px; height: 54px; } }
#tray { position: fixed; right: 18px; bottom: 92px; z-index: 31; width: min(380px, calc(100% - 28px)); max-height: min(640px, calc(100% - 170px)); overflow-y: auto; background: var(--panel); border: 1px solid #4a372f; border-radius: 14px; padding: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); display: none; }
#tray.open { display: block; }
#tray header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#trayBody { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 860px) { #tray { right: 14px; bottom: calc(140px + env(safe-area-inset-bottom)); max-height: calc(100% - 210px); } }
.dice { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.die { padding: 9px 0; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-family: var(--f-disp); font-size: 15px; }
.die:hover { border-color: var(--fire); }
#tray .row input { flex: 1; width: auto; }
.feed { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.feed li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; font-size: 14px; padding: 4px 0; border-bottom: 1px solid #2a1f1b; }
.feed .ft { font-family: var(--f-disp); font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.feed li.crit .ft { color: var(--brass); } .feed li.fumble .ft { color: var(--bad); }
.feed .fw { color: var(--brass); }
.feed small { color: var(--muted); }

/* --- инициатива --- */
.combat { border-color: color-mix(in srgb, var(--fire) 50%, var(--line)); margin-bottom: 14px; }
.init { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.init li { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(100px, auto) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; background: var(--panel2); }
.init li.now { background: color-mix(in srgb, var(--fire) 22%, var(--panel2)); box-shadow: inset 3px 0 var(--fire2); }
.init .iv { font-family: var(--f-disp); font-size: 20px; text-align: center; }
.init li.mob .in { color: #f0b5a8; }
@media (max-width: 560px) { .init li { grid-template-columns: 34px 1fr; } .init li > :nth-child(n+3) { grid-column: 2; } }

/* --- лист персонажа --- */
.shead { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin-bottom: 16px; }
.portrait { width: 112px; height: 112px; border-radius: 50%; border: 2px solid var(--brass); padding: 0; overflow: hidden; background: var(--panel2); cursor: pointer; position: relative; display: grid; place-items: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait span { font-family: var(--f-disp); font-size: 46px; color: var(--brass); }
.portrait em { position: absolute; bottom: 0; left: 0; right: 0; font-size: 11.5px; font-style: normal; background: rgba(0, 0, 0, .65); padding: 3px; opacity: 0; transition: opacity .15s; }
.portrait:hover em, .portrait:focus-visible em { opacity: 1; }
.sheet.ro .portrait { cursor: default; }
.sid h1 { font-size: clamp(26px, 4vw, 36px); }
.sid > p { color: var(--muted); margin: 2px 0 10px; }
.picker select { width: auto; max-width: 220px; padding: 5px 8px; font-size: 14px; }
.lvl { font-family: var(--f-disp); font-size: 17px; } .lvl b { color: var(--brass); font-size: 22px; }
.xp { display: flex; align-items: center; gap: 8px; min-width: 160px; } .xp .prog { width: 120px; height: 6px; margin: 0; }
.vitals { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.vt { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; text-align: center; display: flex; flex-direction: column; min-width: 0; }
button.vt { cursor: pointer; } button.vt:hover { border-color: var(--fire); }
.vt small { font-size: 12px; color: var(--muted); }
.vt b { font-family: var(--f-disp); font-size: 28px; font-weight: 500; line-height: 1.15; font-variant-numeric: tabular-nums; }
.vt b span { font-size: 16px; color: var(--muted); }
.vt em { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt.ac { border-color: color-mix(in srgb, var(--brass) 45%, var(--line)); } .vt.ac b { color: var(--brass); }
.vt.hp.down { border-color: var(--bad); } .vt.hp .hpbar { height: 5px; } .vt.hp .hpbar em { display: none; }
@media (max-width: 760px) { .vitals { grid-template-columns: repeat(3, minmax(0, 1fr)); } .shead { grid-template-columns: 1fr; text-align: left; } .portrait { width: 88px; height: 88px; } }
.stabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; overflow-x: auto; scrollbar-width: none; }
.stabs button { background: none; border: 0; padding: 10px 14px; color: var(--muted); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; font-size: 15px; }
.stabs button.on { color: var(--ink); border-bottom-color: var(--fire); }
.abil { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.ab { display: flex; flex-direction: column; gap: 4px; }
.abm { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; transition: border-color .15s; }
.abm:hover { border-color: var(--fire); }
.abm small { font-size: 12px; color: var(--muted); }
.abm b { font-family: var(--f-disp); font-size: 34px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.abm span { font-size: 14px; border: 1px solid var(--line); border-radius: 99px; padding: 0 10px; color: var(--muted); }
.abs { border: 1px dashed var(--line); background: transparent; border-radius: 8px; padding: 4px; cursor: pointer; font-size: 13px; color: var(--muted); }
.abs.prof { border-style: solid; border-color: var(--brass); color: var(--brass); }
.abil.edit .ab input { text-align: center; font-size: 20px; }
@media (max-width: 760px) { .abil { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .cols2 { grid-template-columns: 1fr; } }
.slist { list-style: none; padding: 0; margin: 0; }
.slist li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #2a1f1b; }
.sk { flex: 1; display: flex; justify-content: space-between; background: none; border: 0; padding: 7px 4px; cursor: pointer; text-align: left; border-radius: 6px; }
.sk:hover { background: var(--panel2); }
.sk b { font-variant-numeric: tabular-nums; font-family: var(--f-disp); font-size: 17px; font-weight: 500; }
.sk small { color: var(--muted); font-size: 11px; }
.dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #6a564b; background: transparent; padding: 0; cursor: pointer; flex: none; display: inline-block; }
.dot.p1 { background: var(--brass); border-color: var(--brass); }
.dot.p2 { background: var(--fire2); border-color: var(--fire2); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fire2); }
button.dot:disabled { cursor: default; }
.hpctl { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; margin-bottom: 12px; }
.death { margin: 12px 0; padding: 10px; border: 1px solid var(--bad); border-radius: 8px; }
.death h4 { margin-top: 0; color: var(--bad); }
.pips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pip { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--brass); background: color-mix(in srgb, var(--brass) 30%, transparent); padding: 0; cursor: pointer; transform: rotate(45deg) scale(.82); }
.pip.used { background: transparent; border-color: #5a4a40; }
.pip:disabled { cursor: default; }
.conds .chip:not(.on) { color: var(--muted); border-color: var(--line); background: transparent; }
.cdesc { padding-left: 18px; margin: 8px 0; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 6px; border-bottom: 1px solid var(--line); }
td { padding: 6px; border-bottom: 1px solid #2a1f1b; vertical-align: middle; }
.atk td:nth-child(2), .atk td:nth-child(3) { white-space: nowrap; }
.inv tr.eq td { background: color-mix(in srgb, var(--brass) 5%, transparent); }
.qty { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.spn { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; flex: 1; min-width: 0; }
.spn:hover b { color: var(--fire2); }
.casters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.caster { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.caster b { font-family: var(--f-disp); font-size: 17px; }
.caster > span b { font-size: 20px; color: var(--brass); }
.slots { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.slot { display: flex; flex-direction: column; gap: 4px; } .slot small { color: var(--muted); }
.slot.pact .pip { border-color: #b56fc9; background: rgba(181, 111, 201, .35); } .slot.pact .pip.used { background: transparent; border-color: #5a4a50; }
.lvlh { border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-top: 18px; }
.lvlh.infernal { color: var(--fire2); }
.splist, .flist { list-style: none; padding: 0; margin: 0; }
.sp, .flist li { border-bottom: 1px solid #2a1f1b; padding: 7px 0; }
.sp.gm, .flist li.gm { background: linear-gradient(90deg, rgba(201, 164, 92, .08), transparent 60%); }
.flist li.contract { background: linear-gradient(90deg, rgba(224, 74, 44, .1), transparent 60%); }
.sp.unprep .spn b { color: var(--muted); }
.sph { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spa { display: flex; gap: 5px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.spd { padding: 8px 0 4px 26px; font-size: 14px; color: var(--muted); }
.spd .prose { color: var(--ink); margin: 6px 0; }
.res { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.rs { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; background: var(--panel2); border-radius: 8px; } .rs small { color: var(--muted); }
.coins { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; } .coins input { text-align: center; }
.arts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.art { display: flex; gap: 12px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--rc); border-radius: 10px; }
.art img { width: 76px; height: 76px; border-radius: 8px; object-fit: cover; flex: none; }
.art h4 { margin: 0 0 6px; color: var(--ink); font-size: 17px; }
.art.gm { box-shadow: inset 0 0 0 1px rgba(201, 164, 92, .3); }
.note { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: var(--panel); }
.note header { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; } .note header .btn { margin-left: auto; }
.newf { margin: 4px 0 10px; padding-left: 20px; } .newf li { color: var(--brass); }
.abt input { text-align: center; padding: 6px 4px; } .abt th { white-space: nowrap; } .abt td b { font-family: var(--f-disp); font-size: 17px; white-space: nowrap; }
.llog { padding-left: 22px; } .llog li { margin-bottom: 6px; }
.cat { display: flex; flex-wrap: wrap; gap: 6px; } .cat small { color: var(--muted); }

/* --- хроника --- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--fire), var(--line) 40%, var(--line)); }
.timeline li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; margin-bottom: 14px; position: relative; }
.tnum { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 2px solid var(--lc); font-family: var(--f-disp); font-size: 18px; z-index: 1; }
.timeline h3 { cursor: pointer; } .timeline h3:hover { color: var(--fire2); }

/* --- карта --- */
.mapwrap { display: grid; grid-template-rows: auto 1fr; grid-template-columns: 1fr; height: calc(100% + 96px); margin: -24px calc(-1 * clamp(16px, 3vw, 36px)) -120px; }
.mapwrap.has-sel { grid-template-columns: 1fr 340px; }
.maphead { grid-column: 1 / -1; padding: 10px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.maptabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.maptabs button { background: none; border: 1px solid transparent; border-radius: 8px; padding: 5px 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.maptabs button.on { border-color: var(--line); color: var(--ink); background: var(--panel); }
.maptabs .add { color: var(--fire2); }
.maptools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.legend { display: flex; gap: 4px; flex-wrap: wrap; }
.lg { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid var(--line); border-radius: 99px; padding: 3px 9px 3px 4px; font-size: 13px; color: var(--ink); cursor: pointer; }
.lg i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; color: #1b1412; background: var(--pc); }
.lg.off { opacity: .4; }
.zoom { margin-left: auto; display: flex; gap: 4px; }
.mapvp { position: relative; overflow: hidden; background: #0d0908; touch-action: none; cursor: grab; min-height: 300px; }
.mapvp:active { cursor: grabbing; }
.mapvp.mode-add { cursor: crosshair; }
.maplayer { position: absolute; left: 0; top: 0; transform-origin: 0 0; --ik: 1; }
.mapimg { display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.mapimg text { fill: #eadccb; } .mapimg .mn { font-family: var(--f-disp); font-size: 40px; } .mapimg .ms { font-size: 20px; fill: #a8958a; font-family: var(--f-body); } .mapimg .mr { font-family: var(--f-disp); font-size: 30px; fill: #6a564b; } .mapimg .mt { font-family: var(--f-disp); font-size: 28px; letter-spacing: .3em; fill: #c9a45c; }
.route { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.route polyline { fill: none; stroke: #ffb27a; stroke-width: 3; stroke-dasharray: 8 7; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 3px rgba(224, 74, 44, .8)); }
.pin { position: absolute; transform: translate(-50%, -100%) scale(var(--ik)); transform-origin: 50% 100%; background: none; border: 0; padding: 0 0 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; --pc: var(--brass); }
.pin span { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pc); display: grid; place-items: center; border: 2px solid #1b1412; box-shadow: 0 3px 10px rgba(0, 0, 0, .6); font-weight: 700; font-size: 13px; color: #1b1412; }
.pin span { line-height: 1; }
.pin em { font-style: normal; font-size: 12px; background: rgba(18, 13, 12, .85); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-top: 6px; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.pin span > b { transform: rotate(45deg); font-weight: 700; }
.pin.sel span { outline: 3px solid #fff; }
.pin.hid { opacity: .7; } .pin.hid span { border-style: dashed; border-color: var(--brass); }
.k-visited { --pc: #c9a45c; } .k-current { --pc: #ff7a45; } .k-planned { --pc: #8cc3df; } .k-danger { --pc: #ff5a48; } .k-note { --pc: #a8958a; }
.pin.k-current span { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255, 122, 69, .25), 0 3px 10px rgba(0, 0, 0, .6); } }
.maphint { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); background: rgba(27, 20, 18, .92); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 14px; color: var(--muted); max-width: min(460px, 90%); text-align: center; pointer-events: none; }
.pinpanel { border-left: 1px solid var(--line); background: var(--panel); padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.pinpanel header { display: flex; justify-content: space-between; gap: 8px; }
.pinpanel h3 { font-size: 21px; }
.psess { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; } .psess:hover { border-color: var(--brass); }
.row.wrap { flex-wrap: wrap; }
@media (max-width: 860px) {
  .mapwrap { margin: -18px -16px -100px; height: calc(100% + 118px); }
  .mapwrap.has-sel { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .pinpanel { border-left: 0; border-top: 1px solid var(--line); max-height: 45vh; }
  .zoom { margin-left: 0; }
}
.banner.fire { border-color: var(--fire); background: color-mix(in srgb, var(--fire) 12%, transparent); }
.warnc { color: var(--warn); font-weight: 600; }
.msl { padding-left: 18px; margin: 4px 0 10px; }
.modal.tall { height: min(860px, calc(100% - 20px)); display: flex; flex-direction: column; }
.modal.tall .srdlist { flex: 1; overflow-y: auto; min-height: 200px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 0; margin-bottom: 8px; }
.srdf { margin-bottom: 8px; } .srdf .chk { font-size: 14px; }
.srow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 1px solid #2a1f1b; }
.srow.open { background: var(--panel2); border-radius: 8px; }
.srh { display: flex; gap: 10px; align-items: center; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; min-width: 0; }
.srh:hover b { color: var(--fire2); }
.slv { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--brass); color: var(--brass); display: grid; place-items: center; font-family: var(--f-disp); font-size: 14px; }
.srd-d { grid-column: 1 / -1; padding: 4px 4px 6px 38px; }
.prose.en { color: #d8cabb; }
body:has(.mback) #toasts { top: auto; bottom: 20px; }

/* --- «Ширма»: внешние экраны и лобби --- */
body.outer .app { grid-template-columns: 1fr; }
body.outer #nav { display: none; }
body.outer .fab, body.outer #tray { display: none; }
@media (max-width: 860px) { body.outer .app { grid-template-rows: 52px 1fr; } }
.auth { min-height: 70vh; display: grid; place-items: center; }
.authcard { width: min(440px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.authcard h1 { color: var(--brass); }
.authcard form { display: flex; flex-direction: column; gap: 10px; }
.authcard .seg.tabs { margin: 4px 0 0; }
.camps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; margin-bottom: 22px; }
.camp { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; transition: border-color .15s, transform .15s; }
.camp:hover { border-color: color-mix(in srgb, var(--lc) 60%, var(--line)); transform: translateY(-2px); }
.camp .cbar { width: 6px; flex: none; background: linear-gradient(var(--lc), color-mix(in srgb, var(--lc) 20%, transparent)); }
.camp .cb { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.camp h2 { color: var(--ink); font-size: 22px; }
.camp p { margin: 0; }
.adm { margin-top: 10px; }
.invl { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.invl li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.invl li.off { opacity: .5; }
.invl code { font-size: 13px; color: var(--brass); word-break: break-all; flex: 1 1 260px; }
.invl .row { margin-left: auto; }
.mem { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.mem li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #2a1f1b; }
.mem .row { margin-left: auto; }
.danger { margin-top: 16px; padding-top: 12px; border-top: 1px dashed color-mix(in srgb, var(--bad) 40%, var(--line)); }
a.rolechip { text-decoration: none; cursor: pointer; }
