/* Colour themes, picked in Preferences and the table's corner menu (seats::THEMES) and set as
   data-theme on <html>: System default sets Dark or Light, as the device prefers. Mana symbol
   colours stay the same in both.
   ds/tokens.css (loaded first) sets the design system's values on :root: Dark takes them as they
   are, so its block here holds only the Classic View's own tokens; Light sets every colour token
   itself (seats.rs tests both). Space, radius, type and motion are shared. */

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --raised: #262b38;
  --opp: #1f232d;
  --decision: #232736;
  --card-lo: #232838;
  --card-stripe: #2a3042;
  --overlay: #0d0f14;
  /* A team draft's two sides (ADR 0104), from each theme's own colours, never Magic's five. */
  --team-a: var(--select);
  --team-b: var(--opp-mark);
  /* Honour silver (`MclIdentity`): the Premier League's flourish, lighter and cooler than gold. */
  --honour: #c5cad6;
  --on-honour: #121419;
}
/* On Team B your own side is the cool one (`teams::colour_sides`). */
:root[data-side="b"] { --team-a: var(--opp-mark); --team-b: var(--select); }

:root[data-theme="light"] {
  color-scheme: light;
  /* A darker silver, so the ring reads on the light page (3:1) and its text keeps 4.5:1. */
  --honour: #858c9c;
  --on-honour: #121419;
  --bg: #f4f5f7;
  --panel: #ffffff;
  --line: #d9dce3;
  --text: #1d2129;
  --muted: #646b7a;
  --accent: #b7791f;
  --rope: #c94141;
  --clock: #2f8f68;
  --block: #3d66a8;
  --raised: #e9ecf1;
  --edge: #b9bfcc;
  --opp: #eceef2;
  --decision: #f0f2f5;
  --card-lo: #dfe3ea;
  --card-stripe: #cfd5df;
  --overlay: #ffffff;
  --strong: #000000;
  --on-accent: #ffffff;
  /* The design system's tokens (crates/web/ds/tokens.css), from this theme's palette. */
  --panel-you: #eef3fb;
  --panel-float: #ffffff;
  --line-control: #8a91a0;
  --line-you: #8ea4cf;
  --accent-hover: #9c6618;
  --accent-soft: rgba(183, 121, 31, 0.14);
  --accent-glow: rgba(183, 121, 31, 0.45);
  --on-rope: #ffffff;
  --rope-2: #942f2f;
  --on-clock: #ffffff;
  --select: #3d66a8;
  --on-select: #ffffff;
  --select-soft: #e3ebf8;
  --select-glow: rgba(61, 102, 168, 0.4);
  --focus: #1d2129;
  --rail: #e4e7ec;
  --nav: #eceef2;
  --scrim: rgba(244, 245, 247, 0.85);
  --field: #eef0f3;
  --faint: #a3a9b5;
  --chip-bg: #e9ecf1;
  --opp-mark: #b02a1f;
  --on-mark: #ffffff;
  --ph-1: #c9d6e8;
  --ph-2: #e3c9c5;
  --ph-3: #e2d7b8;
  --ph-4: #c3dcd7;
  --ph-5: #d3cbe6;
  --ph-6: #e8cfc3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font-ui);
}

button, input, select { font-family: inherit; }

.page {
  max-width: 640px;
  margin: 64px auto;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

h1 { margin: 0; font-size: 22px; }

textarea {
  min-height: 240px;
  padding: 8px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  font: 13px/1.4 var(--font-mono);
  resize: vertical;
}

label { display: flex; gap: 8px; align-items: center; }

button {
  align-self: flex-start;
  padding: 6px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }

a { color: var(--accent); }

.muted { color: var(--muted); }
.notice { color: var(--accent); text-align: center; }

.errors { margin: 0; padding-left: 20px; color: var(--rope); }

.link-row { display: flex; gap: 8px; align-items: center; }
.link-row code {
  flex: 1;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  user-select: all;
  overflow-wrap: anywhere;
}

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* ---- Account pages ------------------------------------------------------------------- */
/* The signed-out shell (public header, one card, footer) and the account card, from the design
   canvas's Sign in, Sign up from an invite and Signed out · M3b boards. */

.so { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% -10%, var(--raised), var(--bg) 60%); font: 400 14px/20px var(--font-ui); }
.so a:not(.rm-btn) { color: var(--accent); text-decoration: none; }
.so a:not(.rm-btn):hover { color: var(--accent-hover); }
.so a.rm-btn { color: var(--text); text-decoration: none; }
.so__body { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; gap: var(--space-5); padding: 64px var(--space-4) var(--space-6); }

.ph { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--rail); }
/* `MclPublicHeader`'s nav (official pyramid Task 9), past `.so a`'s accent. */
.ph__nav { display: flex; flex-wrap: wrap; gap: 4px; }
.so .ph__nav a { height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: var(--radius-md); color: var(--text); font-weight: 600; text-decoration: none; }
.so .ph__nav a:hover { color: var(--strong); }
.so .ph__nav a[aria-current="page"] { background: var(--panel-float); color: var(--strong); box-shadow: inset 0 -2px 0 var(--strong); }
.ph__spring { flex: 1 1 0; }
.so .mw { display: inline-flex; align-items: center; gap: 10px; color: var(--strong); }
.mw-crest, .mw-wordmark { display: inline-flex; flex: none; }
.mw__mark { width: auto; height: 34px; color: var(--strong); --mcl-gold: var(--accent); }
.mw__wordmark { width: auto; height: 19px; color: var(--strong); }
.mw-stamp { display: inline-flex; flex: none; --mcl-stamp-ink: var(--accent); }
.mw-stamp svg { display: block; }
:root[data-theme="light"] .mw-stamp { --mcl-stamp-ink: #80530f; }

.mf { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px 24px; border-top: 1px solid var(--line); font-size: 12px; line-height: 18px; color: var(--muted); }
.mf__text { max-width: 900px; margin: 0; }

.ax-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6) var(--space-6) var(--space-5); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-float); }
.ax-card--wide { max-width: 520px; }
.ax-card p { margin: 0; }
.ax-title { display: flex; flex-direction: column; gap: 6px; }
.ax-h1 { margin: 0; font: 700 26px/30px var(--font-display); color: var(--strong); }
.ax-h2 { margin: 0; font: 600 17px/22px var(--font-display); color: var(--strong); }
.ax-invited { display: flex; align-items: center; gap: 12px; }
.ax-invited .mw__mark { height: 56px; }
.ax-muted { color: var(--muted); }
.ax-small { font-size: 13px; line-height: 18px; }
.ax-strong { font-weight: 600; color: var(--strong); }
.ax-aside { margin: 0; max-width: 440px; text-align: center; }
.ax-form { display: flex; flex-direction: column; gap: var(--space-4); }
.ax-form .rm-field__label { display: block; }
.ax-btn-full { width: 100%; justify-content: center; height: 36px; align-self: stretch; }
/* Between ways in: a word with a rule either side. */
.ax-or { display: flex; align-items: center; gap: var(--space-3); font-size: 12px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ax-or::before, .ax-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* Continue with Discord: the words on a plain blue, no Discord artwork. */
.ax-discord { width: 100%; justify-content: center; height: 36px; align-self: stretch; background: #4c55c8; border-color: #4c55c8; color: #fff; }
.ax-discord:hover:not(:disabled) { background: #5a63d6; border-color: #5a63d6; }

/* Messages under a field or a form: words first, colour second, with a mark that differs in shape. */
.ax-msg { display: flex; gap: var(--space-2); align-items: flex-start; font-size: 13px; line-height: 18px; }
.ax-msg::before { flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; font: 700 11px/16px var(--font-ui); text-align: center; }
.ax-msg--err { color: var(--rope); }
.ax-msg--err::before { content: "!"; background: var(--rope); color: var(--on-rope); }
.ax-msg--ok { color: var(--clock); }
.ax-msg--ok::before { content: "✓"; background: var(--clock); color: var(--on-clock); }
.ax-msg--info { color: var(--text); }
.ax-msg--info::before { content: "i"; border: 1px solid var(--line-control); box-sizing: border-box; line-height: 14px; color: var(--muted); }

.ax-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--line-control); border-radius: var(--radius-lg); background: var(--panel-float); }
.ax-note__text { flex: 1 1 260px; min-width: 0; }

/* Server administration: the admin sidebar beside one readable column and an optional side
   column, from the design canvas's AdminUsers, AdminUser and AdminDenied boards (account.css). */
.ax { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 100vh; font: 400 14px/20px var(--font-ui); }
.ax a:not(.rm-btn):not(.rm-nav__item) { color: var(--accent); text-decoration: none; }
.ax a:not(.rm-btn):not(.rm-nav__item):hover { color: var(--accent-hover); }
/* A link or label drawn as a button is as tall as a button: the bundle's height counts the border
   only on a <button>, which is border-box by default. */
.rm-btn { box-sizing: border-box; }
.ax a.rm-btn { color: var(--text); text-decoration: none; }
.ax a.rm-btn--primary { color: var(--on-accent); }
.ax .ax-h1 { font-size: 30px; line-height: 34px; }
.ax-main { flex: 999 1 560px; min-width: 0; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-5); padding: var(--space-5); }
.ax-col { flex: 999 1 520px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: var(--space-5); }
.ax-col--wide { max-width: 1000px; }
.ax-side { flex: 1 1 260px; min-width: 0; max-width: 340px; display: flex; flex-direction: column; gap: var(--space-4); }
.ax-lead { margin: 0; max-width: 640px; color: var(--text); }
.ax-inline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.ax-head { gap: var(--space-4); }
.ax-avatar-lg { --size: 64px; font-size: 20px; }
.ax-search { max-width: 360px; }
.ax-spring { flex: 1; }
.ax-plain { text-transform: none; letter-spacing: 0; }
.ax-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.ax-failed { margin-bottom: calc(-1 * var(--space-3)); flex-basis: 100%; }
.ax-denied { justify-content: center; align-items: flex-start; padding: 120px var(--space-4) var(--space-5); box-sizing: border-box; }
.ax-denied .ax-card { box-shadow: none; }

.ax-group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.ax-group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); padding: var(--space-4) var(--space-5) var(--space-3); }
.ax-group__title { margin: 0; font: 600 17px/22px var(--font-display); color: var(--strong); }
.ax-group__aside { margin-left: auto; font-size: 13px; color: var(--muted); }
.ax-sec { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line); }
.ax-sec__main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ax-sec__title { font-weight: 600; color: var(--strong); }

.ax-note--err { border-color: var(--rope); background: color-mix(in srgb, var(--rope) 12%, var(--panel)); }

/* Pictures (ADR 0034): a large one's credit in three lines, the card first; the Picture group's
   current picture; the picker's grid of illustrations, the picked one ringed (AcctProfile). */
.credit { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 18px; color: var(--text); }
.credit__card { font-weight: 600; font-size: 14px; color: var(--strong); }
.ax-picture { --size: 110px; border-radius: var(--radius-md); font-size: 36px; }
.ax-art-search { max-width: none; flex: none; }
.ax-art { position: relative; display: flex; align-items: flex-end; overflow: hidden; border-radius: var(--radius-md); background: var(--ph-1); color: var(--strong); font: 400 11px/14px var(--font-ui); }
.ax-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ax-art span { position: relative; width: 100%; box-sizing: border-box; padding: 4px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.6)); text-align: left; }
.ax-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-3); }
.ax-pick { aspect-ratio: var(--art-ratio); padding: 0; border: 2px solid transparent; cursor: pointer; }
.ax-pick[aria-pressed="true"] { border-color: var(--select); box-shadow: 0 0 0 2px var(--select); }
.ax-seen { display: flex; flex-direction: column; gap: 10px; }
.ax-seen__row { padding: 0; }
.intro .player .credit { font-size: 14px; line-height: 20px; }
.ax-msg--busy { color: var(--muted); }
.ax-msg--busy::before { content: ""; border: 2px solid var(--line-control); border-top-color: var(--text); box-sizing: border-box; }

/* Status chips say their state in words, and their mark differs in shape as well as colour. */
.ax-status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; box-sizing: border-box; border-radius: var(--radius-pill); border: 1px solid var(--line-control); font: 600 12px/16px var(--font-ui); color: var(--text); white-space: nowrap; background: var(--bg); }
.ax-status::before { content: ""; width: 8px; height: 8px; box-sizing: border-box; }
.ax-status--pending { border-color: var(--select); color: var(--select); }
.ax-status--pending::before { border-radius: 50%; border: 2px solid var(--select); }
.ax-status--active { border-color: var(--clock); color: var(--clock); }
.ax-status--active::before { border-radius: 50%; background: var(--clock); }
.ax-status--disabled { color: var(--muted); border-color: var(--line-control); }
.ax-status--disabled::before { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--muted); background: linear-gradient(45deg, transparent 42%, var(--muted) 42%, var(--muted) 58%, transparent 58%); }
.ax-status--used::before { content: "✓"; width: auto; height: auto; font-size: 11px; line-height: 1; }
.ax-status--expired { color: var(--muted); border-style: dashed; }
.ax-status--expired::before { border-radius: 50%; border: 1.5px dashed var(--muted); }
.ax-status--revoked { border-color: var(--rope); color: #f0a0a0; }
.ax-status--revoked::before { width: 9px; height: 2px; background: var(--rope); }
.ax-status--suspended { color: var(--muted); }
.ax-status--suspended::before { width: 7px; height: 8px; border-left: 2px solid var(--muted); border-right: 2px solid var(--muted); }
.ax-role { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--radius-sm); border: 1px solid var(--line-control); font: 600 11px/14px var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); background: var(--panel-float); }
.ax-role--server { border-color: var(--select); color: var(--select); }

/* A one-time secret link: shown once, copied, never shown again. */
.ax-secret { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-3); border: 1px dashed var(--line-control); border-radius: var(--radius-md); background: var(--bg); }
.ax-secret code { flex: 1 1 260px; min-width: 0; font: 500 13px/18px var(--font-mono); color: var(--strong); word-break: break-all; }
.ax-secret .rm-btn--icon.ax-copied { color: var(--clock); }

.ax-danger { border-color: color-mix(in srgb, var(--rope) 55%, var(--line)); }
.ax-danger .ax-group__title { color: #f0a0a0; }
.ax-btn-danger-quiet { border-color: var(--rope) !important; color: #f0a0a0 !important; }
.ax-why { font-size: 12px; line-height: 16px; color: var(--muted); }
.ax-why--row { flex-basis: 100%; }
.ax-scrim { padding-top: 96px; }
.ax-scrim .rm-sheet { max-width: 560px; }
/* The Play sheet (canvas TodoPlayM3b, option B) and the accept page (ChallengeOpen). The
   choices and steps are the feedback form's m3-choice and m3-step below. */
.ps-scrim { padding-top: 56px; }
/* Under any scrim the page holds still, so only the scrim scrolls. */
:root:has(.rm-scrim) { overflow: hidden; }
.ps-scrim .rm-sheet { max-width: 860px; }
.ps-scrim .rm-sheet__foot { justify-content: flex-end; }
/* The sheet and its sample pack morph between forms (`pages::morph`): the sheet's box grows or
   shrinks, the pack fades in or out beside it. */
.ps-scrim .rm-sheet { view-transition-name: play-sheet; }
.ps-scrim .su-sample { view-transition-name: play-sample; }
::view-transition-group(play-sheet), ::view-transition-group(play-sample) { animation-duration: 220ms; animation-timing-function: cubic-bezier(0.2, 0, 0, 1); }
.ps-scrim .rm-textarea { width: 100%; box-sizing: border-box; min-height: 120px; }
.ps-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ps-offer { display: flex; align-items: center; gap: var(--space-2); }
.ps-offer .rm-field__label { margin: 0; }
.ps-offer .rm-input { width: 260px; max-width: 100%; }
.ps-elsewhere { margin-top: var(--space-1); }
.ps-preview { display: flex; flex-direction: column; gap: 8px; }
.ch-open { display: flex; justify-content: center; padding: 48px 24px; }
.ch-open .ax-card { max-width: 600px; }
.ch-open .ax-sec { padding: 12px 0 0; }
.ch-open__actions { justify-content: flex-end; gap: 12px; }

/* Send feedback: the corner button and the form, as the canvas board SendFeedback draws them.
   The choices, the step and the automatic rows come from the board's m3b.css. The scrim sits
   over everything on the table, whose highest layers (the piles at 103, the stack's items at
   100 and 101) stack inside the field and the stack. */
.m3-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-2); }
.m3-choice { display: flex; flex-direction: column; align-items: flex-start; align-self: stretch; gap: 2px; padding: 10px 14px; border: 1px solid var(--line-control); border-radius: var(--radius-md); background: var(--panel); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.m3-choice:hover { border-color: var(--text); }
.m3-choice b { color: var(--strong); }
.m3-choice span { font-size: 13px; line-height: 18px; color: var(--muted); }
.m3-choice[aria-pressed="true"] { background: var(--select-soft); border-color: var(--select); box-shadow: 0 0 0 2px var(--select); }
.m3-choice[aria-pressed="true"] b::before { content: "✓ "; color: var(--select); }
.m3-step { display: flex; flex-direction: column; gap: 10px; }
/* Your templates (saved formats plan, Task 6): a wrapping row of cards, each an m3-choice body
   with Start and, loaded, Rename and Delete under it. */
.fm-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.fm-card { display: flex; flex-direction: column; gap: 6px; width: 220px; max-width: 100%; }
.fm-card > .m3-choice { flex: 1; }
.fm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fm-confirm { display: flex; flex-direction: column; gap: 6px; }
.m3-step > .rm-label { display: block; }
.fb-auto { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); }
.fb-auto__row { display: flex; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 18px; }
.fb-auto__row:first-child { border-top: 0; }
.fb-auto__k { flex: 0 0 120px; color: var(--muted); }
.fb-auto__v { flex: 1 1 auto; min-width: 0; font-family: var(--font-mono); font-size: 12px; color: var(--strong); overflow-wrap: anywhere; }
.fb-scrim { z-index: 80; padding-top: 48px; }
.fb-scrim .rm-sheet { max-width: 620px; }
.fb-scrim .rm-sheet__body { gap: 16px; }
.fb-scrim .m3-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fb-scrim .rm-sheet__foot { justify-content: flex-end; gap: 12px; padding: 16px 20px; }
.fb-scrim .rm-sheet__foot .ax-msg--busy { margin-right: auto; }
.fb-scrim .rm-textarea { width: 100%; box-sizing: border-box; min-height: 96px; }
/* The board in the form (`table::FrozenBoard`, notes 01–02): the table's pieces at its smallest
   size, 1280 × 800, panels down the left and the hand along the foot, scaled into the form's
   570 px. Only "then" shows: the live life beside it would move. */
.fb-board { height: 356px; overflow: hidden; border: 1px dashed var(--line-control); border-radius: var(--radius-md); }
.fb-board > .rm-board { width: 1280px; height: 800px; min-width: 0; transform: scale(.445); transform-origin: 0 0;
  grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) var(--hand-h);
  grid-template-areas: "side field" "side hand"; }
.fb-board .rm-board__left { justify-content: space-between; }
.fb-board .now { display: none; }

.ax-tablebox { overflow-x: auto; }
.ax-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ax-table th { text-align: left; padding: var(--space-2) var(--space-4); font: 600 12px/16px var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.ax-table td { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); vertical-align: middle; }
.ax-table tr:first-child td { border-top: 0; }
.ax-who { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--strong); }
.ax-pager { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* Bug reports: the list's description on one line, a report's facts and its description in
   full, line breaks kept. */
.ax-cut { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-facts { margin: 0; padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.ax-pre { white-space: pre-wrap; }

/* Invites, registration and Settings · Invitations (the AdminInvites, AdminRegistration and
   AcctInvites boards). */
/* No wrap: a wrapping column measures its items' height at their shrunk width and keeps it at
   the full width, so a grid of choice cards came out hundreds of pixels tall. */
.ax-sec--stack { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.ax-num { width: 88px; flex: none; font-variant-numeric: tabular-nums; }
.ax-select { width: 200px; }
.ax-panel { display: flex; flex-direction: column; gap: 6px; padding: var(--space-4) var(--space-5); }
.ax-policy { font-size: 16px; }
/* Allowance meter: used, pending and remaining places, each labelled. */
.ax-meter { display: flex; gap: 4px; }
.ax-meter span { flex: 1; height: 10px; border-radius: 3px; border: 1px solid var(--line-control); }
.ax-meter .is-used { background: var(--line-control); }
.ax-meter .is-pending { background: repeating-linear-gradient(45deg, var(--select) 0 3px, transparent 3px 6px); border-color: var(--select); }
/* Name rules: the two lists side by side, wrapping on narrow screens. */
.ax-names { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.ax-names__list { flex: 1 1 280px; }
.ax-pill-x { width: 18px; height: 18px; }
.ax-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: 13px; }
.ax-legend b { font: 700 20px/24px var(--font-display); color: var(--strong); font-variant-numeric: tabular-nums; margin-right: 4px; }

/* The app frame (frame.rs): the rail, sticky at the window's height, beside the top bar, the page
   and the footer, from the bundle's rm-app, rm-rail and rm-topbar and the canvas's MclRail,
   AcctMenu, BoardMulti and SendFeedback boards. In a game the game bar and the board fill the
   window's height beside the rail, with no footer; the board keeps its 1280 px minimum, so below
   1352 px Focus folds the rail away, or the page scrolls sideways when it is off. It contains its fixed parts (menus, preview, settings,
   game over), as the Card Lab's rig does, so they stay on the board and under the rail's peek
   (.factory/notes/roadmap/the-board-in-the-frame/03). Child combinators keep the feedback form's
   small board out of it. */
.frame > .rm-rail { position: sticky; top: 0; height: 100vh; z-index: var(--z-menu); }
.frame .ax { min-height: 0; }
.frame .page { width: 100%; }
.frame .mf { margin-top: auto; }
.frame a.rm-btn { color: var(--text); text-decoration: none; }
.frame a.rm-btn--primary { color: var(--on-accent); }
.frame > .rm-app__content:has(> .rm-board) { height: 100vh; }
.frame > .rm-app__content > .rm-board { flex: 1 1 auto; height: auto; min-height: 0; contain: layout; }
/* A game this tab held that another tab took over, at the top of every page but a board
   (AcctInterrupt; .factory/notes/roadmap/one-connection-per-game/01). */
.rm-app__content > .frame-elsewhere { margin: 16px 24px 0; }
.mw-rail { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 72px; height: 62px; }
.mw-rail .mw__mark { height: 38px; }
/* Under the crest alone the stamp's rule, which parts ALPHA from the wordmark, goes (#14). */
.mw-rail .mw-stamp path:first-child { display: none; }
.mw-rail .mw-stamp svg { margin-left: -8px; }
.rm-rail button.rm-rail__item { align-self: auto; padding: 0; border: 0; border-radius: 0; background: none; font: inherit; cursor: pointer; }
.rm-rail__face--icon.fb-face { color: var(--muted); background: transparent; }
.fb-railbtn:hover .fb-face { color: var(--text); }
.frame-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.frame-peek__who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.frame-peek__who b { color: var(--strong); }
.frame-peek__who span, .frame-peek__time { font-size: 12px; line-height: 16px; color: var(--muted); }
.frame-peek__move { color: var(--accent); }
/* The account menu opens beside the avatar, over a catcher that closes it. */
.frame-you { position: relative; }
.frame-away { position: fixed; inset: 0; }
.frame-menu { position: absolute; left: 76px; bottom: 0; width: 280px; }
.frame-menu__who { display: flex; gap: 12px; align-items: center; padding: 8px 8px 12px; }
.frame-menu__who .rm-avatar { --size: 53px; }
/* The menu's picture reads "Change avatar" on hover and opens the picker. */
.frame-menu__face { position: relative; flex: none; display: inline-grid; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.frame-menu__change { position: absolute; inset: 0; display: grid; place-items: center; padding: 2px; border-radius: inherit; background: var(--scrim); color: var(--strong); font: 600 11px/13px var(--font-ui); text-align: center; opacity: 0; transition: opacity var(--dur-fast) var(--ease-out); }
.frame-menu__face:hover .frame-menu__change, .frame-menu__face:focus-visible .frame-menu__change { opacity: 1; }
.frame-menu__about { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.frame-menu__name { font-size: 16px; font-weight: 600; color: var(--strong); }
.frame-about { max-width: 480px; }
.frame-picture { max-width: 760px; max-height: calc(100vh - 48px); }
.frame-picture .rm-sheet__body { overflow-y: auto; }
.frame-picture .ax-group { border: 0; background: none; }
/* The table's ⋯ menu (ADR 0106), under its button, over a catcher that closes it. */
.concede { position: relative; }
.concede__menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: var(--z-menu); }
.rm-topbar--game .concede__menu { z-index: calc(var(--z-menu) + 1); }
.rm-decision__tools .concede__menu { position: fixed; top: auto; right: auto; width: 200px; left: max(8px, calc(var(--concede-right) - 200px)); }
@media (max-width: 720px) {
  .frame > .rm-rail { position: static; height: auto; }
  .frame-menu { left: auto; right: 0; top: 100%; bottom: auto; }
}

/* Home (home.rs; plan Task 5): MclHomeM3b's sent-challenge rows, with Copy link's link quiet in
   the row, its This month figures, and TodoHomeEmpty's first-game panel, from the canvas's m3b.css
   where the bundle has none. Decks with no decks shows the same Take Power button. */
.sc-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
.rm-list__head + .sc-row { border-top: 0; }
.sc-row__main { flex: 1 1 220px; min-width: 0; }
.sc-row .ax-secret { flex: 1 1 240px; min-width: 0; padding: 0; border: 0; background: none; }
.sc-row .ax-secret code { flex: 1 1 0; color: var(--muted); font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.wt-time { font-variant-numeric: tabular-nums; }
/* Home (spec §2, option H1): the hero over your avatar's art, then two columns. */
.home { display: flex; flex-direction: column; }
.home-hero { position: relative; min-height: 280px; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--panel); }
.home-hero__art { position: absolute; inset: 0 0 0 30%; background: center 25% / cover; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--panel) 28%, color-mix(in srgb, var(--panel) 75%, transparent) 52%, color-mix(in srgb, var(--panel) 10%, transparent)), linear-gradient(transparent 70%, var(--bg)); }
.home-hero__in { position: relative; z-index: 2; display: grid; gap: 18px; max-width: 640px; padding: 36px 32px 32px; }
.home-hero__me { display: flex; align-items: center; gap: 16px; }
.home-hero__pic { width: 72px; height: 72px; border-radius: 14px; font-size: 24px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--strong) 25%, transparent); }
.home-hero__name { margin: 0; font: 700 34px/38px var(--font-display); color: var(--strong); overflow-wrap: anywhere; }
.home-hero__figures { display: flex; flex-wrap: wrap; gap: 22px; }
.home-hero__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.home-hero__play { font: 700 22px/1 var(--font-display); letter-spacing: .02em; padding: 16px 44px; border-radius: var(--radius-lg); }
.home-hero__credit { position: absolute; right: 16px; bottom: 12px; z-index: 2; font-size: 11px; line-height: 14px; color: color-mix(in srgb, var(--strong) 60%, transparent); }
.home-figure { display: flex; flex-direction: column; gap: 2px; }
.home-figure b { font: 700 22px/26px var(--font-display); color: var(--strong); }
.home-form { display: inline-flex; gap: 3px; height: 26px; align-items: center; }
.home-form span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; font: 700 10px var(--font-ui); background: var(--chip-bg); color: var(--muted); }
.home-form .home-form__w { background: color-mix(in srgb, var(--clock) 25%, transparent); color: var(--clock); }
.home-form .home-form__l { background: color-mix(in srgb, var(--rope) 25%, transparent); color: var(--rope); }
.home-pill--gold { background: var(--accent-soft); color: var(--accent); }
.home-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; padding: 22px 28px 40px; max-width: 1180px; }
.home-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 900px) { .home-cols { grid-template-columns: minmax(0, 1fr); padding: 16px; } .home-hero__in { padding: 24px 16px; } }
.dk-starter { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: var(--space-4); }

/* Focus (BoardSwitch; plan Task 8): the rail and the game bar fold away and the board has the
   window. Below 1352 px wide it is on by itself, with a notice at the window's top (TodoMinWindow
   option B, a trial). In Focus the decision panel's tools lead with Home, whose menu is fixed to
   the board above the button, past the panel's scroll box. */
.frame--focus > .rm-rail,
.frame--focus > .rm-app__content > .rm-topbar { display: none; }
/* The way back from Focus: a slim tab on the window's left edge, halfway down, that grows a
   little on hover as the log's tab does. */
.frame-unfocus { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: var(--z-menu);
  width: 14px; height: 64px; padding: 0; display: grid; place-items: center;
  background: var(--panel-float); border: 1px solid var(--line-control); border-left: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0; box-shadow: 4px 0 14px rgb(0 0 0 / 0.3);
  color: var(--muted); font: 700 16px/1 var(--font-ui); cursor: pointer;
  transition: width 160ms cubic-bezier(0.05, 0.7, 0.1, 1), color 120ms, background 120ms; }
.frame-unfocus:is(:hover, :focus-visible) { width: 22px; color: var(--strong); background: var(--raised); }
@media (prefers-reduced-motion: reduce) { .frame-unfocus { transition: color 120ms, background 120ms; } }
/* The frame's notices, the auto-Focus one and a team pod's clinch (team draft Task 6 note 01), in
   one column at the window's top centre, over the board and its game over. */
.frame-notices {
  position: fixed; left: 12px; right: 12px; top: 12px; z-index: var(--z-menu);
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.frame-notice {
  pointer-events: auto;
  box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  width: max-content; max-width: min(640px, 100%); padding: 10px 14px;
  border-radius: var(--radius-lg); background: var(--panel-float); border: 1px solid var(--line-control);
  box-shadow: var(--shadow-menu); color: var(--text); font-size: 13px; line-height: 18px;
}
.frame-notice p { flex: 1 1 100%; margin: 0; }
/* A team pod's clinch as a banner (owner list: more than a notice): wide, a trophy and the result
   large, edged and tinted gold for a win, the opponent's red for a loss, quiet for a draw. */
.tt-banner {
  --tone: var(--line-control);
  pointer-events: auto; box-sizing: border-box; width: min(760px, 100%);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 14px 18px; border: 1px solid var(--line-control); border-top: 4px solid var(--tone); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--tone) 10%, var(--panel-float)); box-shadow: var(--shadow-menu); color: var(--text);
  animation: tt-in 260ms var(--ease-out);
}
.tt-banner[data-tone="won"] { --tone: var(--accent); }
.tt-banner[data-tone="lost"] { --tone: var(--opp-mark); }
.tt-banner__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--tone) 18%, var(--panel)); color: var(--tone); }
.tt-banner[data-tone="drew"] .tt-banner__icon, .tt-banner[data-tone=""] .tt-banner__icon { color: var(--strong); }
.tt-banner__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tt-banner__words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tt-banner__title { font: 700 20px/26px var(--font-display); color: var(--strong); }
.tt-banner__line { font-size: 13px; line-height: 18px; color: var(--muted); }
.tt-banner__acts { display: flex; gap: 8px; }
@keyframes tt-in { from { opacity: 0; transform: translateY(-10px); } }
@media (max-width: 560px) { .tt-banner { grid-template-columns: auto minmax(0, 1fr); } .tt-banner__acts { grid-column: 1 / -1; justify-content: flex-end; } }
@media (prefers-reduced-motion: reduce) { .tt-banner { animation: none; } }
/* Toasts (Home, Activity and notifications, Task 1): top right under the bar, urgent first. */
.rm-toasts {
  position: fixed; top: 72px; right: 16px; z-index: var(--z-menu); pointer-events: none;
  display: flex; flex-direction: column; gap: var(--space-2); width: min(360px, calc(100vw - 32px));
}
.frame--focus .rm-toasts { top: 16px; }
.rm-toast {
  pointer-events: auto; overflow: hidden; background: var(--panel-float); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-float); color: var(--text); font-size: 13px; line-height: 18px;
  animation: toast-in 180ms var(--ease-out);
}
.rm-toast--urgent { border-color: var(--accent); }
.rm-toast__head { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: center; padding: var(--space-3); }
.rm-toast__face { width: 36px; height: 36px; flex: none; }
.rm-toast__words { display: flex; flex-direction: column; min-width: 0; }
.rm-toast__title { color: var(--strong); font-weight: 600; }
.rm-toast__line { color: var(--muted); }
.rm-toast__close { align-self: start; border: 0; background: none; color: var(--faint); cursor: pointer; padding: 2px 4px; font: inherit; }
.rm-toast__close:is(:hover, :focus-visible) { color: var(--strong); }
.rm-toast__foot { display: flex; gap: var(--space-2); padding: 0 var(--space-3) var(--space-3) calc(36px + 2 * var(--space-3)); }
.rm-toast__bar { height: 3px; background: var(--line); }
.rm-toast__bar i { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }
@keyframes toast-in { from { opacity: 0; translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .rm-toast { animation: none; } .rm-toast__bar i { transition: none; } }
/* A place on the rail with a card beside it (rail_card.rs; the bell on the rail spec): the face is
   a rail item, squaring and showing its pill while hovered or open; the card opens beside the rail
   from the face's foot, over a catcher while pinned, with a bridge over the gap so the pointer can
   cross to it. Where the rail is a bar it is a sheet at the window's foot. */
.rail-card { position: relative; flex: none; }
.rail-card__face[aria-expanded="true"] .rm-rail__face { border-radius: 14px; color: var(--strong); }
.rail-card__face[aria-expanded="true"] .rm-rail__pill { opacity: 1; height: 36px; margin-top: -18px; }
.rail-card__away { position: fixed; inset: 0; z-index: var(--z-menu); }
/* ponytail: 140px is the foot below the bell (the avatar, gaps); a taller foot
   wants the card placed from the face's rect instead. */
.rail-card__card {
  position: absolute; left: 78px; bottom: -8px; z-index: calc(var(--z-menu) + 1);
  display: flex; flex-direction: column; width: 380px; max-height: min(600px, calc(100vh - 140px)); padding: 0;
  text-align: left; animation: rail-card-in 160ms var(--ease-out);
}
.rail-card__card::before { content: ""; position: absolute; right: 100%; top: 0; bottom: 0; width: 10px; }
@keyframes rail-card-in { from { opacity: 0; transform: translateX(-6px); } }
@media (max-width: 720px) {
  .rail-card__card { position: fixed; left: 16px; right: 16px; bottom: 16px; width: auto; max-height: min(600px, calc(100vh - 32px)); animation-name: rail-sheet-in; }
}
@keyframes rail-sheet-in { from { opacity: 0; transform: translateY(12px); } }
/* The bell (Task 10, moved to the rail): plain as Send feedback above it is, no tile, muted until
   hovered or open, gold while something needs you; a new notice swings it once and pops its red
   count. */
.rail-bell svg { transform-origin: 50% 8%; }
.rm-rail__face--icon.rail-bell { color: var(--muted); background: transparent; }
.rail-card__face:is(:hover, [aria-expanded="true"]) .rail-bell { color: var(--text); }
.rm-rail__face--icon.rail-bell--due, .rail-card__face[aria-expanded="true"] .rail-bell--due { color: var(--accent); }
.rail-bell--swing svg { animation: rail-bell-swing 700ms var(--ease-out); }
@keyframes rail-bell-swing { 10% { transform: rotate(16deg); } 25% { transform: rotate(-13deg); } 40% { transform: rotate(9deg); } 55% { transform: rotate(-6deg); } 70% { transform: rotate(3deg); } 100% { transform: none; } }
.rail-bell__count { background: var(--rope); color: var(--on-rope); }
.rail-bell__count--pop { animation: rail-bell-pop 300ms var(--ease-out); }
@keyframes rail-bell-pop { from { transform: scale(1.7); } }
@media (prefers-reduced-motion: reduce) {
  .rail-card__card, .rail-bell, .rail-bell svg, .rail-bell__count { animation: none !important; }
}
/* The bell's card, card A "Two shelves" (bell.rs; the bell on the rail spec, The card): a fixed
   head and foot round a scrolling middle. Needs you now's rows are gold (your move), with art, a
   clock bar that drains each second and turns red under 15 s, and the action; Earlier's rows have
   an icon, a blue dot while unread, lift on hover with Open → sliding in, and slide in at the top
   as they arrive while the card is open. */
.bellc-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.bellc-head b { margin-right: auto; font: 700 18px/22px var(--font-display); color: var(--strong); }
.bellc-link { border: 0; background: none; padding: 0; font: 400 12px/16px var(--font-ui); color: var(--muted); cursor: pointer; text-decoration: none; }
.bellc-link:is(:hover, :focus-visible) { color: var(--text); text-decoration: underline; }
.bellc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.bellc-sec { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 12px; }
.bellc-sec + .bellc-sec { border-top: 1px solid var(--line); }
.bellc-cap { display: flex; align-items: center; justify-content: space-between; font: 600 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bellc-live { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); letter-spacing: 0; text-transform: none; font-size: 12px; }
.bellc-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: bellc-breathe 1.6s ease-in-out infinite; }
@keyframes bellc-breathe { 0%, 100% { opacity: .2; } 50% { opacity: .75; } }
.bellc-empty { margin: 0; font-size: 13px; color: var(--muted); }
.bellc-main { min-width: 0; display: flex; flex-direction: column; }
.bellc-title { font-size: 14px; line-height: 18px; color: var(--text); }
.bellc-line { font-size: 12px; line-height: 16px; color: var(--muted); }
.bellc-need { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); transition: border-color 150ms, transform 150ms; }
.bellc-need:hover { border-color: var(--accent); transform: translateX(2px); }
.bellc-need:has(.bellc-clock--low) { border-color: color-mix(in srgb, var(--rope) 55%, transparent); background: color-mix(in srgb, var(--rope) 8%, var(--panel)); }
.bellc-need .bellc-title { font-weight: 600; color: var(--strong); }
.bellc-art { --size: 41px; font-size: 13px; }
.bellc-clock { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font: 700 11px/16px var(--font-ui); font-variant-numeric: tabular-nums; color: var(--accent); }
.bellc-bar { display: inline-block; width: 46px; height: 3px; border-radius: 2px; overflow: hidden; background: var(--line); }
.bellc-bar::after { content: ""; display: block; height: 100%; width: var(--p, 100%); background: currentColor; transition: width 1s linear; }
.bellc-clock--low { color: var(--rope); }
.bellc-notes { display: flex; flex-direction: column; }
.bellc-note { position: relative; display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; margin: 0 -8px; padding: 8px; border-radius: var(--radius-md); color: inherit; text-decoration: none; transition: background 150ms, transform 150ms; }
.bellc-note:is(:hover, :focus-visible) { background: var(--panel); transform: translateY(-1px); }
.bellc-note--unread .bellc-title { font-weight: 600; color: var(--strong); }
.bellc-note--fresh { animation: bellc-slide 450ms var(--ease-out); }
@keyframes bellc-slide { from { opacity: 0; transform: translateY(-8px); background: var(--select-soft); } }
.bellc-ic { width: 30px; height: 30px; display: grid; place-items: center; box-sizing: border-box; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.bellc-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bellc-note__go { align-self: center; font-size: 12px; color: var(--muted); white-space: nowrap; opacity: 0; transform: translateX(-4px); transition: opacity 150ms, transform 150ms; }
.bellc-note:is(:hover, :focus-visible) .bellc-note__go { opacity: 1; transform: none; }
.bellc-foot { flex: none; display: flex; padding: 10px 14px; border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) {
  .bellc-live::before, .bellc-note--fresh { animation: none; }
  .bellc-need, .bellc-note, .bellc-note__go, .bellc-bar::after { transition: none; }
}
/* The queue as a place on the rail (queue_place.rs; friendly queues spec, board FqRail, variant C,
   breathing dots): a 44 px square in a soft blue tint whose glow breathes over 3 s, the seats as
   dots inside (a new one pops), an hourglass jewel and the wait as a calm blue badge, never gold.
   A firing flashes it gold. Its card opens from the place's top, and at the foot as a sheet where
   the rail is a bar. Reduced motion stops every animation. */
.qp { display: contents; }
.qp-face { overflow: visible; border-radius: 12px; background: color-mix(in srgb, var(--select) 14%, var(--panel)); box-shadow: 0 0 10px 0 color-mix(in srgb, var(--select) 25%, transparent); animation: qp-glow 3s ease-in-out infinite; transition: transform 180ms var(--ease-out); }
.qp .rm-rail__item:hover .qp-face, .qp .rail-card__face[aria-expanded="true"] .qp-face { border-radius: 12px; transform: translateY(-1px); }
@keyframes qp-glow { 50% { box-shadow: 0 0 18px 2px color-mix(in srgb, var(--select) 45%, transparent); } }
.qp-dots { display: grid; grid-template-columns: repeat(var(--per, 4), 6px); gap: 4px; }
.qp-dots i { width: 6px; height: 6px; box-sizing: border-box; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--select) 50%, transparent); transition: background 300ms; }
.qp-dots--two { grid-template-columns: repeat(2, 7px); }
.qp-dots--two i { width: 7px; height: 7px; }
.qp-dots i.on { background: var(--select); border: 0; }
.qp-dots i.pop { animation: qp-pop 500ms var(--ease-out); }
@keyframes qp-pop { 0% { transform: scale(2.2); background: var(--strong); } }
.qp .rm-rail__jewel { border-color: var(--select); }
.qp .rm-rail__jewel svg { stroke: var(--select); }
.qp-time { background: var(--rail); color: var(--select); box-shadow: inset 0 0 0 1px var(--select), 0 0 0 2px var(--rail); }
.qp--fired .qp-face { background: var(--ph-3); box-shadow: 0 0 0 2px var(--accent), 0 0 18px 2px color-mix(in srgb, var(--accent) 60%, transparent); animation: qp-fire 900ms var(--ease-out); }
.qp--fired .qp-dots i { background: var(--strong); border: 0; }
.qp--fired .rm-rail__jewel { border-color: var(--accent); }
.qp--fired .rm-rail__jewel svg { stroke: var(--accent); }
.qp--fired .qp-time { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 3px var(--rail); }
@keyframes qp-fire { 0% { transform: scale(.8); } 45% { transform: scale(1.12); } 100% { transform: scale(1); } }
.qp .rail-card__card { top: -8px; bottom: auto; width: 320px; }
.qp--fired .rail-card__card { border-color: var(--accent); }
@media (max-width: 720px) { .qp .rail-card__card { top: auto; bottom: 16px; width: auto; } }
/* The queue's card: kind and live wait, name, seats (yours with your picture), the count, the
   fill timeline with a marker at your wait, what happens next, and the actions. */
.qpeek { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.qpeek-k { display: flex; align-items: center; justify-content: space-between; font: 600 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.qpeek-live { display: inline-flex; align-items: center; gap: 6px; color: var(--select); font-variant-numeric: tabular-nums; letter-spacing: 0; font-size: 12px; text-transform: none; }
.qpeek-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--select); opacity: .8; animation: bellc-breathe 1.6s ease-in-out infinite; }
.qpeek-t { font: 700 18px/22px var(--font-display); color: var(--strong); }
.qpeek--found .qpeek-t { color: var(--accent); }
.qpeek-seats { display: flex; gap: 6px; }
.qpeek-seat { width: 28px; height: 28px; box-sizing: border-box; display: grid; place-items: center; border-radius: 50%; border: 1px dashed var(--line-control); font: 600 10px/1 var(--font-ui); color: var(--muted); transition: background 300ms, border-color 300ms; }
.qpeek-seat.on { border: 0; background: color-mix(in srgb, var(--select) 30%, var(--panel)); }
.qpeek-seat.on::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--select); }
.qpeek-seat.you { border: 2px solid var(--select); background-position: center; background-size: cover; color: var(--strong); }
.qpeek-seat.you::after { display: none; }
.qpeek-team { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; }
.qpeek-team b { font: 600 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.qpeek-line { font-size: 13px; line-height: 18px; color: var(--text); }
.qpeek-line b { color: var(--strong); }
.qpeek-deck { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: var(--radius-md); background: var(--panel); }
.qpeek-deck img { width: 64px; height: 46px; object-fit: cover; border-radius: 6px; }
.qpeek-deck b { display: block; color: var(--strong); font-size: 14px; }
.qpeek-deck span span { font-size: 12px; color: var(--muted); }
.qpeek-tl { position: relative; height: 46px; margin: 2px 4px 0; }
.qpeek-tl__track, .qpeek-tl__done { position: absolute; left: 0; top: 10px; height: 4px; border-radius: 2px; }
.qpeek-tl__track { right: 0; background: var(--line); }
.qpeek-tl__done { background: linear-gradient(90deg, color-mix(in srgb, var(--select) 40%, transparent), var(--select)); transition: width 1s linear; }
.qpeek-tl__stop { position: absolute; top: 4px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.qpeek-tl__stop.first { transform: none; align-items: flex-start; }
.qpeek-tl__stop i { width: 2px; height: 16px; border-radius: 1px; background: var(--line-control); }
.qpeek-tl__stop span { font: 600 10px/12px var(--font-ui); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.qpeek-tl__stop span b { display: block; color: var(--text); font-size: 11px; }
.qpeek-tl__stop.past i { background: var(--select); }
.qpeek-tl__stop.past span b { color: var(--select); }
.qpeek-tl__stop.bot span b { color: var(--muted); }
.qpeek-tl__head { position: absolute; top: 5px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--strong); box-shadow: 0 0 0 3px color-mix(in srgb, var(--select) 45%, transparent); transition: left 1s linear; }
.qpeek-next { font-size: 12px; line-height: 16px; color: var(--muted); }
.qpeek-acts { display: flex; gap: 8px; }
.qpeek-acts .rm-btn--primary { flex: 1; justify-content: center; }
@media (prefers-reduced-motion: reduce) {
  .qp, .qp * { animation: none !important; transition: none !important; }
}
.frame-notice b { color: var(--strong); }
.focus-home { display: flex; }
.focus-home > .rm-btn { gap: 6px; }
.focus-home__icon { display: flex; }
.focus-home__icon svg { width: 16px; height: 16px; }
.focus-away { z-index: var(--z-menu); }
.focus-menu { position: fixed; width: 330px; z-index: calc(var(--z-menu) + 1); }
.focus-menu b { color: var(--strong); }
.focus-menu .rm-menu__art { overflow: hidden; }
.focus-menu .rm-menu__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.focus-menu__none { padding: 0 var(--space-2) var(--space-2); font-size: 13px; color: var(--muted); }

/* Decks: the tiles, the editor and the deck picker on the challenge pages, from the design
   canvas's TodoLibraryM3b, DeckEdit and ChallengeOpen boards (m3b.css), without cover art. */
.dk-head { justify-content: space-between; align-items: flex-start; gap: var(--space-4); }
.dk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: var(--space-4); }
.dk-new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; aspect-ratio: var(--art-ratio); padding: var(--space-4); text-align: center; border: 1px dashed var(--line-control); border-radius: var(--radius-lg); color: var(--muted); }
/* The shelf (decks hub plan, Task 3): a box is its art with a gradient foot, which the name's link covers,
   and its buttons in a row under the art, always shown (owner review, item 18). */
.dk-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: var(--space-4); }
.dk-tools .rm-search { max-width: 320px; }
/* A wide button's words on one line, cut short with "…" (the Undo button's): wrapped, they spill
   out of the design system's 36px `.rm-btn--lg` over the button above. */
.rm-btn__line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Any other wide button grows with its words (a mode's rules text): the design system's
   `.rm-btn--lg` height, later in its file, otherwise beats `.rm-btn--wide`'s `height: auto`. */
.rm-btn--wide.rm-btn--lg { height: auto; }
/* The design system's search box takes `flex: 1 1 240px` to share a row; in a column (a picker, a
   side panel) that basis is its height, so hold it at its 36px everywhere (owner review). */
.rm-search { min-height: 36px; max-height: 36px; }
.dk-sort { width: auto; margin-left: auto; }
.dk-box { overflow: hidden; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.dk-box__face { position: relative; isolation: isolate; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 160px; aspect-ratio: var(--art-ratio); background: var(--ph-1); }
.dk-box:hover, .dk-box:focus-within { transform: translateY(-3px); box-shadow: var(--shadow-float); }
.dk-box:has(.dk-box__name:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.dk-box__art { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.dk-box__kind { position: absolute; top: 10px; left: 10px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--scrim); color: var(--strong); font: 600 11px/16px var(--font-ui); letter-spacing: 0.04em; text-transform: uppercase; }
.dk-box__pips { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 3px; }
.dk-box__badge { position: absolute; top: 10px; right: 10px; }
.dk-box__actions { display: flex; gap: var(--space-2); padding: 8px 10px; border-top: 1px solid var(--line); }
.dk-box__actions .rm-btn { flex: 1 1 auto; justify-content: center; }
@media (hover: none) { .dk-box__actions .rm-btn { height: 40px; } }
.dk-box__foot { display: flex; flex-direction: column; gap: 2px; padding: 40px 12px 10px; background: linear-gradient(transparent, color-mix(in srgb, var(--bg) 92%, transparent) 45%); }
.ax a.dk-box__name:not(.rm-btn) { font: 600 17px/22px var(--font-display); color: var(--strong); overflow-wrap: anywhere; outline: none; }
.dk-box__name::after { content: ""; position: absolute; inset: 0; }
.dk-box__sub { font-size: 13px; line-height: 18px; color: var(--text); }
.dk-box__record { font-weight: 600; color: var(--clock); }
@media (prefers-reduced-motion: reduce) {
  .dk-box { transition: none; }
  .dk-box:hover, .dk-box:focus-within { transform: none; }
}
/* Card art (decks hub plan, Task 11; spec §3.3, §4.1): a card's art row with its preferred-art
   star, in the card popover and the deck art picker, and the picker's choices and card grid. */
.ar-row { display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: 4px; }
.ar-art { position: relative; flex: 0 0 132px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ar-art__pick { display: block; width: 100%; aspect-ratio: var(--art-ratio); padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: var(--radius-sm); background: var(--ph-1); cursor: pointer; }
.ar-art__pick img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ar-art__pick[aria-pressed="true"] { border-color: var(--select); box-shadow: 0 0 0 1px var(--select); }
.ar-star { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: var(--scrim); color: var(--strong); font-size: 15px; line-height: 24px; cursor: pointer; }
.ar-star[aria-pressed="true"] { color: var(--accent); cursor: default; }
.ar-art__cap { display: flex; flex-direction: column; font-size: 11px; line-height: 14px; color: var(--text); }
.ar-art__cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 6px; }
.ar-card > .ar-row { align-self: stretch; }
.ar-hint { margin: 0; font-size: 12px; line-height: 16px; color: var(--muted); }
/* The popover's Art: the art the card is drawn with, the popover's width; a click opens the
   picker (`art::CardArt`). */
.ar-current { display: block; align-self: stretch; aspect-ratio: var(--art-ratio); padding: 0; overflow: hidden; border: 2px solid var(--line); border-radius: var(--radius-md); background: var(--ph-1); cursor: zoom-in; }
.ar-current:hover, .ar-current:focus-visible { border-color: var(--select); }
.ar-current img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ar-current__cap { display: flex; flex-direction: column; font-size: 12px; line-height: 16px; }
/* The picker: every illustration at once, in a grid that fills a wide sheet. */
.ar-modal { padding-top: var(--space-6); cursor: default; }
.ar-modal .rm-sheet.ar-modal__sheet { max-width: min(1200px, 100%); }
.ar-modal .rm-sheet__body { gap: var(--space-3); }
/* The card in the printing looked at, beside the illustrations, kept in view as they scroll. */
.ar-modal__body { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: start; gap: var(--space-5); }
.ar-modal__pick { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.ar-preview { position: sticky; top: 0; aspect-ratio: 63 / 88; border-radius: 4.76% / 3.41%; overflow: hidden; background: var(--ph-1); box-shadow: var(--shadow-menu); }
.ar-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .ar-modal__body { grid-template-columns: 1fr; } .ar-preview { position: static; width: min(240px, 100%); justify-self: center; } }
.ar-modal .ar-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); overflow: visible; }
.ar-modal .ar-art { flex: none; }
.ar-modal .ar-art__cap { font-size: 12px; line-height: 16px; }
.ar-art__cap .ar-art__tag { font-weight: 600; color: var(--select); }
.ar-art__cap .ar-art__printings { width: 100%; margin-top: 2px; padding: 2px 4px; font-size: 11px; line-height: 14px; }
.ar-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-2); }
.ar-choice { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); text-align: left; color: var(--text); background: var(--bg); border: 2px solid var(--line-control); border-radius: var(--radius-md); font-weight: 400; cursor: pointer; }
.ar-choice[aria-checked="true"] { border-color: var(--select); box-shadow: 0 0 0 1px var(--select); }
.ar-choice__art { flex: 0 0 72px; aspect-ratio: var(--art-ratio); overflow: hidden; border-radius: var(--radius-sm); background: var(--ph-1); }
.ar-choice__art img, .ar-pick__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ar-choice__words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ar-choice__words b { color: var(--strong); }
.ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--space-2); max-height: 260px; overflow-y: auto; }
.ar-pick { display: flex; flex-direction: column; gap: 2px; padding: 2px; color: var(--text); background: none; border: 2px solid transparent; border-radius: var(--radius-sm); font-size: 11px; line-height: 14px; text-align: left; cursor: pointer; }
.ar-pick[aria-pressed="true"] { border-color: var(--select); }
.ar-pick__art { aspect-ratio: var(--art-ratio); overflow: hidden; border-radius: var(--radius-sm); background: var(--ph-1); }
.ar-pick__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A card the deck has its own art for ("Only in this deck"), in the builders. */
.bd-own-art { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.rm-card.has-own-art::after { content: ""; position: absolute; top: 6px; left: 6px; z-index: 2; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--scrim); }
.ax a.dk-new:not(.rm-btn) { color: var(--muted); }
.dk-new:hover { border-color: var(--text); }
.ax .rm-textarea { width: 100%; box-sizing: border-box; }
.dk-actions { padding-top: var(--space-2); border-top: 1px solid var(--line); }
.dk-pick { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.dk-pick__item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--space-2) var(--space-3); background: var(--bg); color: var(--text); border: 2px solid var(--line-control); border-radius: var(--radius-md); font-weight: 400; text-align: left; }
.dk-pick__item b { color: var(--strong); }
.dk-pick__item span { font-size: 12px; color: var(--muted); }
.dk-pick__item[aria-pressed="true"] { border-color: var(--select); box-shadow: 0 0 0 1px var(--select); }
/* The card search (decks hub plan, Task 7; spec §2): the box, the row of filters, the All filters
   panel and the results as images or text, with matches marked. */
.ax-col.cs-page { max-width: none; }
.cs { display: flex; flex-direction: column; gap: var(--space-3); }
.cs-box { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.cs-search { flex: 1 1 320px; max-width: 640px; }
.cs-row-filters, .cs-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.cs-group { display: inline-flex; gap: 2px; }
/* A colour filter: the bare mana symbol, never boxed or ringed (owner's note), dimmed and greyed
   while off, in full colour while on (card search, the sideboard). */
.cs-pip { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--radius-pill); background: none; cursor: pointer; opacity: .45; filter: grayscale(.7); transition: opacity var(--dur-fast), filter var(--dur-fast); }
.cs-pip[aria-pressed="true"] { opacity: 1; filter: none; }
.cs-pip:hover { opacity: .85; filter: none; }
.cs-pip:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.sym.cs-multi { background: conic-gradient(#f4ecd0 0 20%, #6fa0e0 0 40%, #b9b0c2 0 60%, #e8775e 0 80%, #6fbf86 0); }
.cs-playable { height: 28px; padding: 0 12px; border: 1px solid var(--line-control); border-radius: var(--radius-pill); background: transparent; color: var(--muted); font: 600 12px/1 var(--font-ui); cursor: pointer; }
.cs-playable[aria-pressed="true"] { border-color: var(--clock); color: var(--clock); background: color-mix(in srgb, var(--clock) 10%, transparent); }
.cs-row-filters .cs-select { width: auto; }
.cs-panel { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4); }
.cs-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: var(--space-3) var(--space-4); }
.cs-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cs-field--wide { grid-column: 1 / -1; }
.cs-field__label { font: 600 11px/16px var(--font-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cs-field__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.cs-field__controls .rm-input { flex: 1 1 0; min-width: 0; }
.cs-field__controls .cs-op { flex: 0 0 auto; width: auto; }
/* The Set filter's picker (owner list #10): its field fills the cell, the picker wider than it. */
.cs-field__controls .su-tiles-at { flex: 1 1 0; min-width: 0; }
.cs-field .su-pick { min-width: min(360px, 90vw); }
.cs-panel__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.cs-panel__foot > span { margin-right: auto; }
.cs-count { margin: 0; margin-right: auto; font-size: 13px; color: var(--muted); }
.cs-count b { color: var(--strong); }
.cs-link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.cs-odd { margin-left: var(--space-3); color: var(--rope); }
.cs-odd code { font-family: var(--font-mono); }
.cs-sort { width: auto; }
.cs-size { width: 120px; accent-color: var(--accent); }
.cs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(150px * var(--cs, 1)), 1fr)); gap: var(--space-4) var(--space-3); }
.cs-page .cs-tiles { grid-template-columns: repeat(auto-fill, min(100%, var(--cs-card-width))); }
.cs-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cs-tile .cs-card { width: 100%; container-type: inline-size; }
.cs-page .cs-card:hover { outline: 2px solid var(--focus); outline-offset: 2px; }
/* A card as text (`paper`), under its image until that loads and in its place when it can't.
   Everything in it is sized from the card's width, so it shrinks with the card as an image
   would; its rules text shrinks further (`--fit`, `paper::fit`) until it fits its box, as on a
   half-height card top. */
.rm-card:has(> .cs-paper) { container-type: inline-size; }
.cs-paper {
  --paper-edge: #8a939d;
  position: absolute; inset: 0; box-sizing: border-box; display: flex; flex-direction: column;
  gap: 2cqw; padding: 3.5cqw;
  border: 2cqw solid #171719; border-radius: inherit; overflow: hidden;
  background: linear-gradient(150deg, color-mix(in srgb, var(--paper-edge) 45%, #faf5e7), var(--paper-edge));
  color: #242018; font: 500 5cqw/1.25 var(--font-ui); text-align: left; white-space: normal;
  pointer-events: none;
}
.cs-paper__head, .cs-paper__type, .cs-paper__foot { flex: none; }
.cs-paper__rules { font-size: calc(1em * var(--fit, 1)); }
/* On the table the card's own badges show its live power and toughness. */
.rm-card:has(.rm-card__pt) .cs-paper__stats { visibility: hidden; }
.cs-paper[data-colour="W"] { --paper-edge: #c8b78a; }
.cs-paper[data-colour="U"] { --paper-edge: #4f8fc9; }
.cs-paper[data-colour="B"] { --paper-edge: #82716f; }
.cs-paper[data-colour="R"] { --paper-edge: #c95a3c; }
.cs-paper[data-colour="G"] { --paper-edge: #4f9a66; }
.cs-paper[data-colour="M"] { --paper-edge: #c29a34; }
.cs-paper__head, .cs-paper__type, .cs-paper__rules {
  padding: .35em .45em; min-width: 0; border: 1px solid rgb(36 32 24 / .24); border-radius: .3em;
  background: #faf5e7; overflow-wrap: anywhere;
}
.cs-paper__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2em .4em; font-family: var(--font-display); font-size: 1.25em; }
.cs-paper__cost { display: inline-flex; flex-wrap: wrap; align-items: center; }
.cs-paper__type { font-weight: 600; }
.cs-paper__rules { flex: 1; min-height: 0; overflow: hidden; }
.cs-paper__rules .cs-line + .cs-line { margin-top: .35em; }
.cs-paper__flavour { display: block; margin-top: .5em; padding-top: .35em; border-top: 1px solid rgb(36 32 24 / .24); color: #51463a; font-style: italic; }
.cs-paper .sym { width: 1.2em; height: 1.2em; font-size: .85em; line-height: 1; vertical-align: -.08em; }
/* Symbols in running text, the stack's and its tooltip's, sized to the text. */
.stack .tile .words .sym, .stack-tip .tip-text .sym, .preview .ability-tile .words .sym {
  width: 1.3em; height: 1.3em; font-size: .8em; line-height: 1; vertical-align: -.12em;
}
.cs-paper__foot { display: flex; align-items: baseline; justify-content: space-between; gap: .35em; }
.cs-paper__foot > * { padding: .15em .4em; border-radius: .25em; background: #faf5e7; }
.cs-text { margin: 0; font-size: 12px; line-height: 17px; color: var(--text); overflow-wrap: anywhere; }
.cs-line { display: block; }
.cs-mark { padding: 0 1px; border-radius: 2px; background: var(--accent-soft); color: var(--strong); }
.cs-tag { align-self: flex-start; padding: 1px 8px; border-radius: var(--radius-pill); border: 1px solid var(--line-control); color: var(--muted); font: 600 11px/16px var(--font-ui); }
.cs-off .cs-card, .cs-off .cs-thumb { filter: grayscale(1) brightness(.6); }
.cs-off .cs-name { color: var(--muted); }
.cs-rows { display: flex; flex-direction: column; }
.cs-trow { display: grid; grid-template-columns: 96px 1fr auto; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.cs-thumb { display: block; aspect-ratio: var(--art-ratio); border-radius: var(--radius-sm); overflow: hidden; background: var(--ph-1); }
.cs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-trow__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cs-trow__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.cs-name { font: 600 15px/20px var(--font-display); color: var(--strong); }
.cs-cost { display: inline-flex; gap: 1px; }
.cs-cost + .cs-cost::before { content: "//"; margin: 0 4px; color: var(--muted); }
.cs-pt { font: 700 14px/20px var(--font-ui); font-variant-numeric: tabular-nums; color: var(--strong); }
.cs-more { align-self: center; }
@media (max-width: 480px) {
  .cs-trow { grid-template-columns: 64px 1fr; }
  .cs-pt { grid-column: 2; }
  .cs-tiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (max-width: 720px) {
  .ph { padding: 12px var(--space-4); }
  .ax-card { padding: var(--space-5) var(--space-4); }
  .ax-main { padding: var(--space-4); }
}

/* ---- The table ---------------------------------------------------------------------- */

:root {
  --card-w: 84px;
  --glow: 0 0 0 4px var(--accent), 0 0 14px var(--accent);
  /* What auto-pay would spend for the option under the pointer, as in Arena. */
  --pay: #52c8ff;
  --pay-glow: 0 0 0 6px var(--pay), 0 0 18px 4px var(--pay);
  --enter: 200ms;
  /* The design system's glows, from each theme's colours rather than Dark's literals. */
  --glow-playable: 0 0 0 4px var(--accent), 0 0 16px var(--accent-glow);
  --glow-select: 0 0 0 6px var(--select), 0 0 14px var(--select-glow);
}

.rm-board {
  /* Sizes from the layout (src/layout.rs), set on this element; these are the defaults. The
     bundle's own .rm-board columns and gaps give way to the board's (spec, Decision 6). */
  --side-w: 240px;
  --hand-h: 190px;
  position: relative;
  height: 100vh;
  min-width: 1280px;
  padding: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  /* Rows and areas are set inline (`layout::board_grid`): the phase track's place, the
     panels' bar and a past board's banner change them. */
  /* Clip, not hidden: a hidden box can still be scrolled by focus() or scrollIntoView, which
     shifts the whole board. */
  overflow: clip;
  user-select: none;
  transition: padding-right 160ms cubic-bezier(0.05, 0.7, 0.1, 1);
}
/* Docked, the log's width and its 8 px inset (window.rs `DOCK`): the board draws beside it.
   The log's tab floats over the board's edge. */
.rm-board[data-testid=table] { --log-tab: 36px; }
.rm-board.log-docked { padding-right: calc(342px + 8px + 8px); }
@media (prefers-reduced-motion: reduce) { .rm-board { transition: none; } }
.rm-board.panels-top { grid-template-columns: minmax(0, 1fr); }
.rm-board.panels-top .gutter.edge-side { display: none; }

/* Drag handles on the panel edges */
.gutter { position: absolute; z-index: 5; border-radius: 4px; transition: background 120ms; touch-action: none; }
.gutter:hover, .gutter.dragging { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.gutter.edge-side { top: 8px; bottom: 8px; left: calc(8px + var(--side-w)); width: 8px; cursor: col-resize; }
/* In the gap over the hand, wherever the phase track puts the hand: placed in the hand's grid
   area, it is positioned against it. */
.gutter.edge-hand { grid-area: hand; top: -8px; left: 0; right: 0; height: 8px; cursor: row-resize; }

/* Bare elements in :where() so any rm- component class beats them. */
:where(.rm-board) button { align-self: auto; padding: 5px 10px; }
.rm-board button.ghost {
  background: none;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 500;
}

.lbl {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The left column */
.rm-board__left { grid-area: side; }
.rm-player.is-target .rm-player__head { cursor: pointer; }
.rm-player .hint { color: var(--accent); }
/* The monarch's crown under the player's name (`players::PlayerPanel`). */
.rm-player .monarch { display: flex; align-items: center; gap: 4px; color: var(--accent); }
.rm-player .monarch svg { width: 14px; height: 14px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linejoin: round; }
/* The life total counts to its new value, about 60 ms a point (`--life-t`, notes 01): the
   registered `--life` steps through the integers and `::after` draws it over the real number,
   which stays in the DOM, transparent, already reading the new value. Each change swaps
   between the two identical flashes, so the flash restarts on the same element. */
@property --life { syntax: "<integer>"; inherits: false; initial-value: 0; }
.rm-player__life { position: relative; counter-reset: life var(--life);
  transition: --life var(--life-t, 120ms) linear; }
.rm-player__life > span { color: transparent; }
.rm-player__life::after { content: counter(life) / ""; position: absolute; inset: 0; }
.rm-player__life.flash { animation: flash 240ms ease-out; }
.rm-player__life.flash2 { animation: flash2 240ms ease-out; }
@keyframes flash { from { color: var(--accent); scale: var(--flash-s, 1.15); } }
@keyframes flash2 { from { color: var(--accent); scale: var(--flash-s, 1.15); } }
@media (prefers-reduced-motion: reduce) {
  .rm-player__life { transition: none; --flash-s: 1; }
}
.rm-player .now { font: 500 12px/16px var(--font-ui); color: var(--muted); text-align: right; }
.rm-player .now b { color: var(--text); font-weight: 600; }
.pool { font-size: 12px; }
/* While the pool covers the cost a click pays from it (`players::pool`): a faint blue wash
   breathes slowly behind it, stronger under the pointer; held still with reduced motion. The
   kinds auto-pay would spend say so on their own symbols below. */
.pool.can-pay { margin-inline: -4px; padding-inline: 4px; border-radius: 6px; cursor: pointer;
  animation: pool-hint 2.8s ease-in-out infinite; }
.pool.can-pay:is(:hover, :focus-visible) { animation: none; outline: none;
  background: color-mix(in srgb, var(--pay) 18%, transparent); }
@keyframes pool-hint { 0%, 100% { background: transparent; }
  50% { background: color-mix(in srgb, var(--pay) 11%, transparent); } }
@media (prefers-reduced-motion: reduce) {
  .pool.can-pay { animation: none; background: color-mix(in srgb, var(--pay) 8%, transparent); }
}
/* While auto-pay would spend from the pool, the kinds it spends light up with the amount in
   bold, out of what's there, and the rest fall into shadow (`players::pool`). */
.pool .mana { display: inline-flex; align-items: center; gap: 2px; margin-right: 6px;
  transition: opacity 150ms ease, filter 150ms ease;
  animation: mana-in 180ms ease-out var(--tap-t, 160ms) backwards; }
/* Mana joins the pool as the tap that made it ends (`players::pool` keys each kind and count). */
@keyframes mana-in { from { opacity: 0; scale: .5; } }
@media (prefers-reduced-motion: reduce) { .pool .mana { animation: none; } }
.pool .mana.idle { opacity: .5; filter: grayscale(.6); }
.pool .mana.spends .sym { box-shadow: 0 0 0 2px var(--pay), 0 0 8px 1px var(--pay); }
.pool .mana .pay { font-size: 15px; font-weight: 800; color: var(--text); }
.pool .mana .of { opacity: .45; }
/* Restricted mana says what it may pay for, on its own line (`players::only`). */
.pool .only { display: flex; align-items: center; gap: 2px; color: var(--muted); }
/* The top of your library, face up beside its counter while you may look at it (Mystic Forge). */
.rm-player .library-top { --card-w: 40px; display: inline-flex; }

/* The decision panel fills the side column between the players (rm-decision, Board). The
   three panels go in the order picked in the corner menu (`seats::Panels`). */
.rm-board__left .rm-decision { flex: 1; min-height: 0; overflow: auto; order: var(--o-decision); }
.rm-board__left > [data-testid="opp-player"] { order: var(--o-opp); }
.rm-board__left > [data-testid="my-player"] { order: var(--o-you); }
/* As a bar across the top: the players at the side panel's width, the decision panel taking
   the rest, its question on top and its answers and switches in rows under it. */
.rm-board.panels-top .rm-board__left { flex-direction: row; align-items: stretch; }
.rm-board.panels-top .rm-player { flex: none; width: var(--side-w); }
.rm-board.panels-top .rm-decision { flex-flow: row wrap; align-items: center; align-content: flex-start;
  column-gap: var(--space-4); max-height: 32vh; }
.rm-board.panels-top .rm-decision > * { flex-basis: 100%; }
.rm-board.panels-top .rm-decision > :is(.rm-toggle, .rm-decision__tools) { flex-basis: auto; margin-top: 0; }
.rm-board.panels-top .rm-decision__sep { display: none; }
.rm-board.panels-top .rm-decision__answers { display: flex; flex-wrap: wrap; }
.rm-board.panels-top .rm-decision__answers > * { flex: 1 1 180px; }
/* One column no wider than the panel: an auto column took the Undo button's whole label as its
   minimum, pushing the answers past the panel's edge in a narrow side column. */
.rm-decision__answers { grid-template-columns: minmax(0, 1fr); }
/* A view toggle (Hide choice, Show result) is a quiet control at its own width under the
   answers, not one of them (owner list #2). */
.rm-decision__light { justify-self: start; align-self: flex-start; gap: var(--space-2); }
.rm-board.panels-top .rm-decision__answers > .rm-decision__light { flex: none; }
.rm-decision .rejected { color: var(--rope); }
.rm-decision .cost { display: inline-flex; gap: 3px; vertical-align: middle; }

/* Our own mana symbols. Barlow's capitals sit .05em below the middle of its font box (ascent 1,
   descent .2, cap height .7), so .1em of bottom padding moves the centre up to the letter's. A
   fixed line-height keeps the rounding the same wherever a symbol sits. */
.sym {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding-bottom: .1em;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background: #cac5c0;
  color: #111;
}
.sym.W { background: #f3ecd2; }
.sym.U { background: #8fc3ec; }
.sym.B { background: #a69f9d; }
.sym.R { background: #eb9f82; }
.sym.G { background: #9bd3ae; }
.sym.hy { background: linear-gradient(135deg, var(--a, #cac5c0) 50%, var(--b, #cac5c0) 50%); }
.sym.a-W { --a: #f3ecd2; } .sym.a-U { --a: #8fc3ec; } .sym.a-B { --a: #a69f9d; } .sym.a-R { --a: #eb9f82; } .sym.a-G { --a: #9bd3ae; }
.sym.b-W { --b: #f3ecd2; } .sym.b-U { --b: #8fc3ec; } .sym.b-B { --b: #a69f9d; } .sym.b-R { --b: #eb9f82; } .sym.b-G { --b: #9bd3ae; }

/* "Choose a colour": the five symbols around a circle in colour-pie order, W at the top, then
   clockwise, and colourless in the centre when offered. Each button goes to the centre, then
   out along its own angle. */
.pie { position: relative; width: 124px; height: 124px; margin: 4px auto; }
.pie button {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 72deg)) translateY(-44px)
    rotate(calc(var(--i) * -72deg));
}
.pie button.centre { transform: translate(-50%, -50%); }
.pie .sym { width: 34px; height: 34px; font-size: 16px; }
.pie button:hover .sym, .pie button:focus-visible .sym { outline: 2px solid var(--accent); }

/* The battlefield (rm-field, Board). The phase track keeps its own row under it, so the field
   holds just the two halves (note 09). */
.rm-field {
  grid-area: field;
  /* Cards fit the window (`table::fit`): the creatures' width, --field-w, and the back rows' and
     planeswalker column's, --back-w, are set here from the field's measure and its cards. These
     are the first paint's, the floor's. */
  container-type: size;
  --field-w: 92px;
  --back-w: calc(var(--field-w) * .8);
  grid-template-rows: 1fr 1fr;
  gap: 0;
  /* Its cards stack among themselves (a hovered one at 60), under what floats over the board,
     such as a card's menu and the preview. */
  isolation: isolate;
}
/* A half scrolls only once its cards are at their smallest and still don't fit (`fit`'s
   `scrolls`): a scroller clips, and otherwise an attacker's ring, a lifted card or a tuck reaches
   over the middle line. The fit keeps a scroll bar's room either way (`fit::GUTTER`). */
.rm-field.is-scrolling .rm-field__half { overflow-y: auto; scrollbar-width: thin; scrollbar-gutter: stable; }
.rm-field__half.opp { background: var(--opp); border-bottom: 1px solid var(--line); }
/* Each half's fixed areas (`battlefield::Area`, board fit spec 1.9 as amended 2026-11-10):
   creatures in front across the middle, and behind them one back row of the lands and then the
   other permanents, the two rows one block that starts at one left edge and is centred in the
   field (its middle column, as wide as its wider row); planeswalkers and Sagas in a column at the
   right with the player's emblems under them. The opponent's half mirrors yours top to bottom.
   Areas aren't shaded or labelled, and keep their places when empty. None is positioned, so
   every slot's offset parent is the field (`slide`). The column gap is the walkers' margin, so
   the empty side columns cost nothing (`fit::GRID_GAP`). */
.rm-field__half { display: grid; grid-template-rows: auto auto; align-content: space-between; column-gap: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content) minmax(0, 1fr) auto; }
.rm-field__half.mine { grid-template-areas: ". creatures . walkers" ". back . walkers"; }
.rm-field__half.opp { grid-template-areas: ". back . walkers" ". creatures . walkers"; }
.rm-field__row { flex-wrap: wrap; min-height: 40px; justify-content: flex-start; }
/* Tops line up on your side and bottoms on the opponent's, toward the table's middle. */
.rm-field__half.mine .rm-field__row { align-items: flex-start; }
.rm-field__half.opp .rm-field__row { align-items: flex-end; }
.rm-field [data-area=creatures] { grid-area: creatures; }
/* With blockers placed under their attackers (`place`), the row takes the half's whole width,
   as the attackers across the table do. */
.rm-field [data-area=creatures].is-placed { grid-column: 1 / 4; }
/* The lands first, then the other permanents after a wider gap; the others take a line of
   their own once both don't fit on one (`fit::BACK_GAP`). */
.rm-field__back { grid-area: back; display: flex; flex-wrap: wrap; column-gap: var(--space-4);
  row-gap: var(--space-2); min-width: 0; }
/* The lands keep to one line: once it's full, each pile's front card gives up its slot down to
   `fit::SHOW` of a card and the next pile overlaps it, every card above the one to its left
   (`battlefield`'s --z), so each pile's left edge, its name, shows. */
.rm-field [data-area=lands] { flex-wrap: nowrap; min-width: 0; }
.rm-field [data-area=lands] > .slot { flex-shrink: 0; }
.rm-field [data-area=lands] > .slot:has(+ .slot:not(.stacked)) { flex-shrink: 1; min-width: calc(var(--card-w) * .4); }
/* The planeswalker column fills down and then sideways: as many rows as the half holds
   (its max height makes the count definite), each a back-row card tall. Your emblems take its
   bottom row and the opponent's its top, at their own edge of the table, placed first (order)
   so the planeswalkers and Sagas fill the rest from the first column (dense). */
.rm-field [data-area=walkers] { grid-area: walkers; margin-left: var(--space-2); display: grid; grid-auto-flow: column dense;
  grid-template-rows: repeat(auto-fill, minmax(calc(var(--back-w) * 88 / 63), auto));
  max-height: calc(50cqh - 20px); align-content: start; justify-items: start; }
.rm-field__emblem { order: -1; }
.rm-field__half.mine .rm-field__emblem { grid-row: -2; }
.rm-field__half.opp .rm-field__emblem { grid-row: 1; }
/* A pile of identical permanents. Each card's margins, set from the pile settings in Rust
   (`battlefield::fan`), place it in the fan; a card that turns widens and the ones around it
   slide over. The bundle's rm-pile edges and rm-tapped boxes aren't used: they'd fix the
   size and drop the fan (note 04). */
.rm-field .slot { --card-w: var(--field-w); }
.rm-field :is([data-area=lands], [data-area=others], [data-area=walkers]) .slot { --card-w: var(--back-w); }
/* What the fit measures: the field beside the piles' column when they sit at an edge (and left
   of the stack's), never the halves. */
.rm-field__gauge { position: absolute; inset: 0 0 0 var(--piles-w); visibility: hidden; pointer-events: none; }
/* Each slot stacks by its place in its pile (--z, back to front); the one with the card under
   the pointer comes above the rest, and goes back only once its card has eased down. */
.slot { position: relative; display: flex; z-index: var(--z, 1); transform-origin: 50% 100%;
  --t: 260ms;
  transition: margin var(--tap-t, 160ms) linear, translate calc(var(--t) * 1.3) cubic-bezier(.45, .05, .5, 1.25),
    scale calc(var(--t) * 1.15) ease-in, rotate calc(var(--t) * 1.15) ease-in, z-index 0s linear calc(var(--t) * .7),
    filter 220ms ease, opacity 200ms ease, top var(--step-t, 0ms) ease-out;
  padding-top: calc(var(--card-w) * .16 * var(--under, 0)); }
/* The pile under the pointer rises and floats as one, in its order; each card drifts a little its own way (the slot's --vx and --vy), so it reads as cards
   rather than a block. */
.rm-field__row.group .slot.hot { z-index: calc(40 + var(--z, 1)); }
.rm-field__row.group .slot.hot > :is(.rm-card, .tuck > .rm-card):not(.under) { scale: 1.05; --float-y: -4px; --amp: 1;
  filter: brightness(1.08) drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
/* Cards a permanent exiled until it leaves, or imprinted (`battlefield::Under`): tucked under
   it and darker, each peeking out above the one before, as the bundle's rm-attach tucks an
   aura. Hovering one brings it up to full brightness and previews it. */
.slot > .rm-card:not(.under) { z-index: 1; }
/* An Equipment or Aura tucked behind its host (`battlefield`'s `tucked`, board fit spec 1.6), as
   the bundle's rm-attach tucks an aura: each a step up and right of the one before, the oldest
   nearest, its top showing. The slot's margins hold the group (`tuck_margins`). Hovered, it comes
   up in front of its host. */
.tuck { position: absolute; z-index: calc(0 - var(--i)); top: calc(var(--card-w) * -.16 * (var(--i) + 1));
  left: calc(var(--card-w) * .08 * (var(--i) + 1)); display: flex; }
.tuck:has(> .rm-card:is(:hover, .is-open)) { z-index: 3; }
/* A pile's count, on its front card (`Card`'s count): a dark chip in the bottom right corner
   with a stack of two cards drawn before the number, part of the card, so it moves with it. */
.rm-card__count { position: absolute; z-index: 3; right: 6%; bottom: 5%; display: inline-flex; align-items: center;
  gap: 5px; padding: 2px 7px 2px 6px; border-radius: 999px; pointer-events: none;
  background: color-mix(in srgb, #0b0d12 82%, transparent); color: #f2f4f8;
  font: 700 13px/16px var(--font-display); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 1px color-mix(in srgb, #fff 18%, transparent), 0 2px 6px rgba(0, 0, 0, .5); }
.rm-card__count i { position: relative; width: 8px; height: 11px; margin: 1px 2px 0 0; border-radius: 2px;
  background: currentColor; box-shadow: 2px -2px 0 -0.5px #0b0d12, 3px -3px 0 -0.5px currentColor; }
/* A card on the battlefield under the pointer floats up a little, in front of its neighbours,
   and tilts toward the pointer as hand cards do (--px and --py, ADR 0067). A tapped card is
   turned a quarter, so the pointer's across and down drive its other axes. The drop-shadow
   filter leaves the glows (`box-shadow`) as they are. While its menu is open (`.is-open`) it
   stays up, and when the hover ends it eases back more slowly than it follows the pointer. */
.rm-field :is(.slot, .tuck) > .rm-card:not(.under) { --px: .5; --py: .5;
  translate: calc(var(--fx) * var(--amp) * var(--vx, 1)) calc(var(--fy) * var(--amp) * var(--vy, 1) + var(--float-y));
  transition: transform 160ms ease-out, margin var(--tap-t, 160ms) linear, box-shadow 250ms ease,
    scale 160ms ease-out, filter var(--stack-fade, 160ms) ease-out, --amp 220ms ease-out, --float-y 160ms ease-out; }
.rm-field :is(.slot, .tuck) > .rm-card:not(.under):is(:hover, .is-open) { z-index: 2; scale: 1.05; --float-y: -4px; --amp: 1;
  filter: brightness(1.08) drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
  transition: transform 90ms ease-out, margin var(--tap-t, 160ms) linear, box-shadow 250ms ease,
    scale 120ms ease, filter 120ms ease, --amp 300ms ease, --float-y 160ms ease;
  transform: perspective(500px) rotateX(calc((.5 - var(--py)) * 14deg)) rotateY(calc((var(--px) - .5) * 14deg)); }
/* What auto-pay would tap floats as a hovered card does, a little up, so you can see which. */
.rm-field :is(.slot, .tuck) > .rm-card.is-paying:not(.under) { --amp: 1; --float-y: -3px; }
.rm-board:not([data-tapped=tilted]) .rm-field :is(.slot, .tuck) > .rm-card.is-tapped:not(.under):is(:hover, .is-open) {
  transform: perspective(500px) rotateX(calc((var(--px) - .5) * 14deg)) rotateY(calc((var(--py) - .5) * 14deg)); }
.rm-card.under { position: absolute; z-index: 0; top: calc(var(--card-w) * .16 * (var(--under) - 1 - var(--i)));
  left: calc(var(--card-w) * .08 * (var(--i) + 1)); filter: brightness(.55) saturate(.75);
  transition: filter 120ms ease; }
.rm-card.under:hover { filter: none; }

/* Card tops (`WhenFull::Tops`, board fit spec 1.5, Task 3): past the floor every permanent is
   the top of its real card, down to just below the type line (`fit::TOP`), cropped from the
   Scryfall image so it keeps the card's own frame. A tapped top tilts and dims whatever the
   tapped look (note 02), and the text bands hide (note 03): P/T, loyalty, counters, damage, New
   and the pile count stay. Cards tucked behind (attachments) or under a permanent are tops too.
   Hover, Z and right-click show the whole card.
   ponytail: Sagas, Rooms and battles crop to their literal top, not their name and art; a
   per-layout crop when one shows wrong. */
.rm-field.is-tops .rm-field__row :is(.slot, .tuck) > .rm-card { aspect-ratio: auto; height: calc(var(--card-w) * 88 / 63 * .62); }
.rm-field.is-tops .rm-field__row :is(.slot, .tuck) > .rm-card .rm-card__face { object-position: top; }
.rm-field.is-tops [data-area=walkers] { grid-template-rows: repeat(auto-fill, minmax(calc(var(--back-w) * 88 / 63 * .62), auto)); }
.rm-field.is-tops .rm-field__row :is(.slot, .tuck) > .rm-card .rm-card__badge:is(.granted, .exiled, .chosen, .level, .copy, .melded, .face-down) { display: none; }
.rm-field.is-tops .rm-field__row :is(.slot, .tuck) > .rm-card.is-tapped:not(.under) { rotate: 12deg; margin: 0; filter: brightness(.7); }
.rm-field.is-tops .rm-field__row :is(.slot, .tuck) > .rm-card:is(.is-tapping, .is-untapping) { animation: enter var(--enter) ease-out; }
.rm-field.is-tops .rm-field__row :is(.slot, .tuck) > .rm-card.is-tapped:not(.under):is(:hover, .is-open) {
  transform: perspective(500px) rotateX(calc((.5 - var(--py)) * 14deg)) rotateY(calc((var(--px) - .5) * 14deg)); }

/* Combat on the one board (board fit spec §2, Task 14). Each half keeps a step of room in front
   of its creatures, toward the middle (`fit::STEP`, note 05), and an attacker or blocker steps
   into it (`.is-forward`), quickly unless motion is reduced. */
.rm-field { --step: .18; }
.rm-field [data-area=creatures] { box-sizing: border-box; }
.rm-field__half.mine [data-area=creatures] { padding-top: calc(var(--field-w) * var(--step)); }
.rm-field__half.opp [data-area=creatures] { padding-bottom: calc(var(--field-w) * var(--step)); }
.rm-field__half.mine .slot.is-forward { top: calc(var(--card-w) * var(--step) * -1); }
.rm-field__half.opp .slot.is-forward { top: calc(var(--card-w) * var(--step)); }
@media (prefers-reduced-motion: no-preference) { .rm-field { --step-t: 180ms; } }
/* A row with blockers in it is placed (`battlefield::place`, note 06): each pile's margins set,
   from the row's left edge (the design system's row centres), no gap, and the blockers' line
   nearest the middle. Cards move by the slide alone, so no margin eases under it. */
.rm-field__row.is-placed { gap: 0; justify-content: flex-start; }
.rm-field__row.is-placed > .slot { --tap-t: 0ms; }
.rm-field__half.opp .rm-field__row.is-placed { flex-wrap: wrap-reverse; }
/* While you declare, what can attack or block glows and the rest quiets: darkened, not see-through,
   so a pile's back cards don't show through its front one. */
.rm-field.is-declaring :is(.slot, .tuck) > .rm-card:not(.under, .is-playable, .is-target, .is-attacking, .is-blocking, .is-selected) {
  filter: brightness(.5) saturate(.6); }
/* What a creature in combat says (`battlefield::CombatMarks`): "Unblocked → Opponent" on an
   attacker no one blocks, and what each blocker takes while damage is assigned. */
.slot > .rm-mark { position: absolute; z-index: 4; left: 50%; top: 38%; translate: -50% 0; padding: 2px 7px;
  border-radius: 8px; font: 600 11px/14px var(--font-ui); white-space: nowrap; pointer-events: none; }
.rm-mark--unblocked { background: color-mix(in srgb, #0b0d12 82%, transparent); color: var(--attack); }
.rm-mark--takes { top: 18%; background: var(--rope); color: var(--on-rope); }

/* Cards (rm-card): the design system's placeholder face, with the Scryfall image over it once
   it loads. The bundle fixes a card's width; here it's --card-w, set by where it sits. */
.rm-card {
  --card-w-battlefield: var(--card-w);
  --card-w-hand: var(--card-w);
  /* Its layers (the auto-pay pulse, labels) stay inside it, under the cards in front. */
  isolation: isolate;
  transition: transform 120ms ease, rotate 120ms ease, margin 120ms ease, box-shadow 250ms ease;
}
.rm-card__face { transition: opacity 150ms; }
.rm-card__face.is-loading { opacity: 0; }
.rm-card.is-back {
  border: 1px solid var(--edge);
  background:
    radial-gradient(circle at 50% 50%, transparent 28%, color-mix(in srgb, var(--accent) 33%, transparent) 29%, color-mix(in srgb, var(--accent) 33%, transparent) 31%, transparent 32%),
    repeating-linear-gradient(45deg, var(--card-stripe) 0 6px, var(--card-lo) 6px 12px);
}
.rm-card.is-entering { animation: enter var(--enter) ease-out; }
@keyframes enter { from { opacity: 0; translate: 0 10px; } }
/* Tapping, as the settings say (`TapFx`: the board's --tap names the animation, `tap-off`
   names none, over --tap-t). A turned card's box is shorter, and its margins and its pile's
   change linearly over the same time, so its middle moves straight to where it rests; on the
   way each animation lifts it by at least as much as its corners would reach below where its
   foot rested, so a tap never makes the battlefield scroll. The keyframes come from a small
   script that works that lift out from the card's shape (with the PR that added them).
   Untapping plays it backwards. Listed with `enter`, so that isn't replayed when the turn's
   class goes. */
.rm-card.is-tapping { animation: enter var(--enter) ease-out, var(--tap, tap-turn) var(--tap-t, 160ms) linear; }
.rm-card.is-untapping { animation: enter var(--enter) ease-out, var(--tap, tap-turn) var(--tap-t, 160ms) linear reverse; }
/* Reduced motion taps as the "None" setting does: the card is just turned (notes 04). */
@media (prefers-reduced-motion: reduce) {
  .rm-card.is-tapping, .rm-card.is-untapping { animation: enter var(--enter) ease-out; }
}
@keyframes tap-turn {
  0.0% { rotate: 0.0deg; translate: 0 calc(var(--card-w) * -0.000); }
  2.0% { rotate: 5.3deg; translate: 0 calc(var(--card-w) * -0.143); }
  5.0% { rotate: 12.8deg; translate: 0 calc(var(--card-w) * -0.206); }
  10.0% { rotate: 24.4deg; translate: 0 calc(var(--card-w) * -0.237); }
  20.0% { rotate: 43.9deg; translate: 0 calc(var(--card-w) * -0.237); }
  30.0% { rotate: 59.1deg; translate: 0 calc(var(--card-w) * -0.234); }
  40.0% { rotate: 70.6deg; translate: 0 calc(var(--card-w) * -0.188); }
  50.0% { rotate: 78.8deg; translate: 0 calc(var(--card-w) * -0.120); }
  60.0% { rotate: 84.2deg; translate: 0 calc(var(--card-w) * -0.059); }
  70.0% { rotate: 87.6deg; translate: 0 calc(var(--card-w) * -0.017); }
  80.0% { rotate: 89.3deg; translate: 0 calc(var(--card-w) * -0.006); }
  90.0% { rotate: 89.9deg; translate: 0 calc(var(--card-w) * -0.025); }
  100.0% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.000); }
}
@keyframes tap-snap {
  0.0% { rotate: 0.0deg; translate: 0 calc(var(--card-w) * -0.000); }
  2.0% { rotate: 0.5deg; translate: 0 calc(var(--card-w) * -0.070); }
  5.0% { rotate: 2.9deg; translate: 0 calc(var(--card-w) * -0.114); }
  8.3% { rotate: 7.6deg; translate: 0 calc(var(--card-w) * -0.225); }
  16.7% { rotate: 26.4deg; translate: 0 calc(var(--card-w) * -0.244); }
  25.0% { rotate: 51.0deg; translate: 0 calc(var(--card-w) * -0.244); }
  33.3% { rotate: 75.6deg; translate: 0 calc(var(--card-w) * -0.221); }
  41.7% { rotate: 94.4deg; translate: 0 calc(var(--card-w) * -0.067); }
  50.0% { rotate: 102.0deg; translate: 0 calc(var(--card-w) * -0.067); }
  58.3% { rotate: 96.9deg; translate: 0 calc(var(--card-w) * -0.067); }
  66.7% { rotate: 88.4deg; translate: 0 calc(var(--card-w) * -0.026); }
  75.0% { rotate: 86.6deg; translate: 0 calc(var(--card-w) * -0.018); }
  83.3% { rotate: 91.1deg; translate: 0 calc(var(--card-w) * -0.026); }
  91.7% { rotate: 91.4deg; translate: 0 calc(var(--card-w) * -0.026); }
  100.0% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.000); }
}
@keyframes tap-lift {
  0.0% { rotate: 0.0deg; translate: 0 calc(var(--card-w) * -0.000); scale: 1.000; }
  2.0% { rotate: 0.0deg; translate: 0 calc(var(--card-w) * -0.060); scale: 1.003; }
  5.0% { rotate: 0.0deg; translate: 0 calc(var(--card-w) * -0.098); scale: 1.016; }
  8.3% { rotate: 0.0deg; translate: 0 calc(var(--card-w) * -0.183); scale: 1.038; }
  16.7% { rotate: 0.2deg; translate: 0 calc(var(--card-w) * -0.331); scale: 1.093; }
  25.0% { rotate: 6.7deg; translate: 0 calc(var(--card-w) * -0.444); scale: 1.100; filter: drop-shadow(0 16px 14px rgba(0, 0, 0, .5)); }
  33.3% { rotate: 20.1deg; translate: 0 calc(var(--card-w) * -0.496); scale: 1.100; filter: drop-shadow(0 16px 14px rgba(0, 0, 0, .5)); }
  41.7% { rotate: 37.5deg; translate: 0 calc(var(--card-w) * -0.496); scale: 1.100; filter: drop-shadow(0 16px 14px rgba(0, 0, 0, .5)); }
  50.0% { rotate: 56.1deg; translate: 0 calc(var(--card-w) * -0.496); scale: 1.100; filter: drop-shadow(0 16px 14px rgba(0, 0, 0, .5)); }
  58.3% { rotate: 73.0deg; translate: 0 calc(var(--card-w) * -0.450); scale: 1.100; filter: drop-shadow(0 16px 14px rgba(0, 0, 0, .5)); }
  66.7% { rotate: 85.3deg; translate: 0 calc(var(--card-w) * -0.325); scale: 1.100; filter: drop-shadow(0 16px 14px rgba(0, 0, 0, .5)); }
  75.0% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.196); scale: 1.100; filter: drop-shadow(0 16px 14px rgba(0, 0, 0, .5)); }
  83.3% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.120); scale: 1.074; }
  91.7% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.062); scale: 1.026; }
  100.0% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.000); scale: 1.000; }
}
@keyframes tap-slam {
  0.0% { rotate: 0.0deg; translate: 0 calc(var(--card-w) * -0.000); scale: 1.000; }
  2.0% { rotate: 0.0deg; translate: 0 calc(var(--card-w) * -0.078); scale: 1.006; }
  5.0% { rotate: 0.1deg; translate: 0 calc(var(--card-w) * -0.141); scale: 1.030; }
  7.1% { rotate: 0.2deg; translate: 0 calc(var(--card-w) * -0.227); scale: 1.051; }
  14.3% { rotate: 1.6deg; translate: 0 calc(var(--card-w) * -0.325); scale: 1.080; }
  21.4% { rotate: 5.3deg; translate: 0 calc(var(--card-w) * -0.395); scale: 1.080; }
  28.6% { rotate: 12.6deg; translate: 0 calc(var(--card-w) * -0.469); scale: 1.080; }
  35.7% { rotate: 24.6deg; translate: 0 calc(var(--card-w) * -0.496); scale: 1.080; }
  42.9% { rotate: 42.6deg; translate: 0 calc(var(--card-w) * -0.483); scale: 1.080; }
  50.0% { rotate: 67.6deg; translate: 0 calc(var(--card-w) * -0.390); scale: 1.080; }
  57.1% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.227); scale: 1.070; }
  64.3% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.000); scale: 0.968; }
  71.4% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.000); scale: 0.949; }
  78.6% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.007); scale: 0.999; }
  85.7% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.015); scale: 1.019; }
  92.9% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.025); scale: 1.008; }
  100.0% { rotate: 90.0deg; translate: 0 calc(var(--card-w) * -0.000); scale: 1.000; }
}
@keyframes tap-whirl {
  0.0% { rotate: 0.0deg; translate: 0 calc(var(--card-w) * -0.000); }
  2.0% { rotate: 26.5deg; translate: 0 calc(var(--card-w) * -0.209); }
  5.0% { rotate: 64.2deg; translate: 0 calc(var(--card-w) * -0.209); }
  5.6% { rotate: 70.9deg; translate: 0 calc(var(--card-w) * -0.211); }
  11.1% { rotate: 134.0deg; translate: 0 calc(var(--card-w) * -0.228); }
  16.7% { rotate: 189.6deg; translate: 0 calc(var(--card-w) * -0.243); }
  22.2% { rotate: 238.3deg; translate: 0 calc(var(--card-w) * -0.243); }
  27.8% { rotate: 280.5deg; translate: 0 calc(var(--card-w) * -0.261); }
  33.3% { rotate: 316.7deg; translate: 0 calc(var(--card-w) * -0.273); }
  38.9% { rotate: 347.3deg; translate: 0 calc(var(--card-w) * -0.273); }
  44.4% { rotate: 372.8deg; translate: 0 calc(var(--card-w) * -0.302); }
  50.0% { rotate: 393.8deg; translate: 0 calc(var(--card-w) * -0.305); }
  55.6% { rotate: 410.5deg; translate: 0 calc(var(--card-w) * -0.305); }
  61.1% { rotate: 423.5deg; translate: 0 calc(var(--card-w) * -0.283); }
  66.7% { rotate: 433.3deg; translate: 0 calc(var(--card-w) * -0.220); }
  72.2% { rotate: 440.4deg; translate: 0 calc(var(--card-w) * -0.147); }
  77.8% { rotate: 445.1deg; translate: 0 calc(var(--card-w) * -0.085); }
  83.3% { rotate: 447.9deg; translate: 0 calc(var(--card-w) * -0.042); }
  88.9% { rotate: 449.4deg; translate: 0 calc(var(--card-w) * -0.018); }
  94.4% { rotate: 449.9deg; translate: 0 calc(var(--card-w) * -0.025); }
  100.0% { rotate: 450.0deg; translate: 0 calc(var(--card-w) * -0.000); }
}
/* Turned, a card is 1.4 card widths wide and one high: its margins make its box that size, so
   it lines up with untapped cards at the top. */
/* Turned with `rotate`, so `transform` stays free for the hover tilt. */
.rm-card.is-tapped {
  rotate: 90deg;
  margin-inline: calc(var(--card-w) * 0.2);
  margin-block: calc(var(--card-w) * -0.2);
}
.rm-card:is(.is-playable, .is-target) { cursor: pointer; }
/* Tilted and faded (`TappedLook::Tilted`, board fit spec 1.7, note 03): a tapped card turns a
   little and dims in its own upright box, easing there over the tap time, so tapping never moves
   a card. The tap animations are the turned look's. */
.rm-board[data-tapped=tilted] .rm-card.is-tapped { rotate: 12deg; margin: 0; filter: brightness(.7); }
.rm-board[data-tapped=tilted] .rm-card:is(.is-tapping, .is-untapping) { animation: enter var(--enter) ease-out; }
@media (prefers-reduced-motion: no-preference) {
  .rm-board[data-tapped=tilted] .rm-field :is(.slot, .tuck) > .rm-card:not(.under),
  .rm-field.is-tops .rm-field__row :is(.slot, .tuck) > .rm-card:not(.under) {
    transition: transform 160ms ease-out, rotate var(--tap-t, 160ms) ease,
      filter max(var(--tap-t, 160ms), var(--stack-fade, 0ms)) ease,
      box-shadow 250ms ease, scale 160ms ease-out, --amp 220ms ease-out, --float-y 160ms ease-out; }
}
/* The states' rings at twice the bundle's width, so they read at a glance. */
.rm-card:is(.is-playable, .is-target) { box-shadow: var(--glow-playable); }
.rm-card.is-selected { box-shadow: var(--glow-select); }
.rm-card.is-attacking { outline-width: 4px; }
.rm-card.is-blocking { outline-width: 4px; }
.rm-pile .rm-card.is-playable { box-shadow: 3px -3px 0 -0.5px var(--edge), 4px -4px 0 0 var(--accent), var(--glow-playable); }
.rm-panel.is-target { outline-width: 4px; }
/* "New" on the left, where Board draws it, so a new creature with damage shows both (note 05). */
.rm-card__badge--new { left: 3px; right: auto; }
/* Keywords an effect gave it this turn, such as protection, across the lower middle, and the
   cards it exiled until it leaves, or imprinted, across the upper middle. The design system
   has no badge for either (note 07). */
.rm-card__badge.granted, .rm-card__badge.exiled { left: 3px; right: 3px; white-space: normal; text-align: center; color: #fff; }
.rm-card__badge.granted { bottom: 22px; background: #1d4f8ce6; }
.rm-card__badge.exiled { top: 34px; background: #4b2f6be6; }
/* On the battlefield the P/T box and every badge grow with the card, about a tenth of its
   width and never under 12px, so they read at a glance at any size (owner list 2026-11-14,
   #4). Offsets follow the card or the badge's own size, so they keep clear of each other. */
.rm-field .rm-card { --badge-fs: max(12px, calc(var(--card-w) * .1)); }
.rm-field .rm-card :is(.rm-card__pt, .rm-card__badge) { font-size: var(--badge-fs); line-height: 1.4; padding: 0 .35em; }
.rm-field .rm-card .rm-card__badge--counter { max-width: calc(100% - 3.4em); white-space: normal; }
.rm-field .rm-card :is(.rm-card__badge--damage, .rm-card__badge--new) { top: calc(var(--card-w) * .2); }
.rm-field .rm-card .rm-card__badge:is(.granted, .face-down) { bottom: calc(1.4em + 6px); }
.rm-field .rm-card .rm-card__badge:is(.exiled, .chosen, .level) { top: calc(var(--card-w) * .4); }
.rm-field .rm-card .rm-card__badge:is(.copy, .melded) { top: calc(var(--card-w) * .98); }
/* What was chosen as it entered, such as "Chosen: Island", where the exiled cards would be: no
   card both exiles until it leaves and chooses as it enters. */
.rm-card__badge.chosen { left: 3px; right: 3px; top: 34px; white-space: normal; text-align: center; color: #fff; background: #1e5c55e6; }
/* A Class's level, such as "Level 2", in the same place: no Class chooses as it enters. */
.rm-card__badge.level { left: 3px; right: 3px; top: 34px; text-align: center; color: #fff; background: #1e3f5ce6; }
/* A copy, under the copied card's image: "Copy · Phyrexian Metamorph", "Copy · Token", or
   "Copy" for a copy of a spell (ADR 0084). Below the chosen line, so a copy that chose as it
   entered shows both. */
.rm-card__badge.copy { left: 3px; right: 3px; top: 82px; white-space: normal; text-align: center; color: #fff; background: #3d3d46e6; }
/* A melded permanent's two cards (CR 713.1a), "Melded: Test Smith · Test Anvil", where a copy's
   tag would be: a copy of a melded permanent is one card. */
.rm-card__badge.melded { left: 3px; right: 3px; top: 82px; white-space: normal; text-align: center; color: #fff; background: #5c2a1ee6; }
/* A phased-out permanent (ADR 0095): still on the battlefield, but as though it weren't there
   until it phases in, so faded and not interactive. */
.slot.is-phased-out { opacity: .35; filter: grayscale(.6); pointer-events: none; }
/* A card exiled face down (foretold), across the lower middle, on its face or our back. */
.rm-card__badge.face-down { left: 3px; right: 3px; bottom: 22px; text-align: center; background: var(--ph-5); color: var(--strong); }
/* One permanent shown in play and in the picker: a faint outline on both copies, brighter
   on both while either is hovered. */
.rm-card.is-linked { outline: 4px dashed color-mix(in srgb, var(--pay) 55%, transparent); outline-offset: 3px; }
.rm-card.is-linked.is-hot { outline: 6px solid var(--pay); box-shadow: 0 0 16px var(--pay); }
/* What auto-pay would tap: the card's glow turns from gold to blue (the card's box-shadow
   transition), and a faint blue tint and extra glow pulse over it, starting from nothing so
   the change is gradual. */
.rm-card.is-paying { box-shadow: var(--pay-glow); }
.rm-card.is-paying::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background: color-mix(in srgb, var(--pay) 8%, transparent);
  box-shadow: var(--pay-glow);
  opacity: 0;
  animation: pay-pulse 2s ease-in-out infinite;
}
@keyframes pay-pulse {
  50% { opacity: 0.7; }
}
/* While the spell they'll pay for is being cast: stronger, so they stand out mid-cast. */
.rm-card.is-paying.is-committed { box-shadow: 0 0 0 6px var(--pay), 0 0 26px 6px var(--pay); }
.rm-card.is-paying.is-committed::after { background: color-mix(in srgb, var(--pay) 16%, transparent); animation-duration: 1.2s; }
@media (prefers-reduced-motion: reduce) {
  .rm-card.is-paying::after { animation: none; opacity: 0.4; }
}
.rm-card.is-suggested::before {
  content: "Suggested";
  position: absolute;
  top: -9px;
  left: 4px;
  z-index: 2;
  font-size: 9px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--on-accent);
}

/* A card's option menu, the brief's MenuA: a small raised panel beside its card that fades and
   grows in, with a header naming the card, sections, and rows of key · cost · effect, the one
   under the pointer or keys highlighted. */
.menu {
  position: fixed;
  /* Over the card preview (50), which opens beside the card the menu is for. */
  z-index: 52;
  min-width: 8rem;
  max-width: 22rem;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px #0004, 0 10px 24px -4px #0006;
  outline: none;
  /* Large (Settings, Card menus) scales it whole; `beside` measures the scaled box (note 02). */
  transform: scale(var(--menu-size, 1));
  transform-origin: top left;
  animation: menu-in 120ms ease-out;
}
@keyframes menu-in { from { opacity: 0; scale: 0.95; } }
.rm-board .menu button {
  display: grid;
  grid-template-columns: 1.1em auto 1fr;
  align-items: center;
  column-gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  background: none;
  color: var(--text);
  cursor: default;
}
.rm-board .menu button.lit { background: color-mix(in srgb, var(--text) 10%, transparent); }
.menu .header {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 8px;
  align-items: center;
  padding: 4px 6px 6px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.menu .header .art {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--edge) 50% 24% / 190% auto no-repeat;
  border: 1px solid var(--line);
}
.menu .header b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .header .place { font-size: 12px; color: var(--muted); }
.menu .section {
  padding: 6px 8px 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.menu .key { font: 600 12px ui-monospace, monospace; color: var(--muted); text-align: center; }
.menu .cost { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; }
/* A row's cost and words: side by side, the words under the cost when both don't fit. */
.rm-board .menu button:has(> .line) { grid-template-columns: 1.1em 1fr; }
.menu .line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.menu .line > .effect { flex: 1 1 11em; min-width: 0; }
.menu .cost .chip { white-space: normal; }
.menu .sym { width: 18px; height: 18px; font-size: 10px; }
.menu .effect { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.menu .effect .sym { width: 16px; height: 16px; font-size: 9px; }
/* A loyalty change, as on the card's loyalty badge. */
.menu .loyalty {
  min-width: 22px;
  padding: 0 4px;
  border-radius: 4px 4px 9px 9px;
  font: 700 12px/18px var(--font-display, inherit);
  text-align: center;
  background: var(--raised);
  border: 1px solid var(--line);
}
.rm-board .menu button.dimmed { color: var(--muted); }
.menu button.dimmed .cost { opacity: .5; }
.menu .why { grid-column: 2 / -1; font-size: 12px; font-style: italic; }
/* What auto-pay will spend for the lit row, in auto-pay's blue. It wraps to the menu's width
   and never widens it: a wider menu sets the rows' cost and words on one line, which moves the
   lit row from under the pointer, unlights it, and narrows the menu again. */
.menu .autopay {
  box-sizing: border-box;
  width: 0;
  min-width: 100%;
  margin-top: 2px;
  padding: 6px 8px 2px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: color-mix(in srgb, var(--pay) 75%, var(--text));
}
.menu .autopay .sym { width: 15px; height: 15px; font-size: 9px; vertical-align: -3px; }
/* The right-click card popover (spec 2026-10-20 right-click card menu): the card as text at the
   pointer, styled like the menu. Header, Oracle text (the viewer's own abilities are buttons),
   Right now, Rulings and the items. */
.popover {
  position: fixed;
  z-index: 52;
  width: 360px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px #0004, 0 10px 24px -4px #0006;
  outline: none;
  color: var(--text);
  animation: menu-in 120ms ease-out;
}
/* While a sheet is open (the Play sheet's sample pack), a card's zoom, menu and popover go over
   its scrim (`--z-overlay`), keeping their order: the menus over the zoom. */
:root:has(.rm-scrim) .preview.rm-card { z-index: calc(var(--z-overlay) + 1); }
:root:has(.rm-scrim) :is(.popover, .menu) { z-index: calc(var(--z-overlay) + 2); }
.popover .head {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  column-gap: 10px;
  align-items: center;
  padding: 6px 8px 8px;
  border-bottom: 1px solid var(--line);
}
.popover .head .art {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--edge) 50% 24% / 190% auto no-repeat;
  border: 1px solid var(--line);
}
.popover .head .name { font: 600 15px var(--font-display, inherit); color: var(--strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popover .head .cost { display: inline-flex; gap: 2px; }
.popover .head .type { grid-column: 2 / -1; font-size: 12px; color: var(--muted); }
/* Power and toughness at the type line's end, where the card prints them. */
.popover .head .type:has(+ .pt) { grid-column: 2; }
.popover .head .pt { grid-column: 3; justify-self: end; padding: 0 6px; border-radius: 4px; background: var(--raised);
  font: 700 13px/18px var(--font-ui); color: var(--strong); font-variant-numeric: tabular-nums; }
/* What a copy copies and what it is (ADR 0084), under the type line. */
.popover .head .copy { grid-column: 2 / -1; font-size: 12px; color: var(--muted); font-style: italic; }
/* Set on the text's bottom edge, which centres the symbol on the words; -3px sat it low. */
.popover .sym { width: 16px; height: 16px; font-size: 9px; vertical-align: text-bottom; }
.popover .text { padding: 6px 4px; }
.popover .face { margin: 6px 8px 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.popover .para { margin: 0; padding: 4px 8px; font-size: 14px; line-height: 1.4; color: var(--strong); white-space: pre-line; }
.popover button.para {
  display: grid;
  grid-template-columns: 1.1em 1fr;
  column-gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 4px;
  text-align: left;
  font: inherit;
  font-size: 14px;
  background: none;
  cursor: default;
}
.popover button.para:is(:hover, :focus-visible) { background: color-mix(in srgb, var(--text) 10%, transparent); }
.popover button.para.dimmed { color: var(--muted); }
.popover .key { font: 600 12px ui-monospace, monospace; color: var(--muted); text-align: center; }
.popover .why { display: block; grid-column: 2; font-size: 12px; font-style: italic; color: var(--muted); }
.popover .loyalty {
  display: inline-block;
  min-width: 22px;
  padding: 0 4px;
  border-radius: 4px 4px 9px 9px;
  font: 700 12px/18px var(--font-display, inherit);
  text-align: center;
  background: var(--raised);
  border: 1px solid var(--line);
}
.popover h4 { margin: 0; padding: 6px 8px 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.popover .now-section { padding: 2px 0 6px; border-top: 1px solid var(--line); }
.popover .row { display: grid; grid-template-columns: 76px 1fr; column-gap: 8px; padding: 2px 8px; font-size: 13px; }
.popover .row .label { font-size: 12px; color: var(--muted); }
.popover .row .values { display: flex; flex-wrap: wrap; gap: 4px; }
.popover .now { color: var(--clock); font-weight: 600; }
.popover .was { color: var(--muted); }
.popover .chip { border-radius: 4px; padding: 0 5px; background: var(--raised); font-weight: 600; line-height: 18px; }
.popover .chip.given { background: none; border: 1px dashed var(--line); font-weight: 400; }
.popover .rulings { border-top: 1px solid var(--line); padding: 4px 8px; font-size: 13px; }
.popover .rulings summary { cursor: default; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.popover .ruling { margin: 6px 0; line-height: 1.4; }
.popover .date, .popover .faint { font-size: 11px; color: var(--muted); opacity: .8; }
.popover .items { margin-top: 2px; padding-top: 4px; border-top: 1px solid var(--line); }
.popover .item {
  display: grid;
  grid-template-columns: 1.1em 1fr auto;
  column-gap: 8px;
  align-items: center;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  text-align: left;
  font: inherit;
  font-size: 14px;
  background: none;
  color: var(--text);
  text-decoration: none;
  cursor: default;
}
.popover .item:is(:hover, :focus-visible) { background: color-mix(in srgb, var(--text) 10%, transparent); }
.popover .item.dimmed { color: var(--muted); }
.popover .item .icon { text-align: center; color: var(--muted); }
.popover .item .toggle { width: 26px; height: 14px; border-radius: 7px; background: var(--raised); border: 1px solid var(--line); position: relative; }
.popover .item .toggle::after { content: ""; position: absolute; top: 1px; left: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); transition: translate 120ms ease-out; }
.popover .item[aria-checked="true"] .toggle { background: var(--accent); border-color: var(--accent); }
.popover .item[aria-checked="true"] .toggle::after { translate: 12px 0; background: var(--on-accent, #fff); }
/* Compact: a short menu, with the card's text or rulings in a panel beside it. */
.popover.compact { width: 280px; overflow: visible; max-height: none; }
.popover .abilities:not(:empty) { padding: 4px 0; }
.popover .abilities .cost { display: inline-flex; gap: 2px; vertical-align: -3px; }
.popover .item.lit { background: color-mix(in srgb, var(--text) 10%, transparent); }
.popover .side {
  position: absolute;
  top: -1px;
  left: calc(100% + 8px);
  width: 340px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px #0004, 0 10px 24px -4px #0006;
}
.popover .side.left { left: auto; right: calc(100% + 8px); }
.popover .side .ruling { padding: 0 8px; }
.rm-log__line.is-flashed { animation: log-flash 1.6s ease-out; }
@keyframes log-flash { from { background: color-mix(in srgb, var(--accent) 35%, transparent); } }
/* The Cards style (`ability_cards`, spec 2026-10-20 ability picker): the options rise from the
   pointer as cards in a row, design-system panels with the card's art across the top, the cost
   on a badge at the art's foot and the ability's Oracle text below. Bottoms line up; a card
   grows for long text. Each starts at the pointer and rises into place, 40 ms after the one
   before, with no overshoot; under reduced motion they only fade in. Large scales the whole
   row from the pointer. */
.ability-scrim { position: fixed; inset: 0; z-index: 51; background: rgba(11, 12, 16, .3);
  pointer-events: none; animation: menu-in var(--dur-base, 180ms) ease-out; }
.ability-cards {
  position: fixed; left: 0; z-index: 52;
  display: flex; flex-direction: column-reverse; gap: 10px;
  pointer-events: none; outline: none;
  transform: scale(var(--menu-size, 1));
}
.ac-row { display: flex; gap: 10px; align-items: flex-end; }
.ac {
  position: relative; flex: none; width: 152px; min-height: calc(152px * 88 / 63);
  display: flex; flex-direction: column; box-sizing: border-box; pointer-events: auto;
  background: var(--panel-float); border: 1px solid var(--line); border-radius: var(--radius-lg, 10px);
  box-shadow: var(--shadow-float);
  transform-origin: 50% 100%;
  animation: ac-in var(--dur-slow, 240ms) var(--ease-out, ease-out) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
@keyframes ac-in { from { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, 24px)) scale(.3); } }
@keyframes ac-fade { from { opacity: 0; } }
@keyframes ac-shake { 25% { translate: -5px 0; } 75% { translate: 5px 0; } }
/* The shake joins the entrance rather than replacing it, so the entrance doesn't replay. */
.ac.shake {
  animation: ac-in var(--dur-slow, 240ms) var(--ease-out, ease-out) both, ac-shake var(--dur-slow, 240ms);
  animation-delay: calc(var(--i, 0) * 40ms), 0s;
}
@media (prefers-reduced-motion: reduce) {
  .ac, .ac.shake { animation: ac-fade var(--dur-slow, 240ms) var(--ease-out, ease-out) both; }
}
.ac.mana { min-height: 0; }
.ac.lit { border-color: var(--accent); box-shadow: var(--glow-playable), var(--shadow-float); z-index: 1; }
.rm-board .ability-cards .ac-hit {
  flex: 1; display: flex; flex-direction: column; width: 100%; padding: 0; margin: 0;
  border: 0; background: none; color: var(--text); font: inherit; text-align: center; cursor: pointer;
}
.ac .art {
  position: relative; flex: none; height: 64px; border-radius: 9px 9px 0 0;
  background: var(--edge) 50% 30% / cover no-repeat; border-bottom: 1px solid var(--line);
}
.ac .key {
  position: absolute; left: 4px; top: 4px; min-width: 18px; padding: 0 4px; box-sizing: border-box;
  border-radius: var(--radius-sm, 4px); background: var(--panel); color: var(--text);
  font: 500 12px/18px var(--font-mono, ui-monospace, monospace);
}
.ac .key:empty { display: none; }
.ac .badge {
  position: absolute; left: 50%; bottom: 0; translate: -50% 50%;
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  min-height: 24px; padding: 2px 7px; box-sizing: border-box; border-radius: var(--radius-pill, 999px);
  background: var(--raised); border: 1px solid var(--line-control); color: var(--strong);
  font: 700 13px/18px var(--font-display, inherit);
}
.ac .badge:empty { display: none; }
.ac .badge .sym { width: 16px; height: 16px; font-size: 9px; }
.ac .badge .loyalty { font: inherit; }
.ac .tx {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 20px 12px 8px; white-space: pre-line;
  font: 500 13px/1.3 var(--font-ui, inherit); color: var(--text);
}
.ac .tx .sym { width: 15px; height: 15px; font-size: 9px; vertical-align: -2px; }
.ac .tx .sym.big { width: 34px; height: 34px; font-size: 16px; }
.ac.mana .tx { padding-bottom: 12px; }
.ac .why { padding: 0 8px 8px; font: italic 12px var(--font-ui, inherit); color: var(--muted); }
.ac.dimmed .ac-hit { cursor: not-allowed; }
.ac.dimmed .art { opacity: .4; filter: grayscale(1); }
.ac.dimmed .tx { color: var(--muted); }
.ac.dimmed .badge { color: var(--muted); border-color: var(--line); }
.ac .taps { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; padding: 0 8px 8px; }
.ac .taps > span { align-self: center; margin-right: 2px; font-size: 11px; color: var(--muted); }
/* The mode picker (spec 2026-11-10 mode picker): a chosen mode is ticked, its count past one
   on the badge, and the bar under the cards (or the List's last row) counts them and holds
   Confirm. */
.ac.ticked { border-color: var(--accent); box-shadow: var(--glow-playable), var(--shadow-float); }
.ac.ticked .art::after {
  content: "\2713"; position: absolute; right: 4px; top: 4px; min-width: 18px;
  border-radius: var(--radius-sm, 4px); background: var(--accent); color: var(--on-accent);
  font: 700 12px/18px var(--font-ui, inherit); text-align: center;
}
.mode-bar {
  align-self: center; pointer-events: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px;
  padding: 8px 12px; background: var(--panel-float); border: 1px solid var(--line);
  border-radius: var(--radius-lg, 10px); box-shadow: var(--shadow-float);
  font: 500 13px var(--font-ui, inherit); color: var(--text);
}
.mode-bar .extra { color: var(--muted); }
.mode-bar .why { flex-basis: 100%; text-align: center; font: italic 12px var(--font-ui, inherit); color: var(--muted); }
.mode-bar button:disabled { opacity: .5; cursor: not-allowed; }
.menu .mode-bar {
  justify-content: flex-start; margin-top: 2px; padding: 6px 8px 2px;
  background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none;
}
.menu .mode-bar .why { text-align: left; }
.rm-board .menu .mode-bar button {
  display: inline-flex; gap: 6px; width: auto; padding: 4px 10px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; cursor: pointer;
}
.menu .tick {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  box-sizing: border-box; border: 1px solid var(--line-control); border-radius: var(--radius-sm, 4px);
  font: 700 11px/1 var(--font-ui, inherit);
}
.menu .tick.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rm-board .ac .taps button {
  min-width: 20px; height: 20px; padding: 0 4px; border: 1px solid var(--line); border-radius: var(--radius-sm, 4px);
  background: var(--panel); color: var(--text); font: 500 11px/18px var(--font-mono, ui-monospace, monospace); cursor: pointer;
}
.rm-board .ac .taps button:is(:hover, :focus-visible) { border-color: var(--accent); color: var(--strong); }

/* A Mana row (`mana_row`): the row's button, and in a pile "Tap 1 … N" under its words, in the
   effect's column (spec 2026-10-20 ability picker). The row taps one; a number taps that many. */
.menu .mana-row { display: grid; grid-template-columns: 1fr; }
.menu .mana-row .taps {
  display: flex; flex-wrap: wrap; align-items: center; gap: 3px;
  padding: 0 8px 6px calc(1.1em + 8px + 8px);
}
.menu .mana-row .taps > span { margin-right: 2px; font-size: 12px; color: var(--muted); }
.rm-board .menu .mana-row .taps button {
  display: inline-block; width: auto; min-width: 22px; height: 22px; padding: 0 5px;
  border: 1px solid var(--line); border-radius: var(--radius-sm, 4px);
  background: var(--panel-float); color: var(--text);
  font: 500 12px/20px var(--font-mono, ui-monospace, monospace); text-align: center; cursor: pointer;
}
.rm-board .menu .mana-row .taps button:is(:hover, :focus-visible) { border-color: var(--accent); color: var(--strong); }
/* Rows hold the ability's Oracle text, so they wrap and line up at their tops. */
.rm-board .menu button { align-items: start; }
.menu .effect { white-space: pre-line; }

/* The stack (`stack.rs`), a pile over the battlefield's left edge, beside the piles' column when
   they sit there. It floats over the board and takes no column, so permanents never move.
   Centred top to bottom by the first item (--pile-top, which holds while the chain is up), each
   item a name bar (--step) below the one before, newest in front and lowest; a long chain
   tightens the step to fit, down to 6 px, then scrolls with no bar showing (`stack::pile_step`).
   Minimised, it is a chip with its count. */
.stack {
  grid-area: field;
  justify-self: start;
  align-self: start;
  position: relative;
  z-index: 5;
  width: calc(var(--card-w) + 16px);
  margin: var(--pile-top, 36px) 0 0 calc(16px + var(--piles-w));
  max-height: calc(100% - var(--pile-top, 36px) - 8px);
  box-sizing: border-box;
  overflow: hidden auto;
  scrollbar-width: none;
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: calc(12px * var(--stack-s, 1));
}
.stack::-webkit-scrollbar { display: none; }
.rm-board:has(.rm-field[data-piles=right]) .stack { margin-left: 16px; }
.stack.empty { display: none; }
/* Only its contents take the pointer, so what's under the pile's empty foot stays reachable, such
   as the bar of a choice put aside while a spell is being cast. */
.stack { pointer-events: none; }
.stack > * { pointer-events: auto; }
/* While the prompt offers a permanent under the pile, and no stack item, the pile lets the
   pointer through to it (`see-through`, `stack::covers`), and fades while the pointer is over it
   (`peek`). Nothing moves. */
.stack { transition: opacity 160ms ease; }
.stack.see-through.peek { opacity: .35; }
.stack.see-through > * { pointer-events: none; }
.stack .head { display: flex; align-items: center; gap: 6px; }
.stack .head .lbl { font-weight: 700; }
.stack .count {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  text-align: center;
  font-weight: 700;
  background: var(--accent);
  color: var(--on-accent);
}
.stack .line { color: var(--muted); }
.stack .mark {
  flex: none;
  padding: 0 5px;
  border-radius: 8px;
  font-size: calc(10px * var(--stack-s, 1));
  font-weight: 700;
  background: var(--opp-mark);
  color: var(--on-mark);
}
.stack .mark.mine { background: var(--accent); color: var(--on-accent); }
.stack .fan { flex: none; display: grid; }
/* Every item in the fan's one cell, each a step lower than the one before, all in one column.
   An outline in its controller's colour tells whose it is. Hovering moves nothing. */
.stack .item {
  grid-area: 1 / 1;
  position: relative;
  z-index: var(--i);
  width: var(--card-w);
  margin: calc(var(--i) * var(--step)) 0 0;
  border-radius: var(--card-corner);
  cursor: pointer;
  outline: 2px solid var(--opp-mark);
  transition: opacity 200ms ease;
}
.stack .item.mine { outline-color: var(--you-mark); }
/* The lit item (`forward`: hovered, clicked or on top) keeps its place; arrows and tests read the
   class (`stack::StackPanel`). Your spell being cast waits at the head of the pile, outlined,
   while its targets and costs are chosen, "Being cast" under it, in room its margin keeps so
   the pile doesn't scroll for it. */
.stack .item.casting { z-index: 101; cursor: default; margin-bottom: 18px; }
.stack .item.casting .rm-card { box-shadow: var(--glow); animation: none; }
.stack .item .casting-tag { position: absolute; top: calc(100% + 2px); left: 0; font: 600 calc(10px * var(--stack-s, 1))/1.4 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); pointer-events: none; }
.stack .item:hover { filter: brightness(1.08); }
.stack .item .rm-card { pointer-events: none; box-shadow: 0 4px 10px #0007; }
.stack .tile {
  box-sizing: border-box;
  width: var(--card-w);
  aspect-ratio: 63 / 88;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  background: var(--panel);
  border: 2px dashed var(--edge);
  border-radius: 8px;
  box-shadow: 0 4px 10px #0007;
}
.stack .tile b { align-self: stretch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(13px * var(--stack-s, 1)); }
/* The source's art, cropped from its card image. */
.stack .tile .art {
  display: grid;
  place-items: center;
  width: calc(92px * var(--stack-s, 1));
  height: calc(92px * var(--stack-s, 1));
  border-radius: 50%;
  background: var(--edge) 50% 24% / 190% auto no-repeat;
  border: 2px solid var(--line);
  font: 700 calc(32px * var(--stack-s, 1)) var(--font-display);
  color: var(--muted);
}
.stack .tile .art[style*="url"] { color: transparent; }
.stack .item.mine .tile { border-color: color-mix(in srgb, var(--accent) 60%, var(--edge)); }
.stack .item.theirs .tile { border-color: color-mix(in srgb, var(--opp-mark) 60%, var(--edge)); }
/* An ability offered as a target glows as a card does, and takes the click. */
.stack .item.is-target { cursor: pointer; }
.stack .item.is-target .tile { box-shadow: var(--glow-playable); }
/* The hovered item's tooltip (`stack::tip`), left-aligned with the pile: under it where it fits,
   else above it, inside the field (`stack::tip_y` sets --tip-y, its top). Hovering moves
   nothing; it fades in at once. */
.stack-tip {
  grid-area: field;
  justify-self: start;
  align-self: start;
  position: relative;
  z-index: 7;
  box-sizing: border-box;
  width: calc(270px * var(--stack-s, 1));
  margin: var(--tip-y) 0 0 calc(16px + var(--piles-w) + 8px);
  padding: 8px 10px;
  border-left: 4px solid var(--opp-mark);
  border-radius: 8px;
  background: var(--raised);
  box-shadow: 0 6px 18px #0008;
  font-size: calc(12px * var(--stack-s, 1));
  pointer-events: none;
  animation: tip-in var(--dur-fast) var(--ease-out);
}
.stack-tip.mine { border-left-color: var(--you-mark); }
.rm-board:has(.rm-field[data-piles=right]) .stack-tip { margin-left: 24px; }
.rm-board:is(.stack-min, .peek) .stack-tip { display: none; }
.stack-tip .tip-head { display: flex; align-items: center; gap: 6px; }
.stack-tip .tip-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack-tip .mark { flex: none; padding: 0 5px; border-radius: 8px; font-size: calc(10px * var(--stack-s, 1)); font-weight: 700; background: var(--opp-mark); color: var(--on-mark); }
.stack-tip .mark.mine { background: var(--accent); color: var(--on-accent); }
.stack-tip .tip-kind { color: var(--muted); }
.stack-tip .tip-text { margin: 6px 0 0; white-space: pre-line; }
.stack-tip .tip-target { margin-top: 4px; color: var(--strong); }
.stack-tip .tip-kicked { margin-top: 4px; font-style: italic; }
.stack-tip .tip-who { margin-top: 4px; color: var(--muted); font-weight: 600; }
@keyframes tip-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .stack-tip { animation: none; } }
/* ---- Arrows (spec 2026-10-21 targeting arrows, "The look, in numbers") ---------------
   One layer over the whole table, above the battlefield and the stack fan, so arrows draw over
   their sources. Script writes each arrow's ends in the layer's px (--sx --sy --tx --ty) and
   --flip (`arrows::ArrowLayer`); CSS does the geometry and every look, keyed on the settings
   the layer carries as data attributes, and transitions do the motion (ADR 0067). */
@property --tx { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --ty { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --sx { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --sy { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --grow { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --flip { syntax: "<number>"; inherits: true; initial-value: 1; }
.arrows { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.arw {
  position: absolute;
  inset: 0;
  --c: var(--opp-mark);
  --aw: var(--w);
  --dx: calc((var(--tx) - var(--sx)) * var(--grow));
  --dy: calc((var(--ty) - var(--sy)) * var(--grow));
  --len: max(1, hypot(var(--dx), var(--dy)));
  --ang: atan2(var(--dy), var(--dx));
  filter: drop-shadow(0 0 calc(var(--glow) * 9px) color-mix(in srgb, var(--c) calc(var(--glow) * 100%), transparent))
    drop-shadow(0 1px 2px rgb(0 0 0 / .6));
  transition: --tx 40ms linear, --ty 40ms linear, --sx 160ms var(--ease-out), --sy 160ms var(--ease-out),
    --flip 220ms var(--ease-out), --grow var(--grow-t, 160ms) var(--ease-out) var(--grow-delay, 0ms);
}
/* An opponent's new arrow grows from nothing once its stack item has arrived (--reveal-delay),
   and its target takes the select ring (`is-aimed`) meanwhile. */
.arw.reveal { --grow-t: 400ms; --grow-delay: var(--reveal-delay, 0ms); }
.rm-card.is-aimed, .rm-panel.is-aimed, .stack .item.is-aimed, .stack .item .rm-card.is-aimed { box-shadow: var(--glow-select); }
/* A player a spell or ability on the stack targets: their tile takes a quieter select ring while
   its arrow, which ends on the tile's corner, shows (`players::PlayerPanel`). */
.rm-player.is-arrowed:not(.is-aimed, [data-mark]) { box-shadow: 0 0 0 2px var(--select); }
.rm-player.is-arrowed.is-active:not(.is-aimed, [data-mark]) { box-shadow: inset 3px 0 0 var(--opp-mark), 0 0 0 2px var(--select); }
/* A replay's move marks what it changed in gold and its targets in blue, steadily, with the
   looks of the playable glow and the select ring (replay Task 7 note 02). */
.rm-board :is(.rm-card, .rm-panel, .stack .item)[data-mark="changed"] { box-shadow: var(--glow-playable); }
.rm-board :is(.rm-card, .rm-panel, .stack .item)[data-mark="target"] { box-shadow: var(--glow-select); }
/* A replay's frame drawn at once: a step back, a jump or reduced motion (`replay::Replay::still`).
   It beats the slides' inline transitions too. */
.rm-board.is-still, .rm-board.is-still * { transition: none !important; animation: none !important; }
/* Under each stack item in a replay, who put it there and at what (`stack::who`). */
.stack .item .who {
  position: absolute;
  left: var(--space-1);
  right: var(--space-1);
  bottom: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--scrim);
  color: var(--strong);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
/* Colours: yours in your colour, your opponent's in theirs, combat's from the tokens. */
.arw.mine { --c: var(--accent); }
.arrows[data-colour="select"] .arw.mine:not(.attack, .block) { --c: var(--select); }
.arrows[data-colour="white"] .arw.mine:not(.attack, .block) { --c: #eef0f5; }
.arw.attack { --c: var(--attack); }
.arw.block { --c: var(--block); }
/* The body: a one-pixel SVG at the source, turned and stretched to the tip, its path bowed to
   the upper side; the stroke is --aw px on screen at any length. */
.arw .body {
  position: absolute;
  left: calc(var(--sx) * 1px);
  top: calc(var(--sy) * 1px);
  overflow: visible;
  transform-origin: 0 0;
  transform: rotate(var(--ang)) scale(var(--len)) scaleY(var(--flip));
  /* A flattened bow (|--flip| under 1) squeezes the stroke too; widen it back. */
  --fa: max(var(--flip), calc(var(--flip) * -1));
}
.arw .body path { fill: none; stroke: var(--c); stroke-linecap: round; stroke-width: calc(var(--aw) / var(--len) / var(--fa) * 1px); }
.arw .body stop { stop-color: var(--c); }
.arw .body :is(.under, .spark) { display: none; }
.arrows[data-body="beam"] .arw .under { display: inline; opacity: .22; stroke-width: calc(var(--aw) * 3 / var(--len) / var(--fa) * 1px); }
.arrows[data-body="beam"] .arw .core { stroke: color-mix(in srgb, var(--c), white 45%); stroke-width: calc(var(--aw) * .6 / var(--len) / var(--fa) * 1px); }
.arrows[data-body="comet"] .arw .core { stroke: var(--comet); stroke-width: calc(var(--aw) * 1.15 / var(--len) / var(--fa) * 1px); }
.arrows[data-body="dashes"] .arw .core { stroke-dasharray: calc(var(--aw) * 3 / var(--len) * 1px) calc(var(--aw) * 2.4 / var(--len) * 1px); }
.arrows[data-body="dots"] .arw .core { stroke-width: calc(var(--aw) * 1.3 / var(--len) / var(--fa) * 1px);
  stroke-dasharray: 0 calc(var(--aw) * 3 / var(--len) * 1px); }
/* The head, at the tip, turned by the curve's turn at its end so it lines up with the line. */
.arw .head {
  position: absolute;
  left: calc((var(--sx) + var(--dx)) * 1px);
  top: calc((var(--sy) + var(--dy)) * 1px);
  width: calc(var(--aw) * 3.2px + 7px);
  height: calc(var(--aw) * 3.2px + 7px);
  overflow: visible;
  transform-origin: 0 0;
  transform: rotate(calc(var(--ang) + var(--flip) * var(--endturn))) translate(-83.3%, -50%);
}
.arw .head :is(.tri, .chevron, .dot) { display: none; }
.arw .head .tri, .arw .head .dot { fill: var(--c); }
.arw .head .chevron { fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.arrows[data-head="triangle"] .arw .tri,
.arrows[data-head="chevron"] .arw .chevron,
.arrows[data-head="dot"] .arw .dot { display: inline; }
/* The tip on nothing, Ring: centred on the tip, shown by the live arrow in place of the head. */
.arw .ring {
  display: none;
  position: absolute;
  left: calc((var(--sx) + var(--dx)) * 1px);
  top: calc((var(--sy) + var(--dy)) * 1px);
  width: calc(var(--aw) * 3px + 10px);
  height: calc(var(--aw) * 3px + 10px);
  box-sizing: border-box;
  translate: -50% -50%;
  border: 2px solid var(--c);
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) 18%, transparent);
}
/* Spells behind the front one on the stack, and chosen arrows. */
.arrows[data-behind="dashed"] .arw.item:not(.fwd) .core { stroke-dasharray: calc(var(--aw) * 2.3 / var(--len) * 1px) calc(var(--aw) * 2 / var(--len) * 1px); }
.arrows[data-behind="dashed"] .arw.item:not(.fwd) { opacity: .35; }
.arrows[data-behind="dashed"] .arw.item:not(.fwd) .core { stroke-width: calc(var(--aw) * .5 / var(--len) / var(--fa) * 1px); }
.arw.item .core { transition: opacity 250ms, stroke-width 250ms, stroke-dasharray 250ms; }
.arw.item { transition: opacity 250ms; }
@media (prefers-reduced-motion: reduce) { .arw.item, .arw.item .core { transition: none; } }
.arrows[data-behind="faded"] .arw.item:not(.fwd) { opacity: .4; }
.arrows[data-behind="hidden"] .arw.item:not(.fwd) { display: none; }
.arrows[data-chosen="thinner"] .arw:not(.live) { --aw: calc(var(--w) * .65); }
.arrows[data-chosen="thinner"] .arw.item:not(.fwd) { opacity: .7; }
.arrows[data-chosen="hover-only"] .arw.item:not(.fwd) { display: none; }
/* The live arrow while you aim (`arrows::ArrowLayer`): the tip trails the pointer by 40 ms, and
   springs or eases onto a target over 140 ms, and off it again. It is placed still, then grows
   over 160 ms; backing out pulls it into its source and fades it over 140 ms. */
.arw.live:is(.snapped, .unsnap) {
  transition: --tx 140ms var(--snap-ease), --ty 140ms var(--snap-ease), --sx 160ms var(--ease-out),
    --sy 160ms var(--ease-out), --flip 220ms var(--ease-out), --grow 160ms var(--ease-out);
}
/* Backing out fades the arrow even while it breathes. */
.arrows[data-aiming] .arw.live.retract { opacity: 0; animation: none; transition: --grow 140ms var(--ease-in), opacity 140ms var(--ease-in); }
.arw.live.still { transition: none; }
/* On nothing, the tip is a Ring or a Dot in place of the head; Head keeps the head. */
.arrows:not([data-free="head"]) .arw.live:not(.snapped) .head { display: none; }
.arrows[data-free="ring"] .arw.live:not(.snapped) .ring { display: block; }
.arrows[data-free="dot"] .arw.live:not(.snapped) .ring { display: block; width: calc(var(--aw) * 2px + 4px);
  height: calc(var(--aw) * 2px + 4px); border: 0; background: var(--c); }
/* While aiming, the live arrow only, each over 1.6 s: Spark runs a short white light from source
   to tip (resting off the line), Flow moves Dashes or Dots toward the tip by one pattern, and
   Breathe eases the arrow between 100% and 70%. */
.arrows[data-aiming="spark"] .arw.live .spark { display: inline; stroke: #fff; opacity: .75;
  stroke-dasharray: .12 2; stroke-dashoffset: .13; animation: arw-spark 1.6s linear infinite; }
@keyframes arw-spark { to { stroke-dashoffset: -1.1; } }
.arrows[data-aiming="flow"][data-body="dashes"] .arw.live .core { animation: arw-flow-dashes 1.6s linear infinite; }
.arrows[data-aiming="flow"][data-body="dots"] .arw.live .core { animation: arw-flow-dots 1.6s linear infinite; }
@keyframes arw-flow-dashes { to { stroke-dashoffset: calc(var(--aw) * -5.4 / var(--len) * 1px); } }
@keyframes arw-flow-dots { to { stroke-dashoffset: calc(var(--aw) * -3 / var(--len) * 1px); } }
.arrows[data-aiming="breathe"] .arw.live { animation: arw-breathe 1.6s ease-in-out infinite; }
@keyframes arw-breathe { 50% { opacity: .7; } }
/* Legal targets while you choose (the board's data-legal): Breathe, a slow gold ring and glow
   (--breath, 0 to 1 and back over 2.4 s each way); Gold ring, today's playable ring; Soft, a
   faint ring and glow; None, no mark. The one under the arrow takes its own look instead. A
   card keeps its arrival animation in the list, so it doesn't replay when the breathing stops. */
@property --breath { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes breath { to { --breath: 1; } }
.rm-board[data-legal="breathe"] :is(.rm-card, .rm-panel).is-target:not(.is-aimed, .is-tapping, .is-untapping) {
  box-shadow: 0 0 0 calc(1px + var(--breath) * 2px) color-mix(in srgb, var(--accent) calc(40% + var(--breath) * 50%), transparent),
    0 0 calc(6px + var(--breath) * 12px) color-mix(in srgb, var(--accent) calc(15% + var(--breath) * 35%), transparent);
}
.rm-board[data-legal="breathe"] .rm-card.is-target:not(.is-aimed, .is-tapping, .is-untapping) {
  animation: enter var(--enter) ease-out, breath 2.4s ease-in-out infinite alternate; }
.rm-board[data-legal="breathe"] .rm-panel.is-target:not(.is-aimed) { animation: breath 2.4s ease-in-out infinite alternate; }
.rm-board[data-legal="soft"] :is(.rm-card, .rm-panel).is-target:not(.is-aimed) {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 12px color-mix(in srgb, var(--accent) 30%, transparent); }
.rm-board[data-legal="none"] :is(.rm-card, .rm-panel).is-target:not(.is-aimed) { box-shadow: none; }
.rm-board:not([data-legal="ring"]) .rm-panel.is-target { outline: none; }
/* The target under the arrow while you aim (the board's data-hover): Ring, the select ring
   above; Lift rises and grows it; Reticle closes four corner brackets in on it; Pulse sends a
   second ring out once. */
.rm-board.aiming[data-hover="lift"] :is(.rm-card, .rm-panel).is-aimed { translate: 0 -6px; scale: 1.04;
  box-shadow: 0 0 0 2px var(--select), 0 8px 16px rgb(0 0 0 / .5), 0 0 14px var(--select-glow); }
.rm-board.aiming:is([data-hover="reticle"], [data-hover="pulse"]) .rm-panel.is-aimed { position: relative; }
.rm-board.aiming[data-hover="reticle"] :is(.rm-card, .rm-panel).is-aimed { box-shadow: 0 0 0 1px var(--select); }
.rm-board.aiming[data-hover="reticle"] :is(.rm-card, .rm-panel).is-aimed::after {
  content: ""; position: absolute; inset: -9px; z-index: 3; pointer-events: none; opacity: 1; box-shadow: none;
  --b: linear-gradient(var(--select), var(--select));
  background: var(--b) left top / 14px 2px no-repeat, var(--b) left top / 2px 14px no-repeat,
    var(--b) right top / 14px 2px no-repeat, var(--b) right top / 2px 14px no-repeat,
    var(--b) left bottom / 14px 2px no-repeat, var(--b) left bottom / 2px 14px no-repeat,
    var(--b) right bottom / 14px 2px no-repeat, var(--b) right bottom / 2px 14px no-repeat;
  animation: reticle-in 180ms var(--ease-out); }
@keyframes reticle-in { from { scale: 1.18; opacity: 0; } }
.rm-board.aiming[data-hover="pulse"] :is(.rm-card, .rm-panel).is-aimed { box-shadow: 0 0 0 2px var(--select); }
.rm-board.aiming[data-hover="pulse"] :is(.rm-card, .rm-panel).is-aimed::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  background: none; box-shadow: 0 0 0 2px var(--select); opacity: 0; animation: aim-pulse 520ms var(--ease-out); }
@keyframes aim-pulse { from { opacity: 1; scale: 1; } to { opacity: 0; scale: 1.22; } }
/* While you aim, what can't be targeted dims over 200 ms: permanents, the stack's items and the
   life panels, never the source. The hand and the piles don't (spec, Decision 21). */
.rm-board .rm-player { transition: opacity 200ms ease; }
.rm-board.aiming .rm-field .slot:not(:has(> .rm-card:is(.is-target, .is-aim-from, .is-selected), > .tuck > .rm-card:is(.is-target, .is-aim-from, .is-selected))),
.rm-board.aiming .stack .item:not(:has(.rm-card:is(.is-target, .is-aim-from))),
.rm-board.aiming .rm-player:not(.is-target) { opacity: .6; }
/* Under reduced motion nothing breathes or pulses: each stops on its brightest frame. */
@media (prefers-reduced-motion: reduce) {
  .rm-board[data-legal="breathe"] .rm-card.is-target:not(.is-aimed, .is-tapping, .is-untapping) { --breath: 1; animation: enter var(--enter) ease-out; }
  .rm-board[data-legal="breathe"] .rm-panel.is-target:not(.is-aimed) { --breath: 1; animation: none; }
  .rm-board.aiming[data-hover] :is(.rm-card, .rm-panel).is-aimed::after { animation: none; opacity: 1; }
}
/* Holding H hides every arrow; a minimised stack hides its own. */
.rm-board.peek .arrows { display: none; }
.rm-board.stack-min .arw.item { display: none; }
@media (prefers-reduced-motion: reduce) { .arw, .arw * { transition: none !important; animation: none !important; } }
/* Casting: a new item on top arrives as the settings say (`seats::CastFx`) over --cast-t.
   Fly comes from the card where it was cast, else its player's panel (--dx, --dy, --s). */
.cast-in { position: relative; animation-duration: var(--cast-t, 420ms); animation-fill-mode: both; }
.cast-arc { animation-name: cast-arc; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
/* Lifts 90px at the midpoint, overshoots 6px, then settles. */
@keyframes cast-arc {
  from { transform: translate(var(--dx, 0px), var(--dy, 40px)) scale(var(--s, .6)); opacity: .7; }
  50% { transform: translate(calc(var(--dx, 0px) / 2), calc(var(--dy, 40px) / 2 - 90px)) scale(calc((1 + var(--s, .6)) / 2 * 1.08)) rotate(-6deg); opacity: 1; }
  88% { transform: translate(0, 6px) scale(1) rotate(1.5deg); }
  to { transform: none; }
}
.cast-fly { animation-name: cast-fly; animation-timing-function: cubic-bezier(.2, .75, .25, 1); }
@keyframes cast-fly {
  from { transform: translate(var(--dx, 0px), var(--dy, 40px)) scale(var(--s, .6)) rotate(-8deg); opacity: .7; }
  75% { transform: scale(1.04); opacity: 1; }
}
.cast-slide { animation-name: slide; animation-timing-function: ease-out; }
.cast-flare { animation-name: cast-flare; animation-timing-function: ease-out; }
@keyframes cast-flare { from { filter: brightness(2.4) saturate(1.5); transform: scale(.9); } 40% { filter: brightness(1.5); transform: scale(1.03); } }
.cast-flare::after, .cast-ripple::after { content: ""; position: absolute; inset: 0; border-radius: 8px; pointer-events: none; }
.cast-flare::after { background: radial-gradient(circle, var(--accent) 0%, transparent 65%); mix-blend-mode: screen;
  animation: cast-glow var(--cast-t, 420ms) ease-out both; }
@keyframes cast-glow { from { opacity: .95; transform: scale(.6); } to { opacity: 0; transform: scale(1.9); } }
.cast-swirl { animation-name: cast-swirl; animation-timing-function: cubic-bezier(.2, .8, .25, 1.1); }
@keyframes cast-swirl { from { transform: rotate(-200deg) scale(.3); opacity: 0; } }
.cast-rise { animation-name: cast-rise; animation-timing-function: cubic-bezier(.25, .8, .3, 1); }
@keyframes cast-rise { from { transform: translateY(40px) scale(.9); opacity: 0; filter: blur(5px); } 70% { transform: translateY(-4px); filter: blur(0); } }
.cast-ripple { animation-name: cast-land; animation-timing-function: cubic-bezier(.3, 1.4, .5, 1); }
@keyframes cast-land { from { transform: scale(.9); opacity: .4; } }
.cast-ripple::after { box-shadow: 0 0 0 3px var(--accent), 0 0 18px var(--accent-glow);
  animation: cast-ring var(--cast-t, 420ms) ease-out both; }
@keyframes cast-ring { from { opacity: .9; transform: scale(.9); } to { opacity: 0; transform: scale(1.45); } }
@media (prefers-reduced-motion: reduce) { .cast-in, .cast-in::after { animation: none !important; } }
@keyframes slide { from { opacity: 0; translate: -12px 0; } }

/* Piles (`piles.rs`, zone window §1): each player's graveyard and exile as a small pile, its top
   card 48 px wide (zone window call 5), a count badge on it and a label under it, the exile's
   with its icon; ringed while its window is open. By the player's panel by default (`Pair`);
   with an edge chosen (`data-piles`, `seats::PilesAt`), in a slim column at that edge of the
   battlefield, the opponent's at the top and yours at the foot, and the fit's gauge and the
   halves leave it room (--piles-w, 0 by the panels). */
.rm-board { --piles-w: 0px; }
.rm-board:has(.rm-field[data-piles]) { --piles-w: 72px; }
.rm-field__half { margin-left: var(--piles-w); }
.rm-field[data-piles=right] .rm-field__half { margin-left: 0; margin-right: var(--piles-w); }
.rm-field[data-piles=right] .rm-field__gauge { left: 0; right: var(--piles-w); }
.piles { position: absolute; top: 0; bottom: 0; left: 0; width: var(--piles-w); z-index: 103;
  display: grid; grid-template-rows: 1fr 1fr; border-right: 1px solid var(--line); }
.rm-field[data-piles=right] .piles { left: auto; right: 0; border-right: 0; border-left: 1px solid var(--line); }
.piles__half { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0;
  min-height: 0; overflow: hidden; }
.piles__half.opp { background: var(--opp); border-bottom: 1px solid var(--line); }
.piles__half.mine { justify-content: flex-end; }
.piles__pair { display: flex; gap: 14px; padding-top: 10px; }
.rm-panel--you > .piles__pair { padding: 0 0 10px; }
.pile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; margin: 0;
  border: 0; background: none; color: var(--muted); cursor: pointer; font: 11px/14px var(--font-ui); --card-w: 48px; }
.pile__card { position: relative; width: var(--card-w); aspect-ratio: 63 / 88; border-radius: var(--card-corner); }
.pile.is-empty .pile__card { outline: 1px dashed var(--edge); outline-offset: -1px; }
.pile.is-open .pile__card { outline: 2px solid var(--accent); outline-offset: 3px; }
/* The pile takes the click itself, to open its window; its card only shows. */
.pile .rm-card { pointer-events: none; }
.pile__count { position: absolute; right: -8px; bottom: -8px; z-index: 5; min-width: 22px; padding: 1px 6px;
  box-sizing: border-box; border: 1px solid var(--edge); border-radius: 10px; background: var(--raised);
  color: var(--strong); font-size: 12px; line-height: 16px; text-align: center; }
.pile.is-empty .pile__count { color: var(--muted); }
/* Gold: the pile holds an option in your waiting prompt (note 04). */
.pile__count.is-playable { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pile__label { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; }
.pile__label svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
/* A face-down card the viewer knows (`piles::knows`): an eye in its back's top right corner. */
.rm-card__eye { position: absolute; z-index: 3; top: 4%; right: 5%; display: grid; place-items: center;
  width: max(16px, 24%); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: color-mix(in srgb, #0b0d12 82%, transparent); color: #f2f4f8;
  box-shadow: 0 0 0 1px color-mix(in srgb, #fff 18%, transparent); }
.rm-card__eye svg { width: 72%; height: 72%; fill: none; stroke: currentColor; stroke-width: 2; }
/* A pile window (zone window §2): the owner's dot, the title and the count in its head; whole
   cards newest first, --win-card wide, wrapping and scrolling, each with its notes under it,
   gold on a card you can play now. */
.pile-win__title { display: inline-flex; align-items: center; gap: 8px; }
.pile-win__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--opp-mark); }
.pile-win__dot.mine { background: var(--you-mark); }
.pile-win__count { color: var(--muted); font-variant-numeric: tabular-nums; }
.pile-win { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 14px; padding: 12px; }
.pile-win__card { display: flex; flex-direction: column; gap: 4px; width: var(--win-card); --card-w: var(--win-card); }
.pile-win__note { padding: 2px 6px; border: 1px solid var(--edge); border-radius: 6px; background: var(--raised);
  color: var(--muted); font-size: 11px; line-height: 14px; }
.pile-win__note.is-playable { border-color: var(--accent); color: var(--accent); }
.pile-win__note .sym { width: 12px; height: 12px; font-size: 8px; }
.pile-win__empty { margin: 0; padding: 12px; color: var(--muted); }
/* "Only you can see this", under the preview and in the card's menu (zone window §2.7). */
.preview__caption { position: absolute; z-index: 3; left: 0; right: 0; top: calc(100% + 6px); padding: 3px 8px;
  border-radius: 6px; background: var(--raised); color: var(--strong); font: 12px/16px var(--font-ui); text-align: center; }
.inspect-secret { margin: 0; padding: 4px 12px 0; color: var(--muted); font-size: 12px; }

.backdrop { position: fixed; inset: 0; z-index: 10; }
/* The choice window (zone window §3, `viewer::Picker`) on the floating window: its head holds
   the line under the title, the sort switch and –; its cards are `--win-card` wide, and its
   footer stays under them. Chosen cards glow blue, lift and show a tick. */
.picker__head { display: flex; align-items: center; gap: var(--space-2); }
.rm-viewer__what { flex: 1; min-width: 0; }
.picker { height: 100%; }
.picker .rm-viewer__body { flex: 1; min-height: 0; }
.picker .rm-viewer__grid .rm-card { --card-w: var(--win-card); width: var(--card-w); }
.picker .rm-viewer__grid .rm-card__name { font-size: 8px; line-height: 11px; }
.picker .rm-card.is-selected { box-shadow: var(--glow-select); transform: translateY(-6px); }
.picker .rm-card.is-selected::after { content: "\2713"; position: absolute; z-index: 3; top: -8px; right: -8px;
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--select); color: var(--bg); font: 700 12px/1 var(--font-ui); }
/* A choice by card type: the types taken, with their cards, then the types left. */
.rm-viewer .types { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 18px 0; font-size: 13px; }
.rm-viewer .type { padding: 2px 8px; border: 1px solid var(--edge); border-radius: 999px; }
.rm-viewer .type.taken { border-color: var(--accent); background: var(--accent-soft); }
.rm-viewer .type.left { color: var(--muted); border-style: dashed; }

/* Overlays put aside. Minimised, the stack is a chip with its count; a choice put aside waits
   in a bar at the battlefield's foot. Holding H hides every overlay but the debug one. */
.rm-board .min { margin-left: auto; padding: 0 7px; line-height: 18px; }
.rm-board.stack-min .stack { width: auto; max-height: none;
  padding: 4px 8px; border: 1px solid var(--edge); border-radius: 8px; background: var(--raised); box-shadow: 0 6px 18px #0008; }
.rm-board.stack-min .stack > :not(.head) { display: none; }
.rm-board.peek :is(.stack, .win[data-testid=picker], .backdrop, .rm-gameover, .menu, .ability-cards, .ability-scrim, .waiting) { display: none; }
.waiting, .peek-hint {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 20px);
  padding: 6px 10px;
  font-size: 13px;
  background: color-mix(in srgb, var(--raised) 95%, transparent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 6px 18px #0008;
}
/* The minimised picker's bar (`BoardOverlays`): a gold dot, what waits, and your clock. */
.waiting { bottom: 12px; gap: 12px; padding: 8px 10px 8px 14px; border-radius: 10px; }
.waiting b { color: var(--strong); }
.waiting__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.waiting__clock { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.peek-hint { top: 10px; border-color: var(--edge); color: var(--muted); }

/* The phase track, slim (board fit §1.8, note 01): 30 px, the turn label and whose-turn chip in
   one row, and the steps in rows of 4, 20 and 4 px, the opponent's stop marks as ticks on the top
   edge and yours on the bottom, each with its hit area reaching into the track. The design
   system's taller track is overridden here, not in the vendored bundle. */
.rm-phase { grid-area: phase; box-sizing: border-box; height: 30px; padding-block: 0; }
.rm-phase__turn { width: auto; min-width: 150px; flex-direction: row; align-items: center; gap: 8px; }
.rm-phase__turn b { font-size: 15px; line-height: 18px; }
.rm-phase .rm-whose { align-self: center; font-size: 10px; line-height: 16px; }
.rm-phase__steps { grid-template-rows: 4px 20px 4px; row-gap: 0;
  background: linear-gradient(var(--accent), var(--accent)) 0 13px / var(--done, 0%) 2px no-repeat,
    linear-gradient(var(--line-control), var(--line-control)) 0 13px / 100% 2px no-repeat; }
.rm-phase .rm-step { padding-block: 1px; font-size: 12px; }
.rm-phase .rm-step.is-now { font-size: 13px; }
/* Narrow, a name wraps onto two lines within the 20 px row. */
@container (max-width: 760px) { .rm-phase .rm-step:not(.is-now) { padding-block: 0; font-size: 10px; line-height: 10px; } }
.rm-phase .rm-stopmark { position: relative; z-index: 3; width: 8px; height: 4px; clip-path: none; }
.rm-phase .rm-stopmark::after { content: ""; position: absolute; inset: 0 -6px -6px; }
.rm-phase .rm-stopmark--you::after { inset: -6px -6px 0; }

/* Its motion, picked in the corner menu (`seats::Motion`, `phase.rs`). The pill is its own
   element over the labels, made again on each move: its animation starts --d columns back,
   where it was, and ends on its step. The labels stay, the current one as plain as the rest
   under the pill, so a step's name shows while the pill travels to it. Effects are spans on
   the track, absolutely placed so they never take a grid cell. CSS only (ADR 0026). */
@property --done { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.rm-phase__steps { position: relative; overflow-x: clip; overflow-clip-margin: 16px;
  --s: calc(var(--d, 0) * 100cqw / 12); }
.pill-liquid { --t: 440ms; }
.pill-comet { --t: 360ms; }
.pill-fuse { --t: 600ms; }
.pill-flip { --t: 460ms; }
.rm-phase__steps:not(.pill-off) { transition: --done calc(var(--t) * .8) cubic-bezier(.4, 0, .2, 1); }
.rm-phase__steps.pill-comet { transition-duration: calc(var(--t) * 1.5); transition-delay: calc(var(--t) * .25); }
.rm-phase__steps.pill-fuse { transition-duration: calc(var(--t) * .55); transition-delay: calc(var(--t) * .2); }
.rm-phase__steps:not(.pill-off) .rm-step { position: relative; z-index: 1; }
.rm-phase__steps:not(.pill-off) .rm-step.is-now { padding: 1px 6px; background: var(--panel); color: var(--text);
  font-size: 12px; font-weight: 600; box-shadow: none; white-space: nowrap; }
.rm-phase__fx { display: contents; }
/* The phase bar's step marker. Scoped: `.rm-pill` is also the design system's inline chip. */
.rm-phase .rm-pill { position: absolute; z-index: 2; top: 14px; left: calc((var(--col) + .5) * 100% / 12); translate: -50% -50%;
  padding: 1px 12px; border-radius: var(--radius-pill); background: var(--pill, var(--accent));
  color: var(--on-pill, var(--on-accent)); font: 700 13px/18px var(--font-display); letter-spacing: .02em;
  white-space: nowrap; pointer-events: none; --was: var(--opp-mark);
  box-shadow: 0 0 0 3px var(--panel), 0 0 14px var(--pill-glow, var(--accent-glow)); }
@container (max-width: 760px) { .rm-phase .rm-pill { padding: 1px 8px; font-size: 12px; } }
/* The new-turn sweep's colours: the pill and the rail take the player whose turn it is. */
.rm-phase.is-theirs { --pill: var(--opp-mark); --on-pill: var(--on-mark);
  --pill-glow: color-mix(in srgb, var(--opp-mark) 50%, transparent); }
.rm-phase.is-theirs .rm-pill { --was: var(--accent); }
.rm-phase.is-theirs .rm-phase__steps {
  background: linear-gradient(var(--opp-mark), var(--opp-mark)) 0 13px / var(--done, 0%) 2px no-repeat,
    linear-gradient(var(--line-control), var(--line-control)) 0 13px / 100% 2px no-repeat; }

/* Liquid stretch: the shape reaches for the next step, then pulls its back edge in past it and
   settles. The name shows once the shape covers its label. */
.pill-liquid .rm-pill.moving:not(.sweep) { background: none; box-shadow: none; animation: pill-ink var(--t) both; }
.pill-liquid .rm-pill.moving:not(.sweep)::before { content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; background: var(--pill, var(--accent));
  box-shadow: 0 0 0 3px var(--panel), 0 0 14px var(--pill-glow, var(--accent-glow));
  animation: pill-stretch-fwd var(--t) both; }
.pill-liquid .rm-pill.moving.back:not(.sweep)::before { animation-name: pill-stretch-back; }
@keyframes pill-ink { from, 40% { color: transparent; } }
@keyframes pill-stretch-fwd {
  from { left: var(--s); right: calc(-1 * var(--s)); animation-timing-function: cubic-bezier(.55, 0, .25, 1); }
  45% { left: var(--s); right: 0; transform: scaleY(.8); animation-timing-function: cubic-bezier(.3, 0, .3, 1); }
  80% { left: 7px; right: 0; transform: scaleY(1.1); animation-timing-function: ease-out; }
  to { left: 0; right: 0; }
}
@keyframes pill-stretch-back {
  from { left: var(--s); right: calc(-1 * var(--s)); animation-timing-function: cubic-bezier(.55, 0, .25, 1); }
  45% { left: 0; right: calc(-1 * var(--s)); transform: scaleY(.8); animation-timing-function: cubic-bezier(.3, 0, .3, 1); }
  80% { left: 0; right: 7px; transform: scaleY(1.1); animation-timing-function: ease-out; }
  to { left: 0; right: 0; }
}

/* Comet trail: the pill leans into a fast glide; a streak of light along the rail fades
   behind it, and the rail fills just after. */
.pill-comet .rm-pill.moving:not(.sweep) { animation: pill-comet var(--t) cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pill-comet {
  from { transform: translateX(var(--s)); }
  25% { transform: translateX(calc(var(--s) * .55)) skewX(calc(var(--dir) * -14deg)); }
}
.rm-trail { position: absolute; z-index: 0; top: 12px; height: 4px; border-radius: 2px; pointer-events: none;
  left: calc((var(--lo) + .5) * 100% / 12); width: calc(var(--span) * 100% / 12); filter: blur(.6px);
  background: linear-gradient(to right, transparent, var(--pill, var(--accent)));
  box-shadow: 0 0 10px var(--pill-glow, var(--accent-glow));
  animation: trail-fwd calc(var(--t) * 2) cubic-bezier(.2, .8, .2, 1) both; }
.rm-trail.back { background: linear-gradient(to left, transparent, var(--pill, var(--accent))); animation-name: trail-back; }
@keyframes trail-fwd { from { clip-path: inset(0 100% 0 0); } 50% { clip-path: inset(0); opacity: 1; } to { clip-path: inset(0 0 0 100%); opacity: 0; } }
@keyframes trail-back { from { clip-path: inset(0 0 0 100%); } 50% { clip-path: inset(0); opacity: 1; } to { clip-path: inset(0 100% 0 0); opacity: 0; } }

/* Fuse: the pill shrinks to a spark, burns along the rail throwing embers, and opens out where
   it lands with a few more. */
.pill-fuse .rm-pill.moving:not(.sweep) { animation: pill-fuse var(--t) both; }
@keyframes pill-fuse {
  from { transform: translateX(var(--s)); clip-path: inset(0 round 999px); color: transparent;
    animation-timing-function: cubic-bezier(.5, 0, .6, 1); }
  20% { transform: translateX(var(--s)); clip-path: inset(7px calc(50% - 5px) round 999px); color: transparent;
    animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  75% { transform: none; clip-path: inset(7px calc(50% - 5px) round 999px); color: transparent;
    animation-timing-function: cubic-bezier(.2, .9, .3, 1.2); }
  to { clip-path: inset(0 round 999px); }
}
.rm-spark { position: absolute; z-index: 3; top: 11px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: color-mix(in srgb, var(--pill, var(--accent)) 40%, white); pointer-events: none;
  box-shadow: 0 0 8px 3px var(--pill-glow, var(--accent-glow));
  animation: spark-run var(--t) both; }
@keyframes spark-run {
  from, 20% { left: calc((var(--from) + .5) * 100% / 12); opacity: 0; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  22% { opacity: 1; }
  75% { left: calc((var(--col) + .5) * 100% / 12); opacity: 1; }
  80%, to { left: calc((var(--col) + .5) * 100% / 12); opacity: 0; }
}
.rm-ember { position: absolute; z-index: 3; top: 13px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%;
  left: calc((var(--from) + (var(--col) - var(--from)) * var(--f) + .5) * 100% / 12); pointer-events: none;
  background: color-mix(in srgb, var(--pill, var(--accent)) 50%, white); box-shadow: 0 0 4px 1px var(--pill, var(--accent));
  animation: ember 480ms cubic-bezier(.2, .7, .3, 1) calc(var(--t) * (.2 + .55 * var(--f))) both; }
.rm-ember.land { animation-delay: calc(var(--t) * .8); }
@keyframes ember {
  from { opacity: 0; }
  1% { opacity: .95; transform: none; }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); }
}

/* Card flip: the pill slides while it turns over, the step it left on its front face. */
.pill-flip .rm-pill.moving:not(.sweep) { animation: pill-flip var(--t) both; }
.pill-flip .rm-pill.moving:not(.sweep)::after { content: attr(data-from); position: absolute; inset: 0;
  display: grid; place-items: center; color: var(--on-pill, var(--on-accent)); animation: pill-front var(--t) step-end both; }
@keyframes pill-flip {
  from { transform: translateX(var(--s)) perspective(140px) rotateX(0deg); color: transparent; animation-timing-function: ease-in; }
  50% { transform: translateX(calc(var(--s) / 2)) perspective(140px) rotateX(90deg); color: transparent; filter: brightness(.55); }
  50.01% { transform: translateX(calc(var(--s) / 2)) perspective(140px) rotateX(-90deg); filter: brightness(.55);
    animation-timing-function: cubic-bezier(.2, .8, .3, 1.25); }
  to { transform: none; }
}
@keyframes pill-front { from { opacity: 1; } 50%, to { opacity: 0; } }

/* The new-turn sweep: the pill sweeps back to the start in the new player's colour, through a
   streak across the track, and the turn number pops. */
.rm-pill.moving.sweep { animation: pill-sweep 650ms cubic-bezier(.7, 0, .2, 1) both; }
@keyframes pill-sweep {
  from { transform: translateX(var(--s)); background: var(--was); }
  45% { transform: translateX(calc(var(--s) * .4)) skewX(16deg) scaleX(1.25); }
  60% { background: var(--pill, var(--accent)); }
}
.rm-streak { position: absolute; z-index: 0; top: 4px; left: 0; width: 100%; height: 20px; border-radius: 10px;
  pointer-events: none; filter: blur(2px);
  background: linear-gradient(to left, transparent, var(--pill, var(--accent)) 40%, transparent 75%);
  animation: streak 715ms cubic-bezier(.6, 0, .3, 1) both; }
@keyframes streak { from { transform: translateX(60%); opacity: 0; } 35% { opacity: .55; } to { transform: translateX(-70%); opacity: 0; } }
.rm-phase__turn b { display: inline-block; align-self: flex-start; }
.rm-phase__turn b.pop { animation: turn-pop 650ms ease-out; }
.rm-phase__turn b.pop-again { animation: turn-pop-again 650ms ease-out; }
@keyframes turn-pop { 60% { transform: scale(1.18); } }
@keyframes turn-pop-again { 60% { transform: scale(1.18); } }

/* Stops: each mark's own motion, and a burst of sparks and a ring beside it, made again on
   each click (`.touched`: never on load). --away points off the track: up for the opponent's
   marks, down for yours. */
.rm-stopmark--you, .rm-burst--you { --c: var(--you-mark); --away: 1; }
.rm-stopmark--opp, .rm-burst--opp { --c: var(--opp-mark); --away: -1; }
.rm-burst { position: absolute; inset: 0; margin: auto; width: 0; height: 0; pointer-events: none; z-index: 3; }
.rm-burst i, .rm-burst b { position: absolute; opacity: 0; border-radius: 50%; }
.rm-burst i { left: -1.5px; top: -1.5px; width: 3px; height: 3px; background: var(--c); box-shadow: 0 0 4px 1px var(--c); }
.rm-burst b { left: -7px; top: -7px; width: 14px; height: 14px; border: 1.5px solid var(--c); box-shadow: 0 0 6px var(--c); }
.stops-off .rm-burst { display: none; }

/* Spark and ember */
.stops-spark .rm-stopmark.touched[aria-pressed="true"] { animation: mark-pop 340ms cubic-bezier(.3, 1.5, .5, 1); }
.stops-spark .rm-stopmark.touched[aria-pressed="false"] { animation: mark-dim 480ms ease-out; }
.stops-spark .rm-burst.is-on i { animation: spark-out calc(380ms + var(--i) * 25ms) cubic-bezier(.2, .7, .3, 1); }
.stops-spark .rm-burst.is-off i:nth-child(-n+3) { animation: ember-drift calc(650ms + var(--i) * 90ms) ease-out; }
@keyframes mark-pop { 30% { transform: scale(1.7); } }
@keyframes mark-dim { from { background: var(--c); opacity: 1; filter: brightness(1.5); } }
@keyframes spark-out {
  from { opacity: 1; }
  to { opacity: 0; transform: translate(calc(cos(var(--i) * 51.4deg + 12deg) * 14px), calc(sin(var(--i) * 51.4deg + 12deg) * 14px)) scale(.3); }
}
@keyframes ember-drift {
  from { opacity: 1; }
  to { opacity: 0; transform: translate(calc((var(--i) - 1) * 4px), calc(var(--away) * (8px + var(--i) * 4px))) scale(.3); }
}

/* Ripple */
.stops-ripple .rm-stopmark.touched[aria-pressed="true"] { animation: mark-bounce 360ms cubic-bezier(.3, 1.4, .5, 1); }
.stops-ripple .rm-stopmark.touched[aria-pressed="false"] { animation: mark-shrink 420ms ease-in-out; }
.stops-ripple .rm-burst.is-on b { animation: ring-out 520ms cubic-bezier(.2, .7, .3, 1); }
.stops-ripple .rm-burst.is-off b { animation: ring-in 420ms cubic-bezier(.2, .7, .3, 1); }
@keyframes mark-bounce { from { transform: scale(.5); } 50% { transform: scale(1.3); } }
@keyframes mark-shrink { from { background: var(--c); opacity: 1; } 50% { transform: scale(.6); } }
@keyframes ring-out { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(2.6); } }
@keyframes ring-in { from { opacity: 0; transform: scale(2.4); } 40% { opacity: .7; } to { opacity: 0; transform: scale(.4); } }

/* Bookmark */
.stops-bookmark .rm-stopmark.touched[aria-pressed="true"] { animation: mark-drop 420ms; }
.stops-bookmark .rm-stopmark.touched[aria-pressed="false"] { animation: mark-lift 560ms; }
.stops-bookmark .rm-burst.is-off i:nth-child(-n+4) { animation: puff 420ms cubic-bezier(.2, .7, .3, 1) 220ms; }
@keyframes mark-drop {
  from { transform: translateY(calc(var(--away) * 6px)); opacity: 0; animation-timing-function: cubic-bezier(.3, 0, .4, 1); }
  60% { transform: translateY(calc(var(--away) * -2px)); opacity: 1; animation-timing-function: ease-out; }
  75% { transform: none; filter: brightness(2.2); }
}
@keyframes mark-lift {
  from { background: var(--c); opacity: 1; animation-timing-function: cubic-bezier(.5, 0, .8, .5); }
  55% { background: var(--c); transform: translateY(calc(var(--away) * 6px)); opacity: 0; }
  56% { transform: none; opacity: 0; }
}
@keyframes puff {
  from { opacity: .9; transform: translateY(calc(var(--away) * 6px)); }
  to { opacity: 0; transform: translate(calc((var(--i) - 1.5) * 5px), calc(var(--away) * (6px + var(--i) * 2px))) scale(.3); }
}

/* Filament */
.stops-filament .rm-stopmark.touched[aria-pressed="true"] { animation: mark-flicker-on 520ms linear; }
.stops-filament .rm-stopmark.touched[aria-pressed="false"] { animation: mark-flicker-off 460ms linear; }
.stops-filament .rm-burst.is-on b { left: -11px; top: -11px; width: 22px; height: 22px; border: 0; box-shadow: none;
  background: radial-gradient(circle, var(--c) 0%, transparent 70%); animation: halo 900ms; }
@keyframes mark-flicker-on {
  from { opacity: .4; } 12% { opacity: 1; } 24% { opacity: .45; } 38% { opacity: 1; } 50% { opacity: .8; }
  65% { opacity: 1; filter: brightness(1.8); }
}
@keyframes mark-flicker-off {
  from { background: var(--c); opacity: 1; } 15% { background: var(--c); opacity: .25; }
  30% { background: var(--c); opacity: .9; } 50% { background: var(--c); opacity: .2; }
  62% { background: var(--c); opacity: .6; }
}
@keyframes halo { 30% { opacity: 0; } 60% { opacity: .55; } }

/* The hand (rm-hand): cards as tall as the hand, which its drag handle sets, with 10px over
   them for a lifted card. It fans only when they don't fit, by just enough (`hand::fan`, note
   01); the bundle's fan rule is for bare cards, and ours sit in wrappers. */
.rm-hand {
  grid-area: hand;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  /* Centred under the board; `safe` keeps an overflowing hand scrollable from its first card. */
  justify-content: safe center;
  padding: 20px 10px 10px;
  min-height: 0;
  /* A hovered card grows past the hand's edges, over the phase track (or the battlefield),
     so the hand sits above them. Only a hand too wide to fan scrolls sideways, and then
     clips (`hand::overflows`). */
  position: relative;
  z-index: 3;
  overflow: visible;
  container-type: size;
  --grow: 1.1;
}
.rm-hand.scrolls { overflow-x: auto; overflow-y: hidden; }
.rm-hand .rm-card { --card-w: calc(100cqh * 63 / 88); }
.rm-hand--fan > * + * { margin-left: var(--fan); }
/* Playable cards lift (the bundle), and so does the one under the pointer (Board). */
/* A hand card tilts toward the pointer: `Card` sets where the pointer is on it, 0 to 1 across
   (--px) and down (--py), and the transition smooths the turn (ADR 0067). The card under the
   pointer grows by --grow about its centre, where it rests: a playable card stays 10px up. The
   hover is the wrapper's, so the card's growing and turning can't move the hover off it. It
   stays up while its menu is open (`.is-open`), holding its pose, and eases back more slowly
   than it follows. */
.rm-hand .rm-card { --px: .5; --py: .5; --rest-y: 0px;
  transition: transform 160ms ease-out, margin 120ms ease, box-shadow 250ms ease, --amp 220ms ease-out,
    filter var(--stack-fade, 0ms); }
.rm-hand .rm-card.is-playable { --rest-y: -10px; }
:is(.rm-hand > :hover > .rm-card, .rm-hand > * > .rm-card.is-open) {
  transition: transform 90ms ease-out, margin 120ms ease, box-shadow 250ms ease, --amp 400ms ease,
    filter var(--stack-fade, 0ms);
  transform: perspective(700px) translateY(var(--rest-y)) scale(var(--grow))
    rotateX(calc((.5 - var(--py)) * 16deg)) rotateY(calc((var(--px) - .5) * 16deg)); }
/* In front of the cards it overlaps, and floating: the hand and the battlefield drift without
   end (--fx, --fy and, in the hand, --fr), and each card moves by that drift times its --amp,
   which eases to 1 while the pointer rests on it and back to 0 after, so it settles instead of
   jumping. It's on `translate` (and `rotate` in the hand), so it never fights the tilt or a
   tapped card's turn, and off the cards' own `animation`. */
@property --fx { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --fy { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --fr { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
@property --amp { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --float-y { syntax: "<length>"; inherits: false; initial-value: 0px; }
.rm-hand, .rm-field { animation: drift 3.4s ease-in-out infinite, sway 4.6s ease-in-out infinite; }
@keyframes drift {
  0%, 100% { --fx: 0px; --fy: 0px; }
  25% { --fx: 1.5px; --fy: -2px; }
  50% { --fx: -1px; --fy: -3px; }
  75% { --fx: -1.5px; --fy: -1px; }
}
@keyframes sway { 0%, 100% { --fr: 0deg; } 30% { --fr: .6deg; } 70% { --fr: -.6deg; } }
.rm-hand .rm-card { translate: calc(var(--fx) * var(--amp)) calc(var(--fy) * var(--amp));
  rotate: calc(var(--fr) * var(--amp)); }
.rm-hand > :is(:hover, :has(> .rm-card.is-open)) { z-index: 5; }
:is(.rm-hand > :hover > .rm-card, .rm-hand > * > .rm-card.is-open) { --amp: 1; }
@media (prefers-reduced-motion: reduce) {
  .rm-hand, .rm-field { animation: none; }
  .rm-card { --px: .5 !important; --py: .5 !important; --amp: 0 !important; }
}
/* The arched hand, from the corner menu: each card turns by how far it is from the middle
   (--k), dips at the ends and overlaps the next; the one under the pointer stands up straight
   in front. */
.rm-hand.arc > .held { position: relative; transform-origin: 50% 140%; rotate: calc(var(--k) * 3.5deg);
  translate: 0 calc(var(--k) * var(--k) * 2.5px); transition: rotate 160ms ease-out, translate 160ms ease-out; }
.rm-hand.arc > .held:hover { rotate: 0deg; translate: 0; z-index: 5; }
.rm-hand.arc > * + * { margin-left: min(var(--fan), calc(100cqh * 63 / 88 * -0.28)); }
.rm-hand .held { display: flex; }
/* The dragged card's slot stays open while its copy follows the pointer (`.rm-drag`). Sideways
   touch still scrolls an overflowing hand. */
.rm-hand { touch-action: pan-x; user-select: none; -webkit-user-select: none; }
.rm-hand > .dragging { visibility: hidden; }
/* The others slide over to make room (FLIP, ADR 0067): `hand::reorder` sets each where it was
   with `.flip`, then lets it ease to its new place. */
.rm-hand > :is(.held, .elsewhere) { transition: transform 160ms ease-out; }
.rm-hand.arc > .held { transition: rotate 160ms ease-out, translate 160ms ease-out, transform 160ms ease-out; }
.rm-hand > .flip { transition: none !important; }
/* While a card is dragged nothing else lifts, previews or takes the pointer. */
body.is-dragging-card { cursor: grabbing; user-select: none; -webkit-user-select: none; }
body.is-dragging-card :is(.rm-card, .rm-hand > *) { pointer-events: none; }

/* The dragged copy (spec 2026-10-21 dragging cards from the hand). The pointer moves write
   --x and --y, where its top left goes, and the velocity as fractions of full speed (--vx,
   --vy, -1 to 1) and the speed (--speed, 0 to 1); `hand` zeroes the last three once the pointer
   stops. The position applies at once; the motion eases after it, so the card leads the pointer
   the way it's moving by up to 26px, grows 1.14 plus 0.14 at full speed, and tilts by --tilt
   degrees at full speed (Settings, Drag). Flying (`.flying`) it goes flat to where it lands in
   120ms. */
@property --vx { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --vy { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --speed { syntax: "<number>"; inherits: true; initial-value: 0; }
.rm-drag {
  --x: 0; --y: 0; --w: 100; --tilt: 32;
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  width: calc(var(--w) * 1px);
  translate: calc(var(--x) * 1px + var(--vx) * 26px) calc(var(--y) * 1px + var(--vy) * 26px);
  transition: --vx 60ms ease-out, --vy 60ms ease-out, --speed 60ms ease-out;
}
.rm-drag[hidden] { display: none; }
.rm-drag .rm-card {
  width: 100%; animation: none; translate: none; rotate: none;
  scale: calc(1.14 + var(--speed) * .14);
  box-shadow: calc(var(--vx) * -18px) calc(16px + var(--vy) * -18px) calc(28px + var(--speed) * 18px) rgba(0, 0, 0, .6);
  transition: scale 120ms cubic-bezier(.2, .8, .25, 1);
}
.rm-drag[data-tilt="swing"] .rm-card {
  transform: perspective(700px) rotateY(calc(var(--vx) * var(--tilt) * 1deg)) rotateX(calc(var(--vy) * var(--tilt) * -1deg)); }
.rm-drag[data-tilt="lean"] .rm-card { transform: rotate(calc(var(--vx) * var(--tilt) * 1deg)); }
/* Swings from where it was grabbed, catching up more slowly and overshooting a little. */
.rm-drag[data-tilt="dangle"] {
  transition: --vx 120ms cubic-bezier(.3, 1.9, .45, 1), --vy 120ms cubic-bezier(.3, 1.9, .45, 1), --speed 60ms ease-out; }
.rm-drag[data-tilt="dangle"] .rm-card { transform-origin: var(--ox) var(--oy);
  transform: rotate(calc(var(--vx) * var(--tilt) * -1deg)); }
.rm-drag.flying { transition: translate 120ms cubic-bezier(.2, .8, .25, 1), width 120ms cubic-bezier(.2, .8, .25, 1); }
.rm-drag.flying .rm-card { scale: 1; transform: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
/* Can't be played now: a short shake before it goes back. */
.rm-drag.shake .rm-card { animation: drag-shake 220ms ease-in-out 2; }
@keyframes drag-shake { 25% { translate: -8px 0; } 75% { translate: 8px 0; } }
/* The drop hint while a card is dragged: the battlefield above the hand (--l --t --w --h), with
   a label saying what letting go will do, brighter once it's over the line or flung (`.hot`),
   red when it can't be played (`.bad`). Glow outlines and tints it; Line draws its foot, the
   line to cross, fading upward; Ghost outlines where the card will land (--gl --gt --gw --gh);
   None draws nothing. The look takes the hint's opacity (--hint-op), the label stays whole. */
.rm-drop {
  --tone: var(--accent);
  position: fixed; z-index: 55; pointer-events: none;
  left: calc(var(--l) * 1px); top: calc(var(--t) * 1px);
  width: calc(var(--w) * 1px); height: calc(var(--h) * 1px);
  display: flex; align-items: center; justify-content: center;
}
.rm-drop[hidden], .rm-drop[data-hint="none"] { display: none; }
.rm-drop.bad { --tone: var(--rope); }
.rm-drop::before { content: ""; position: absolute; inset: 0; border-radius: 10px; opacity: var(--hint-op);
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease; }
.rm-drop[data-hint="glow"]::before { border: 2px dashed color-mix(in srgb, var(--tone) 60%, transparent);
  background: color-mix(in srgb, var(--tone) 6%, transparent); }
.rm-drop[data-hint="glow"].hot::before { border-style: solid; border-color: var(--tone);
  background: color-mix(in srgb, var(--tone) 14%, transparent); box-shadow: inset 0 0 48px color-mix(in srgb, var(--tone) 35%, transparent); }
.rm-drop[data-hint="line"]::before { border-radius: 0; border-bottom: 2px solid color-mix(in srgb, var(--tone) 60%, transparent);
  background: linear-gradient(to top, color-mix(in srgb, var(--tone) 18%, transparent), transparent 35%); }
.rm-drop[data-hint="line"].hot::before { border-bottom-color: var(--tone);
  background: linear-gradient(to top, color-mix(in srgb, var(--tone) 32%, transparent), transparent 45%); }
.rm-drop__ghost { display: none; }
.rm-drop[data-hint="ghost"] .rm-drop__ghost { display: block; position: absolute; opacity: var(--hint-op);
  left: calc(var(--gl) * 1px); top: calc(var(--gt) * 1px); width: calc(var(--gw) * 1px); height: calc(var(--gh) * 1px);
  border: 2px dashed var(--tone); border-radius: var(--card-corner); }
.rm-drop[data-hint="ghost"].hot .rm-drop__ghost { border-style: solid; background: color-mix(in srgb, var(--tone) 14%, transparent); }
.rm-drop__label { position: relative; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px;
  background: var(--raised); color: var(--text); border: 1px solid color-mix(in srgb, var(--tone) 60%, transparent);
  box-shadow: 0 6px 18px #0008; }
.rm-drop.hot .rm-drop__label { border-color: var(--tone); }
.rm-drop.bad .rm-drop__label { color: var(--rope); }
@media (prefers-reduced-motion: reduce) {
  .rm-drag.shake .rm-card { animation: none; }
  .rm-drag { --vx: 0 !important; --vy: 0 !important; --speed: 0 !important; transition: none !important; }
  .rm-drag .rm-card { scale: 1; transform: none !important; transition: none; box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
}
/* A card back in the hand from a cancelled cast is the same card to you: it doesn't arrive as
   a new one. */
.rm-hand .back .rm-card__face { transition: none; }
.rm-hand .back .rm-card { animation: none; opacity: 1; }
/* A card you can play from another zone: set apart on the right, outlined, with its zone named
   (note 04). */
.rm-hand .elsewhere { position: relative; display: flex; }
.rm-hand > .held + .elsewhere { margin-left: 16px; }
.rm-hand--fan > .held + .elsewhere { margin-left: calc(var(--fan) + 16px); }
.rm-hand .elsewhere .rm-card { outline: 2px dashed var(--muted); outline-offset: 3px; }
.rm-hand .elsewhere .from {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 6px;
  white-space: nowrap;
  border-radius: 8px;
  background: var(--panel);
  pointer-events: none;
  transition: transform 120ms ease;
}
/* It rises with its card. */
.rm-hand .elsewhere .is-playable ~ .from { transform: translate(-50%, -10px); }

/* The log (`log_panel`, log window spec): a floating window over the board, its body a column
   so the lines scroll in a column-reverse scroller, which starts at its end so the newest line
   stays in sight; the bundle's `rm-log` clips instead. */
.win[data-testid=log] .win__body { display: flex; flex-direction: column; overflow: hidden; }
.win[data-testid=log] .rm-float__title { display: flex; align-items: center; gap: 10px; }
.win[data-testid=log] .rm-log__turn { background: var(--panel-float); }
.rm-log { overflow: auto; flex-direction: column-reverse; justify-content: flex-start; }
.rm-log__entries { padding-bottom: 4px; }
.rm-log .sym { width: 15px; height: 15px; font-size: 9px; margin-right: 1px; vertical-align: -2px; }
.rm-log .rm-cn { color: var(--text); }
.menu .chip, .known-lib .chip { color: var(--text); border: 0; border-radius: 4px; padding: 0 5px; background: var(--raised); font-size: inherit; font-weight: 600; line-height: 18px; white-space: nowrap; }
/* The fold row and each line are buttons: the fold row unfolds the earlier turns, a line shows
   the board after it (the past board spec). Lines after the shown one's batch fade. */
button:is(.rm-log__fold, .rm-log__line) { width: 100%; text-align: left; background: none; border: 0; border-radius: 0; cursor: pointer; }
button.rm-log__fold { display: block; }
.rm-log__line:not(.rm-log__line--minor) { color: var(--text); }
button.rm-log__line:not(.is-here):hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
/* Who did what (board fit spec §7.4): no badge column; a head line starts with its actor's name
   in their colour and has a thin edge in it, or a neutral one with no actor. Each turn's heading
   has the active player's avatar ringed in their colour, and sticks while its turn scrolls. */
.rm-log__line:not(.rm-log__line--minor) { display: block; border-left: 2px solid var(--line-control); }
.rm-log__line[data-who="you"] { border-left-color: var(--you-mark); }
.rm-log__line[data-who="opp"] { border-left-color: var(--opp-mark); }
.rm-log__line--minor { padding-left: 24px; }
.rm-log__name { font-weight: 700; }
.rm-log__name--you { color: var(--you-mark); }
.rm-log__name--opp { color: var(--opp-mark); }
.rm-log__turn { position: sticky; top: 0; z-index: 1; background: var(--panel); padding-bottom: 4px; }
.rm-log__turn .rm-avatar { --size: 22px; font-size: 10px; flex: none; box-shadow: 0 0 0 2px var(--opp-mark); }
.rm-log__turn[data-who="you"] .rm-avatar { box-shadow: 0 0 0 2px var(--you-mark); }
.rm-log__you { color: var(--muted); font-size: 12px; }
.rm-log__now { font: 700 10px/14px var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.pb-viewing { margin: 4px 12px 0 24px; font: 700 10px/12px var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
/* The head's Log and Known tabs, as on the known cards playground v2. */
.log-tabs { display: flex; gap: 2px; }
.log-tabs button { display: inline-flex; align-items: center; padding: 4px 8px; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--muted); font: 600 12px var(--font-ui); }
.log-tabs button[aria-selected="true"] { background: var(--panel-float); color: var(--strong); }
.log-tabs .count { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; margin-left: 4px;
  border-radius: 8px; background: var(--opp-mark); color: var(--on-mark); font: 700 10px var(--font-ui); }
/* The log's tab (call 8), on the window's left edge halfway down, joined to it: it slides out
   with the window and stays at the frame's edge while it is away, so it opens and closes the
   log. Plain "Log", or gold with the unseen count, pulsing twice as it turns gold (call 3). */
.log-btn { position: absolute; right: 100%; top: 50%; transform: translateY(-50%); visibility: visible;
  width: var(--log-tab); margin-right: -1px; padding: 14px 0; writing-mode: vertical-rl;
  background: var(--panel-float); border: 1px solid var(--line); border-right: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  color: var(--text); font: 600 15px/20px var(--font-ui); cursor: pointer;
  box-shadow: -4px 0 14px rgb(0 0 0 / 0.3);
  transition: width 160ms cubic-bezier(0.05, 0.7, 0.1, 1), background 120ms, box-shadow 160ms; }
/* Hovered, the tab grows out of the log a little and lifts; pressed, it gives back. It grows
   rather than moves, so it stays joined to the window. */
.log-btn:is(:hover, :focus-visible) { width: calc(var(--log-tab) + 6px); box-shadow: -8px 0 20px rgb(0 0 0 / 0.4); }
.log-btn:active { width: calc(var(--log-tab) + 2px); transition-duration: 60ms; }
@media (prefers-reduced-motion: reduce) { .log-btn { transition: background 120ms; } }
.log-btn:hover { background: var(--raised); }
.log-btn--gold { background: var(--accent); border-color: var(--accent); color: var(--on-accent);
  animation: log-ring 600ms ease-out 2; }
.log-btn--gold:hover { background: var(--accent-hover); }
@keyframes log-ring { from { box-shadow: 0 0 0 0 var(--accent-glow); } to { box-shadow: 0 0 0 12px transparent; } }
/* The recap where the unseen lines start (§2), with one gold pulse as the window lands, and the
   unseen lines faintly tinted until it closes (call 5). */
.log-recap { margin: 6px 8px 8px; padding: 6px 0 8px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: var(--radius-md); background: var(--accent-soft); }
.log-recap.is-landing { animation: log-ring 600ms ease-out; }
.log-recap__head { padding: 0 10px 4px; font: 700 10px/14px var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
button.log-recap-line { display: block; width: 100%; padding: 2px 10px; text-align: left; background: none; border: 0; border-radius: 0;
  color: var(--text); font: inherit; font-size: 13px; line-height: 18px; cursor: pointer; }
button.log-recap-line:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.log-recap-line--under { padding-left: 24px; color: var(--muted); }
.log-recap .rm-cn { color: var(--text); }
.log-recap__life { padding: 4px 10px 0; font-size: 12px; color: var(--muted); }
.rm-log__line.is-unseen { background: color-mix(in srgb, var(--accent) 7%, transparent); }
@media (prefers-reduced-motion: reduce) { .log-btn--gold, .log-recap.is-landing { animation: none; } }

/* The Known tab (spec 2026-10-21 known cards): sections of known cards, each a row with the
   small card, where it is now and how you know, top down. */
.known-list { flex: 1; overflow: auto; padding: 6px 2px 8px; }
.win[data-testid=log] .win__body > .known-list { padding-inline: 8px; }
.known-list .sp { flex: 1; }
.known-head { display: flex; align-items: center; gap: 6px; padding: 2px 2px 0; font: 700 10px var(--font-ui);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--opp-mark); }
.known-head button { padding: 1px 4px; border: 0; border-radius: 3px; background: none; color: var(--muted);
  font: 600 11px var(--font-ui); letter-spacing: 0; text-transform: none; }
.known-head button:hover { background: var(--bg); color: var(--strong); }
.known-section { margin-top: 10px; }
.known-label { display: flex; align-items: baseline; gap: 6px; margin: 0 2px 4px; font-size: 11px; color: var(--muted); }
.known-label b { color: var(--text); font-weight: 600; }
.known-only { padding: 0 4px; border: 1px solid var(--line); border-radius: 3px; font: 700 8px var(--font-ui);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.known-group { margin-top: 5px; padding: 2px 0; background: var(--panel-float); border: 1px solid var(--line); border-radius: var(--radius-md); }
.known-event { display: flex; align-items: center; gap: 6px; padding: 4px 8px 2px; font-size: 11px; color: var(--muted); }
.known-event .src { color: var(--text); font-weight: 600; }
.known-row { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 9px; padding: 6px 26px 6px 8px; cursor: pointer; }
.known-row + .known-row { border-top: 1px solid var(--line); }
.known-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.known-row.text { grid-template-columns: minmax(0, 1fr); padding-top: 5px; padding-bottom: 5px; }
.known-row.is-flashed { animation: log-flash 1.6s ease-out; }
.known-art { display: block; width: 46px; aspect-ratio: 63 / 88; object-fit: cover; border-radius: var(--card-corner); background: var(--raised); }
.known-name { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; line-height: 18px; font-weight: 600; color: var(--strong); }
.known-name .cost { display: inline-flex; gap: 1px; }
.known-type { font-size: 11px; line-height: 15px; color: var(--faint); }
.known-where { margin-top: 2px; font-size: 12px; line-height: 17px; color: var(--text); }
.known-where .pos { color: var(--opp-mark); font-weight: 600; }
.known-where .since { color: var(--faint); }
.known-how { margin-top: 1px; font-size: 11px; line-height: 16px; color: var(--muted); }
.known-link { padding: 0; border: 0; background: none; color: var(--select); font: inherit; font-weight: 600; white-space: nowrap; }
.known-link:hover { text-decoration: underline; }
.known-link:disabled { opacity: 1; color: inherit; font-weight: inherit; text-decoration: none; }
.known-dismiss { position: absolute; top: 6px; right: 6px; display: none; place-items: center; width: 16px; height: 16px; padding: 0;
  border: 1px solid var(--line-control); border-radius: 50%; background: var(--panel-float); color: var(--strong); font-size: 10px; font-weight: 400; }
.known-row:hover .known-dismiss, .known-dismiss:focus-visible { display: grid; }
.known-row.gone .known-art { filter: grayscale(1) brightness(0.45); }
.known-row.gone .known-name { color: var(--faint); text-decoration: line-through; }
.known-row.gone .known-where { color: var(--faint); }
.known-cleared { margin: 8px 2px 0; font-size: 11px; color: var(--faint); }
.known-empty { padding: 6px 2px; font-size: 12px; color: var(--faint); }
/* The KNOWN tag on a log line that showed a card still known. */
.known-tag { margin-left: 4px; padding: 0 4px; border: 1px solid color-mix(in srgb, var(--opp-mark) 50%, transparent); border-radius: 3px;
  font: 700 8px var(--font-ui); letter-spacing: 0.08em; vertical-align: 1px; color: var(--opp-mark); cursor: pointer; }
.known-tag:hover { background: color-mix(in srgb, var(--opp-mark) 18%, transparent); }
/* The box over the log and the pinned lines, as the playground's known box, above the lines
   (note 04): each takes at most 40%, so two still leave the lines room. */
.win[data-testid=log] .known-shelf { flex: none; max-height: 40%; margin-top: 6px; padding: 6px 8px 8px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--opp-mark) 5%, var(--panel)); }
.known-pin-text { padding: 0 8px 4px; font-size: 12px; color: var(--muted); }
.known-unpin { padding: 0 2px; border: 0; background: none; color: var(--muted); font-size: 12px; }
.known-unpin:hover { color: var(--strong); }
.known-group.is-flashed { animation: log-flash 1.6s ease-out; }
/* Known cards on the board (notes 01–03): the opponent's under their counters, face up with an
   --opp-mark ring, one tag under each run of cards from one event; yours a list by place. */
.known-board { display: flex; flex-direction: column; gap: 8px; }
.known-run { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.known-run__cards { display: flex; flex-wrap: wrap; gap: 6px; }
.known-board-card { position: relative; }
.known-board-card .known-art { box-shadow: 0 0 0 2px var(--opp-mark); }
.known-board-card .known-dismiss { top: -6px; right: -6px; }
.known-board-card:hover .known-dismiss, .known-lib__row:hover .known-dismiss { display: grid; }
.known-board-card.is-flashed, .known-lib__row.is-flashed { animation: log-flash 1.6s ease-out; }
.known-board-tag { padding: 1px 5px; border-radius: 3px; background: var(--opp-mark); color: var(--on-mark);
  font: 700 9px var(--font-ui); letter-spacing: 0.04em; white-space: nowrap; }
.known-lib { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.known-lib__row { display: flex; align-items: center; gap: 6px; }
.known-lib .k { min-width: 58px; font: 700 9px var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.known-lib .known-dismiss { position: static; }

/* The preview, arriving (`in-*`) and going (`out-*`) as the settings say (`seats::ZoomFx`),
   over --zt, the zoom out a quarter quicker. `preview.rs` keeps a going preview until its
   zoom out ends, and gives each where its card was (--dx, --dy, --s) and where the pointer was
   on it (--ix, --iy). */
.preview.rm-card {
  position: fixed;
  z-index: 50;
  /* Its width is set inline, from the settings' "Zoom size" (`preview::sized`). */
  width: 280px;
  pointer-events: none;
  box-shadow: 0 10px 30px #000a;
  border-radius: 12px;
  overflow: hidden;
  animation-duration: var(--zt, 240ms);
  animation-fill-mode: both;
}
.preview[class*=" out-"] { animation-duration: calc(var(--zt, 240ms) * .75); }
.preview.in-fade { animation-name: zin-fade; animation-timing-function: ease-out; }
.preview.out-fade { animation-name: zout-fade; animation-timing-function: ease-in; }
@keyframes zin-fade { from { opacity: 0; transform: scale(.92); } }
@keyframes zout-fade { to { opacity: 0; transform: scale(.94); } }
.preview.in-grow { animation-name: zin-grow; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
.preview.out-grow { animation-name: zout-grow; animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
@keyframes zin-grow { from { transform: translate(var(--dx), var(--dy)) scale(var(--s)); opacity: .5; border-radius: 6px; } }
@keyframes zout-grow { to { transform: translate(var(--dx), var(--dy)) scale(var(--s)); opacity: 0; border-radius: 6px; } }
.preview.in-flip { animation-name: zin-flip; animation-timing-function: cubic-bezier(.3, .7, .3, 1); }
.preview.out-flip { animation-name: zout-flip; animation-timing-function: ease-in; }
@keyframes zin-flip {
  from { transform: perspective(900px) rotateY(-95deg); opacity: 0; }
  65% { transform: perspective(900px) rotateY(10deg); opacity: 1; }
  to { transform: perspective(900px) rotateY(0deg); }
}
@keyframes zout-flip { to { transform: perspective(900px) rotateY(90deg); opacity: 0; } }
.preview.in-rise { animation-name: zin-rise; animation-timing-function: cubic-bezier(.25, .8, .3, 1); }
.preview.out-rise { animation-name: zout-rise; animation-timing-function: ease-in; }
@keyframes zin-rise { from { transform: translateY(28px) scale(.97); opacity: 0; } 70% { transform: translateY(-5px); opacity: 1; } }
@keyframes zout-rise { to { transform: translateY(18px) scale(.98); opacity: 0; } }
.preview.in-foil { animation-name: zin-fade; animation-timing-function: ease-out; }
.preview.out-foil { animation-name: zout-fade; animation-timing-function: ease-in; }
.preview:is(.in-foil, .out-foil)::after { content: ""; position: absolute; inset: 0; z-index: 3; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .55) 46%, rgba(180, 220, 255, .35) 52%, transparent 66%);
  background-size: 260% 100%; animation: foil calc(var(--zt, 240ms) * 2.2) ease-in-out both; }
.preview.out-foil::after { animation-duration: calc(var(--zt, 240ms) * .75); animation-direction: reverse; }
@keyframes foil { from { background-position: 130% 0; opacity: 0; } 25% { opacity: 1; } to { background-position: -30% 0; opacity: 0; } }
.preview.in-iris { animation-name: zin-iris; animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
.preview.out-iris { animation-name: zout-iris; animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
@keyframes zin-iris { from { clip-path: circle(0% at var(--ix) var(--iy)); } to { clip-path: circle(150% at var(--ix) var(--iy)); } }
@keyframes zout-iris { from { clip-path: circle(150% at var(--ix) var(--iy)); } to { clip-path: circle(0% at var(--ix) var(--iy)); } }
.preview.in-dealt { animation-name: zin-dealt; animation-timing-function: cubic-bezier(.2, .75, .25, 1); }
.preview.out-dealt { animation-name: zout-dealt; animation-timing-function: ease-in; }
@keyframes zin-dealt {
  from { transform: translate(var(--dx), var(--dy)) scale(var(--s)) rotate(-16deg); opacity: .4; }
  72% { transform: rotate(2.5deg); opacity: 1; }
}
@keyframes zout-dealt { to { transform: translate(46px, -28px) rotate(12deg) scale(.9); opacity: 0; } }
.preview.in-focus { animation-name: zin-focus; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
.preview.out-focus { animation-name: zout-focus; animation-timing-function: ease-in; }
@keyframes zin-focus { from { filter: blur(14px) brightness(1.4); opacity: 0; transform: scale(1.06); } }
@keyframes zout-focus { to { filter: blur(10px); opacity: 0; transform: scale(1.04); } }
.preview.out-off { display: none; }

/* The debug overlay */
.corner { position: fixed; top: 2px; right: 2px; z-index: 60; font-size: 12px; }
.corner summary { cursor: pointer; color: var(--muted); padding: 0 6px; list-style: none; text-align: right; }
/* The menu's Debug switch: the bundle turns `rm-switch` on under `rm-toggle`, whose look a menu
   item doesn't take. */
.rm-menu__item[aria-checked="true"] .rm-switch { background: var(--accent); border-color: var(--accent); }
.rm-menu__item[aria-checked="true"] .rm-switch::after { left: 14px; background: var(--on-accent); }
.overlay {
  position: fixed;
  top: 24px;
  right: 8px;
  z-index: 55;
  width: 440px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--overlay) 93%, transparent);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: 11px/1.4 var(--font-mono);
  user-select: text;
}
.overlay h3 { margin: 8px 0 2px; font-size: 11px; color: var(--accent); display: flex; gap: 8px; align-items: center; }
.overlay pre { margin: 0; white-space: pre-wrap; word-break: break-all; max-height: 240px; overflow: auto; }
.overlay ol { margin: 0; padding: 0 0 0 24px; }

/* A past board (the past board spec; the canvas board BoardPast): a banner over the board, the
   design system's is-past rule on the battlefield and hand, and the read-only panel. The
   filter is on the halves, not the field as the bundle has it, so the viewer's fixed backdrop
   still fills the window (note 09). */
.rm-board.is-past .rm-field { filter: none; }
.rm-board.is-past .rm-field__half { filter: saturate(0.2) brightness(0.82); }
.rm-board > .rm-pastbar { grid-area: banner; }
/* The global `button { align-self: flex-start }` pinned a past bar's button to its top (owner review). */
.rm-pastbar > button { align-self: center; }
.rm-pastbar__text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Replay mode (the replay viewer spec, Decided 1): the board at full strength, a "Replay" mark
   in the game bar, and the replay's panel in the decision panel's place. */
.rm-topbar__replay { flex: none; align-self: center; border-color: var(--accent); color: var(--accent); }
.rm-replay__line { margin: 0; font: 400 14px/20px var(--font-ui); color: var(--text); }
.rm-replay__steps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.rm-replay__steps > .rm-decision__light { grid-column: 1 / -1; justify-self: center; }
/* A decision as it was faced (plan Task 11, spec Call 13): the frame's prompt read-only, its
   options as rows rather than buttons, the one chosen marked in select blue with a tick. Never
   gold, which is for what's yours to act on now (ADR 0037). */
.rm-faced { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--line); }
.rm-faced__q { margin: 0; font: 600 15px/20px var(--font-display); color: var(--strong); }
.rm-faced__items { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.rm-faced__item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line); border-radius: var(--radius-md); font: 400 14px/20px var(--font-ui); color: var(--muted); }
.rm-faced__item.is-chosen { border-color: var(--select); background: var(--select-soft); box-shadow: var(--glow-select); color: var(--strong); }
.rm-faced__tick { color: var(--select); font-weight: 700; }
.rm-faced__chose { margin: 0; font: 400 14px/20px var(--font-ui); color: var(--text); }

/* The replay's controls bar (`replay_bar.rs`; Decided 3, controls bar notes 01 and 04): the
   board's last row, like a video player's. The timeline gives every move the same width, each
   turn a segment in its active player's colour, the moves to come dimmed. No transitions, so
   nothing moves under reduced motion. */
.rm-board > .rm-replaybar { grid-area: replay; }
.rm-replaybar { display: flex; align-items: center; gap: var(--space-3); min-width: 0; padding: var(--space-1) var(--space-2);
  background: var(--panel); border-top: 1px solid var(--line); }
.rm-replaybar__steps { display: flex; flex: none; gap: 2px; }
.rm-replaybar__play { color: var(--strong); }
.rm-replaybar__play svg.is-play { fill: currentColor; }
.rm-replaybar__speed { flex: none; }
.rm-replaybar__speed .rm-tab { height: 24px; padding: 0 var(--space-2); font-size: 12px; }
.rm-replaybar__track { position: relative; flex: 1 1 0; min-width: 120px; height: 16px; cursor: pointer; touch-action: none; }
.rm-replaybar__segs { display: flex; height: 100%; border-radius: var(--radius-sm); overflow: hidden; }
.rm-replaybar__seg { flex: 1 1 0; min-width: 0; overflow: hidden; display: flex; align-items: center; padding-left: 3px;
  font: 700 10px/1 var(--font-ui); color: var(--on-mark); background: var(--faint); box-shadow: inset -1px 0 0 var(--panel); }
.rm-replaybar__seg[data-whose="you"] { background: var(--you-mark); }
.rm-replaybar__seg[data-whose="opp"] { background: var(--opp-mark); }
.rm-replaybar__ticks { position: absolute; inset: 0; pointer-events: none; border-radius: var(--radius-sm);
  background: repeating-linear-gradient(to right, color-mix(in srgb, var(--bg) 40%, transparent) 0 1px, transparent 1px var(--tick-every)); }
.rm-replaybar__ahead { position: absolute; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: color-mix(in srgb, var(--panel) 62%, transparent); }
.rm-replaybar__head { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; pointer-events: none;
  background: var(--strong); border-radius: 1px; }
.rm-replaybar__head::after { content: ""; position: absolute; top: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--strong); }
.rm-replaybar__tip { position: absolute; bottom: calc(100% + var(--space-2)); left: clamp(120px, var(--x), calc(100% - 120px)); transform: translateX(-50%);
  z-index: var(--z-float); width: max-content; max-width: 240px; padding: var(--space-1) var(--space-2); pointer-events: none;
  font: 400 12px/16px var(--font-ui); color: var(--text); background: var(--panel-float); border: 1px solid var(--line-control);
  border-radius: var(--radius-md); box-shadow: var(--shadow-menu); }
.rm-replaybar__readout { flex: none; font: 600 12px/16px var(--font-ui); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rm-replaybar__link { flex: none; text-decoration: none; }

/* The replay's views (`replay_head.rs`; Decided 4 and 5, Task 8): a segmented control in the game
   bar, each player with a dot in the colour they have on the board now, views not open greyed
   with a lock beside a note; ⇅ flips *Everything*. */
.rm-replayhead { display: flex; flex: none; align-items: center; gap: var(--space-2); min-width: 0; }
.rm-replayhead__views .rm-tab { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--space-2); font-size: 13px; }
.rm-replayhead__views .rm-tab:disabled { opacity: .45; cursor: not-allowed; }
.rm-replayhead__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--opp-mark); }
.rm-replayhead__dot[data-whose="you"] { background: var(--you-mark); }
.rm-replayhead__lock { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
/* The match's games (Decided 7, Task 9): a tab each with its winner, the one shown marked. */
.rm-replayhead__games .rm-tab { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--space-2); font-size: 13px; color: var(--text); text-decoration: none; white-space: nowrap; }
.rm-replayhead__games .rm-tab[aria-current="page"] { background: var(--select-soft); color: var(--strong); box-shadow: inset 0 -2px 0 var(--select); }
.rm-replayhead__winner { font-size: 12px; color: var(--muted); }
.rm-replayhead__note { font: 400 12px/16px var(--font-ui); color: var(--muted); white-space: nowrap; }
.rm-replay__result { margin: 0; font: 600 15px/20px var(--font-display); color: var(--strong); }
.rm-replay__lock { margin: 0; font: 400 12px/16px var(--font-ui); color: var(--muted); }
/* In a replay, whose turn it is: their panel's edge in their colour. */
.rm-player.is-active { box-shadow: inset 3px 0 0 var(--opp-mark); }
.rm-player.rm-panel--you.is-active { box-shadow: inset 3px 0 0 var(--you-mark); }

/* The top player's hand, a replay's or a coaching game's (`hand::TopHand`): a pile beside their
   graveyard and exile, its cards stacked in the pile's card place, the last on top. Hovered or
   focused, they fan out beside the pile, larger, under the player's name and count. Faces where
   the view sees them and backs for the rest; a coach's pointer lands on a card's slot. */
.pile--hand { order: -1; cursor: default; --card-w: 36px; }
/* Three piles in the top half: on a short board all of them shrink so the hand fits. */
.piles__half { container-type: size; }
@container (max-height: 300px) { .piles:has(.pile--hand) .pile { --card-w: 36px; } }
.pile--hand .rm-card { pointer-events: auto; }
.rm-tophand__fan { position: absolute; inset: 0; display: block; }
.rm-tophand__label { display: none; }
.rm-tophand__cards { display: grid; }
.rm-tophand__cards > .rm-card { grid-area: 1 / 1; }
.pile--hand:is(:hover, :focus-within) .rm-tophand__fan { inset: -8px auto auto calc(100% + 10px); z-index: 6;
  display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 10px; border: 1px solid var(--edge);
  border-radius: 10px; background: var(--raised); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.rm-field[data-piles=right] .pile--hand:is(:hover, :focus-within) .rm-tophand__fan { left: auto; right: calc(100% + 10px); }
.pile--hand:is(:hover, :focus-within) .rm-tophand__label { display: block; font-size: 11px; white-space: nowrap; }
.pile--hand:is(:hover, :focus-within) .rm-tophand__cards { display: flex; }
.pile--hand:is(:hover, :focus-within) .rm-tophand__cards > .rm-card { --card-w: 72px; grid-area: auto; }
.pile--hand:is(:hover, :focus-within) .rm-tophand__cards > .rm-card + .rm-card { margin-left: -20px; }
.piles__half.opp:has(.pile--hand:is(:hover, :focus-within)) { overflow: visible; z-index: 1; }

/* The settings menu (`settings.rs`): a dialog over the table, its sections down the left. Its
   colours are the theme's, so it changes with it. */
.settings-scrim { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(6px);
  animation: settings-scrim 160ms ease-out; }
@keyframes settings-scrim { from { opacity: 0; } }
.settings { width: min(920px, 100%); height: min(660px, 100%); display: grid; grid-template-columns: 200px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr); overflow: hidden; color: var(--text); background: var(--panel-float);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  animation: settings-in 200ms cubic-bezier(.2, .8, .2, 1); user-select: none; }
@keyframes settings-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.settings__head { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 22px;
  border-bottom: 1px solid var(--line); background: var(--panel); }
.settings__head h2 { margin: 0; font: 700 20px/1.2 var(--font-display); letter-spacing: .01em; color: var(--strong); }
.settings__hint { flex: 1; color: var(--muted); font-size: 13px; }
.settings__close { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.settings__close:hover { background: var(--raised); color: var(--strong); }
.settings__nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-right: 1px solid var(--line);
  background: var(--panel); }
.settings__nav button { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0;
  border-radius: 8px; background: transparent; color: var(--muted); font: 600 15px/1.2 var(--font-display);
  letter-spacing: .02em; text-align: left; cursor: pointer; transition: background 120ms, color 120ms; }
.settings__nav button:hover { background: var(--raised); color: var(--text); }
.settings__nav button[aria-current] { background: var(--accent-soft); color: var(--strong); }
.settings__nav button[aria-current]::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent); }
.settings__nav .glyph { width: 20px; text-align: center; font-size: 16px; color: var(--accent); }
.settings__body { overflow-y: auto; padding: 18px 26px 28px; scrollbar-width: thin; }
.settings__body h3 { margin: 4px 0 6px; font: 700 22px/1.2 var(--font-display); color: var(--strong); }
.set-intro { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; padding: 14px 0;
  border-bottom: 1px solid var(--line); }
.set-row.wide { grid-template-columns: minmax(0, 1fr); }
.set-text { display: flex; flex-direction: column; gap: 2px; }
.set-label { font: 600 15px/1.3 var(--font-display); letter-spacing: .01em; color: var(--strong); }
.set-note { font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); }
.seg button { padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font: 600 13px/1.2 var(--font-ui); cursor: pointer; transition: background 120ms, color 120ms; }
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); }
.set-dim { opacity: .5; }
.set-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.set-cards button { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); color: var(--text); text-align: left; cursor: pointer;
  transition: border-color 120ms, box-shadow 160ms, transform 120ms; }
.set-cards button:hover { border-color: var(--line-control); transform: translateY(-1px); }
.set-cards button[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 16px var(--accent-glow); }
.set-cards b { font: 700 15px/1.2 var(--font-display); color: var(--strong); }
.set-cards span { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.set-slider { display: flex; align-items: center; gap: 12px; }
.set-slider input { width: 200px; accent-color: var(--accent); }
.set-slider output { min-width: 56px; text-align: right; font: 600 14px var(--font-ui); font-variant-numeric: tabular-nums; color: var(--text); }
.set-key { padding: 6px 12px; border: 1px solid var(--line-control); border-radius: 8px; background: var(--bg); color: var(--text);
  font: 600 13px var(--font-ui); cursor: pointer; }
.set-key:hover { border-color: var(--accent); }
.settings .rm-toggle { padding: 0; }
.order { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; min-width: 220px; }
.order li { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); }
.order-n { width: 18px; color: var(--muted); font: 600 12px var(--font-ui); }
.order-name { flex: 1; font-weight: 600; }
.order button { width: 26px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel);
  color: var(--text); font-size: 11px; cursor: pointer; }
.order button:disabled { opacity: .35; cursor: default; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.swatch { padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; text-align: left;
  transition: border-color 120ms, box-shadow 160ms, transform 120ms; }
.swatch:hover { transform: translateY(-1px); border-color: var(--line-control); }
.swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 16px var(--accent-glow); }
.sw-board { position: relative; display: block; height: 62px; overflow: hidden; border-radius: 8px; background: var(--sw-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sw-text) 14%, transparent); }
.sw-board::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 30%; background: var(--sw-panel); }
.sw-pill { position: absolute; left: 40%; top: 12px; width: 36%; height: 12px; border-radius: 999px; background: var(--sw-accent); }
.sw-line { position: absolute; left: 40%; top: 32px; width: 48%; height: 6px; border-radius: 3px; background: var(--sw-text); opacity: .7; }
.sw-line.short { top: 44px; width: 28%; }
.sw-name { display: block; margin-top: 7px; font: 600 13px var(--font-ui); color: var(--text); }
.cue-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 16px; margin: 0; padding: 0; list-style: none; }
.cue-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
/* Settings · Game appearance (appearance settings §1, note 06): the corner menu's tabs in a panel
   at the preview's left (owner list #39), the preview under the panel once the page is narrower
   than about 1240 px. The preview stays in sight while a long tab scrolls, no wider than 1200 px
   and never taller than the window leaves room for (#36). */
.ax-col.ga-page { max-width: none; container-type: inline-size; }
.ga { display: grid; grid-template-columns: 640px minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.ga-panel { grid-column: 1; grid-row: 1; }
.ga-stage { grid-column: 2; max-width: min(1200px, (100vh - 200px) * 1440 / 860); position: sticky; top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
@container (max-width: 1240px) {
  .ga { grid-template-columns: minmax(0, 1fr); }
  .ga-stage { position: static; }
  .ga-panel, .ga-stage { grid-column: auto; grid-row: auto; }
}
.ga-stage > .seg { align-self: flex-start; }
.ga-panel { display: grid; grid-template-columns: 150px minmax(0, 1fr); grid-template-rows: auto auto; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel-float); }
.ga-panel .settings__nav { grid-row: 1 / -1; padding: 12px 8px; }
.ga-panel .settings__nav button { padding: 8px; font-size: 14px; }
.ga-panel .settings__body { overflow: visible; padding: 14px 22px 8px; }
.ga-panel .set-row { grid-template-columns: minmax(0, 1fr); }
/* A choice of a few reads on one line; it never wraps into a lopsided pill. */
.ga-panel .seg { flex-wrap: nowrap; justify-self: start; max-width: 100%; }
.ga-panel .seg button { white-space: nowrap; }
.ga-panel .rm-toggle { padding: 0; justify-self: start; }
.ga-foot { padding: 12px 18px 16px; }
.ga-play { display: flex; justify-content: flex-end; margin-bottom: var(--space-2); }
/* The still board (`table::still`): a 1440 × 860 window scaled to the box's width. */
.still-box { position: relative; width: 100%; aspect-ratio: 1440 / 860; overflow: hidden; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg); }
.still__board { position: absolute; left: 0; top: 0; width: 1440px; height: 860px; transform-origin: 0 0; }
.still__board > .rm-board { height: 100%; min-width: 0; }
/* Dividing damage among targets: a row per target with its amount. */
/* The damage assignment's rows have no order number (Decided question 2), and their + only
   (question 6); the suggested point's + is gold. */
.rm-assign__row { grid-template-columns: minmax(0, 1fr) auto; }
.rm-assign .rm-btn--primary { color: var(--on-accent); }
.rm-divide { display: grid; gap: 6px; }
.rm-divide__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 400 14px/20px var(--font-ui); }
.rm-divide__row input { width: 4em; }
/* The match intro over the board (`Intro`, Task 12): the board's .ov with the design system's
   tokens. The coin tosses once and lands on the flip winner's face, the front one, and the call
   line fades in as it lands (note 03); the answers work from the first frame. */
.intro { position: absolute; inset: 0; z-index: var(--z-overlay); display: flex; align-items: center; justify-content: center;
  padding: 20px; box-sizing: border-box; background: var(--scrim); backdrop-filter: blur(2px); }
.intro .stage { width: min(1180px, 100%); max-height: 100%; overflow: auto; box-sizing: border-box; display: flex; flex-direction: column;
  background: var(--rail); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  animation: rm-in var(--dur-slow) var(--ease-out); }
.intro .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 32px; border-bottom: 1px solid var(--line); }
.intro .brand { font: 700 18px/22px var(--font-display); letter-spacing: .04em; color: var(--muted); }
/* Top-aligned, so the coin's box sits level with the pictures and the call and its answers,
   one centred group under it, with the names (owner list #25). */
.intro .versus { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 32px; padding: 96px 32px 40px; }
.intro .player { flex: 1 1 300px; max-width: 320px; display: flex; flex-direction: column; gap: 12px; }
/* The avatar at the board's portrait size and corners; it already has a card art's shape. */
.intro .player .rm-avatar { --size: 233px; border-radius: 12px; font-size: 96px; box-shadow: 0 20px 48px rgba(0, 0, 0, .65); }
.intro .pname { display: flex; align-items: center; gap: 10px; font: 700 34px/38px var(--font-display); color: var(--strong); }
.intro .mid { --toss-duration: 1150ms; flex: 0 1 340px; min-width: 260px; display: flex; flex-direction: column;
  align-items: center; gap: 16px; text-align: center; }
.intro .rz { position: relative; width: 100%; height: 233px; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--field); border: 1px solid var(--result-line); overflow: hidden; perspective: 470px;
  animation: rzBorder var(--reveal-duration) var(--toss-duration) ease-out both; }
.intro .rz[data-result="heads"] { --turn: 0deg; --result-line: #615030; --flash-line: #9c7a43; --light: .58; --flash: 1; --reveal-duration: 680ms; }
.intro .rz[data-result="tails"] { --turn: 180deg; --result-line: #242734; --flash-line: #252936; --light: .68; --flash: .78; --reveal-duration: 420ms; }
.intro .rz::before { content: ""; position: absolute; inset: 0; opacity: var(--light);
  animation: rzLight var(--reveal-duration) var(--toss-duration) ease-out both; }
.intro .rz[data-result="heads"]::before { background: radial-gradient(ellipse at 50% 76%, #e8b04a48, #ba803c16 54%, transparent 78%); }
.intro .rz[data-result="tails"]::before { background: radial-gradient(ellipse at 50% 77%, #62739322, #080a13a8 78%); }
.intro .coinwrap { position: relative; width: 96px; height: 96px; transform-style: preserve-3d; transform: translateY(17px);
  animation: rzToss var(--toss-duration); }
.intro .coin { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--turn));
  animation: rzSpin var(--toss-duration); }
.intro .coin-edge, .intro .coin-edge::before, .intro .coin-edge::after, .intro .coin-face { position: absolute; inset: 0; border-radius: 50%; }
.intro .coin-edge, .intro .coin-edge::before, .intro .coin-edge::after { background: repeating-conic-gradient(#60451f 0deg 4deg, #bc9254 4deg 7deg); }
.intro .coin-edge { transform-style: preserve-3d; }
.intro .coin-edge::before { content: ""; transform: translateZ(1.6px); }
.intro .coin-edge::after { content: ""; transform: translateZ(-1.6px); }
.intro .coin-face { display: grid; place-items: center; backface-visibility: hidden;
  background: linear-gradient(142deg, #f9dd9d 4%, #b07733 38%, #66451f 62%, #bd8f4a 87%);
  box-shadow: inset 0 0 0 1px #f5d38b70; color: #69461e; }
.intro .coin-face::before, .intro .coin-face::after { content: ""; position: absolute; border-radius: 50%; }
.intro .coin-face::before { inset: 4px; background: linear-gradient(125deg, #a36c2d, #d7ad64 29%, #ebc787 49%, #a7763d 78%, #8b6031);
  box-shadow: 0 0 0 1px #69461e, inset 0 0 0 1px #f8d89b80; }
.intro .coin-face::after { inset: 8px; border: 1px dotted #69461e9c; }
.intro .coin-heads { transform: translateZ(3px); }
.intro .coin-tails { transform: rotateX(180deg) translateZ(3px); }
.intro .coin-mark { position: relative; width: 49px; height: 49px; transform: translateY(-6px); filter: drop-shadow(0 1px 0 #fbe0aa); }
.intro .coin-mark svg { display: block; width: 100%; height: 100%; }
.intro .coin-heads path[fill="#1d2129"] { fill: currentColor; }
.intro .coin-heads path[stroke="#1d2129"] { stroke: currentColor; }
.intro .coin-legend { position: absolute; bottom: 16px; font: 800 9px/1 system-ui, sans-serif; letter-spacing: .125em;
  text-transform: uppercase; color: #563614; text-shadow: 0 1px 0 #fbe0aa99; }
.intro .rz-label { position: absolute; top: 14px; left: 0; right: 0; z-index: 1; }
.intro .shadow { position: absolute; top: calc(50% + 63px); left: 50%; width: 77px; height: 10px; margin-left: -38.5px; border-radius: 50%;
  background: #0009; filter: blur(3px); animation: rzShadow var(--toss-duration); }
.intro .call { width: 100%; box-sizing: border-box; padding: 12px 16px; border-radius: 10px; background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); color: var(--text); }
.intro .res { animation: rzRes 240ms var(--toss-duration) both; }
.intro .foot { display: grid; grid-template-columns: repeat(2, 200px); justify-content: center; gap: 12px; padding: 8px 32px 32px; }
.intro .foot .rm-btn { justify-content: center; }
.intro .mid .foot { width: 100%; grid-template-columns: 1fr 1fr; padding: 0; }
@keyframes rzToss {
  0% { transform: translateY(17px); animation-timing-function: cubic-bezier(.14, .7, .36, 1); }
  35% { transform: translateY(-51px); animation-timing-function: cubic-bezier(.55, 0, .85, .55); }
  79% { transform: translateY(17px); animation-timing-function: ease-out; }
  89% { transform: translateY(10px); animation-timing-function: ease-in; }
  100% { transform: translateY(17px); }
}
@keyframes rzSpin {
  0% { transform: rotateX(0deg) rotateZ(-8deg); }
  46% { transform: rotateX(510deg) rotateZ(10deg); }
  79% { transform: rotateX(calc(702deg + var(--turn))) rotateZ(-2deg); }
  89% { transform: rotateX(calc(729deg + var(--turn))) rotateZ(1deg); }
  100% { transform: rotateX(calc(720deg + var(--turn))) rotateZ(0deg); }
}
@keyframes rzShadow {
  0%, 79%, 100% { transform: scale(1); opacity: 1; }
  35% { transform: scale(.66); opacity: .35; }
  89% { transform: scale(.92); opacity: .75; }
}
@keyframes rzLight { 0% { opacity: 0; } 32% { opacity: var(--flash); } 100% { opacity: var(--light); } }
@keyframes rzBorder { 0% { border-color: var(--line); } 32% { border-color: var(--flash-line); } 100% { border-color: var(--result-line); } }
@keyframes rzRes { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .intro .rz, .intro .rz::before, .intro .rz *, .intro .res { animation: none; }
}

/* M3c draft screens (Task 9): ported from the canvas's draft.css and the rv-* rules of the
   DraftPickSlim and DraftLogPassed boards. Gold still means "yours to act on now". */
.dr-pip.sym { width: 16px; height: 16px; font-size: 9px; flex: none; font-style: normal; }
.dr-pip.sym.is-splash { width: 11px; height: 11px; font-size: 6px; opacity: .7; }
.dr-mv { display: inline-grid; place-items: center; min-width: 14px; height: 14px; padding: 0 2px; box-sizing: border-box; border-radius: 3px; background: #15130f; color: #f4f0e6; font: 700 9px/1 var(--font-ui); font-variant-numeric: tabular-nums; }
.dr-card { width: calc(132px * var(--cs, 1)); padding: calc(4px * var(--cs, 1)); }
.dr-card .rm-card__name { font-size: calc(10.5px * var(--cs, 1)); line-height: calc(14px * var(--cs, 1)); padding: 2px 4px; }
.dr-card .rm-card__type { font-size: calc(8.5px * var(--cs, 1)); line-height: calc(12px * var(--cs, 1)); padding: 1px 4px; }
.dr-card--sm { width: calc(112px * var(--cs, 1)); }
.dr-card.is-selected { box-shadow: 0 0 0 3px var(--select), 0 0 16px var(--select-glow); transform: translateY(-6px); }
.dr-card.is-taken { filter: grayscale(.6) brightness(.55); }
.dr-card.is-gone { opacity: .35; outline: 1px dashed var(--line-control); outline-offset: 2px; }
.dr-card__tag { position: absolute; z-index: 2; left: 50%; top: -10px; transform: translateX(-50%); padding: 0 6px; border-radius: 3px; font: 700 9px/15px var(--font-ui); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 0 0 1px rgba(0,0,0,.35); background: var(--panel-float); color: var(--strong); }
.dr-card__tag--pick { background: var(--select); color: var(--on-select); }
.dr-card__tag--auto { background: var(--rail); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dr-pack { display: flex; flex-wrap: wrap; gap: 14px 12px; align-content: flex-start; padding-top: 12px; }
/* A new pack (a Winston pile) deals in from the side it's passed from, a card at a time; the
   screen clips it sideways so it never widens the page. */
.dr-screen:has(.dr-pack--deal) { overflow-x: clip; }
.dr-pack--deal > .dr-card { animation: dr-deal 380ms var(--ease-out) backwards; animation-delay: calc(120ms + min(var(--i, 0), 15) * 22ms); }
/* The last pack, copied over where it was (`pick::leave`), slides out the other way first, the
   card just picked staying put. */
.dr-screen__main > .dr-wait { box-sizing: border-box; min-height: var(--pack-h, 0px); }
.dr-pack--leaving { position: fixed; z-index: 5; margin: 0; pointer-events: none; }
.dr-pack--leaving > .dr-card { animation: dr-leave 300ms var(--ease-in) forwards; animation-delay: calc(min(var(--i, 0), 15) * 12ms); }
.dr-pack--leaving > :is(.is-selected, .is-lifted) { visibility: hidden; }
.dr-pack--leaving[data-from="left"] > .dr-card { --dx: 60vw; }
@keyframes dr-leave { to { translate: var(--dx, -60vw) 0; rotate: -4deg; opacity: 0; } }
.dr-pack--deal[data-from="left"] > .dr-card { --dx: -60vw; }
.dr-pack--deal[data-deal="b"] > .dr-card { animation-name: dr-deal-b; }
@keyframes dr-deal { from { translate: var(--dx, 60vw) 0; rotate: 4deg; opacity: 0; } 60% { opacity: 1; } }
/* The same, by another name: a pack patched over the last one swaps names to deal again. */
@keyframes dr-deal-b { from { translate: var(--dx, 60vw) 0; rotate: 4deg; opacity: 0; } 60% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .dr-pack--deal > .dr-card { animation: dr-fade 160ms ease backwards; }
  .dr-pack--deal[data-deal="b"] > .dr-card { animation-name: dr-fade-b; }
  .dr-pack--leaving > .dr-card { animation: dr-fade 120ms ease reverse forwards; } }
@keyframes dr-fade { from { opacity: 0; } }
@keyframes dr-fade-b { from { opacity: 0; } }
.dr-where { display: flex; align-items: baseline; gap: 10px; font: 600 13px/18px var(--font-ui); color: var(--muted); }
.dr-where b { font: 700 22px/26px var(--font-display); color: var(--strong); font-variant-numeric: tabular-nums; }
.dr-clock { display: flex; align-items: center; gap: 10px; min-width: 190px; padding: 6px 12px; border: 1px solid var(--line-control); border-radius: var(--radius-lg); background: var(--panel); }
.dr-clock__n { font: 700 24px/28px var(--font-display); color: var(--strong); font-variant-numeric: tabular-nums; }
.dr-clock__m { flex: 1; display: flex; flex-direction: column; gap: 4px; font: 600 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dr-clock__bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.dr-clock__bar span { display: block; height: 100%; background: var(--clock); }
.dr-clock--rope { border-color: var(--rope); box-shadow: 0 0 0 1px var(--rope); }
.dr-clock--rope .dr-clock__n { color: #f0a0a0; }
.dr-clock--rope .dr-clock__m { color: #f0a0a0; }
.dr-clock--rope .dr-clock__bar span { background: repeating-linear-gradient(135deg, var(--rope) 0 6px, var(--rope-2) 6px 12px); }
.dr-clock--off { color: var(--muted); border-style: dashed; }
.dr-q { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px 0 5px; border-radius: var(--radius-pill); background: var(--panel-float); box-shadow: inset 0 0 0 1px var(--line-control); font: 700 11px/1 var(--font-ui); color: var(--strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dr-q i { position: relative; width: 10px; height: 12px; border-radius: 2px; background: var(--text); box-shadow: 2px -2px 0 -0.5px var(--panel-float), 2px -2px 0 0 var(--muted); }
.dr-q--most { background: var(--strong); color: var(--bg); box-shadow: none; }
.dr-q--most i { background: var(--bg); box-shadow: 2px -2px 0 -0.5px var(--strong), 2px -2px 0 0 var(--bg); }
.dr-ti { display: flex; flex-direction: column; gap: 6px; }
.dr-ti__dir { display: flex; align-items: center; gap: 8px; font: 600 12px/16px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dr-ti__dir b { color: var(--strong); letter-spacing: 0; text-transform: none; font-size: 13px; }
.dr-ti__row { display: flex; align-items: stretch; gap: 0; }
.dr-seat { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px 7px; border-radius: var(--radius-md); text-align: center; }
.dr-seat .rm-avatar { --size: 28px; font-size: 11px; }
.dr-seat__n { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 12px/16px var(--font-ui); color: var(--strong); }
.dr-seat__s { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 20px; font: 500 11px/14px var(--font-ui); color: var(--muted); white-space: nowrap; }
.dr-seat--you { background: var(--panel-you); box-shadow: inset 0 0 0 1px var(--line-you); }
.dr-seat--you .dr-seat__n::after { content: " · you"; color: var(--select); font-weight: 600; }
.dr-seat--most { box-shadow: inset 0 0 0 2px var(--strong); }
/* The drawn table's side edge (`TeamPick`), with your ring; the side's name is under the name. */
.dr-seat--a { box-shadow: inset 0 -3px 0 var(--team-a); }
.dr-seat--b { box-shadow: inset 0 -3px 0 var(--team-b); }
.dr-seat--you.dr-seat--a { box-shadow: inset 0 -3px 0 var(--team-a), inset 0 0 0 1px var(--line-you); }
.dr-seat--you.dr-seat--b { box-shadow: inset 0 -3px 0 var(--team-b), inset 0 0 0 1px var(--line-you); }
.dr-seat--away { opacity: .6; }
.dr-seat--away .rm-avatar { filter: grayscale(1); }
.dr-seat--empty .rm-avatar { background: transparent !important; box-shadow: inset 0 0 0 1px dashed var(--line-control); border: 1px dashed var(--line-control); color: var(--muted); }
.dr-ti__arrow { flex: none; align-self: center; width: 16px; height: 16px; color: var(--muted); }
.dr-ti__arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dr-ti__wrap { display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 12px; line-height: 16px; color: var(--muted); }
.dr-ti__wrap::before { content: ""; flex: 1; height: 8px; border: 1.5px solid var(--line-control); border-top: 0; border-radius: 0 0 6px 6px; }
.dr-ti__next { font-size: 13px; line-height: 18px; color: var(--text); }
.dr-ti__next b { color: var(--strong); }
.dr-ti--sm .dr-seat { padding: 3px 1px; }
.dr-ti--sm .dr-seat .rm-avatar { --size: 20px; font-size: 9px; }
.dr-ti--sm .dr-seat__n { font-size: 10px; line-height: 12px; }
.dr-ti--sm .dr-seat__s { min-height: 16px; font-size: 10px; }
.dr-ti--sm .dr-ti__arrow, .dr-ti--sm .dr-ti__arrow svg { width: 10px; height: 10px; }
.dr-ti--sm .dr-seat__s { overflow: hidden; }
.dr-ti--sm .dr-st { font-size: 0; gap: 0; }
.dr-ti--sm .dr-st::before { font-size: 10px; }
.dr-ti--sm .dr-secs { display: none; }
.dr-ti--sm .dr-q { height: 16px; padding: 0 5px 0 4px; font-size: 10px; }
.dr-ti--sm .dr-ti__wrap { font-size: 11px; }
.dr-ring__table { position: absolute; inset: 22%; border-radius: 50%; border: 1px solid var(--line-control); background: var(--field); display: grid; place-items: center; text-align: center; font: 600 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dr-ring__table svg { width: 46%; height: 46%; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; }
.dr-st { display: inline-flex; align-items: center; gap: 4px; }
.dr-st::before { content: ""; width: 7px; height: 7px; box-sizing: border-box; flex: none; }
.dr-st--picking::before { border-radius: 50%; background: var(--clock); }
.dr-st--waiting::before { border-radius: 50%; border: 1.5px solid var(--muted); }
.dr-st--done::before { content: "✓"; width: auto; height: auto; font-size: 10px; line-height: 1; color: var(--text); }
.dr-st--away::before { width: 8px; height: 2px; background: var(--muted); }
.dr-st--ready::before { content: "✓"; width: auto; height: auto; font-size: 10px; line-height: 1; color: var(--clock); }
.dr-st--ask::before { border-radius: 1px; border: 1.5px dashed var(--muted); }
.dr-secs { font-variant-numeric: tabular-nums; color: var(--clock); font-weight: 700; }
.dr-secs--low { color: #f0a0a0; }
.dr-picks { display: flex; flex-direction: column; gap: 8px; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px 12px; }
.dr-picks__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.dr-picks__title { margin: 0; font: 600 15px/20px var(--font-display); color: var(--strong); }
.dr-cols { display: flex; gap: 8px; min-height: 0; overflow-x: auto; }
.dr-col { flex: 0 0 calc(84px * var(--cs, 1)); display: flex; flex-direction: column; gap: 0; }
.dr-col__h { display: flex; justify-content: space-between; padding: 0 2px 4px; font: 600 11px/14px var(--font-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dr-col__h b { color: var(--text); font-variant-numeric: tabular-nums; }
/* Each card under the one above shows its name bar: the same in the picks' strip, the builder
   and its sideboard. */
.dr-col .rm-card { width: calc(84px * var(--cs, 1)); padding: 2px; margin-top: calc(-96px * var(--cs, 1)); }
.dr-col .rm-card:first-of-type { margin-top: 0; }
.dr-col .rm-card .rm-card__name { font-size: calc(8px * var(--cs, 1)); line-height: calc(11px * var(--cs, 1)); }
.dr-col .rm-card .rm-card__type { display: none; }
.dr-col--side { flex-basis: calc(84px * var(--cs, 1)); box-sizing: content-box; padding-left: 10px; border-left: 1px dashed var(--line-control); }
.dr-col--empty { min-height: 60px; border: 1px dashed var(--line); border-radius: var(--radius-md); }
/* A basic land's card in the Basics column, its count at the top right where the stack shows it. */
.dr-col .dr-basic .rm-card__count { top: 2px; right: 2px; bottom: auto; padding: 0 5px; font-size: calc(9px * var(--cs, 1)); line-height: calc(12px * var(--cs, 1)); }
.bd .dr-col .rm-card.dr-basic { cursor: default; }
/* The picks strip: the deck's rows, and Side in a column of its own at their right, wider than
   a card and as tall as the strip, so a drag lands in it anywhere in that column. */
.dr-strip { flex: 1 1 auto; display: flex; gap: 10px; align-items: stretch; min-width: 0; }
.dr-strip__deck { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dr-strip > .dr-col--side { flex: 0 0 max(calc(84px * var(--cs, 1)), 132px); padding: 0 16px; align-items: center; }
.dr-strip > .dr-col--side > .dr-col__h { align-self: stretch; }
.dr-strip > .dr-col--side > .dr-col--empty { align-self: stretch; }
.dr-glist__g { display: flex; flex-direction: column; gap: 2px; }
.dr-glist__h { display: flex; align-items: center; gap: 6px; font: 600 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dr-curve { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.dr-curve__b { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; width: 18px; height: 100%; font: 600 10px/12px var(--font-ui); color: var(--muted); font-variant-numeric: tabular-nums; }
.dr-curve__b i { display: block; width: 100%; border-radius: 2px 2px 0 0; background: var(--line-control); }
.dr-curve__b b { color: var(--text); font-weight: 700; }
.dr-count { display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--muted); }
.dr-count b { font: 700 20px/24px var(--font-display); color: var(--strong); font-variant-numeric: tabular-nums; }
.dr-count--ok b::after { content: " ✓"; color: var(--clock); font-size: 14px; }
.dr-log { display: flex; flex-direction: column; min-height: 0; width: 320px; flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.dr-log__head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.dr-log__title { margin: 0; flex: 1; font: 600 15px/20px var(--font-display); color: var(--strong); }
.dr-log__body { flex: 1; min-height: 0; overflow: auto; padding: 6px 0; }
.dr-log__pack { padding: 8px 12px 4px; font: 600 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dr-ll { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 12px; border: 0; background: transparent; color: var(--text); font: 400 13px/18px var(--font-ui); text-align: left; cursor: pointer; }
.dr-ll:hover { background: var(--panel-float); }
.dr-ll__n { flex: none; width: 54px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dr-ll[aria-current="true"] { background: var(--select-soft); box-shadow: inset 3px 0 0 var(--select); }
.dr-ll__auto { margin-left: auto; font: 600 10px/14px var(--font-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.dr-ll__now { margin-left: auto; font: 600 10px/14px var(--font-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dr-logtab { flex: none; writing-mode: vertical-rl; display: flex; align-items: center; gap: 8px; padding: 12px 6px; border: 1px solid var(--line-control); border-radius: var(--radius-lg); background: var(--panel); color: var(--text); font: 600 13px/16px var(--font-ui); cursor: pointer; }
/* The key reads upright under the turned words. */
.dr-logtab .rm-kbd { writing-mode: horizontal-tb; }
/* A card chip, the top of its frame: one width so lists line up, the name cut short, the cost
   on the right; a tint of the frame's colour (--edge, and --edge2 for a hybrid's second) with
   that colour as its border. Black's tint is near-black, so it parts from colourless silver. */
.dr-chip { --edge: #a9b2bc; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; flex: none; width: 200px; max-width: 100%; height: 22px; padding: 0 4px 0 7px; border: 1.5px solid transparent; border-radius: var(--radius-sm);
  --tint: color-mix(in srgb, var(--edge) 30%, var(--chip-bg));
  background: linear-gradient(90deg, var(--tint), var(--tint2, var(--tint))) padding-box, linear-gradient(90deg, var(--edge), var(--edge2, var(--edge))) border-box;
  color: var(--strong); font: 600 12px/16px var(--font-ui); white-space: nowrap; }
.dr-chip__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dr-chip__cost { display: inline-flex; gap: 1px; flex: none; }
.dr-chip .sym { width: 14px; height: 14px; font-size: 9px; box-shadow: 0 0 0 1px rgb(0 0 0 / .35); }
.dr-chip.W { --edge: #c8b78a; } .dr-chip.U { --edge: #4f8fc9; } .dr-chip.B { --edge: #6f6460; --tint: #121014; } .dr-chip.R { --edge: #c95a3c; } .dr-chip.G { --edge: #4f9a66; }
.dr-chip.M { --edge: #c29a34; } .dr-chip.L { --edge: #98805d; }
.dr-chip[class*="and-"] { --tint2: color-mix(in srgb, var(--edge2) 30%, var(--chip-bg)); }
.dr-chip.and-W { --edge2: #c8b78a; } .dr-chip.and-U { --edge2: #4f8fc9; } .dr-chip.and-B { --edge2: #6f6460; --tint2: #121014; } .dr-chip.and-R { --edge2: #c95a3c; } .dr-chip.and-G { --edge2: #4f9a66; }
.dr-round__h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dr-round__h h3 { margin: 0; flex: 1; font: 600 15px/20px var(--font-display); color: var(--strong); }
.dr-pair__p { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; color: var(--strong); }
.dr-pair__p:last-of-type { justify-content: flex-end; }
.dr-pair__p--won::after { content: "Won"; margin-left: 4px; height: 18px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--clock); color: var(--on-clock); font: 700 10px/18px var(--font-ui); text-transform: uppercase; letter-spacing: .04em; }
.dr-pair__s { text-align: center; font: 700 18px/22px var(--font-display); color: var(--strong); font-variant-numeric: tabular-nums; }
.dr-pair__a { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.dr-ready { display: flex; flex-direction: column; }
.dr-ready__r { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.dr-ready__r:first-child { border-top: 0; }
.dr-ready__r b { flex: 1; color: var(--strong); }
.dr-grid__h { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-weight: 600; color: var(--strong); }
.dr-grid__c { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; min-height: 64px; box-sizing: border-box; border-radius: var(--radius-md); background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.dr-grid__c b { font: 700 16px/20px var(--font-display); color: var(--strong); font-variant-numeric: tabular-nums; }
.dr-grid__c--a { border-color: #6fa8dc; }
.dr-grid__c--b { border-color: #e0a3b8; border-style: dashed; }
.dr-grid__c--next { border-style: dotted; color: var(--muted); }
.dr-grid__c--off { background: transparent; color: var(--muted); border-style: dashed; }
.dr-opts { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 20px; }
.dr-opt__h { display: flex; align-items: center; gap: 8px; }
.dr-opt__h h3 { margin: 0; flex: 1; font: 600 17px/22px var(--font-display); color: var(--strong); }
.dr-opt__k { font: 700 12px/16px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dr-note { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-lg); border: 1px solid var(--line-control); background: var(--panel-float); font-size: 13px; line-height: 18px; }
.dr-note b { color: var(--strong); }
.dr-note--gold { border-color: var(--accent); background: var(--accent-soft); }
.dr-step__n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--panel-float); border: 1px solid var(--line-control); font: 700 13px/1 var(--font-ui); color: var(--strong); }
.rv-bar{flex:none;display:flex;align-items:center;gap:14px;height:46px;padding:0 20px;border-bottom:1px solid var(--line);box-sizing:border-box;position:relative;z-index:3}
.rv-where{font:600 12px/1 var(--font-ui);color:var(--muted);white-space:nowrap}
.rv-where b{font:700 17px/1 var(--font-display);color:var(--strong);font-variant-numeric:tabular-nums}
.rv-dir{display:inline-flex;align-items:center;gap:4px;font:600 12px/1 var(--font-ui);color:var(--muted);white-space:nowrap}
.rv-seats{display:flex;align-items:center;gap:1px;margin:0;padding:0;list-style:none}
.rv-seat{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 6px 0 3px;border-radius:999px;box-sizing:border-box;white-space:nowrap}
.rv-seat .rm-avatar{--size:22px;font-size:9px}
.rv-seat--you{background:var(--panel-you);box-shadow:inset 0 0 0 1px var(--line-you)}
.rv-seat--most{box-shadow:inset 0 0 0 2px var(--strong)}
/* A team pod's side under each chip (team draft Task 6 note 04): Team A solid, Team B dashed, so
   the sides read without colour; by ::after, leaving the chip's own shadows alone. */
.rv-seat--a,.rv-seat--b{position:relative}
.rv-seat--a::after,.rv-seat--b::after{content:"";position:absolute;left:8px;right:8px;bottom:0;border-bottom:3px solid var(--team-a)}
.rv-seat--b::after{border-bottom:3px dashed var(--team-b)}
.rv-seat .dr-q{height:16px;padding:0 5px 0 4px;font-size:10px}
.rv-sep{display:inline-flex;color:var(--faint)}
.rv-wrapto{display:inline-flex;align-items:center;gap:3px;margin-left:4px;font:500 11px/1 var(--font-ui);color:var(--muted)}
.rv-next{font-size:13px;line-height:18px;color:var(--text);white-space:nowrap;display:inline-flex;align-items:center;gap:6px}
.rv-next b{color:var(--strong)}
.rv-next .dr-q{height:16px;padding:0 5px 0 4px;font-size:10px}
.rv-clock{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 10px;border:1px solid var(--line-control);border-radius:var(--radius-lg);background:var(--panel);box-sizing:border-box}
.rv-clock b{font:700 18px/1 var(--font-display);color:var(--strong);font-variant-numeric:tabular-nums}
.rv-clock__m{display:flex;flex-direction:column;gap:3px;font:600 10px/1 var(--font-ui);letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.rv-clock .dr-clock__bar{width:56px;height:4px}
.rv-pickrow{display:flex;align-items:center;gap:12px;height:44px;flex:none}
.rv-keyswrap{position:relative;display:inline-flex}
.rv-keys{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border-radius:999px;border:1px solid var(--line-control);background:var(--chip-bg);color:var(--muted);font:600 12px/1 var(--font-mono);cursor:pointer}
.rv-keys span{font-family:var(--font-ui);font-weight:600}
/* The keyboard shortcuts sheet (`keys`): `?` on any screen. */
.keys-sheet { max-width: 560px; max-height: calc(100vh - 48px); }
.keys-sheet .rm-sheet__body { overflow-y: auto; }
.keys-grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; align-items: center; }
.keys-grid .rm-kbd { justify-self: start; }
.keys-h { margin: var(--space-4) 0 var(--space-2); font: 600 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rv-seat__n{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;font:600 12px/1 var(--font-ui);color:var(--strong)}
.rv-secs{font:700 11px/1 var(--font-ui);color:var(--clock);font-variant-numeric:tabular-nums}
.rv-tabs{display:flex;gap:4px;padding:8px 10px 0;border-bottom:1px solid var(--line)}
.rv-tab{position:relative;display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:0;background:transparent;color:var(--muted);font:600 13px/1 var(--font-ui);cursor:pointer}
.rv-tab[aria-selected="true"]{color:var(--strong);box-shadow:inset 0 -2px 0 var(--strong)}
.rv-tabn{font:600 11px/1 var(--font-ui);color:var(--muted);padding:2px 6px;border-radius:999px;background:var(--chip-bg)}
.rv-passed{display:flex;align-items:center;gap:6px;padding:0 12px 4px 74px;min-width:0}
.rv-passed--open{flex-direction:column;align-items:flex-start;gap:6px;padding-bottom:8px}
.rv-fold{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 6px 0 2px;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--muted);font:600 11px/1 var(--font-ui);letter-spacing:.04em;text-transform:uppercase;cursor:pointer;flex:none;white-space:nowrap}
.rv-fold:hover{background:var(--panel-float);color:var(--text)}
.rv-fold svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.rv-fold[aria-expanded="true"] svg{transform:rotate(90deg)}
.rv-names{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:16px;color:var(--muted)}
.rv-names b{color:var(--text);font-weight:600}
.rv-chips{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.rv-more{height:20px;padding:0 8px;border-radius:var(--radius-sm);border:1px dashed var(--line-control);background:transparent;color:var(--muted);font:600 11px/1 var(--font-ui);cursor:pointer}
.rv-cb-lead,.rv-cb-foot{margin:6px 12px 10px;font-size:12px;line-height:17px;color:var(--muted)}
.rv-cb-foot{margin-top:4px}
.rv-cb{display:flex;flex-direction:column;gap:5px;padding:8px 12px 10px;border-top:1px solid var(--line)}
.rv-cb__h{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font:600 13px/18px var(--font-ui);color:var(--strong)}
.rv-cb__back{font:600 11px/14px var(--font-ui);letter-spacing:.04em;text-transform:uppercase;color:var(--select)}
.rv-cb__sub{font-size:12px;line-height:16px;color:var(--muted)}
.rv-pasttint{opacity:.92;filter:saturate(.75)}
.rm-card.rv-here{box-shadow:0 0 0 2px var(--select),0 0 12px var(--select-glow)}
/* The draft pages' own layout. */
.rm-tab[aria-checked="true"] { background: var(--select-soft); color: var(--strong); box-shadow: inset 0 -2px 0 var(--select); }
.dr-page { padding: var(--space-5); }
.dr-lobby { align-items: flex-start; }
.dr-lobby__main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.dr-lobby__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.dr-lobby .rm-panel { display: flex; flex-direction: column; gap: 8px; }
.dr-lobby .ax-facts { padding: 8px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.dr-lobby .ax-facts dd { margin: 0; }
.dr-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* A team draft's sides: a square for Team A and a diamond for Team B, each in its colour with its
   letter, so the sides read without colour (TeamForm); the lobby's two columns. */
.dr-team { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; vertical-align: middle; font: 700 9px/1 var(--font-ui); color: var(--on-mark); }
.dr-team--a { background: var(--team-a); border-radius: 3px; }
.dr-team--b { width: 14px; height: 14px; margin: 2px; background: var(--team-b); border-radius: 2px; transform: rotate(45deg); }
.dr-team--b > span { transform: rotate(-45deg); }
.dr-teams { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.dr-team-col { flex: 1 1 260px; min-width: 0; margin: 0; padding: 0; border-top-width: 3px; }
.dr-team-col--a { border-top-color: var(--team-a); }
.dr-team-col--b { border-top-color: var(--team-b); }
/* The team score over a pod's rounds (team draft Task 6 note 06): the winner's colour along the
   top once decided, as the lobby's columns; the words stay --strong for contrast. */
.team-score { display: flex; align-items: center; gap: 8px; }
.team-score b { color: var(--strong); font-variant-numeric: tabular-nums; }
.team-score--a, .team-score--b { border-top-width: 3px; }
.team-score--a { border-top-color: var(--team-a); }
.team-score--b { border-top-color: var(--team-b); }
.dr-dialog { max-width: 440px; }
.dr-edit { display: flex; flex-direction: column; gap: 10px; }
/* Teammates can coach (coaching plan Task 5): the switch, then its name over its line. */
.dr-coach > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.dr-coach b { color: var(--strong); font-weight: 600; }
.m3-step > .dr-coach { align-self: flex-start; }
/* A coach's panel (coaching plan Task 6, the TeamCoach board): the seat's answers, read only. */
.tc-ro .rm-btn:disabled { opacity: .55; cursor: default; }
.tc-ro .rm-btn--primary:disabled { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
/* Marks in the game (coaching plan Task 7, the TeamCoach board): the coach's line on marking,
   the room's badges under a card's name bar, clickable on the seat's board only, and the seat's
   chip in its game bar. */
.tc-how { margin: 0; font-size: 12px; line-height: 17px; }
.tc-how .rm-kbd { height: 16px; min-width: 16px; padding: 0 4px; font-size: 11px; }
.rm-board .rm-card .tr-badges { top: 17px; left: 3px; }
.rm-board .rm-hand .rm-card .tr-badges { top: 29px; left: 5px; }
.rm-board .tr-badge { cursor: default; }
.rm-board .tr-badge.is-dismissable { cursor: pointer; }
.tc-coached { display: flex; align-items: center; gap: 8px; margin-left: 20px; padding: 2px 2px 2px 4px; border: 1px solid var(--line-control); border-radius: var(--radius-pill); background: var(--raised); }
.tc-coached .rm-avatar { --size: 24px; font-size: 10px; }
.tc-coached__n { font-size: 13px; line-height: 17px; color: var(--text); white-space: nowrap; }
.tc-coached__n b { color: var(--strong); }
.dr-seats-input { width: 80px; }
/* The draft setup (booster draft plan Task 6, spec E and F): the pack count, a tile per pack with its list's
   stripe, the picker under the row, Advanced and the sample pack, beside the sheet from 1000px. */
.su-count { display: flex; align-items: center; gap: var(--space-2); }
.su-count .rm-label { margin-right: auto; }
.su-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: var(--space-2); }
.su-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 12px 12px 10px; overflow: hidden;
  border: 1px solid var(--line-control); border-radius: var(--radius-md); background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.su-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--su-stripe, var(--ph-1)); }
.su-tile:hover { border-color: var(--text); }
.su-tile[aria-pressed="true"] { background: var(--select-soft); border-color: var(--select); box-shadow: 0 0 0 2px var(--select); }
.su-tile__n { font: 600 11px/16px var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.su-tile__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--strong); }
.su-tile__word { font-size: 13px; line-height: 18px; color: var(--muted); }
.su-under { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
/* The picker floats under the pack row rather than pushing the form down (owner notes). */
.su-tiles-at { position: relative; }
.su-pick { position: absolute; top: calc(100% + var(--space-2)); left: 0; right: 0; z-index: var(--z-float);
  display: flex; flex-direction: column; gap: var(--space-2); box-shadow: var(--shadow-float); }
.su-pick .rm-search { max-width: none; }
.su-pick__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.su-pick__list { max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: var(--space-3); }
.su-sec { display: flex; flex-direction: column; gap: 2px; }
.su-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: 6px 8px;
  border: 0; border-radius: var(--radius-md); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.su-row:hover:not(:disabled) { background: var(--select-soft); }
.su-row:disabled { opacity: 0.45; cursor: default; }
.su-row__main { display: flex; flex-direction: column; min-width: 0; }
.su-row__main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--strong); }
.su-row__state { font-size: 12px; color: var(--muted); }
/* A picker that ticks rows (owner list #10): a format's sets, the card search's set. */
.su-row[aria-pressed="true"] { background: var(--select-soft); }
.su-row__tick { font-weight: 700; color: var(--select); }
.su-opener { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; cursor: pointer; }
.su-line { display: flex; align-items: center; gap: 2px; }
.su-line .su-row { flex: 1; min-width: 0; }
.su-star { flex: none; align-self: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--radius-md); background: none; color: var(--muted); font-size: 16px; line-height: 28px; cursor: pointer; }
.su-star:hover { background: var(--select-soft); color: var(--strong); }
.su-star[aria-pressed="true"] { color: var(--accent); }
.su-badge { display: grid; place-items: center; height: 24px; border-radius: var(--radius-sm); background: var(--su-stripe, var(--ph-1)); color: var(--strong); font: 700 11px/1 var(--font-mono); letter-spacing: 0.04em; }
.su-slots { display: flex; flex-direction: column; gap: 6px; }
.su-slot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.su-slot .rm-input { width: auto; }
.su-slot .su-slot__count { width: 64px; }
.su-slot__mythic { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.su-slot__mythic .rm-input { width: 64px; }
.su-sample { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); --cs: 1; }
.su-sample__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.su-sample__cards { display: flex; flex-wrap: wrap; gap: 10px 8px; }
.su-card { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.su-card__slot { max-width: calc(112px * var(--cs)); font-size: 11px; line-height: 14px; color: var(--muted); text-align: center; }
/* On the Play sheet, beside it from 1000px, at least as tall as the sheet and growing with its
   cards, so the scrim's one scroll carries both (owner list: no second scroll bar); three across filling
   its width; wider with larger cards from 1480px (owner notes: bigger cards). Elsewhere (admin
   Boosters and Formats) it stays in the page's flow as a wrapping row of small cards. */
@media (min-width: 1000px) {
  .ps-scrim .rm-sheet:has(.su-sample) { --su-side: 400px; position: relative; width: calc(100% - var(--su-side) - 16px); margin-right: calc(var(--su-side) + 16px); }
  .ps-scrim .su-sample { position: absolute; top: 0; min-height: 100%; left: calc(100% + 16px); width: var(--su-side); box-sizing: border-box; background: var(--panel-float); box-shadow: var(--shadow-float); }
  .ps-scrim .su-sample__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ps-scrim .su-sample .dr-card--sm { width: 100%; box-sizing: border-box; }
  .ps-scrim .su-sample .su-card__slot { max-width: none; }
}
@media (min-width: 1480px) {
  .ps-scrim .rm-sheet:has(.su-sample) { --su-side: 480px; }
  .ps-scrim .su-sample { --cs: 1.3; }
}
/* A cube draft on the rail and Home: the draft square, the peek's small table bar. */
.rm-rail__face--draft { border-radius: 8px; background: var(--ph-3); color: var(--strong); font: 700 13px/1 var(--font-ui); display: grid; place-items: center; }
.rv-bar--sm { height: auto; padding: 4px 0; gap: 8px; border-bottom: 0; flex-wrap: wrap; }
.rv-bar--sm .rv-seat { height: 24px; padding: 0 4px 0 2px; gap: 3px; }
.rv-bar--sm .rv-seat .rm-avatar { --size: 18px; font-size: 8px; }
/* The pick screen: the table bar, then the pack, the Pick row and the picks. */
.dr-screen { display: flex; flex-direction: column; min-height: calc(100vh - 56px); }
.dr-screen__body { flex: 1 1 auto; display: flex; gap: var(--space-4); padding: var(--space-3) var(--space-5) var(--space-4); min-height: 0; }
.dr-screen__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dr-meta { display: inline-flex; gap: 2px; align-items: center; }
.dr-card { position: relative; }
.dr-card.is-focus:not(.is-selected) { outline: 2px dashed var(--select); outline-offset: 2px; }
.dr-wait { display: flex; flex-direction: column; gap: 4px; padding: 24px; margin-top: 12px; border: 1px dashed var(--line-control); border-radius: var(--radius-lg); }
.dr-everyone { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-top: 12px; }
.dr-colour { gap: 4px; }
.dr-colours { gap: 8px; }
.dr-lands { font: 400 12px/16px var(--font-ui); color: var(--muted); white-space: nowrap; }
.dr-lands b { font-weight: 600; color: var(--strong); font-variant-numeric: tabular-nums; }
/* The draft log beside the pack, and its chips. */
.dr-screen__body > .dr-log { align-self: stretch; max-height: calc(100vh - 140px); }
.dr-screen__body > .dr-logtab { align-self: flex-start; }
.dr-ll--now { cursor: default; }
.rv-cbchip.is-gone .dr-chip { opacity: .45; text-decoration: line-through; }
.dr-screen .rm-pastbar { margin-bottom: 8px; }
/* Winston (Winston plan, Task 5): the stack and three piles as a row of small tiles, a card
   back (a gap once empty) beside its count, the pile looked at outlined and tinted; the pile's
   cards below take the room. The log's lines with their chips. */
.wn-piles { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.wn-pile { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); }
.wn-pile.is-looking { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.wn-pile .rm-card.is-back, .wn-gap { box-sizing: border-box; width: 32px; padding: 0; flex: none; aspect-ratio: var(--card-ratio); border-radius: var(--card-corner); }
.wn-pile__n { font: 500 13px/18px var(--font-ui); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wn-pile__n b { font: 700 18px/22px var(--font-display); color: var(--strong); }
.wn-gap { border: 1px dashed var(--line-control); }
.wn-ll { display: flex; flex-direction: column; gap: 4px; padding: 4px 12px; font: 400 13px/18px var(--font-ui); color: var(--text); }
.wn-hist { display: flex; flex-direction: column; gap: 2px; max-width: 760px; }
/* Drag to pick (the review's note 4): the picks glow and the landing column parts, the new pick
   settles in, the count bumps. Reduced motion makes it instant. */
.dr-screen { --dr-part: 28px; --dr-glow: 60%; --dr-cols-ms: 180ms; --dr-settle-ms: 220ms; --dr-settle: cubic-bezier(.25, 1.42, .4, 1); --dr-count-ms: 400ms; }
.dr-pack { user-select: none; touch-action: none; }
.dr-card.is-lifted { opacity: .35; }
.dr-picks { transition: box-shadow var(--dr-cols-ms) ease; }
.dr-picks.is-over { box-shadow: 0 0 0 2px var(--select), 0 0 24px color-mix(in srgb, var(--select-glow) var(--dr-glow), transparent); }
.dr-col { transition: padding-top var(--dr-cols-ms) ease, background var(--dr-cols-ms) ease; }
.dr-col.is-target { padding-top: var(--dr-part); }
.dr-col--side.is-target { background: color-mix(in srgb, var(--select) 10%, transparent); border-radius: var(--radius-md); }
.dr-col .rm-card.is-new { animation: dr-settle var(--dr-settle-ms) var(--dr-settle); }
@keyframes dr-settle { from { transform: translateY(calc(var(--dr-part) * -1)) scale(1.06); } to { transform: none; } }
.dr-picks .dr-count b { display: inline-block; animation: dr-bump var(--dr-count-ms) ease-out; }
@keyframes dr-bump { from { transform: scale(1.25); color: var(--select); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .dr-screen { --dr-cols-ms: 0ms; --dr-settle-ms: 0ms; --dr-count-ms: 0ms; }
  .dr-col .rm-card.is-new, .dr-picks .dr-count b { animation: none; }
}
/* The deck builder (M3c Task 10; the boards DeckBuilder, DeckBuilderSort, DraftBuildWhile and
   QBuildTimeout). It takes the pick area's place under the table bar; the deck sits in columns
   above the sideboard, with the basics and the deck's make-up in an aside. */
.bd { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px;
  --dr-part: 28px; --dr-glow: 60%; --dr-cols-ms: 180ms; --dr-settle-ms: 220ms; --dr-settle: cubic-bezier(.25, 1.42, .4, 1); --dr-count-ms: 400ms; }
.bd-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-height: 44px; }
.bd-body { display: flex; gap: var(--space-4); min-height: 0; align-items: flex-start; }
.bd-body.is-locked .dr-picks { opacity: .8; }
.bd-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
/* The limited builder's sideboard: a column of piled cards between the deck and the side panel,
   kept in view while the deck scrolls; its own cards scroll when they outgrow the window. */
/* It runs the body's full height, a window's at most, and the whole of it takes a drop; empty,
   its cards' space is a dashed well to drop on. */
.bd-side { flex: 0 0 auto; box-sizing: border-box; width: max(176px, calc(84px * var(--cs, 1) + 26px)); position: sticky; top: 12px; align-self: stretch; min-height: min(420px, calc(100vh - 24px)); max-height: calc(100vh - 24px); }
.bd-side .rm-search { width: 100%; }
.bd-side__filters { flex-wrap: nowrap; gap: 4px; }
.bd-side__cards { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; min-height: 120px; overflow-y: auto; padding: 8px 0 4px; }
.bd-side__cards:has(> .ax-muted) { justify-content: center; text-align: center; padding: 12px; border: 2px dashed var(--line); border-radius: var(--radius-md); }
.bd-side.is-over .bd-side__cards:has(> .ax-muted) { border-color: var(--select); }
/* The sideboard's cards are the deck columns' size (review item 22). */
.bd-side__cards .rm-card { width: calc(84px * var(--cs, 1)); padding: 2px; flex: none; margin-top: calc(-96px * var(--cs, 1)); }
.bd-side__cards .rm-card .rm-card__name { font-size: calc(8px * var(--cs, 1)); line-height: calc(11px * var(--cs, 1)); }
/* Of type, as the columns' rule: Chromium can leave a keyed pile's new first card styled as
   :first-child didn't match once the cards above it are removed. */
.bd-side__cards .rm-card:first-of-type { margin-top: 0; }
.bd-side__cards .rm-card .rm-card__type { display: none; }
.bd-size { font-weight: 500; }
.bd-size input { width: 96px; accent-color: var(--accent); }
.bd-size output { min-width: 3.2em; font-variant-numeric: tabular-nums; color: var(--muted); }
.bd-aside { flex: 0 0 280px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 12px; }
.bd-basic { display: flex; align-items: center; gap: 8px; height: 30px; }
.bd-basic__n { flex: 1; font-size: 13px; color: var(--text); }
.bd-basic b { min-width: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.bd-suggest { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.bd-makeup { display: flex; flex-direction: column; gap: 10px; }
/* This deck: lands, spells and the average mana value as three figures, then a bar per card
   type, its length its share against the most common type. */
.bd-makeup__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bd-makeup__stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: var(--radius-md); background: var(--chip-bg); }
.bd-makeup__stat b { font: 700 18px/22px var(--font-display); color: var(--strong); font-variant-numeric: tabular-nums; }
.bd-makeup__stat span { font-size: 11px; color: var(--muted); text-align: center; }
.bd-makeup__kinds { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.bd-makeup__kinds li { display: grid; grid-template-columns: 92px 1fr 24px; align-items: center; gap: 8px; }
.bd-makeup__kinds i { height: 6px; width: var(--w); min-width: 2px; border-radius: var(--radius-pill); background: var(--select); }
.bd-makeup__kinds b { text-align: right; font-variant-numeric: tabular-nums; color: var(--strong); }
.bd-pop { position: relative; display: inline-flex; }
.bd-pop > [data-testid="basics-panel"] { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 300px; box-shadow: 0 12px 32px rgba(0, 0, 0, .45); }
.bd-strip-tools { flex-wrap: wrap; gap: 8px 12px; }
.bd-last { display: flex; flex-direction: column; gap: 8px; max-width: 560px; padding: 20px 24px; margin-top: 12px; }
.bd-last__h { margin: 0; font: 600 22px/28px var(--font-display); color: var(--strong); }
/* Columns by, Creatures apart, and the rows' heads. */
.rv-tools { display: inline-flex; align-items: center; gap: 10px; font: 600 12px/1 var(--font-ui); color: var(--muted); }
.rv-tools__l { letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
.rv-seg { display: inline-flex; border: 1px solid var(--line-control); border-radius: var(--radius-pill); overflow: hidden; }
.rv-seg button { height: 26px; padding: 0 10px; border: 0; background: transparent; color: var(--text); font: 600 12px/1 var(--font-ui); cursor: pointer; }
.rv-seg button[aria-pressed="true"] { background: var(--strong); color: var(--bg); }
/* The deck as a decklist (pool reveal plan, decision 9): two columns over 720px, one below. */
.dl { column-count: 1; column-gap: 28px; margin-top: 8px; }
@media (min-width: 720px) { .dl { column-count: 2; } }
.dl-group { break-inside: avoid; margin-bottom: 14px; }
.dl-h { margin: 0 0 4px; padding-bottom: 3px; border-bottom: 1px solid var(--line-control); font: 700 12px/1.4 var(--font-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dl-list { list-style: none; margin: 0; padding: 0; }
.dl-line { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; min-height: 26px; padding: 2px 6px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: 500 14px/1.3 var(--font-ui); text-align: left; }
button.dl-line { cursor: pointer; }
.dl-line:hover, .dl-line:focus-visible { background: color-mix(in srgb, var(--text) 8%, transparent); }
/* A ranked sideboard (pool reveal plan, decision 5): a rank, the card, Move up and down. */
.dr-rank { display: flex; align-items: center; gap: 6px; width: 100%; box-sizing: border-box; padding: 2px 0; }
.dr-rank__n { flex: none; min-width: 2.2em; font: 700 12px/1 var(--font-ui); font-variant-numeric: tabular-nums; color: var(--muted); }
.dr-rank > .dl-line { flex: 1; min-width: 0; width: auto; }
.bd-side__cards .dr-rank .rm-card { margin-top: 0; }
.dr-rank__btns { flex: none; display: inline-flex; flex-direction: column; gap: 2px; margin-left: auto; }
.dr-rank--basic { opacity: .7; }
.dr-rank__cut { width: 100%; box-sizing: border-box; margin: 4px 0; padding-top: 2px; border-top: 2px dashed var(--line-control); font: 600 11px/1.4 var(--font-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: center; }
.dr-rank__panel { display: flex; flex-direction: column; gap: 8px; }
.dr-rank__in { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dr-rank__in li { display: flex; flex-direction: column; }
.dr-rank__in b { color: var(--strong); font-weight: 600; }
.dr-rank__warn { margin: 0; }
/* Ranked, the sideboard is a strip under the deck (board DeckBuilder): its head and explanation,
   its filters and search on one line, then the order. */
.bd-sb { display: flex; flex-flow: row wrap; align-items: center; gap: 10px 12px; }
.bd-sb > .dr-picks__head, .bd-sb > .bd-side__cards, .bd-sb > .ax-small { flex: 1 0 100%; }
.bd-sb .rm-search { width: 240px; }
.bd-side__why { flex: 1 1 320px; }
.dr-ranks { display: flex; flex-flow: row wrap; align-items: flex-start; gap: 16px 12px; padding: 4px 0; }
.dr-ranks .dr-rank { position: relative; width: calc(84px * var(--cs, 1)); flex-direction: column; gap: 6px; padding: 0; }
.dr-ranks .dr-rank .rm-card { width: 100%; margin: 0; }
.dr-ranks .dr-rank__n { position: absolute; z-index: 2; left: 8%; top: calc(84px * var(--cs, 1) * .3); min-width: 22px; height: 22px; padding: 0 4px; box-sizing: border-box; border-radius: var(--radius-sm); background: var(--strong); color: var(--bg); font: 700 14px/22px var(--font-display); text-align: center; }
.dr-ranks .dr-rank__note { font-weight: 600; }
.dr-ranks .dr-rank__btns { flex-direction: row; gap: 4px; margin: 0; }
.dr-ranks .dr-rank__cut { flex: 1 0 100%; }
.dr-ranks--list { flex-flow: column nowrap; gap: 0; }
.dr-ranks--list .dr-rank { width: 100%; flex-direction: row; gap: 8px; padding: 2px 0; border-top: 1px solid var(--line); }
.dr-ranks--list .dr-rank:first-child { border-top: 0; }
.dr-ranks--list .dr-rank__n { position: static; width: 24px; min-width: 0; height: auto; padding: 0; background: none; color: var(--muted); font: 700 16px/20px var(--font-display); text-align: right; }
.dr-ranks--list .dr-rank__btns { flex-direction: row; margin-left: 0; }
.dr-ranks--list .dr-rank__note { flex: none; }
.dl-n { flex: none; min-width: 1.6em; font-variant-numeric: tabular-nums; color: var(--muted); }
.dl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-cost { flex: none; display: inline-flex; gap: 2px; }
.dl-cost .sym { width: 14px; height: 14px; font-size: 9px; }
.rv-tog { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text); }
.rv-rowh { font: 600 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
/* A basic land's line in Lands: one line with its count, never a stack of copies. */
.dr-line { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 6px; border-radius: var(--radius-sm); font-size: 12px; color: var(--text); }
.dr-line:hover { background: var(--panel-float); }
/* The constructed editor drags a line between the main deck and the sideboard. */
.bd-aside .dr-line { touch-action: none; user-select: none; }
.bd-aside .rm-panel.is-over { box-shadow: 0 0 0 2px var(--select); }
.dr-line.is-lifted { opacity: .4; }
.rm-drag.bd-line-drag { width: 220px; }
.bd-line-drag .dr-line { background: var(--panel-float); border: 1px solid var(--line-control); box-shadow: 0 8px 20px rgba(0, 0, 0, .45); }
.dr-line span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd .dr-col .rm-card { cursor: grab; transition: transform var(--dr-cols-ms) ease, box-shadow var(--dr-cols-ms) ease; }
.bd .dr-col .rm-card.is-selected { transform: translateY(-4px); }
.bd .dr-pack { touch-action: none; user-select: none; }
.bd .dr-col, .bd .dr-picks { touch-action: none; user-select: none; }
/* What a drag carries: a fanned stack with its count, and the line naming where it lands. */
/* Block, so it takes the drag's width: a card with a paper face has no width of its own. */
.bd-stack { position: relative; display: block; }
.bd-stack .rm-card:nth-child(2) { position: absolute; inset: 0; transform: rotate(-4deg) translate(-6px, 2px); z-index: -1; }
.bd-stack .rm-card:nth-child(3) { position: absolute; inset: 0; transform: rotate(-8deg) translate(-12px, 4px); z-index: -2; }
.bd-stack__n { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box; display: grid; place-items: center; border-radius: var(--radius-pill); background: var(--select); color: var(--on-select); font: 700 12px/1 var(--font-ui); }
.bd-say { display: block; margin-top: 8px; padding: 4px 8px; border-radius: var(--radius-sm); background: var(--panel-float); box-shadow: 0 4px 12px rgba(0, 0, 0, .35); font: 600 12px/16px var(--font-ui); color: var(--strong); white-space: nowrap; }
/* The building room (team draft spec D; the TeamRoom board): a tab per teammate between your
   top row and the builder, each with its avatar on the seat's place colour and a Ready dot, and
   between the tabs and Follow, one line saying whose pool it is or whom you follow. */
.tr-tabrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tr-say { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-size: 13px; line-height: 18px; }
.tr-tab { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px 0 5px; }
.tr-dot { width: 8px; height: 8px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid var(--muted); flex: none; }
.tr-dot--ready { background: var(--clock); border-color: var(--clock); }
.tr-hint { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; line-height: 18px; color: var(--muted); }
/* A mark's badge: its icon and the marker's avatar on their place colour, under the card's name
   bar so a piled card shows it, several side by side; on your own cards a click dismisses it. */
.tr-badges { position: absolute; z-index: 3; left: 3px; top: calc(4px + 11px * var(--cs, 1)); display: flex; gap: 2px; }
.bd-side__cards .tr-badges { top: calc(6px + 11px * var(--cs, 1)); }
/* A piled card shows only its top strip, so its marks sit in that strip's corner, where the
   next card doesn't cover them. */
.dr-col .rm-card .tr-badges, .bd-side__cards .rm-card .tr-badges { top: 3px; left: auto; right: 3px; }
.tr-badge { display: inline-flex; align-items: center; gap: 2px; height: 16px; padding: 0 1px 0 4px; box-sizing: border-box; border-radius: var(--radius-pill); background: var(--rail); box-shadow: 0 0 0 1px var(--line-control), 0 1px 3px rgba(0, 0, 0, .5); color: var(--strong); font: 700 11px/1 var(--font-ui); }
.tr-badge.is-dismissable { cursor: pointer; }
.tr-badge .rm-avatar { --size: 13px; font: 700 7.5px/1 var(--font-ui); border-radius: 3px; }
[data-markable] { -webkit-touch-callout: none; }
/* The card popover's row of marks, first under its head, each with its key; your own pressed. */
.popover .tr-marks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }
.tr-mark { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px 8px; border: 1px solid var(--line-control); border-radius: var(--radius-md); background: var(--raised); color: var(--strong); font: 600 12.5px/16px var(--font-ui); cursor: pointer; }
.tr-mark:is(:hover, :focus-visible) { border-color: var(--accent); background: var(--accent-soft); }
.tr-mark[aria-pressed="true"] { border-color: var(--select); background: var(--select-soft); box-shadow: 0 0 0 1px var(--select); }
.tr-mark .rm-kbd { position: absolute; left: 4px; top: 4px; height: 16px; }
.tr-ic { flex: none; width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tr-mark .tr-ic { width: 20px; height: 20px; stroke-width: 1.3; }
/* Follow, at the tab row's end: each teammate's avatar, pressed while you follow them; the
   row's line then says whom and how to stop. */
.tr-follow { display: inline-flex; align-items: center; gap: 8px; }
.tr-fol { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 4px; border: 1px solid var(--line-control); border-radius: var(--radius-pill); background: transparent; color: var(--text); font: 600 13px/1 var(--font-ui); cursor: pointer; }
.tr-fol .rm-avatar { border-radius: 999px; }
.tr-fol:hover:not(:disabled) { background: var(--panel-float); }
.tr-fol[aria-pressed="true"] { background: var(--select-soft); border-color: var(--select); box-shadow: 0 0 0 1px var(--select); color: var(--strong); }
.tr-fol:disabled { opacity: .5; cursor: default; }
.tr-following { color: var(--text); }
/* A teammate's cursor: an arrow on their place colour, outlined in white so it shows on any
   card, with their name; the builder measures where it points and CSS moves it there through
   --x and --y (ADR 0067). */
.bd { position: relative; }
.tr-cursors { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.tr-cur { --c: var(--ph-1); --x: 0; --y: 0; position: absolute; left: 0; top: 0; display: flex; align-items: flex-start; translate: calc(var(--x) * 1px) calc(var(--y) * 1px); transition: translate 100ms linear; }
.tr-cur[data-ph="2"] { --c: var(--ph-2); }
.tr-cur[data-ph="3"] { --c: var(--ph-3); }
.tr-cur[data-ph="4"] { --c: var(--ph-4); }
.tr-cur[data-ph="5"] { --c: var(--ph-5); }
.tr-cur[data-ph="6"] { --c: var(--ph-6); }
.tr-cur svg { flex: none; width: 16px; height: 20px; fill: var(--c); stroke: var(--strong); stroke-width: 1.4; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.tr-cur__tag { margin: 15px 0 0 -3px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--c); color: var(--strong); font: 600 11px/17px var(--font-ui); white-space: nowrap; box-shadow: 0 0 0 1px var(--strong), 0 2px 6px rgba(0, 0, 0, .5); }
/* A coaching game's cursors (`table/cursors.rs`, the `TeamCoach` board) are these over the board.
   On the battlefield and the top hand row, the card or slot one is on is ringed in its colour
   (`data-pointed`, its `data-ph`), and a slot in the row is lifted. */
.rm-card[data-pointed] { --pc: var(--ph-1); box-shadow: 0 0 0 3px var(--pc), 0 0 16px var(--pc); }
.rm-card[data-pointed="2"] { --pc: var(--ph-2); }
.rm-card[data-pointed="3"] { --pc: var(--ph-3); }
.rm-card[data-pointed="4"] { --pc: var(--ph-4); }
.rm-card[data-pointed="5"] { --pc: var(--ph-5); }
.rm-card[data-pointed="6"] { --pc: var(--ph-6); }
/* The room during the rounds (the board's pod page): under Your deck, the marks on your cards,
   each dismissed by its badge, and a panel per teammate whose Open draws their registered deck
   under the matches, compact and read only, its basics under Lands. */
.tr-marks-list { display: flex; flex-direction: column; gap: 6px; align-self: stretch; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.tr-mrow { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tr-mrow__n { flex: 1; min-width: 0; }
button.tr-badge { border: 0; cursor: pointer; }
.tr-mate { display: flex; align-items: center; gap: 10px; }
.tr-mate__n { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-open[aria-pressed="true"] { background: var(--select-soft); border-color: var(--select); color: var(--strong); }
.tr-basics { display: flex; flex-direction: column; margin-top: 6px; }
.tr-basics .dr-line { padding: 0 2px; }
.tr-basics .dr-line:hover { background: none; }
@media (prefers-reduced-motion: reduce) {
  .bd { --dr-cols-ms: 0ms; --dr-settle-ms: 0ms; --dr-count-ms: 0ms; }
  .tr-cur { transition: none; }
}
@media (max-width: 900px) {
  .bd-body { flex-direction: column; }
  .bd-aside, .bd-side { flex-basis: auto; width: 100%; position: static; min-height: 0; max-height: none; }
}
/* The builder on Decks: the full width of the frame, the name as its title. */
.ax-col.bd-page { max-width: none; }
.bd-name { flex: 0 1 360px; font: 600 18px/24px var(--font-display); }
.bd-select { width: auto; height: 30px; }
.bd-page .dr-glist .dr-line { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
.bd-page .dr-pack .rm-card { cursor: pointer; }

/* A pod's play or draw for games 2 and 3 (Bo3PlayDraw): the question in the intro's stage, each
   answer with what it means under it. */
.intro .choose { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 32px 16px; text-align: center; }
.intro .choose__title { margin: 0; font: 700 34px/40px var(--font-display); color: var(--strong); }
.intro .choose .rm-notice { margin: 0; color: var(--muted); }
.intro .choice { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.intro .choose__note { margin: 0; padding: 0 32px 24px; text-align: center; font-size: 13px; color: var(--muted); }

/* A pod's match over: each game's winner. A watcher's line between games sits over the board as
   the waiting line does. */
.match-games { margin: 0; padding-left: 20px; display: grid; gap: 4px; text-align: left; }
.match-between { position: absolute; top: 10px; left: 50%; translate: -50% 0; z-index: 9; display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px; max-width: calc(100% - 20px); padding: 8px 12px; border: 1px solid var(--edge); border-radius: 8px;
  background: color-mix(in srgb, var(--raised) 95%, transparent); font-size: 14px; }

/* Sideboarding between a pod's games (Bo3Side): the match's line, the other player and the clock
   over the builder's top row, then the changes from game 1. */
.sideboard__head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* The changes from game 1, in a tile over This deck: In and Out, each a list of the recap log's
   card chips, full width, a count before a card changed by more than one. */
.sb-changes { display: flex; flex-direction: column; gap: 10px; }
.sb-changes .rm-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sb-changes__group { display: flex; flex-direction: column; gap: 4px; }
.sb-changes__list { display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; list-style: none; }
.sb-change { display: flex; align-items: center; gap: 6px; }
.sb-change .dr-chip { flex: 1; width: auto; min-width: 0; }
.sb-change__n { flex: none; min-width: 22px; text-align: right; font-variant-numeric: tabular-nums; color: var(--strong); }
.sb-changes__undo { align-self: flex-start; }

/* The result modals' buttons as one stack (owner list #15): the primary and the ones under it
   centred alike with their key hints beside their words, and the row under it sharing the
   primary's width, a lone button taking all of it rather than half. */
.rm-gameover__dialog > .rm-btn--wide { justify-content: center; }
.rm-gameover__more { display: flex; }
.rm-gameover__more > * { flex: 1 1 0; min-width: 0; }

/* A pod match's result (PodOutro): each player in a column of their own (name, the winner's
   tag, their pod record) either side of the score, the headline under the three, then a tile
   per game in an even row. */
.pod-outro { width: min(640px, 100%); }
.pod-outro__versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.pod-outro__who { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.pod-outro__name { font: 700 26px/30px var(--font-display); color: var(--strong); overflow-wrap: anywhere; }
.pod-outro .rm-gameover__title { font-size: 26px; line-height: 30px; }
.pod-outro__games { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 160px)); justify-content: center; gap: 8px; }
.pod-outro__game { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); }

/* The basics' steppers under the lands column while sideboarding (Bo3SideBasics). */
.sb-steps__h { margin-top: 8px; padding: 6px 2px 2px; border-top: 1px dashed var(--line-control); font: 600 11px/14px var(--font-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sb-steps .bd-basic { flex-wrap: nowrap; gap: 2px; font-size: 12px; }
/* The column is a card wide (84px): the pip names the land, and the buttons' labels say it. */
.sb-steps .bd-basic__n { display: none; }
.sb-steps .bd-basic b { min-width: 14px; }
.sb-steps .rm-btn--icon { width: 22px; height: 22px; }
.sideboard__title { font: 600 24px/28px var(--font-display); color: var(--strong); }

/* The pre-game screens (pool reveal plan; canvas boards 3 to 5): a step strip and clock over a
   page of a wide main column and a side column. Board 3 is the pool and bans: the opponent's pool
   in the builder's columns, your decision (a slot per ban, Lock in) and a large preview beside it.
   A ban's tag sits on the card's name bar, which shows even where the column overlaps it. */
.pm { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.pg-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pg-steps li { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--radius-md); border: 1px solid transparent; font: 600 13px/18px var(--font-ui); color: var(--muted); }
.pg-steps li.is-done { color: var(--text); }
.pg-steps li.is-done::before { content: "✓"; color: var(--clock); }
.pg-steps li.is-now { background: var(--accent); color: var(--on-accent); }
.pg-steps li.is-wait { border-color: var(--line-control); color: var(--strong); }
.pg-timer { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; box-sizing: border-box; border-radius: var(--radius-md); background: var(--clock); color: var(--on-clock); font: 700 14px/18px var(--font-ui); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg-wrap { display: flex; flex-wrap: wrap; gap: 24px; padding: 24px 0; align-items: flex-start; }
.pg-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pg-side { flex: 1 1 320px; min-width: 0; max-width: 440px; display: flex; flex-direction: column; gap: 16px; }
.pg-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; }
.pg-head__words { flex: 1 1 360px; min-width: 0; }
.pg-h1 { margin: 0; font: 700 30px/34px var(--font-display); color: var(--strong); }
.pg-h2 { margin: 0; font: 600 20px/26px var(--font-display); letter-spacing: .02em; color: var(--strong); }
.pg-lbl { font: 600 12px/16px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rm-panel.pg-panel { padding: 0; }
.pg-phead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pg-pbody { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.pg-pbody--rule { gap: 4px; border-bottom: 1px solid var(--line); }
.pg-pool { padding: 14px 16px 16px; }
.pg-slots { display: flex; flex-wrap: wrap; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.pg-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 120px; text-align: center; }
.pg-slot .rm-card.pg-slot__card { width: 96px; flex: none; box-shadow: var(--glow-select); }
.pg-slot__name { font: 600 12px/16px var(--font-ui); color: var(--text); }
.pg-empty { display: flex; align-items: center; justify-content: center; width: 96px; aspect-ratio: 63 / 88; box-sizing: border-box; padding: 8px; border: 1px dashed var(--faint); border-radius: 4.76% / 3.41%; font: 400 12px/16px var(--font-ui); color: var(--muted); }
.pg-locked { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-lg); border: 1px solid var(--clock); color: var(--text); }
.pg-locked::before { content: "✓"; color: var(--clock); font-weight: 700; }
.pg-info { padding: 12px 16px; border-radius: var(--radius-lg); background: var(--select-soft); border: 1px solid var(--line-you); color: var(--text); }
.pg-info b { color: var(--strong); }
.pg-look { align-items: center; }
.pg-look .rm-card.pg-look__card { width: 240px; flex: none; }
.pg-look > .ax-small { align-self: stretch; }
.pm .dr-col .rm-card { cursor: default; }
.pm-theirs .dr-col .pm-card { cursor: pointer; transition: box-shadow var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out); }
.pm-theirs .dr-col .pm-card:disabled { cursor: default; }
.pm-card.is-can:hover, .pm-card.is-can:focus-visible { box-shadow: var(--glow-playable); }
.pm-card.is-banned { box-shadow: var(--glow-select); }
.pm-card.is-dim { filter: brightness(.45) saturate(.4); cursor: default; }
.pm-tag { position: absolute; z-index: 2; right: 3px; top: 3px; padding: 0 4px; border-radius: var(--radius-sm); background: var(--select); color: var(--on-select); font: 700 8px/12px var(--font-ui); letter-spacing: .04em; white-space: nowrap; }
.pm-tag--line { position: static; margin-left: auto; font-size: 10px; }
/* Above the match intro (`.intro`), whose keys it takes first while it shows (final review, I1). */
.rm-scrim.pm-came { z-index: calc(var(--z-overlay) + 1); }
.rm-scrim.pm-came { align-items: flex-start; overflow-y: auto; padding: 40px 32px; }
.pg-sheet { width: 100%; max-width: 1120px; display: flex; flex-direction: column; gap: 20px; padding: 28px; box-sizing: border-box; border-radius: 16px; border: 1px solid var(--line); background: var(--panel-float); box-shadow: 0 24px 64px rgba(0, 0, 0, .5); }
.pg-sheet .pg-bar { padding-bottom: 0; border-bottom: 0; }
.pg-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.pg-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; }
.pg-cards { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px; align-items: flex-start; }
.pg-cap { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 128px; text-align: center; }
.pg-cap .rm-card { width: 112px; flex: none; }
.pg-pbody--top { gap: 8px; margin-top: auto; border-top: 1px solid var(--line); }
.pg-strong { color: var(--strong); font-weight: 600; }
.pg-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.pg-phead + .pg-pair { border-top: 0; }
.pg-pair .rm-card { width: 84px; flex: none; }
.pg-arrow { font: 700 28px/1 var(--font-display); color: var(--muted); }
.pg-why { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pg-why b { color: var(--strong); font-weight: 600; }
.pg-only { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/16px var(--font-ui); color: var(--text); }
.rm-card.pg-banned { opacity: .6; outline: 2px dashed var(--rope); outline-offset: -3px; }
.pg-tag { position: absolute; z-index: 2; left: 50%; bottom: 7%; transform: translateX(-50%); padding: 2px 8px; border-radius: var(--radius-sm); font: 700 11px/14px var(--font-ui); white-space: nowrap; }
.pg-tag--ban { background: var(--rope); color: var(--on-rope); }
.pg-tag--in { background: var(--clock); color: var(--on-clock); }
.pg-sheet__foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pg-grow { flex: 1 1 360px; min-width: 0; }
.pm-bans { display: flex; flex-direction: column; gap: 8px; }
.pm-bans .sb-change { flex-wrap: wrap; }

/* Your own game ready while you watch (PodWatch's pull-back), over the board's top right. */
.pull-back { position: absolute; top: 12px; right: 12px; z-index: var(--z-overlay); display: flex; flex-direction: column; gap: 6px; max-width: 360px; padding: 12px 14px; }

/* The pod page in its rounds (PodPage): the rounds on the left, your next match, the standings
   and your deck at the side. */
.pod-page { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-5); align-items: start; }
@media (max-width: 900px) { .pod-page { grid-template-columns: 1fr; } }
.pod-page__rounds, .pod-page__side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pod-round { display: flex; flex-direction: column; gap: 6px; }
.pod-round.is-later { opacity: .7; }
.pod-round__title { margin: 0; font: 600 18px/24px var(--font-display); color: var(--strong); }
.pod-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.pod-match.is-mine { border-color: var(--accent); }
.pod-match__who:last-of-type { text-align: right; }
.pod-match__score { font-variant-numeric: tabular-nums; color: var(--strong); }
.pod-next, .pod-deck { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pod-next__title { font: 600 18px/24px var(--font-display); color: var(--strong); }
.pod-standings table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pod-standings th, .pod-standings td { padding: 4px 6px; text-align: left; border-bottom: 1px solid var(--line); }
.pod-standings tr.is-you td { color: var(--strong); font-weight: 600; }
/* The ended pod (HistPod, HistEndPod) and the live pod page: a finished match folds open to its
   games, each with its winner, turn and Replay; the result,
   the creator's End pod and its confirmation. */
.hp-m { display: flex; flex-direction: column; gap: 4px; }
.hp-games { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 6px; }
.hp-games--rows { flex-direction: column; align-items: stretch; gap: 4px; padding-left: 46px; }
.hp-g { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 3px 0 8px; box-sizing: border-box; border-radius: var(--radius-md); background: var(--bg); border: 1px solid var(--line); font: 500 12px/16px var(--font-ui); color: var(--text); white-space: nowrap; }
.hp-sp { flex: 1; }
.hp-g__n { font: 700 11px/1 var(--font-ui); letter-spacing: .04em; color: var(--muted); }
.hp-g--stop { border-style: dashed; border-color: var(--line-control); }
.hp-g--none { border-style: dashed; color: var(--muted); padding-right: 10px; }
.hp-g .rm-btn { height: 24px; padding: 0 8px; font-size: 12px; }
.hp-fold { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: var(--radius-md); border: 1px solid var(--line-control); background: transparent; color: var(--text); font: 600 12px/1 var(--font-ui); cursor: pointer; white-space: nowrap; }
.hp-fold svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hp-fold[aria-expanded="true"] svg { transform: rotate(90deg); }
.hp-result { display: flex; align-items: center; gap: 16px; }
.hp-result__text { display: flex; flex-direction: column; gap: 2px; }
.hp-big { font: 700 44px/48px var(--font-display); color: var(--strong); font-variant-numeric: tabular-nums; }
.hp-pips { display: inline-flex; align-items: center; gap: 4px; }
.rm-row__meta.hp-pips { display: flex; gap: 8px; margin-top: 4px; }
.he-danger { background: var(--rope); border-color: var(--rope); color: var(--on-rope, #fff); }
.he-danger:hover { filter: brightness(1.08); }
.he-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.he-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-md); background: var(--bg); border: 1px solid var(--line); }
.he-list b { color: var(--strong); }
.he-list .ax-small { margin-left: auto; color: var(--muted); }
/* The ended pod's page (the pod decks spec): the leaderboard and the rounds grid at the left,
   the open player's Deck, Draft and Games tabs at the right; one column under 900px. */
.pod-page.hp-page { grid-template-columns: 340px minmax(0, 1fr); }
@media (max-width: 900px) { .pod-page.hp-page { grid-template-columns: 1fr; } }
.hb-board { display: flex; flex-direction: column; gap: 6px; }
.hb-row { display: grid; grid-template-columns: 16px auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); color: var(--text); font: 400 13px/18px var(--font-ui); text-align: left; cursor: pointer; }
.hb-row:hover { border-color: var(--line-control); }
.hb-row.is-open { border-color: var(--accent); background: var(--accent-soft); }
.hb-row__place { font: 700 13px/1 var(--font-ui); color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.hb-row__who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hb-row__name { font-weight: 600; color: var(--strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-row__line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hb-row__rec { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.hb-rec { font: 700 28px/30px var(--font-display); color: var(--strong); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hb-marks { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.hb-marks b { font: 600 12px/16px var(--font-ui); font-variant-numeric: tabular-nums; color: var(--muted); }
.hb-marks b.is-won { color: var(--clock); }
.hb-marks b.is-lost { color: var(--rope); }
.hb-copy { margin: 0; }
.hb-grid-wrap { overflow-x: auto; }
.hb-grid { border-collapse: collapse; font-size: 12px; }
.hb-grid th, .hb-grid td { padding: 3px; border: 1px solid var(--line); text-align: center; vertical-align: top; }
.hb-grid thead th { color: var(--muted); font-weight: 600; }
.hb-grid tbody th { text-align: left; white-space: nowrap; font-weight: 600; color: var(--text); }
.hb-grid__place { margin-right: 6px; color: var(--muted); }
.hb-grid td.is-self { background: var(--panel-float); }
.hb-score, .hb-bye { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 32px; padding: 2px 4px; box-sizing: border-box; font: 600 12px/14px var(--font-ui); font-variant-numeric: tabular-nums; }
.hb-score { width: 100%; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); cursor: pointer; }
.hb-score:hover { background: var(--panel-float); }
.hb-score.is-won { color: var(--clock); }
.hb-score.is-lost { color: var(--rope); }
.hb-score small, .hb-bye small { font-size: 10px; font-weight: 500; color: var(--muted); }
.hb-bye { color: var(--muted); }
/* A team pod's ended page (the TeamHist board): the header over both columns, the winner first
   in its colour; the leaderboard's side groups; the grid of Team A down against Team B across,
   each score in its winner's colour with its mark, a pairing never played dashed and muted. */
.th-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: 14px 20px; }
.th-head--a { border-top: 3px solid var(--team-a); }
.th-head--b { border-top: 3px solid var(--team-b); }
.th-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.th-side--r { align-items: flex-end; }
.th-name { display: flex; align-items: center; gap: 8px; }
.th-name b { font: 600 20px/24px var(--font-display); color: var(--strong); }
.th-took { padding: 0 8px; border-radius: var(--radius-pill); font: 700 11px/18px var(--font-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--on-mark); background: var(--team-a); }
.th-head--b .th-took { background: var(--team-b); }
.th-who { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.th-p { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); white-space: nowrap; }
.th-tally { display: flex; align-items: center; gap: 8px; font: 700 52px/56px var(--font-display); color: var(--strong); font-variant-numeric: tabular-nums; }
.th-tally span { color: var(--muted); font-weight: 500; }
.th-head--a .th-tally b.is-won { color: var(--team-a); }
.th-head--b .th-tally b.is-won { color: var(--team-b); }
.th-result { margin-left: auto; display: flex; flex-direction: column; gap: 2px; max-width: 420px; padding-left: 24px; border-left: 1px solid var(--line); }
.th-result b { font: 600 17px/22px var(--font-display); color: var(--strong); }
@media (max-width: 900px) { .th-result { margin-left: 0; padding-left: 0; border-left: 0; } }
.hb-group { display: flex; flex-direction: column; gap: 6px; }
.hb-group + .hb-group { margin-top: 6px; }
.hb-group__h { display: flex; align-items: center; gap: 8px; padding: 2px 2px 0; font-size: 13px; line-height: 18px; }
.hb-group__h b { color: var(--strong); }
.hb-group__n { color: var(--muted); }
.th-grid { width: 100%; table-layout: fixed; }
.th-grid th.th-corner { width: 84px; }
.th-grid thead th { padding: 6px 2px 5px; vertical-align: bottom; border-bottom: 3px dashed var(--team-b); }
.th-grid thead th.th-corner { border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; padding: 4px 6px; }
.th-grid thead th.is-b .rm-avatar { display: grid; margin: 0 auto 3px; }
.th-grid tbody th.is-a { box-shadow: inset 3px 0 0 var(--team-a); padding: 4px 6px 4px 9px; vertical-align: middle; }
.th-grid tbody th.is-a .rm-avatar { margin-right: 6px; vertical-align: middle; }
.th-gn { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text); }
.th-grid tbody th .th-gn { display: inline; }
.th-corner > span { display: flex; align-items: center; gap: 3px; font-size: 11px; line-height: 14px; color: var(--muted); }
.th-corner > span + span { margin-top: 3px; }
.th-corner i { font-style: normal; }
.th-corner .dr-team, .hb-score .dr-team { width: 12px; height: 12px; font-size: 7px; border-radius: 2px; }
.th-corner .dr-team--b, .hb-score .dr-team--b { width: 9px; height: 9px; margin: 1.5px; }
.th-grid td { padding: 3px; vertical-align: middle; }
.th-grid .hb-score { min-height: 36px; justify-content: center; gap: 2px; border: 1px solid var(--line-control); }
.hb-score__l { display: inline-flex; align-items: center; gap: 5px; }
.th-grid .hb-score--a { color: var(--team-a); border-color: var(--team-a); background: color-mix(in srgb, var(--team-a) 9%, transparent); }
.th-grid .hb-score--b { color: var(--team-b); border-style: dashed; border-color: var(--team-b); background: color-mix(in srgb, var(--team-b) 9%, transparent); }
.hb-none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 36px; padding: 2px; box-sizing: border-box; border: 1px dashed var(--line-control); border-radius: var(--radius-sm); font: 500 11px/13px var(--font-ui); color: var(--muted); }
.hb-none small { font-size: 10px; }
.hpl { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hpl-tabs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--line); }
.hpl-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 14px 8px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.hpl-tab[aria-pressed="true"] { border-bottom-color: var(--accent); }
.hpl-tab__n { font: 600 20px/24px var(--font-display); color: var(--strong); }
.hpl-tab__s { font: 400 12px/16px var(--font-ui); color: var(--faint); }
.hpl-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-left: auto; padding: 0 4px 10px; }
.hpl-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* A pack's picks fill the row; the card size slider (--cs) sets how wide each is. */
.hpl-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(64px * var(--cs, 1)), 1fr)); gap: 4px; }
.hpl-picks .dr-card { width: 100%; padding: 2px; box-sizing: border-box; }
.hpl-picks .rm-card__name { font-size: calc(8px * var(--cs, 1)); line-height: calc(11px * var(--cs, 1)); }
.hpl-picks .rm-card__type { display: none; }
.hpl-pick__n { position: absolute; top: 3px; left: 3px; z-index: 2; padding: 1px 4px; border-radius: var(--radius-sm); background: var(--scrim); color: var(--strong); font: 700 10px/12px var(--font-ui); font-variant-numeric: tabular-nums; }
.hpl-pick.is-out { opacity: .42; filter: grayscale(.8); }
.hpl-pick.is-out:hover { opacity: 1; filter: none; }
.hpl-link { align-self: flex-start; font-weight: 600; color: var(--accent); }
.hpl-match { display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 12px; }
.hpl-match__h { display: flex; align-items: baseline; gap: 10px; }
.hpl-match__score { font-variant-numeric: tabular-nums; }
.hpl-match__score.is-won { color: var(--clock); }
.hpl-match__score.is-lost { color: var(--rope); }
.hpl-match .hp-games--rows { padding-left: 0; }
.hpl-match .hp-g { flex-wrap: wrap; height: auto; min-height: 34px; padding-top: 3px; padding-bottom: 3px; white-space: normal; }
.hpl-badge { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: var(--radius-sm); background: var(--rope); color: var(--on-rope); font: 700 11px/1 var(--font-ui); }
.hpl-badge.is-won { background: var(--clock); color: var(--on-clock); }
.hpl-in { color: var(--clock); }
.hpl-out { color: var(--rope); }

/* Every seat's draft (HistLog). */
.hl-sub { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px 2px; font: 600 13px/18px var(--font-ui); color: var(--strong); }
.hl-sub span { font-weight: 400; font-size: 12px; color: var(--muted); }
.hl-bar { display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 4px; border-bottom: 1px solid var(--line); }
.hl-bar__who { font: 600 13px/1 var(--font-ui); color: var(--strong); }
.hl-bar__where { font: 600 12px/1 var(--font-ui); color: var(--muted); white-space: nowrap; }
.hl-bar__where b { font: 700 17px/1 var(--font-display); color: var(--strong); font-variant-numeric: tabular-nums; }
/* The pack and pick navigator over the pack (review item 19), and the pass ring (item 21). */
.hl-bar { flex-wrap: wrap; row-gap: 6px; padding-block: 6px; }
.hl-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hl-nav .seg button[aria-checked] { padding: 5px 12px; }
.hl-nav .seg button:disabled, .hl-nav__picks button:disabled { opacity: .35; cursor: default; }
.hl-nav__picks { display: flex; flex-wrap: wrap; gap: 2px; }
.hl-nav__picks button { width: 26px; height: 26px; padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font: 600 13px/1 var(--font-ui); font-variant-numeric: tabular-nums; cursor: pointer; }
.hl-nav__picks button:not(:disabled):hover { background: var(--panel-float); color: var(--text); }
.hl-nav__picks button[aria-current="true"] { background: var(--select-soft); border-color: var(--select); color: var(--strong); }
/* The pod's seats in pass order, on a line of their own under the navigator (item 28): the
   shown seat marked, the seats the pack came from and goes to tagged; it wraps, never clips. */
.hl-ring { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; font: 600 12px/1 var(--font-ui); color: var(--muted); }
.hl-ring__dir { margin-right: 6px; white-space: nowrap; }
.hl-ring__sep { color: var(--faint); }
.hl-ring__s { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 3px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--text); font: 600 12px/1 var(--font-ui); cursor: pointer; white-space: nowrap; }
.hl-ring__s .rm-avatar { --size: 26px; font-size: 10px; }
.hl-ring__s:hover { background: var(--panel-float); }
.hl-ring__s.is-from, .hl-ring__s.is-to { border-color: var(--line-control); }
.hl-ring__s[aria-pressed="true"] { background: var(--select-soft); border-color: var(--select); color: var(--strong); }
.hl-ring__n { max-width: 9ch; overflow: hidden; text-overflow: ellipsis; }
.hl-ring__tag { font: 600 10px/1 var(--font-ui); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
/* The picks page scrolls its log itself, to follow the pick (item 20). */
.hl-log { overflow-anchor: none; }
a.hpl-pick { color: inherit; text-decoration: none; }

.frame-peek__seats { display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 16px; }
.frame-peek__seat { display: flex; align-items: center; gap: 6px; }
.frame-peek__seat span { flex: 1; color: var(--muted); }

/* The floating window (`table/window.rs`): the design system's `rm-float`, fixed in the table's
   frame, moved by its head and resized by its grip. A slide window (the log) stays mounted and
   slides in from past the frame's right edge (`--off`) in 160 ms, and out in 120 ms; under
   reduced motion it fades in over 120 ms and closes at once (log window §5). */
.win { position: fixed; display: flex; flex-direction: column; min-width: 0; outline: none; }
.win__head { flex: none; cursor: grab; touch-action: none; user-select: none; }
.win__head:active { cursor: grabbing; }
.win__size input { width: 80px; }
.win__body { flex: 1; min-height: 0; overflow: auto; }
.win > .rm-float__grip { cursor: nwse-resize; touch-action: none; }
.win--slide { visibility: hidden; transform: translateX(var(--off)); transition: transform 120ms var(--ease-in), visibility 0s linear 120ms; }
.win--slide.is-open { visibility: visible; transform: none; transition: transform 160ms cubic-bezier(0.05, 0.7, 0.1, 1), visibility 0s; }
/* Reduced motion: no slide, but still away past the edge, where the log's tab shows. */
@media (prefers-reduced-motion: reduce) {
  .win--slide, .win--slide.is-open { transition: none; }
}

/* A cube's public page (docs/superpowers/plans/2026-11-09-decks-hub.md, Task 15; mockup
   cube.html): the hero over the cube's art, underline tabs, the List's columns and the Changes
   entries. Columns and tiles wrap, so nothing scrolls sideways at 375 px. */
.cb { display: flex; flex-direction: column; width: 100%; min-width: 0; font: 400 14px/20px var(--font-ui); }
.so .cb { max-width: 1200px; }
.cb a:not(.rm-btn):not(.rm-tab) { color: var(--accent); text-decoration: none; }
.cb a:not(.rm-btn):not(.rm-tab):hover { color: var(--accent-hover); }
.cb a.rm-btn { color: var(--text); text-decoration: none; }
.cb-wait { margin: var(--space-5); }
.cb-hero { position: relative; min-height: 230px; display: flex; overflow: hidden; background: var(--ph-1); }
.cb-hero__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.cb-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 97%, transparent) 35%, color-mix(in srgb, var(--bg) 35%, transparent)), linear-gradient(transparent 60%, var(--bg)); }
.cb-hero__body { position: relative; z-index: 1; display: grid; gap: 10px; align-content: start; max-width: 640px; min-width: 0; box-sizing: border-box; padding: 32px 28px; }
.cb-hero__name { margin: 0; font: 700 30px/34px var(--font-display); color: var(--strong); overflow-wrap: anywhere; }
.cb-hero b { font-weight: 600; color: var(--strong); }
.cb-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.cb-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cb-following { border-color: var(--clock); color: var(--clock); background: color-mix(in srgb, var(--clock) 10%, transparent); }
.cb-tabs { display: flex; flex-wrap: wrap; gap: 0 24px; padding: 0 28px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.cb-tabs a.rm-tab { display: inline-flex; align-items: center; gap: 4px; height: auto; margin-bottom: -1px; padding: 12px 0; border-radius: 0; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; }
.cb-tabs a.rm-tab:hover { background: none; color: var(--text); }
.cb-tabs a.rm-tab[aria-current="page"] { color: var(--strong); border-bottom-color: var(--accent); }
.cb-tabs em { font-style: normal; color: var(--faint); }
.cb-updated { padding: 1px 8px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font: 700 11px/16px var(--font-ui); }
.cb-new { margin-left: 6px; padding: 1px 6px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font: 700 10px/14px var(--font-ui); }
.cb-panel { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: 22px 28px; }
.cb-panel p { margin: 0; }
.cb-anon { margin: 0; padding: 0 28px 22px; }
.cb-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: var(--space-1); }
.cb-showing { margin-left: auto; }
.cb-select { width: auto; height: 26px; font-size: 12px; }
.cb-added { color: var(--clock); }
.cb-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.cb-cols--images { grid-template-columns: repeat(auto-fill, minmax(calc(124px * var(--cs, 1)), 1fr)); }
.cb-col { --c: var(--line-control); display: flex; flex-direction: column; min-width: 0; }
.cb-cols--images .cb-col { gap: 6px; }
.cb-col[data-group="White"] { --c: var(--strong); }
.cb-col[data-group="Blue"] { --c: var(--select); }
.cb-col[data-group="Black"] { --c: var(--opp-mark); }
.cb-col[data-group="Red"] { --c: var(--rope); }
.cb-col[data-group="Green"] { --c: var(--clock); }
.cb-col[data-group="Multicolour"] { --c: var(--accent); }
.cb-col[data-group="Colourless"] { --c: var(--muted); }
.cb-col h3 { display: flex; gap: 6px; align-items: center; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--c); font: 700 15px/20px var(--font-display); color: var(--strong); }
.cb-col h3 em { margin-left: auto; font: 500 12px/16px var(--font-mono); font-style: normal; color: var(--faint); }
.cb-name { overflow: hidden; font-size: 12px; line-height: 19px; white-space: nowrap; text-overflow: ellipsis; cursor: default; }
.cb-name:hover { color: var(--accent); }
.cb-name.is-added, .cb-plus { color: var(--clock); }
.cb-minus { color: var(--rope); }
.cb-name.is-unplayable { color: var(--faint); }
.cb-card.is-added { box-shadow: 0 0 0 2px var(--clock); }
.cb-card.is-unplayable { filter: grayscale(.6) brightness(.55); }
.cb-compare { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cb-compared { display: flex; flex-direction: column; gap: var(--space-2); }
.cb-ver { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.cb-ver__when { display: flex; flex-direction: column; gap: 2px; }
.cb-ver__n { display: flex; align-items: center; font: 700 22px/28px var(--font-display); color: var(--strong); }
.cb-ver__n.is-old { color: var(--muted); }
.cb-ver__body { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
/* A saved deck's history under its board (decks.rs `history`), the cube page's versions. */
.dk-history { display: flex; flex-direction: column; margin-top: var(--space-5); }
.dk-history .cb-ver__when .rm-btn { align-self: flex-start; margin-top: 6px; }
.dk-side { display: flex; flex-direction: column; gap: 4px; }
.dk-side h4 { margin: 0; }
.cb-note { padding: 8px 12px; background: var(--panel); border-left: 3px solid var(--line-control); border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: 13px; }
.cb-io { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cb-io h4 { margin: 0 0 8px; font: 600 13px/18px var(--font-ui); }
.cb-in h4 { color: var(--clock); }
.cb-out h4 { color: var(--rope); }
.cb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.cb-tile { --b: var(--line-control); position: relative; overflow: hidden; aspect-ratio: var(--art-ratio); border: 2px solid var(--b); border-radius: var(--radius-md); background: var(--ph-2); }
.cb-in .cb-tile { --b: color-mix(in srgb, var(--clock) 70%, transparent); }
.cb-out .cb-tile { --b: color-mix(in srgb, var(--rope) 60%, transparent); filter: saturate(.5); }
.cb-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cb-tile span { position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden; padding: 10px 6px 3px; background: linear-gradient(transparent, var(--scrim)); color: var(--strong); font: 600 11px/13px var(--font-ui); white-space: nowrap; text-overflow: ellipsis; }
.cb-lines { font-size: 13px; line-height: 20px; }
/* The hub's tab bar; cubes, own and followed, sit on the shelf's boxes (Task 14). */
.dk-tabs { padding: 0; margin-bottom: var(--space-4); }
/* The cube editor (decks hub plan, Task 14): the unpublished count with Discard and Publish, and
   the working list by colour beside the card search, each line with Remove. */
.cb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cb-edit { flex-basis: 300px; max-height: calc(100vh - 24px); overflow-y: auto; }
.cb-edit .cb-col { margin-bottom: var(--space-3); }
.cb-line { display: flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 2px 0 6px; border-radius: var(--radius-sm); }
.cb-line:hover { background: var(--panel-float); }
.cb-line__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.cb-line.is-unplayable .cb-line__name { color: var(--faint); }
.cb-line .cs-tag { align-self: center; flex: none; }
.cb-remove { flex: none; height: 20px; padding: 0 6px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); font: 600 11px/20px var(--font-ui); cursor: pointer; opacity: 0; }
.cb-line:hover .cb-remove, .cb-remove:focus-visible { opacity: 1; }
.cb-remove:hover { color: var(--rope); }
@media (hover: none) { .cb-remove { opacity: 1; } }
/* Its header's right edge meets the bar's buttons, inside the bar's padding and border. */
.bd-top.cb-top { padding-inline: 15px; }
.cb-line.is-added .cb-line__name { color: var(--clock); }
/* The table's Remove and Put back, over the card's corner. */
.cb-name, .cb-card { position: relative; }
.cb-name .cb-remove, .cb-card .cb-remove { position: absolute; top: 0; right: 0; background: var(--panel-float); }
.cb-card .cb-remove { top: 4px; right: 4px; z-index: 1; }
.cb-name:hover .cb-remove, .cb-card:hover .cb-remove { opacity: 1; }
.cb-name.is-removed { color: var(--rope); text-decoration: line-through; }
.cb-card.is-removed { box-shadow: 0 0 0 2px var(--rope); opacity: .5; }
.cb-card.is-removed:hover { opacity: 1; }
/* What goes in and comes out at Publish, by name, each with Undo. */
.cb-diff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cb-diff h4 { margin: 0 0 4px; font: 700 13px/18px var(--font-display); color: var(--clock); }
.cb-diff [data-testid="cube-diff-out"] h4 { color: var(--rope); }
.cb-diff ul { max-height: 216px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.cb-diff__card { display: flex; align-items: center; gap: 6px; min-height: 24px; font-size: 13px; }
.cb-diff__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-diff__card.is-removed .cb-diff__name { color: var(--muted); text-decoration: line-through; }
.cb-diff .cb-remove { opacity: 1; }
.cb-views { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cb-paste { margin-left: auto; }
.cb-paste[open] { flex-basis: 100%; margin-left: 0; }
.cb-paste summary { width: max-content; list-style: none; }
.cb-paste summary::-webkit-details-marker { display: none; }
.cb-paste__body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; }
.cb-paste__body .rm-textarea { width: 100%; min-height: 140px; }
button.dk-new { background: none; font: inherit; cursor: pointer; }
@media (max-width: 640px) {
  .cb-hero__body, .cb-panel { padding-left: var(--space-4); padding-right: var(--space-4); }
  .cb-tabs { padding: 0 var(--space-4); }
  .cb-anon { padding: 0 var(--space-4) var(--space-4); }
  .cb-showing { margin-left: 0; }
  .cb-ver, .cb-io, .cb-diff { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* While the stack has items or a spell is being cast, the battlefield and hand fade toward
   black; cards the prompt offers or an item targets (.is-live) stay bright. --stack-bright and
   --stack-fade come from the board's style (`Ctx::stack_dim_vars`). The pile, panels, menus and
   the tooltip stay as they are. Every background in them dims alike, with an inset shade on each
   element that paints its own (the opponent's half and its piles), under its cards; a later
   box-shadow on any of these must combine with it. */
.rm-board :is(.rm-field, .rm-hand, .rm-field__half.opp, .piles__half.opp) { transition: box-shadow var(--stack-fade, 0ms); }
.rm-board .rm-field .rm-card { transition: filter var(--stack-fade, 0ms); }
.rm-board.stack-dim :is(.rm-field, .rm-hand, .rm-field__half.opp, .piles__half.opp) {
  box-shadow: inset 0 0 0 100vmax rgb(0 0 0 / calc(1 - var(--stack-bright)));
}
.rm-board.stack-dim :is(.rm-field, .rm-hand) .rm-card:not(.is-live) {
  filter: brightness(var(--stack-bright)) saturate(.6);
}
/* A tapped card's own dimmer look (.7) combines with the fade. */
.rm-board.stack-dim[data-tapped=tilted] :is(.rm-field, .rm-hand) .rm-card.is-tapped:not(.is-live),
.rm-board.stack-dim .rm-field.is-tops .rm-field__row :is(.slot, .tuck) > .rm-card.is-tapped:not(.under):not(.is-live) {
  filter: brightness(calc(var(--stack-bright) * .7)) saturate(.6);
}
@media (prefers-reduced-motion: reduce) {
  .rm-board :is(.rm-field, .rm-hand), .rm-board .rm-field .rm-card { transition: none; }
}
/* An ability's own words on its pile tile, and the tile the zoom key shows large (312 px wide at
   the preview's 100%, scaled by `--k`). The source's whole text, when the server names no
   paragraph (`.whole`), is smaller on the tile, the tooltip and the zoom. */
.stack .tile .words { margin: 0; overflow: hidden; font-size: calc(11px * var(--stack-s, 1)); line-height: 1.25; }
.stack .tile .words.whole { font-size: calc(10px * var(--stack-s, 1)); }
.stack-tip .tip-text.whole { font-size: calc(11px * var(--stack-s, 1)); }
.preview .ability-tile .words.whole { font-size: calc(14px * var(--k)); }
.preview .ability-tile {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: calc(8px * var(--k));
  padding: calc(10px * var(--k));
  overflow: hidden;
  background: var(--panel);
  border: calc(3px * var(--k)) dashed color-mix(in srgb, var(--opp-mark) 60%, var(--edge));
  border-radius: calc(12px * var(--k));
  font-size: calc(17px * var(--k));
}
.preview .ability-tile.mine { border-color: color-mix(in srgb, var(--accent) 60%, var(--edge)); }
.preview .ability-tile .art { flex: none; height: calc(120px * var(--k)); border-radius: calc(8px * var(--k)); background: var(--edge) 50% 24% / cover no-repeat; }
.preview .ability-tile b { font-size: calc(20px * var(--k)); }
.preview .ability-tile .kind { color: var(--muted); }
.preview .ability-tile .words { margin: 0; white-space: pre-line; }
.preview .ability-tile .tgt { color: var(--strong); }

/* Admin › Boosters (M8 Boosters Task 5): a sheet or variant a box each. */
.ab-row { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); }

/* The league page (M8 Leagues Task 8): the canvas's `PlayB` ranked card and `MclPublicHeader`
   table, in the design system's tokens. Play's Leagues row reuses the card. */
.pq__card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-lg); background: var(--bg); border: 1px solid var(--line-control); }
.pq__t { font: 700 20px/24px var(--font-display); color: var(--strong); }
.pq__m { font-size: 13px; line-height: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pq__m--text { color: var(--text); }
.pq__m--strong { color: var(--strong); }
.pq__act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; }
.pq__name { padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.pq__name:hover { text-decoration: underline; }
.lq-row > .pq__card { width: 320px; max-width: 100%; }
.qe__seats { display: inline-flex; gap: 4px; }
.qe__seats i { width: 14px; height: 14px; border-radius: 50%; box-sizing: border-box; border: 1px dashed var(--line-control); }
.qe__seats i.on { border: 0; background: var(--select); }
.lt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; line-height: 20px; }
.lt th { padding: 8px 10px; font: 600 11px/16px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lt th.l, .lt td.l { text-align: left; }
.lt td { padding: 7px 10px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; }
.lt td.pos { width: 28px; color: var(--muted); }
.lt td.nm { text-align: left; width: 100%; }
.lt td.nm > span { display: inline-flex; align-items: center; gap: 10px; color: var(--strong); font-weight: 600; }
.lt td.pts { font-weight: 700; color: var(--strong); }
.lt tr.is-you td { background: var(--select-soft); }
.lt tr.is-you td:first-child { box-shadow: inset 3px 0 0 var(--select); color: var(--strong); }
.lt tr.zone td { padding: 3px 10px; border-top: 1px dashed currentColor; font: 700 11px/16px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; text-align: left; color: var(--muted); }
/* Zone rows and the small season badge (official pyramid Task 7): `MclPublicHeader`'s lines and
   `MclIdentity`'s Champions badge, `.lsb` apart from the sideboard's `.sb-*`. */
.lt tr.zone--up td { color: var(--clock); }
.lt tr.zone--down td { color: var(--rope); }
.lsb { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; box-sizing: border-box; border-radius: var(--radius-pill); font: 700 12px/16px var(--font-ui); white-space: nowrap; }
.lsb svg { width: 13px; height: 13px; }
.lsb--champ { background: var(--honour); color: var(--on-honour); }
/* A dropped pool's Out tag (pre-match plan, Task 11): the form's drawn box, muted. */
.lsb--out { background: var(--panel-float); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-control); }
.lt-foot__go { margin-left: auto; padding: 0; border: 0; background: none; font: inherit; color: var(--accent); cursor: pointer; }
.lt-foot__go:hover { text-decoration: underline; }
.lt tr.gap td { padding: 10px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.lt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.frm { display: inline-flex; gap: 3px; }
.frm b { width: 18px; height: 18px; border-radius: 4px; box-sizing: border-box; font: 700 11px/18px var(--font-ui); text-align: center; }
.frm .W { background: var(--clock); color: var(--on-clock); }
.frm .D { background: var(--panel-float); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-control); }
.frm .L { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--rope); }
/* The division chip (official pyramid Task 6): `MclIdentity`'s, in the design system's tokens;
   the top division's in honour silver, and its players' pictures ringed in it (decision 10). */
.dv { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; box-sizing: border-box; border-radius: var(--radius-pill); border: 1px solid var(--line-control); background: var(--bg); font: 600 13px/18px var(--font-ui); color: var(--strong); white-space: nowrap; max-width: 100%; overflow: hidden; }
.dv__fmt { font-weight: 500; color: var(--muted); }
.dv__fmt::before { content: "· "; }
.dv--unplaced { border-style: dashed; color: var(--text); }
.dv__up { color: var(--clock); font-weight: 700; }
.dv__down { color: var(--rope); font-weight: 700; }
.dv--honour { background: var(--honour); border-color: var(--honour); color: var(--on-honour); }
.dv--honour .dv__fmt { color: var(--on-honour); opacity: .75; }
.dv--honour .dv__up, .dv--honour .dv__down { color: var(--on-honour); }
.rm-avatar--honour { box-shadow: 0 0 0 2px var(--honour); }
.intro .player .rm-avatar--honour { box-shadow: 0 0 0 2px var(--honour), 0 20px 48px rgba(0, 0, 0, .65); }
.intro .player .dv { align-self: flex-start; }
.dr-seat .dv { height: 22px; padding: 0 8px; gap: 6px; font-size: 11px; line-height: 14px; }
.lg-head { display: flex; flex-direction: column; gap: 6px; }
.lg-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.lg-picks .rm-input { width: auto; }
.lg-signin { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lg-signin__text { flex: 1 1 320px; display: flex; flex-direction: column; }
.lg-signin__text b { color: var(--strong); }
.lg-pub { width: 100%; max-width: 1120px; }
.lg-pub .rm-page { padding: 0; }
.lg-scroll { overflow-x: auto; }

/* Play's Find a match row (friendly queues, Task 8): the queue card, a little tighter. */
.fq-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.fq-row .pq__card { padding: 12px 14px; gap: 6px; }
.fq-row .pq__t { font-size: 16px; line-height: 20px; }
.fq-kind { font: 600 11px/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fq-live { color: var(--clock); }

/* The resolution window (its spec; `resolve`): the resolving item's art and its Oracle words by
   step (now gold and underlined, done struck with a green tick, later faded), the question in
   the accent colour, then one lane per place, each card with its place under it and ◀ ▶ in an
   ordered lane; a gold pill on hover says what a click does, and a blue marker shows a drop. */
.rz { display: flex; flex-direction: column; gap: var(--space-3); height: 100%; padding: var(--space-3); }
.rz__dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--accent); }
.rz__head { display: flex; gap: var(--space-3); align-items: flex-start; }
.rz__art { flex: none; width: 72px; height: 54px; border-radius: var(--radius-sm); background: var(--raised) center / cover; }
.rz__text { margin: 0; white-space: pre-line; line-height: 1.45; color: var(--text); }
.rz__step.is-now { background: color-mix(in srgb, var(--accent) 18%, transparent); text-decoration: underline var(--accent) 2px; text-underline-offset: 3px; color: var(--strong); }
.rz__step.is-done { text-decoration: line-through; color: var(--muted); }
.rz__step.is-done::before { content: "\2713\00a0"; color: var(--good, #4caf50); }
.rz__step.is-later { color: var(--faint); }
.rz__ask { margin: 0; color: var(--accent); font-weight: 600; }
.rz__lanes { display: flex; flex-direction: column; gap: var(--space-2); flex: 1; min-height: 0; overflow: auto; }
.rz__lane { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); }
.rz__lane-head { display: flex; align-items: baseline; gap: var(--space-2); padding: 6px 10px; }
.rz__count { color: var(--muted); font-variant-numeric: tabular-nums; }
.rz__hint { margin-left: auto; color: var(--faint); font-size: 12px; }
.rz__row { position: relative; display: flex; gap: 10px; min-height: 72px; padding: 8px 10px 10px; overflow-x: auto; touch-action: none; }
.rz__slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; width: var(--win-card); cursor: grab; user-select: none; }
.rz__slot .rm-card { --card-w: var(--win-card); width: var(--card-w); }
.rz__slot .rm-card__name { font-size: 8px; line-height: 11px; }
.rz__slot.is-dragging { opacity: 0.4; }
.rz__pos { min-height: 14px; font-size: 11px; color: var(--muted); }
.rz__nudge { display: flex; gap: 4px; }
.rz__nudge button { padding: 0 6px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: none; color: var(--muted); font-size: 10px; cursor: pointer; }
.rz__pill { position: absolute; z-index: 4; top: -10px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: 11px; white-space: nowrap; pointer-events: none; }
.rz__new { position: absolute; z-index: 3; top: 4px; left: 4px; padding: 0 5px; border-radius: var(--radius-sm); background: var(--select); color: var(--on-accent); font-size: 10px; font-weight: 700; }
.rz__empty { align-self: center; color: var(--faint); font-size: 12px; }
.rz__marker { position: absolute; top: 8px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--select); pointer-events: none; }
.rz__foot { display: flex; align-items: center; gap: var(--space-2); justify-content: flex-end; }
.rz__foot .rm-decision__hint { margin-right: auto; }
.rz__checklist { margin: 0 0 var(--space-2); padding-left: 18px; font-size: 13px; }
.rz-notice { position: fixed; z-index: var(--z-float); bottom: 24px; left: 50%; transform: translateX(-50%); padding: 8px 14px; border: 1px solid var(--accent); border-radius: 10px; background: color-mix(in srgb, var(--raised) 95%, transparent); box-shadow: 0 6px 18px #0008; color: var(--strong); }

/* The ante reveal after a match (pool reveal plan, decision 12; canvas board 5): both bans face
   up, a soft sweep passes over them, then the drawn one lifts and glows while the other dims,
   the tags cross-fade and the line fades in. Two copies of each keyframe (a/b) so Replay
   restarts the run by swapping `ar-a` and `ar-b`. Reduced motion shows the end state at once. */
.ar { --ar-glow: color-mix(in srgb, var(--strong) 35%, transparent); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ar--won { --ar-glow: color-mix(in srgb, var(--accent) 55%, transparent); }
.ar-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; padding: 14px 0 6px; }
.ar-card { --card-w-battlefield: 150px; position: relative; overflow: hidden; }
.ar-sweep { position: absolute; inset: 0; z-index: 1; pointer-events: none; transform: translateX(-120%); background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .14) 50%, transparent 70%); }
.ar-tag { position: absolute; z-index: 2; left: 50%; bottom: 8px; translate: -50% 0; padding: 0 6px; border-radius: var(--radius-sm); background: var(--rope); color: var(--on-rope); font: 700 10px/16px var(--font-ui); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.ar-tag--2 { opacity: 0; background: var(--edge); color: var(--strong); }
.ar-tag--2.is-taken { background: var(--accent); color: var(--on-accent); }
.ar-line { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 28px 20px; text-align: center; opacity: 0; }
.ar-line b { color: var(--strong); font-weight: 600; }
/* The ante's match end (board AnteWon): 760px, the score beside who won, the bans at 220px. */
.rm-gameover__dialog.ar-modal { width: min(760px, 100%); max-width: 760px; flex: none; padding: 0; gap: 0; align-items: stretch; text-align: left; overflow: hidden; }
.ar-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 24px 28px 8px; }
.ar-score { font: 700 44px/44px var(--font-display); color: var(--strong); font-variant-numeric: tabular-nums; }
.ar-head__words { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* Its parts sit in the dialog's column, so the foot can close it under the games. */
.ar-modal .ar { display: contents; }
.rm-gameover:has(> .ar-modal) { overflow-y: auto; align-items: flex-start; padding: 40px 24px; box-sizing: border-box; }
.ar-modal .ar-cards { gap: 28px; padding: 28px 28px 16px; }
.ar-modal .ar-card { width: 220px; }
.ar-foot { order: 9; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 28px; border-top: 1px solid var(--line); background: var(--raised); }
.ar-pad { padding: 0 28px; }
.ar-modal .pod-outro__games { padding: 0 28px 20px; }
.ar-say { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ar-a { --ar-lift: ar-lift-a; --ar-dim: ar-dim-a; --ar-sweep: ar-sweep-a; --ar-out: ar-out-a; --ar-in: ar-in-a; }
.ar-b { --ar-lift: ar-lift-b; --ar-dim: ar-dim-b; --ar-sweep: ar-sweep-b; --ar-out: ar-out-b; --ar-in: ar-in-b; }
.ar-slot--taken .ar-card { animation: var(--ar-lift) 2.2s cubic-bezier(.2, .7, .2, 1) .3s both; }
.ar-slot--kept .ar-card { animation: var(--ar-dim) 2.2s ease-out .3s both; }
.ar-sweep { animation: var(--ar-sweep) 1.6s ease-in-out .3s both; }
.ar-tag--1 { animation: var(--ar-out) 2.2s ease-out .3s both; }
.ar-tag--2 { animation: var(--ar-in) 2.2s ease-out .3s both; }
.ar-line { animation: var(--ar-in) 2.8s ease-out .3s both; }
@keyframes ar-lift-a { 0%, 55% { transform: none; box-shadow: none; } 100% { transform: translateY(-10px) scale(1.04); box-shadow: 0 0 0 2px var(--ar-glow), 0 12px 36px var(--ar-glow); } }
@keyframes ar-lift-b { 0%, 55% { transform: none; box-shadow: none; } 100% { transform: translateY(-10px) scale(1.04); box-shadow: 0 0 0 2px var(--ar-glow), 0 12px 36px var(--ar-glow); } }
@keyframes ar-dim-a { 0%, 55% { opacity: 1; filter: none; } 100% { opacity: .4; filter: saturate(.3); } }
@keyframes ar-dim-b { 0%, 55% { opacity: 1; filter: none; } 100% { opacity: .4; filter: saturate(.3); } }
@keyframes ar-sweep-a { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(120%); } }
@keyframes ar-sweep-b { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(120%); } }
@keyframes ar-out-a { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ar-out-b { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ar-in-a { 0%, 60% { opacity: 0; } 100% { opacity: 1; } }
@keyframes ar-in-b { 0%, 60% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ar-card, .ar-sweep, .ar-tag, .ar-line { animation-duration: 1ms !important; animation-delay: 0s !important; }
}

/* The player profile (ADR 0119): a sticky sidebar beside the day grid and the feed; one column
   on a phone, the art shrunk to a square beside the name. */
.pf-page { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1180px; margin: 0 auto; padding: 28px 24px 48px; }
.pf-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; min-height: 420px; }
.pf-side--loading { border-radius: 12px; background: var(--panel); }
.pf-side__art { display: flex; flex-direction: column; gap: 10px; }
.pf-side__pic { --size: 240px; border-radius: 12px; font-size: 88px; }
.pf-side__who { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pf-side__name { margin: 0; font: 700 26px/32px var(--font-display); color: var(--strong); overflow-wrap: anywhere; }
.pf-side__figs { display: flex; gap: 24px; }
.pf-fig { display: flex; flex-direction: column; gap: 2px; }
.pf-fig b { font: 700 22px/26px var(--font-display); color: var(--strong); }
.pf-fig span, .pf-label { font: 500 12px/16px var(--font-ui); color: var(--muted); }
.pf-side__form { display: flex; flex-direction: column; gap: 6px; }
.pf-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pf-panel { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 16px 18px; }
.pf-missing { max-width: 560px; margin: 80px auto; padding: 0 16px; text-align: center; }
.pf-missing h1 { font: 700 24px/30px var(--font-display); color: var(--strong); }

/* The day grid: 53 Monday-first weeks, four steps of the accent by count. */
.pf-grid { --cell: 12px; --gap: 3px; }
.pf-grid__count { margin: 0 0 12px; font: 600 15px/20px var(--font-ui); color: var(--strong); }
.pf-grid__scroll { overflow-x: auto; }
.pf-grid__box { display: grid; grid-template-columns: 28px auto; grid-template-rows: 16px auto; gap: 4px; width: max-content; }
.pf-grid__months { grid-column: 2; display: grid; grid-template-columns: repeat(53, var(--cell)); column-gap: var(--gap); font: 500 11px/16px var(--font-ui); color: var(--muted); }
.pf-grid__months span { white-space: nowrap; }
.pf-grid__days { grid-row: 2; display: grid; grid-template-rows: repeat(7, var(--cell)); row-gap: var(--gap); font: 500 10px/12px var(--font-ui); color: var(--muted); }
.pf-grid__cells { grid-row: 2; grid-column: 2; display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, var(--cell)); grid-auto-columns: var(--cell); gap: var(--gap); }
.pf-cell { display: inline-block; width: var(--cell); height: var(--cell); border-radius: 3px; background: var(--chip-bg); cursor: pointer; }
.pf-cell--0 { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.pf-cell--1 { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.pf-cell--2 { background: color-mix(in srgb, var(--accent) 52%, transparent); }
.pf-cell--3 { background: color-mix(in srgb, var(--accent) 76%, transparent); }
.pf-cell--4 { background: var(--accent); }
.pf-cell--future { visibility: hidden; }
.pf-cell--on { outline: 2px solid var(--strong); outline-offset: 1px; }
.pf-grid__legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font: 500 11px/14px var(--font-ui); color: var(--muted); }
.pf-grid__legend .pf-cell { cursor: default; }
.pf-tip { position: fixed; z-index: 30; transform: translate(-50%, calc(-100% - 6px)); padding: 5px 9px; border-radius: 6px; background: var(--panel-float); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); font: 500 12px/16px var(--font-ui); color: var(--strong); white-space: nowrap; pointer-events: none; }

@media (max-width: 760px) {
  .pf-page { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 16px; }
  .pf-side { position: static; min-height: 0; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px 14px; }
  .pf-side__art { grid-row: span 2; }
  .pf-side__art .credit { display: none; }
  .pf-side__pic { --size: 72px; border-radius: 8px; font-size: 26px; }
  .pf-side__figs, .pf-side__form { grid-column: 1 / -1; }
}

/* The profile's feed, the Ledger: compact rows a month at a time, opening to their rounds;
   Going on now above it. */
.pf-sec { margin: 0 0 8px; font: 600 15px/20px var(--font-ui); color: var(--strong); }
.pf-feed { display: flex; flex-direction: column; }
.pf-mh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 22px 0 10px; }
.pf-mh h3 { margin: 0; font: 700 18px/22px var(--font-display); color: var(--strong); }
.pf-mh span { font-size: 12px; color: var(--muted); }
.pf-ledger { padding: 0; overflow: hidden; }
.pf-ledger--loading { min-height: 180px; }
.pf-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 64px 16px; gap: 14px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.pf-row:first-child { border-top: 0; }
.pf-row:hover { background: color-mix(in srgb, var(--strong) 3%, transparent); }
.pf-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pf-row__th { width: 64px; height: 44px; border-radius: 6px; background: var(--chip-bg) center / cover; }
.pf-row__th--casual { display: grid; place-items: center; color: var(--muted); }
.pf-row__th--casual svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pf-row__t { min-width: 0; }
.pf-row__t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--strong); }
.pf-row__t span { font-size: 12px; color: var(--muted); }
.pf-row .frm b { width: 16px; height: 16px; font-size: 10px; line-height: 16px; }
.pf-row .frm .N { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.pf-row__pl { text-align: right; line-height: 1; }
.pf-row__pl b { display: block; font: 700 20px/22px var(--font-display); color: var(--strong); }
.pf-row__pl.is-gold b { color: var(--accent); }
.pf-row__pl span { font: 600 11px/14px var(--font-ui); color: var(--muted); }
.pf-row__chev { color: var(--muted); transition: transform .15s; }
.pf-row.is-open .pf-row__chev { transform: rotate(90deg); }
.pf-row--flat { grid-template-columns: 64px minmax(0, 1fr); cursor: default; }
.pf-row--flat:hover { background: none; }
.pf-lx { padding: 4px 14px 12px 92px; background: var(--field); border-top: 1px solid var(--line); }
.pf-lx__r { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.pf-lx__r:last-child { border-bottom: 0; }
.pf-lx__rn { font: 500 12px var(--font-mono); color: var(--muted); }
.pf-lx__sc { font: 600 13px var(--font-mono); color: var(--text); }
.pf-lx__sc.is-won { color: var(--clock); }
.pf-lx__sc.is-lost { color: var(--rope); }
.pf-lx__go { display: flex; gap: 10px; justify-content: flex-end; font-size: 12px; }
.pf-lx__stage { margin-top: 8px; font: 600 12px/16px var(--font-ui); color: var(--strong); }
.pf-lx__links { display: flex; gap: 16px; margin: 0; padding-top: 8px; font-size: 12px; }
.pf-empty, .pf-failed { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.pf-empty p, .pf-failed p { margin: 0; color: var(--muted); }
.pf-more { align-self: center; margin-top: 16px; }
.pf-nows { display: flex; flex-direction: column; gap: 8px; }
.pf-now { display: grid; grid-template-columns: auto 72px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 10px; background: var(--panel); }
.pf-now__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); animation: pf-pulse 1.6s infinite; }
.pf-now__th { width: 72px; height: 44px; border-radius: 6px; background: var(--chip-bg) center / cover; }
.pf-now .rm-avatar.pf-now__th { --size: 44px; width: 44px; justify-self: center; }
.pf-now__t { min-width: 0; }
.pf-now__t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--strong); }
.pf-now__t span { font-size: 12px; color: var(--muted); }
.pf-now__score { font: 700 18px/22px var(--font-display); color: var(--strong); text-align: right; }
.pf-now__score span { display: block; font: 500 12px var(--font-mono); color: var(--accent); }
@keyframes pf-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .pf-now__dot { animation: none; } }
@media (max-width: 760px) {
  .pf-row { grid-template-columns: 64px minmax(0, 1fr) 56px; }
  .pf-row .frm { grid-column: 2; grid-row: 2; }
  .pf-row__pl { grid-column: 3; grid-row: 1; }
  .pf-row__chev { display: none; }
  .pf-lx { padding-left: 14px; }
  .pf-now { grid-template-columns: auto 44px minmax(0, 1fr); }
  .pf-now__score, .pf-now .rm-btn { grid-column: 3; justify-self: start; text-align: left; }
}

/* Head to head, above the grid on someone else's profile: you, the score and them, your share
   as a bar, the last ten and the breakdown, then the newest meetings. */
.pf-h2h { display: flex; flex-direction: column; gap: 14px; }
.pf-h2h__top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; }
.pf-h2h__side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pf-h2h__side b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--strong); }
.pf-h2h__side--them { justify-content: flex-end; text-align: right; }
.pf-h2h__side--them > div { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; }
.pf-h2h__pic { --size: 44px; font-size: 16px; }
.pf-h2h__score { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.pf-h2h__score b { font: 700 34px/38px var(--font-display); color: var(--strong); font-variant-numeric: tabular-nums; }
.pf-h2h__score span { font-size: 12px; color: var(--muted); }
.pf-h2h__bar { height: 4px; border-radius: 2px; background: var(--opp-mark); overflow: hidden; }
.pf-h2h__bar i { display: block; height: 100%; background: var(--select); }
.pf-h2h__mid { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pf-h2h__rows .pf-lx__r { grid-template-columns: 84px minmax(0, 1fr) auto auto; }
.pf-h2h__where { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-h2h__all { align-self: flex-start; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--accent); cursor: pointer; }
.pf-h2h__all:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .pf-h2h__top { grid-template-columns: 1fr auto 1fr; gap: 8px; }
  .pf-h2h__side .pf-label, .pf-h2h__side--them .dv { display: none; }
  .pf-h2h__score b { font-size: 26px; line-height: 30px; }
}

/* The player card: a player's art across the top at its own shape, fading into the card, the
   name over the fade and the credit top right; their division, figures and form below. */
.pc-on { cursor: pointer; }
.pc-scrim { position: fixed; inset: 0; z-index: 59; }
.pc { position: fixed; z-index: 60; width: 320px; font: 400 14px/20px var(--font-ui); overflow: hidden; border: 1px solid var(--line-control); border-radius: 12px; background: var(--panel-float); box-shadow: 0 18px 44px rgba(0, 0, 0, .5); color: var(--text); text-decoration: none; text-align: left; cursor: pointer; }
.pc__art { position: relative; aspect-ratio: 626 / 457; background: var(--chip-bg) center / cover; }
.pc__art::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, var(--panel-float)); }
.pc__art--none { display: grid; place-items: center; font: 700 72px/1 var(--font-display); color: var(--strong); background: var(--ph-5, var(--chip-bg)); }
.pc__credit { position: absolute; top: 8px; right: 8px; z-index: 1; max-width: 70%; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .6); font: 500 10px/14px var(--font-ui); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc__who { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; margin-top: -44px; padding: 0 16px; }
.pc__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 22px/28px var(--font-display); color: var(--strong); }
.pc__go { opacity: 0; transition: opacity .15s; font-size: 16px; color: var(--accent); }
.pc:hover .pc__go { opacity: 1; }
.pc__body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 12px 16px 16px; }
.pc__figs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; width: 100%; }
.pc__figs .pf-fig b { font-size: 20px; line-height: 24px; }
