/* «Лист» и «Партия»: направление B «Угли». Книжная страница на тёплом чёрном: один книжный шрифт (Spectral), имена — курсивом Cormorant.
   Без пергамента, карточек и капсул, углы прямые. Строки разделены тонкой линейкой, второстепенные кнопки — подчёркнутый текст.
   Огненный цвет — только то, что ждёт игрока (новый уровень); урон — тёплым светлым. Остальные экраны и окна — в skin.css. */

#v-sheet, #v-party {
  --em-bg: #100c09; --em-well: #1b1511; --em-tx: #f1e7da; --em-tx2: #bfb1a1; --em-tx3: #918474; --em-rule: #3a302a;
  --em-ember: #f07a3a; --em-hp: #e0574a; --em-dmg: #f2a06d; --em-bad: #f0907f;
  --f-book: "Spectral", Georgia, serif; --f-name: "Cormorant Garamond", Georgia, serif;
  /* токены приложения и материала: всё, что раньше было кожей или пергаментом, здесь — страница */
  --parch: var(--em-tx); --parch-dim: var(--em-tx2); --candle: var(--em-tx); --ochre: var(--em-tx2); --line: var(--em-rule);
  --card: transparent; --card-2: var(--em-well); --night: var(--em-bg); --night-2: var(--em-well); --night-3: var(--em-well);
  --danger: var(--em-bad); --danger-soft: var(--em-bad); --heal: #9fcf7a;
  --btn-bg: none; --btn-edge: transparent; --btn-fg: var(--em-tx); --btn-shadow: none;
  --tag-bg: none; --tag-edge: var(--em-rule); --tag-fg: var(--em-tx2); --tag-shadow: none; --mark: var(--em-tx2);
  background: var(--em-bg); color: var(--em-tx); font-family: var(--f-book); font-variant-numeric: lining-nums;
}
:is(#v-sheet, #v-party) .pad { padding: 0 20px 28px; }
:is(#v-sheet, #v-party) .num, :is(#v-sheet, #v-party) b { font-variant-numeric: lining-nums tabular-nums; }
:is(#v-sheet, #v-party) h2, #v-sheet .inv-h { font: italic 700 24px/1.1 var(--f-name); color: var(--em-tx); margin: 26px 0 8px; text-transform: none; letter-spacing: 0; }
:is(#v-sheet, #v-party) h2 small, #v-sheet .inv-h small { font: 400 14px var(--f-book); color: var(--em-tx3); }
:is(#v-sheet, #v-party) .empty { color: var(--em-tx2); }
:is(#v-sheet, #v-party) .empty b { font: italic 700 22px var(--f-name); color: var(--em-tx); }

/* второстепенные кнопки — подчёркнутый текст; заливки и рамок нет */
:is(#v-sheet, #v-party) :is(.xbtn, .look, .new-hero, .respec, .prep-btn, .afk-t, .pet):not(:disabled) {
  display: inline-flex; align-items: center; gap: 8px; width: auto; min-height: 44px; padding: 0; margin: 0;
  background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--em-tx); text-shadow: none;
  font: 500 16px/1.25 var(--f-book); text-align: left; text-decoration: underline; text-decoration-color: var(--em-tx3); text-underline-offset: 5px; text-decoration-thickness: 1px;
}
:is(#v-sheet, #v-party) :is(.xbtn, .look, .new-hero, .respec, .prep-btn, .afk-t, .pet) .i { width: 18px; height: 18px; color: var(--em-tx2); }
:is(#v-sheet, #v-party) .xbtn { flex-direction: column; align-items: flex-start; gap: 0; }
:is(#v-sheet, #v-party) .xbtn small { font: 400 13px/1.2 var(--f-book); color: var(--em-tx3); text-decoration: none; display: block; }
:is(#v-sheet, #v-party) .xbtn:disabled { background: none; border: 0; color: var(--em-tx3); font: 500 16px/1.25 var(--f-book); text-decoration: none; padding: 0; box-shadow: none; }
:is(#v-sheet, #v-party) :is(.xbtn, .look, .new-hero, .respec, .prep-btn, .afk-t, .pet):active { color: var(--em-ember); }
:is(#v-sheet, #v-party) :focus-visible { outline: 2px solid var(--em-ember); outline-offset: 2px; }
:is(#v-sheet, #v-party) .term { text-decoration-color: rgba(191,177,161,0.35); }   /* термин с подсказкой — тихий пунктир, не ссылка */

/* полоса HP: тонкая линия с числом рядом */
:is(#v-sheet, #v-party) .hpbar { height: 3px; background: rgba(255,255,255,0.1); }
:is(#v-sheet, #v-party) .hpbar i { display: block; height: 100%; background: var(--em-hp); }

/* ==================== «Лист» ==================== */
#v-sheet .scroll { padding-top: 0; }
/* шапка: имя крупным курсивом, класс, герой в рост справа, под ними числа одной строкой */
#v-sheet .hero-plate { position: relative; display: flex; flex-direction: column; min-height: 226px; margin: 0 -20px; padding: calc(16px + var(--safe-t)) 20px 0; overflow: hidden; background: none; border: 0; border-radius: 0; }
#v-sheet .hc-art { position: absolute; right: 0; top: calc(6px + var(--safe-t)); bottom: 52px; width: 170px; pointer-events: none;   /* к низу и влево герой тает в фон: числа под ним читаются */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%), linear-gradient(#000 62%, transparent 96%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 45%), linear-gradient(#000 62%, transparent 96%); mask-composite: intersect; }
#v-sheet .hc-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
#v-sheet .hc-art img.full { object-fit: contain; object-position: 100% 0; }
#v-sheet .hc-id { position: relative; z-index: 1; max-width: 230px; }
#v-sheet .hc-name { margin: 0; font: italic 700 42px/0.95 var(--f-name); color: var(--em-tx); white-space: normal; overflow: visible; }
#v-sheet .hc-sub { margin-top: 8px; font: 400 15px/1.35 var(--f-book); color: var(--em-tx2); display: block; -webkit-line-clamp: unset; }
#v-sheet .hc-lv:empty { display: none; }
#v-sheet .lv-link { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0; background: none; border: 0; color: var(--em-tx); font: 500 15.5px var(--f-book);
  text-decoration: underline; text-decoration-color: var(--em-ember); text-underline-offset: 4px; }
#v-sheet .lv-link i { width: 7px; height: 7px; background: var(--em-ember); transform: rotate(45deg); flex: none; }
#v-sheet .hc-line { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: auto; padding-top: 18px; font: 400 14px var(--f-book); color: var(--em-tx2); }
#v-sheet .hc-line b { margin-left: 4px; font-weight: 600; font-size: 19px; color: var(--em-tx); }
#v-sheet .hc-line .hc-hpn { font: 600 30px/1 var(--f-book); color: var(--em-tx); }
#v-sheet .hc-line .hc-hpn small { font-size: 17px; font-weight: 400; color: var(--em-tx3); }
#v-sheet .hero-plate .hpbar { position: relative; z-index: 1; margin: 8px 0 0; }

/* вкладки: слова с подчёркиванием, без капсул и заглавных */
#v-sheet .sticky { position: sticky; top: 0; margin: 0 -20px; padding: 6px 20px 0; background: var(--em-bg); border-bottom: 1px solid var(--em-rule); box-shadow: none; }
#v-sheet .subtabs { display: flex; gap: 22px; margin: 0; }
#v-sheet .subtabs button { flex: none; min-height: 44px; padding: 0; margin-bottom: -1px; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  font: 400 16.5px/1 var(--f-book); color: var(--em-tx3); text-transform: none; letter-spacing: 0; }
#v-sheet .subtabs button[aria-selected="true"] { color: var(--em-tx); border-bottom-color: var(--em-tx); border-image: none; }
#v-sheet section.on { padding-top: 14px; }

/* «Действия»: фильтр и легенда строкой, группы курсивом */
#v-sheet .fbtn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0; background: none; border: 0; border-image: none; filter: none; color: var(--em-tx2); font: 400 15px var(--f-book); }
#v-sheet .fbtn .i { width: 17px; height: 17px; }
#v-sheet .fbtn .cnt { background: var(--em-ember); color: #1b0b03; box-shadow: none; }
#v-sheet .fbtn .found { margin-left: auto; color: var(--em-tx3); font-size: 14px; }
#v-sheet .fchips button { border-color: var(--em-rule); border-radius: 0; color: var(--em-tx); }
#v-sheet .res-legend { flex-wrap: wrap; gap: 4px 14px; margin: 0 0 4px; font: 400 13.5px var(--f-book); color: var(--em-tx3); }
#v-sheet .act-group { margin: 22px 0 8px; font: italic 700 22px/1.1 var(--f-name); color: var(--em-tx); text-transform: none; letter-spacing: 0; }
#v-sheet .act-sub { margin: 20px 0 2px; font: italic 500 16px var(--f-book); color: var(--em-tx2); }
/* оружие в руках — плитки с картинкой, в сумке — строки с колонками «атака / урон» */
#v-sheet .wtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 10px; }
#v-sheet .wtile { min-width: 0; cursor: pointer; }
#v-sheet .wtile .pic { position: relative; height: 100px; display: grid; place-items: center; background: var(--em-well); }
#v-sheet .wtile .gi.wpic { width: 80px; height: 80px; margin: 0; border-radius: 0; background: none; object-fit: cover; }
#v-sheet .wtile .ec { position: absolute; left: 6px; top: 6px; display: flex; gap: 2px; }
#v-sheet .wtile .nm { display: block; margin-top: 8px; font: 600 17px/1.15 var(--f-book); color: var(--em-tx); }
#v-sheet .wtile .n { display: flex; align-items: baseline; gap: 14px; margin-top: 4px; font-size: 14px; color: var(--em-tx2); }
#v-sheet .wtile .n b { font-weight: 600; font-size: 19px; color: var(--em-tx); }
#v-sheet .wtile .n b.d { color: var(--em-dmg); }
#v-sheet .wtile small { display: block; font-size: 13.5px; color: var(--em-tx3); }
#v-sheet .wrow { display: flex; align-items: center; gap: 12px; min-height: 54px; cursor: pointer; }
#v-sheet .wrow + .wrow { border-top: 1px solid var(--em-rule); }
#v-sheet .wrow .gi.wic { width: 38px; height: 38px; margin: 0; border-radius: 0; background: none; opacity: 0.85; flex: none; }
#v-sheet .wrow .nm { flex: 1; min-width: 0; font-size: 16px; line-height: 1.15; color: var(--em-tx2); }
#v-sheet .wrow .nm small { display: block; font-size: 13.5px; color: var(--em-tx3); }
#v-sheet .wrow .k { width: 34px; text-align: right; font-weight: 600; font-size: 16px; color: var(--em-tx2); }
#v-sheet .wrow .k.d { width: 58px; color: #d99062; }
#v-sheet :is(.wtile, .wrow):active { opacity: 0.7; }

/* списки (приёмы, способности, заклинания, особенности): строки на странице, между ними линейка */
#v-sheet .list { background: none; border: 0; border-radius: 0; border-image: none; filter: none; overflow: visible; }
#v-sheet :is(.list > .entry, .list > details.entry) { padding: 12px 0; border: 0; border-bottom: 1px solid var(--em-rule); background: none; }
#v-sheet .list > :last-child { border-bottom: 0; }
#v-sheet .entry.act { display: flex; align-items: center; gap: 10px; }
#v-sheet .entry.act > .i { width: 18px; height: 18px; color: var(--em-tx3); }
#v-sheet .entry.act .body { flex: 1; min-width: 0; }
#v-sheet details.entry summary { padding: 0 28px 0 0; min-height: 0; }
#v-sheet details.entry summary::after { right: 2px; top: 2px; color: var(--em-tx3); }
#v-sheet .entry .nm { gap: 6px; font: 600 16.5px/1.25 var(--f-book); color: var(--em-tx); }
#v-sheet .entry .nm .gi { width: 30px; height: 30px; margin: 0 4px 0 0; border-radius: 0; background: none; }
#v-sheet .entry .short { margin-top: 3px; font: 400 14.5px/1.4 var(--f-book); color: var(--em-tx2); }
#v-sheet .entry .full { padding: 8px 0 0; font: 400 15.5px/1.5 var(--f-book); color: var(--em-tx); }
#v-sheet .entry .full .facts { color: var(--em-tx3); font-size: 13.5px; }
#v-sheet :is(.entry .meta, .entry .sm, .act .left) { padding: 0; border: 0; background: none; box-shadow: none; font: italic 400 14px var(--f-book); color: var(--em-tx3); }
#v-sheet .entry.act.off { opacity: 0.5; }
#v-sheet .entry:active { background: none; }
#v-sheet .card { background: none; border: 0; border-image: none; filter: none; padding: 0; margin: 0 0 12px; color: var(--em-tx2); }
#v-sheet .card.notes { font-style: italic; }

/* «Магия»: заклинатель строкой, ячейки — линейка, кнопка подготовки — ссылка */
#v-sheet .mhead { display: flex; align-items: center; gap: 12px; padding: 0 0 12px; background: none; border: 0; border-bottom: 1px solid var(--em-rule); border-image: none; filter: none; }
#v-sheet .mhead .gi { width: 40px; height: 40px; background: none; border-radius: 0; }
#v-sheet .mhead .who b { font: italic 700 22px/1 var(--f-name); color: var(--em-tx); }
#v-sheet .mhead .who small { display: block; font-size: 14px; color: var(--em-tx3); }
#v-sheet .mhead .mst span { color: var(--em-tx); font: 600 19px var(--f-book); }
#v-sheet .mhead .mst small { font: 400 13px var(--f-book); color: var(--em-tx3); text-transform: none; }
#v-sheet .slt { margin-top: 6px; padding: 0; background: none; border: 0; border-image: none; filter: none; border-collapse: collapse; }
#v-sheet .slt :is(th, td) { padding: 8px 0; border-bottom: 1px solid var(--em-rule); color: var(--em-tx2); font: 400 15px var(--f-book); }
#v-sheet .prep-btn { margin: 8px 0 0; }

/* «Вещи»: слоты — ровные тёмные квадраты, рамка редкости остаётся (это данные) */
#v-sheet .eq-fight { background: none; border: 0; color: var(--em-bad); font-style: italic; }
#v-sheet .inv-portrait { padding: 0; border: 0; border-image: none; background: radial-gradient(80% 70% at 50% 30%, #241a14, var(--em-bg) 75%); }
#v-sheet :is(.eq-slot, .inv-cell) { border-radius: 0; background: var(--em-well); box-shadow: none; }
#v-sheet .eq-slot:not(.full) { border: 1px solid var(--em-rule); }
#v-sheet .eq-slot small { font: 400 12px var(--f-book); color: var(--em-tx2); }
#v-sheet .eq-ac { border-radius: 0; border: 0; background: rgba(16,12,9,0.85); color: var(--em-tx); font: 600 15px var(--f-book); }
#v-sheet .inv-ws { margin-top: 10px; }
#v-sheet .inv-ws .xbtn { flex-direction: row; align-items: center; gap: 10px; }
#v-sheet .inv-ws .xbtn small { margin-left: 4px; }

/* «О герое»: таблица характеристик и навыки — строки с линейкой, без подложек */
#v-sheet .origin { gap: 0; }
#v-sheet .origin .og { padding: 8px 0; background: none; border: 0; border-bottom: 1px solid var(--em-rule); border-radius: 0; border-image: none; filter: none; }
#v-sheet .origin .og small { color: var(--em-tx3); font-size: 13.5px; } #v-sheet .origin .og b { font: 600 17px var(--f-book); color: var(--em-tx); }
#v-sheet .abt { width: 100%; padding: 0; background: none; border: 0; border-image: none; filter: none; border-collapse: collapse; }
#v-sheet .abt :is(th, td) { padding: 6px 0; border-bottom: 1px solid var(--em-rule); text-align: center; font: 400 15px var(--f-book); color: var(--em-tx2); }
#v-sheet .abt tr:first-child th { font: 600 13px var(--f-book); color: var(--em-tx3); letter-spacing: 0.04em; }
#v-sheet .abt tr > th:first-child { text-align: left; font: italic 400 14px var(--f-book); color: var(--em-tx3); }
#v-sheet .abt tr.m td { font: 600 21px var(--f-book); color: var(--em-tx); }
#v-sheet .abt tr.sv td.on { color: var(--em-tx); font-weight: 600; }
#v-sheet .abt .gi.ab { background: none; opacity: 0.85; }
#v-sheet .legend { color: var(--em-tx3); font: italic 400 14px var(--f-book); }
#v-sheet .dot.on { background: var(--em-tx); border-color: var(--em-tx); }
#v-sheet .skills { padding: 0; background: none; border: 0; border-image: none; filter: none; gap: 0 18px; }
#v-sheet .sk { padding: 9px 0; border-bottom: 1px solid var(--em-rule); font: 400 15.5px var(--f-book); color: var(--em-tx3); }
#v-sheet .sk.on { color: var(--em-tx); }
#v-sheet .sk b { font-weight: 600; color: var(--em-tx2); } #v-sheet .sk.on b { color: var(--em-tx); }
#v-sheet .profs .pf { border-radius: 0; border: 0; background: var(--em-well); }
#v-sheet .profs .pf.arm { font: 400 14px var(--f-book); color: var(--em-tx2); }
#v-sheet .respec { margin-top: 18px; }

/* ==================== «Партия» ==================== */
#v-party .appbar { align-items: flex-end; padding: var(--safe-t) 10px 4px 20px; min-height: calc(76px + var(--safe-t)); background: var(--em-bg); border: 0; box-shadow: none; }
#v-party .appbar h1 { font: italic 700 40px/1 var(--f-name); color: var(--em-tx); text-transform: none; letter-spacing: 0; }
#v-party .appbar .st { margin-top: 4px; font: 400 15px var(--f-book); color: var(--em-tx2); }
#v-party .appbar .new-hero { flex: none; padding: 0 10px; }
/* где мы и лагерь: строки текста */
#v-party .where-d { margin: 6px 0 0; background: none; border: 0; border-image: none; filter: none; overflow: visible; }
#v-party .where-d summary { min-height: 40px; padding: 0; font: italic 400 16px/1.4 var(--f-book); color: var(--em-tx2); }
#v-party .where-d summary .lbl { display: none; color: var(--em-tx); font-style: normal; font-weight: 600; }
#v-party .where-d[open] summary .lbl { display: inline; }
#v-party .where-d summary .prev { color: var(--em-tx2); font-weight: 400; }
#v-party .where-d .where-b { padding: 0 0 10px; font: 400 15.5px/1.5 var(--f-book); color: var(--em-tx); }
#v-party .camp-l { margin: 4px 0 0; font: 400 15px/1.45 var(--f-book); color: var(--em-tx2); }
#v-party .camp-l b { font-weight: 600; color: var(--em-tx); }
/* герои: две колонки, герой в рост, под ним всё, что нужно в бою */
#v-party .heroes { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 14px; margin-top: 16px; }
#v-party .hero-card { min-width: 0; padding: 0; margin: 0; background: none; border: 0; border-radius: 0; border-image: none; filter: none; }
#v-party .hc-pic { display: block; width: 100%; height: 218px; padding: 0; overflow: hidden; background: var(--em-well); border: 0; border-radius: 0; }
#v-party .hc-pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
#v-party .hero-card .nm { margin-top: 10px; font: italic 700 25px/1 var(--f-name); color: var(--em-tx); overflow-wrap: anywhere; }
#v-party .hero-card .pl { margin-top: 3px; font: 400 13.5px/1.3 var(--f-book); color: var(--em-tx3); }
#v-party .hero-card .hp { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; font: 400 14px var(--f-book); color: var(--em-tx2); }
#v-party .hero-card .hp > b { font-weight: 600; font-size: 22px; color: var(--em-tx); }
#v-party .hero-card .hp > b small { font-size: 14px; font-weight: 400; color: var(--em-tx3); }
#v-party .hero-card .hp span b { font-weight: 600; font-size: 17px; color: var(--em-tx); }
#v-party .hero-card .hpbar { margin-top: 5px; }
#v-party .rs { list-style: none; margin: 8px 0 0; padding: 0; font: 400 14.5px/1.55 var(--f-book); color: var(--em-tx2); }
#v-party .rs li { margin: 0; }
#v-party .rs b { font-weight: 600; color: var(--em-tx); }
#v-party .rs .cond, #v-party .rs i.cond { color: var(--em-bad); font-style: italic; }
#v-party .rs .cond .gi { width: 16px; height: 16px; margin: 0 4px 0 0; vertical-align: -3px; background: none; }
#v-party .rs .pet { display: inline-block; min-height: 0; padding: 6px 0; font: 400 14.5px/1.3 var(--f-book); color: var(--em-tx2); text-decoration-style: dotted; }
#v-party .rs .pet .i { width: 15px; height: 15px; margin-right: 5px; vertical-align: -2px; }
#v-party .afk-t { margin-top: 2px; font-size: 15px; }
#v-party .afk-t[aria-pressed="true"] { color: var(--em-ember); text-decoration-color: var(--em-ember); }
#v-party .afk-n { display: block; font: italic 400 13.5px/1.3 var(--f-book); color: var(--em-tx3); }
#v-party .afk-b { border-color: var(--em-ember); color: var(--em-ember); border-radius: 0; font-family: var(--f-book); }
/* разделы (заказы, обоз, владения, корабль, что мы знаем): заголовок-строка, внутри строки с линейкой */
#v-party .pad > details { margin: 0; background: none; border: 0; border-top: 1px solid var(--em-rule); border-radius: 0; border-image: none; filter: none; overflow: visible; }
#v-party .pad > .heroes + details, #v-party .pad > h2 + details { margin-top: 26px; }
#v-party .pad > details summary { min-height: 52px; padding: 0; font: italic 700 22px/1.1 var(--f-name); color: var(--em-tx); }
#v-party .pad > details summary .i { width: 18px; height: 18px; color: var(--em-tx3); }
#v-party .pad > details summary::after { color: var(--em-tx3); }
#v-party summary .n { padding: 0; border: 0; background: none; box-shadow: none; font: 400 15px var(--f-book); color: var(--em-tx3); }
#v-party .pad > details > ul:not(.cv-l) { padding: 0 0 12px 18px; font: 400 15px/1.45 var(--f-book); color: var(--em-tx2); }
#v-party .pad > details > ul b { color: var(--em-tx); font-weight: 600; }
#v-party .cv-l { padding: 0 0 8px; }
#v-party .cv-l li { gap: 12px; padding: 10px 0; border-top: 1px solid var(--em-rule); }
#v-party .cv-l li:first-child { border-top: 0; }
#v-party .cv-t { font: 400 15px/1.35 var(--f-book); color: var(--em-tx2); }
#v-party .cv-t b { font-weight: 600; color: var(--em-tx); }
#v-party .cv-t small { font-size: 13.5px; color: var(--em-tx3); }
#v-party .cv-t .chip { padding: 0; margin-left: 6px; border: 0; background: none; box-shadow: none; font: italic 400 13.5px var(--f-book); color: var(--em-tx2); }
#v-party .cv-t .chip.bad { color: var(--em-bad); }
#v-party .cv-i .em .i { color: var(--em-tx2); }
#v-party .cv-nm, #v-party .cv-ed { color: var(--em-tx); font-family: var(--f-book); }
#v-party .cv-ed .ph { color: var(--em-tx3); }
#v-party .cv-n { border-radius: 0; background: var(--em-well); border: 1px solid var(--em-rule); box-shadow: none; color: var(--em-tx); font-family: var(--f-book); }
#v-party .cv-l .xbtn { margin-left: auto; align-items: flex-end; text-align: right; font-size: 15px; }
#v-party .known-att li, #v-party .pad > details li { margin: 3px 0; }
#v-party .legend { color: var(--em-tx3); font: italic 400 14px var(--f-book); padding: 0 0 6px; }
#v-party .card { background: none; border: 0; padding: 0; color: var(--em-tx2); }
