/* ============================================================================
   Wizard Score Keeper — page CSS (layered on top of ../../assets/sub.css).

   RULES FOLLOWED (see claude/site-structure.md section 0):
     - Palette comes from sub.css's custom properties (--wine, --navy, --cream,
       --cream-dim, --paper). Never repeat hex codes for those.
     - Panels: paper background, 1px navy border, 12px radius.
     - Inputs/buttons: navy border, 8px radius.
     - Every class here starts with "wz-" so nothing collides with sub.css's
       own .grid / .card / .btn / .pill / header / main rules.
     - Font weights are limited to what the Google Fonts <link> loads:
       Inter 400/500/600, Playfair roman 500.

   LAYOUT IDEA: on a phone the whole app is one column that is exactly as tall
   as the screen (100dvh). The player rows share the leftover height, so 3 to
   6 players always fit with no page scrolling.
   ========================================================================== */

/* Two semantic colours the 5-colour site palette has no equivalent for:
   good (exact / on target) and bad (over / miss). Local to this app. */
.wz {
  --wz-good: #1b6b2a;
  --wz-bad: #a3141b;
  /* Page is exactly one screen tall; rows flex to fit (see .wz-rows). */
  height: 100vh;               /* fallback for browsers without dvh */
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

/* ---- slim header -------------------------------------------------------- */
/* sub.css gives every <header> big padding and centred text; undo that here. */
.wz-head {
  padding: 8px 12px;
  padding-top: max(8px, env(safe-area-inset-top));
  text-align: left;
  flex: 0 0 auto;
}
.wz-head-in {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wz-head-title { flex: 1; min-width: 0; }
/* sub.css centres .crumb in a 1000px box; here it is a small left-aligned link. */
.wz-head .crumb { max-width: none; margin: 0 0 1px; font-size: 11px; }
.wz-head h1 { font-size: 26px; line-height: 1.1; }
/* little save-status light next to the title: green saved, amber saving, red failed */
.wz-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cream-dim); vertical-align: middle; margin-left: 4px;
}
.wz-dot[data-s="saving"] { background: #e0a800; }
.wz-dot[data-s="saved"] { background: #5cb85c; }
.wz-dot[data-s="error"] { background: #ff5a5a; }

/* The five SQUARE navigation boxes (icon + tiny label). 42px squares with a 4px
   gap = 226px, which leaves room for the title on a 360px-wide phone. */
.wz-tools { display: flex; gap: 4px; flex: 0 0 auto; }
.wz-nav {
  width: 42px; height: 42px; padding: 2px 0 0; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 500 8.5px/1 var(--font-ui); letter-spacing: 0; text-decoration: none;
  color: var(--cream); background: transparent;
  border: 1px solid var(--cream-dim); border-radius: 8px; cursor: pointer;
}
.wz-nav:hover:not(:disabled):not(.on) { background: rgba(255, 255, 255, 0.1); }
.wz-nav.on { background: var(--cream); color: var(--wine); border-color: var(--cream); }   /* the box for the screen you're on */
.wz-nav:disabled { opacity: 0.35; cursor: default; }
.wz-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wz-head-title h1 { white-space: nowrap; }

/* ---- main column -------------------------------------------------------- */
/* sub.css gives <main> padding for card pages; this is a div, so we set our own. */
.wz-main {
  flex: 1 1 auto;
  min-height: 0;                /* lets the flex children shrink instead of overflowing */
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;             /* only the setup screen ever needs this */
}
.wz-note { font-size: 13px; color: var(--wine); margin: 0; }

/* ---- panels (setup, settings, results) ---------------------------------- */
.wz-panel {
  background: var(--paper);
  border: 1px solid var(--navy);
  border-radius: 12px;
  padding: 12px;
  flex: 0 0 auto;
}
.wz-label { font-size: 13px; font-weight: 500; margin: 0 0 6px; }
.wz-label small { font-weight: 400; color: var(--wine); }

/* segmented row of equal buttons (player count, first dealer) */
.wz-seg { display: flex; gap: 6px; }
.wz-seg button {
  flex: 1; min-width: 0; height: 44px; padding: 0 4px;
  font: 600 17px var(--font-ui); color: var(--navy);
  background: #fff; border: 1px solid var(--navy); border-radius: 8px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wz-seg button.on { background: var(--navy); color: var(--cream); }
.wz-seg.small button { height: 36px; font-size: 14px; }

/* - 12 + stepper (rounds, scoring values, and the bid / tricks steppers) */
.wz-step {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--navy); border-radius: 8px; overflow: hidden; background: #fff;
}
.wz-step button {
  width: 42px; height: 42px; padding: 0;
  font: 400 24px var(--font-ui); line-height: 1; color: var(--navy);
  background: transparent; border: 0; cursor: pointer;
}
.wz-step button:hover:not(:disabled) { background: var(--cream-dim); }
.wz-step button:disabled { opacity: 0.3; cursor: default; }
.wz-step .v {
  min-width: 36px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  font: 600 20px var(--font-ui);
  border-left: 1px solid var(--navy); border-right: 1px solid var(--navy);
}
.wz-step.wide { display: flex; width: 100%; }
.wz-step.wide button { flex: 1; }
.wz-step.wide .v { flex: 1.3; }

.wz-names { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wz-names input, .wz-num {
  width: 100%; height: 38px; padding: 0 10px;
  font: 400 15px var(--font-ui); color: var(--navy);
  background: #fff; border: 1px solid var(--navy); border-radius: 8px;
}
.wz-num { text-align: center; font-weight: 600; }

.wz-toggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; }
.wz-toggle small { display: block; color: var(--wine); font-size: 12px; margin-top: 2px; }
/* the on/off switch is a real <button role="switch"> for accessibility */
.wz-switch {
  flex: 0 0 auto; width: 48px; height: 28px; padding: 0; position: relative;
  background: #fff; border: 1px solid var(--navy); border-radius: 14px; cursor: pointer;
}
.wz-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--navy); transition: left 0.15s;
}
.wz-switch[aria-checked="true"] { background: var(--navy); }
.wz-switch[aria-checked="true"]::after { left: 23px; background: var(--cream); }

.wz-panel details summary { font-size: 13px; color: var(--wine); cursor: pointer; padding: 4px 0; }
.wz-scoring { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 8px; }
.wz-scoring label { font-size: 11px; display: block; margin-bottom: 3px; color: var(--wine); }

/* ---- primary action button --------------------------------------------- */
.wz-go {
  flex: 0 0 auto; margin-top: auto;
  height: 54px; padding: 0 16px;
  font: 600 17px var(--font-ui); color: var(--cream);
  background: var(--navy); border: 1px solid var(--navy); border-radius: 8px; cursor: pointer;
}
.wz-go:hover:not(:disabled) { opacity: 0.92; }
.wz-go:disabled { opacity: 0.35; cursor: default; }
/* stacked buttons (results screen): only the first one pushes down to the bottom */
.wz-go + .wz-go { margin-top: 0; }
.wz-go.alt { background: transparent; color: var(--navy); }
.wz-go.alt:hover:not(:disabled) { background: var(--cream-dim); opacity: 1; }

/* ---- round strip + hint line ------------------------------------------- */
.wz-strip {
  flex: 0 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--navy); border-radius: 12px;
  padding: 8px 12px; font-size: 13px;
}
.wz-strip b { font: 500 20px var(--font-display); color: var(--wine); }
.wz-strip .r { text-align: right; line-height: 1.3; }
/* Undo: a small square button at the right end of the round strip. */
.wz-undo {
  flex: 0 0 auto; width: 42px; height: 42px; padding: 2px 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 500 8.5px/1 var(--font-ui); color: var(--navy);
  background: transparent; border: 1px solid var(--navy); border-radius: 8px; cursor: pointer;
}
.wz-undo:hover:not(:disabled) { background: var(--cream-dim); }
.wz-undo:disabled { opacity: 0.35; cursor: default; }
.wz-undo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wz-hint { flex: 0 0 auto; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 0 4px; }
.wz-good { color: var(--wz-good); font-weight: 600; }
.wz-bad { color: var(--wz-bad); font-weight: 600; }

/* ---- player rows -------------------------------------------------------- */
/* The rows share all leftover height equally (flex: 1 1 0) but never get
   taller than 84px or shorter than 54px, so 3 players don't look stretched
   and 6 players still fit on a small phone. */
.wz-rows { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.wz-row {
  flex: 1 1 0; min-height: 54px; max-height: 84px;
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--navy); border-radius: 12px;
  padding: 4px 10px;
}
.wz-who { flex: 1; min-width: 0; }
.wz-name { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-name .bid { font-weight: 400; font-size: 12px; margin-left: 4px; }
.wz-sub { font-size: 12px; color: var(--wine); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-badge {
  display: inline-block; vertical-align: middle; margin-left: 4px;
  font: 600 10px var(--font-ui); letter-spacing: 0.05em;
  background: var(--wine); color: var(--cream); border-radius: 10px; padding: 1px 7px;
}
.wz-row.leader { box-shadow: inset 4px 0 0 var(--wine); }
.wz-row.bad { border-color: var(--wz-bad); }
/* On short phones make the steppers a little smaller so 6 rows fit. */
@media (max-height: 700px) {
  .wz-step button { width: 38px; height: 36px; font-size: 22px; }
  .wz-row { min-height: 48px; }
  .wz-strip { padding: 5px 12px; }
}

/* ---- overlay sheets (table, settings, guide) -------------------------- */
/* The layer starts below the header (its height is measured by app.js and
   published as --wz-head-h) so the nav boxes stay visible and clickable.
   pointer-events: none lets taps pass through when no sheet is open. */
#wz-layer {
  position: fixed; left: 0; right: 0; bottom: 0; top: var(--wz-head-h, 64px);
  z-index: 20; pointer-events: none;
}
.wz-sheet {
  position: absolute; inset: 0; pointer-events: auto;
  display: flex; flex-direction: column;
  background: var(--cream);
}
.wz-sheet-head {
  flex: 0 0 auto; background: var(--paper); color: var(--wine);
  border-bottom: 1px solid var(--navy); padding: 8px 12px;
}
.wz-sheet-head > div { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.wz-sheet-head h2 { flex: 1; margin: 0; font: 500 22px var(--font-display); }
.wz-sheet-head label { font-size: 12px; color: var(--navy); display: flex; align-items: center; gap: 6px; }
.wz-sheet-body {
  flex: 1 1 auto; min-height: 0; overflow: auto;
  width: 100%; max-width: 560px; margin: 0 auto; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
/* Wider sheet for the score table on desktop so 6 columns breathe. */
.wz-sheet.table .wz-sheet-body { max-width: 760px; padding-top: 0; }

/* confirm box: a small centred card over a dimmed backdrop */
.wz-modal { position: fixed; inset: 0; z-index: 30; background: rgba(60, 0, 8, 0.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.wz-modal[hidden] { display: none; }   /* [hidden] must beat display:flex above (known site bug) */
.wz-modal .wz-panel { width: 100%; max-width: 360px; }
.wz-modal p { margin: 0 0 14px; font-size: 15px; }
.wz-modal .wz-seg button { height: 46px; }

/* ---- full score table --------------------------------------------------- */
.wz-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; text-align: center; background: var(--paper); }
.wz-table th, .wz-table td { border-right: 1px solid var(--cream-dim); border-bottom: 1px solid var(--cream-dim); padding: 3px 2px; height: 28px; }
.wz-table th:first-child, .wz-table td:first-child { border-left: 1px solid var(--cream-dim); }
.wz-table thead th {
  position: sticky; top: 0; z-index: 2; background: var(--paper);
  border-top: 1px solid var(--cream-dim); border-bottom: 1px solid var(--navy);
  color: var(--wine); font-size: 12px; font-weight: 600; padding: 8px 2px;
  overflow: hidden; text-overflow: ellipsis; max-width: 90px; white-space: nowrap;
}
.wz-table tfoot td {
  position: sticky; bottom: 0; z-index: 2;
  background: var(--navy); color: var(--cream); font-weight: 600; font-size: 15px; border-color: var(--navy);
}
.wz-table td.rn { width: 44px; background: var(--paper); font-weight: 600; color: var(--wine); }
.wz-table td.rn small { display: block; font-weight: 400; font-size: 9px; color: #666; line-height: 1; }
.wz-table td small { display: block; font-size: 9px; color: #666; line-height: 1.1; font-weight: 400; }
.wz-table td.pos { color: var(--wz-good); font-weight: 600; }
.wz-table td.neg { color: var(--wz-bad); font-weight: 600; }
.wz-table td.dl::after { content: "D"; font-size: 8px; vertical-align: super; color: var(--wine); margin-left: 1px; }
.wz-table tr.cur td { background: #f3e7c9; }
.wz-table tr.future td { color: var(--cream-dim); }
.wz-table .lead { color: var(--cream); }

/* ---- results ------------------------------------------------------------ */
.wz-win { text-align: center; }
.wz-win h2 { margin: 0 0 4px; font: 500 28px var(--font-display); color: var(--wine); }
.wz-win p { margin: 0; font-size: 14px; }
.wz-rank { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--cream-dim); font-size: 16px; }
.wz-rank:last-child { border-bottom: 0; }
.wz-rank .pos { width: 28px; font: 500 22px var(--font-display); color: var(--wine); }
.wz-rank .n { flex: 1; font-weight: 600; }
.wz-rank .t { font: 500 22px var(--font-display); }
.wz-copy { display: flex; gap: 6px; }
.wz-copy input { flex: 1; min-width: 0; height: 40px; padding: 0 10px; font: 400 13px var(--font-ui); color: var(--navy); background: #fff; border: 1px solid var(--navy); border-radius: 8px; }
.wz-copy button { height: 40px; padding: 0 14px; font: 500 14px var(--font-ui); color: var(--navy); background: transparent; border: 1px solid var(--navy); border-radius: 8px; cursor: pointer; }

/* small toast for "could not save" style messages */
.wz-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; background: var(--wine); color: var(--cream); padding: 10px 16px; border-radius: 8px; font-size: 13px; max-width: 90vw; }
.wz-toast[hidden] { display: none; }

/* On a big desktop screen keep the controls comfortably sized. */
@media (min-width: 900px) {
  .wz-row { max-height: 76px; }
}


/* ---- quick-start guide --------------------------------------------------- */
/* Four big reminder tiles first (2 x 2), then the 4 steps of a round. */
.wz-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 0 0 auto; }
.wz-tile { background: var(--paper); border: 1px solid var(--navy); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.wz-tile span { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wine); }
.wz-tile b { font: 500 19px/1.2 var(--font-display); }
.wz-tile small { font-size: 12px; line-height: 1.3; color: #555; }
.wz-tile.good { border-color: var(--wz-good); }
.wz-tile.good b { color: var(--wz-good); }
.wz-tile.bad { border-color: var(--wz-bad); }
.wz-tile.bad b { color: var(--wz-bad); }
.wz-tile.muted { opacity: 0.6; }
.wz-h3 { margin: 6px 0 0; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wine); }
.wz-steps { margin: 0; padding: 0; list-style: none; counter-reset: wzstep; display: flex; flex-direction: column; gap: 6px; }
.wz-steps li {
  counter-increment: wzstep; position: relative;
  background: var(--paper); border: 1px solid var(--navy); border-radius: 12px;
  padding: 8px 12px 8px 44px; font-size: 14px; line-height: 1.4;
}
.wz-steps li::before {
  content: counter(wzstep); position: absolute; left: 10px; top: 8px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: var(--cream);
  display: flex; align-items: center; justify-content: center; font: 600 13px var(--font-ui);
}
.wz-guide-app { margin: 0; font-size: 12px; line-height: 1.45; color: var(--wine); }
.wz-guide-app em { font-style: normal; font-weight: 600; }

/* ---- TV / projector display (?g=ID&tv=1) -------------------------------- */
/* Mirrors the Playoff Bracket's TV mode: dark navy, cream text, sizes in a
   screen-relative unit (--u) so it scales from a phone to a 4K TV.
   --u is ~1% of the width, but never so big that it overflows a short
   screen (1.7778vh = 1% of the width of a 16:9 screen of that height). */
body.wz.wz-tvmode { background: #0d1530; color: var(--cream); }
.wz-tvmode .wz-head, .wz-tvmode #wz-layer { display: none; }
.wz-tvmode .wz-main { max-width: none; padding: 0; overflow: hidden; gap: 0; }
.wz-tv { --u: min(1vw, 1.7778vh); height: 100%; padding: calc(var(--u) * 2) calc(var(--u) * 3); display: flex; flex-direction: column; min-height: 0; }
/* Portrait layout is now CHOSEN (the flip button / ?o=p adds the .port class),
   not guessed from the screen shape: landscape (16:9, 1080p style) is the default
   everywhere. --u is capped by the height too so a wide screen can't overflow. */
.wz-tv.port { --u: min(2.2vw, 1.1vh); }
.wz-tv h1 { margin: 0; font: italic 600 calc(var(--u) * 3.6) var(--font-display); color: var(--cream); line-height: 1.1; }
.wz-tv h1 span { color: var(--cream-dim); font-weight: 400; }
.wz-tv h2 { margin: 0 0 calc(var(--u) * 0.8); font: 600 calc(var(--u) * 1.2) var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-dim); }
.wz-tv-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: calc(var(--u) * 1.4); flex: 0 0 auto; }
.wz-tv-top p { margin: calc(var(--u) * 0.3) 0 0; font-size: calc(var(--u) * 1.6); color: var(--cream-dim); }
.wz-tv-phase { text-align: right; }
.wz-tv-phase span { display: inline-block; font: 600 calc(var(--u) * 1.6) var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: #0d1530; background: var(--cream); border-radius: calc(var(--u) * 0.6); padding: calc(var(--u) * 0.3) calc(var(--u) * 1.2); }
.wz-tv-phase small { display: block; margin-top: calc(var(--u) * 0.5); font-size: calc(var(--u) * 1.6); color: var(--cream-dim); }
.wz-tv-phase b { color: var(--cream); font-weight: 600; }
.wz-tv-cols { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: 5fr 7fr; gap: calc(var(--u) * 3); }
.wz-tv.port .wz-tv-cols { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: calc(var(--u) * 1.5); }
/* small flip button, bottom-right corner; faint so it doesn't distract on a TV */
.wz-tv-flip {
  position: fixed; right: 10px; bottom: 10px; z-index: 5; opacity: 0.45; cursor: pointer;
  font: 500 12px/1 var(--font-ui); color: var(--cream); background: rgba(13, 21, 48, 0.85);
  border: 1px solid var(--cream-dim); border-radius: 8px; padding: 7px 10px;
}
.wz-tv-flip:hover, .wz-tv-flip:focus-visible { opacity: 1; }
.wz-tv-board, .wz-tv-tab { min-height: 0; min-width: 0; }
/* The table's box is a "size container": its height no longer depends on the
   table inside it, so the table's font can be sized as a share of THAT height
   (cqh = 1% of the container's height). This is what stops the Total row being
   clipped on short phone-portrait screens. */
.wz-tv-tab { container-type: size; overflow: hidden; display: flex; flex-direction: column; }
/* sub.css has `section + section { margin-top: 48px }`, which pushed the table's
   box (and its label) below the scoreboard's. Cancel it so both labels line up. */
.wz-tv-board, .wz-tv-tab { margin: 0; }
/* let the table stretch to the bottom of its box: spare height is shared by the rows */
.wz-tv-tab .wz-table { flex: 1 1 auto; min-height: 0; }
.wz-tv-board { display: flex; flex-direction: column; gap: calc(var(--u) * 0.7); }
.wz-tv-p {
  display: grid; grid-template-columns: calc(var(--u) * 3) 1fr auto calc(var(--u) * 7);
  align-items: center; gap: calc(var(--u) * 1); min-height: 0;
  flex: 1 1 0; max-height: calc(var(--u) * 14);   /* cards share the spare height, up to a cap */
  background: rgba(232, 214, 182, 0.08); border: 1px solid rgba(232, 214, 182, 0.25);
  border-radius: calc(var(--u) * 1); padding: calc(var(--u) * 0.9) calc(var(--u) * 1.4);
}
.wz-tv-p.lead { border-color: #f1d98a; background: rgba(241, 217, 138, 0.12); }
.wz-tv-p .rk { font: 500 calc(var(--u) * 2.6) var(--font-display); color: var(--cream-dim); }
.wz-tv-p.lead .rk { color: #f1d98a; }
.wz-tv-p .nm { font-size: calc(var(--u) * 2.6); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-tv-p .nm em { font: 600 calc(var(--u) * 1) var(--font-ui); letter-spacing: 0.08em; color: #0d1530; background: var(--cream); border-radius: calc(var(--u) * 0.8); padding: calc(var(--u) * 0.15) calc(var(--u) * 0.7); vertical-align: middle; margin-left: calc(var(--u) * 0.5); }
.wz-tv-p .st { font-size: calc(var(--u) * 1.5); color: var(--cream-dim); white-space: nowrap; }
.wz-tv-p .st b { color: var(--cream); font-weight: 600; }
.wz-tv-p .tot { font: 500 calc(var(--u) * 3.8) var(--font-display); text-align: right; }
/* the score table, recoloured for the dark screen. Font size shrinks as the
   number of rows (--rows = rounds + 2) grows so 20 rounds still fit. */
.wz-tv .wz-table {
  background: transparent; color: var(--cream);
  font-size: min(calc(var(--u) * 1.7), calc(68vh / (var(--rows) * 1.9)));   /* fallback for old browsers */
  font-size: min(calc(var(--u) * 1.7), calc(100cqh / (var(--rows) * 2.5)));  /* preferred: fit the box */
}
.wz-tv .wz-table th, .wz-tv .wz-table td { height: auto; padding: 0.25em 0.3em; border-color: rgba(232, 214, 182, 0.22); }
.wz-tv .wz-table thead th { position: static; background: rgba(232, 214, 182, 0.12); color: var(--cream); font-size: 1em; padding: 0.4em 0.3em; max-width: none; border-top-color: rgba(232, 214, 182, 0.22); border-bottom-color: rgba(232, 214, 182, 0.4); }
.wz-tv .wz-table td.rn { background: transparent; color: var(--cream-dim); width: 2.6em; }
.wz-tv .wz-table td small { display: inline; margin-left: 0.35em; font-size: 0.62em; color: var(--cream-dim); }
.wz-tv .wz-table td.pos { color: #8fdc9c; }
.wz-tv .wz-table td.neg { color: #ff9c9c; }
.wz-tv .wz-table td.dl::after { color: var(--cream); }
.wz-tv .wz-table tr.cur td { background: rgba(255, 154, 92, 0.16); color: var(--cream); }
.wz-tv .wz-table tr.future td { color: transparent; }
.wz-tv .wz-table tfoot td { position: static; background: var(--cream); color: #0d1530; font-size: 1.1em; border-color: var(--cream); }
.wz-tv-champ { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.wz-tv-champ span { font-size: calc(var(--u) * 1.8); letter-spacing: 0.2em; text-transform: uppercase; color: #f1d98a; }
.wz-tv-champ b { font: 500 calc(var(--u) * 8) var(--font-display); line-height: 1.1; margin: calc(var(--u) * 1) 0 calc(var(--u) * 2); }
.wz-tv-champ p { font-size: calc(var(--u) * 2); color: var(--cream-dim); margin: 0; }
.wz-tv-champ ol { list-style: none; margin: 0; padding: 0; font-size: calc(var(--u) * 2.2); color: var(--cream-dim); min-width: calc(var(--u) * 30); }
.wz-tv-champ li { display: flex; gap: calc(var(--u) * 1.2); margin: calc(var(--u) * 0.5) 0; }
.wz-tv-champ li i { font: 500 calc(var(--u) * 2.4) var(--font-display); font-style: normal; width: calc(var(--u) * 2.4); text-align: right; }
.wz-tv-champ li span { flex: 1; font-size: inherit; letter-spacing: 0; text-transform: none; color: var(--cream); text-align: left; }
.wz-tv-champ li b { font: 500 calc(var(--u) * 2.4) var(--font-display); margin: 0; color: var(--cream); }
