/* Commander Table — calm, matte table. Card art supplies the color; the interface stays quiet.
   One color per meaning: green = you can play it, orange = target, red = attacking, blue = blocking.
   Every player has a seat color (--seat) used for their turn, their log lines and their zone rail. */

:root, :root[data-theme="dark"] {
  --bg: #1b1e23;
  --zone: #23272d;
  --zone-2: #2a2f36;
  --raised: #31363e;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .14);
  --ink: #e7e9ec;
  --ink-2: #a5acb4;
  --ink-3: #727a84;
  --me: #6aaee6;
  --me-ink: #0d1a26;
  --play: #7fd39a;
  --target: #ff9b54;
  --mote: #fffbea; --mote-glow: rgba(255, 238, 190, .75); --halo: rgba(255, 240, 200, .55);
  --attack: #f06a6a;
  --block: #6aaee6;
  --warn: #e9b949;
  --bad: #ef7d6d;
  --good: #7fd39a;
  --btn: #343a43;
  --btn-hover: #3e4550;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .22);
  --scrim: rgba(12, 14, 17, .62);
  --seat-ink-mix: 100%;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #e4e7eb;
  --zone: #f2f4f6;
  --zone-2: #e9ecef;
  --raised: #ffffff;
  --line: rgba(20, 30, 40, .08);
  --line-2: rgba(20, 30, 40, .16);
  --ink: #1d2228;
  --ink-2: #545e69;
  --ink-3: #87909a;
  --me: #2f7fc4;
  --me-ink: #ffffff;
  --play: #2c9a57;
  --target: #d86c1c;
  --mote: #fffdf3; --mote-glow: rgba(214, 170, 60, .7); --halo: rgba(222, 180, 80, .5);
  --attack: #d4433d;
  --block: #2f7fc4;
  --warn: #b5821a;
  --bad: #c4483a;
  --good: #2c9a57;
  --btn: #ffffff;
  --btn-hover: #f5f7f9;
  --shadow: 0 1px 2px rgba(20, 30, 40, .12), 0 6px 18px rgba(20, 30, 40, .08);
  --scrim: rgba(30, 36, 44, .34);
  --seat-ink-mix: 62%;
  color-scheme: light;
}
:root {
  --font: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .75, .25, 1);
  --side: 310px;
  --table: color-mix(in srgb, var(--bg) 82%, #000);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--me); outline-offset: 2px; }
.sub { color: var(--ink-2); font-size: 12.5px; }
.lbl { display: block; color: var(--ink-2); font-size: 13px; margin: 14px 0 6px; }
.sym { width: 1.05em; height: 1.05em; vertical-align: -0.17em; margin: 0 .5px; }
.pill { display: inline-block; padding: 0 6px; border-radius: 999px; font-weight: 600; font-size: 11px; line-height: 16px; }
.pill.warn { background: var(--warn); color: #231a03; }
.warn-ink { color: var(--target); }
.spin { display: inline-block; width: 11px; height: 11px; border: 2px solid var(--ink-3); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; margin-right: 8px; }
@keyframes spin { to { rotate: 360deg; } }
/* seat colors are tuned for dark; in light mode text in a seat color is darkened for contrast */
.seat-ink, .twho, .step-chip, .spot-cap b, .seatname { color: color-mix(in srgb, var(--seat) var(--seat-ink-mix), #000); }

/* ---------------------------------------------------------------- controls */
.btn {
  font-weight: 600; font-size: 13.5px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--btn); color: var(--ink);
  padding: 8px 15px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, translate .1s;
}
.btn:hover:not(:disabled) { background: var(--btn-hover); }
.btn:active:not(:disabled) { translate: 0 1px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--me); border-color: transparent; color: var(--me-ink); }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--me) 88%, #fff); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--zone-2); color: var(--ink); }
.btn.big { padding: 13px 22px; font-size: 15px; width: 100%; margin-top: 18px; }
.btn.color { padding: 10px; font-size: 26px; line-height: 0; }
.btn.undo { display: inline-flex; align-items: center; gap: 6px; }
.btn.undo svg { width: 14px; height: 14px; }
input[type=url], input[type=text], textarea, select {
  background: var(--raised); border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 12px; outline: none; color: var(--ink);
}
input:focus, textarea:focus, select:focus { border-color: var(--me); }
.check { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-2); font-size: 13px; cursor: pointer; line-height: 1.4; }
.check input { accent-color: var(--me); margin: 2px 0 0; }
.seg { display: inline-flex; background: var(--zone-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { background: transparent; border: 0; padding: 6px 16px; cursor: pointer; color: var(--ink-2); border-radius: 7px; font-weight: 600; }
.seg button.on { background: var(--raised); color: var(--ink); box-shadow: var(--shadow); }
.seg.small button { padding: 4px 12px; font-size: 12.5px; }

/* ---------------------------------------------------------------- setup screen */
.setup { max-width: 1160px; margin: 0 auto; padding: 40px 16px 56px; }
.setup-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 26px; }
.brand { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.tag { color: var(--ink-2); margin: 4px 0 0; font-size: 15px; }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { background: var(--zone); border-radius: 16px; padding: 22px 24px; box-shadow: var(--shadow); }
.panel h2 { font-size: 20px; font-weight: 600; margin: 0 0 2px; letter-spacing: -.01em; }
.row-input { display: flex; gap: 8px; }
.row-input input { flex: 1; min-width: 0; }
.paste { margin-top: 14px; }
.paste summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
.paste textarea { width: 100%; min-height: 170px; margin: 8px 0; font: 12.5px/1.55 ui-monospace, Menlo, monospace; resize: vertical; }
.or { margin-top: 16px; color: var(--ink-2); font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.status { margin-top: 14px; font-size: 13.5px; }
.status:empty { display: none; }
.status.error, .status.warn { padding: 11px 13px; border-radius: 10px; }
.status.error { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.status.warn { color: var(--ink); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.summary { display: flex; gap: 18px; margin-top: 18px; }
.cmd-cards { display: flex; gap: 6px; flex: none; }
.cmd-card img { width: 132px; border-radius: 8px; display: block; box-shadow: var(--shadow); }
.cmd-card.empty { width: 132px; aspect-ratio: 488/680; border: 1px dashed var(--line-2); border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); font-size: 12.5px; }
.sum-body { min-width: 0; flex: 1; }
.deck-name { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.counts { color: var(--ink-2); font-size: 13px; margin-top: 6px; }
.cmd-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 124px; overflow: auto; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; background: var(--zone-2); font-size: 12.5px; cursor: pointer; }
.chip.on { background: color-mix(in srgb, var(--me) 22%, var(--zone)); }
.chip input { accent-color: var(--me); margin: 0; }
.valid { margin-top: 16px; padding: 11px 13px; border-radius: 10px; font-size: 13px; }
.valid.good { background: color-mix(in srgb, var(--good) 12%, transparent); }
.valid.bad { background: color-mix(in srgb, var(--bad) 11%, transparent); }
.valid ul { margin: 6px 0 0; padding-left: 18px; max-height: 150px; overflow: auto; }
.coverage { margin-top: 16px; }
.cov-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.cov-head b { color: var(--ink); }
.meter { height: 6px; border-radius: 99px; background: var(--zone-2); margin: 7px 0; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--good); border-radius: 99px; }
.coverage summary { cursor: pointer; color: var(--ink-2); font-size: 12.5px; }
.partial-list { font-size: 12.5px; color: var(--ink-2); max-height: 230px; overflow: auto; padding-left: 18px; }
.partial-list b { color: var(--ink); }
#opp-slots { margin: 16px 0; display: grid; gap: 9px; }
.slot { display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--seat); flex: none; display: inline-block; }
.slot-name { width: 46px; color: var(--ink-2); font-size: 13px; }
.slot select { flex: 1; min-width: 0; }
.opp-options { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: flex-end; }
.level-note { margin: 10px 0 0; min-height: 3em; } /* two lines, so switching levels doesn't move the page */
.fine { color: var(--ink-3); font-size: 12.5px; margin: 16px 0 0; }

/* ---------------------------------------------------------------- table layout */
.table { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--side); grid-template-rows: 64px minmax(0, 1fr); }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 0 14px; background: var(--zone); box-shadow: 0 1px 0 var(--line); min-width: 0; z-index: 2; }

.turn-badge { display: flex; flex-direction: column; justify-content: center; padding: 5px 14px 6px; border-radius: 10px; min-width: 156px;
  background: color-mix(in srgb, var(--seat) 15%, transparent); box-shadow: inset 3px 0 0 var(--seat); transition: background .4s, box-shadow .4s; }
.turn-badge .tnum { font-size: 12px; color: var(--ink-2); }
.turn-badge .twho { font-size: 17px; font-weight: 600; white-space: nowrap; letter-spacing: -.01em; line-height: 1.2; }

.phase-track { display: flex; gap: 4px; flex: 1; min-width: 0; justify-content: center; }
.pgroup { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px 5px; border-radius: 10px; transition: background .3s; min-width: 0; }
.pgroup.cur { background: color-mix(in srgb, var(--seat) 11%, transparent); }
.plabel { font-size: 11.5px; color: var(--ink-3); padding-left: 4px; }
.pgroup.cur .plabel { color: var(--ink-2); }
.psteps { display: flex; gap: 2px; }
.pstep { font-size: 13px; padding: 2px 9px; border-radius: 7px; color: var(--ink-3); white-space: nowrap; transition: background .25s, color .25s; }
.pstep.past { color: var(--ink-2); }
.pstep.on { background: var(--seat); color: #101418; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 2px; white-space: nowrap; }

/* The board is the table; every seat is a playmat with playmat-like proportions (never a long strip). */
/* The board is the table: mats always fill it (fixed share of the height, full width); your mat gets the most room. */
.board { display: grid; grid-template-rows: minmax(0, 42fr) auto minmax(0, 58fr) auto; gap: 10px; padding: 12px 14px 0; min-height: 0; min-width: 0; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 62%, var(--bg) 0%, var(--table) 100%); }
.opponents { display: grid; grid-template-columns: repeat(var(--opp-count, 2), minmax(0, 1fr)); gap: 10px; min-height: 0; }
.mat { box-shadow: 0 1px 0 var(--line), 0 10px 28px rgba(0, 0, 0, .18); }
.opp { height: 100%; width: 100%; }

/* ---------------------------------------------------------------- player zones */
.opp, .me-mat { background: var(--zone); border-radius: 16px; display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden;
  transition: background .4s, box-shadow .4s, opacity .5s, filter .5s; }
.opp.active, .me.active .me-mat { background: color-mix(in srgb, var(--seat) 6%, var(--zone)); box-shadow: inset 0 3px 0 var(--seat), 0 10px 28px rgba(0, 0, 0, .18); }
.opp.lost { opacity: .45; filter: grayscale(.85); }
.opp-head { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 11px; padding: 10px 12px 6px; border-radius: 12px; transition: background .15s, box-shadow .15s; }
.opp-head.targetable { cursor: crosshair; box-shadow: inset 0 0 0 2px var(--target); background: color-mix(in srgb, var(--target) 10%, transparent); }
.opp-head.aimed { box-shadow: inset 0 0 0 2px var(--target); }
.opp-head.attack-target { box-shadow: inset 0 0 0 2px var(--attack); background: color-mix(in srgb, var(--attack) 9%, transparent); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--zone-2) center/cover; box-shadow: 0 0 0 2px var(--seat); }
.who { min-width: 0; }
.name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opp.has-priority .name::after { content: "  thinking…"; color: var(--ink-3); font-weight: 400; font-size: 12.5px; }
.turn-chip { display: none; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--seat); color: #101418; vertical-align: 2px; margin-left: 6px; }
.active .turn-chip { display: inline-block; }
.deck { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.life { font-weight: 600; font-size: 30px; line-height: 1; min-width: 50px; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.life .out { font-size: 14px; color: var(--bad); }
.life.hit { animation: hit .7s var(--ease); }
.life.heal { animation: heal .7s var(--ease); }
@keyframes hit { 0% { color: var(--attack); scale: 1.16; } }
@keyframes heal { 0% { color: var(--good); scale: 1.1; } }
.opp-meta, .me-zones { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 6px; align-items: center; }
.opp-head .opp-meta { padding: 2px 0 0; margin-left: -6px; flex-wrap: nowrap; overflow: hidden; }
.deck-inline { color: var(--ink-3); font-weight: 400; font-size: 12.5px; margin-left: 8px; }
.opponents[style*="--opp-count: 3"] .deck-inline { display: none; }
.opponents[style*="--opp-count: 3"] .opp-head .opp-meta { gap: 0; }
.opp-head { padding-bottom: 4px; }
.zchip { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: 0; border-radius: 7px; color: var(--ink-2); padding: 2px 7px 2px 5px; font-size: 13px; }
.zchip svg { width: 15px; height: 15px; color: var(--ink-3); }
.zchip b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
button.zchip { cursor: pointer; }
button.zchip:hover { background: var(--zone-2); }
button.zchip.plays { color: var(--play); box-shadow: inset 0 0 0 1.5px var(--play); }
button.zchip.plays svg, button.zchip.plays b { color: var(--play); }
.cd { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 12.5px; padding: 2px 6px; }
.cd svg { width: 13px; height: 13px; color: var(--warn); }
.cd b { color: var(--ink); }
.lossr { color: var(--bad); font-size: 12.5px; }
.cmdzone { display: flex; gap: 4px; align-items: center; }
.opp-head .cmdzone .card { --cw: 30px; }
/* battlefield: three rows that face the middle of the table; card size (--fcw) is computed to fit the field */
.field { flex: 1; overflow: hidden; padding: 4px 12px 8px; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; min-height: 0; --fcw: 64px; }
.opp-field { justify-content: flex-end; }
.me-field { justify-content: flex-start; }
.zone-row { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 8px; padding-top: 12px; --cw: var(--fcw); }
.zone-row:empty { display: none; }
.row-wrap.back { display: flex; justify-content: center; align-items: center; gap: 28px; min-width: 0; }
.row-wrap.back:not(:has(.card)) { display: none; }
.zone-row.support { --cw: calc(var(--fcw) * .86); }
.zone-row.mana { --cw: calc(var(--fcw) * .8); }
.zone-row > .card + .card { margin-left: calc(var(--ml, 0px) - var(--ov, 0px)); }
.zone-row > .card:hover { z-index: 5; }

.me { display: grid; grid-template-rows: minmax(0, 1fr); min-height: 0; min-width: 0; }
/* your mat: an info rail on the left, the battlefield to its right */
.me-mat { display: grid; grid-template-columns: 196px minmax(0, 1fr); height: 100%; width: 100%; }
.me-field { overflow: hidden; padding: 10px 14px; }
.me-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 12px 12px 14px; background: var(--zone-2); box-shadow: 1px 0 0 var(--line); }
/* the hand is held below the table edge and rises when you point at a card */
/* the hand peeks up from the bottom edge; pointing at a card raises it fully */
.hand-rail { height: calc(var(--hcw) * 1.395 * .42); display: flex; justify-content: center; min-width: 0; --hcw: clamp(96px, 8.4vw, 150px); position: relative; z-index: 3; }
.hand-rail .hand { --cw: var(--hcw); padding: 0 8px; align-items: flex-start; max-width: 100%; }
.me-head { padding: 0 0 4px; grid-template-columns: 40px minmax(0, 1fr) auto; }
.me-head .name { white-space: normal; line-height: 1.25; }
.me-head .turn-chip { margin-left: 0; margin-top: 2px; }
.pool { font-size: 13px; min-height: 0; display: flex; align-items: center; gap: 6px; }
.pool .lbl { margin: 0; font-size: 12.5px; }
.me-zones { padding: 0; }
.cmd-label { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.cmdzone.mine { min-height: 60px; }
.cmdzone.mine .card { --cw: 50px; }
.top-peek[hidden] { display: none; }
.top-peek .card { --cw: 64px; }
.hand { display: flex; gap: 8px; overflow: visible; padding: 14px 8px 2px; align-items: flex-end; --cw: clamp(86px, 7.4vw, 132px); min-width: 0; }
.hand-rail .hand .card { box-shadow: 0 2px 4px rgba(0, 0, 0, .35), 0 10px 24px rgba(0, 0, 0, .28); }
.hand .card + .card { margin-left: calc(var(--overlap, 0px) * -1); }
.hand .card { transition: rotate .38s var(--ease), translate .2s var(--ease), scale .2s var(--ease), box-shadow .2s, margin .3s var(--ease); }
.hand .card:hover { translate: 0 -14px; scale: 1.05; z-index: 4; }
.hand-rail .hand .card:hover, .hand-rail .hand .card.playable:hover { translate: 0 -56%; scale: 1.04; z-index: 4; }

/* ---------------------------------------------------------------- cards */
.card {
  position: relative; width: var(--cw); aspect-ratio: 488 / 680; border-radius: calc(var(--cw) * 0.048); background: var(--zone-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 3px 8px rgba(0, 0, 0, .2); flex: none;
  transition: rotate .38s var(--ease), translate .25s var(--ease), box-shadow .2s ease, outline-color .2s, margin .38s var(--ease), filter .3s;
}
.card img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; user-select: none; }
.card.tapped { rotate: 90deg; --ml: calc(var(--cw) * .2); margin-left: var(--ml); margin-right: calc(var(--cw) * .2); filter: saturate(.75) brightness(.88); }
/* identical lands / tokens stack into a pile */
.card.pile::before, .card.pile3::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--raised); box-shadow: 0 0 0 1px var(--line-2), 0 2px 6px rgba(0, 0, 0, .3); z-index: -1; }
.card.pile::before { translate: 4px -4px; }
.card.pile3::after { translate: 8px -8px; z-index: -2; }
.card.pile, .card.attached { isolation: isolate; }
/* equipment and auras tuck behind the creature they're attached to, peeking out on the left */
.zone-row > .card.attached { margin-right: calc(var(--cw) * -.76); translate: 0 -12%; scale: .94; z-index: 0; filter: brightness(.9); }
.zone-row > .card.attached + .card { margin-left: 0; z-index: 1; }
.zone-row > .card.attached:hover { z-index: 6; translate: 0 -24%; filter: none; }
.card.selectable, .card.playable { cursor: pointer; }
.card.playable { box-shadow: 0 0 0 2px var(--play), 0 4px 14px color-mix(in srgb, var(--play) 30%, transparent); }
.field .card:not(.tapped).playable:hover, .field .card:not(.tapped).selectable:hover, .cmdzone .card.playable:hover { translate: 0 -4px; }
.card.selectable:not(.playable):not(.selected):hover { box-shadow: 0 0 0 2px var(--ink-3); }
.card.targetable { cursor: crosshair; outline: 2.5px dashed var(--target); outline-offset: 3px; animation: aim 1.1s ease-in-out infinite; }
@keyframes aim { 50% { outline-color: transparent; } }
.card.aimed { outline: 2.5px solid var(--target); outline-offset: 3px; }
.card.selected { box-shadow: 0 0 0 3px var(--me); }
.card.attacking { box-shadow: 0 0 0 2.5px var(--attack); translate: 0 -8px; }
.card.blocking { box-shadow: 0 0 0 2.5px var(--block); }
.card.textcard { padding: calc(var(--cw) * .07); background: var(--raised); overflow: hidden; font-size: max(8px, calc(var(--cw) * .1)); color: var(--ink); }
.tc-name { font-weight: 600; line-height: 1.15; }
.tc-type { color: var(--ink-2); font-size: .85em; margin-top: .3em; }
.tc-text { margin-top: .4em; font-size: .9em; }
.tc-pt { position: absolute; right: 8px; bottom: 6px; font-weight: 600; }
.badges { position: absolute; inset: 0; pointer-events: none; }
.b { position: absolute; font-size: 11px; font-weight: 600; border-radius: 5px; padding: 0 4px; line-height: 16px; white-space: nowrap; }
.b svg { width: 11px; height: 11px; vertical-align: -2px; }
.b.pt { right: 4px; bottom: 4px; background: rgba(16, 18, 22, .9); color: #fff; font-variant-numeric: tabular-nums; }
.b.pt.mod { color: #9ee6b0; }
.b.pt.hurt { color: #ffab9c; }
.b.pt small { font-size: 9px; margin-left: 2px; opacity: .8; }
.b.warn { top: 4px; left: 4px; background: var(--warn); color: #231a03; width: 16px; padding: 0; text-align: center; border-radius: 50%; }
.b.crown { top: 4px; right: 4px; color: #f2d27a; background: rgba(16, 18, 22, .82); border-radius: 50%; padding: 1px 2px; }
.b.count { left: 4px; bottom: 4px; background: rgba(16, 18, 22, .9); color: #fff; }
.b.tax { left: 4px; bottom: 4px; background: #f2d27a; color: #2a2107; }
.b.ctr { left: 4px; bottom: 4px; background: #2e7a45; color: #fff; }
.b.ctr2 { left: 4px; bottom: 22px; background: rgba(16, 18, 22, .85); color: #ffe9a8; max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; }
.b.loy { right: 4px; bottom: 4px; background: rgba(16, 18, 22, .9); color: #fff; }
.b.zz { left: 4px; top: 23px; color: #c9d3ff; background: rgba(16, 18, 22, .8); border-radius: 50%; padding: 1px 2px; }
.b.tag { left: 50%; top: -10px; translate: -50% 0; background: var(--raised); color: var(--ink); z-index: 2; box-shadow: var(--shadow); padding: 1px 6px; }
.attacking .b.tag { color: var(--attack); }
.blocking .b.tag { color: var(--block); }
.opp .b, .cmdzone .b { font-size: 9.5px; line-height: 14px; }
.opp-head .cmdzone .b { display: none; }
.opp-head .cmdzone .b.tax { display: block; }

/* ---------------------------------------------------------------- action bar (the one loud element) */
.prompt { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 8px 6px 16px; border-radius: 14px; background: var(--zone); min-height: 48px; font-size: 15px; transition: background .3s, box-shadow .3s; }
.prompt.mine { background: color-mix(in srgb, var(--me) 16%, var(--zone)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--me) 55%, transparent); }
.prompt:not(.mine) .ptext { color: var(--ink-2); }
.ptext { min-width: 0; }
.ptext i { color: var(--ink-2); }
.pbtns { display: flex; gap: 6px; flex: none; }
.pbtns .btn.primary { padding: 10px 20px; font-size: 14.5px; }
.step-chip { display: inline-block; margin-right: 10px; padding: 1px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600; background: color-mix(in srgb, var(--seat) 18%, transparent); vertical-align: 1px; }

/* ---------------------------------------------------------------- side panel */
.side { position: relative; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: var(--zone); box-shadow: -1px 0 0 var(--line); min-height: 0; overflow: hidden; }
.inspector { padding: 14px 16px; min-height: 220px; }
.ins-card { display: flex; justify-content: center; }
.ins-card img { width: 244px; border-radius: 12px; box-shadow: var(--shadow); display: block; }
.ins-card .card.big { --cw: 244px; font-size: 14px; }
.ins-body { margin-top: 12px; }
.ins-name { font-weight: 600; font-size: 15px; }
.ins-line { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.ins-line b { color: var(--ink); }
.sup { margin-top: 10px; font-size: 13px; border-radius: 9px; padding: 8px 10px; }
.sup.ok { background: color-mix(in srgb, var(--good) 11%, transparent); }
.sup.warn { background: color-mix(in srgb, var(--warn) 13%, transparent); }
.sup ul { margin: 4px 0 0; padding-left: 16px; color: var(--ink-2); max-height: 100px; overflow: auto; }
.ins-empty h3 { font-size: 16px; font-weight: 600; margin: 4px 0 10px; }
.ins-empty ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; display: grid; gap: 6px; }
.spotlight { position: absolute; inset: 0 0 auto 0; z-index: 5; padding: 14px 16px 16px; background: var(--raised); box-shadow: inset 4px 0 0 var(--seat), 0 10px 30px rgba(0, 0, 0, .25);
  opacity: 0; translate: 24px 0; pointer-events: none; transition: opacity .25s ease, translate .35s var(--ease); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.spotlight.show { opacity: 1; translate: 0 0; }
.spot-cap { align-self: stretch; font-size: 15px; color: var(--ink-2); }
.spotlight img { width: 236px; border-radius: 12px; box-shadow: var(--shadow); display: block; }
.spotlight .card.textcard { --cw: 236px; }
.spot-target { align-self: stretch; font-size: 14px; font-weight: 600; color: var(--target); }
.side-block { padding: 10px 16px 0; min-height: 0; display: flex; flex-direction: column; }
.side-block h3 { font-size: 13px; color: var(--ink-3); margin: 0 0 6px; font-weight: 600; }
.stack { max-height: 170px; overflow: auto; padding-bottom: 6px; }
.stack .empty { color: var(--ink-3); font-size: 13px; }
.sitem { display: flex; gap: 10px; align-items: center; padding: 7px 9px; box-shadow: inset 3px 0 0 var(--seat); background: var(--zone-2); margin-bottom: 5px; border-radius: 8px; font-size: 13px; }
.sitem.targetable { cursor: crosshair; outline: 2px dashed var(--target); outline-offset: 2px; }
.sidx { font-size: 11px; color: var(--ink-3); width: 26px; flex: none; }
.slabel { font-weight: 600; }
.log { overflow: auto; font-size: 13px; padding: 0 0 14px; min-height: 0; flex: 1; }
.entry { padding: 2px 0 2px 10px; box-shadow: inset 2px 0 0 color-mix(in srgb, var(--seat, var(--ink-3)) 70%, transparent); color: var(--ink-2); }
.entry.k-turn { color: var(--ink); font-weight: 600; margin-top: 12px; }
.entry.k-cast { color: var(--ink); }
.entry.k-combat { color: var(--ink); }
.entry.k-loss { color: var(--bad); font-weight: 600; }
.entry.k-win { color: var(--good); font-weight: 600; }
.entry.k-error { color: var(--bad); }

/* ---------------------------------------------------------------- overlays */
.modal-back { position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fadeIn .2s ease; }
.modal { background: var(--raised); border-radius: 18px; padding: 22px 24px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); animation: pop .28s var(--ease); }
.modal.wide { max-width: 1000px; }
.modal h2 { font-weight: 600; margin: 0 0 8px; font-size: 21px; letter-spacing: -.01em; }
.mactions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.mcard { --cw: 132px; cursor: default; transition: translate .2s var(--ease), box-shadow .2s; }
.grid .mcard { cursor: pointer; }
.grid .mcard:hover { translate: 0 -4px; }
.mcard.selected { translate: 0 -6px; box-shadow: 0 0 0 3px var(--me); }
.mimg { width: 160px; border-radius: 9px; float: right; margin-left: 14px; }
.xrow { display: flex; gap: 12px; align-items: center; }
.xrow input { flex: 1; accent-color: var(--me); }
.xrow output { font-size: 26px; font-weight: 600; min-width: 40px; text-align: right; }
.colors { display: flex; gap: 10px; }
.menu { position: fixed; z-index: 60; background: var(--raised); border-radius: 12px; padding: 6px; min-width: 220px; max-width: 340px; box-shadow: 0 18px 44px rgba(0, 0, 0, .32), 0 0 0 1px var(--line); animation: pop .18s var(--ease); }
.menu-title { font-size: 12.5px; color: var(--ink-3); padding: 4px 10px 6px; }
.menu > button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--ink); padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.menu > button:hover:not(:disabled) { background: var(--zone-2); }
.menu > button:disabled { opacity: .5; cursor: not-allowed; }
.menu small { display: block; color: var(--ink-2); font-size: 12px; }
.menu.settings { padding: 14px 16px; width: 330px; max-width: calc(100vw - 20px); }
.set-group + .set-group { margin-top: 14px; padding-top: 12px; box-shadow: 0 -1px 0 var(--line); }
.set-title { font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.set-group .check { margin: 6px 0; }
.set-note { color: var(--ink-3); font-size: 12px; margin: 8px 0 0; }
.set-range { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.set-range input[type=range] { flex: 1; accent-color: var(--me, currentColor); }
.toast { position: fixed; bottom: 24px; left: 50%; translate: -50% 10px; background: var(--raised); color: var(--ink); box-shadow: 0 12px 34px rgba(0, 0, 0, .3), inset 3px 0 0 var(--bad);
  padding: 11px 16px; border-radius: 11px; opacity: 0; pointer-events: none; transition: opacity .2s, translate .25s var(--ease); z-index: 70; max-width: min(580px, calc(100vw - 32px)); }
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------------------------------------------------------------- motion */
.turn-banner { position: absolute; left: calc((100% - var(--side)) / 2); top: 27%; translate: -50% -50%; pointer-events: none; z-index: 30; text-align: center; opacity: 0; }
.turn-banner.show { animation: banner var(--banner-ms, 1.7s) var(--ease) forwards; }
.tb-turn { font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.tb-who { font-size: 34px; font-weight: 600; letter-spacing: -.02em; color: #101418; background: var(--seat); padding: 12px 30px; border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
@keyframes banner { 0% { opacity: 0; scale: .92; } 14% { opacity: 1; scale: 1; } 72% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.02; } }
.float-num { position: absolute; left: 50%; top: 30%; z-index: 20; font-weight: 600; font-size: 21px; pointer-events: none; white-space: nowrap; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); font-variant-numeric: tabular-nums; }
.float-num.dmg { color: var(--attack); }
.float-num.gain { color: var(--good); }
.opp-head .float-num { left: auto; right: 16px; top: 2px; font-size: 22px; }
.card-ghost { box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.ptext { animation: fadeUp .28s var(--ease); }
.sitem.fresh { animation: slideIn .35s var(--ease); }
.entry { animation: fadeIn .4s ease; }
@keyframes fadeUp { from { opacity: 0; translate: 0 4px; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideIn { from { opacity: 0; translate: 24px 0; } }
@keyframes pop { from { opacity: 0; scale: .97; translate: 0 6px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1360px) {
  :root { --side: 270px; }
  .ins-card img, .ins-card .card.big, .spotlight img { width: 200px; --cw: 200px; }
  .phase-track { gap: 2px; justify-content: flex-start; }
  .pgroup:not(.cur) { justify-content: flex-end; }
  .pgroup:not(.cur) .psteps { display: none; }
  .pgroup:not(.cur) .plabel { font-size: 12.5px; padding: 2px 4px; }
  .pstep { padding: 2px 7px; font-size: 12.5px; }
  .turn-badge { min-width: 0; }
  #btn-theme { display: none; }
}
@media (max-width: 920px) {
  .setup-grid { grid-template-columns: 1fr; }
  .summary { flex-direction: column; }
  .pgroup:not(.cur) { display: none; }
  .me-mat { grid-template-columns: 176px minmax(0, 1fr); }
}


b, strong { font-weight: 600; }
.modes { display: grid; gap: 8px; }
.btn.mode { text-align: left; white-space: normal; font-weight: 400; padding: 11px 14px; line-height: 1.4; }
.btn.mode small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }

/* hover light while choosing a card or player (see js/sparks.js) */
.spark-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.mote { position: absolute; border-radius: 50%; background: var(--mote); box-shadow: 0 0 6px 2px var(--mote-glow), 0 0 14px 4px color-mix(in srgb, var(--mote-glow) 40%, transparent); will-change: transform, opacity; }
.card.lit { box-shadow: 0 0 0 1px var(--halo), 0 0 18px 2px var(--halo), 0 0 46px 6px color-mix(in srgb, var(--halo) 45%, transparent); animation: halo 2.4s ease-in-out infinite; }
.card.targetable.lit { outline: 1.5px solid var(--halo); outline-offset: 3px; }
[data-player].lit .name { text-shadow: 0 0 10px var(--halo), 0 0 22px var(--halo); }
@keyframes halo { 50% { box-shadow: 0 0 0 1px var(--halo), 0 0 24px 4px var(--halo), 0 0 60px 10px color-mix(in srgb, var(--halo) 40%, transparent); } }
@media (prefers-reduced-motion: reduce) { .card.lit { animation: none; } }


/* an instant, sorcery or activated ability shown large while the table dims (TableUI.renderShowcase) */
.showcase { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px 16px; cursor: pointer;
  background: radial-gradient(ellipse at center, rgba(8, 10, 16, var(--sc-dim, .62)), rgba(4, 6, 10, var(--sc-dim-edge, .86))); opacity: 0; }
.showcase[hidden] { display: none; }
.showcase.in { animation: scIn .26s ease-out forwards; }
.showcase.out { animation: scOut .24s ease-in forwards; }
.sc-inner { display: grid; justify-items: center; gap: 12px; max-width: min(560px, 100%); text-align: center; }
.sc-cap { font-size: 18px; color: #e9edf5; letter-spacing: .01em; }
.sc-cap .seatname { color: color-mix(in srgb, var(--seat) 75%, #fff); }
.sc-card { width: min(280px, 34vh, 70vw); border-radius: 14px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 60px rgba(0, 0, 0, .6), 0 0 46px -6px color-mix(in srgb, var(--seat) 55%, transparent); }
.showcase.in .sc-card { animation: scCard .42s cubic-bezier(.2, .9, .3, 1.15); }
.card.textcard.sc-card { --cw: min(280px, 34vh, 70vw); aspect-ratio: 63 / 88; }
.sc-what { max-width: 52ch; font-size: 15px; line-height: 1.45; color: #d9dfea; }
.sc-targets { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.sc-arrow { font-size: 13px; color: #aab3c3; margin-right: 2px; }
.sc-tgt { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #eef2f8; font-size: 14px; font-weight: 600; }
.sc-tgt.player { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--seat) 70%, transparent); }
.sc-tgt.tcard { padding: 4px 11px 4px 4px; }
.sc-tgt.tcard img { width: 34px; border-radius: 4px; }
.sc-tgt small { font-weight: 400; color: #aab3c3; }
.sc-tgt.you { background: color-mix(in srgb, var(--target) 28%, transparent); box-shadow: inset 0 0 0 1.5px var(--target); }
.sc-warn { font-size: 14px; font-weight: 600; color: var(--target); }
@keyframes scIn { to { opacity: 1; } }
@keyframes scOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes scCard { from { scale: .82; translate: 0 18px; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .showcase.in, .showcase.in .sc-card { animation: none; opacity: 1; } .showcase.out { animation: none; opacity: 0; } }
.card-flyer { box-shadow: 0 10px 26px rgba(0, 0, 0, .4); }

/* combat and card-on-card scenes (fx.combatScene / fx.interactionScene) */
.fx-scene { position: fixed; inset: 0; z-index: 41; display: none; place-items: center; padding: 24px; cursor: pointer; opacity: 0;
  background: radial-gradient(ellipse at center, rgba(8, 10, 16, var(--sc-dim, .62)), rgba(4, 6, 10, var(--sc-dim-edge, .86))); }
.fx-scene.in, .fx-scene.out { display: grid; }
.fx-scene.in { animation: scIn .26s ease-out forwards; }
.fx-scene.out { animation: scOut .24s ease-in forwards; }
.sc-stage { display: flex; flex-direction: column; align-items: center; gap: 22px; max-width: 100%; }
.sc-duel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 46px; width: min(1180px, 94vw); }
.sc-side { display: flex; gap: 14px; align-items: center; }
.sc-side.atk { justify-content: flex-end; }
.sc-side.def { justify-content: flex-start; }
.sc-vs { color: rgba(255, 255, 255, .35); font-size: 26px; }
.sc-unit { position: relative; width: var(--sw); }
.sc-big { width: 100%; display: block; border-radius: calc(var(--sw) * .05); box-shadow: 0 18px 46px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); }
.card.textcard.sc-big { --cw: var(--sw); aspect-ratio: 63 / 88; }
.sc-pt { position: absolute; right: 6px; bottom: 6px; background: rgba(12, 14, 18, .88); color: #eef2f8; font-weight: 600; font-size: 14px; padding: 2px 8px; border-radius: 8px; }
.sc-plate { width: auto; min-width: 150px; padding: 18px 22px; border-radius: 16px; background: rgba(30, 34, 40, .95); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--seat) 70%, transparent), 0 18px 46px rgba(0, 0, 0, .5); text-align: center; }
.sc-plate-name { color: color-mix(in srgb, var(--seat) 75%, #fff); font-weight: 600; font-size: 16px; }
.sc-plate-life { color: #eef2f8; font-size: 40px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sc-pop { position: absolute; left: 50%; top: 28%; z-index: 2; font-weight: 700; font-size: 34px; pointer-events: none; white-space: nowrap; text-shadow: 0 3px 10px rgba(0, 0, 0, .7); opacity: 0; }
.sc-pop.dmg { color: #ff7a6e; }
.sc-pop.gain { color: #8fe0a8; top: 12%; font-size: 26px; }
.sc-pop.note { color: #f2f4f8; top: 60%; font-size: 20px; font-weight: 600; background: rgba(12, 14, 18, .8); padding: 4px 12px; border-radius: 10px; }
.sc-cap2 { font-size: 18px; color: #e9edf5; }
.sc-cap2 .seatname { color: color-mix(in srgb, var(--seat) 75%, #fff); }
.sc-more { color: #aab3c3; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .fx-scene { display: none !important; } }

/* ---------------------------------------------------------------- card marks (goad, suspect, Ring-bearer, shields…) */
.b.marks { right: 4px; top: 23px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding: 0; background: none; pointer-events: auto; }
.mk { display: inline-flex; align-items: center; gap: 2px; height: 16px; min-width: 16px; padding: 0 3px; border-radius: 8px; background: rgba(16, 18, 22, .86); font-style: normal; justify-content: center; }
.mk svg { width: 11px; height: 11px; }
.mk em { font-style: normal; font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mk.k-goaded { color: #ff9478; }
.mk.k-curse { color: #c9a7ff; }
.mk.k-curse em { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk.k-suspected { color: #f2c46b; }
.mk.k-ring { color: #f2d27a; box-shadow: 0 0 0 1px rgba(242, 210, 122, .45); }
.mk.k-regen { color: #7fd39a; }
.mk.k-frozen { color: #a9dbff; }
.mk.k-leaves { color: #e8e2d6; }
.mk.k-station { color: #ffd45c; }
.mk.k-time { color: #c9d3ff; }
.mk.k-level { color: #e2dcff; padding: 0 5px; box-shadow: 0 0 0 1px rgba(226, 220, 255, .35); }
.opp .mk, .cmdzone .mk { height: 14px; min-width: 14px; }
.opp .mk svg { width: 9px; height: 9px; }
.opp .mk em { font-size: 9px; }

/* ---------------------------------------------------------------- notes above the table: dice rolls, the Ring tempts you */
.fx-note { position: fixed; left: 50%; top: 16%; translate: -50% 0; z-index: 42; display: none; min-width: 240px; max-width: min(460px, calc(100vw - 32px));
  background: var(--raised); color: var(--ink); border-radius: 14px; padding: 12px 16px 14px; box-shadow: 0 18px 44px rgba(0, 0, 0, .32), 0 0 0 1px rgba(127, 127, 127, .12);
  border-top: 3px solid var(--seat, var(--me)); cursor: pointer; }
.fx-note.in, .fx-note.out { display: block; }
.fx-note.in { animation: fnIn .22s ease-out both; }
.fx-note.out { animation: fnOut .2s ease-in both; }
@keyframes fnIn { from { opacity: 0; translate: -50% -8px; } to { opacity: 1; translate: -50% 0; } }
@keyframes fnOut { to { opacity: 0; translate: -50% -6px; } }
.fn-cap { font-size: 13.5px; }
.fn-cap .seatname { color: var(--seat, var(--me)); }
.fn-src { color: var(--ink-3); }
.dice-row { display: flex; gap: 10px; justify-content: center; margin: 12px 0 4px; flex-wrap: wrap; }
.die { width: var(--die); height: var(--die); display: grid; place-items: center; position: relative; background: #f3eee3; color: #1b1d22; border-radius: 10px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .25); font-weight: 700; font-variant-numeric: tabular-nums; }
.die b { font-size: calc(var(--die) * .44); line-height: 1; }
.die small { position: absolute; bottom: 2px; right: 4px; font-size: 8px; font-weight: 600; opacity: .55; }
.die.d20 { border-radius: 0; clip-path: polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); }
.die.landed b { animation: dieLand .25s ease-out; }
.die.ignored { opacity: .32; }
.die.ignored b { text-decoration: line-through; }
@keyframes dieLand { from { scale: 1.35; } to { scale: 1; } }
.fn-total { text-align: center; font-size: 13px; color: var(--ink-2); }
.fn-total b { color: var(--ink); font-size: 16px; }
.ring-head { display: flex; align-items: center; gap: 12px; }
.ring-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(242, 210, 122, .16); color: #e3bf57; }
.ring-ico svg { width: 20px; height: 20px; }
.ring-bearer { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.ring-card { width: 46px; border-radius: 4px; margin-left: auto; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.ring-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; counter-reset: rl; }
.ring-list li { counter-increment: rl; font-size: 12.5px; line-height: 1.35; color: var(--ink-3); padding: 4px 8px 4px 26px; position: relative; border-radius: 8px; }
.ring-list li::before { content: counter(rl); position: absolute; left: 8px; top: 4px; font-weight: 600; }
.ring-list li.on { color: var(--ink); }
.ring-list li.new { background: rgba(242, 210, 122, .14); box-shadow: inset 3px 0 0 #e3bf57; }
@media (prefers-reduced-motion: reduce) { .fx-note { display: none !important; } }

/* ---------------------------------------------------------------- fixing counters and life by hand */
.ctr-edit { display: grid; gap: 6px; min-width: 280px; }
.ctr-row { display: flex; align-items: center; gap: 6px; }
.ctr-name { flex: 1; font-size: 14px; }
.ctr-v { min-width: 34px; text-align: center; font-size: 16px; font-variant-numeric: tabular-nums; }
.ctr-b { min-width: 34px; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.ctr-more { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.ctr-more select { flex: 1; font: inherit; padding: 4px 6px; border-radius: 8px; background: var(--zone-2); color: var(--ink); border: 1px solid rgba(127, 127, 127, .25); }

/* revealed cards (parley) */
.rv-row { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.rv { margin: 0; width: var(--rv, 92px); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rv img, .rv-blank { width: 100%; aspect-ratio: 63 / 88; border-radius: 5px; object-fit: cover; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); }
.rv-blank { display: grid; place-items: center; padding: 6px; font-size: 11px; text-align: center; background: var(--panel-2, #2a2f2a); }
.rv.dim img { filter: saturate(.35) brightness(.75); }
.rv figcaption { font-size: 11px; opacity: .8; }
