/* Layout: tabbed one-column sheet, sections stack on phones, grid on wide screens */
:root {
  --bg: #eef0f2;
  --panel: #ffffff;
  --fg: #1d2329;
  --muted: #5d6873;
  --line: #d3d8dd;
  --field: #f7f8f9;
  --accent: #2c6b55;
  --accent-fg: #ffffff;
  --calc: #e7f1ec;
  --warn: #9b3a2a;
  --font-ui: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-num: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14181b; --panel: #1c2125; --fg: #e3e7ea; --muted: #9aa5ae; --line: #343c42;
    --field: #232a2f; --accent: #5fb393; --accent-fg: #0d1a14; --calc: #1f3229; --warn: #e58a76;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14181b; --panel: #1c2125; --fg: #e3e7ea; --muted: #9aa5ae; --line: #343c42;
  --field: #232a2f; --accent: #5fb393; --accent-fg: #0d1a14; --calc: #1f3229; --warn: #e58a76;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-ui); font-size: 14px; margin: 0; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--panel); }
header.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 8px;
}
.toprow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.toprow h1 { font-family: var(--font-head); font-size: 17px; margin: 0; text-wrap: balance; }
.toprow .who { color: var(--muted); font-size: 13px; }
nav.tabs { display: flex; gap: 4px; overflow-x: auto; margin-top: 8px; }
nav.tabs button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--field); color: var(--fg); padding: 7px 12px; border-radius: 6px; font: inherit; cursor: pointer; }
nav.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 14px 60px; max-width: 1180px; margin: 0 auto; }
.hint { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
section.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-width: 0; }
section.card.wide { grid-column: 1 / -1; }
section.card h2 { font-family: var(--font-head); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 10px; color: var(--accent); }
section.card h3 { font-size: 13px; margin: 12px 0 6px; }
.row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin-bottom: 8px; }
.f { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.f > span.l { font-size: 11px; color: var(--muted); letter-spacing: .03em; }
.f.grow { flex: 1 1 160px; }
input[type=text], input[type=number], textarea, select {
  font: inherit; color: var(--fg); background: var(--field); border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; min-width: 0; width: 100%;
}
input[type=number] { width: 80px; }
textarea { min-height: 84px; resize: vertical; }
input:focus-visible, textarea:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pk {
  font: inherit; color: var(--fg); background: var(--field); border: 1px solid var(--line); border-radius: 5px;
  padding: 6px 26px 6px 8px; min-height: 32px; text-align: left; cursor: pointer; position: relative; min-width: 64px; max-width: 100%;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pk::after { content: "▾"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pk.empty { color: var(--muted); }
.pk.hasdesc { border-style: dashed; }
.pk.grow { flex: 1 1 180px; width: 100%; }
.f > .pk.grow { flex: 0 0 auto; }
.o { font-family: var(--font-num); font-variant-numeric: tabular-nums; background: var(--calc); border-radius: 4px; padding: 6px 8px; min-height: 32px; display: inline-flex; align-items: center; min-width: 44px; }
.o.big { font-size: 26px; font-weight: 700; padding: 6px 14px; }
.o.text { font-family: var(--font-ui); white-space: normal; }
.muted { color: var(--muted); }
.btn { font: inherit; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); padding: 7px 12px; border-radius: 6px; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { border-color: var(--warn); color: var(--warn); background: transparent; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: left; vertical-align: middle; }
th { font-size: 11px; color: var(--muted); font-weight: 600; }
table.hit th, table.hit td { text-align: center; padding: 3px 4px; min-width: 30px; }
table.hit td.o { display: table-cell; border-radius: 0; }
.stat { display: grid; grid-template-columns: 56px 92px 1fr; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.stat:last-child { border-bottom: 0; }
.stat .nm { font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.stat .ds { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv > span:first-child { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mods { font-size: 11px; color: var(--accent); }
.portrait { width: 130px; aspect-ratio: 3/4; max-width: 100%; border: 1px dashed var(--line); border-radius: 6px; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; overflow: hidden; background: var(--field); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.ticks { display: flex; flex-wrap: wrap; gap: 6px; }
.ticks .grp { display: flex; gap: 2px; }
.ticks input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.weapon { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.weapon:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.refstrip { display: flex; flex-wrap: wrap; gap: 6px; }
.refstrip span { background: var(--field); border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; font-size: 12px; }
.tog { font: inherit; font-size: 12px; color: var(--fg); background: var(--field); border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; cursor: pointer; }
.tog[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; background: var(--calc); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 10px; gap: 2px; max-width: 100%; }
.chip .cn { font: inherit; color: var(--fg); background: none; border: 0; padding: 4px 2px; cursor: pointer; text-align: left; }
.chip .x { font: inherit; font-size: 16px; line-height: 1; color: var(--muted); background: none; border: 0; padding: 4px 6px; cursor: pointer; border-radius: 999px; }
.chip .x:hover { color: var(--warn); }
.add { font: inherit; font-size: 20px; line-height: 1; width: 34px; height: 34px; border-radius: 999px; border: 1px dashed var(--accent); color: var(--accent); background: transparent; cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
h2.ih { display: flex; align-items: center; gap: 8px; }
.catbtn { width: 36px; height: 34px; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 6px; background: var(--calc); color: var(--accent); cursor: pointer; padding: 0; }
.catbtn.none { border-style: dashed; background: transparent; font-size: 18px; }
table.gear.person td:first-child { width: 40px; }
table.gear th, table.gear td { padding: 4px 3px; }
table.gear .pk { min-width: 0; width: 100%; }
table.gear input[type=number] { width: 54px; }
table.gear td:nth-child(2) input { min-width: 0; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; padding: 12px 14px; }
.catgrid button { display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; color: var(--fg); background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 12px 6px; cursor: pointer; }
.catgrid button svg { width: 28px; height: 28px; color: var(--accent); }
.catgrid button.sel { border-color: var(--accent); background: var(--calc); }
.catgrid .txt { font-weight: 700; font-size: 18px; color: var(--accent); height: 28px; display: grid; place-items: center; }
.list-item { display: flex; gap: 8px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 6px 0; flex-wrap: wrap; }
.list-item .nm { font-weight: 600; }
.badge { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; background: var(--calc); color: var(--accent); border-radius: 3px; padding: 1px 5px; margin-left: 6px; }
details > summary { cursor: pointer; color: var(--accent); margin: 6px 0; }
/* modal */
#modal { position: fixed; inset: 0; background: rgba(10, 14, 18, .5); display: grid; place-items: center; z-index: 20; padding: 16px; }
#modal .box { background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; width: min(560px, 100%); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
#modal .box header { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; justify-content: space-between; }
#modal .box header b { font-family: var(--font-head); }
#modal .box .body { padding: 10px 14px; overflow: auto; white-space: pre-wrap; }
#modal .opts { overflow: auto; padding: 4px 0; }
#modal .opts button { display: block; width: 100%; text-align: left; font: inherit; color: var(--fg); background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; cursor: pointer; }
#modal .opts button:hover, #modal .opts button:focus-visible { background: var(--field); }
#modal .opts button.sel { background: var(--calc); font-weight: 600; }
#modal .search { margin: 8px 14px; width: calc(100% - 28px); }
#modal .foot { padding: 10px 14px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 6px; z-index: 30; font-size: 13px; }
@media (max-width: 520px) {
  .stat { grid-template-columns: 48px 84px 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
/* Stats top: Abilities (wide, left) beside Character (right); Character first on phones */
.top2 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin-bottom: 12px; align-items: start; }
@media (min-width: 900px) {
  .top2 { grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); }
  .top2 .abil { order: 1; }
  .top2 .charcard { order: 2; }
}
.cname { font-family: var(--font-head); font-size: 22px; font-weight: 700; margin: 0 0 10px; overflow-wrap: anywhere; text-wrap: balance; }
.portrait.big { width: min(240px, 62%); flex: 0 0 auto; }
.abil .stat { grid-template-columns: 52px 88px minmax(0, 1fr); }
.abil .ds { gap: 6px 8px; }
.abil .kv .o { min-width: 52px; }
.xbtn { font: inherit; font-size: 18px; line-height: 1; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; align-self: end; }
.xbtn:hover { color: var(--warn); border-color: var(--warn); }
@media (max-width: 560px) {
  .abil .stat { grid-template-columns: 76px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; row-gap: 2px; }
  .abil .stat > .nm { grid-column: 1; grid-row: 1; }
  .abil .stat > div:nth-child(2) { grid-column: 1; grid-row: 2; }
  .abil .stat > .ds { grid-column: 2; grid-row: 1 / 3; gap: 4px 5px; }
  .abil .stat .pk { min-width: 0; width: 76px; padding-right: 20px; }
  .abil .kv .o { min-width: 0; padding: 5px 5px; font-size: 13px; }
  .abil .kv > span:first-child { font-size: 9px; letter-spacing: 0; }
  .abil .ds input { width: 46px !important; }
}

/* ===== Letter-size character sheets (816 x 1056 px = 8.5 x 11 in), scaled to fit the screen ===== */
:root { --edge: 32px; }
body.sheetmode main { max-width: none; padding-left: var(--edge); padding-right: var(--edge); padding-block: 12px 40px; }
.pageinfo { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-left: auto; }
.pageinfo b { color: var(--fg); }
.pageinfo .dots { display: inline-flex; gap: 4px; }
.pageinfo .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.pageinfo .dots i.on { background: var(--accent); }
.iconbtn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--fg); cursor: pointer; padding: 0; }
.iconbtn svg { width: 20px; height: 20px; }
.toprow h1 { margin-right: auto; }
.edge { position: fixed; top: 0; bottom: 0; width: var(--edgezone, 30px); z-index: 4; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.edgeL { left: 0; padding-left: env(safe-area-inset-left, 0px); }
.edgeR { right: 0; padding-right: env(safe-area-inset-right, 0px); }
.edge span { display: flex; align-items: center; justify-content: center; width: 30px; height: 60px; flex: 0 0 auto; font-size: 22px; line-height: 1; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--panel) 72%, transparent); box-shadow: 0 2px 8px rgba(0,0,0,.12); opacity: .7; transition: opacity .15s, background .15s; }
.edge:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.edge:hover span, .edge:focus-visible span { opacity: 1; color: var(--accent); border-color: var(--accent); }
@media (pointer: coarse), (max-width: 600px) { .edge span { width: 18px; height: 44px; font-size: 16px; opacity: .45; border-radius: 8px; } }
.paperwrap { margin: 0 auto 16px; position: relative; }
.paper {
  width: 816px; height: 1056px; transform-origin: top left; position: absolute; top: 0; left: 0;
  background: var(--panel); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
  padding: 26px 28px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; font-size: 10.5px;
}
.paper .pg { display: grid; gap: 6px; align-items: start; }
.paper .col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.paper .box { border: 1px solid var(--line); border-radius: 4px; padding: 5px 7px 6px; min-width: 0; background: var(--panel); }
.paper .box.grow { flex: 1 1 auto; display: flex; flex-direction: column; }
.paper .box.grow textarea { flex: 1 1 auto; }
.paper h2 { font-family: var(--font-head); font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase; margin: 0 0 4px; color: var(--accent); }
.paper h3 { font-size: 9.5px; margin: 5px 0 2px; }
.paper .row { gap: 3px 6px; margin-bottom: 3px; }
.paper .row.nw { flex-wrap: nowrap; }
.paper .f { gap: 1px; }
.paper .f > span.l, .paper .kv > span:first-child, .paper .l2 { font-size: 7.5px; color: var(--muted); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.paper .l2 { flex: 0 0 auto; }
.paper .f.grow, .paper .kv.grow { flex: 1 1 0; min-width: 0; }
.paper input[type=text], .paper input[type=number], .paper textarea { font-size: 10.5px; padding: 1px 4px; border-radius: 3px; height: 20px; }
.paper input[type=number] { width: 44px; }
.paper textarea { height: auto; min-height: 0; resize: none; line-height: 1.35; }
.paper .pk { min-height: 20px; height: 20px; padding: 1px 15px 1px 5px; font-size: 10.5px; border-radius: 3px; min-width: 34px; line-height: 16px; }
.paper .pk::after { right: 4px; font-size: 8px; }
.paper .pk.grow { flex: 1 1 auto; width: 100%; min-width: 0; }
.paper .o { min-height: 20px; height: 20px; padding: 1px 5px; font-size: 10.5px; min-width: 26px; border-radius: 3px; white-space: nowrap; }
.paper .o.text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 18px; font-family: var(--font-ui); }
.paper .o.big { font-size: 18px; height: 30px; padding: 2px 8px; }
.paper .trip { display: inline-flex; gap: 2px; }
.paper .mods { font-size: 8.5px; line-height: 1.1; }
.paper .foot { font-size: 8px; color: var(--muted); margin: 3px 0 0; }
.paper table { width: 100%; }
.paper th, .paper td { padding: 1px 3px; font-size: 10px; border-bottom: 1px solid var(--line); }
.paper th { font-size: 8px; }
/* abilities */
.paper .stat { grid-template-columns: 34px 66px minmax(0, 1fr); gap: 5px; padding: 2px 0; }
.paper .stat .nm { font-size: 13px; }
.paper .stat .pk { width: 66px; min-width: 0; }
.paper .stat .ds { flex-wrap: nowrap; gap: 4px; }
.paper .stat .kv .o { min-width: 46px; }
.paper .cname { font-size: 17px; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paper .portrait { width: 118px; height: 152px; aspect-ratio: auto; flex: 0 0 auto; font-size: 9px; padding: 4px; }
/* weapons */
.paper .wpn { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.paper .wpn:last-child { border-bottom: 0; }
.paper table.hit { width: 392px; flex: 0 0 auto; }
.paper table.hit th, .paper table.hit td { text-align: center; padding: 0 1px; min-width: 0; font-size: 9.5px; height: 17px; }
.paper table.hit th:first-child { text-align: left; width: 32px; }
.paper table.hit td.o { height: 17px; }
/* to-hit + conditions */
.paper .refstrip { gap: 3px; align-items: center; }
.paper .tog { font-size: 9.5px; padding: 2px 5px; border-radius: 3px; }
.paper .chips { gap: 4px; flex-wrap: nowrap; }
.paper .chip { padding: 0 2px 0 7px; font-size: 10px; }
.paper .chip .x { font-size: 13px; padding: 1px 4px; }
.paper .chip .cn { padding: 2px 1px; font-size: 10px; }
.paper .add { width: 22px; height: 22px; font-size: 15px; }
.paper .xbtn { width: 22px; height: 22px; font-size: 13px; border-radius: 3px; }
.paper .ammo { padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); }
.paper .ticks { gap: 3px; }
.paper .ticks .grp { gap: 1px; }
.paper .ticks input { width: 12px; height: 12px; }
.paper table.saves .pk { min-width: 40px; width: 44px; }
.paper .kv { gap: 1px; }
/* background / class / gear */
.paper .langs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 5px; }
.paper .hd { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px 6px; }
.paper .hd .pk { width: 100%; }
.paper table.gear td, .paper table.gear th { padding: 1px 2px; height: 22px; }
.paper table.gear.person td:first-child { width: 28px; }
.paper .catbtn { width: 24px; height: 20px; border-radius: 3px; }
.paper .catbtn svg { width: 14px; height: 14px; }
.paper .catbtn.none { font-size: 13px; }

@media print {
  @page { size: letter portrait; margin: 0; }
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) { --bg: #fff; --panel: #fff; --fg: #111; --muted: #555; --line: #bbb; --field: #fff; --calc: #f1f4f2; --accent: #2c6b55; color-scheme: light; }
  body { background: #fff; }
  body::before, header.top, .edge, #toast, #modal { display: none !important; }
  main, body.sheetmode main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .paperwrap, .paperwrap[hidden] { display: block !important; width: 8.5in !important; height: 11in !important; margin: 0 !important; page-break-after: always; break-after: page; overflow: hidden; }
  .paperwrap:last-child { page-break-after: auto; break-after: auto; }
  .paper { transform: none !important; position: static; width: 8.5in; height: 11in; border: 0; box-shadow: none; }
  .add, .xbtn, .chip .x, .pk::after, .catbtn.none { visibility: hidden; }
  .tog[aria-pressed="false"] { opacity: .55; }
}
[hidden] { display: none !important; }
.paper .tht { font-style: normal; font-size: 8.5px; color: var(--muted); margin-left: 4px; }
.paper table.hit { table-layout: fixed; }
.paper table.saves td:first-child { white-space: nowrap; font-size: 9.5px; }
.paper table.saves td, .paper table.saves th { padding: 1px 2px; }
.paper .ammo .ticks { margin-top: 1px; }
.paper .stat { padding: 1px 0; }
.paper { padding: 22px 26px; gap: 5px; }
.paper .pg, .paper .col { gap: 5px; }
.paper .wpn { padding: 2px 0; }
.paper .wpn .row { margin-bottom: 2px; }
.paper table.hit th, .paper table.hit td, .paper table.hit td.o { height: 15px; line-height: 14px; }
.paper .box { padding: 4px 7px 5px; }
.paper .chips.wrap { flex-wrap: wrap; }
.paper table.gear input[type=text] { width: 100%; }
.paper .pg > * { min-width: 0; }

.toprow { flex-wrap: nowrap; }
.toprow h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toprow .who, .pageinfo { white-space: nowrap; }
@media (max-width: 560px) { .toprow .who { display: none; } .pageinfo .dots { display: none; } }
.paper .cdesc { font-size: 10px; line-height: 1.35; }
.paper .cdesc ul { margin: 0; padding-left: 14px; }
.paper .cdesc > ul { padding-left: 12px; }
.paper .cdesc li { margin: 1px 0; }
.paper .cdesc h4 { font-family: var(--font-head); font-size: 10.5px; margin: 6px 0 2px; color: var(--accent); }
.paper table.ctable th { font-size: 8px; vertical-align: bottom; text-align: center; }
.paper table.ctable td { text-align: center; font-size: 10px; padding: 2px 3px; }
.paper table.ctable td:last-child, .paper table.ctable th:last-child { text-align: left; }
.paper table.ctable td:first-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.paper table.ctable tr.cur td { background: var(--calc); font-weight: 700; }
/* class description sheets */
.paper .cdbox .cdesc { column-count: 2; column-gap: 18px; font-size: 10px; line-height: 1.38; }
.paper .cdesc p { margin: 0 0 4px; }
.paper .cdesc ul { break-inside: auto; }
.paper .cdesc li { break-inside: avoid; }
.paper .cdesc h4 { break-after: avoid; margin: 6px 0 2px; }
.paper .cdesc h4:first-child { margin-top: 0; }
.paper .cdesc table { width: 100%; margin: 2px 0 6px; break-inside: avoid; }
.paper .cdesc table th, .paper .cdesc table td { font-size: 9.5px; padding: 1px 4px; vertical-align: top; text-align: left; }
.paper .cdesc table.kvt th { width: 36%; color: var(--muted); font-weight: 600; font-size: 9px; }
.paper .cdesc table.dt th { font-size: 8.5px; }
/* class description + table on the Class page (compact so the longest class fits the sheet) */
.paper .cdbox .cdesc { column-count: 3; column-gap: 14px; font-size: 9px; line-height: 1.3; }
.paper .cdbox .cdesc ul { padding-left: 11px; }
.paper .cdbox .cdesc li { margin: 0; }
.paper .cdbox .cdesc h4 { font-size: 9.5px; margin: 4px 0 1px; }
.paper .cdbox .cdesc p { margin: 0 0 3px; }
.paper .cdbox .cdesc table th, .paper .cdbox .cdesc table td { font-size: 8.5px; padding: 0 3px; }
.paper table.ctable td { padding: 0 3px; font-size: 9.5px; line-height: 13px; }
.paper table.ctable th { font-size: 7.5px; line-height: 1.15; padding: 1px 3px; }
.paper .clsw .tog { font-size: 10px; }
.paper table.ctable td { line-height: 12px; }
.paper .hdtot .o.big { font-size: 15px; height: 22px; padding: 1px 8px; }
/* damage-type icons in the Resistances / Immunities lists */
.withi { display: inline-flex; align-items: center; gap: 8px; }
.list-item .withi { display: flex; align-items: center; gap: 10px; }
.dmgi { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 6px; flex: 0 0 auto; color: var(--accent); background: var(--calc); }
.dmgi svg { width: 16px; height: 16px; }
.dmg-fire { --ic: #c2410c; } .dmg-cold { --ic: #1d6fa5; } .dmg-electricity { --ic: #a16207; } .dmg-acid { --ic: #4d7c0f; } .dmg-poison { --ic: #7e22ce; }
.dmg-fire, .dmg-cold, .dmg-electricity, .dmg-acid, .dmg-poison { color: var(--ic); background: color-mix(in srgb, var(--ic) 13%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dmg-fire { --ic: #fb923c; } :root:not([data-theme="light"]) .dmg-cold { --ic: #60a5fa; } :root:not([data-theme="light"]) .dmg-electricity { --ic: #facc15; } :root:not([data-theme="light"]) .dmg-acid { --ic: #a3e635; } :root:not([data-theme="light"]) .dmg-poison { --ic: #c084fc; } }
:root[data-theme="dark"] .dmg-fire { --ic: #fb923c; } :root[data-theme="dark"] .dmg-cold { --ic: #60a5fa; } :root[data-theme="dark"] .dmg-electricity { --ic: #facc15; } :root[data-theme="dark"] .dmg-acid { --ic: #a3e635; } :root[data-theme="dark"] .dmg-poison { --ic: #c084fc; }

/* night mode switch */
.switch { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: 0 0 auto; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--panel); box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.dmgpair { display: inline-flex; gap: 4px; flex: 0 0 auto; }

/* sparkle badge for magical element types */
:root { --arcane: #7c3aed; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --arcane: #a78bfa; } }
:root[data-theme="dark"] { --arcane: #a78bfa; }
.dmgi.magic { position: relative; }
.dmgi .mstar { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; color: var(--arcane); }
.dmgi .mstar svg { width: 10px; height: 10px; fill: currentColor; stroke: none; }
/* Stats: Character box matches the Abilities box height; portrait fills the free space */
.paper .pg.toppg { align-items: stretch; }
.paper .charbox { display: flex; flex-direction: column; }
.paper .charhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.paper .charhead h2 { margin-top: 2px; }
.paper .charhead .f.light { align-items: flex-end; }
.paper .charhead .f.light .pk { width: 118px; }
.paper .charbox .cname { margin: 0 0 5px; }
.paper .charbox .portrait { width: 100%; height: auto; flex: 1 1 auto; min-height: 120px; aspect-ratio: auto; }
.paper .charbox .portrait { flex: 1 1 0; min-height: 0; position: relative; }
.paper .charbox .portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.paper .charbox .portrait img { object-position: center top; }
/* light source inline at the top right of the Abilities box */
.paper .abhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -2px 0 2px; }
.paper .abhead h2 { margin: 0; }
.paper .abhead .lsrc { display: inline-flex; align-items: center; gap: 6px; }
.paper .abhead .lsrc .pk { width: 132px; height: 18px; min-height: 18px; line-height: 14px; font-size: 10px; }
/* die icon beside a non-zero per-die damage value */
.pd { display: inline-flex; align-items: center; gap: 4px; }
.die { display: inline-grid; place-items: center; width: 16px; height: 16px; color: var(--accent); }
.die svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
/* compact Movement & load tables */
.paper table.mvt { table-layout: fixed; width: 100%; margin-bottom: 3px; }
.paper table.mvt th { font-size: 7px; line-height: 1.05; padding: 0 1px 1px; text-align: left; vertical-align: bottom; border: 0; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); font-weight: 600; }
.paper table.mvt td { padding: 0 1px; border: 0; }
.paper table.mvt td .o { display: flex; min-width: 0; width: 100%; height: 18px; min-height: 18px; padding: 0 3px; font-size: 9.5px; }
.paper table.mvt.mv7 th:first-child, .paper table.mvt.mv7 td:first-child { width: 40px; }
.paper table.mvt td .pk { width: 100%; min-width: 0; height: 18px; min-height: 18px; padding: 0 12px 0 3px; font-size: 9.5px; line-height: 16px; }
.paper table.mvt td .pk::after { right: 2px; }
/* Immunities & resistances box on Stats */
.paper .irbox .l2 { display: block; margin: 2px 0 2px; }
.paper .irbox .chips { gap: 3px; margin-bottom: 3px; }
.paper .chip.irc { padding: 1px 1px 1px 2px; gap: 3px; }
.paper .chip.irc .dmgpair { gap: 1px; }
.paper .chip.irc .dmgi { width: 15px; height: 15px; border-radius: 3px; }
.paper .chip.irc .dmgi svg { width: 11px; height: 11px; }
.paper .chip.irc .dmgi .mstar { width: 8px; height: 8px; top: -3px; right: -3px; }
.paper .chip.irc .dmgi .mstar svg { width: 7px; height: 7px; }
.paper .chip.irc .cn { font-size: 9.5px; padding: 1px 0; display: inline-flex; align-items: center; gap: 2px; }
.paper .chip.irc .die { width: 11px; height: 11px; } .paper .chip.irc .die svg { width: 10px; height: 10px; }
.paper .irbox .add { width: 20px; height: 20px; font-size: 14px; }
/* tighter Saving throws rows to make room for Immunities & resistances */
.paper table.saves td, .paper table.saves th { padding: 0 2px; height: 20px; }
.paper table.saves .pk { height: 17px; min-height: 17px; line-height: 14px; font-size: 9.5px; padding: 0 12px 0 4px; }
.paper table.saves .pk::after { right: 2px; }
.paper table.saves td .o { height: 17px; min-height: 17px; padding: 0 4px; font-size: 10px; }
.paper .irbox .chips .l2 { display: inline-block; margin: 0 2px 0 0; }
/* bottom area: Immunities & resistances spans the middle and right columns under them */
.paper .pg.botpg { grid-template-rows: auto auto; }
.paper .pg.botpg > .col:first-child { grid-row: 1 / span 2; }
.paper .pg.botpg > .irspan { grid-column: 2 / 4; grid-row: 2; }
.paper .irbox { padding-top: 3px; padding-bottom: 3px; }
.paper .irbox h2 { margin-bottom: 2px; }
.paper .irbox .chips { margin-bottom: 1px; row-gap: 2px; }
.paper .chip.irc { padding-top: 0; padding-bottom: 0; }
.paper .chip.irc { padding-left: 3px; }
.paper .chip.irc .cn { gap: 3px; }
.paper .chip.irc .irv { display: inline-flex; align-items: center; gap: 1px; font-size: 9.5px; font-variant-numeric: tabular-nums; }
.paper .irbg { margin: 3px 0; gap: 3px; }
.paper .irbg .l2, .paper .irbox .chips .l2 { display: inline-block; min-width: 68px; margin: 0; }
.paper .irbg .add { width: 20px; height: 20px; font-size: 14px; }
.paper .chip.irc.ro { padding: 1px 6px 1px 3px; cursor: default; }
.paper .chip.irc.ro .cn { display: inline-flex; align-items: center; gap: 3px; }
.paper .irnone { font-size: 9.5px; }
/* Stats: bottom row fills to the page's printable bottom; Immunities & resistances box stretches to it */
.paper .pg.lastpg { flex: 1 1 auto; align-items: stretch; }
.paper .pg.lastpg > .col:last-child .irbox { flex: 1 1 auto; }
/* item editor: granted immunities/resistances; reuse the compact chip look outside the sheet */
.egr { margin: 4px 0; gap: 6px; }
.egr .l2, .grants { font-size: 11px; color: var(--muted); }
.egr .l2 { min-width: 84px; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
.chip.irc { padding: 2px 4px 2px 4px; gap: 4px; }
.chip.irc .cn, .chip.irc.ro { display: inline-flex; align-items: center; gap: 3px; }
.chip.irc .dmgi { width: 20px; height: 20px; border-radius: 4px; }
.chip.irc .dmgi svg { width: 14px; height: 14px; }
.chip.irc .irv { display: inline-flex; align-items: center; gap: 1px; font-size: 12px; }
.grants { display: inline-flex; gap: 3px; flex-wrap: wrap; vertical-align: middle; }
.grants .chip.irc { padding: 1px 3px; }
.grants .chip.irc .dmgi { width: 16px; height: 16px; } .grants .chip.irc .dmgi svg { width: 11px; height: 11px; }
.chip.irc[data-irdesc] { cursor: pointer; }
.chip.irc[data-irdesc] .cn { cursor: pointer; }
.chip.irc[data-irdesc]:hover { border-color: var(--accent); }
.chip.irc[data-irdesc]:focus-visible, .chip.irc .cn[role=button]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.abgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 10px; margin-bottom: 4px; }
/* Background: immunity/resistance chips with icons and names; special abilities list */
.paper .chip.irc.lbl .cn { font-size: 11px; gap: 3px; padding: 1px 2px 1px 0; }
.paper .chip.irc.lbl .irn { font-weight: 600; margin-right: 1px; }
.abl { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 6px; }
.abr { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 1px 4px 1px 6px; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; font-size: 10.5px; line-height: 1.35; white-space: nowrap; }
.abr:hover, .abr:focus-visible { border-color: var(--accent); outline: none; }
.abr b { font-size: 11px; flex: 0 0 auto; }
.abr .src { flex: 0 0 auto; font-size: 9.5px; padding: 0 4px; border-radius: 7px; background: rgba(127,127,127,.14); color: var(--muted); }
.abr .badge { flex: 0 0 auto; }
.abr .muted { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.abr .x { margin-left: auto; flex: 0 0 auto; padding: 0 4px; }
.abr .x { border: 0; background: none; color: var(--muted); font-size: 13px; line-height: 1; min-height: 0; } .abr .x:hover { color: var(--fg); }
/* Settings: print card */
.prcard select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--field, var(--panel)); color: var(--fg); min-width: 130px; }
.prcard .prrange.off { opacity: .55; }
.prcard .prck { align-items: center; gap: 8px; margin: 0 0 6px; }
.prcard .prck.off { opacity: .45; }
.prcard .prrange { margin-top: 2px; }
#printArea { display: none; }
@media print {
  body.printsel main, body.printsel .edge { display: none !important; }
  body.printsel #printArea { display: block; }
}
/* Data: read-only saving throw tables */
table.savetbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.savetbl th { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; padding: 4px; border-bottom: 1px solid var(--line); }
table.savetbl td { text-align: center; padding: 4px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.savetbl td:first-child { text-align: left; font-weight: 600; white-space: nowrap; }
table.savetbl tr.cur td { background: color-mix(in srgb, var(--accent) 16%, transparent); }
/* Background: thief skills / notes box with its switch at the top right */
.paper .tbox .bh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.paper .tbox .bh h2 { margin: 0; }
.tsw { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; font-size: 10px; color: var(--muted); }
.tsw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tsw .track { width: 26px; height: 15px; border-radius: 999px; background: var(--line); position: relative; flex: 0 0 auto; transition: background .15s; }
.tsw .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--panel); box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.tsw input:checked + .track { background: var(--accent); }
.tsw input:checked + .track::after { transform: translateX(11px); }
.tsw input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.tsw.lock { cursor: default; opacity: .8; }
.paper .tbox textarea { height: calc(100% - 20px); min-height: 150px; }
@media print { .tsw { display: none; } }
.pk.bad { color: #c62828 !important; border-color: #c62828 !important; background: color-mix(in srgb, #c62828 10%, var(--field)) !important; font-weight: 600; }
:root[data-theme="dark"] .pk.bad { color: #ff8a80 !important; border-color: #ff8a80 !important; }
/* thief skills: calculated base/race columns; skills the class can't use are greyed out */
.paper table.tsk td:nth-child(2), .paper table.tsk td:nth-child(3) { text-align: center; }
.paper table.tsk tr.na td { color: var(--muted); opacity: .45; }
.paper table.tsk tr.na td:first-child { text-decoration: line-through; }
/* Stats: HP in a heart and AC in a shield */
.paper .vrow { align-items: center; }
.paper .vital { position: relative; width: 58px; height: 54px; flex: 0 0 auto; display: grid; place-items: center; }
.paper .vital svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.paper .vital.heart svg { fill: color-mix(in srgb, #c62828 7%, transparent); stroke: #c62828; }
.paper .vital.shield svg { fill: color-mix(in srgb, var(--accent) 7%, transparent); }
.paper .vital .vnum { position: relative; font-size: 20px; font-weight: 700; line-height: 1; background: none !important; border: 0 !important; padding: 0 !important; min-width: 0 !important; margin-top: -4px; }
.paper .vital.shield .vnum { margin-top: -6px; }
.paper .vital .vl { position: absolute; bottom: -1px; left: 0; right: 0; text-align: center; font-size: 8px; font-weight: 700; letter-spacing: .06em; color: var(--muted); display: none; }
:root[data-theme="dark"] .paper .vital.heart svg { stroke: #ff8a80; }
@media print { .paper .vital.heart svg { stroke: #c62828; } .paper .vital.shield svg { stroke: #333; } }
/* subtler outlines */
.paper .vital svg { stroke-width: 1.3; opacity: .55; }
.paper .vital.heart svg, .paper .vital.shield svg { fill: none; }
.paper .vital.heart svg { stroke: color-mix(in srgb, #c62828 70%, var(--muted)); }
.paper .vital.shield svg { stroke: var(--muted); }
.paper .vital.shield { margin-left: 10px; }
:root[data-theme="dark"] .paper .vital.heart svg { stroke: #e57373; }
@media print { .paper .vital svg { opacity: .6; } .paper .vital.heart svg { stroke: #c62828; } .paper .vital.shield svg { stroke: #555; } }
.paper .vwrap { display: flex; flex-direction: column; align-items: center; gap: 1px; margin-left: 10px; }
.paper .vwrap .vital.shield { margin-left: 0; }
/* Hit points box: bottoms of heart, Current HP and shield line up; tighter */
.paper .hpbox .vrow { align-items: flex-end; gap: 10px; }
.paper .hpbox h2 { margin-bottom: 2px; }
.paper .hpbox .vital { width: 52px; height: 48px; }
.paper .hpbox .vital .vnum { font-size: 19px; }
.paper .hpbox .vwrap { margin-left: 0; gap: 0; }
.paper .hpbox .vwrap .l { font-weight: 800; font-size: 11px; color: var(--fg); letter-spacing: .04em; }
.paper .hpbox .f { margin-bottom: 4px; }
.paper .hpbox { display: flex; align-items: stretch; gap: 12px; }
.paper .hpbox .hpl { flex: 0 1 auto; display: flex; flex-direction: column; }
.paper .hpbox .vwrap { display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.paper .hpbox .vwrap h2 { margin: 0 0 2px; font-weight: 800; }
.paper .hpbox .vrow .f { margin-bottom: 2px; }
/* Stats: name with the light source picker to its right (box titles removed) */
.paper .charbox .cnrow { display: flex; align-items: flex-end; gap: 6px; margin: 0 0 5px; min-width: 0; }
.paper .charbox .cnrow .cname { flex: 1 1 auto; min-width: 0; margin: 0; }
.paper .charbox .lsrc { flex: 0 0 auto; display: flex; flex-direction: column; gap: 1px; }
.paper .charbox .lsrc .l2 { font-size: 8.5px; margin: 0; }
.paper .charbox .lsrc .pk { width: 92px; height: 18px; min-height: 18px; line-height: 14px; font-size: 10px; }
.paper .charbox .cnrow .cname { white-space: normal; font-size: 15px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* HP box: no AC label; heart, Current HP and shield share a bottom edge, centred top-to-bottom */
.paper .hpbox { align-items: center; }
.paper .hpbox .hpl, .paper .hpbox .vwrap { justify-content: center; }
.paper .hpbox .vwrap { align-self: center; }
.paper .hpbox .vrow { align-items: flex-end; }
.paper .l2.cach { display: block; font-size: 9px; font-weight: 700; color: var(--fg); margin: 4px 0 1px; }
.paper .f.atk { margin-left: auto; align-items: center; }
.paper .f.atk .atkn { font-size: 8px; color: var(--muted); }
.paper .foot.hst { margin: 2px 0 0; color: var(--accent); font-weight: 600; } .paper .foot.hst:empty { display: none; }
/* Hasted: red outline on the doubled values */
.is-hasted .paper [data-o="attacks"], .is-hasted .paper table.mv7 td .o { outline: 2px solid #c62828; outline-offset: -1px; }
.is-hasted .paper table.mv7 td:first-child .pk { outline: none; }
:root[data-theme="dark"].is-hasted .paper [data-o="attacks"], :root[data-theme="dark"].is-hasted .paper table.mv7 td .o { outline-color: #ff8a80; }
.is-hasted .paper table.mv7 td .o { font-size: 9.5px; letter-spacing: -.2px; padding-left: 2px; padding-right: 2px; }
.paper .foot.hst { color: #c62828; }
.paper .foot.shk { align-self: flex-end; margin: 0 0 3px 4px; white-space: nowrap; }
.card a { color: var(--accent); text-underline-offset: 2px; }
/* Settings: character list */
.charlist { display: flex; flex-direction: column; gap: 6px; }
.charlist .crow { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.charlist .crow.act { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.charlist .cinfo { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.charlist .cinfo .muted { font-size: 12px; }
.charlist .cdel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13px; }
.charlist .cdel[hidden] { display: none; }
/* Stats: tap the name to switch */
.paper .cname.pickc { cursor: pointer; text-decoration: underline dotted color-mix(in srgb, var(--muted) 60%, transparent); text-underline-offset: 3px; }
.paper .cname.pickc::after { content: " ▾"; font-size: .6em; color: var(--muted); vertical-align: middle; }
@media print { .paper .cname.pickc { text-decoration: none; } .paper .cname.pickc::after { content: none; } }
/* potions */
.potrow { display: flex; align-items: center; gap: 4px; min-width: 0; }
.potrow .pk { flex: 1 1 auto; min-width: 0; }
.potrow .doses { flex: 0 0 auto; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.drinks { display: flex; flex-direction: column; gap: 6px; }
.drinks .btn { text-align: left; }
.drinks .heal { font-weight: 400; opacity: .85; margin-left: 6px; }
.paper .chip.fx { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.paper .chip.fx .cn { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; cursor: pointer; }
.paper .chip.fx svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.paper .chip.fx .fxd { font-weight: 400; color: var(--muted); font-size: 9.5px; margin-left: 2px; }
.paper .fxrow { margin-bottom: 4px; }
/* temporary (potion) effects: amber dashed outline + hourglass with how long it lasts */
.abr.tmp, .paper .chip.irc.tmp { border: 1.5px dashed #d08a00 !important; background: color-mix(in srgb, #f0a500 9%, transparent) !important; }
.abr.tmp b { color: #a86a00; }
.abr .tdur { flex: 0 0 auto; font-size: 9.5px; font-weight: 700; color: #a86a00; padding: 0 5px; border-radius: 7px; background: color-mix(in srgb, #f0a500 18%, transparent); }
.paper .chip.irc .tmk { font-size: 9px; color: #a86a00; margin-left: 1px; }
.paper .chip.fx { border: 1.5px dashed #d08a00 !important; background: color-mix(in srgb, #f0a500 10%, transparent) !important; }
.paper .chip.fx .fxd { color: #a86a00; font-weight: 600; }
:root[data-theme="dark"] .abr.tmp b, :root[data-theme="dark"] .abr .tdur, :root[data-theme="dark"] .paper .chip.fx .fxd, :root[data-theme="dark"] .paper .chip.irc .tmk { color: #ffc65c; }
/* rods & staves */
.rpow { display: flex; align-items: flex-start; gap: 8px; }
.rpow .btn { flex: 0 0 auto; padding: 4px 12px; }
.rpow .btn[disabled] { opacity: .45; }
.rpow > div { font-size: 13px; line-height: 1.35; }
.handbtn { flex: 0 0 auto; border: 1px solid var(--line); background: none; border-radius: 6px; font-size: 12px; line-height: 1; padding: 2px 4px; cursor: pointer; filter: grayscale(1); opacity: .45; }
.handbtn[aria-pressed="true"] { filter: none; opacity: 1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.rodbad { flex: 0 0 auto; color: #fff; background: #c62828; border-radius: 50%; width: 15px; height: 15px; font-size: 10px; font-weight: 800; display: inline-grid; place-items: center; }
.paper .foot.savenote:empty { display: none; }
@media print { .handbtn { display: none; } }
.abby { font-size: 12px; }
.srcchip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px 1px 3px; margin: 1px 0; border: 1px solid var(--line); border-radius: 10px; white-space: nowrap; }
.srcchip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.abby + td.muted { min-width: 200px; }
#modal .opts button .osub { display: block; font-size: 11.5px; line-height: 1.35; color: var(--muted); font-weight: 400; margin-top: 2px; white-space: normal; }

/* ---------- cleric spells page ---------- */
.paper .sphead .spcl { display: flex; flex-direction: column; line-height: 1.25; }
.paper .sphead .spcl b:first-child { font-family: var(--font-head); font-size: 15px; color: var(--accent); }
.paper .sphead .spcl span { color: var(--muted); font-size: 10px; }
.paper .spview { display: flex; gap: 0; }
.paper .spview .tog { border-radius: 0; }
.paper .spview .tog:first-child { border-radius: 3px 0 0 3px; }
.paper .spview .tog:last-child { border-radius: 0 3px 3px 0; border-left: 0; }
.paper .btn.sm { font-size: 9.5px; padding: 3px 7px; min-height: 0; }
.paper .spnote { font-size: 9px; margin: 4px 0 0; }
.paper .spbox { padding: 2px 4px 4px; flex: 1 1 auto; }
.paper table.spt { width: 100%; table-layout: fixed; border-collapse: collapse; }
.paper table.spt td, .paper table.spt th { padding: 0 3px; height: 17px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9.5px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); text-align: left; }
.paper table.spt tr.spth th { font-size: 8.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.paper table.spt tr.splv td { height: 22px; padding-top: 6px; border-bottom: 0; font-size: 11px; background: color-mix(in srgb, var(--accent) 9%, transparent); }
.paper table.spt tr.splv td b { font-family: var(--font-head); color: var(--accent); font-size: 12px; }
.paper table.spt tr.splv .spmax { text-align: right; font-size: 10px; white-space: nowrap; }
.paper table.spt tr.splv .spmax input { width: 34px; font: inherit; font-size: 10px; padding: 0 2px; height: 16px; text-align: center; border: 1px solid var(--line); border-radius: 3px; background: var(--field); color: var(--fg); }
.paper table.spt tr.splv .spmax.over { color: var(--warn); font-weight: 700; }
.paper table.spt tr.splv .spmax.over input { border-color: var(--warn); }
.paper .spwarn { color: var(--warn); font-size: 9.5px; margin-left: 6px; }
.paper .sphuso { font-size: 9px; color: var(--muted); white-space: normal; line-height: 1.25; padding: 1px 0 2px; }
.paper table.spt tr.memd td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.spname { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; text-decoration: underline dotted color-mix(in srgb, var(--fg) 35%, transparent); text-underline-offset: 2px; }
.paper .spn .spname { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.paper .spsrc { font-size: 7.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 2px; margin-left: 3px; vertical-align: 1px; }
.paper td.spn { display: flex; align-items: center; gap: 0; }
.paper td.spm { text-align: center; }
.paper td.spm b { display: inline-block; min-width: 14px; text-align: center; }
.paper .spb { font: inherit; font-size: 11px; line-height: 12px; width: 15px; height: 14px; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: var(--field); color: var(--fg); cursor: pointer; }
.paper .spb:disabled { opacity: .35; cursor: default; }
.paper td.spl { white-space: normal; line-height: 10px; }
.paper .spdot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--accent); background: transparent; padding: 0; margin: 0 1.5px; cursor: pointer; vertical-align: middle; }
.paper .spdot.on { background: var(--accent); }
.spinfo th { text-align: left; color: var(--muted); font-weight: 600; padding: 1px 10px 1px 0; vertical-align: top; white-space: nowrap; }
.spinfo td { padding: 1px 0; }
.sptbl td, .sptbl th { font-size: 12px; vertical-align: top; }
@media print { .paper .spb, .paper .sphead .btn, .paper .spview { display: none; } .paper td.spm b { min-width: 0; } .paper .spmax input { border: 0; } }
.paper .pmax { display: none; }
@media print { .paper .spmax input { display: none; } .paper .pmax { display: inline; } }
.pageinfo .spjump { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 12px; color: var(--accent); background: var(--field); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px 3px 7px; cursor: pointer; }
.pageinfo .spjump svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pageinfo .spjump[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
/* spell books (Unearthed Arcana) */
.paper .spbooks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 5px; }
.paper .spbooks .l2 { font-size: 8.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.paper .bkchip { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 4px 1px 7px; background: var(--field); }
.paper .bkchip i { font-style: normal; color: var(--muted); }
.paper .bkchip.over { border-color: var(--warn); color: var(--warn); }
.paper .bkchip .x { font: inherit; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; }
.paper .spbooks .add { width: 18px; height: 18px; font-size: 13px; line-height: 14px; }
.paper .spbkb { font: inherit; font-size: 10px; line-height: 12px; min-width: 18px; height: 14px; padding: 0 3px; border: 1px dashed var(--line); border-radius: 3px; background: none; color: var(--muted); cursor: pointer; }
.paper .spbkb.in { border-style: solid; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--fg); }
.paper td.spbk { text-align: center; }
.paper .spcant { font-size: 10px; }
@media print { .paper .spbkb:not(.in) { visibility: hidden; } .paper .spbkb { border: 0; } .paper .spbooks .add, .paper .bkchip .x, .paper .spcant .spb { display: none; } }
.paper .bkchip { padding: 0 3px 0 2px; gap: 1px; }
.paper .bkchip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--field)); box-shadow: inset 0 0 0 1px var(--accent); }
.paper .bkchip .bksel { font: inherit; font-size: 9.5px; border: 0; background: none; color: inherit; cursor: pointer; padding: 1px 3px; }
.paper .bkchip.on .bksel { font-weight: 600; }
.paper .bkchip .bkdef { font: inherit; font-size: 11px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 1px 0 3px; line-height: 1; }
.paper .bkchip .bkdef.on { color: #c79a1c; }
.paper tr.spadd td { border-bottom: 0; height: 19px; }
.paper .spaddb { font: inherit; font-size: 9.5px; color: var(--accent); background: none; border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 3px; padding: 0 6px; height: 15px; line-height: 13px; cursor: pointer; margin-right: 6px; }
.paper .spaddb:disabled { opacity: .45; cursor: default; }
.paper .spbkb.rm { border-style: solid; color: var(--muted); }
@media print { .paper tr.spadd, .paper .spbkb.rm, .paper .bkchip .bkdef:not(.on) { display: none; } }
.paper tr.spfail td { opacity: .45; }
.paper tr.spfail td.spn .spname { text-decoration: line-through; text-decoration-color: #c62828; text-decoration-thickness: 1.5px; color: #c62828; }
.paper tr.spfail td.spbk { opacity: 1; }
.paper .spfailb { font: inherit; font-size: 10px; line-height: 12px; min-width: 18px; height: 14px; padding: 0 3px; border: 1px solid var(--line); border-radius: 3px; background: none; color: #c62828; cursor: pointer; margin-right: 3px; }
.paper .spfailb.on { color: var(--accent); border-color: var(--accent); }
@media print { .paper .spfailb { display: none; } }
.paper .spgod { margin: 0 0 3px; text-align: center; line-height: 1.2; }
.paper .spgod b { font-family: var(--font-head); font-size: 15px; color: var(--accent); }
.paper .spgod span { font-size: 10.5px; color: var(--muted); }
.eso { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 11px; margin-top: 6px; padding: 5px 8px; border: 1px dashed var(--line); border-radius: 6px; }
.eso b { font-size: 11px; }
.eso .chk { display: inline-flex; align-items: center; gap: 4px; }
.eso input:disabled + * { opacity: .5; }
/* packs & containers (Gear page) */
.packs h2 { display: flex; align-items: center; gap: 8px; }
.packs h2 .add { width: 26px; height: 26px; font-size: 17px; }
.packgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.packcard { border: 1px solid var(--line); border-radius: 6px; padding: 5px; min-width: 0; }
.packcard.magic { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.packcard.stored { opacity: .7; }
.packhd { display: flex; gap: 4px; align-items: center; margin-bottom: 3px; min-width: 0; }
.packhd input[type=text] { flex: 1 1 auto; min-width: 0; }
.packhd .pk.grow { flex: 1 1 auto; min-width: 0; }
.packhd .packx { align-self: center; flex: none; }
.pcap { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.packsum { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11px; color: var(--muted); margin: 1px 0 2px; }
.packsum .o { color: var(--fg); font-weight: 600; }
.packsum .over, .packsum .over .o { color: var(--warn); }
.packnote { font-size: 10.5px; color: var(--muted); margin: 0 0 2px; line-height: 1.3; }
.packcard table.gear { width: 100%; }
#modal .opts h3.optgrp { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 10px 4px 2px; }
.paper .packgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.paper .packcard { padding: 3px; border-radius: 3px; }
.paper .packhd { margin-bottom: 1px; gap: 2px; }
.paper .packsum, .paper .pcap { font-size: 8.5px; gap: 0 6px; }
.paper .packnote { font-size: 8px; margin: 0; }
.paper .packs h2 .add { width: 18px; height: 18px; font-size: 13px; }
.packhd .pk:not(.grow) { flex: none; width: auto; min-width: 0; padding-right: 16px; }
.packmore { display: flex; justify-content: flex-start; padding: 3px 0 0 4px; }
.packmore .add { width: 26px; height: 26px; font-size: 17px; }
.paper .packmore .add { width: 18px; height: 18px; font-size: 13px; }
.paper .packitems td:first-child { width: 26px; }
/* home vault + move */
.vault h2 { display: flex; align-items: center; gap: 8px; }
.vault h2 .add { width: 26px; height: 26px; font-size: 17px; }
.paper .vault h2 .add { width: 18px; height: 18px; font-size: 13px; }
.movebtn { flex: 0 0 auto; font: inherit; font-size: 13px; line-height: 1; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--accent); cursor: pointer; padding: 0; }
.movebtn:hover { border-color: var(--accent); }
.paper .movebtn { width: 18px; height: 18px; font-size: 10px; border-radius: 3px; }
.beastld { margin-left: auto; font-family: var(--font-ui); text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--muted); font-weight: 500; }
.beastld .o { color: var(--fg); font-weight: 600; }
@media print { .movebtn { visibility: hidden; } }
.packcard table.gear { table-layout: fixed; }
.packcard table.gear th:first-child { width: 28px; }
.packcard table.gear th:last-child { width: 46px; }
.paper .packcard table.gear th:first-child { width: 24px; }
.paper .packcard table.gear th:last-child { width: 42px; }
.packcard .potrow .doses { padding: 1px 3px; }
/* spell scrolls: create flow */
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; margin-right: 4px; }
.paper .sphead .btn svg { width: 11px; height: 11px; }
.lvpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.scmat { display: flex; gap: 6px; margin: 4px 0 8px; flex-wrap: wrap; }
.scmat .tog { display: flex; flex-direction: column; align-items: flex-start; padding: 6px 10px; line-height: 1.2; }
.scmat .tog small { font-size: 11px; color: var(--muted); font-weight: 400; }
.sccost { width: 100%; border-collapse: collapse; font-size: 13px; }
.sccost td { padding: 5px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sccost td:last-child { text-align: right; white-space: nowrap; }
.sccost tr.tot td { font-weight: 600; }
.scfail { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: baseline; margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 10%, transparent); }
.scfail b { font-size: 22px; color: var(--warn); font-family: var(--font-num); }
.scfail small { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; }
table.sptbl tr.lvrow td { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.scmat .tog[aria-pressed="true"] small { color: inherit; opacity: .85; }
/* curses */
.cursebar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.cursenote { font-size: 11px; color: var(--warn); font-weight: 600; }
.chip.fx.curse { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); background: color-mix(in srgb, var(--warn) 9%, transparent); }
.chip.fx.curse svg { stroke: var(--warn); }
.paper .cursebar .btn { font-size: 9px; padding: 1px 6px; }
@media print { .cursebar .btn { display: none; } }
.cursebox h2 { display: flex; align-items: center; gap: 8px; }
.cursebox h2 .add { width: 26px; height: 26px; font-size: 17px; }
.paper .cursebox h2 .add { width: 18px; height: 18px; font-size: 13px; }
.cursenote svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sphead .cursenote { align-self: center; font-size: 11px; }
.alnote { display: block; font-size: 10.5px; margin-top: 1px; }
/* ability scores changed by curses / items: colored number, base in parentheses, short reasons on the right */
.stat .ds .mods { flex: 1 1 0; min-width: 60px; margin-left: auto; text-align: right; font-size: 9.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; align-self: center; }
.stat .ds .mods:empty { display: none; }
.pk .sv { font-weight: 700; }
.pk .sv.dn { color: #b07d00; }
.pk .sv.up { color: #1d5fd1; }
.pk .sb { font-size: .82em; color: var(--muted); }
.stat.sdown .mods { color: #9a6b00; }
.stat.sup .mods { color: #1d4ed8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stat.sdown .mods, :root:not([data-theme="light"]) .pk .sv.dn { color: #f5c542; } :root:not([data-theme="light"]) .stat.sup .mods, :root:not([data-theme="light"]) .pk .sv.up { color: #7fb0ff; } }
:root[data-theme="dark"] .stat.sdown .mods, :root[data-theme="dark"] .pk .sv.dn { color: #f5c542; } :root[data-theme="dark"] .stat.sup .mods, :root[data-theme="dark"] .pk .sv.up { color: #7fb0ff; }
/* boons: like curses, in blue */
.chip.fx.boon { border-color: color-mix(in srgb, #2563eb 60%, var(--line)); background: color-mix(in srgb, #2563eb 9%, transparent); }
.chip.fx.boon svg { stroke: #2563eb; }
.boonnote { font-size: 11px; color: #1d4ed8; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .boonnote { color: #7fb0ff; } }
:root[data-theme="dark"] .boonnote { color: #7fb0ff; }
.paper .chip.fx.boon { border: 1.5px dashed #2563eb !important; background: color-mix(in srgb, #2563eb 9%, transparent) !important; }
.paper .chip.fx.boon .fxd { color: #1d4ed8; }
:root[data-theme="dark"] .paper .chip.fx.boon .fxd { color: #7fb0ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .paper .chip.fx.boon .fxd { color: #7fb0ff; } }
.unidbody .card { margin-top: 0 !important; }
#modal .box > .unidbody { overflow: auto; min-height: 0; }
/* ---------- creatures page ---------- */
.cricon { display: inline-flex; width: 26px; height: 26px; flex: none; }
.cricon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cricon.sm { width: 18px; height: 18px; vertical-align: -4px; }
.cricon.big { width: 40px; height: 40px; margin-left: 6px; }
.crpage { display: flex; flex-direction: column; gap: 6px; }
.crsec h2 { display: flex; align-items: center; gap: 8px; }
.crsec h2 .add { width: 26px; height: 26px; font-size: 17px; }
.paper .crsec h2 .add { width: 18px; height: 18px; font-size: 13px; }
.crgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.crcard { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; min-height: 150px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; min-width: 0; }
.crhd { display: flex; align-items: center; gap: 5px; min-width: 0; }
.crhd input { flex: 1 1 auto; min-width: 0; }
.crname { display: flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0; font: inherit; color: var(--fg); cursor: pointer; text-align: left; min-width: 0; flex: 1 1 auto; }
.crname > span { display: flex; flex-direction: column; min-width: 0; }
.crname b { font-size: 12.5px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crname small { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crx { flex: none; }
.crstats { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.crs { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; min-width: 34px; background: var(--calc); }
.crs span { font-size: 8.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.crs b { font-size: 11px; font-family: var(--font-num); white-space: nowrap; }
.crs.cur { background: transparent; }
.crs.cur input { height: 18px; font-size: 11px; padding: 0 3px; }
.crspec { font-size: 10px; line-height: 1.3; margin: 0; color: var(--fg); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.crfoot { display: flex; flex-wrap: wrap; gap: 3px 8px; margin-top: auto; }
.crf { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--muted); }
.crf.grow { flex: 1 1 140px; }
.crf.grow input { flex: 1; min-width: 0; }
.crf input { height: 20px; font-size: 11px; }
.crpick button { display: flex !important; gap: 10px; align-items: center; }
.crpick .crtx { display: flex; flex-direction: column; min-width: 0; }
table.crfull { border-collapse: collapse; font-size: 13px; }
table.crfull td { padding: 2px 10px 2px 0; border-bottom: 1px solid var(--line); }
table.crfull td:first-child { color: var(--muted); }
#modal header .cricon { vertical-align: -6px; }

table.crtbl td:last-child { min-width: 240px; }
table.crtbl td:first-child { min-width: 130px; }
.crs.cur input { width: 44px !important; }
/* creature pictures (familiar, mount, pet) */
.crthumb { flex: none; width: 132px; height: 132px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--field); cursor: pointer; }
.crthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.crcam { flex: none; width: 28px; height: 28px; padding: 3px; border: 1px dashed var(--line); border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.crcam svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.crcam:hover { color: var(--accent); border-color: var(--accent); }
.crpicrow { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 8px; }
.crbig { max-width: 100%; max-height: 260px; border-radius: 8px; border: 1px solid var(--line); }
@media print { .crcam { visibility: hidden; } }

.crcard.haspic { display: grid; grid-template-columns: 132px minmax(0, 1fr); grid-template-areas: 'pic body' 'nm body' 'foot foot'; grid-template-rows: auto auto 1fr; gap: 3px 6px; align-items: start; }
.crcard.haspic > .crthumb { grid-area: pic; } .crcard.haspic > .crnmcol { grid-area: nm; } .crcard.haspic > .crbody { grid-area: body; } .crcard.haspic > .crfoot { grid-area: foot; align-self: end; }
.crcard.haspic .crbody { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.crcard.haspic .crfoot .crf input { width: 72px !important; }
/* stats page portrait: camera to add, tap to view / change */
.portbtn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.paper .charbox .portrait .portbtn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.portcam { width: 44px; height: 44px; padding: 8px; }
@media print { .portcam { visibility: hidden; } }
.crf.crdur .pk, .crf.crdate .pk { height: 20px; font-size: 11px; padding: 0 16px 0 4px; min-width: 0; width: auto; }
.crf.crdate input { width: 46px; }
/* killed familiar */
.cricwrap, .crthumb { position: relative; display: inline-flex; }
.crskull { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--panel); color: var(--warn); display: grid; place-items: center; border: 1px solid var(--warn); }
.crskull svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.crthumb .crskull { width: 44px; height: 44px; right: 4px; bottom: 4px; }
.crthumb .crskull svg { width: 30px; height: 30px; }
.crcard.dead .crthumb img, .crcard.dead .cricwrap .cricon { filter: grayscale(1); opacity: .65; }
.crdeath { font-size: 10.5px; line-height: 1.3; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 50%, var(--line)); border-radius: 5px; padding: 3px 5px; }
.crdeath span { color: var(--fg); font-weight: 600; }
.crdeath .btn { margin-left: 4px; padding: 1px 8px; font-size: 10.5px; }
.crkill { align-self: flex-end; width: 26px; height: 26px; padding: 0; display: grid; place-items: center; border: 2px solid #111; border-radius: 5px; background: transparent; color: #111; cursor: pointer; }
.crkill svg { width: 16px; height: 16px; stroke: #111; stroke-width: 2.6; }
.crkill:hover { background: #1111; }
:root[data-theme="dark"] .crkill { border-color: #eee; color: #eee; } :root[data-theme="dark"] .crkill svg { stroke: #eee; }
#modal .crdeath { font-size: 13px; padding: 8px 10px; }
#modal header b svg { width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.crsec h2 .add[disabled] { opacity: .35; cursor: not-allowed; }
@media print { .crkill, .crdeath .btn { display: none; } }
/* dropped gear: one wide, short box under Person / Home vault */
.dropbox h2 { display: flex; align-items: center; gap: 8px; }
.dropbox h2 .add { width: 26px; height: 26px; font-size: 17px; }
.paper .dropbox h2 .add { width: 18px; height: 18px; font-size: 13px; }
.dropcols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.droptbl { width: 100%; table-layout: fixed; }
.droptbl th:first-child { width: 28px; }
.droptbl th:last-child { width: 44%; }
.droptbl th:nth-child(3) { width: 42%; }
.droptbl th:last-child { width: 52px; }
.droptbl th:first-child { width: 26px; }
.droptbl td.dropname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.droptbl td.dropact { white-space: nowrap; text-align: right; }
.droptbl td.dropact .xbtn { margin-left: 3px; }
.catbtn.static { cursor: default; display: inline-grid; place-items: center; }
.dropcols { align-items: start; }
.droptbl .xbtn { width: 24px; height: 24px; font-size: 14px; align-self: center; }
.paper .droptbl .xbtn { width: 18px; height: 18px; font-size: 12px; }
@media print { .droptbl td.dropact button { visibility: hidden; } }
.dropbox .droptbl td.dropname { text-align: left; }
.dropbox .droptbl td.dropic { text-align: left; }
.dropbox .droptbl td.dropname { padding-left: 4px; }
.dropbox .droptbl .catbtn.static { padding: 0; }
.packs h2 .pgjump { font-size: 10.5px; padding: 2px 8px; text-transform: none; letter-spacing: 0; font-family: var(--font-ui); }
@media print { .pgjump { display: none; } }
#modal .rmfoot { border-top: 1px solid var(--line); padding: 8px 14px; display: flex; justify-content: flex-end; }
/* Gear page: Person and Home vault boxes end on the same line */
.paper .pg > .col > section.box.vault:last-child, .paper .pg > .col:first-child > section.box:only-child { flex: 1 1 auto; }
/* pack continued in the next slot */
.packcard.cont { border-style: dashed; }
.packhd.contd { gap: 6px; font-size: 11px; padding: 2px 0 3px; }
.packhd.contd .muted { font-size: 10px; font-style: italic; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.vaultmore h2 { display: flex; align-items: center; gap: 8px; }
@media print { .linkbtn { color: inherit; text-decoration: none; } }
/* sidelined / dead characters */
.chgrp { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 6px; display: flex; align-items: center; gap: 6px; }
.chgrp svg, .charlist .crow.dead .cinfo b svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -2px; margin-right: 4px; }
.chgrp.dead { color: var(--warn); }
.charlist .crow.sidelined { opacity: .85; border-style: dashed; }
.charlist .crow.dead { opacity: .8; background: color-mix(in srgb, var(--warn) 6%, transparent); }
.charlist .crow { flex-wrap: wrap; }
.charlist .creason { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.charlist .creason input { flex: 1 1 auto; min-width: 0; }
.charlist .crow.sidelined .cinfo { flex-basis: 100%; }
/* Wounded: max HP, STR, DEX and movement show in red */
.is-wounded .paper [data-o="hp.total"] { color: #c62828 !important; font-weight: 700; }
.is-wounded .paper table.mv7 td .o { color: #c62828; font-weight: 700; }
.stat.swound .pk .sv, .stat.swound .pk .sv.dn { color: #c62828 !important; }
.stat.swound .mods { color: #c62828 !important; }
:root[data-theme="dark"].is-wounded .paper [data-o="hp.total"], :root[data-theme="dark"].is-wounded .paper table.mv7 td .o, :root[data-theme="dark"] .stat.swound .pk .sv, :root[data-theme="dark"] .stat.swound .mods { color: #ff8a80 !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]).is-wounded .paper [data-o="hp.total"], :root:not([data-theme="light"]).is-wounded .paper table.mv7 td .o, :root:not([data-theme="light"]) .stat.swound .pk .sv, :root:not([data-theme="light"]) .stat.swound .mods { color: #ff8a80 !important; } }
.wtab tr.hit td { background: color-mix(in srgb, var(--accent) 18%, transparent); font-weight: 700; }
.wout { font-weight: 600; }
.wtab tr[data-wr] { cursor: pointer; }
.wtab tr[data-wr]:hover td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.wchip { cursor: pointer; }
.wchip small { font-size: 10px; color: var(--muted); }
.wdend { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; gap: 6px; }

/* multiclass and dual class */
.mctag { font-size: 11px; font-weight: 600; background: #1f4e8c; color: #fff; border-radius: 9px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; letter-spacing: 0; text-transform: none; }
.mctag.dual { background: #6b3fa0; }
.mcbtns { gap: 6px; margin: 6px 0 2px; }
.mcnote { font-size: 12px; margin: 6px 0 2px; padding: 5px 7px; border-left: 3px solid #1f4e8c; background: rgba(31,78,140,.07); }
.mcsplit { gap: 6px; align-items: flex-end; margin: 4px 0; }
.mclist { display: grid; gap: 5px; max-height: 55vh; overflow: auto; }
.mcopt { display: flex; justify-content: space-between; gap: 10px; align-items: center; text-align: left; padding: 7px 9px; border: 1px solid var(--line, #ccc); border-radius: 6px; background: var(--panel, #fff); color: var(--fg); color: inherit; font: inherit; cursor: pointer; }
.mcopt:hover { border-color: #1f4e8c; }
.mcopt span { font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.mcopt i { font-style: normal; padding: 0 6px; border-radius: 8px; background: rgba(0,0,0,.06); }
.mcopt i.me { background: #1f4e8c; color: #fff; }
.mcopt.no { opacity: .5; }
.mhd { margin: 4px 0 6px; }
.mhdh { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.mhdsh { margin-left: auto; font-size: 12px; }
.mhd .f.need .pk { outline: 2px solid #d97706; outline-offset: 1px; }
@media print { .mcbtns, .mcsplit, .packmore [data-addcls] { display: none !important; } .mhd .f.need .pk { outline: none; } }
.hd .f.need .pk { outline: 2px solid #d97706; outline-offset: 1px; }
.hd .fixv { display: flex; align-items: center; justify-content: center; min-height: 30px; border: 1px dashed var(--line); border-radius: 6px; font-weight: 600; cursor: help; }
.hd .fixhd.later .fixv { color: var(--muted); font-weight: 400; opacity: .6; }
@media print { .hd .f.need .pk { outline: none; } }
/* vs items with ego: personality as hp are lost (Home Map table) */
.egotab { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.egotab table { font-size: 11px; }
.egotab th, .egotab td { padding: 0 4px; text-align: center; line-height: 1.25; font-size: 11px; }
.egotab .o { background: none; padding: 0; min-width: 0; min-height: 0; height: auto; border: 0; font-size: inherit; line-height: 1.25; display: inline; }
.egotab tr.neg td { color: var(--muted); opacity: .55; }
.egotab tr.on td { background: rgba(217,119,6,.18); font-weight: 600; }
.egotog { cursor: pointer; } .egotog .kv > .o { box-shadow: inset 0 -2px 0 rgba(217,119,6,.35); }
/* the ego chart floats over the page instead of pushing the boxes down */
.box:has(> .egotog) { position: relative; }
.egopop { position: absolute; z-index: 30; right: 0; top: calc(100% - 6px); width: max(100%, 300px); background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 8px 10px 10px; }
.egopop .egox { position: absolute; top: 4px; right: 6px; width: 24px; height: 24px; font-size: 15px; }
.egopop .foot { min-height: 24px; margin-bottom: 4px; }
.egopop .foot { padding-right: 24px; }
@media print { .egopop { display: none !important; } }
/* standard coins on the Money page */
.cointbl td, .cointbl th { padding: 3px 6px; }
.cointbl td.num { text-align: right; min-width: 54px; }
.cointbl tr.tot th { color: var(--fg); border-top: 2px solid var(--line); }
.withi svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; fill: none; stroke: currentColor; stroke-width: 1.6; }
/* coins in gear lists */
.coinqty { width: 64px; flex: 0 0 64px; }
.coinval { font-size: 15px; margin: 8px 0; }
.coinname { cursor: pointer; }
.coinname:hover { text-decoration: underline; }
svg.coinsvg { overflow: visible; }
.catbtn svg.coinsvg { fill: initial; stroke: initial; }
.cointbl .creg { font-size: 10px; margin-left: 4px; }
.opts .withi svg.coinsvg { width: 16px; height: 16px; }
.convrow { gap: 6px; margin: 8px 0 6px; }
/* name lists on the Data page */
.namegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 10px; font-size: 13px; }
.namegrid .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.namegrid .muted { font-size: 11px; }
.sexm, .sexf, .sexe { display: inline-block; width: 14px; margin-right: 3px; font-weight: 700; }
.sexm { color: #2563eb; } .sexf { color: #db2777; } .sexe { color: #7c3aed; }
.itemqty { width: 44px; flex: 0 0 44px; }
.rcage { color: var(--fg); font-weight: 600; }
#modal [data-rcage] { padding: 4px 8px; font-size: 12px; min-height: 0; }
#modal [data-rcage].on { background: var(--accent, #2f6b4f); color: #fff; border-color: transparent; }
/* turn undead matrix */
.turntbl { border-collapse: collapse; font-size: 13px; width: 100%; }
.turntbl th, .turntbl td { padding: 3px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.turntbl td:first-child, .turntbl th:first-child { text-align: left; white-space: nowrap; }
.turntbl tr.sh td { background: rgba(0,0,0,.05); }
.turntbl td.no { color: var(--muted); }
.turntbl td.auto { font-weight: 700; }
.turntbl th.on { background: #d97706; color: #fff; }
.turntbl td.on { background: rgba(217,119,6,.22) !important; font-weight: 700; outline: 1px solid rgba(217,119,6,.5); }
.turnmini { cursor: pointer; }
.turntbl.mini { font-size: 10px; }
.turntbl.mini th, .turntbl.mini td { padding: 0 2px; line-height: 1.32; }
.turntbl.mini td:first-child { font-size: 10px; }
@media print { .turntbl.mini th.on { background: #d97706 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .turntbl.mini td.on { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.trackres { font-size: 15px; margin: 6px 0 2px; }
.tracktbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tracktbl td { padding: 4px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tracktbl td:last-child { text-align: right; }
.tracktbl tr.on td { background: rgba(217,119,6,.2); font-weight: 600; }
.tracktbl.mini { font-size: 11px; }
.tracktbl.mini td, .tracktbl.mini th { padding: 1px 4px; font-size: 11px; }
.trackmini .f label, .trackmini .l { font-size: 10px; }
/* Background: the notes / thief skills / turn undead / tracking box is always the same size (the tracking panel's) */
.paper .tbox { height: 225px; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; }
.paper .tbox > :not(.bh) { flex: 0 0 auto; }
.paper .tbox textarea { flex: 1 1 auto; height: auto; min-height: 0; }
.paper .tbox table.tsk { font-size: 11px; }
.paper .tbox table.tsk th { font-size: 9px; padding: 0 3px; }
.paper .tbox table.tsk td { padding: 0 3px; line-height: 1.1; height: 15px; }
.paper .tbox table.tsk .o, .paper .tbox table.tsk input { min-height: 0; height: 14px; padding: 0 4px; font-size: 10.5px; line-height: 14px; }
.paper .tbox .tsk + .foot { margin: 1px 0 0 !important; font-size: 9.5px; }
.paper .tbox .row.nw { margin-top: 2px !important; }
.paper .tbox .row.nw .o, .paper .tbox .row.nw input, .paper .tbox .row.nw .pk { min-height: 0; height: 20px; font-size: 11px; padding-top: 0; padding-bottom: 0; }
.paper .tbox .turntbl.mini th, .paper .tbox .turntbl.mini td { line-height: 1.12; padding-top: 0; padding-bottom: 0; font-size: 10px; }
.paper .tbox .turnmini .foot { font-size: 9.5px; line-height: 1.25; }
/* spell table: values open a "how it's worked out" window */
.spf { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: inherit; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; text-decoration: underline dotted rgba(0,0,0,.25); text-underline-offset: 2px; }
.spf:hover { color: var(--accent); }
.spnt { width: 100%; text-align: left; }
.spinfo.lvtbl td, .spinfo.lvtbl th { text-align: center; padding: 2px 6px; font-size: 12px; }
.spinfo.lvtbl td.on { background: rgba(217,119,6,.2); font-weight: 700; }
@media print { .spf { text-decoration: none; } }

/* quick page jump menu */
.jumpmenu { position: fixed; z-index: 60; min-width: 190px; max-width: calc(100vw - 16px); max-height: min(70vh, 520px); overflow-y: auto; background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.jumpmenu[hidden] { display: none; }
.jumpmenu .jmhead { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 8px 6px; }
.jumpmenu button { display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; font-size: 14px; color: var(--fg); background: none; border: 0; border-radius: 6px; padding: 9px 10px; cursor: pointer; min-height: 40px; }
.jumpmenu button:hover, .jumpmenu button:focus-visible { background: var(--field); outline: none; }
.jumpmenu button[aria-current="page"] { background: var(--accent); color: var(--accent-fg); }
.jumpmenu .jmn { width: 18px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.jumpmenu button[aria-current="page"] .jmn { color: inherit; }
.toprow .iconbtn { flex: 0 0 36px; }
.toprow .pageinfo { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.toprow .pageinfo::-webkit-scrollbar { display: none; }
.toprow .pageinfo > * { flex: 0 0 auto; }
.jumpmenu .jmi { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jumpmenu button[aria-current="page"] .jmi { stroke: currentColor; }
.crtop { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; padding: 2px 2px 4px; }
.crtop .add { width: 26px; height: 26px; font-size: 17px; }
.paper .crtop { font-size: 12px; } .paper .crtop .add { width: 20px; height: 20px; font-size: 14px; }
.crtop .muted { font-weight: 400; }
.crkinds button[disabled] { opacity: .45; cursor: not-allowed; }
@media print { .crtop { display: none; } }
#modal .crkinds button { display: flex; align-items: center; gap: 12px; }
#modal .crkinds .crtx { flex: 1; min-width: 0; }
#modal .crkinds .osub { display: block; }
.crkinds .crki { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; background: var(--field); display: grid; place-items: center; }
.crkinds .crki svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Stats sheet: keep everything inside a standard printer's printable area (3/8 in margins) */
.paperwrap[data-sheet="stats"] .paper , .paperwrap[data-sheet="combat"] .paper { padding: 36px; }
.paperwrap[data-sheet="stats"] .paper table.saves , .paperwrap[data-sheet="combat"] .paper table.saves { max-width: 100%; }
.paperwrap[data-sheet="stats"] .paper table.saves .pk , .paperwrap[data-sheet="combat"] .paper table.saves .pk { width: 40px; min-width: 38px; max-width: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* top bar: one button per page category; dots under it show how many pages it has */
.toprow h1, .toprow .who { display: none; }
.toprow .pgbar { margin-left: 0; margin-right: auto; gap: 4px; flex: 1 1 auto; padding: 2px 0; align-items: flex-start; }
.pgbar .pgw { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 0 0 auto; }
.pgbar .pgb { display: inline-flex; align-items: center; gap: 6px; height: 36px; min-width: 36px; padding: 0 10px 0 8px; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pgbar .pgb svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pgbar .pgb:hover { border-color: var(--accent); }
.pgbar .pgb.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.pgbar.iconsonly .pgb { padding: 0 7px; } .pgbar.iconsonly .pgb span { display: none; }
.pgbar .pgd { display: flex; gap: 3px; height: 5px; }
.pgbar .pgd i { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.pgbar .pgd i.on { background: var(--accent); }
@media print { .pgbar { display: none; } }
.spmemck { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.spmemck input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.spmemck.off { opacity: .45; cursor: default; }
.paper .spmemck { font-size: 11px; gap: 4px; }
.paper .spmemck input { width: 13px; height: 13px; }
.jumpmenu .jml { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.jumpmenu button[aria-current="page"] .jml { color: inherit; opacity: .85; }
/* character / player strip in the sheet's blank top margin (never printed) */
.paper .sheetcap { position: absolute; top: 3px; left: 26px; right: 26px; height: 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; line-height: 1; z-index: 2; }
.paper .sheetcap .capname { font-weight: 700; color: var(--fg); }
.paper .sheetcap .capsel { position: relative; display: inline-flex; align-items: center; }
.paper .sheetcap select { width: auto; min-width: 0; field-sizing: content; appearance: none; -webkit-appearance: none; font: inherit; font-size: 11px; font-weight: 700; color: var(--fg); background: transparent; border: 1px solid transparent; border-radius: 4px; height: 17px; padding: 0 16px 0 4px; margin-left: -4px; cursor: pointer; }
.paper .sheetcap select:hover, .paper .sheetcap select:focus-visible { border-color: var(--line); background: var(--field); outline: none; }
.paper .sheetcap .capsel::after { content: ""; position: absolute; right: 5px; top: 50%; width: 5px; height: 5px; border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: translateY(-75%) rotate(45deg); pointer-events: none; }
.paper .sheetcap .capplayer { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paper .sheetcap .capplayer b { color: var(--fg); font-weight: 700; }
.paper .sheetcap .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media print { .sheetcap { display: none !important; } }
.paper .mrbox .mrhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.paper .mrbox .mrhead h2 { margin: 0; }
.paper .mrbox .mrkv { display: flex; align-items: center; gap: 4px; }
.paper .mrbox .mrkv > span { font-size: 7.5px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.paper .mrbox .mrkv > span + * + span { margin-left: 6px; }
.paper .mrbox .mrkv > :not(span) { width: 52px; }
/* Creatures pages: light outline of the printable area (screen only) */
.paperwrap[data-sheet^="creatures"] .paper::before { content: ""; position: absolute; top: 22px; right: 26px; bottom: 22px; left: 26px; border: 1.5px dashed rgba(110, 120, 130, .5); border-radius: 4px; pointer-events: none; z-index: 0; }
@media print { .paperwrap[data-sheet^="creatures"] .paper::before { display: none; } }
.paperwrap[data-sheet^="creatures"] .crtop { padding: 6px 6px 4px; }
.paper .lsbox .lsrc { display: flex; align-items: center; gap: 8px; }
.paper .lsbox .lsrc .l2 { margin: 0; white-space: nowrap; }
.paper .lsbox .lsrc .pk { flex: 1; height: 18px; min-height: 18px; line-height: 14px; font-size: 10px; }
.paper .charbox .cnrow .cname { -webkit-line-clamp: 1; white-space: nowrap; text-overflow: ellipsis; display: block; font-size: 17px; }
.lico { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; margin-right: 8px; }
.paper .lsbox .lico { width: 15px; height: 15px; flex-basis: 15px; margin: 0; }
.idm { padding: 12px 14px 4px; }
.idm .idname { display: flex; flex-direction: column; gap: 4px; }
.idm .idname input { font: inherit; font-size: 18px; font-weight: 700; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--fg); }
.idm .idrnd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; font-size: 13px; }
.idm .idtab { width: 100%; border-collapse: collapse; font-size: 14px; }
.idm .idtab th { text-align: left; font-weight: 600; color: var(--muted); padding: 5px 10px 5px 0; white-space: nowrap; width: 1%; border-bottom: 1px solid var(--line); }
.idm .idtab td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.paper .lsbox .lsi { display: inline-flex; } .paper .lsbox .lsi:empty { display: none; }
.cropw { padding: 14px 14px 6px; display: flex; flex-direction: column; align-items: center; }
.cropv { position: relative; overflow: hidden; border-radius: 8px; background: #111; touch-action: none; cursor: grab; outline-offset: 3px; box-shadow: 0 0 0 1px var(--line); }
.cropv:active { cursor: grabbing; }
.cropv img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.cropz { display: flex; align-items: center; gap: 8px; margin-top: 10px; width: 100%; max-width: 360px; }
.cropz input { flex: 1; accent-color: var(--accent); }
.cropz .btn { min-width: 36px; padding: 4px 0; font-size: 18px; line-height: 1; }
button.vital.acbtn { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button.vital.acbtn:hover svg, button.vital.acbtn:focus-visible svg { filter: drop-shadow(0 0 2px var(--accent)); }
.actab { width: 100%; border-collapse: collapse; font-size: 14px; }
.actab th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.actab td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.actab td .osub { display: block; font-size: 12px; color: var(--muted); }
.actab .acd, .actab .acr, .actab th:nth-child(n+2) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.actab .acd.good { color: #2e7d32; } .actab .acd.bad { color: #c62828; }
.actab tfoot td { border-bottom: 0; border-top: 2px solid var(--line); font-size: 15px; }
.actab.acoth td { padding: 4px 6px; font-size: 13px; }
@media print { button.vital.acbtn { cursor: default; } }
.paper .ringbox .ringrow { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; }
.paper .ringbox .ringrow:last-child { margin: 0; }
.paper .ringbox .ringic { display: inline-flex; width: 16px; height: 16px; flex: 0 0 16px; }
.paper .ringbox .ringic svg { width: 16px; height: 16px; }
.paper .ringbox .ringl { width: 62px; flex: 0 0 62px; font-size: 9.5px; color: var(--muted); }
.paper .ringbox .pk { flex: 1; min-width: 0; height: 19px; min-height: 19px; line-height: 15px; font-size: 10px; }
.paper .ringbox .ringinfo { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); background: var(--field); color: var(--accent); font: 700 10px/1 var(--font-head, inherit); font-style: italic; cursor: pointer; padding: 0; }
@media print { .paper .ringbox .ringinfo { display: none; } }
/* x/day uses */
.dpips { display: inline-flex; gap: 3px; align-items: center; flex: 0 0 auto; margin: 0 2px; }
.dpip { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--accent); padding: 0; cursor: pointer; }
.dpip.used { background: transparent; border-color: var(--muted); opacity: .7; }
.dpips.big .dpip { width: 20px; height: 20px; }
.dchip { flex: 0 0 auto; font: inherit; font-size: 9.5px; font-weight: 700; color: var(--accent); background: var(--field); border: 1px solid var(--line); border-radius: 9px; padding: 1px 6px; cursor: pointer; white-space: nowrap; }
.dtab { width: 100%; border-collapse: collapse; font-size: 14px; } .dtab td { padding: 8px 4px; border-bottom: 1px solid var(--line); } .dtab td:last-child { text-align: right; } .dtab .osub { display: block; font-size: 12px; color: var(--muted); }
.paper .idh2 { display: flex; align-items: center; justify-content: space-between; }
.paper .dayrestbtn { font-size: 9px; padding: 1px 8px; min-height: 0; height: 18px; letter-spacing: 0; text-transform: none; font-family: inherit; }
.abr .abday { margin-left: 6px; display: inline-flex; vertical-align: middle; }
@media print { .dchip { border: 0; background: none; } .paper .dayrestbtn { display: none; } }
.srclink { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.srclink:hover { color: var(--accent); }
.cdday { margin-left: 6px; display: inline-flex; vertical-align: middle; }
@media print { .srclink { text-decoration: none; } }
/* per-character sheet font (every sheet page) */
body.hascfont .paperwrap .paper { --font-ui: var(--cfont); --font-head: var(--cfont); --font-num: var(--cfont); font-family: var(--cfont); font-size-adjust: .5; }
body.hascfont .paperwrap .paper :is(input, select, textarea, button, .pk, .o) { font-family: var(--cfont); }
.cfsample { margin: 2px 0 4px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; font-size: 16px; }
/* sheet template decorations: drawn over the page in open space; never catch taps */
.paper .tpldeco { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.tpldeco.druid { color: #4e6b3a; }
.tpldeco.druid .an { fill: currentColor; }
.tpldeco.druid .gr { color: #5f8a43; }
.tpldeco.druid .vn { fill: none; stroke: #7a8f4e; stroke-width: 1.3; opacity: .75; stroke-linecap: round; }
.tpldeco.druid .lf0 { fill: #6f9a4c; opacity: .7; } .tpldeco.druid .lf1 { fill: #8bb064; opacity: .7; }
body.night .tpldeco.druid { color: #8fb07a; }
.bsm fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 10px; padding: 6px 12px 8px; }
.bsm legend { font-weight: 600; font-size: 13px; padding: 0 4px; } .bsm legend label { display: inline-flex; gap: 6px; align-items: center; }
.bsm .bsrow { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 14px; }
.bsm .bsrow > span { width: 96px; color: var(--muted); }
.bsm .bsrow input[type=range] { flex: 1; accent-color: var(--accent); } .bsm .bsrow output { width: 40px; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.bsm .bsrow input[type=color] { width: 54px; height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 2px; background: var(--field); }
.bsm .bsscope { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; } .bsm .bsscope > span { color: var(--muted); width: 100%; font-size: 12px; }
.bsm .bsscope label { display: inline-flex; gap: 6px; align-items: center; }
.paper .box.hasimg { position: relative; isolation: isolate; }
.paper .box > .bximg { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background-repeat: no-repeat; pointer-events: none; }
.bsm .bsrow > input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.bsm select { font: inherit; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); color: var(--fg); }
/* per-box field colours (Box style → Text & fields); low priority so special looks (effects, warnings) still win */
:where(.paper .box) .o { background: var(--bxO, var(--calc)); }
:where(.paper .box) :is(input[type=text], input[type=number], textarea) { background: var(--bxI, var(--field)); }
:where(.paper .box) :is(.pk, select) { background-color: var(--bxP, var(--field)); }
:where(.paper .box) .tog:not([aria-pressed="true"]) { background: var(--bxC, var(--field)); }
:where(.paper .box) .chip { background: var(--bxC, var(--calc)); }
:where(.paper .box) { color: var(--fg); }
.bsm .bsdef { border: 1px solid var(--line); background: var(--field); color: var(--fg); border-radius: 6px; width: 30px; height: 30px; cursor: pointer; font-size: 15px; }
.paperwrap > .paper.hasimg { isolation: isolate; }
.paperwrap > .paper > .bximg { position: absolute; inset: 0; z-index: -1; background-repeat: no-repeat; pointer-events: none; }
.paper .vital svg .vin { fill: none; }
.paper .vital svg .vdot { fill: currentColor; stroke: none; }
.paper .vital.heart svg { color: #c62828; } .paper .vital.shield svg { color: var(--muted); }
.vtabs { display: flex; gap: 6px; margin: 0 0 10px; } .vtabs .tog { flex: 1; font-size: 14px; padding: 8px; }
.vshapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.vshape { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); padding: 6px 4px; cursor: pointer; font: inherit; font-size: 11px; color: var(--fg); }
.vshape svg { width: 44px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.vshape svg .vin { fill: none; } .vshape svg .vdot { fill: currentColor; stroke: none; }
.vshape.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); }
/* Page style → "make your own background" */
.paper.bare .box { border-color: transparent !important; background: transparent !important; background-image: none !important; box-shadow: none !important; }
.paper.bare .box > .bximg { display: none; }
.paper.novit .vital svg { visibility: hidden; }
.bsm fieldset.off { opacity: .45; } .bsm fieldset.off * { cursor: not-allowed; }
.bsm .bsnote { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, #f0a500 12%, transparent); border: 1px solid color-mix(in srgb, #f0a500 45%, transparent); font-size: 13px; }

#modal.dragm { background: rgba(10, 14, 18, .22); }
#modal .draghd { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
#modal .dragging .draghd { cursor: grabbing; }
#modal .draghd .grip { color: var(--muted); font-size: 15px; line-height: 1; margin-right: -2px; }
#modal .draghd b { margin-right: auto; }

.paper .box.hasvimg { position: relative; isolation: isolate; }
.paper .vital > .vimg { position: absolute; left: 50%; top: 50%; z-index: -1; height: auto; max-width: none; pointer-events: none; user-select: none; }
.paper .vital.acbtn { overflow: visible; }

/* free images */
.paper > .fimgs { position: absolute; inset: 0; pointer-events: none; }
.paper > .fimgs.back { z-index: -1; }
.paper > .fimgs.front { z-index: 30; }
.paperwrap > .paper { isolation: isolate; }
.paper .fi { position: absolute; transform-origin: 50% 50%; }
.paper .fi img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.paper .fi .fh { display: none; }
body.fplace .paper > .fimgs { z-index: 40; }
body.fplace .paper .fi { pointer-events: auto; cursor: move; touch-action: none; outline: 1px dashed rgba(47, 111, 90, .55); outline-offset: 0; }
body.fplace .paper .fi.sel { outline: 2px solid #2f6f5a; }
body.fplace .paper .fi.sel .fh { display: block; position: absolute; width: calc(16px / var(--ps, 1)); height: calc(16px / var(--ps, 1)); background: #fff; border: calc(2px / var(--ps, 1)) solid #2f6f5a; box-sizing: border-box; touch-action: none; }
body.fplace .paper .fi.sel .fh.rs { right: calc(-8px / var(--ps, 1)); bottom: calc(-8px / var(--ps, 1)); cursor: nwse-resize; border-radius: 3px; }
body.fplace .paper .fi.sel .fh.rot { left: 50%; top: calc(-34px / var(--ps, 1)); transform: translateX(-50%); border-radius: 50%; cursor: grab; }
body.fplace .paper .fi.sel .fh.rot::after { content: ""; position: absolute; left: 50%; top: 100%; width: calc(2px / var(--ps, 1)); height: calc(18px / var(--ps, 1)); background: #2f6f5a; transform: translateX(-50%); }
#fpbar { position: fixed; right: 12px; bottom: 12px; z-index: 60; display: flex; align-items: center; gap: 10px; max-width: min(640px, calc(100vw - 24px)); background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 8px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
#fpbar .fphint { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
#fpbar .fphint b { color: var(--fg); }
#fpbar .btn { flex: 0 0 auto; }
@media (max-width: 560px) { #fpbar .fphint { font-size: 11.5px; } }
@media print { #fpbar { display: none !important; } }
#modal .foot .fimbtn { margin-right: auto; }
.fthumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.fthumb { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 6px; background: var(--field) repeating-conic-gradient(#0000 0 25%, #0001 0 50%) 0 0 / 12px 12px; padding: 3px; cursor: pointer; display: grid; place-items: center; color: var(--fg); font: inherit; font-size: 12px; }
.fthumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fthumb.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.fthumb.off img { opacity: .35; }
.fthumb.add { border-style: dashed; line-height: 1.1; } .fthumb.add span { display: block; font-size: 20px; }
.fibtns { flex-wrap: wrap; gap: 6px; } .fibtns .btn, .fibtns .tog { padding: 4px 10px; font-size: 13px; min-height: 0; }
.fiLayer { flex-wrap: wrap; gap: 4px 12px; } .fiLayer label { display: inline-flex; gap: 4px; align-items: center; }
.ficonf { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; padding: 8px; border: 1px solid #c62828; border-radius: 6px; }

#modal .bstop { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
#modal .bstop .btn { padding: 4px 10px; font-size: 13px; min-height: 0; }

/* drawn box lines */
.paper .box.hasline, .paper.hasline { position: relative; }
.paper svg.bxline { fill: none; stroke: none; stroke-width: 1; }
.paper .box > .bxline { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 0; }
.paper > .bxline { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
/* folding sections in the style menus */
#modal .bsm fieldset > legend { cursor: pointer; user-select: none; }
#modal .bsm fieldset > legend .fold { border: 0; background: none; color: var(--muted); font-size: 13px; width: 18px; padding: 0; margin-right: 3px; cursor: pointer; line-height: 1; }
#modal .bsm fieldset.folded > :not(legend) { display: none !important; }
#modal .bsm fieldset.folded { padding-bottom: 0; border-bottom-color: transparent; border-left-color: transparent; border-right-color: transparent; }

/* fill cut to a hand-drawn edge */
.paper .box.hasfill { position: relative; isolation: isolate; }
.paper .box > .bxfill, .paper > .bxfill { position: absolute; z-index: -2; pointer-events: none; }
.paper.bare .box > .bxfill, .paper.bare .box > .bxline { display: none; }
.paper > .bxline { z-index: 0; }

/* portrait frame styling (its own box style) */
.paper .portrait.hasimg, .paper .portrait.hasline, .paper .portrait.hasfill { position: relative; isolation: isolate; }
.paper .portrait > .bximg { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background-repeat: no-repeat; pointer-events: none; }
.paper .portrait > .bxline { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 1; }
.paper .portrait > .bxfill { position: absolute; z-index: -2; pointer-events: none; }
.paper.bare .portrait > .bxline, .paper.bare .portrait > .bxfill, .paper.bare .portrait > .bximg { display: none; }
.paper .portrait.hasline { overflow: visible; }
.paper .portrait.hasline > img { border-radius: inherit; }

/* portrait masking */
.portrait.ptmasked, .portrait.ptmasked .portbtn { background: transparent; }
.ptprev { background: repeating-conic-gradient(#0001 0 25%, #0000 0 50%) 0 0 / 14px 14px; border-radius: 8px; }
.ptmask { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 10px; margin: 6px 0 0; }
.ptmask legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.crthumb.masked { background: transparent; }

/* creature boxes: the kind box hugs its cards; cards and pictures take their own box styles */
.paper .crsec { width: fit-content; max-width: 100%; align-self: flex-start; }
.paper .crgrid { grid-template-columns: repeat(var(--crn, 2), 366px); }
.paper .crcard.hasimg, .paper .crcard.hasline, .paper .crcard.hasfill, .paper .crthumb.hasimg, .paper .crthumb.hasline, .paper .crthumb.hasfill { position: relative; isolation: isolate; }
.paper .crcard.hasline, .paper .crthumb.hasline { overflow: visible; }
.paper .crthumb.hasline > img { border-radius: inherit; }
.paper :is(.crcard, .crthumb) > .bximg { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background-repeat: no-repeat; pointer-events: none; }
.paper :is(.crcard, .crthumb) > .bxline { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 1; }
.paper :is(.crcard, .crthumb) > .bxfill { position: absolute; z-index: -2; pointer-events: none; }

/* page line sits on the printable area; it replaces the creatures page's dashed guide */
.paperwrap > .paper.hasline::before { display: none; }
.paperwrap > .paper > .bxline { z-index: 0; }

.paper .sheetcap .capmid { position: absolute; left: 50%; top: 0; height: 17px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 5px; font-weight: 600; white-space: nowrap; color: var(--fg); }
.paper .sheetcap .capmid .add { width: 16px; height: 16px; font-size: 12px; line-height: 1; padding: 0; }
.paper .sheetcap .capmid .muted { font-weight: 400; }

/* creature name stretches to the card's right edge, like Notes */
.crf.crnm { flex: 1 1 120px; } .crfoot .crf.grow:not(.crnm) { flex: 1 1 100%; } .crcard .crfoot .crf.crnm input { flex: 1; min-width: 0; width: auto !important; }
.crcard .crfoot .crf.grow input { width: auto !important; }

/* creature notes and own abilities */
.crfoot .crf.crnotes { flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 1px; }
.crfoot .crf.crnotes textarea { width: 100% !important; font-size: 11px; line-height: 13px; padding: 2px 4px; resize: none; min-height: 0; height: auto; box-sizing: border-box; }
.crabils { flex: 1 1 100%; display: flex; flex-direction: column; gap: 3px; }
.crabils .chips { gap: 3px; }
.paper .crabils .chip { font-size: 10px; }
.crabadd { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 0; font: inherit; font-size: 10px; color: var(--accent); cursor: pointer; }
.crabadd .add { width: 15px; height: 15px; font-size: 11px; line-height: 1; display: inline-grid; place-items: center; }
@media print { .crabadd { visibility: hidden; } }

.crnmcol .crf.crnm { flex-direction: column; align-items: stretch; gap: 1px; } .crnmcol .crf.crnm input { width: 100% !important; box-sizing: border-box; }
.crlasts { display: flex; flex-wrap: wrap; gap: 3px 8px; }
/* killed familiar: a big red skull over its picture */
.crthumb .crskull { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2; background: none; border: 0; width: auto; height: auto; }
.crthumb .crskull svg { width: 62%; height: 62%; stroke: #c62828; stroke-width: 1.7; color: #c62828; filter: drop-shadow(0 0 2px rgba(255,255,255,.9)) drop-shadow(0 0 6px rgba(255,255,255,.6)); }

/* the fallen: stored dead creatures in the Add a creature menu */
.fallen { margin: 0 14px 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.fallhd { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 14px; }
.fallhd svg { width: 18px; height: 18px; fill: none; stroke: #c62828; stroke-width: 2; }
.fallrow { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.fallpic { position: relative; flex: 0 0 56px; width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: var(--field); }
.fallpic img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); opacity: .7; }
.fallpic .fallsk { position: absolute; inset: 0; display: grid; place-items: center; }
.fallpic .fallsk svg { width: 60%; height: 60%; fill: none; stroke: #c62828; stroke-width: 1.8; filter: drop-shadow(0 0 2px #fff); }
.falltx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.falltx small { color: var(--muted); font-size: 11.5px; }
.falltx .fallnote { white-space: pre-wrap; color: var(--fg); opacity: .8; }
.fallbtns { display: flex; flex-direction: column; gap: 4px; }
.crdeath .btn.ghost { margin-left: 4px; }

.falltx .fallyear { color: var(--warn); font-weight: 600; } .falltx .fallyear .linkbtn { font-size: 11.5px; margin-left: 4px; }

.crwaits { margin: 8px 14px 4px; display: flex; flex-direction: column; gap: 6px; }
.crwait { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 6px 8px; border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); border-radius: 8px; color: var(--fg); }
.crwait > svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: #c62828; stroke-width: 2; }
.crwait > span { flex: 1; } .crwait b { color: var(--warn); }

/* creature carrying */
.crbtns { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.crcarry { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.crcarry .l2 { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 2px; }
.paper .chip.crcar { font-size: 10px; } .chip.crcar .cn { display: inline-flex; align-items: center; gap: 3px; }
.chip.crcar svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.chip.crcar small { color: var(--muted); font-size: 9px; } .chip.crcar.gone { opacity: .6; text-decoration: line-through; }
#modal .crcarryopts button { display: flex; align-items: center; gap: 10px; } #modal .crcarryopts svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: var(--accent); stroke-width: 1.7; }
#modal .crcarryopts .crtx { display: flex; flex-direction: column; }

.chip.crcar .cn { cursor: pointer; }
@keyframes flashhi { 0%, 60% { box-shadow: 0 0 0 3px rgba(240, 165, 0, .9); background-color: rgba(240, 165, 0, .18); } 100% { box-shadow: 0 0 0 3px rgba(240, 165, 0, 0); background-color: transparent; } }
.flashhi, tr.flashhi td { animation: flashhi 2.1s ease-out; }

/* quantity column in packs and the home vault */
.packcard table.gear th:nth-last-child(2), .vaultcols table.gear th:nth-last-child(2), table.gear.packitems th:nth-last-child(2) { width: 44px; }
table.gear.packitems td input[data-b$=".qty"] { width: 40px !important; text-align: center; padding-left: 2px; padding-right: 2px; }
/* Gear page: the Wt column hugs its box on the right; Person and Home vault share the width */
.gearpg table.gear.person { width: 100%; }
.gearpg table.gear.person th:last-child, .gearpg table.gear.person td:last-child { width: 50px; padding-right: 6px; }
.gearpg table.gear.person th:nth-last-child(2), .gearpg table.gear.person td:nth-last-child(2) { width: 72px; white-space: nowrap; }
.gearpg table.gear.packitems th:nth-last-child(2), .gearpg table.gear.packitems td:nth-last-child(2) { width: 44px; }
.gearpg table.gear.person td:last-child input { width: 42px !important; }
/* Gear page tables never spill past their boxes: fixed column widths, the Item column takes what is left */
.gearpg table.gear.person { table-layout: fixed; }
.gearpg table.gear.person th:first-child, .gearpg table.gear.person td:first-child { width: 34px; }
.gearpg table.gear.person td { overflow: hidden; }
.gearpg table.gear.person td:nth-child(2) { overflow: visible; }
.gearpg table.gear.person td:nth-child(2) > * { max-width: 100%; }
.gearpg table.gear.person td input, .gearpg table.gear.person td .pk { max-width: 100%; box-sizing: border-box; }
/* Combat page */
.paper .handbox h2 { margin-bottom: 2px; }
.paper .hand { padding: 4px 0; }
.paper .handtag { flex: 0 0 auto; align-self: flex-end; position: relative; width: 28px; height: 28px; padding: 2px; margin-bottom: 1px; color: var(--muted); background: transparent; border: 1.5px dashed var(--line); border-radius: 5px; cursor: pointer; }
.paper .handtag .handic { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.paper .handtag.lh .handic { transform: scaleX(-1); }
.paper .handtag.on { color: #2e7d32; border: 1.5px solid #2e7d32; background: color-mix(in srgb, #2e7d32 14%, transparent); }
.paper .handtag.on .handic { fill: color-mix(in srgb, #2e7d32 35%, transparent); }
.paper .handtag.off { color: #c62828; border: 0; background: color-mix(in srgb, #c62828 8%, transparent); }
.paper .handtag .handx { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #c62828; stroke-width: 2; stroke-linecap: round; }
.paper .hand.off > .row > :not(.handtag), .paper .hand.off .hstats { opacity: .4; filter: grayscale(1); }
.paper .hand.off .hsel { text-decoration: line-through; text-decoration-color: color-mix(in srgb, #c62828 60%, transparent); }
.paper .twoh { flex: 0 0 auto; align-self: flex-end; display: flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 600; white-space: nowrap; height: 20px; cursor: pointer; }
.paper .twoh input { width: 13px; height: 13px; margin: 0; }
.inhand.off { color: #c62828; border-color: #c62828; background: transparent; opacity: .7; }
.paper .hsel { font: inherit; font-size: 10.5px; font-weight: 700; color: var(--fg); background: var(--field); border: 1px solid var(--line); border-radius: 3px; height: 20px; padding: 1px 15px 1px 5px; text-align: left; cursor: pointer; position: relative; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; min-width: 0; }
.paper .hsel::after { content: "▾"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 8px; }
.paper .hsel.empty { color: var(--muted); font-weight: 400; border-style: dashed; }
.paper .pg.cbpg { flex: 1 1 auto; align-items: stretch; }
.inhand { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 1px; font-size: 9px; font-weight: 800; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 0 3px 0 1px; line-height: 14px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.inhand .handic { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.cbicons { gap: 6px; }
.cbib { padding: 4px 6px; }
.cbib .jmi { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cbib[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.paper .pg.cbpg > .col:last-child .irbox { flex: 1 1 auto; }
.paper .acworn { margin: 4px 0 0; }
/* Person list: equipped armor column, narrower location */
.gearpg table.gear.pers th:nth-last-child(3), .gearpg table.gear.pers td:nth-last-child(3) { width: 54px; }
.gearpg table.gear.pers td:nth-last-child(3) input { width: 50px !important; }
.gearpg table.gear.pers th:nth-last-child(2), .gearpg table.gear.pers td:nth-last-child(2) { width: 28px; padding-left: 1px; padding-right: 1px; text-align: center; }
.gearpg table.gear.pers td:nth-last-child(3) { white-space: normal; line-height: 1.1; }
.armeq { position: relative; width: 22px; height: 20px; padding: 1px; border-radius: 4px; cursor: pointer; vertical-align: middle; background: transparent; }
.armeq > svg { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.armeq.on { color: #2e7d32; border: 1.5px solid #2e7d32; background: color-mix(in srgb, #2e7d32 14%, transparent); }
.armeq.on > svg { fill: color-mix(in srgb, #2e7d32 30%, transparent); }
.armeq.off { color: #c62828; border: 0; background: color-mix(in srgb, #c62828 8%, transparent); }
.armeq .handx { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #c62828; stroke-width: 2; stroke-linecap: round; }
.paper .hitem { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; }
.paper .hitem > .potrow, .paper .hitem > .pk { flex: 1 1 auto; min-width: 0; }
.paper .hitem .catbtn.static { flex: 0 0 auto; width: 20px; height: 20px; }
.paper .hchg { flex: 0 0 auto; font: inherit; font-size: 10px; font-weight: 600; height: 20px; padding: 0 6px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--accent); cursor: pointer; }
.hpopts .hpic { flex: 0 0 auto; display: inline-flex; width: 22px; height: 22px; margin-right: 8px; vertical-align: middle; }
.hpopts .hpic svg { width: 100%; height: 100%; }
.hpopts button { display: flex; align-items: center; }
.hphead { margin: 8px 0 3px; font-size: 12px; }
.hphead:first-child { margin-top: 0; }
/* HP, AC, sanity and attacks in one box */
.paper .hpbox.hpx { display: flex; align-items: flex-end; justify-content: space-between; gap: 1px; padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px; }
.paper .hpbox.hpx .vital { width: 47px; height: 44px; flex: 0 0 auto; }
.paper .hpbox.hpx .vital .vnum { font-size: 18px; }
.paper .hpbox.hpx .f { margin: 0; flex: 0 0 auto; }
.paper .hpbox.hpx .vwrap { justify-content: flex-end; }
.paper .hpbox.hpx .hpcur { align-self: center; }
.paper .hpbox.hpx .hpcur .l { white-space: normal; max-width: 44px; line-height: 1.05; }
.paper .hpbox.hpx .sanx { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.paper .hpbox.hpx .sanx .o.big { min-width: 28px; text-align: center; padding: 0 3px; font-size: 15px; line-height: 20px; height: 20px; }
.paper .hpbox.hpx .sanx input { height: 18px; font-size: 10px; text-align: center; padding: 0 2px; }
.paper .hpbox.hpx .f.atk { margin-left: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.paper .hpbox.hpx .f.atk .o.big { min-width: 28px; text-align: center; font-size: 15px; line-height: 22px; height: 22px; padding: 0 3px; }
.paper .hpbox.hpx .l { font-size: 7.5px; white-space: nowrap; }
.paper .hpbox.hpx .sanx input::placeholder { font-size: 9px; }
.paper .hpbox.hpx .hpcur input { width: 34px !important; }
.paper .hpbox.hpx .hpcur .l { max-width: 36px; }
.paper .hpbox.hpx .sanx input { width: 30px !important; }
.paper .hpbox.hpx .vtag { flex: 0 0 auto; align-self: center; font-size: 12px; font-weight: 800; letter-spacing: .02em; color: var(--fg); line-height: 1; margin-right: 1px; }
.paper .hpbox.hpx { align-items: center; }
.paper .hpbox.hpx .sanx, .paper .hpbox.hpx .f.atk { align-self: flex-end; }
.paper .hpbox.hpx .vgrp { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
/* Initiative & segments (Combat page, left column) */
.paper .initbox { display: flex; flex-direction: column; flex: 0 0 auto; }
.paper .initbox .bh { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-bottom: 3px; flex-wrap: wrap; }
.paper .initbox .bh h2 { margin: 0 0 3px; }
.paper .initpk { display: flex; align-items: flex-end; gap: 6px; }
.paper .initpk .f { margin: 0; }
.paper .initpk .pk { min-width: 40px; font-weight: 700; }
.paper .initclr { height: 20px; padding: 0 6px; font-size: 9.5px; }
.paper .initsum { margin: 0 0 3px; font-size: 10px; line-height: 1.25; }
.paper .initwait { margin: 2px 0; font-size: 10.5px; }
.paper .initcols { display: flex; gap: 8px; align-items: stretch; }
.paper .segbar { flex: 0 0 84px; display: grid; grid-template-rows: repeat(10, 1fr); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.paper .segbar .seg { display: flex; align-items: center; gap: 4px; min-height: 27px; padding: 0 5px; border-top: 1px solid var(--line); }
.paper .segbar .seg:first-child { border-top: 0; }
.paper .segbar .sn { flex: 0 0 14px; font-size: 10px; font-weight: 700; color: var(--muted); text-align: right; }
.paper .segbar .sw { font-size: 10px; font-weight: 700; line-height: 1.05; white-space: nowrap; }
.paper .segbar .win { background: rgba(232, 128, 60, .38); }
.paper .segbar .lose { background: rgba(110, 110, 240, .28); }
.paper .segbar .sh { background: rgba(128, 128, 128, .16); }
.paper .segbar .tie { background: repeating-linear-gradient(135deg, rgba(232, 128, 60, .30) 0 6px, rgba(110, 110, 240, .24) 6px 12px); }
.paper .segbar .tie.hit { box-shadow: inset 0 0 0 2px #c62828; }
.paper .initlist { flex: 1 1 auto; min-width: 0; }
.paper .phases { display: flex; flex-direction: column; gap: 5px; font-size: 10.2px; line-height: 1.25; }
.paper .phases ol { margin: 1px 0 0; padding-left: 15px; }
.paper .phases li { margin: 0 0 2px; }
.paper .phases .ph { display: block; color: var(--muted); font-size: 10px; }
.paper .phases li.mis { color: #b5541c; }
.paper .phases li.pw { background: rgba(232, 128, 60, .25); }
.paper .phases li.pl { background: rgba(110, 110, 240, .2); }
.paper .initbox .foot { margin: 3px 0 0; }
.paper .initrem { padding-top: 3px; }
.paper .phases .ph.phw { color: #a0521e; }
.paper .phases .ph.phl { color: #4a4ab0; }
/* initiative: one block per side, beside its steps */
.paper .initgrid { display: grid; grid-template-columns: 74px minmax(0, 1fr); column-gap: 7px; row-gap: 3px; align-items: stretch; }
.paper .initgrid .sblk { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--line); border-radius: 4px; padding: 4px 3px; text-align: center; }
.paper .initgrid .sblk .sw { font-size: 12px; font-weight: 800; }
.paper .initgrid .sblk .sn { font-size: 9.5px; font-weight: 600; color: var(--fg); }
.paper .initgrid .sblk .smel { font-size: 8.5px; font-weight: 700; color: #c62828; }
.paper .initgrid .sblk.sh .smel { color: #b5541c; }
.paper .initgrid .win { background: rgba(232, 128, 60, .38); }
.paper .initgrid .lose { background: rgba(110, 110, 240, .28); }
.paper .initgrid .sh { background: rgba(128, 128, 128, .16); }
.paper .initgrid .tie { background: repeating-linear-gradient(135deg, rgba(232, 128, 60, .30) 0 6px, rgba(110, 110, 240, .24) 6px 12px); }
.paper .initgrid .sgrp { font-size: 9.6px; line-height: 1.18; padding: 1px 0; }
.paper .initgrid .sgrp ol { margin: 1px 0 0; padding-left: 16px; }
.paper .initgrid .sgrp li { margin: 0 0 1px; }
.paper .initgrid .ph { display: block; color: var(--muted); font-size: 9.5px; }
.paper .initgrid .ph.phw { color: #a0521e; }
.paper .initgrid .ph.phl { color: #4a4ab0; }
.paper .initgrid li.mis { color: #b5541c; }
.paper .initgrid li.pw { background: rgba(232, 128, 60, .25); }
.paper .initgrid li.pl { background: rgba(110, 110, 240, .2); }
/* special combat rules */
.paper .specbox { flex: 1 1 auto; }
.paper .specbox .bh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.paper .specbox .bh h2 { margin: 0; }
.paper .specbox .pk { min-width: 120px; font-weight: 700; }
.paper .specl { margin: 0; padding-left: 14px; font-size: 9.6px; line-height: 1.2; }
.paper .specl li { margin: 0 0 2px; }
.paper .fisttbl { border-collapse: collapse; margin: 3px 0 1px; font-size: 9.5px; }
.paper .fisttbl th, .paper .fisttbl td { border: 1px solid var(--line); padding: 1px 4px; text-align: center; }
.paper .fisttbl th { background: var(--calc); }
.paper .initgrid .sblk .sn, .paper .initgrid .sblk .smel { white-space: nowrap; }
.paper .initbox { min-height: 350px; }
.paper .ammo:last-of-type { border-bottom: 0; }
.paper .amticks .amt { width: 12px; height: 12px; padding: 0; border: 1px solid var(--muted); border-radius: 2px; background: transparent; cursor: pointer; }
.paper .amticks .amt.on { background: var(--accent); border-color: var(--accent); }
.paper .ammo .f .l { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper .twoh.dis { opacity: .4; cursor: not-allowed; }
.strwarn { color: #c62828 !important; font-weight: 700; opacity: 1; } .paper .twoh.dis { opacity: 1; } .paper .twoh.dis input, .paper .twoh.dis > span:first-of-type { opacity: .4; } .paper .twoh .strwarn { margin-left: 4px; font-size: 9.5px; }
.paper h2.profh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.paper .profslots { font-size: 10px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.paper .profslots.over { color: #c62828; font-weight: 800; }
.paper .initgrid li.xfree { list-style: '★ '; font-weight: 700; }
.paper h2.hbh { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.paper .dualw { display: flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--fg); cursor: pointer; }
.paper .dualw input { width: 13px; height: 13px; margin: 0; }
.paper .dualtag { color: #b5541c; font-weight: 700; }
.refstrip .dmgb { color: #b5541c; }
.refstrip .tog[aria-pressed="true"] .dmgb { color: #ffd2a8; }
.paper .stat .nm[data-sthist] { cursor: pointer; }
.sthist { border-collapse: collapse; width: 100%; font-size: 13px; margin: 2px 0 6px; }
.sthist th, .sthist td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--line); }
.sthist th { color: var(--muted); font-weight: 600; font-size: 12px; }
.up { color: #2e7d32; font-weight: 700; } .dn { color: #c62828; font-weight: 700; }
.paper .statsbox { position: relative; }
.paper .statsbox .stset, .paper .statsbox .stlock { position: absolute; top: -10px; right: 10px; z-index: 2; background: var(--panel); }
.paper .statsbox .stset { font-size: 10px; padding: 2px 7px; height: auto; }
.paper .statsbox .stlock { font-size: 9px; color: var(--muted); padding: 1px 5px; border: 1px solid var(--line); border-radius: 8px; }
.opts button.orig, .opts button.orig.sel { color: #1565c0 !important; font-weight: 800; }
.opts button.orig .osub { color: #1565c0; font-weight: 700; }
@media print { .stset, .stlock { display: none !important; } }
/* Huso tracking */
.htg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.htr { display: flex; align-items: center; gap: 4px; font-size: 10px; cursor: pointer; }
.htr input { width: 12px; height: 12px; margin: 0; }
.htr span { flex: 1 1 auto; }
.htr b { color: #2e7d32; }
.htr.neg b { color: #c62828; }
.modal .htr, #modal .htr { font-size: 13px; }
#modal .htr input { width: 15px; height: 15px; }
.htform .f .l { white-space: normal; line-height: 1.1; max-width: 84px; }
.paper .htform .row > .f { flex: 0 1 auto; }
.paper .htform .row > .f { width: 70px; flex: 0 0 70px; }
.paper .htform .f .l { white-space: normal !important; overflow: visible; line-height: 1.1; min-height: 18px; display: block; }
.paper .htform .f input { width: 52px !important; }
/* grenade-like missiles */
.paper .grenbox .bh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.paper .grenbox .bh h2 { margin: 0; }
.paper .grenbox .bh .btn { font-size: 10px; padding: 2px 10px; height: auto; }
.paper .grenbox .row > .f .o { min-width: 40px; text-align: center; }
.paper .grwarn { color: #c62828; }
.paper .hsel.gk-acid { background: rgba(140, 200, 80, .25); } .paper .hsel.gk-holy { background: rgba(120, 170, 230, .22); }
.paper .hsel.gk-oil { background: rgba(240, 200, 120, .3); } .paper .hsel.gk-poison { background: #222; color: #fff; }
.grmiss { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.grmiss .btn { justify-content: flex-start; text-align: left; }
.grmiss .btn.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.grres { font-size: 14px; }
.paper .grenbox .row:last-of-type > .f { flex: 1 1 0; } .paper .grenbox .row > .f .o { display: block; }
.paper .acworn { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 2px 0 0 !important; }
.paper .cbpg .specl { font-size: 9.3px; line-height: 1.16; }
/* targets */
.paper .tgtbox .tgrow { align-items: flex-end; margin: 0 0 2px; }
.paper .tgr { flex: 0 0 auto; display: flex; align-items: center; height: 22px; padding: 0 2px; }
.paper .tgr input { width: 14px; height: 14px; margin: 0; accent-color: #1565c0; }
.paper .tgtsum { margin: 2px 0 0; color: #1565c0; }
.paper table.hit td.tgt { outline: 2px solid #1565c0; outline-offset: -2px; color: #1565c0; font-weight: 800; }
.paper table.hit th.tgt { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24'%3E%3Cpath d='M10 1.2 L18.5 4 V11 C18.5 17 14.5 20.6 10 22.8 C5.5 20.6 1.5 17 1.5 11 V4 Z' fill='%23e6e6e6' stroke='%239a9a9a' stroke-width='1.4'/%3E%3C/svg%3E") center / auto 100% no-repeat; }
.paper .grbtns { display: flex; gap: 4px; }
.paper .grbtns .btn { font-size: 10px; padding: 2px 10px; height: auto; }
/* Huso magic tattoo */
.tath { display: flex; align-items: center; gap: 8px; }
.tath .add { width: 26px; height: 26px; font-size: 17px; }
.paper .tath .add { width: 18px; height: 18px; font-size: 13px; }
.taticon { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 6px; background: #f4f1ea; border: 1px solid #c9c2b2; color: var(--accent); }
.taticon svg { width: 30px; height: 30px; stroke: none; fill: none; stroke-width: 1; }
.taticon:not(:has(svg [fill])) svg { stroke: currentColor; stroke-width: 1.7; }
.taticon.big { width: 92px; height: 92px; border-radius: 10px; }
.taticon.big svg { width: 84px; height: 84px; }
.tatopt { display: flex !important; gap: 10px; align-items: center; text-align: left; }
.tatgrid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.tattop { align-items: center; gap: 8px; }
.tatname { font-size: 15px; }
.tatbtns { margin-left: auto; display: flex; gap: 6px; }
.tatwarn { margin: 2px 0 0; font-size: 12px; }
.tatmeta { align-items: flex-end; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.tatdue { white-space: nowrap; }
.tathero { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding-bottom: 4px; }
.tatlive { margin: 6px 0 0; font-size: 12.5px; color: #1565c0; }
.tatcols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; font-size: 13px; }
.tatul { margin: 3px 0 0; padding-left: 18px; }
.tatul li { margin: 1px 0; }
.tatob { margin: 6px 0 0; font-size: 13px; }
@media (max-width: 640px) { .tatcols { grid-template-columns: 1fr; } .taticon.big { width: 64px; height: 64px; } .taticon.big svg { width: 58px; height: 58px; } }
.paper .tatname { font-size: 12.5px; }
.paper .tatwarn, .paper .tatlive { font-size: 10.5px; margin-top: 2px; }
.paper .tatcols, .paper .tatob { font-size: 10.5px; margin-top: 3px; }
.paper .tatcols { gap: 8px; }
.paper .tatul { padding-left: 14px; margin-top: 1px; }
.paper .tathero { font-size: 10.5px; padding-bottom: 2px; }
.paper .tatmeta { margin-top: 2px; gap: 8px; }
.paper .taticon.big { width: 74px; height: 74px; } .paper .taticon.big svg { width: 68px; height: 68px; }
.paper .tatbtns .btn { font-size: 10px; padding: 2px 10px; height: auto; }
.paper .tatgrid { gap: 10px; }
/* Night Wolf Inn */
.nwibox { display: flex; align-items: center; gap: 10px; }
.nwibox.on { cursor: pointer; }
.nwibox b { display: block; }
.nwisub { font-size: 12px; color: var(--muted); }
.nwijoin { display: inline-flex; align-items: center; gap: 8px; width: 100%; justify-content: center; }
.taticon.sm { width: 24px; height: 24px; border-radius: 4px; } .taticon.sm svg { width: 22px; height: 22px; }
.taticon.nwilogo { width: 46px; height: 46px; } .taticon.nwilogo svg { width: 42px; height: 42px; }
.nwihead { display: flex; align-items: center; gap: 14px; }
.nwihead .taticon.nwilogo { width: 96px; height: 96px; border-radius: 12px; } .nwihead .taticon.nwilogo svg { width: 88px; height: 88px; }
.nwiht h2 { font-size: 20px; margin: 0 0 4px; letter-spacing: .04em; }
.nwiht p { margin: 2px 0; }
.nwileave { margin-left: auto; align-self: flex-start; }
.nwititle { font-weight: 700; white-space: nowrap; }
.paper .nwibox b { font-size: 11.5px; } .paper .nwisub { font-size: 10px; }
.paper .nwijoin { font-size: 11px; padding: 4px 8px; }
.paper .nwiht h2 { font-size: 16px; } .paper .nwiht p { font-size: 11px; }
.nwibox.on { cursor: default; flex-direction: column; align-items: stretch; gap: 4px; }
.nwigo { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nwitab { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); align-self: flex-start; }
.paper .nwitab { font-size: 10px; } .paper .nwitab input { width: 12px; height: 12px; margin: 0; }
#modal .opts .ohead { padding: 10px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); border-top: 1px solid var(--line, #ddd); }
#modal .opts .ohead:first-of-type { border-top: 0; }
/* load category highlight */
.o.lc-norm { background: #dff3e4 !important; box-shadow: inset 0 0 0 2px #2e9e5b; color: #17643a; font-weight: 700; }
.o.lc-hvy { background: #fff4c2 !important; box-shadow: inset 0 0 0 2px #d4a90f; color: #7a5b00; font-weight: 700; }
.o.lc-max, .o.lc-over { background: #fde0dd !important; box-shadow: inset 0 0 0 2px #d0392b; color: #9c1f14; font-weight: 700; }
:root[data-theme="dark"] .o.lc-norm { background: #173d27 !important; color: #8fe0ad; }
:root[data-theme="dark"] .o.lc-hvy { background: #3d3410 !important; color: #f3d36b; }
:root[data-theme="dark"] .o.lc-max, :root[data-theme="dark"] .o.lc-over { background: #46191a !important; color: #ff9a8f; }
.o.lc-on { box-shadow: inset 0 0 0 2px currentColor; font-weight: 700; }
/* NWI Guild Shop */
.nwihead { position: relative; }
.nwibtns { margin-left: auto; align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; gap: 8px; }
.shophead { display: flex; align-items: center; gap: 12px; }
.shophead h2 { margin: 0 0 2px; } .shophead p { margin: 0; font-size: 12px; }
.shoptbl { width: 100%; border-collapse: collapse; }
.shoptbl th { text-align: left; font-size: 10px; text-transform: uppercase; color: var(--muted); }
.shoptbl td { padding: 1px 4px; font-size: 12px; border-top: 1px solid color-mix(in srgb, var(--muted) 18%, transparent); }
.shoptbl tr:nth-child(even) td { background: color-mix(in srgb, var(--muted) 8%, transparent); }
.shoptbl td.num, .shoptbl th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.shoptbl td.shdisc { color: #1565c0; font-weight: 700; }
.shoptbl .shbuy { padding: 0 8px; font-size: 10px; height: auto; line-height: 16px; }
.shopfoot { display: flex; flex-direction: column; } .shopdone { align-self: flex-end; min-width: 120px; }
.paper .shoptbl td { font-size: 9.5px; padding: 0 3px; line-height: 13px; } .paper .shoptbl .shbuy { font-size: 8.5px; line-height: 12px; padding: 0 6px; }
.paper .shophead h2 { font-size: 13px; } .paper .shophead p { font-size: 10px; }
.paper .shophead .taticon.nwilogo { width: 40px; height: 40px; } .paper .shophead .taticon.nwilogo svg { width: 36px; height: 36px; }
.shsrc { font-size: 8.5px; color: var(--muted); margin-left: 3px; }
.shopbox { padding: 6px 10px !important; } .shopgo { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.shopgoi svg { width: 18px; height: 18px; } .paper .shopgo { font-size: 11px; padding: 3px 8px; }
.shopic { color: #b8860b; } .shopic svg { stroke: currentColor; fill: none; }
/* shop pages (screen pages, not printed sheets) */
.shoppage { max-width: 1240px; margin: 0 auto; padding: 4px 0 24px; }
.shoppage .box { background: var(--panel, #fff); color: var(--fg); border: 1px solid var(--line, #dde3e0); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.shoppage .shopcols { columns: 3 330px; column-gap: 12px; }
.shoppage .shopsec { break-inside: avoid; display: inline-block; width: 100%; }
.shoppage .shopsec h2 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.shoppage .shophead h2 { font-size: 18px; }
.shoppage .shoptbl td { font-size: 12.5px; padding: 2px 4px; }
.shoppage .shopfoot { position: sticky; bottom: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
/* thief skills / tracking / turn undead / notes box on the Stats page grows to fit */
.paper .lastpg .tbox { height: auto; overflow: visible; }
.paper .lastpg .tbox textarea { min-height: 170px; }
.paper .pg.lastpg > .col:nth-child(2) .abbox { flex: 1 1 auto; }
.paper .abbox h2 { margin: 0 0 3px; }
.chip.abc .cn { padding: 1px 6px; font-size: 10.5px; }
.personbox { position: relative; }
.personbox .shopgear { position: absolute; right: 10px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; }
.personbox .shopgear svg { width: 14px; height: 14px; }
.paper .personbox .shopgear { right: 8px; bottom: 6px; font-size: 10px; padding: 2px 10px; height: auto; }
.paper .shopbox { min-height: 34px; }
/* Stats page: the three bottom columns end on one line at the foot of the letter-size page */
.paper .pg.lastpg > .col { display: flex; flex-direction: column; }
.paper .pg.lastpg > .col > :last-child { flex: 1 1 auto; }
.paper .lastpg .turntbl.mini td, .paper .lastpg .turntbl.mini th { line-height: 1.02; padding-top: 0; padding-bottom: 0; }
.paper .lastpg .tbox .turnmini .foot { margin-top: 1px; line-height: 1.15; }
/* thief skills / tracking sized to the Stats page box */
.paper .lastpg .tbox { overflow: hidden; }
.paper .lastpg .tbox table.tsk td:first-child { white-space: nowrap; font-size: 10px; letter-spacing: -.1px; }
.paper .lastpg .tbox table.tsk td { height: 14px; }
.paper .lastpg .trackmini .htg { grid-template-columns: 1fr; gap: 1px; }
.paper .lastpg .trackmini .htr { font-size: 9.5px; line-height: 1.15; }
.paper .lastpg .trackmini .htr span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paper .lastpg .trackmini .f .l { font-size: 8px; white-space: nowrap; }
.paper .lastpg .trackmini .row.nw { flex-wrap: wrap; gap: 2px 4px !important; }
.paper .lastpg .trackmini input[type=number] { width: 44px !important; height: 18px; padding: 0 4px; }
.paper .lastpg .trackmini .trackres { font-size: 11px; line-height: 1.25; }
.paper .lastpg .trackmini .foot { font-size: 8.5px; line-height: 1.2; }
.paper .lastpg .trackmini .tracktbl.mini td, .paper .lastpg .trackmini .tracktbl.mini th { font-size: 9.5px; line-height: 1.1; padding-top: 1px; padding-bottom: 1px; }
.paper .lastpg .tbox table.tsk { width: 100%; table-layout: fixed; }
.paper .lastpg .tbox table.tsk th:nth-child(1), .paper .lastpg .tbox table.tsk td:nth-child(1) { width: 40%; }
.paper .lastpg .tbox table.tsk .o, .paper .lastpg .tbox table.tsk input { width: 100%; box-sizing: border-box; padding: 0 2px; font-size: 10px; }
.paper .lastpg .tbox table.tsk td, .paper .lastpg .tbox table.tsk th { padding-left: 1px; padding-right: 1px; }
.paper .lastpg .tbox table.tsk th:nth-child(1), .paper .lastpg .tbox table.tsk td:nth-child(1) { width: 44%; font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; }
.paper .lastpg .tbox table.tsk td:nth-child(n+2) > *, .paper .lastpg .tbox table.tsk td input { width: 100% !important; max-width: 100%; min-width: 0; box-sizing: border-box; }
.paper .lastpg .trackmini .trackres { font-size: 10.5px; }
/* Background page: fixed-size proficiencies (4 rows) and languages (7 rows); overflow goes to Background page 2 */
.profgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 24px; gap: 4px 5px; align-items: center; }
.profgrid .chip { width: 100%; min-width: 0; justify-content: space-between; }
.profgrid .chip .cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.profgrid .add { justify-self: start; }
.paper .profgrid { grid-auto-rows: 19px; gap: 3px 4px; height: calc(4 * 19px + 3 * 3px); }
.paper .langbox .langs { grid-auto-rows: 22px; height: calc(7 * 22px + 6 * 3px); align-content: start; }
.bgmore { margin: 3px 0 0; font-size: 10px; color: var(--muted); text-align: right; font-style: italic; }
.paper .bgmore { font-size: 8.5px; margin: 1px 0 0; }
.paper .bgtop > .col, .paper .bgmid > .col { display: flex; flex-direction: column; }
.paper .bgtop > .col > :last-child, .paper .bgmid > .col > :last-child { flex: 1 1 auto; }
/* NWI box: same size joined or not */
.paper .nwibox { height: 56px; box-sizing: border-box; padding-top: 6px; padding-bottom: 6px; flex: 0 0 auto !important; }
.paper .nwibox.on { flex-direction: row; align-items: center; gap: 8px; }
.paper .nwibox.on .nwigo { flex: 1 1 auto; min-width: 0; }
.paper .nwibox .taticon.nwilogo { width: 40px; height: 40px; } .paper .nwibox .taticon.nwilogo svg { width: 36px; height: 36px; }
.paper .nwibox.on .nwitab { align-self: flex-end; white-space: nowrap; }
.paper .nwibox:not(.on) .nwijoin { height: 100%; }
/* identity box grows down to meet the NWI box; the reputation notes get the extra room */
.paper .bgtop > .col:first-child > .idbox { flex: 1 1 auto; display: flex; flex-direction: column; }
.paper .bgtop > .col:first-child > .idbox > label.f:last-child { flex: 1 1 auto; display: flex; flex-direction: column; }
.paper .bgtop > .col:first-child > .idbox > label.f:last-child textarea { flex: 1 1 auto; resize: none; }
.paper .bgtop > .col:first-child > :last-child { flex: 0 0 auto; }
.paper .bgtop > .col:first-child > .nwibox:last-child { flex: 0 0 auto !important; }
.paper .pg.bgtop, .paper .pg.bgmid { align-items: stretch; }
.paper .bg2 .profgrid, .paper .bg2 .langs { height: auto; }
/* Background: identity alone on the left meets the bottom of Known languages; NWI + VS ego, then Immunities | Resistances */
.paper .bgtop > .col:first-child > .idbox:last-child { flex: 1 1 auto !important; }
.paper .bgir { align-items: stretch; }
.paper .irhalf { min-height: 92px; display: flex; flex-direction: column; }
.paper .irhalf .irbg { flex: 1 1 auto; align-content: flex-start; }
.paper .irhalf .foot { margin: 2px 0 0; }
.paper .bgmid .nwibox { height: 100%; min-height: 56px; }
/* Home (front) page */
.homepg { position: relative; height: 100%; min-height: 960px; }
.paper .homepg { min-height: 0; height: 100%; }
.hometitle { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; color: var(--accent); line-height: 1.1; text-align: center; max-width: 96%; overflow: hidden; text-overflow: ellipsis; letter-spacing: .02em; z-index: 2; }
.homecenter { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 12px; }

.paper .portrait.homept .portbtn { width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; display: block; }
.paper .portrait.homept .portbtn img { width: 100%; height: 100%; object-fit: cover; display: block; }

.homename { background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--fg); font: inherit; }
.homename span { font-size: 20px; font-weight: 700; }
.homename small { font-size: 11px; color: var(--accent); }
.homeedit { position: absolute; right: 0; bottom: 0; z-index: 3; }
.hmgrid { display: grid; grid-template-columns: repeat(3, 22px); grid-template-rows: repeat(3, 22px); gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; }
.hmgrid button { border: 1px solid var(--line); background: var(--field); border-radius: 3px; cursor: pointer; padding: 0; }
.hmgrid button:hover { background: var(--accent); }
@media print { .homeedit { display: none !important; } }
.paperwrap[data-sheet="home"] .sheetcap { visibility: hidden; }


/* front page: the Stats page character box at half size (236 × 241 drawn at 50%) */
.paper .homecbw { width: 118px; height: 121px; position: relative; cursor: pointer; }
.paper .homecbw .homecb { position: absolute; left: 0; top: 0; width: 236px; height: 241px; transform: scale(.5); transform-origin: 0 0; margin: 0; pointer-events: none; }
/* front page picture layers */
.paperwrap[data-sheet="home"] .paper { position: relative; overflow: hidden; }
.homebg { position: absolute; inset: 0; z-index: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.homebg .hbl { position: absolute; inset: 0; }
.homebg .hbback { background-repeat: repeat; background-size: cover; background-position: center; }
.homebg.sch .hbback { background-size: auto 100%; }
.homebg.scv .hbback { background-size: 100% auto; }
.homebg .hbfront { background-repeat: no-repeat; background-size: cover; background-position: center bottom; }
.homebg .hbfront.art-castle { background-size: 100% auto; }
.paperwrap[data-sheet="home"] .homepg { z-index: 1; }
.hmh { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 14px 0 4px; border-top: 1px solid var(--line); padding-top: 10px; }
@media (prefers-reduced-motion: reduce) { .homebg .hbback { background-position: center !important; } }
.homebg canvas.hbfx { width: 100%; height: 100%; display: block; }
.homebg .hbfront.art-nwi { background-size: contain; background-position: center 58%; }
.homebg .hbback.art-pclouds { background-size: auto 55%; }
/* front page character boxes: one per character in play, in a row or a column */
.homecenter { flex-direction: row; flex-wrap: wrap; gap: 14px; max-width: 94%; max-height: 94%; width: max-content; z-index: 1; }
.homecenter.col { flex-direction: column; flex-wrap: wrap; }
.paper .homecbw { flex: 0 0 auto; }
.paper .homecbw:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* the front page editor floats and can be dragged; the page behind stays visible */
#modal.hmdrag { background: transparent; pointer-events: none; }
#modal.hmdrag .box { pointer-events: auto; box-shadow: 0 10px 34px rgba(0,0,0,.35); }
#modal .draghead { cursor: move; touch-action: none; user-select: none; }
#modal .draghead::before { content: '⠿'; color: var(--muted); margin-right: 4px; }
.hmtip { margin: 2px 0 6px; font-size: 11.5px; line-height: 1.35; }
.homebg .hbmid { background-repeat: repeat; background-size: auto 55%; }
/* front page layer list */
.hmlayers { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 6px; }
.hmly { border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; background: var(--field); }
.hmlyh { align-items: center; gap: 4px; }
.hmlyn { flex: 1 1 auto; font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hmlyh .btn { padding: 0 8px; min-width: 28px; height: 24px; }
.hmlyset { margin-top: 4px; }
.homebg .hbextra { background-repeat: no-repeat; }
.hmlyswap { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--fg); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline dotted; text-underline-offset: 3px; }
.hmlyswap .muted { font-weight: 400; font-size: 11px; }
/* front page: full screen, no page bar; only an outlined settings gear at the top right */
body.onhome { overflow-x: hidden; }
body.onhome header.top { position: fixed; top: env(safe-area-inset-top, 0px); right: env(safe-area-inset-right, 0px); left: auto; width: auto; z-index: 50; background: none; border: 0; box-shadow: none; padding: 12px; }
body.onhome .toprow > :not(#gearBtn), body.onhome #tabs { display: none !important; }
body.onhome #gearBtn { background: transparent; border: 1.5px solid rgba(255,255,255,.85); color: #fff; filter: drop-shadow(0 0 2px rgba(0,0,0,.75)); }
body.onhome #gearBtn:hover { background: rgba(255,255,255,.12); }
body.onhome #gearBtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
body.onhome main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
body.onhome .paperwrap[data-sheet="home"] { margin: 0 !important; }
body.onhome .paperwrap[data-sheet="home"] .paper { border: 0; box-shadow: none; border-radius: 0; }
/* a page shorter than the screen (a phone held upright) sits in the middle on black */
body.onhome { background: #000; }
body.onhome main { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
/* Stats button: red dice until the starting ability scores are locked in */
svg.jmi.unlocked, .pgbar .pgb svg.jmi.unlocked, .jumpmenu button[aria-current="page"] .jmi.unlocked { stroke: #e0282e; }
svg.jmi.unlocked circle { fill: #e0282e; }
.pgbar .pgb.on svg.jmi.unlocked { stroke: #ff7b7b; } .pgbar .pgb.on svg.jmi.unlocked circle { fill: #ff7b7b; }
/* must-pick fields: red until set */
.f.req > .l, th.req { color: #d32f2f !important; }
.o.req { box-shadow: 0 0 0 1px #d32f2f inset; }
.pk.req, input.req { border-color: #d32f2f !important; color: #d32f2f; box-shadow: 0 0 0 1px #d32f2f inset; }
.pk.req::after { border-color: #d32f2f !important; }
.paper .statsbox .stset { color: #d32f2f; border-color: #d32f2f; }
@media print { .f.req > .l, th.req, .pk.req, input.req, .o.req { color: inherit !important; border-color: inherit !important; box-shadow: none !important; } }
.mcbtns .btn.req { color: #d32f2f; border-color: #d32f2f; }
.mcbtns .btn.req:hover { background: rgba(211,47,47,.08); }
/* NWI page membership box: the Night Wolf Inn picture in the logo spot */
.nwihead .nwipic { width: 96px; height: 96px; flex: 0 0 96px; border-radius: 12px; border: 1px solid #c9c2b2; object-fit: cover; display: block; }
/* House tattoo art (the user's NWITattoos.png) in the Magic tattoo box, its picker and the remove window */
.tatpic { display: block; flex: 0 0 auto; width: 52px; height: auto; aspect-ratio: 300 / 227; border-radius: 4px; border: 1px solid #c9c2b2; background: #fff; }
.tatpic.big { width: 120px; border-radius: 6px; }
.paper .tatpic.big { width: 104px; }
@media (max-width: 640px) { .tatpic.big { width: 88px; } }
/* Night Wolf Inn vault (NWI page, under the Magic tattoo box) */
.nwivault .nvhead { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.nwivault .nvpic { width: 96px; height: 96px; flex: 0 0 96px; border-radius: 12px; border: 1px solid #c9c2b2; object-fit: cover; display: block; }
.nwivault .nvht { min-width: 0; flex: 1; }
.nwivault .nvht h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: .06em; }
.nwivault .nvcols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
@media (max-width: 640px) { .nwivault .nvcols { grid-template-columns: 1fr; } }
/* Planar Travel window */
.planar .plall { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); margin-bottom: 8px; }
.planar .plall .osub, .planar .pltbl .osub { display: block; }
.planar .plstep { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.planar .plstep .btn { min-width: 30px; padding: 2px 8px; }
.planar .plv { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.planar .pltbl { width: 100%; border-collapse: collapse; }
.planar .pltbl th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 2px 6px; }
.planar .pltbl td { padding: 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.planar .pltbl tr.plnew td { background: rgba(255, 213, 79, .18); }
.planar .pleff { font-weight: 700; white-space: nowrap; }
/* Planar Travel feedback: changed magic bonuses and the condition share one blue, with an asterisk */
:root { --planar: #1565c0; }
.plmark { color: var(--planar) !important; font-weight: 700; }
.o.plmark::after, .plmark[data-o]::after { content: '*'; }
.wchip.plchip { color: var(--planar); font-weight: 700; }
.pltag { color: var(--planar); font-weight: 700; font-size: 12px; white-space: nowrap; padding: 0 3px; cursor: pointer; align-self: center; }
.planar .plplane { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.planar .plplane span { font-weight: 600; }
.planar .plplane input { flex: 1; min-width: 0; }
:root[data-theme="dark"] .shoptbl td.shdisc { color: #64b5f6; }
:root[data-theme="dark"] .shoppage .shopfoot { box-shadow: 0 4px 16px rgba(0,0,0,.5); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shoptbl td.shdisc { color: #64b5f6; } }
/* Ammunition box: always the height of one full row of shots (a 24-arrow quiver); more than 24 squeeze into that row */
.paper .ammobox { min-height: 64px; height: 64px; overflow: hidden; }
.paper .ammobox > .row { min-height: 52px; }
.paper .amticks.fit { flex-wrap: nowrap; gap: 2px; }
.paper .amticks.fit .grp { flex: 1 1 0; min-width: 0; gap: 1px; }
.paper .amticks.fit .amt { flex: 1 1 0; min-width: 0; width: auto; }
/* Combat page: the columns end at the page's bottom margin; Special rules takes whatever room is left (its text shrinks to fit), Ammunition sits under it */
.paper .pg.cbpg { flex: 1 1 0; min-height: 0; }
.paper .pg.cbpg > .col { min-height: 0; }
.paper .pg.cbpg > .col > .box { flex-shrink: 0; }
.paper .pg.cbpg > .col > .specbox { flex: 1 1 0; min-height: 60px; overflow: hidden; }
.paper .pg.cbpg > .col:last-child > .irbox { flex: 1 1 0; min-height: 0; overflow: hidden; }
.paper .specl .fisttbl { font-size: 1em; margin: 1px 0; line-height: 1.1; }
.paper .specl .fisttbl th, .paper .specl .fisttbl td { padding: 0 4px; }
/* Grenade-like missile: one-line box, Use opens the throw window */
.paper .grenbox .grline { margin: 0; line-height: 1.35; }
.paper .grenbox .grline .o.grhit { display: inline; padding: 0 3px; min-width: 0; }
.grenuse .grops button.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.grenuse .grsel { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); }
.grenuse .grstats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.grenuse .grth { color: var(--accent); }
.grenuse .grres { margin-top: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 14px; }
.grenuse .grres.hit { border-color: #2e7d32; background: rgba(46,125,50,.08); }
.grenuse .grres.miss { border-color: #c62828; background: rgba(198,40,40,.06); }
.grenuse .grres .grmiss { margin-top: 6px; font-size: 13px; }
.grenuse .grroll { color: var(--accent); }
.grenuse .grbtnrow { margin-top: 10px; gap: 8px; }
/* Combat page, right column: the leftover space is split 1/3 Immunities & resistances, 2/3 Special abilities */
.paper .pg.cbpg > .col:last-child > .irbox:not(.abbox) { flex: 1 1 0; min-height: 0; }
.paper .pg.cbpg > .col:last-child > .abbox { flex: 2 1 0; min-height: 0; overflow: hidden; }
/* Psionics: the roll window and the Psionics page */
.psiwiz .psisteps { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; }
.psiwiz .psisteps span { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.psiwiz .psisteps span.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.psiwiz .psisum { margin: 6px 0; } .psiwiz h3 { margin: 4px 0 6px; font-size: 14px; }
.psiwiz .psiroll { gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.psires { margin: 6px 0; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); }
.psires.ok { border-color: #2e7d32; background: rgba(46,125,50,.08); } .psires.no { border-color: #c62828; background: rgba(198,40,40,.06); }
.psicols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } @media (max-width: 640px) { .psicols { grid-template-columns: 1fr; } }
.psitbl { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.psitbl th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 2px 6px; }
.psitbl td { padding: 2px 6px; border-top: 1px solid var(--line); }
.psitbl tr.hi td { background: color-mix(in srgb, var(--accent) 16%, transparent); font-weight: 700; }
.psiwiz .psidisc td:first-child { width: 34px; color: var(--muted); }
.psipick { display: flex; flex-direction: column; gap: 3px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-align: left; }
.linkbtn:disabled { color: var(--muted); cursor: default; }
.psiact { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.psihead { display: flex; gap: 10px; align-items: center; }
.psihead .psiico svg { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.psihead .psiht { flex: 1; min-width: 0; } .psihead h2 { margin: 0 0 3px; }
.psihead .psibtns { display: flex; flex-direction: column; gap: 4px; }
.psibar { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--muted) 25%, transparent); margin-top: 2px; overflow: hidden; }
.psibar span { display: block; height: 100%; background: var(--accent); } .psibar.d span { background: #1565c0; }
.psid { padding: 4px 0 5px; border-top: 1px solid var(--line); } .psid:first-of-type { border-top: 0; }
.psidh { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.psin { font-weight: 700; }
.psist { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 11px; color: var(--muted); } .psist b { color: var(--fg); font-weight: 600; }
.psidd { margin: 2px 0 0; }
.paper .psihead .psiico svg { width: 36px; height: 36px; }
.paper .psitbl { font-size: 10px; } .paper .psid { padding: 2px 0 3px; } .paper .psidd { font-size: 9.6px; line-height: 1.25; } .paper .psist { font-size: 9px; }
.paper .psidh .btn { font-size: 9px; padding: 1px 8px; height: auto; } .paper .psibtns .btn { font-size: 10px; padding: 2px 10px; height: auto; }
.paper .psitbl th { font-size: 8.5px; text-transform: uppercase; letter-spacing: .04em; }
.psid.locked .psist, .psid.locked .psidd, .psid.locked .psin { opacity: .5; }
.psilock { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 0 8px; white-space: nowrap; }
.paper .psilock { font-size: 9px; }
.paper .statsbox .stset.ready { color: var(--accent); border-color: var(--accent); }
.paper .statsbox .stset[aria-disabled="true"] { opacity: .85; cursor: not-allowed; }
.psislot { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .paper .psislot .btn { font-size: 9px; padding: 1px 8px; height: auto; }
.psibtns .psiadd { background: #c62828; border-color: #c62828; color: #fff; }
.psicnt { font-size: .8em; color: var(--muted); letter-spacing: 0; text-transform: none; font-weight: 600; margin-left: 6px; } .psidn { white-space: nowrap; }
.mcbtns .psiaddbtn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.mcbtns .psiaddbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.psibtns .psirm { color: #c62828; border-color: #c62828; }
#psiRmY { background: #c62828; border-color: #c62828; color: #fff; }
/* Psionic combat tracker */
.psibtns .pcopen { background: #5e35b1; border-color: #5e35b1; color: #fff; }
.pctbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.pctbl th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 2px 6px; text-transform: uppercase; letter-spacing: .04em; }
.pctbl td { padding: 4px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.pctbl .pcv { font-variant-numeric: tabular-nums; font-weight: 700; } .pcbr { font-size: 11px; }
.pctbl select { max-width: 100%; }
.pcx { color: #c62828; margin-left: 6px; font-size: 14px; }
.pcfx { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #fff3e0; color: #e65100; font-size: 11px; font-weight: 700; } .pcfx.k { background: #ffebee; color: #c62828; }
.pcnote { font-size: 12px; margin: 6px 0 0; }
.pcdone { margin: 0; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pclog .pcl { padding: 4px 0; border-top: 1px solid var(--line); } .pclog .pcl:first-of-type { border-top: 0; }
.pclog ul { margin: 2px 0; padding-left: 18px; } .pcafter { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); } .pcafter b { color: var(--fg); } .pcdead { color: #c62828 !important; }
.paper .pctbl { font-size: 10.5px; } .paper .pctbl th { font-size: 8.5px; } .paper .pctbl select, .paper .pctbl input { font-size: 10.5px; height: 22px; padding: 0 4px; }
.paper .pclog { font-size: 10px; } .paper .pcafter { font-size: 9.5px; } .paper .pcnote { font-size: 9.5px; }
.pcchoose .pcpts { display: block; font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.paper .pcchoose .pcpts { font-size: 9px; }
.pctbl select option:disabled { color: #b0b0b0; }
.pchead .pcconds { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; align-content: center; max-width: 40%; }
.pchead .pcconds .l { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); width: 100%; }
.pccond { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); }
.pccond.psi { border-color: #5e35b1; color: #5e35b1; font-weight: 700; }
.pcfxm .pcfxr { gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 4px 0; }
.pcloss { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.psiw { color: #c62828; border-color: #c62828; }
.paper .pccond { font-size: 9px; }
.wchip.psichip { color: #5e35b1; font-weight: 700; } .cduntil { font-weight: 400; color: var(--muted); font-size: .85em; }
.cdstat { margin: 0 0 6px; color: #1565c0; font-weight: 600; } .cdtag { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #5e35b1; font-weight: 700; } .cdend { margin: 0 0 6px; color: #c62828; }
.pclog .pcundo { color: #c62828; border-color: #c62828; }
/* dead characters: a skull over the portrait, red names in the character switcher */
.portrait.ptdead { position: relative; }
.portrait.ptdead img { filter: grayscale(1) brightness(.75); }
.ptskull { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ptskull svg { width: 58%; height: 58%; max-width: 120px; fill: none; stroke: #c62828; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 3px rgba(255,255,255,.9)); }
select.capdead, option.capdead, .capname.capdead { color: #c62828 !important; font-weight: 700; }
select.capdead option:not(.capdead) { color: var(--fg); font-weight: 400; }
body.chdead .charbox .cname { color: #c62828; }
.cdsrc { margin: 0 0 6px; font-size: 13px; padding: 4px 8px; border-left: 3px solid var(--accent); background: var(--field); border-radius: 0 6px 6px 0; }
/* powers lost for good: kept on the list, crossed out */
.psilost td, .psilost .psin { text-decoration: line-through; color: var(--muted); }
.psilost .psilostt, .psilost .psilock { text-decoration: none; display: inline-block; }
.psilostt { font-size: 10px; font-weight: 700; color: #c62828; border: 1px solid #c62828; border-radius: 999px; padding: 0 6px; margin-left: 4px; text-transform: uppercase; }
option.pclost { text-decoration: line-through; color: #9e9e9e; }
.psinums .f.psipts { flex: 0 0 auto; width: 110px; }
.psinums .f.psipts .psiv { display: block; }
.psibtns .pcopen.np { background: #00838f; border-color: #00838f; }
.psimast { margin: 2px 0 0; font-size: 12px; } .psimastl { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: #5e35b1; border-radius: 999px; padding: 0 7px; margin-right: 6px; } .psimast b { color: #5e35b1; }
.paper .psimast { font-size: 9.5px; } .paper .psimastl { font-size: 8px; }
.npm .npatt { margin: 0 0 6px; } .npm .npatt.no { color: #c62828; }
.npadj { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; font-size: 12.5px; margin-top: 4px; } @media (max-width: 640px) { .npadj { grid-template-columns: 1fr; } }
.npok { color: #2e7d32; } .npbad { color: #c62828; } .npres { margin: 6px 0 0; padding: 6px 10px; border: 1px solid #c62828; border-radius: 8px; background: rgba(198,40,40,.06); }
.npm .npfx { max-width: 280px; margin: 6px 0; }
.psihead .psirest { margin-top: 6px; }
.psibtns .pcopen.np.npoff { background: #b0bec5; border-color: #b0bec5; color: #eceff1; cursor: not-allowed; }
.psihead { position: relative; } .psihead .psiwarn { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center; font-size: 11px; font-style: italic; color: #b26a00; pointer-events: none; }
@media (max-width: 760px) { .psihead { flex-wrap: wrap; } .psihead .psiwarn { position: static; flex: 1 0 100%; } }
.paper .psihead .psiwarn { font-size: 8.5px; }
.npm .npint { font-size: 12px; margin: 0 0 6px; } .npm .npauto { font-size: 10.5px; color: #00838f; font-style: italic; }
.npcombo { position: relative; display: inline-flex; align-items: stretch; } .npcombo .npdd { padding: 0 8px; margin-left: 2px; min-height: 0; }
.npsug { position: fixed; z-index: 1000; max-height: 260px; overflow-y: auto; background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.18); padding: 3px; margin-top: 2px; }
.npsug button { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; background: none; border: 0; padding: 5px 8px; border-radius: 6px; font: inherit; font-size: 13px; color: inherit; cursor: pointer; } .npsug button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); } .npsug small { color: #888; font-size: 11px; } .npsug p { margin: 4px 8px; font-size: 12px; }
.npsug { display: flex; flex-direction: column; overflow: hidden !important; } .npsug[hidden] { display: none; } .npsug .npsq { margin: 2px 2px 4px; padding: 5px 8px; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: inherit; } .npsug .npsl { overflow-y: auto; min-height: 0; flex: 1; }
.npadj .npspb { margin: 2px 0 3px 22px; } .npadj .npspb .btn { font-size: 11px; padding: 1px 8px; min-height: 0; }
.npm .npsp { margin-top: 6px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; } .npm .npsp p { font-size: 12px; margin: 2px 0 4px; } .npm .npsp table { width: 100%; font-size: 12px; } .npm .npspr { cursor: pointer; } .npm .npspr:hover td:not([rowspan]) { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.npsug button.npno, .npsug button.npno small { color: #c62828; cursor: not-allowed; } .npsug button.npno:hover { background: rgba(198,40,40,.08); }
.npm .npwho { font-size: 12px; margin: 0 0 6px; padding: 5px 8px; border-left: 3px solid #c62828; background: rgba(198,40,40,.06); border-radius: 4px; }
.pcem .pcstr { font-size: 13px; }
.monbar { gap: 8px; align-items: center; margin: 0 0 6px; flex-wrap: wrap; } .monbar input[type=search] { flex: 1 1 200px; min-width: 160px; padding: 5px 8px; }
.montbl tbody tr { cursor: pointer; } .montbl tbody tr:hover td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.monlink { background: none; border: 0; padding: 0 2px; color: var(--accent); text-decoration: underline dotted; cursor: pointer; font: inherit; font-size: 11px; }
.crfull.montab td:first-child { white-space: nowrap; font-weight: 600; } .npsug .npps { color: #6a1b9a; }
.pcselw { display: inline-flex; align-items: center; gap: 4px; }
.pcinfo { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; border: 1.5px solid var(--accent); background: none; color: var(--accent); font: italic 700 12px/1 Georgia, serif; padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pcinfo:hover { background: var(--accent); color: #fff; }
.pcinfom .pcim { padding: 6px 8px; border-radius: 8px; margin-bottom: 4px; border: 1px solid transparent; } .pcinfom .pcim.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pcinfom p { margin: 0 0 2px; } .pcinfom .pcimr, .pcinfom .pcimd { font-size: 13px; }
.pcodds { border: 1.5px solid var(--accent); background: none; color: var(--accent); border-radius: 999px; padding: 1px 8px; font: 600 12px/1.4 inherit; cursor: pointer; white-space: nowrap; } .pcodds.d { border-color: #5e35b1; color: #5e35b1; } .pcodds:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pcoddm p { margin: 0 0 6px; font-size: 13px; } .pcoddm .pcodt { width: 100%; font-size: 12.5px; } .pcoddm .pcodt td, .pcoddm .pcodt th { text-align: center; padding: 3px 4px; } .pcoddm .pcodt td:first-child, .pcoddm .pcodt th:first-child { text-align: left; } .pcoddm .pcbad { color: #c62828; font-weight: 700; }
.pcoddm .pcodt tr.pcpick td { background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 600; } .pcoddm .pcodt tr.pcpick td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.pcoddm .pcodh { margin: 8px 0 2px; }
.pcchoose .pclockb { display: block; margin-top: 4px; font-size: 12px; padding: 2px 10px; }
.pcchoose tr.pcwait td { opacity: .55; } .pcchoose tr.pcnow td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.pcchoose .pcok { display: block; font-size: 11px; color: #2e7d32; font-weight: 600; } .pcchoose .pcneed { display: block; font-size: 11px; color: #b26a00; }
/* Huso Verse psionics */
.psihuso { font-size: 10px; font-weight: 700; color: #fff; background: #8e24aa; border-radius: 999px; padding: 1px 7px; vertical-align: middle; margin-left: 4px; }
.psibar.h span { background: #8e24aa; } .psibar.s span { background: #00897b; }
.psinums .f.psipool { flex: 0 0 auto; width: 150px; }
.hptbl { font-size: 12px; } .hptbl tr.hpno td { opacity: .45; } .psitag { font-size: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; margin-left: 4px; color: var(--muted); } .psitag.on { border-color: #2e7d32; color: #2e7d32; font-weight: 700; }
.sanbox .sanrow .f { flex: 0 0 auto; } .sanbtns { gap: 6px; flex-wrap: wrap; }
.san-mild { color: #2e7d32; } .san-worrisome { color: #b26a00; } .san-clinical { color: #e65100; } .san-dangerous, .san-lost { color: #c62828; }
.sanmini { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 8px !important; } .sanmini .btn { padding: 1px 8px; font-size: 11px; min-height: 0; }
.pcchoose .pcpts { display: block; font-size: 11px; color: var(--muted); }
.pcens .pcen.gone { opacity: .5; text-decoration: line-through; }
.sanmini { align-self: start; flex: 0 0 auto !important; height: auto !important; min-height: 0 !important; }
/* psionic dice prompt */
#rollask { position: fixed; inset: 0; background: rgba(10, 14, 18, .55); display: grid; place-items: center; z-index: 40; padding: 16px; }
#rollask .box { background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; width: min(460px, 100%); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
#rollask header { padding: 10px 14px; border-bottom: 1px solid var(--line); }
#rollask header b { font-family: var(--font-head); }
#rollask .body { padding: 10px 14px; overflow: auto; }
#rollask .rawhy { margin: 0 0 8px; }
#rollask .ralist { margin: 0 0 8px; padding-left: 22px; font-size: 13px; }
#rollask .rarow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#rollask .rarow input { width: 84px; }
#rollask .rafoot { margin-top: 10px; display: flex; justify-content: flex-end; }
#rollask .raoc { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0 0 10px; }
#rollask .raoc th, #rollask .raoc td { border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: left; vertical-align: top; }
#rollask .raoc th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
#rollask .raoc td:first-child { white-space: nowrap; width: 1%; font-variant-numeric: tabular-nums; }
#rollask .raoc tr.bad td:last-child { color: #c62828; }
#rollask .raoc tr.on td { background: var(--calc); font-weight: 600; }
#rollask .raoc tr.on td:first-child { box-shadow: inset 3px 0 0 currentColor; }
#rollask .ranum { font-size: 26px; font-weight: 700; font-family: var(--font-head); min-width: 40px; text-align: center; }
#rollask .rawhat { flex: 1 1 140px; }
