/* At-the-table combat mode (v5, Tom 13 Nov). Live play only, while a fight is on (combat-mode.js adds body.cm-on).
   Jenny's compact-card look: charcoal panes, gold for what is loaded or ready, ivory text. No new palette.
   Locked strip heights: phone portrait 52 px, phone landscape about 48 px, Fold / tablet 55 px, laptop 45 px.
   The mid strip is about 25 px everywhere. */
:root { --cm-bg: var(--c-night-07-b); --cm-pane: var(--c-night-09); --cm-card: var(--c-night-11); --cm-line: var(--c-night-20); --cm-ink: var(--c-ink-88); --cm-meta: var(--c-gold-61);
  --cm-gold: var(--c-gold-69); --cm-gold2: var(--c-gold-55-b); --cm-goldd: var(--c-umber-27); --cm-hp: var(--c-red-38); --cm-hp2: var(--c-red-49);
  --cm-mid: 25px; --cm-strip: 52px; --cm-pad: 6px; --cm-gap: 18px; --cm-pane-w: 46vw; --cm-maph: 54vh; }

/* ---- what goes away while the fight is on: the player view's top bar and switches, the slide-up card, the app's
   tab bar (Home / Settings come back from the tab at the top of the map), the old aiming bar (still clicked by the
   gold button) ---- */
body.cm-on .rpv-top, body.cm-on .rpv-mode, body.cm-on .rpv-mapbtn, body.cm-on .rpv-edge, body.cm-on .rpv-cardbtn,
body.cm-on .u-tabbar, body.cm-on .tabs, body.cm-on .hss, body.cm-on #liveAtkBar, body.cm-on #hearthLinkBar { display: none !important; }
body.cm-on:not(.cm-sheet) .app { visibility: hidden !important; pointer-events: none !important; }
html.cm-root, body.cm-on { overflow: hidden !important; height: 100%; }
body.cm-on { padding-top: 0 !important; background: var(--cm-bg); }

/* ---- the map: a real viewport, edge to edge ---- */
html body.cm-on #hearthRpv .rpv-map { position: fixed !important; z-index: 9000; margin: 0; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: var(--c-night-05); }
html body.cm-on.cm-freeze #hearthRpv .rpv-map::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 3px var(--cm-gold), inset 0 0 24px rgb(from var(--c-gold-69) r g b / 0.35); border-radius: 0; }

/* ---- the pane: mid strip, tabs, the tiny card (scrolls), the play strip (never scrolls) ---- */
.cm-pane { position: fixed; z-index: 9001; display: flex; flex-direction: column; background: var(--cm-pane); color: var(--cm-ink);
  font: 400 15px/1.3 Roboto, "Segoe UI", system-ui, sans-serif; box-sizing: border-box; }
.cm-pane *, .cm-exit * { box-sizing: border-box; }
.cm-mid { flex: none; height: var(--cm-mid); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; font-size: 12.5px; line-height: 1;
  color: var(--cm-ink); background: var(--c-night-07); border-bottom: 1px solid var(--cm-line); white-space: nowrap; overflow: hidden; }
.cm-mid b { color: var(--cm-gold); font-weight: 700; }
.cm-mid .cm-dim { color: var(--cm-meta); }
.cm-dia { width: 7px; height: 7px; background: var(--cm-gold); transform: rotate(45deg); flex: none; }
.cm-done { margin-left: auto; height: 19px; padding: 0 10px; border-radius: 999px; border: 0; background: var(--cm-gold); color: var(--c-night-06-b); font: 700 11px/19px Roboto, "Segoe UI", system-ui, sans-serif; }
.cm-tabs { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 5px 6px 4px; border-bottom: 1px solid var(--cm-line); }
.cm-tabs button { min-height: 36px; border: 0; border-radius: 12px 12px 10px 10px; background: transparent; color: var(--cm-meta); font: 500 14px/1 Roboto, "Segoe UI", system-ui, sans-serif; }
.cm-tabs button.on { background: var(--c-umber-13-b); color: var(--cm-gold); box-shadow: inset 0 -2px 0 var(--cm-gold); font-weight: 600; }
.cm-card { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 10px; scroll-padding-top: 4px;
  background: repeating-linear-gradient(135deg, rgb(from var(--c-white) r g b / 0.012) 0 6px, transparent 6px 12px); }
.cm-g { margin: 6px 0 10px; }
.cm-gh { display: flex; align-items: baseline; gap: 8px; margin: 6px 4px 6px; }
.cm-gl { color: var(--cm-gold); font: 700 12px/1 Roboto, "Segoe UI", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; font-family: inherit; }
.cm-gm { color: var(--cm-meta); font-size: 12px; }
.cm-gb { background: var(--cm-card); border: 1px solid var(--cm-line); border-radius: 14px; padding: 4px; }
.cm-slots { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 7px 8px 8px; }
.cm-sl { display: inline-flex; align-items: center; gap: 5px; }
.cm-sl em { font-style: normal; color: var(--cm-meta); font-size: 12px; margin-right: 2px; }
.cm-sl i { width: 10px; height: 10px; transform: rotate(45deg); border: 1.5px solid var(--cm-gold); border-radius: 1px; }
.cm-sl i.full { background: var(--cm-gold); }
.cm-row { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 5px 6px 5px 8px; border-radius: 10px; border-bottom: 1px solid rgb(from var(--c-night-20) r g b / 0.6); }
.cm-row:last-of-type { border-bottom: 0; }
.cm-row:focus-visible { outline: 2px solid var(--cm-gold); outline-offset: 1px; }
.cm-row.on { background: linear-gradient(90deg, var(--c-umber-12), var(--c-umber-10-c)); box-shadow: inset 3px 0 0 var(--cm-gold); }
.cm-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: transparent; }
.cm-dot-pale { box-shadow: 0 0 0 1px var(--cm-line); }
.cm-rm { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cm-rm b { font-weight: 600; font-size: 15px; color: var(--cm-ink); overflow-wrap: anywhere; }
.cm-rm > span { font-size: 12px; color: var(--cm-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-loaded { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: var(--cm-gold); color: var(--c-umber-07); font: 700 9.5px/1.4 Roboto, "Segoe UI", system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; font-style: normal; vertical-align: 2px; }
.cm-pill { flex: none; min-width: 52px; min-height: 40px; padding: 0 10px; border-radius: 11px; border: 1px solid var(--cm-goldd); background: var(--c-night-09-b); color: var(--cm-gold); font: 600 13.5px/1 Roboto, "Segoe UI", system-ui, sans-serif; }
.cm-pill.on { background: linear-gradient(var(--c-gold-75-c), var(--c-gold-60-e)); color: var(--c-umber-07); border-color: var(--c-gold-79); }
.cm-any { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 6px 6px; }
.cm-chip { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--c-night-32-b); background: transparent; color: var(--cm-ink); font: 500 12.5px/1 Roboto, "Segoe UI", system-ui, sans-serif; }
.cm-none { padding: 12px 10px; color: var(--cm-meta); font-size: 13px; }

/* the play strip: HP · Card · gold Cast / Roll / Use · End turn */
.cm-strip { flex: none; height: var(--cm-strip); display: grid; grid-template-columns: 0.95fr 0.62fr 2fr 1.12fr; gap: 5px; padding: var(--cm-pad);
  margin: 0 6px var(--cm-gap); border: 1px solid var(--c-umber-18); border-radius: 12px; background: var(--c-night-06); }
.cm-s { min-width: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit; padding: 0 4px; }
.cm-s svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.cm-hp { flex-direction: column; gap: 1px; border: 1px solid var(--c-red-58-b); background: linear-gradient(var(--cm-hp2), var(--cm-hp)); color: var(--c-red-96); }
.cm-hp small { font: 600 9px/1 Georgia, serif; letter-spacing: .06em; opacity: .9; }
.cm-hp b { font: 700 15px/1 Georgia, serif; white-space: nowrap; }
.cm-cardb { flex-direction: column; gap: 2px; border: 1px solid var(--c-umber-25-b); background: var(--c-night-07-d); color: var(--cm-ink); }
.cm-cardb small { font-size: 10.5px; }
.cm-go { border: 1px solid var(--c-umber-30-b); background: linear-gradient(var(--c-gold-34), var(--c-umber-25-b)); color: var(--c-gold-63-i); font: 700 17px/1 Roboto, "Segoe UI", system-ui, sans-serif; }
.cm-go.lit { background: linear-gradient(var(--c-gold-76-b), var(--c-gold-57)); border-color: var(--c-gold-81-c); color: var(--c-umber-07); box-shadow: 0 0 14px rgb(from var(--c-gold-69) r g b / 0.45); }
.cm-go[aria-disabled="true"] { cursor: default; }
.cm-end { border: 1.5px solid var(--cm-gold2); background: linear-gradient(var(--c-umber-23), var(--c-umber-17-b)); color: var(--c-paper-84-b); font: 700 14px/1 Roboto, "Segoe UI", system-ui, sans-serif; white-space: nowrap; }
.cm-end[aria-disabled="true"] { opacity: .45; }

/* ---- the exit tab at the top of the map; Home and Settings slide down over the map only ---- */
.cm-exit { position: absolute; left: 0; right: 0; top: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.cm-tabbtn { pointer-events: auto; width: 46px; height: 18px; margin-top: 5px; padding: 0; border-radius: 9px; border: 1px solid var(--cm-gold2); background: rgb(from var(--c-night-06) r g b / 0.82); color: var(--cm-gold);
  display: flex; align-items: center; justify-content: center; }
.cm-tabbtn::before { content: ''; position: absolute; width: 64px; height: 44px; margin-top: -2px; } /* a 44 px finger target around the small tab */
.cm-tabbtn svg { width: 16px; height: 9px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
.cm-tabbtn.open svg { transform: rotate(180deg); }
.cm-exit-bar { pointer-events: auto; display: flex; gap: 8px; width: 100%; padding: 8px 10px; background: rgb(from var(--c-night-07) r g b / 0.94); border-bottom: 1px solid var(--c-umber-18); }
.cm-exit-bar[hidden] { display: none; }
.cm-exit-bar button { min-height: 44px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1 Roboto, system-ui, sans-serif; }
.cm-exit-bar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cm-home { border: 1px solid var(--c-gold-79); background: linear-gradient(var(--c-gold-76-b), var(--c-gold-57)); color: var(--c-umber-07); }
.cm-set { border: 1px solid var(--cm-gold2); background: var(--c-night-07); color: var(--cm-ink); }
.cm-fit { position: absolute; right: 10px; bottom: 10px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--cm-gold2); background: rgb(from var(--c-night-06) r g b / 0.82); color: var(--cm-gold);
  display: flex; align-items: center; justify-content: center; padding: 0; }
.cm-fit svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- layouts ---- */
/* phone upright and the Fold's cover: map on top, the pane below */
body.cm-on.cm-port #hearthRpv .rpv-map { left: 0 !important; top: 0 !important; width: 100vw !important; height: var(--cm-maph) !important; bottom: auto !important; }
body.cm-on.cm-port .cm-pane { left: 0; right: 0; top: var(--cm-maph); bottom: 0; }
/* phone on its side: side by side, map left, card right (never a ribbon of map) */
body.cm-on.cm-land { --cm-strip: 48px; --cm-mid: 23px; --cm-gap: 8px; }
body.cm-on.cm-land #hearthRpv .rpv-map { left: 0 !important; top: 0 !important; bottom: 0 !important; width: 55vw !important; height: auto !important; }
body.cm-on.cm-land .cm-pane { left: 55vw; right: 0; top: 0; bottom: 0; border-left: 1px solid var(--c-umber-18); }
/* the Fold open and tablets on their side: the pane where the GM's list sits in GM mode */
body.cm-on.cm-fold { --cm-strip: 55px; --cm-gap: 12px; --cm-pw: clamp(340px, 36vw, 440px); }
body.cm-on.cm-fold #hearthRpv .rpv-map { left: var(--cm-pw) !important; top: 0 !important; bottom: 0 !important; right: 0 !important; width: auto !important; height: auto !important; }
body.cm-on.cm-fold .cm-pane { left: 0; top: 0; bottom: 0; width: var(--cm-pw); border-right: 1px solid var(--c-umber-18); }
/* laptop / Chromebook: mouse-sized */
body.cm-on.cm-wide { --cm-strip: 45px; --cm-mid: 24px; --cm-gap: 10px; --cm-pw: clamp(320px, 27vw, 400px); }
body.cm-on.cm-wide #hearthRpv .rpv-map { left: var(--cm-pw) !important; top: 0 !important; bottom: 0 !important; right: 0 !important; width: auto !important; height: auto !important; }
body.cm-on.cm-wide .cm-pane { left: 0; top: 0; bottom: 0; width: var(--cm-pw); border-right: 1px solid var(--c-umber-18); font-size: 14px; }
body.cm-on.cm-wide .cm-tabs button { min-height: 30px; font-size: 13px; }
body.cm-on.cm-wide .cm-row { min-height: 42px; }
body.cm-on.cm-wide .cm-pill { min-height: 32px; }
body.cm-on.cm-wide .cm-exit-bar button { min-height: 34px; font-size: 14px; }
body.cm-on.cm-wide .cm-hp b { font-size: 13px; }
body.cm-on.cm-wide .cm-go { font-size: 15px; }
body.cm-on.cm-wide .cm-end { font-size: 13px; }

/* pop-ups over this layout sit over the map, never over the strips */
body.cm-on.cm-port .live-pop { max-height: calc(var(--cm-maph) - 20px) !important; }

/* ---- Card: the full locked sheet over everything, with one way back ---- */
body.cm-sheet #hearthRpv, body.cm-sheet .cm-pane { display: none !important; }
body.cm-sheet .u-tabbar, body.cm-sheet #hearthLinkBar { display: none !important; }
html.cm-root:has(body.cm-sheet), body.cm-sheet { overflow: auto !important; height: auto; }
/* (Tom 13 Nov) Back to the fight / Map: a bar of their own along the bottom; the page keeps that much room under its
   content (cm-barpad), so they never sit over a row or a button */
.cm-bar { position: fixed; z-index: 9100; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 8px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--c-night-05); border-top: 1px solid rgb(from var(--c-gold-69) r g b / 0.28); box-shadow: 0 -6px 18px rgb(from var(--c-black) r g b / 0.45); }
body.cm-barpad { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)) !important; }
/* the live card after a fight is a fixed sheet that scrolls inside itself: it ends where the bar begins */
html body.cm-barpad.rpv-on .app { bottom: calc(66px + env(safe-area-inset-bottom, 0px)) !important; max-height: calc(100% - 136px - env(safe-area-inset-bottom, 0px)) !important; }
.cm-sheetback, .cm-mapbtn { min-height: 44px; min-width: 200px; padding: 0 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px/1 Roboto, system-ui, sans-serif; }
.cm-sheetback { border: 1px solid var(--c-gold-79); background: linear-gradient(var(--c-gold-76-b), var(--c-gold-57)); color: var(--c-umber-07); }
.cm-mapbtn { border: 1px solid var(--cm-gold2, var(--c-gold-57-c)); background: var(--c-night-09); color: var(--cm-ink, var(--c-ink-93-b)); }
.cm-sheetback svg, .cm-mapbtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* (Tom 13 Nov) rolling: Rolled is dim and dead; Adv / Dis sit on the loaded row; the dice are small, over the card half */
.cm-go.rolled { background: var(--c-night-12-c); border-color: var(--c-umber-22-b); color: var(--c-gold-44-b); box-shadow: none; }
.cm-adv { display: inline-flex; gap: 6px; margin-top: 6px; }
.cm-advb { min-height: 30px; min-width: 52px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--c-umber-26-c); background: var(--c-night-09-e); color: var(--c-gold-67-b); font: 600 13px/1 Roboto, system-ui, sans-serif; }
.cm-pane .cm-advb.on { background: var(--c-gold-69) !important; border-color: var(--c-gold-79) !important; color: var(--c-umber-07) !important; }
/* own dice: the card already set Adv / Dis and the gold button did the tapping; only the boxes and Use my dice stay */
body.cm-on #liveActPop.cm-own .lap-adv, body.cm-on #liveActPop.cm-own [data-lap="roll"], body.cm-on #liveActPop.cm-own [data-lap="dmg"], body.cm-on #liveActPop.cm-own [data-lap="ownt"] { display: none !important; }
#liveActPop.cm-auto { display: none !important; }
body.cm-on .hd-ov.compact { top: auto; left: auto; right: 14px; bottom: calc(var(--cm-strip, 52px) + var(--cm-gap, 18px) + 22px); }
body.cm-on.cm-fold .hd-ov.compact, body.cm-on.cm-wide .hd-ov.compact { right: auto; left: calc(var(--cm-pw, 380px) - 164px); }
body.cm-on.cm-fold .hd-toast, body.cm-on.cm-wide .hd-toast { left: calc(var(--cm-pw, 380px) / 2) !important; }
body.cm-on.cm-land .hd-toast { left: calc(55vw + 22.5vw) !important; }
body.cm-on .hd-ov.compact .hd-bd, body.cm-on .hd-ov.compact .hd-lbl, body.cm-on .hd-ov.compact .hd-proj { display: none !important; }
body.cm-on #liveActPop.cm-own { position: fixed; right: auto; transform: none; overflow: auto; box-sizing: border-box; max-height: var(--cm-ownmax, 40vh) !important; }
@media (prefers-reduced-motion: reduce) { .cm-tabbtn svg { transition: none; } }
/* (19 Nov) the app-wide "pressed button" look ([aria-pressed="true"], !important) painted over the gold Adv / Dis chip,
   leaving dark text on a dark chip. The chip's own look wins. */
html:root[data-palette][data-palette][data-palette] body .cm-pane .cm-advb.on[aria-pressed] { background: var(--c-gold-69) !important; border-color: var(--c-gold-79) !important; color: var(--c-umber-07) !important; box-shadow: none !important; }

/* ================= hybrid (Tom 13 Nov): the GM v2d frame with the v5 card (body.cm-v2d, set by combat-mode.js) =================
   One rule with GM mode (ui/side-panel.js): stacked = the map on top at the v2d height, the card underneath; wide = the map
   fills the rest, the card in the side panel (a third on the left by default). --cm-pw and --cm-maph come from that rule.
   Nothing on the map but the exit tab (and Home / Settings while it has them out), the player's own area and the tokens. */
html body.cm-on.cm-v2d.cm-v2d-stack #hearthRpv .rpv-map { left: 0 !important; top: 0 !important; right: 0 !important; bottom: auto !important; width: 100vw !important; height: var(--cm-maph) !important; }
html body.cm-on.cm-v2d.cm-v2d-stack .cm-pane { left: 0; right: 0; top: var(--cm-maph); bottom: 0; width: auto; border-left: 0; border-right: 0; }
html body.cm-on.cm-v2d.cm-v2d-wide #hearthRpv .rpv-map { top: 0 !important; bottom: 0 !important; height: auto !important; width: auto !important; }
html body.cm-on.cm-v2d.cm-v2d-wide.cm-v2d-left #hearthRpv .rpv-map { left: var(--cm-pw) !important; right: 0 !important; }
html body.cm-on.cm-v2d.cm-v2d-wide.cm-v2d-right #hearthRpv .rpv-map { left: 0 !important; right: var(--cm-pw) !important; }
html body.cm-on.cm-v2d.cm-v2d-wide .cm-pane { top: 0; bottom: 0; width: var(--cm-pw); }
html body.cm-on.cm-v2d.cm-v2d-wide.cm-v2d-left .cm-pane { left: 0; right: auto; border-right: 1px solid var(--c-umber-18); border-left: 0; }
html body.cm-on.cm-v2d.cm-v2d-wide.cm-v2d-right .cm-pane { right: 0; left: auto; border-left: 1px solid var(--c-umber-18); border-right: 0; }
/* the small dice and the roll toast sit over the card half, whichever side it is on */
body.cm-on.cm-v2d.cm-v2d-wide.cm-v2d-left .hd-ov.compact { left: calc(var(--cm-pw) - 164px) !important; right: auto !important; }
body.cm-on.cm-v2d.cm-v2d-wide.cm-v2d-right .hd-ov.compact { right: 14px !important; left: auto !important; }
body.cm-on.cm-v2d.cm-v2d-wide.cm-v2d-left .hd-toast { left: calc(var(--cm-pw) / 2) !important; }
body.cm-on.cm-v2d.cm-v2d-wide.cm-v2d-right .hd-toast { left: calc(100vw - var(--cm-pw) / 2) !important; }
body.cm-on.cm-v2d.cm-v2d-stack .live-pop { max-height: calc(var(--cm-maph) - 20px) !important; }
/* Whole map: a button at the end of the tabs (it was a round button on the map) */
.cm-pane .cm-tabs:has(.cm-fitb) { grid-template-columns: repeat(4, minmax(0, 1fr)) 44px; }
.cm-fitb { min-width: 44px; min-height: 36px; padding: 0; border-radius: 10px; border: 1px solid var(--cm-gold2); background: var(--c-night-07); color: var(--cm-gold); display: flex; align-items: center; justify-content: center; }
.cm-fitb svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* the shared exit tab sits above the map frame */
#cmTab.cm-hx { z-index: 6; }
/* a quarter-width panel (under 300 dp): condense, never widen; every tap 44 dp, text at least 12 */
body.cm-on.cm-v2d-narrow .cm-tabs { display: flex; overflow-x: auto; scrollbar-width: none; gap: 4px; }
body.cm-on.cm-v2d-narrow .cm-tabs::-webkit-scrollbar { display: none; }
body.cm-on.cm-v2d-narrow .cm-tabs button { flex: none; min-height: 44px; min-width: 64px; padding: 0 8px; font-size: 13px; }
body.cm-on.cm-v2d-narrow .cm-fitb { min-width: 44px; }
body.cm-on.cm-v2d-narrow .cm-strip { grid-template-columns: 52px 44px minmax(44px, 1fr) auto; gap: 4px; padding: 4px; margin: 0 4px var(--cm-gap); }
body.cm-on.cm-v2d-narrow .cm-s { padding: 0 3px; }
body.cm-on.cm-v2d-narrow .cm-go { font-size: 14px; }
body.cm-on.cm-v2d-narrow .cm-end { font-size: 13px; padding: 0 6px; }
body.cm-on.cm-v2d-narrow .cm-hp b { font-size: 13px; }
body.cm-on.cm-v2d-narrow .cm-pill { min-height: 44px; min-width: 48px; }
body.cm-on.cm-v2d-narrow .cm-advb { min-height: 44px; }
body.cm-on.cm-v2d-narrow .cm-chip { min-height: 44px; }
body.cm-on.cm-v2d-narrow .cm-rm > span { white-space: normal; }
body.cm-on.cm-v2d-narrow .cm-mid { font-size: 12px; }
body.cm-on.cm-v2d-narrow .cm-cardb small { font-size: 12px; }
/* (hybrid) Undo move: at the top of the card (the map frame's own button sat on the map) */
.cm-undo { padding: 6px 2px 2px; }
.cm-undob { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--cm-gold2); background: var(--c-night-09); color: var(--cm-ink); font: 600 14px/1 Roboto, system-ui, sans-serif; }
/* (Tom 13 Nov 23:17) the next section no longer peeks out behind the play strip: the card ends in a short fade above it */
body.cm-on.cm-v2d .cm-card { padding-bottom: 18px; -webkit-mask-image: linear-gradient(to bottom, var(--c-black) calc(100% - 22px), transparent); mask-image: linear-gradient(to bottom, var(--c-black) calc(100% - 22px), transparent); }
body.cm-on.cm-v2d .cm-strip { margin-top: 2px; }
/* a shut Fold 4 (344 dp): "Open your Fold to play", or Continue anyway (the phone layout) */
.cm-unfold { position: fixed; inset: 0; z-index: 9100; background: rgb(from var(--c-night-04) r g b / 0.86); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cm-unfold .cm-ucard { max-width: 280px; width: 100%; background: var(--c-night-09); border: 1px solid var(--c-umber-21); border-radius: 18px; padding: 22px 18px 16px; text-align: center; color: var(--c-ink-88); box-shadow: 0 18px 40px rgb(from var(--c-black) r g b / 0.6); font: 14px/1.35 Roboto, system-ui, sans-serif; }
.cm-unfold h2 { font: 600 20px/1.2 "Cormorant Garamond", Georgia, serif; margin: 10px 0 6px; color: var(--c-gold-76-b); }
.cm-unfold p { margin: 0 0 4px; }
.cm-unfold small { display: block; color: var(--c-gold-61); font-size: 12px; margin-bottom: 12px; }
.cm-unfold .cm-anyway { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 0; background: none; color: var(--c-gold-65); font: 600 13px/1 Roboto, sans-serif; text-decoration: underline; }
/* the map frame behind the whole map: dark, the frame draws the blurred map itself */
html body.cm-on.cm-v2d #hearthRpv .rpv-map { background: var(--c-night-05); }

/* ================= Fold 4 open L (Tom 14 Nov, player v5c; brief hearth-fold-L-brief-1114) =================
   The map top-left (whole map, fitted), a 200 dp column on its right (scrolls on its own, Attack pinned), a 252 dp band
   along the bottom: one scroll of cards on the left, the fixed part on the right. Nothing over the map. */
html body.cm-on.cm-v2d.cm-v2d-L #hearthRpv .rpv-map { left: 0 !important; top: 0 !important; right: auto !important; bottom: auto !important; width: var(--cm-mapw) !important; height: var(--cm-maph) !important; }
html body.cm-on .cm-pane.cmL { inset: 0 !important; width: auto !important; border: 0 !important; background: transparent; pointer-events: none; display: block; font-size: 14px; }
.cm-pane.cmL > * { pointer-events: auto; }
.cmL-side { position: absolute; top: 0; right: 0; width: 200px; height: var(--cm-maph); display: flex; flex-direction: column; background: var(--cm-pane); border-left: 1px solid var(--c-night-18); }
.cmL-top { flex: none; display: grid; grid-template-columns: 1fr 56px; gap: 6px; padding: 8px 8px 6px; }
.cmL-hp { position: relative; min-height: 58px; border-radius: 12px; border: 1px solid var(--c-red-58-b); background: linear-gradient(var(--cm-hp2), var(--cm-hp)); color: var(--c-red-96); text-align: left; padding: 4px 8px; display: flex; flex-direction: column; justify-content: center; }
.cmL-hp.on { box-shadow: 0 0 0 2px var(--cm-gold); }
.cmL-hp small { font: 700 10px/1 Georgia, serif; letter-spacing: .06em; opacity: .9; }
.cmL-hp b { font: 700 21px/1.1 Georgia, serif; }
.cmL-hp i { font: 400 10px/1 Roboto, sans-serif; opacity: .85; align-self: flex-end; }
.cmL-hp em { position: absolute; top: 4px; right: 6px; padding: 1px 6px; border-radius: 999px; background: var(--c-blue-29); color: var(--c-blue-91); font: 700 11px/1.3 Roboto, sans-serif; font-style: normal; }
.cmL-ac { min-height: 58px; border-radius: 12px; border: 1px solid var(--c-umber-19); background: var(--cm-card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cmL-ac b { font: 700 20px/1 Roboto, sans-serif; } .cmL-ac small { color: var(--cm-meta); font-size: 11px; }
.cmL-sbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px; }
.cmL-go { flex: none; padding: 6px 8px 8px; border-top: 1px solid var(--c-night-15-c); }
.cmL-go .cmL-gob { width: 100%; min-height: 52px; border-radius: 14px; font-size: 17px; display: flex; flex-direction: row; gap: 8px; }
.cmL-go .cmL-gob small { font-size: 11px; opacity: .8; }
.cmL-sh { display: flex; align-items: center; gap: 6px; margin: 8px 2px 6px; color: var(--cm-gold); font: 700 11px/1 Roboto, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.cmL-sh small { color: var(--cm-meta); letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 11px; }
.cmL-x { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--c-umber-19); background: var(--c-night-07); color: var(--cm-ink); font-size: 15px; }
.cmL-abs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.cmL-ab { min-height: 46px; border-radius: 10px; border: 1px solid var(--c-night-22); background: var(--cm-card); color: var(--cm-ink); display: flex; align-items: center; justify-content: space-between; padding: 2px 8px; text-align: left; }
.cmL-ab span { display: flex; flex-direction: column; } .cmL-ab b { color: var(--cm-gold); font: 700 12px/1.1 Roboto, sans-serif; letter-spacing: .06em; } .cmL-ab small { color: var(--cm-meta); font-size: 11px; }
.cmL-ab em { font: 700 17px/1 Roboto, sans-serif; font-style: normal; }
.cmL-skillsb { width: 100%; min-height: 44px; margin-top: 6px; border-radius: 10px; border: 1px solid var(--c-umber-19); background: var(--c-night-07); color: var(--cm-gold); }
.cmL-skillsb small { color: var(--cm-meta); }
.cmL-sks { display: flex; flex-direction: column; gap: 4px; }
.cmL-sk { min-height: 44px; border-radius: 10px; border: 1px solid var(--c-night-22); background: var(--cm-card); color: var(--cm-ink); display: flex; align-items: center; justify-content: space-between; padding: 2px 10px; text-align: left; }
.cmL-sk span { display: flex; flex-direction: column; } .cmL-sk b { font: 600 13px/1.15 Roboto, sans-serif; } .cmL-sk small { color: var(--cm-meta); font-size: 11px; } .cmL-sk em { font: 700 15px/1 Roboto, sans-serif; font-style: normal; }
.cmL-hpedit { margin-top: 2px; padding: 0 8px 8px; border-radius: 12px; border: 1px solid var(--c-red-32-b); background: var(--c-night-09-f); }
.cmL-hpedit .cmL-sh { margin: 6px 0; }
.cmL-amt { width: 100%; height: 50px; border-radius: 10px; border: 2px solid var(--cm-gold); background: var(--c-night-05); color: var(--cm-ink); font: 700 24px/1 Roboto, sans-serif; text-align: center; }
.cmL-hpbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.cmL-hpbtns button { min-height: 52px; border-radius: 12px; border: 0; color: var(--c-white); font: 700 20px/1 Roboto, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cmL-hpbtns span { font-size: 12px; margin-top: 2px; }
.cmL-heal { background: linear-gradient(var(--c-green-43), var(--c-green-33)); } .cmL-dmg { background: linear-gradient(var(--c-red-49), var(--c-red-38)); }
.cmL-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px; }
.cmL-quick button { min-height: 44px; border-radius: 10px; border: 1px solid var(--c-umber-19); background: var(--c-night-07); color: var(--cm-ink); font: 600 14px/1 Roboto, sans-serif; padding: 0; }
.cmL-temp { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; color: var(--cm-meta); font-size: 12px; }
.cmL-temp button { min-height: 44px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--c-blue-48); background: var(--c-blue-11); color: var(--c-blue-91); font: 600 13px/1 Roboto, sans-serif; }
.cmL-info { margin-top: 8px; padding: 0 8px 8px; border-radius: 12px; border: 1px solid var(--c-umber-19); background: var(--c-night-09); }
.cmL-info.smite { border-color: var(--cm-gold2); background: linear-gradient(var(--c-night-10-b), var(--c-night-09)); }
.cmL-mid { height: auto; min-height: 22px; margin: 0 -8px 2px; padding: 4px 8px; white-space: normal; line-height: 1.25; border-radius: 12px 12px 0 0; font-size: 12px; justify-content: flex-start; text-align: left; }
.cmL-mid .cm-done { min-height: 26px; }
.cmL-undo { width: 100%; margin: 6px 0 0; }
.cmL-fxs { display: flex; flex-wrap: wrap; gap: 4px; }
.cmL-fx { padding: 4px 8px; border-radius: 999px; border: 1px solid var(--c-blue-26-b); background: var(--c-night-13-c); font-size: 12px; }
.cmL-fx.conc i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cm-gold); margin-right: 5px; }
.cmL-fx.temp { border-color: var(--c-blue-48); color: var(--c-blue-91); }
.cmL-seln { display: flex; align-items: center; gap: 6px; font: 600 15px/1.2 Roboto, sans-serif; }
.cmL-dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; margin: 6px 0 4px; font-size: 12.5px; }
.cmL-dl dt { color: var(--cm-meta); } .cmL-dl dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.cmL-info .cm-adv { display: flex; gap: 6px; margin-top: 6px; } .cmL-info .cm-advb { flex: 1; }
.cmL-none { color: var(--cm-meta); font-size: 12.5px; margin: 4px 2px; }
.cmL-chk { display: grid; grid-template-columns: 1fr auto; align-items: center; } .cmL-chk b { font-size: 14px; } .cmL-chk em { font: 700 24px/1 Roboto, sans-serif; font-style: normal; color: var(--cm-gold); } .cmL-chk small { color: var(--cm-meta); font-size: 12px; }
.cmL-smh { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 2px; } .cmL-smh b { font: 700 17px/1.1 Roboto, sans-serif; color: var(--cm-gold); } .cmL-smh small { color: var(--cm-meta); font-size: 12px; }
.cmL-smt { margin: 0 0 6px; color: var(--cm-meta); font-size: 12px; }
.cmL-slvs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.cmL-slv { min-height: 44px; padding: 0; border-radius: 8px; border: 1px solid var(--c-umber-19); background: var(--c-night-07); color: var(--cm-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cmL-slv b { font-size: 12px; } .cmL-slv small { font-size: 10px; color: var(--cm-meta); }
.cmL-slv.on { background: linear-gradient(var(--c-gold-76-b), var(--c-gold-52-b)); color: var(--c-umber-07); border-color: var(--c-gold-79); } .cmL-slv.on small { color: var(--c-umber-15-b); }
.cmL-slv[disabled] { opacity: .45; border-style: dashed; }
.cmL-vs { margin-top: 6px; } .cmL-vsb { width: 100%; min-height: 44px; border-radius: 999px; border: 1px solid var(--c-blue-51-b); background: var(--c-blue-12); color: var(--c-blue-90); font: 600 12.5px/1.2 Roboto, sans-serif; } .cmL-vsb.on { background: var(--c-blue-23); }
.cmL-smtot { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 6px; } .cmL-smtot span { color: var(--cm-meta); font-size: 12px; flex: 1; } .cmL-smtot b { font: 700 22px/1 Roboto, sans-serif; color: var(--cm-gold); } .cmL-smtot small { font-size: 12px; }
.cmL-smbtns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 6px; }
.cmL-smgo { min-height: 48px; border-radius: 12px; border: 1px solid var(--c-gold-79); background: linear-gradient(var(--c-gold-76-b), var(--c-gold-52-b)); color: var(--c-umber-07); font: 700 16px/1 Roboto, sans-serif; }
.cmL-smskip { min-height: 48px; border-radius: 12px; border: 1px solid var(--c-umber-19); background: var(--c-night-07); color: var(--cm-ink); font: 600 15px/1 Roboto, sans-serif; }
/* the band */
.cmL-band { position: absolute; left: 0; right: 0; bottom: 0; height: calc(100% - var(--cm-maph)); display: grid; grid-template-columns: minmax(0, 1fr) 242px; background: var(--cm-pane); border-top: 1px solid var(--c-night-18); }
.cmL-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--c-night-15-c); }
.cmL-head { flex: none; display: flex; align-items: baseline; gap: 8px; padding: 8px 10px 6px; font-size: 12px; color: var(--cm-meta); }
.cmL-head b { color: var(--cm-gold); font: 700 12px/1 Roboto, sans-serif; letter-spacing: .14em; text-transform: uppercase; } .cmL-head small { margin-left: auto; font-size: 12px; }
.cmL-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 8px 10px; align-content: start; }
.cmL-c { min-height: 52px; display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 8px; border-radius: 12px; border: 1px solid var(--c-night-22); background: var(--cm-card); color: var(--cm-ink); text-align: left; min-width: 0; cursor: pointer; }
.cmL-c.on { border-color: var(--cm-gold); background: var(--c-umber-13-b); box-shadow: inset 3px 0 0 var(--cm-gold); }
.cmL-c.dash { border-style: dashed; background: transparent; }
.cmL-ct { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cmL-ct b { font: 600 13.5px/1.15 Roboto, sans-serif; overflow-wrap: anywhere; } .cmL-ct small { color: var(--cm-meta); font-size: 12px; line-height: 1.2; overflow-wrap: anywhere; }
.cmL-c .cm-pill { flex: none; min-width: 46px; min-height: 44px; }
.cmL-dash { flex: none; width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--c-umber-19); display: flex; align-items: center; justify-content: center; color: var(--cm-meta); font-style: normal; }
.cmL-grid .cmL-none { grid-column: 1 / -1; }
.cmL-right { display: flex; flex-direction: column; gap: 6px; padding: 8px; min-height: 0; }
.cmL-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.cmL-mode { min-height: 62px; padding: 2px; border-radius: 12px; border: 1px solid var(--c-night-22); background: var(--cm-card); color: var(--cm-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.cmL-mode i { width: 9px; height: 9px; border-radius: 50%; background: var(--cm-gold); } .cmL-mode i.used { background: transparent; border: 1.5px solid var(--cm-meta); }
.cmL-mode b { font: 600 13px/1.1 Roboto, sans-serif; } .cmL-mode small { font-size: 11px; color: var(--cm-meta); text-align: center; line-height: 1.1; }
.cmL-mode.on { border-color: var(--cm-gold); background: var(--c-umber-13-b); } .cmL-mode.on b { color: var(--cm-gold); }
.cmL-mode.dim { opacity: .55; border-style: dashed; }
.cmL-mvr { display: grid; grid-template-columns: 1fr 64px; gap: 4px; }
.cmL-mv { border-radius: 10px; border: 1px solid var(--c-night-22); background: var(--cm-card); padding: 4px 8px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; }
.cmL-mv span { font-size: 11px; color: var(--cm-meta); letter-spacing: .06em; text-transform: uppercase; } .cmL-mv b { font: 700 13px/1.2 Roboto, sans-serif; }
.cmL-mv i { flex: 1 1 100%; height: 5px; margin-top: 4px; border-radius: 3px; background: var(--c-night-19); overflow: hidden; } .cmL-mv s { display: block; height: 100%; background: var(--cm-gold); text-decoration: none; }
.cmL-rnd { border-radius: 10px; border: 1px solid var(--c-night-22); background: var(--cm-card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cmL-rnd b { font: 700 14px/1.1 Roboto, sans-serif; } .cmL-rnd small { font-size: 10.5px; color: var(--cm-meta); text-transform: uppercase; }
.cmL-slots { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--c-night-22); font-size: 12px; color: var(--cm-meta); }
.cmL-slots em { font-style: normal; display: inline-flex; align-items: center; gap: 2px; color: var(--cm-ink); } .cmL-slots i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--cm-gold2); } .cmL-slots i.full { background: var(--cm-gold); }
.cmL-end { margin-top: auto; width: 100%; min-height: 52px; border-radius: 14px; font-size: 16px; }
/* the small dice and the roll toast sit over the side column (never the map) */
body.cm-on.cm-v2d-L .hd-ov.compact { top: 76px !important; bottom: auto !important; right: 8px !important; left: auto !important; }
body.cm-on.cm-v2d-L .hd-toast { left: calc(100vw - 100px) !important; }
body.cm-on.cm-v2d-L .live-pop:not(.cm-own) { max-height: calc(var(--cm-maph) - 20px) !important; }

/* ===== the upright tablet card (Tom 14 Nov, 800 x 1280 hybrid): phone-style, the card in two columns ===== */
body.cm-on.cm-tab2 .cm-tabs { display: none; } /* both columns show at once: nothing to jump to */
body.cm-tab2 .cmT { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 8px 10px; align-items: start; }
body.cm-tab2 .cmT-col { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
body.cm-tab2 .cmT-g { margin: 0; }
.cmT-loaded { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--cm-gold); background: var(--c-night-09-c); }
.cmT-loaded.none { border-color: var(--c-umber-19); background: var(--cm-card); }
.cmT-lt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cmT-lt small { color: var(--cm-meta); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmT-lt b { font: 600 16px/1.2 Roboto, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmT-hit { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.cmT-hit small { color: var(--cm-meta); font-size: 11px; } .cmT-hit b { color: var(--cm-gold); font: 700 20px/1 Roboto, sans-serif; }
.cmT-loaded.chk em { font: 700 24px/1 Roboto, sans-serif; font-style: normal; color: var(--cm-gold); }
.cmT-loaded.chk > small { color: var(--cm-meta); font-size: 12px; }
.cmT-status { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 6px; }
.cmT-status > span { min-height: 52px; border-radius: 12px; border: 1px solid var(--c-night-22); background: var(--cm-card); display: flex; flex-direction: column; justify-content: center; padding: 0 10px; }
.cmT-status small { color: var(--cm-meta); font-size: 11.5px; } .cmT-status b { font: 700 17px/1.1 Roboto, sans-serif; }
.cmT-ac { align-items: center; }
.cmT-dots { flex-direction: row !important; align-items: center; gap: 8px; }
.cmT-dot { display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 11.5px/1 Roboto, sans-serif; color: var(--cm-ink); }
.cmT-dot i { width: 12px; height: 12px; border-radius: 50%; background: var(--cm-gold); }
.cmT-dot.used { color: var(--cm-meta); } .cmT-dot.used i { background: transparent; border: 2px solid var(--c-umber-31-c); }
body.cm-tab2 .cmT-any { display: flex; flex-wrap: wrap; gap: 6px; }
body.cm-tab2 .cmT-any .cm-chip { min-height: 44px; }
.cmT-abs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cmT-pp { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.cmT-pp span { min-height: 48px; border-radius: 12px; border: 1px solid var(--c-night-22); background: var(--cm-card); display: flex; align-items: center; justify-content: space-between; padding: 0 10px; }
.cmT-pp small { color: var(--cm-meta); font-size: 12px; } .cmT-pp b { font: 700 18px/1 Roboto, sans-serif; }

/* (14 Nov) Divine Smite asks at every size: off the L it sits at the top of the card (the same box the L's info box shows) */
.cmS-box { margin: 8px 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--cm-gold2); }

/* ===== "Type my roll" (Tom 14 Nov; play/roll-entry.js): the entry lives in the card's space only, never over the map ===== */
.hre { position: fixed; z-index: 9700; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 10px; overflow: hidden;
  background: linear-gradient(var(--c-night-10-b), var(--c-night-09)); border: 1px solid var(--c-gold-76-b); border-radius: 12px; color: var(--c-ink-88); font: 14px/1.3 Roboto, system-ui, sans-serif;
  box-shadow: 0 6px 22px rgb(from var(--c-black) r g b / 0.55); }
.hre.docked { border-radius: 12px 12px 0 0; border-bottom: 0; }
.hre.keys { border-radius: 0; }
.hre-h { display: flex; align-items: center; gap: 6px; }
.hre-h b { flex: 1 1 auto; color: var(--c-gold-65); font: 700 11.5px/1.2 Roboto, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.hre-x { flex: none; width: 44px; height: 44px; margin: -8px -8px -6px 0; border: 0; background: transparent; color: var(--c-ink-88); font-size: 22px; }
.hre-l1 { font-size: 13.5px; } .hre-l1 b { font-weight: 700; } .hre-l2 { color: var(--c-gold-61); font-size: 12.5px; }
.hre-row { display: flex; gap: 6px; align-items: stretch; }
.hre-in { flex: 1 1 auto; min-width: 0; height: 52px; box-sizing: border-box; border-radius: 12px; border: 2px solid var(--c-gold-65); background: var(--c-night-05); color: var(--c-ink-88);
  font: 700 26px/1 Roboto, sans-serif; text-align: center; caret-color: var(--c-gold-65); }
.hre-in::placeholder { color: var(--c-gold-39-b); font: 400 14px/1 Roboto, sans-serif; }
.hre-done { flex: none; min-width: 72px; height: 52px; border-radius: 12px; border: 1px solid var(--c-gold-79); background: linear-gradient(var(--c-gold-71), var(--c-gold-53)); color: var(--c-umber-07); -webkit-text-fill-color: var(--c-umber-07); font: 700 16px/1 Roboto, sans-serif; }
.hre-done[disabled] { opacity: .45; }
.hre-hint { color: var(--c-gold-76-b); font-size: 12.5px; }
.hre-keys { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(44px, 1fr); gap: 5px; margin-top: 2px; }
.hre-k { min-height: 44px; border-radius: 10px; border: 1px solid var(--c-umber-19); background: var(--c-night-13-c); color: var(--c-ink-88); font: 600 20px/1 Roboto, sans-serif; }
.hre-kd { background: linear-gradient(var(--c-gold-71), var(--c-gold-53)); color: var(--c-umber-07); -webkit-text-fill-color: var(--c-umber-07); border-color: var(--c-gold-79); font-size: 16px; }
.hre-kd[disabled] { opacity: .45; }
/* the strip: Attack (auto roll) and a small Type box beside it */
.cm-typeb { flex: none; min-width: 52px; min-height: 52px; border-radius: 14px; border: 1px dashed var(--c-gold-52); background: var(--c-night-07); color: var(--c-gold-65); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 4px; font: 700 13px/1.1 Roboto, sans-serif; }
.cm-typeb small { color: var(--c-gold-61); font: 500 11px/1.1 Roboto, sans-serif; }
.cm-typeb[aria-disabled="true"] { opacity: .45; }
.cmL-go.cmL-go2 { display: grid; grid-template-columns: minmax(0, 1fr) 58px; gap: 6px; }
.cmL-msg { margin: 6px 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--c-umber-19-b); background: var(--c-night-09-c); }
.cmL-msg.hit b { color: var(--c-green-72); } .cmL-msg.miss b { color: var(--c-red-77-b); }
.cmL-msg b { font: 700 18px/1.2 Georgia, serif; display: block; } .cmL-msg small { color: var(--c-gold-61); font-size: 12px; }
.cmL-smbtns.ty { grid-template-columns: 1fr 50px 1fr; }

/* (14 Nov) Type my roll: the strip with the Type box (phone 412: HP 64, Card 46, Attack 122, Type 56, End turn 84) */
.cm-strip.ty { grid-template-columns: 0.95fr 0.68fr 1.8fr 0.83fr 1.24fr; }
body.cm-on.cm-v2d-narrow .cm-strip.ty { grid-template-columns: 50px 42px minmax(44px, 1fr) 50px auto; }
.cm-strip .cm-typeb { min-width: 0; border-radius: 12px; }
.cm-go small { display: block; font: 500 11px/1.1 Roboto, sans-serif; opacity: .8; }
.cm-strip.ty .cm-go { flex-direction: column; gap: 1px; }
.cm-strip.ty .cm-go svg { display: none; }
.cmL-go.cmL-go2 .cmL-gob { flex-direction: column; gap: 1px; padding: 0 4px; }
.cmL-go.cmL-go2 .cmL-gob svg { display: none; }
.cmL-go.cmL-go2 .cm-typeb { min-width: 0; width: 58px; }
.cm-typeb.on { border-style: solid; background: var(--c-umber-12); }
.cm-tym { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-tym.hit b { color: var(--c-green-72); } .cm-tym.miss b { color: var(--c-red-77-b); }
.cmL-smbtns.ty .cm-typeb { min-height: 44px; border-radius: 10px; }
/* (fix job 14 Nov) the Type box's 52 px minimum belongs to the smite pause and the L's button pair. Inside the play strip it
   stretched the strip's grid row to 52 px, so HP, Card, Attack, Type and End turn stood 5-14 px out of the strip at every size
   and, on a phone on its side, below the screen. In the strip the Type box takes the strip's own height like its neighbours. */
.cm-strip .cm-typeb { min-height: 0; }
/* (fix job 14 Nov) Fold 4 open: each row of the L's two-column card list was 52 px, so a long spell ("Protection from Evil
   and Good" + "1st · Touch · concentration") spilled 5-9 px out of its card. Each row is now as tall as its longest card (52 px at
   least, the cards' own minimum); the halves and the cards are unchanged. */
.cmL-grid { grid-auto-rows: max-content; }
/* (fix job 14 Nov) a strip under 360 px wide (a phone on its side, Fold shut 344, the Fold 8 side pane): the HP pill is ~49 px
   and the Type box ~43 px, so "76/76" and "damage" ran 2-5 px out. The strip measures itself and its words step down there. */
.cm-strip { container-type: inline-size; }
@container (max-width: 360px) {
  .cm-strip .cm-hp b { font-size: 12.5px; }
  .cm-strip .cm-typeb { font-size: 12px; padding: 0 1px; }
  .cm-strip .cm-typeb small { font-size: 9.5px; letter-spacing: -.01em; }
}
@container (min-width: 360.02px) and (max-width: 440px) { .cm-strip .cm-typeb small { font-size: 10px; } } /* Fold 8's side pane: "damage" ran 2 px out */
