/* Combat tracker (/ttrpg/combat/, 16 Nov 2026): the site's own layout in the Asar colours. */
.ttrpg .sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ttrpg .turn-bar { display: grid; gap: 0.5em; }
.ttrpg .turn-bar h2 { margin: 0; font-size: 1.4em; }
.ttrpg .turn-bar #whose { margin: 0.2em 0 0; font-size: 1.15em; }
.ttrpg .turn-bar #next { min-inline-size: 9em; font-size: 1.25em; }
.ttrpg .incoming { border-color: var(--accent-bg); border-width: 3px; }
.ttrpg .fight-tools { margin-block: 0.75em; }
.ttrpg label.check { display: inline-flex; gap: 0.5em; align-items: center; min-block-size: 44px; }
.ttrpg label.check input { inline-size: 1.4em; block-size: 1.4em; }

.ttrpg ol.combatants { list-style: none; padding: 0; margin: 0.75em 0; display: grid; gap: 0.6em; }
.ttrpg li.combatant { display: grid; grid-template-columns: 5.5em 1fr auto; gap: 0.5em 1em; align-items: start;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 0.6em 0.8em; }
.ttrpg li.combatant[data-side="pc"] { border-inline-start: 8px solid #3c8dde; }
.ttrpg li.combatant[data-side="ally"] { border-inline-start: 8px solid #3fae6a; }
.ttrpg li.combatant[data-side="foe"] { border-inline-start: 8px solid #c0392b; }
.ttrpg li.combatant.now { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.ttrpg li.combatant.dead { opacity: 0.55; }
.ttrpg li.combatant.dead .c-name strong { text-decoration: line-through; }
.ttrpg .c-init { display: grid; justify-items: center; gap: 0.15em; }
.ttrpg .c-init input { inline-size: 4.2em; font-size: 1.3em; font-weight: 700; text-align: center; }
.ttrpg .c-turn { color: var(--accent); font-weight: 700; display: inline-block; min-inline-size: 1em; }
.ttrpg .c-name strong { font-size: 1.1em; }
.ttrpg .c-ac { display: inline-block; margin-inline-start: 0.5em; padding: 0 0.45em; border: 2px solid var(--line); border-radius: 6px; font-weight: 700; }
.ttrpg .tag.side-pc { color: #8cc4ff; } .ttrpg .tag.side-ally { color: var(--ok); } .ttrpg .tag.side-foe { color: #ff9a8a; }
.ttrpg .tag.dead-tag, .ttrpg .tag.down-tag { color: var(--warn); font-weight: 700; }
.ttrpg .c-hp { display: flex; flex-wrap: wrap; gap: 0.3em 0.8em; align-items: center; margin-top: 0.3em; }
.ttrpg .hp-num strong { font-size: 1.2em; }
.ttrpg .hp-num .temp { color: #8cc4ff; font-weight: 700; }
.ttrpg .hp-bar { display: inline-block; inline-size: 8em; block-size: 0.6em; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.ttrpg .hp-bar span { display: block; block-size: 100%; background: var(--ok); }
.ttrpg .hp-bar[data-state="hurt"] span { background: var(--warn); }
.ttrpg .hp-bar[data-state="down"] span { background: #c0392b; }
.ttrpg .c-note { margin: 0.25em 0 0; }
.ttrpg .c-act { display: flex; flex-wrap: wrap; gap: 0.4em; align-items: center; justify-content: flex-end; max-inline-size: 22em; }
.ttrpg .c-act .amt { inline-size: 4.5em; }
.ttrpg .c-act button { padding-inline: 0.7em; }
.ttrpg .c-edit { display: flex; flex-wrap: wrap; gap: 0.5em 1em; align-content: start; }
.ttrpg .c-edit label { display: grid; gap: 0.2em; font-weight: 700; font-size: 0.9em; }
.ttrpg .c-edit label.wide { flex-basis: 100%; }
.ttrpg .c-edit input[type="number"] { inline-size: 5em; }
.ttrpg .combat input[type="text"] { font: inherit; inline-size: 100%; min-block-size: 44px; padding: 0.25em 0.5em; border: 2px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); }

.ttrpg details.add > summary h2 { margin: 0; font-size: 1.2em; }
.ttrpg .add-form { display: flex; flex-wrap: wrap; gap: 0.75em 1.25em; align-items: end; margin-top: 0.75em; }
.ttrpg .add-form .field { display: grid; gap: 0.25em; }
.ttrpg .add-form .field.grow { flex: 1 1 12em; }
.ttrpg .add-form .wide { flex-basis: 100%; margin: 0; }

@media (max-width: 700px) {
  .ttrpg li.combatant { grid-template-columns: 4.5em 1fr; }
  .ttrpg .c-act { grid-column: 1 / -1; justify-content: flex-start; max-inline-size: none; }
}
@media print {
  .ttrpg .turn-bar { position: static; }
  .ttrpg .c-act, .ttrpg details.add, .ttrpg .fight-tools, .ttrpg .turn-bar .actions { display: none !important; }
}

/* My monsters (16 Nov 2026) */
.ttrpg .add-form .add-block { display: grid; gap: 0.35em; }
.ttrpg .add-form textarea { font: inherit; font-size: 0.9em; inline-size: 100%; padding: 0.4em 0.5em; border: 2px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); }
.ttrpg details.mine > summary h2 { margin: 0; font-size: 1.2em; }
.ttrpg .mine-list li { display: flex; flex-wrap: wrap; gap: 0.3em 0.8em; align-items: center; }
.ttrpg .mine-list .actions { gap: 0.4em; }
.ttrpg .mine-list button { min-block-size: 40px; padding: 0.2em 0.8em; }

/* Stat block and dice (16 Nov 2026) */
.ttrpg .combat-play { display: grid; gap: 0 1em; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
.ttrpg .combat-play > .card { margin-block: 0.75em; }
.ttrpg .combat-play > .sheet[hidden] + .dice { grid-column: 1 / -1; }
@media (max-width: 900px) { .ttrpg .combat-play { grid-template-columns: 1fr; } }
.ttrpg .sheet h2, .ttrpg .dice h2 { margin: 0 0 0.4em; font-size: 1.25em; }
.ttrpg .roll-mode { display: flex; flex-wrap: wrap; gap: 0.25em 1em; align-items: center; }
.ttrpg .roll-mode label { display: inline-flex; gap: 0.35em; align-items: center; min-block-size: 40px; }
.ttrpg .sheet-body { font-size: 0.92em; line-height: 1.45; }
.ttrpg .sheet-body p { margin: 0.3em 0; }
.ttrpg .sheet-body p.head { margin: 0.15em 0; color: var(--muted); }
.ttrpg .sheet-body h4 { margin: 0.8em 0 0.2em; border-bottom: 1px solid var(--line); color: var(--accent); }
.ttrpg button.roll { min-block-size: 0; min-inline-size: 0; padding: 0.05em 0.4em; margin: 0.1em 0.05em; font-size: 1em; font-weight: 700;
  border: 2px solid var(--accent-bg); border-radius: 6px; background: rgba(140, 68, 173, 0.18); color: var(--text); cursor: pointer; }
.ttrpg button.roll:hover { background: var(--accent-bg); }
.ttrpg button.roll.r-dmg { border-color: #c0392b; background: rgba(192, 57, 43, 0.2); }
.ttrpg table.abil { border-collapse: collapse; margin: 0.5em 0; inline-size: 100%; text-align: center; }
.ttrpg table.abil th, .ttrpg table.abil td { padding: 0.15em 0.2em; border-bottom: 1px solid var(--line); }
.ttrpg table.abil th[scope="row"] { text-align: left; color: var(--muted); font-weight: 600; }
.ttrpg .dice-form { display: flex; flex-wrap: wrap; gap: 0.5em 0.75em; align-items: center; margin-top: 0.75em; }
.ttrpg .dice-form label[for="dice-expr"] { font-weight: 700; }
.ttrpg .dice-form #dice-expr { inline-size: 8em; }
.ttrpg .dice #dice-quick button { padding-inline: 0.7em; }
.ttrpg ol.log { list-style: none; padding: 0; margin: 0.25em 0; max-block-size: 26em; overflow-y: auto; }
.ttrpg ol.log li { display: flex; flex-wrap: wrap; gap: 0.2em 0.6em; align-items: baseline; padding: 0.4em 0; border-top: 1px solid var(--line); }
.ttrpg .log-total { font-size: 1.5em; font-weight: 800; min-inline-size: 2.2em; text-align: center; }
.ttrpg ol.log li.nat20 .log-total { color: var(--ok); }
.ttrpg ol.log li.nat1 .log-total { color: #ff9a8a; }
.ttrpg .log-note { display: block; font-weight: 700; color: var(--warn); }
.ttrpg ol.log .meta { display: block; font-size: 0.85em; }
.ttrpg .apply { display: flex; gap: 0.4em; flex-wrap: wrap; flex-basis: 100%; padding-inline-start: 2.8em; }
.ttrpg .apply button { min-block-size: 40px; padding: 0.2em 0.8em; }
.ttrpg button.small { min-block-size: 36px; padding: 0.1em 0.7em; font-size: 0.9em; margin-inline-start: 0.5em; }
.ttrpg button.c-pick { all: unset; cursor: pointer; border-bottom: 2px dotted var(--accent); }
.ttrpg button.c-pick:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.ttrpg button.c-pick[aria-pressed="true"] { border-bottom-style: solid; color: var(--accent); }
@media print { .ttrpg .dice, .ttrpg .roll-mode { display: none !important; } }
.ttrpg .crit-way { margin: 0.25em 0 0.5em; }
.ttrpg .crit-mark { font-weight: 900; letter-spacing: 0.05em; padding: 0 0.4em; border-radius: 6px; background: #1f7a35; color: #fff; }
.ttrpg .crit-mark.miss { background: #9b2c20; }
.ttrpg ol.log li.nat20, .ttrpg ol.log li.crit { background: rgba(31, 122, 53, 0.18); }
.ttrpg .combat-play > * { min-inline-size: 0; }
.ttrpg #crit-way { max-inline-size: 100%; }
.ttrpg .crit-way { display: grid; gap: 0.25em; }
@media (max-width: 700px) { .ttrpg table.abil { table-layout: fixed; font-size: 0.8em; } .ttrpg table.abil th[scope="row"] { inline-size: 3.6em; } .ttrpg table.abil button.roll { padding-inline: 0.1em; margin: 0; } .ttrpg .sheet { padding-inline: 0.6em; } }
.ttrpg #crit-way { inline-size: 100%; }

/* My spells, items and features (17 Nov 2026) */
.ttrpg details.notes > summary h2 { margin: 0; font-size: 1.2em; }
.ttrpg .notes-list li { display: block; }
.ttrpg .notes-list .note-head { display: flex; flex-wrap: wrap; gap: 0.3em 0.8em; align-items: center; }
.ttrpg .notes-list .note-body { margin: 0.4em 0 0.6em; }
.ttrpg .notes-filter { margin-top: 0.8em; }

/* Less scrolling (22 Nov 2026, Mage): the turn bar stays on top, the name in it jumps to that stat block, and the stat block
   has its own hit points and damage box. Jumps land under the bar (--turn-bar-h, set by combat-page.js). */
/* Why it did not stay on the live site before 23 Nov 2026 (Mage: the turn and "3 of 3 monsters" are "at the top of the
   page" while the turns are "much lower"): the Asar template wraps every page in #pageOpen, which the site's stylesheet
   gives overflow: hidden (for its one-page home), and nothing sticks inside a box that hides its overflow. On this page
   only (this file is loaded by the tracker alone) the box lets its content show, clipped sideways as before. The site's
   menu is fixed over the top of the window, so the bar stops just under it (--site-top, set by combat-page.js). */
#pageOpen { overflow: visible; overflow-x: clip; }
.ttrpg .turn-bar { position: sticky; top: var(--site-top, 0px); z-index: 20; grid-template-columns: 1fr auto; align-items: center;
  background-color: var(--bg); background-image: linear-gradient(var(--panel), var(--panel)); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45); }
.ttrpg .turn-bar .hint, .ttrpg .turn-bar .status { grid-column: 1 / -1; margin: 0; }
.ttrpg .turn-bar .hint:empty, .ttrpg .turn-bar .status:empty { display: none; }
.ttrpg .turn-bar #tally { margin: 0.1em 0 0; }
.ttrpg .sheet, .ttrpg li.combatant { scroll-margin-top: calc(var(--site-top, 0px) + var(--turn-bar-h, 0px) + 0.75em); }
/* whose turn it is, said on the row as well as by its frame and arrow */
.ttrpg .tag.now-tag { background: var(--accent); color: var(--accent-text, #fff); border-color: var(--accent); font-weight: 800; }
.ttrpg li.combatant.now { border-width: 3px; }
.ttrpg button.turn-jump { all: unset; display: inline; cursor: pointer; font-weight: 800; color: var(--accent); border-bottom: 3px solid var(--accent); }
.ttrpg button.turn-jump:hover { border-bottom-style: double; }
.ttrpg button.turn-jump:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.ttrpg .sheet-hp { display: flex; flex-wrap: wrap; gap: 0.4em 0.6em; align-items: center; margin: 0 0 0.6em; }
.ttrpg .sheet-hp:empty { display: none; }
.ttrpg .sheet-hp .c-hp { margin: 0; flex-basis: 100%; }
.ttrpg .sheet-hp .amt { inline-size: 4.5em; }
.ttrpg .sheet-hp button.secondary { padding-inline: 0.7em; }
@keyframes ttrpg-flash { from { box-shadow: 0 0 0 6px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }
.ttrpg .flash { animation: ttrpg-flash 1.4s ease-out; }
@media (prefers-reduced-motion: reduce) { .ttrpg .flash { animation: none; outline: 4px solid var(--accent); } }
@media (max-width: 700px) {
  .ttrpg .turn-bar { padding: 0.5em 0.7em; gap: 0.3em 0.6em; }
  .ttrpg .turn-bar h2 { font-size: 1.05em; }
  .ttrpg .turn-bar #whose { font-size: 1.05em; }
  .ttrpg .turn-bar #tally { font-size: 0.85em; }
  .ttrpg .turn-bar .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3em; }
  .ttrpg .turn-bar #next { grid-column: 1 / -1; min-inline-size: 6.5em; font-size: 1.05em; }
  .ttrpg .turn-bar #undo, .ttrpg .turn-bar #end { min-block-size: 36px; padding: 0.1em 0.4em; font-size: 0.8em; }
  .ttrpg .turn-bar #end[hidden] { display: none; }
}
/* Phone width, now that the bar really stays (23 Nov 2026): it must not take a third of the screen. Round, whose turn
   and how many are left share a line or two across the full width; the three buttons sit in one row under them; the
   last message is kept to two lines (it is whole in the Rolls list). */
@media (max-width: 700px) {
  .ttrpg .turn-bar { grid-template-columns: 1fr; padding: 0.4em 0.6em; gap: 0.3em; }
  .ttrpg .turn-bar .turn-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5em; }
  .ttrpg .turn-bar h2, .ttrpg .turn-bar #whose, .ttrpg .turn-bar #tally { margin: 0; }
  .ttrpg .turn-bar h2 { order: 1; font-size: 1em; }
  .ttrpg .turn-bar #tally { order: 2; font-size: 0.85em; }
  .ttrpg .turn-bar #whose { order: 3; flex-basis: 100%; }   /* the round and how many are left on one line, whose turn under them */
  .ttrpg .turn-bar .actions { display: flex; flex-wrap: nowrap; gap: 0.3em; margin: 0; }
  .ttrpg .turn-bar .actions button { white-space: nowrap; min-block-size: 44px; margin: 0; }
  .ttrpg .turn-bar #next { flex: 1 1 auto; min-inline-size: 0; font-size: 1em; padding: 0.1em 0.5em; }
  .ttrpg .turn-bar #undo, .ttrpg .turn-bar #end { flex: 0 0 auto; min-block-size: 44px; padding: 0.1em 0.55em; font-size: 0.85em; }
  .ttrpg .turn-bar .hint, .ttrpg .turn-bar .status { font-size: 0.85em; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .ttrpg .turn-bar .hint:empty, .ttrpg .turn-bar .status:empty { display: none; }
}
@media print { .ttrpg .turn-bar { position: static; box-shadow: none; } .ttrpg .sheet-hp { display: none !important; } }

/* Full stats dropped down under a combatant's row (22 Nov 2026, Mage) */
/* One panel (23 Nov 2026, Mage): the stat block to roll from on the left, the More controls on the right. Players and
   creatures without a stat block get the controls alone. On a narrow screen the short controls come first, then the
   stat block, so neither is a long scroll away. */
.ttrpg li.combatant .c-panel { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(13em, 19em); gap: 0.6em 1.2em;
  align-items: start; border-top: 2px solid var(--line); padding-top: 0.5em; margin-top: 0.2em; }
.ttrpg li.combatant .c-panel.no-stats { grid-template-columns: 1fr; }
.ttrpg li.combatant .c-panel .c-stats { min-inline-size: 0; }
.ttrpg li.combatant .c-panel:not(.no-stats) .c-edit { border-inline-start: 2px solid var(--line); padding-inline-start: 1em; }
@media (max-width: 700px) {
  .ttrpg li.combatant .c-panel { grid-template-columns: 1fr; }
  .ttrpg li.combatant .c-panel .c-edit { order: -1; }
  .ttrpg li.combatant .c-panel:not(.no-stats) .c-edit { border-inline-start: 0; padding-inline-start: 0; border-bottom: 2px solid var(--line); padding-bottom: 0.6em; }
}
.ttrpg .c-caret { color: var(--accent); font-size: 0.9em; }
.ttrpg button.c-pick[aria-expanded="true"] { border-bottom-style: solid; color: var(--accent); }
@media print { .ttrpg li.combatant .c-panel { display: none; } }

/* Encounter history (23 Nov 2026, Mage): the signed-in member's saved encounters, one for each fight */
.ttrpg .files h2 { margin: 0 0 0.3em; font-size: 1.2em; }
.ttrpg .file-now { margin: 0 0 0.4em; }
.ttrpg .file-now .file-label { font-weight: 700; }
.ttrpg .file-state { display: inline-block; font-size: 0.9em; font-weight: 600; }
.ttrpg .file-state[data-state="ok"] { color: var(--ok, #3fae6a); }
.ttrpg .file-state[data-state="warn"] { color: var(--warn, #e0a030); }
.ttrpg .file-rename { display: flex; flex-wrap: wrap; gap: 0.4em 0.6em; align-items: center; }
.ttrpg .file-rename label { font-weight: 700; flex-basis: 100%; }
.ttrpg .file-rename input { flex: 1 1 14em; min-inline-size: 0; }
.ttrpg .file-conflict { border: 2px solid var(--warn, #e0a030); border-radius: var(--radius); padding: 0.5em 0.8em; margin-block: 0.5em; }
.ttrpg #files-more > summary { font-weight: 700; cursor: pointer; }
.ttrpg #files-list h3 { margin: 0.9em 0 0.3em; font-size: 1.05em; }
.ttrpg ul.file-list { display: grid; gap: 0.4em; }
.ttrpg li.file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4em 1em; align-items: center; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 0.45em 0.7em; border-inline-start-width: 8px; }
.ttrpg li.file-row[data-state="going"] { border-inline-start-color: var(--accent); }
.ttrpg li.file-row[data-state="done"] { border-inline-start-color: #3fae6a; }
.ttrpg li.file-row.open { box-shadow: 0 0 0 3px var(--accent-bg); }
.ttrpg li.file-row .meta { margin: 0.15em 0 0; }
.ttrpg li.file-row .actions { justify-content: flex-end; margin: 0; }
.ttrpg .file-ask { font-weight: 700; }
@media (max-width: 700px) {
  .ttrpg li.file-row { grid-template-columns: 1fr; }
  .ttrpg li.file-row .actions { justify-content: flex-start; }
}
@media print { .ttrpg .files { display: none !important; } }

/* Death saving throws (23 Nov 2026): a strip on the row of anyone at 0 hit points who makes them */
.ttrpg li.combatant .c-death { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4em 0.9em; border: 2px solid #c0392b; border-radius: var(--radius);
  padding: 0.4em 0.7em; background: rgba(192, 57, 43, 0.12); }
.ttrpg li.combatant .c-death.stable { border-color: #3fae6a; background: rgba(63, 174, 106, 0.12); }
.ttrpg .c-death .ds-group { display: inline-flex; align-items: center; gap: 0.3em; }
.ttrpg .c-death .ds-word { font-weight: 700; font-size: 0.9em; margin-inline-end: 0.15em; }
.ttrpg .c-death button.ds-pip { all: unset; box-sizing: border-box; inline-size: 2.4em; block-size: 2.4em; min-inline-size: 40px; min-block-size: 40px; border-radius: 50%; border: 3px solid var(--line);
  display: inline-grid; place-items: center; font-weight: 900; cursor: pointer; }
.ttrpg .c-death .ds-ok button.ds-pip { border-color: #3fae6a; }
.ttrpg .c-death .ds-bad button.ds-pip { border-color: #c0392b; }
.ttrpg .c-death .ds-ok button.ds-pip.on { background: #3fae6a; color: #06210f; }
.ttrpg .c-death .ds-bad button.ds-pip.on { background: #c0392b; color: #fff; }
.ttrpg .c-death button.ds-pip:focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; }
.ttrpg .tag.stable-tag { border-color: #3fae6a; color: #3fae6a; }
.ttrpg .ds-due { display: inline-block; font-weight: 800; color: #fff; background: #c0392b; border-radius: 999px; padding: 0 0.6em; font-size: 0.85em; }
.ttrpg .c-edit label.ds-like { display: flex; align-items: center; gap: 0.5em; font-weight: 600; }
@media print { .ttrpg li.combatant .c-death button { display: none; } }

/* The last roll, in view (24 Nov 2026, Mage): a card pinned to the foot of the window, on the left, clear of the site's
   own things at the very bottom (the colour switch, the footer lines). Opaque, like the turn bar. */
.ttrpg .roll-pop { position: fixed; inset-inline-start: 0.75rem; bottom: 4rem; z-index: 25; inline-size: max-content; max-inline-size: min(28em, calc(100vw - 1.5rem));
  display: grid; gap: 0.35em; padding: 0.5em 0.8em 0.55em; border: 3px solid var(--accent); border-radius: var(--radius);
  background-color: var(--bg); background-image: linear-gradient(var(--panel), var(--panel)); color: var(--text); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6); }
.ttrpg .roll-pop[hidden] { display: none; }
/* on the side away from where the roll was pressed (combat-page.js placePop), so it never covers the next button */
.ttrpg .roll-pop.right { inset-inline-start: auto; inset-inline-end: 0.75rem; }
.ttrpg .roll-pop.nat20 { border-color: #3fae6a; }
.ttrpg .roll-pop.nat1 { border-color: #c0392b; }
.ttrpg .roll-pop-main { display: flex; align-items: center; gap: 0.7em; }
.ttrpg .roll-pop-total { font-size: 2.6em; font-weight: 900; line-height: 1; min-inline-size: 1.3em; text-align: center; }
.ttrpg .roll-pop-what { display: grid; gap: 0.1em; min-inline-size: 0; }
.ttrpg .roll-pop-what .meta { font-size: 0.8em; overflow-wrap: anywhere; }
.ttrpg .roll-pop-what .log-note { font-weight: 700; }
.ttrpg .roll-pop-apply { display: flex; flex-wrap: wrap; gap: 0.35em; align-items: center; }
.ttrpg .roll-pop-apply select { flex: 1 1 8em; min-inline-size: 0; min-block-size: 44px; }
.ttrpg .roll-pop-apply button { min-block-size: 44px; margin: 0; }
.ttrpg .roll-pop-main { padding-inline-end: 0.2em; }
.ttrpg .roll-pop-corner { float: none; display: flex; justify-content: flex-end; align-items: center; gap: 0.2em; margin: -0.3em -0.5em -0.3em -0.3em; }
/* the next roll's switches (24 Nov 2026): Normal / Adv / Dis as one strip, Crit beside it, at the left of the top line */
.ttrpg .roll-pop-next { display: inline-flex; align-items: center; gap: 0.2em; margin-inline-end: auto; }
.ttrpg button.roll-pop-sw { all: unset; box-sizing: border-box; min-block-size: 44px; min-inline-size: 44px; padding-inline: 0.55em; display: inline-grid; place-items: center; cursor: pointer;
  font-size: 0.85em; font-weight: 700; border: 2px solid var(--line); border-radius: 8px; color: var(--muted); }
.ttrpg button.roll-pop-sw[aria-pressed="true"] { background: var(--accent-bg, var(--accent)); border-color: var(--accent); color: var(--accent-text, #fff); }
.ttrpg button.roll-pop-crit { margin-inline-start: 0.35em; }
.ttrpg button.roll-pop-crit[aria-pressed="true"] { background: #c0392b; border-color: #c0392b; color: #fff; }
.ttrpg button.roll-pop-sw:focus-visible { outline: 4px solid var(--focus); outline-offset: -4px; }
.ttrpg .roll-pop-hint { margin: 0; font-size: 0.8em; }
.ttrpg .roll-pop.idle { gap: 0.1em; }
.ttrpg button.roll-pop-snd, .ttrpg button.roll-pop-x { all: unset; box-sizing: border-box; min-block-size: 44px; min-inline-size: 44px; display: inline-grid; place-items: center; cursor: pointer; border-radius: 8px; }
.ttrpg button.roll-pop-snd { font-size: 0.75em; font-weight: 700; padding-inline: 0.6em; text-decoration: underline dotted; text-underline-offset: 0.2em; }
.ttrpg button.roll-pop-snd[aria-pressed="false"] { color: var(--muted); }
.ttrpg button.roll-pop-x { font-size: 1.5em; font-weight: 700; }
.ttrpg button.roll-pop-snd:focus-visible, .ttrpg button.roll-pop-x:focus-visible { outline: 4px solid var(--focus); outline-offset: -4px; }
@media (max-width: 700px) {
  /* low and wide on a phone, so the row being run stays clear between the turn bar and this card */
  .ttrpg .roll-pop { inset-inline: 0.5rem; inline-size: auto; max-inline-size: none; font-size: 0.85em; gap: 0.2em; padding-block: 0.3em 0.4em; }
  .ttrpg .roll-pop-total { font-size: 2em; }
  .ttrpg button.roll-pop-sw { padding-inline: 0.3em; }
  .ttrpg button.roll-pop-snd { padding-inline: 0.3em; }
  .ttrpg .roll-pop-hint { display: none; }
  .ttrpg .roll-pop-apply { flex-wrap: nowrap; }
  .ttrpg .roll-pop-apply select { flex: 1 1 auto; }
  .ttrpg .roll-pop-apply button { padding-inline: 0.7em; white-space: nowrap; }
  .ttrpg .roll-pop-what strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .ttrpg .roll-pop-what .log-note { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}
@media print { .ttrpg .roll-pop { display: none !important; } }
.ttrpg .roll-pop-what .crit-mark { justify-self: start; }
