:root {
  color-scheme: dark;  /* native dropdowns, pickers and scrollbars dark too */
  --bg: #16181d;
  --panel: #1f232b;
  --panel-2: #262b35;
  --text: #e8e6e1;
  --muted: #9aa0ab;
  --accent: #d8a34a;
  --on-accent: #1c1609;  /* text on an accent fill */
  --good: #6fbf73;
  --bad: #e07a6a;
  --board-frame: #3a2d20;
  --board-felt: #204036;
  --pt-dark: #7a4a2b;
  --pt-light: #c8a06a;
  --us: #f2ede2;
  --them: #35302b;
  /* the rest of the board palette; theme.js overrides all of these */
  --board-accent: #d8a34a;
  --board-tray: #2b2118;
  --board-label: #c9b89a;
  --board-label-sub: #9c8f78;
  --board-divider: #6a5a48;
  --board-felt-text: #efe6d0;
  --us-stroke: #b8b0a0;
  --us-text: #333;
  --them-stroke: #6a625a;
  --them-text: #eee;
  --dice-stroke: #6a625a;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; } /* board width mustn't jump when the scrollbar appears */
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, "Segoe UI", sans-serif;
}
h1 { font-size: 20px; margin: 0 16px 0 0; color: var(--accent); }
h2 { font-size: 14px; margin: 0 0 10px; text-transform: uppercase;
     letter-spacing: .08em; color: var(--muted); }
h3 { font-size: 14px; margin: 0 0 8px; }
button {
  background: var(--panel-2); color: var(--text); border: 1px solid #3a4150;
  border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 13px;
}
button:hover { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
select, input[type=number], input[type=text], input[type=date], #import-text {
  background: var(--panel-2); color: var(--text); border: 1px solid #3a4150;
  border-radius: 6px; padding: 4px 8px; font-size: 13px;
}
code { font-family: ui-monospace, Menlo, Consolas, monospace; }

header {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 18px; background: var(--panel); border-bottom: 1px solid #2c313c;
}
header a.nav {
  color: var(--muted); text-decoration: none; font-size: 13px;
  border: 1px solid #3a4150; border-radius: 6px; padding: 4px 12px;
}
header a.nav:hover { border-color: var(--accent); color: var(--accent); }
header a.nav.here { color: var(--text); border-color: #59627a; }
header .nav-menu a.here { color: var(--accent); }
/* "drills ▾": a header link group that opens on hover or focus (a tap
   focuses it on touch screens) */
header .nav-group { position: relative; outline: none; }
header .nav-group > .nav {
  display: inline-block; color: var(--muted); font-size: 13px; cursor: default;
  border: 1px solid #3a4150; border-radius: 6px; padding: 4px 12px;
}
header .nav-group:hover > .nav, header .nav-group:focus-within > .nav {
  border-color: var(--accent); color: var(--accent);
}
header .nav-menu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 70; padding-top: 4px;
  flex-direction: column; min-width: 130px;
}
header .nav-group:hover .nav-menu, header .nav-group:focus-within .nav-menu { display: flex; }
header .nav-menu a {
  color: var(--muted); text-decoration: none; font-size: 13px; padding: 6px 12px;
  background: var(--panel); border: 1px solid #3a4150; border-top-width: 0;
}
header .nav-menu a:first-child { border-top-width: 1px; border-radius: 6px 6px 0 0; }
header .nav-menu a:last-child { border-radius: 0 0 6px 6px; }
header .nav-menu a:hover { color: var(--accent); background: var(--panel-2); }
.posid-box { display: flex; align-items: center; gap: 8px; }
.posid-box .label { color: var(--muted); font-size: 12px; }
#posid { background: var(--panel-2); padding: 4px 10px; border-radius: 6px; }
.import-box { display: flex; gap: 6px; margin-left: auto; }
#import-text { width: 340px; }

main { display: flex; gap: 18px; padding: 18px; align-items: flex-start; }
#board-col { flex: 1 1 640px; min-width: 480px; }
#board { width: 100%; height: auto; display: block; border-radius: 10px; touch-action: none; }
#board circle[data-owner] { cursor: grab; }
#board .sel { stroke: var(--board-accent); stroke-width: 3; }
.board-buttons { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.board-buttons .hint { color: var(--muted); font-size: 12px; }
.board-buttons .btn-sep { width: 1px; height: 22px; background: #3a4150; }
.board-buttons button.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

#panel { flex: 0 0 320px; display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--panel); border: 1px solid #2c313c; border-radius: 10px; padding: 14px; }

#eval-status { color: var(--accent); font-size: 11px; text-transform: none; letter-spacing: 0; }

.prob-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.prob-row { display: grid; grid-template-columns: 88px 1fr 52px; gap: 8px; align-items: center; font-size: 13px; }
.prob-row .name { color: var(--muted); }
.prob-row .val { text-align: right; font-variant-numeric: tabular-nums; }
.prob-bar { height: 8px; border-radius: 4px; background: #303743; overflow: hidden; }
.prob-bar i { display: block; height: 100%; background: var(--accent); }
.prob-row.sub .prob-bar i { background: #7a8494; }

.equity-lines, .cube-action { border-top: 1px solid #2c313c; padding-top: 10px; margin-top: 10px; }
.eqline { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; }
.eqline span { color: var(--muted); }
.eqline b { font-variant-numeric: tabular-nums; }
.eqline.cube-value b { color: var(--accent); }
.eqline .eq-err { display: inline-block; width: 9ch; text-align: right; color: var(--muted); font-weight: 400; }
.eqline.cube-value span { color: var(--accent); }
.cs-btn { font-size: 11px; padding: 0 6px; margin-left: 6px; color: var(--muted); }
.cs-btn:hover { border-color: var(--accent); color: var(--accent); }

/* cube value per player (cubesplit.js): popover off the Cube value line */
.cs-pop {
  position: fixed; z-index: 60; background: var(--panel); border: 1px solid #3a4150;
  border-radius: 10px; padding: 10px 12px; width: 330px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.cs-pop[hidden] { display: none; }
.cs-pop h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cs-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; background: none;
  border-radius: 0; }
.cs-table th, .cs-table td { background: none; border-top: 0; font-size: 13px; }
.cs-table th { text-align: left; font-weight: 400; color: var(--muted); padding: 2px 0; }
.cs-table thead th { text-align: right; font-size: 11px; text-transform: uppercase; }
.cs-table td { text-align: right; padding: 2px 0 2px 10px; }
.cs-table tr.cs-main th, .cs-table tr.cs-main td { color: var(--accent); font-weight: 700;
  border-top: 1px solid #2c313c; padding-top: 4px; }
.cs-net { margin-top: 6px; color: var(--muted); }
.cs-net b { color: var(--text); }
.cs-eqs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; margin-top: 8px; padding-top: 6px;
  border-top: 1px solid #2c313c; color: var(--muted); font-size: 12px; }
.cs-eqs b { float: right; font-variant-numeric: tabular-nums; font-weight: 400; color: inherit; }
.cs-owned { margin-bottom: 6px; }
.cs-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.cs-loading { color: var(--muted); padding: 6px 0; }
.cs-why { cursor: help; }
.cs-whyline { color: var(--muted); font-size: 11px; margin-top: 4px; }
.reco { margin-top: 8px; padding: 6px 10px; border-radius: 6px; background: var(--panel-2);
        font-weight: 600; text-align: center; }

.setting { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.setting > label { width: 60px; color: var(--muted); }
.setting label.inline { width: auto; color: var(--muted); margin-left: 8px; }
.setting input[type=number] { width: 56px; }

#xg-kind { color: var(--accent); font-size: 11px; text-transform: none; letter-spacing: 0; }
.xg-players { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.xg-source { color: var(--muted); font-size: 11px; margin-top: 8px; }
.xg-engine { color: var(--muted); font-size: 11px; margin-top: 6px; text-align: center; }
/* analysis level badges (engineLevel): XG blue, gnubg violet; the weak
   levels (XG 1-2 ply) only outlined */
.lvl { display: inline-block; min-width: 22px; padding: 0 4px; border-radius: 4px;
  font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
  border: 1px solid var(--lvl-c); background: var(--lvl-c); color: #10141b;
  letter-spacing: -0.02em; vertical-align: 1px; cursor: help; }
.lvl-xg { --lvl-c: #5b93e0; }
.lvl-gnubg { --lvl-c: #b285e6; }
.lvl-weak { background: transparent; color: var(--lvl-c); }
.xg-moves td.lvl-cell { padding-right: 0; width: 1%; }
.xg-chances { display: none; }
.xg-moves th, .xg-moves td { padding-left: 8px; padding-right: 8px; }
.xg-moves td.xg-play { white-space: nowrap; }
#xg-body table { width: 100%; }
#xg-body th, #xg-body td { padding: 4px 8px; font-size: 12px; }

.lib-kind-row { display: flex; align-items: center; gap: 8px; }
.lib-kind-dice { color: var(--muted); font-size: 12px; }
.lib-meta .kind { border-radius: 4px; padding: 0 5px; font-weight: 600; white-space: nowrap; }
.lib-meta .kind.checker { background: #2e4638; color: var(--good); }
.lib-meta .kind.cube { background: #4a3a26; color: var(--accent); }

.lib-save { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.lib-save input, .lib-save textarea, #lib-filter {
  background: var(--panel-2); color: var(--text); border: 1px solid #3a4150;
  border-radius: 6px; padding: 4px 8px; font-size: 13px; width: 100%;
  font-family: inherit;
}
#lib-filter { margin-bottom: 8px; }
.lib-kind-filter { display: flex; gap: 6px; margin-bottom: 8px; }
.lib-kind-filter .kf { padding: 2px 10px; font-size: 12px; border-radius: 999px; }
/* a picked chip / tab / toggle is filled in gold, the same across the app */
.kf.active, .lib-kind-filter .kf.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.kf.active:hover { filter: brightness(1.08); }
.kind-picker { margin-bottom: 0; }
#lib-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; }
.lib-item {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  border-radius: 6px; cursor: pointer;
}
.lib-item:hover { background: var(--panel-2); }
.lib-main { flex: 1; min-width: 0; }
.lib-name { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-meta { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); }
.lib-meta i { font-style: normal; }
.lib-meta .tag { background: var(--panel-2); border-radius: 4px; padding: 0 5px; }
.lib-meta .eq { color: var(--accent); font-variant-numeric: tabular-nums; }
.lib-del {
  border: none; background: none; color: var(--muted); font-size: 15px;
  padding: 2px 6px; line-height: 1;
}
.lib-del:hover { color: var(--bad); border: none; }
.lib-empty { color: var(--muted); font-size: 12px; padding: 4px 8px; }
#lib-status { color: var(--accent); font-size: 11px; letter-spacing: 0; }

#scores-section { padding: 0 18px 18px; max-width: 760px; }
.sg-compute { margin-left: auto; }
.sg-compute.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
table { border-collapse: collapse; background: var(--panel); border-radius: 10px; overflow: hidden; }
th, td { padding: 6px 14px; text-align: left; font-size: 13px; }
th { background: var(--panel-2); color: var(--muted); font-weight: 600; }
td { border-top: 1px solid #2c313c; font-variant-numeric: tabular-nums; }
td.eq-pos { color: var(--good); }
td.eq-neg { color: var(--bad); }
/* a candidate's equity takes its row's colour (by its cost), not green /
   red by sign: a close alternative is plain like the best */
.xg-moves td.eq-pos, .xg-moves td.eq-neg { color: inherit; }
td.roll { font-weight: 700; }

#toast {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  background: #5a2d28; color: #ffd9d2; border: 1px solid #8a4a42;
  padding: 8px 16px; border-radius: 8px; z-index: 10; font-size: 14px;
}

svg text { user-select: none; }

/* ---------- match pane (score / names beside a board) ---------- */

.board-row { display: flex; gap: 14px; align-items: stretch; }
.board-row > svg { flex: 1 1 auto; min-width: 0; height: auto; }
.match-pane {
  flex: 0 0 110px; display: flex; flex-direction: column;
  justify-content: space-between; align-items: center; padding: 10px 0;
}
.mp-center { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mp-name {
  font-size: 13px; max-width: 106px; display: flex; align-items: center; gap: 6px;
}
.mp-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-disc { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; }
.mp-disc.mp-us { background: var(--us); border: 1px solid var(--us-stroke); }
.mp-disc.mp-them { background: var(--them); border: 1px solid var(--them-stroke); }
.mp-score {
  width: 46px; height: 46px; background: #fff; color: #111;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.mp-mid { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.mp-len { color: var(--muted); font-size: 12px; }
.mp-tag {
  background: #4a3a26; color: var(--accent); border-radius: 999px;
  padding: 1px 8px; font-size: 11px;
}
@media (max-width: 640px) {
  .match-pane { display: none; }
}

/* ---------- library page ---------- */

.lp-title { font-size: 15px; font-weight: 600; }
#lp-count { color: var(--accent); font-size: 12px; }
.lp-controls { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
#lp-q {
  background: var(--panel-2); color: var(--text); border: 1px solid #3a4150;
  border-radius: 6px; padding: 4px 8px; font-size: 13px; width: 240px;
}
.lp-controls .lib-kind-filter { margin-bottom: 0; }

.lp-main { display: flex; gap: 18px; padding: 18px; align-items: flex-start; }
.lp-main[hidden] { display: none; }
#lp-tags { flex: 0 0 190px; display: flex; flex-direction: column; gap: 2px; }
.lp-tag {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.lp-tag:hover { background: var(--panel-2); }
.lp-tag.active { background: var(--panel-2); color: var(--accent); }
.lp-tag b {
  background: var(--panel); border-radius: 999px; padding: 0 7px;
  font-size: 11px; color: var(--muted);
}
.lp-content { flex: 1; min-width: 0; }

#lp-bulk {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  padding: 8px 12px; background: var(--panel); border: 1px solid var(--accent);
  border-radius: 8px; font-size: 13px;
}
button.danger:hover { border-color: var(--bad); color: var(--bad); }

#lp-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.lp-card {
  position: relative; background: var(--panel); border: 1px solid #2c313c;
  border-radius: 10px; padding: 10px; cursor: pointer;
}
.lp-card:hover { border-color: #4a5262; }
.lp-card.selected { outline: 2px solid var(--accent); }
.lp-sel { position: absolute; top: 14px; left: 14px; z-index: 1; width: 16px; height: 16px; }
.lp-thumb { width: 100%; height: auto; display: block; border-radius: 6px; pointer-events: none; }
.lp-thumb-err {
  aspect-ratio: 944 / 720; display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); color: var(--muted); font-size: 32px;
}
.lp-card-name {
  margin: 8px 0 4px; font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lp-card .lib-meta { flex-wrap: wrap; max-height: 38px; overflow: hidden; }

#lp-detail { position: fixed; inset: 0; z-index: 20; }
.lp-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.lp-panel {
  position: relative; display: flex; gap: 18px; margin: 4vh auto;
  max-width: min(1440px, calc(100vw - 40px)); max-height: 92vh; overflow-y: auto;
  background: var(--panel); border: 1px solid #3a4150; border-radius: 12px;
  padding: 18px;
}
.lp-panel-board { flex: 1 1 760px; min-width: 320px; }
#lp-board { width: 100%; height: auto; max-height: calc(92vh - 56px); border-radius: 8px; }
.lp-panel-side { flex: 0 0 320px; display: flex; flex-direction: column; gap: 8px; }
.lp-panel-side input, .lp-panel-side textarea, .lp-panel-side select {
  background: var(--panel-2); color: var(--text); border: 1px solid #3a4150;
  border-radius: 6px; padding: 4px 8px; font-size: 13px; width: 100%;
  font-family: inherit;
}
.lp-field-row { display: flex; align-items: center; gap: 8px; }
.lp-eval { color: var(--muted); font-size: 12px; }
.lp-panel-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.button-link {
  background: var(--panel-2); color: var(--text); border: 1px solid #3a4150;
  border-radius: 6px; padding: 5px 12px; font-size: 13px; text-decoration: none;
}
.button-link:hover { border-color: var(--accent); }
#lp-analysis-card { background: var(--panel-2); }
#lp-analysis-kind { color: var(--accent); font-size: 11px; text-transform: none; letter-spacing: 0; }

.lp-tag-head {
  margin: 10px 10px 2px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
}
.lp-notes-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-left: 6px; vertical-align: middle;
}
.lp-promote {
  border: none; background: none; padding: 0 2px; margin-left: 6px;
  color: var(--muted); font-size: 12px; line-height: 1;
}
.lp-promote:hover { color: var(--accent); border: none; }

#lp-tag-panel {
  margin-bottom: 12px; padding: 12px 14px; background: var(--panel);
  border: 1px solid #2c313c; border-radius: 10px;
}
.lp-tag-panel-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.lp-tag-panel-head h3 { margin: 0; font-size: 15px; color: var(--accent); }
.lp-tag-panel-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.lp-tag-panel-actions button { font-size: 12px; padding: 3px 10px; }
.lp-tag-notes { margin-top: 8px; font-size: 13px; white-space: pre-wrap; }
.lp-tag-notes.muted, .muted { color: var(--muted); }
#lp-tp-editor { margin-top: 8px; }
#lp-tp-textarea {
  width: 100%; background: var(--panel-2); color: var(--text);
  border: 1px solid #3a4150; border-radius: 6px; padding: 6px 8px;
  font-size: 13px; font-family: inherit; margin-bottom: 6px;
}

.tag-suggest {
  position: fixed; z-index: 50; background: var(--panel-2);
  border: 1px solid #3a4150; border-radius: 6px;
  max-height: 180px; overflow-y: auto; font-size: 13px;
}
.tag-suggest-item { padding: 4px 10px; cursor: pointer; }
.tag-suggest-item:hover, .tag-suggest-item.active { background: #2e3644; color: var(--accent); }

/* board colour picker (theme.js): header button + popover */
header .theme-btn { font-size: 13px; padding: 4px 12px; }
header .theme-btn-end { margin-left: auto; }
header .theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-pop {
  position: fixed; z-index: 60; background: var(--panel); border: 1px solid #3a4150;
  border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 2px;
  min-width: 220px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.theme-pop[hidden] { display: none; }
.theme-row {
  display: flex; align-items: center; gap: 10px; text-align: left; font-size: 13px;
  background: none; border: 1px solid transparent; padding: 5px 8px;
}
.theme-row:hover { background: var(--panel-2); }
.theme-row.active { border-color: var(--accent); color: var(--accent); }
.theme-bearin { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 4px 8px 8px; margin-bottom: 4px; border-bottom: 1px solid #2c313c; font-size: 13px; }
.theme-bearin .kf { font-size: 12px; padding: 2px 12px; }
.theme-flip[hidden] { display: none; }
.theme-bearin:has(+ .theme-flip:not([hidden])) { border-bottom: none; margin-bottom: 0; padding-bottom: 4px; }
.theme-swatch { display: inline-flex; border-radius: 4px; overflow: hidden; border: 1px solid #3a4150; }
.theme-swatch i { display: block; width: 12px; height: 16px; }
.theme-custom { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 8px 8px 4px;
  border-top: 1px solid #2c313c; margin-top: 4px; font-size: 12px; color: var(--muted); }
.theme-custom[hidden] { display: none; }
.theme-custom label { display: contents; }
.theme-custom input[type=color] { width: 44px; height: 24px; padding: 0; border: 1px solid #3a4150;
  border-radius: 4px; background: var(--panel-2); cursor: pointer; }
.theme-custom .theme-reset { grid-column: 1 / -1; justify-self: start; margin-top: 4px; font-size: 12px; }

@media (max-width: 900px) {
  .lp-panel { flex-direction: column; margin: 3vh 12px; }
  .lp-panel-side { flex: 1; }
  #lp-tags { flex-basis: 140px; }
}

/* ---------- quiz page ---------- */

.qz-filters { color: var(--muted); font-size: 13px; }
.qz-score { color: var(--accent); font-weight: 700; font-size: 14px; margin-left: auto; }

/* the quiz main is a single centered column — undo the editor's flex layout,
   which would otherwise size sections (and the board) from their content */
#qz-main { display: block; max-width: 1480px; margin: 0 auto; padding: 18px; }
#qz-summary { max-width: 760px; margin-left: auto; margin-right: auto; }
/* board on the left, feedback in a fixed column on the right (reserved
   before answering so the board doesn't jump); stacked on narrow screens */
#qz-play { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 18px; align-items: start; }
#qz-play[hidden] { display: none; }
.qz-col-side { position: sticky; top: 12px; }
#qz-waiting { font-size: 13px; text-align: center; padding: 40px 12px; border: 1px dashed var(--panel-2); border-radius: 10px; }
@media (max-width: 1100px) {
  #qz-play { grid-template-columns: minmax(0, 1fr); }
  .qz-col-side { position: static; }
  #qz-waiting { display: none; }
}
#qz-class { font-size: 13px; }
#qz-class .qz-gt { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
#qz-class table { width: 100%; border-collapse: collapse; }
#qz-class th, #qz-class td { text-align: left; padding: 2px 6px 2px 0; font-weight: 400; }
#qz-class th { color: var(--muted); }
#qz-class .hit { color: var(--accent); font-weight: 600; }
#qz-class .qz-gt-rules { color: var(--muted); font-size: 12px; margin-top: 6px; }
#qz-context-bar {
  display: flex; gap: 10px; align-items: center; justify-content: center;
  flex-wrap: wrap; margin-bottom: 10px;
}
#qz-context { color: var(--muted); font-size: 13px; text-align: center; }
#qz-copy, #qz-rolls, #qz-end { font-size: 12px; padding: 2px 8px; }
#qz-star { padding: 0 8px; font-size: 17px; line-height: 22px; color: var(--muted); }
#qz-star.on { color: var(--accent); }
#qz-filters a { color: var(--accent); text-decoration: none; }
#qz-filters a:hover { text-decoration: underline; }
#qz-star[hidden] { display: none; }
#qz-board { width: 100%; height: auto; display: block; border-radius: 10px; touch-action: none; }
#qz-question { font-size: 16px; font-weight: 600; text-align: center; margin: 14px 0 10px; }

/* checker input (checkerinput.js): cursors while a play is being
   entered, and the reachable-square hover marks */
svg.ci-on.ci-drag circle[data-owner="us"] { cursor: grab; }
svg.ci-on.ci-click circle[data-owner="us"] { cursor: pointer; }
svg.ci-on.ci-click g[data-dice] { cursor: pointer; }
svg.ci-on.ci-live.ci-has-sel [data-point] { cursor: pointer; }
svg.ci-on.ci-live.ci-has-sel circle[data-owner="us"] { cursor: grab; }
svg g[data-point].ci-drop polygon { stroke: var(--board-accent); stroke-width: 3; opacity: 1; }
svg rect[data-point="off"].ci-drop { stroke: var(--board-accent); stroke-width: 3; }
svg g[data-point].ci-drop-soft polygon {
  stroke: var(--board-accent); stroke-width: 1.5; stroke-dasharray: 4 3; opacity: 0.9;
}
svg rect[data-point="off"].ci-drop-soft {
  stroke: var(--board-accent); stroke-width: 1.5; stroke-dasharray: 4 3;
}
/* subtle hover mode: number labels become dashes (strong = the square a
   click plays, in accent amber; soft = other reaches, bright warm white) */
svg text.ci-dash, svg text.ci-dash-off {
  font-weight: 800; font-size: 16px; fill: var(--board-felt-text);
}
svg text.ci-dash-strong { fill: var(--board-accent); font-size: 18px; }

#qz-movebar {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  flex-wrap: wrap; margin: 0 0 10px;
}
#qz-movebar[hidden] { display: none; }
#qz-play-line { min-width: 140px; text-align: center; font-weight: 600; font-size: 14px; }
#qz-play-line.muted { font-weight: 400; }

#qz-showbest { display: block; margin: 0 auto 12px; font-size: 13px; }
#qz-showbest[hidden] { display: none; }
/* the best play in plain text: green is the error colour (sev-error) */
.qz-row-best td { font-weight: 600; }
.qz-row-picked td { background: #2e3644; }

#qz-choices { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.qz-choice { font-size: 15px; padding: 8px 18px; }
.qz-choice.right { border-color: var(--good); color: var(--good); opacity: 1; }
.qz-choice.wrong { border-color: var(--bad); color: var(--bad); opacity: 1; }

#qz-reveal { margin-top: 0; }
#qz-reveal .card { margin-bottom: 12px; }
.qz-verdict {
  text-align: center; font-size: 16px; font-weight: 700;
  padding: 8px; border-radius: 8px; margin-bottom: 12px;
}
.qz-verdict.good { background: #24382a; color: var(--good); }
.qz-verdict.bad { background: #3f2723; color: var(--bad); }
.qz-verdict.close { background: #26303d; color: #9cc4e8; }  /* within 0.02 of the player's */
.qz-verdict.miss { background: #3a3122; color: #e8a33d; }   /* the same play, and not the best */
#qz-posinfo { margin: 12px 0; font-size: 13px; }
#qz-posinfo .tag { background: var(--panel-2); border-radius: 4px; padding: 0 5px; font-style: normal; font-size: 11px; }
#qz-posinfo a { color: var(--accent); }
.qz-notes { white-space: pre-wrap; font-size: 15px; line-height: 1.5; }
#qz-next { display: block; margin: 14px auto 0; font-size: 15px; padding: 8px 28px; }
#qz-next[hidden] { display: none; }
.qz-notes-sec + .qz-notes-sec { margin-top: 12px; padding-top: 10px; border-top: 1px solid #2c313c; }
.qz-notes-sec[hidden] { display: none; }
.qz-notes-head { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.qz-my-notes { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; font-size: 15px;
  line-height: 1.45; background: var(--panel-2); color: var(--text); border: 1px solid #3a4150;
  border-radius: 6px; padding: 6px 8px; }

#qz-summary h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
.qz-summary-line { font-size: 15px; margin-bottom: 12px; }
#qz-summary table { width: 100%; }
#qz-summary a { color: var(--text); }
tr.qz-missed td { color: var(--bad); }
tr.qz-missed a { color: var(--bad); }
#qz-summary .lp-panel-buttons { margin-top: 14px; }

/* the match-decisions deck setup (mix of blunders / errors / right) */
#qz-setup { max-width: 620px; margin: 24px auto; }
#qz-setup[hidden] { display: none; }
.qz-setup-counts { font-size: 14px; margin-bottom: 14px; }
.qz-setup-counts b { color: var(--text); }
.qz-setup-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; font-size: 13px; }
.qz-setup-label { width: 48px; color: var(--muted); }
.qz-setup-row[hidden] { display: none; }
#qz-setup-presets, #qz-setup-n { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.qz-setup-row input[type=number] { width: 56px; }
.qz-setup-note { font-size: 12px; margin: 4px 0 14px; line-height: 1.5; }

.qz-empty {
  text-align: center; color: var(--muted); font-size: 14px;
  margin-top: 60px; line-height: 1.8;
}

/* ---------- matches page ---------- */

/* the matches page wears a near-black, neutral palette (backgammondb-like) */
body.mt-page {
  --bg: #09090b; --panel: #101013; --panel-2: #18181c; --text: #f4f4f5; --muted: #a1a1aa;
  --line: #232328;
}
body.mt-page header { background: var(--bg); border-bottom-color: var(--line); }
body.mt-page button, body.mt-page select, body.mt-page input[type=date],
body.mt-page input[type=number], body.mt-page header a.nav,
body.mt-page header .nav-group > .nav { border-color: #2e2e34; }

.mt-main { gap: 24px; max-width: 1320px; margin: 0 auto; }
.mt-filterbar { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  padding: 0 4px 14px; border-bottom: 1px solid var(--line, #2c313c); }
.mt-fgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mt-flabel { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-right: 2px; }
.mt-filterbar .mt-chips .kf { padding: 2px 10px; font-size: 12px; border-radius: 999px; }
.mt-filterbar .mt-chips .kf.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.mt-filterbar select { max-width: 220px; }
.mt-filterbar .mt-more { padding: 2px 8px; font-size: 12px; border-radius: 999px; }
.mt-listhead { display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px 6px; font-size: 12px; color: var(--muted); }
.mt-sort { display: flex; align-items: center; gap: 6px; }
.mt-sort select { background: transparent; border: none; color: var(--text); font-weight: 600;
  padding: 2px 0; cursor: pointer; }
.mt-sort select option { background: var(--panel-2); color: var(--text); font-weight: normal; }
.mt-dir { background: none; border: none; color: var(--muted); padding: 0 4px; font-size: 14px; }
.mt-dir:hover { color: var(--text); }

.mt-list { display: flex; flex-direction: column; }
.mt-list .lib-empty { padding: 28px 14px; font-size: 13px; text-align: center; }
.mt-list .lib-empty button { margin-left: 8px; }
.mt-row {
  position: relative; display: grid; grid-template-columns: 64px 1fr 64px; align-items: start;
  padding: 14px 14px 12px; color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--line, #2c313c); border-radius: 0;
}
.mt-row:hover { background: var(--panel); }
.mt-pr { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.mt-pr-2 { text-align: right; }
.mt-pr.me { color: var(--text); }
.mt-row-mid { min-width: 0; }
.mt-row-score { display: grid; grid-template-columns: 1fr auto auto auto 1fr; align-items: center;
  gap: 12px; font-size: 17px; }
.mt-pl { display: flex; align-items: center; gap: 6px; font-weight: 600; min-width: 0;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #d4d4d8; }
.mt-pl.me { color: var(--text); }
.mt-pl-1 { justify-content: flex-end; }
.mt-person { flex: 0 0 14px; width: 14px; height: 14px; fill: none; stroke: var(--muted);
  stroke-width: 1.3; }
.mt-sc { font: 700 17px/1 ui-monospace, Menlo, Consolas, monospace; color: var(--muted);
  min-width: 1.2em; text-align: center; }
.mt-sc.win { color: var(--text); }
.mt-dash { color: #52525b; font-size: 13px; }
.mt-row-sub { margin-top: 6px; text-align: center; font-size: 12px; color: #71717a; }
.mt-row .mt-item-actions { position: absolute; right: 12px; bottom: 9px; display: flex; gap: 6px;
  opacity: 0; transition: opacity .12s; }
.mt-row:hover .mt-item-actions, .mt-row:focus-within .mt-item-actions { opacity: 1; }

.mt-overview {
  flex: 0 0 400px; position: sticky; top: 14px; align-self: flex-start;
  background: var(--panel); border: 1px solid var(--line, #2c313c); border-radius: 10px;
  padding: 16px; display: flex; flex-direction: column; gap: 4px;
}
.mt-overview[hidden] { display: none; }
.mt-ov-head { display: flex; flex-direction: column; margin-bottom: 10px; }
.mt-ov-head b { font-size: 15px; }
.mt-ov-head span { font-size: 12px; color: var(--muted); }
.mt-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.mt-tile { border: 1px solid var(--line, #2c313c); border-radius: 8px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px; }
.mt-tile span { font-size: 12px; color: var(--muted); }
.mt-tile b { font-size: 21px; font-variant-numeric: tabular-nums; }
.mt-ov-section { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 10px 6px 6px; border-bottom: 1px solid var(--line, #2c313c); }
.mt-ov-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 6px;
  font-size: 13px; border-bottom: 1px solid var(--line, #2c313c);
  font-variant-numeric: tabular-nums; }
.mt-ov-line:last-child { border-bottom: none; }
.mt-ov-total { font-weight: 600; }
.mt-row.selected { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.mt-row:focus { outline: none; }
.mt-row:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }

/* the match preview, in the overview's place */
.mt-preview { flex-basis: 460px; gap: 10px; max-height: calc(100vh - 28px); overflow-y: auto; }
.mt-preview[hidden] { display: none; }
.mt-pv-head { display: flex; align-items: flex-start; gap: 10px; }
.mt-pv-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mt-pv-title b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-pv-title span { font-size: 12px; color: var(--muted); }
.mt-pv-open { background: var(--panel-2); border: 1px solid #2e2e34; border-radius: 6px;
  padding: 5px 12px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 13px;
  white-space: nowrap; }
.mt-pv-open:hover { border-color: var(--accent); }
.mt-pv-close { background: none; border: none; color: var(--muted); padding: 4px 6px; }
.mt-pv-close:hover { color: var(--text); }
.mt-pv-boardrow { display: flex; gap: 8px; align-items: stretch; }
.mt-pv-stepper { flex: 0 0 30px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mt-pv-stepper button { padding: 0; width: 28px; height: 26px; line-height: 1; font-size: 15px; }
#mt-pv-step { flex: 1; writing-mode: vertical-lr; width: 22px; margin: 0; accent-color: var(--accent);
  cursor: pointer; }
#mt-pv-board { flex: 1; min-width: 0; width: 100%; height: auto; border-radius: 6px; }
.mt-pv-caption { text-align: center; font-size: 12px; color: var(--muted); display: flex;
  flex-direction: column; gap: 2px; }
.mt-pv-dec { color: var(--text); }
.mt-pv-tabs { display: flex; gap: 6px; margin-top: 4px; }
.mt-pv-tabs .kf { padding: 2px 12px; font-size: 12px; border-radius: 6px; }
.mt-pv-tabs .kf.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.mt-pv-stats, .mt-pv-games { width: 100%; border-collapse: collapse; font-size: 13px;
  font-variant-numeric: tabular-nums; }
.mt-pv-stats th, .mt-pv-stats td, .mt-pv-games th, .mt-pv-games td {
  padding: 6px 6px; border-bottom: 1px solid var(--line, #2c313c); text-align: right; }
.mt-pv-stats th:first-child, .mt-pv-stats td:first-child,
.mt-pv-games th:first-child, .mt-pv-games td:first-child,
.mt-pv-games th:nth-child(2), .mt-pv-games td:nth-child(2) { text-align: left; }
.mt-pv-stats th { font-weight: 600; white-space: nowrap; }
.mt-pv-stats th .mp-disc { display: inline-block; width: 9px; height: 9px; margin-right: 6px;
  vertical-align: 0; }
.mt-pv-stats td:first-child { color: var(--muted); }
.mt-pv-games thead th { background: var(--panel-2); font-weight: 500; color: var(--muted);
  font-size: 12px; }
.mt-pv-games tbody tr { cursor: pointer; }
.mt-pv-games tbody tr:hover td { background: var(--panel-2); }
.mt-pv-games tr.current td { background: rgba(216, 163, 74, .14); }
.mt-pv-delete { align-self: center; margin-top: 8px; background: none; border: none;
  color: var(--bad); font-weight: 600; }
.mt-pv-delete:hover { text-decoration: underline; }

/* XG's PR bands: world champ … casual-or-worse */
.pr-band-0, .pr-band-1 { color: #22c55e; }
.pr-band-2 { color: #4ade80; }
.pr-band-3 { color: #a3e635; }
.pr-band-4 { color: #facc15; }
.pr-band-5 { color: #f87171; }

@media (max-width: 1100px) {
  .mt-main { flex-direction: column; align-items: stretch; }
  .mt-overview { position: static; flex: none; order: -1; max-height: none; }
}
@media (max-width: 640px) {
  .mt-main { padding: 12px 8px; }
  .mt-row { grid-template-columns: 44px 1fr 44px; padding: 12px 6px; }
  .mt-row-score { gap: 6px; font-size: 14px; }
  .mt-person { display: none; }
}
.mt-item {
  display: block; color: inherit; text-decoration: none;
  background: var(--panel); border: 1px solid #2c313c; border-radius: 8px;
  padding: 8px 10px; cursor: pointer;
}
.mt-item:hover { border-color: var(--accent); }
.mt-item-head { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; }
.mt-del { border: none; background: none; color: var(--muted); font-size: 13px;
  padding: 0 2px; }
.mt-del:hover { color: var(--bad); }
.mt-item-actions { display: flex; align-items: baseline; gap: 6px; }
.mt-shadow { font-size: 11px; padding: 0 6px; }
.mt-replace[hidden], #mt-import[hidden], #mt-import-files[hidden], #mt-shadow-open[hidden] { display: none; }

/* import status: a folder's .xg files go up one at a time */
#mt-imp { position: fixed; inset: 0; z-index: 30; }
.mt-imp-panel {
  position: relative; margin: 10vh auto; width: min(620px, calc(100vw - 32px));
  max-height: 80vh; display: flex; flex-direction: column; gap: 10px;
  background: var(--panel); border: 1px solid #3a4150; border-radius: 12px; padding: 18px;
}
.mt-imp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mt-imp-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-imp-head span { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-imp-bar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
#mt-imp-fill { height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.mt-imp-current { color: var(--muted); font-size: 12px; min-height: 1.3em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-imp-tally { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px;
  font-variant-numeric: tabular-nums; }
.mt-imp-tally .bad { color: var(--bad); }
.mt-imp-log { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1 1 auto;
  min-height: 0; border-top: 1px solid #3a4150; font-size: 12px; }
.mt-imp-log:empty { display: none; }
.mt-imp-log li { display: flex; gap: 8px; padding: 4px 2px; border-bottom: 1px solid #2c3240; }
.mt-imp-log .k { flex: 0 0 82px; color: var(--muted); white-space: nowrap; }
.mt-imp-log a { color: var(--text); }
.mt-imp-log a:hover { color: var(--accent); }
.mt-imp-log .k.ok { color: var(--good); }
.mt-imp-log .k.bad { color: var(--bad); }
.mt-imp-log .f { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-imp-actions { display: flex; justify-content: flex-end; gap: 8px; }
.mt-item-sub { color: var(--muted); font-size: 11px; }
.mt-item-stats { color: var(--muted); font-size: 11px; margin-top: 4px;
  font-variant-numeric: tabular-nums; }

/* XG-style severity: neutral <0.02, green error <0.08, red blunder */
.sev-error { color: var(--good); }
.sev-blunder { color: var(--bad); }
tr.sev-error td { color: var(--good); }
tr.sev-blunder td { color: var(--bad); }

.mt-neg { color: var(--bad); }
tr.mt-played td { background: #2a3040; }
.xg-rank { font-size: 10px; color: var(--muted); font-weight: 400; }
/* a pass-capped play (docs/capped.md) and its no-double equity */
.cap-badge { font-size: 10px; color: var(--accent); border: 1px solid currentColor; border-radius: 3px;
  padding: 0 3px; margin-left: 3px; font-weight: 400; vertical-align: 1px; cursor: help; }
.cap-nd { font-size: 10px; color: var(--muted); font-weight: 400; }
#mt-danalysis tr[data-move] { cursor: pointer; }
.plays-lockable tr[data-move] { cursor: pointer; }
tr.play-locked td { box-shadow: inset 0 1px 0 var(--accent), inset 0 -1px 0 var(--accent); }
tr.play-locked td:first-child { box-shadow: inset 2px 0 0 var(--accent), inset 0 1px 0 var(--accent), inset 0 -1px 0 var(--accent); }
/* the right edge on the last cell shown (the review's table hides the
   columns after Δ, bar the shots column) */
tr.play-locked td:last-child,
.rv-analysis tr.play-locked:not(:has(td.xg-shots)) td:nth-child(4),
.rv-analysis tr.play-locked td.xg-shots { box-shadow: inset -2px 0 0 var(--accent), inset 0 1px 0 var(--accent), inset 0 -1px 0 var(--accent); }
/* a shadow run's choices among the candidates: yours in your arrow blue */
tr.qz-row-picked td { background: rgba(90, 169, 230, 0.16); }
tr.qz-row-picked td:first-child { box-shadow: inset 3px 0 0 #5aa9e6; }
tr.mt-played.qz-row-picked td { background: rgba(90, 169, 230, 0.22); }
.row-tag { font-size: 10px; font-weight: 600; padding: 0 5px; border-radius: 3px;
  vertical-align: 1px; white-space: nowrap; }
.row-tag-you { background: #5aa9e6; color: #10161e; }
.row-tag-them { background: #4a5468; color: #e6e9ef; }

/* candidate-play rows preview their play on the board while hovered */
.xg-moves tbody tr[data-move]:hover td { background: var(--panel-2); }
.bg-arrows { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)); }

.mt-errfilters { display: flex; gap: 12px; align-items: center; margin-bottom: 8px;
  color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.mt-errfilters + .mt-errfilters { margin-bottom: 10px; }
.mt-pips { white-space: nowrap; }
.mt-bar { font-style: normal; color: var(--accent); font-size: 11px; }
.mt-replace { display: flex; gap: 4px; align-items: center; font-size: 12px;
  color: var(--muted); white-space: nowrap; }
.mt-errtable { width: 100%; }
.mt-errempty td { text-align: center; color: var(--muted); padding: 28px 12px; }
.mt-errempty button { margin-left: 8px; }
.mt-errtable tbody tr { cursor: pointer; }
.mt-errtable tbody tr:hover td { background: var(--panel-2); }
.mt-copy { font-size: 11px; padding: 1px 8px; color: var(--muted); }

/* ---------- match review (/matches/<id>) ---------- */
body.embedded > header { display: none; }
body.embedded .rv-logcol { height: calc(100vh - 28px); }
#rv-main { display: flex; gap: 16px; padding: 14px 18px; align-items: flex-start; }
/* left column, two rows: the game log on top, the move / summary pane below */
.rv-logcol { flex: 0 0 430px; width: 430px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 10px; height: calc(100vh - 86px); }
/* the review viewer (reviewviewer.js), in review and Shadow's look-back */
.rv-logbox { flex: 1 1 60%; min-height: 120px; display: flex; flex-direction: column; gap: 6px; }
/* what the stepper visits: saved preset pills over the log, edited in a dialog */
.rv-filters { display: flex; align-items: center; gap: 6px; }
.rv-pills { flex: 1 1 auto; min-width: 0; display: flex; gap: 2px; padding: 3px;
  background: var(--bg); border: 1px solid #2c313c; border-radius: 999px;
  overflow-x: auto; scrollbar-width: none; }
.rv-pills::-webkit-scrollbar { display: none; }
.rv-pill { flex: 0 0 auto; border: 0; background: transparent; color: var(--muted);
  padding: 4px 12px; border-radius: 999px; font-size: 12.5px; white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s; }
.rv-pill:hover { color: var(--text); background: var(--panel-2); }
.rv-pill.on { background: var(--accent); color: var(--on-accent); font-weight: 600;
  box-shadow: 0 1px 6px rgba(216, 163, 74, .35); }
.rv-pill.custom.on { background: transparent; color: var(--accent); font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--accent); }
.rv-fedit { flex: 0 0 auto; width: 32px; height: 32px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted); background: var(--bg); border-color: #2c313c; }
.rv-fedit:hover { color: var(--accent); }
.rv-gamerow { display: flex; align-items: center; gap: 6px; }
.rv-gamerow .rv-game { flex: 1 1 auto; min-width: 0; }
/* a segmented switch: a dark track, the choice raised in it */
.rv-seg { display: flex; gap: 2px; padding: 2px; background: var(--bg);
  border: 1px solid #2c313c; border-radius: 8px; }
.rv-seg button { flex: 1 1 0; min-width: 0; border: 0; background: transparent; color: var(--muted);
  padding: 3px 10px; border-radius: 6px; font-size: 12px; white-space: nowrap;
  transition: background .15s, color .15s; }
.rv-seg button:hover { color: var(--text); }
.rv-seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.rv-gscope { flex: 0 0 auto; }
.rv-gscope button { flex: 0 0 auto; }
/* the filter dialog */
.rv-fdialog { padding: 0; width: min(580px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--panel); color: var(--text); border: 1px solid #353c49; border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6); }
.rv-fdialog::backdrop { background: rgba(8, 10, 14, .55); backdrop-filter: blur(3px); }
.rv-fdialog[open] { animation: rv-pop .14s ease-out; }
@keyframes rv-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.rv-fd { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.rv-fd-head { display: flex; align-items: center; gap: 10px; }
.rv-fd-head h3 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.rv-fd-head .rv-fd-icon { margin-left: auto; }
.rv-fd-sub { margin-top: 6px; padding-top: 12px; border-top: 1px solid #2c313c; }
.rv-fd-sub .muted { font-size: 12px; }
.rv-fd-editor { display: flex; flex-direction: column; gap: 6px; }
.rv-fd-line { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; }
.rv-fd-label { font-size: 12px; color: var(--muted); }
.rv-fd-seg button { padding: 5px 8px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.rv-fd-seg small { margin-left: 5px; font-size: 11px; opacity: .7; }
.rv-fd-count { font-size: 12px; padding-left: 72px; }
.rv-fd-count b { color: var(--text); }
.rv-fd-list { display: flex; flex-direction: column; gap: 4px; }
.rv-fd-row { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 10px;
  border: 1px solid transparent; }
.rv-fd-row:hover { background: var(--panel-2); }
.rv-fd-row.on { border-color: rgba(216, 163, 74, .45); background: rgba(216, 163, 74, .07); }
.rv-fd-use { flex: 0 0 auto; width: 26px; height: 26px; padding: 0; border-radius: 50%;
  font-size: 12px; font-weight: 600; color: var(--muted); }
.rv-fd-row.on .rv-fd-use { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rv-fd-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rv-fd-name input { background: transparent; border: 1px solid transparent; border-radius: 6px;
  padding: 1px 6px; font-size: 13px; font-weight: 500; color: var(--text); }
.rv-fd-name input:hover { border-color: #3a4150; }
.rv-fd-name input:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.rv-fd-name .muted { padding-left: 7px; font-size: 11.5px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.rv-fd-tag { font-size: 11px; color: var(--accent); padding: 0 8px; }
.rv-fd-mini { padding: 2px 10px; font-size: 12px; border-radius: 999px; }
.rv-fd-icon { width: 26px; height: 26px; padding: 0; border-radius: 8px; border-color: transparent;
  background: transparent; color: var(--muted); }
.rv-fd-icon:hover:not(:disabled) { color: var(--text); background: var(--panel-2); }
.rv-fd-icon:disabled { opacity: .3; }
.rv-fd-new { display: flex; gap: 6px; }
.rv-fd-new input { flex: 1 1 auto; min-width: 0; }
.rv-fd-foot { display: flex; justify-content: flex-end; }
.rv-fd-done { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600;
  padding: 6px 18px; border-radius: 8px; }
.rv-fd-done:hover { filter: brightness(1.08); }
.rv-logbox .rv-log { flex: 1 1 auto; width: 100%; min-height: 0; font-size: 15px; }
/* the review log, a size up from /play's */
.rv-log .gl-row { grid-template-columns: 36px 14px 22px 1fr auto auto; padding: 2px 8px 2px 2px; }
.rv-log .gl-num, .rv-log .gl-memo, .rv-log .gl-sub { font-size: 14px; }
.rv-log .gl-luck svg { width: 19px; height: 19px; }
.rv-log .gl-disc { width: 13px; height: 13px; }
.rv-log .gl-game, .rv-log .gl-result { font-size: 14px; }
.rv-log .gl-result { padding-left: 60px; }
.rv-pane { flex: 1 1 40%; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.rv-tabs { margin-bottom: 0; }
.rv-tabs .kf { flex: 1; padding: 2px 8px; font-size: 12px; }
.rv-tabbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex;
  flex-direction: column; gap: 8px; }
.rv-tabbody[hidden] { display: none; }
.rv-tabbody .card { padding: 10px 12px; }
.rv-tabbody .card[hidden], .rv-depthbar[hidden], .rv-buttons[hidden] { display: none; }
.rv-hidden-note { font-size: 12px; margin-top: 4px; }
.rv-depthbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-depth { margin-bottom: 0; }
.rv-depth .kf { padding: 2px 10px; font-size: 12px; }
.rv-depth-status { font-size: 12px; }
.rv-stale { opacity: .45; transition: opacity .2s; }
.rv-decinfo .eqline { font-size: 13px; }
/* the decision's info: an ⓘ popover at the end of the depth bar */
.rv-info-wrap { position: relative; margin-left: auto; }
.rv-info-btn { padding: 2px 10px; font-size: 12px; }
.rv-gtype { font-size: 12px; color: var(--muted, #8a8f98); margin-right: 8px; }
.rv-gtype:empty { display: none; }
.rv-info-btn.active { border-color: var(--accent); color: var(--accent); }
.rv-infopop { position: absolute; z-index: 25; right: 0; top: calc(100% + 4px); width: 370px;
  padding: 10px 12px; background: var(--panel); border: 1px solid #2c313c; border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.rv-infopop[hidden] { display: none; }
.rv-infopop .eqline { font-size: 14px; gap: 12px; }
.rv-infopop .eqline > span { white-space: nowrap; }
.rv-info-sep { border-top: 1px solid #2c313c; margin: 6px 0; }
/* the review's candidates: big type, ~5 rows high, the rest scrolls under
   a sticky header (renderAnalysis scrolls the played row into view) */
.rv-analysis:has(.xg-moves) { position: relative; max-height: 300px; overflow-y: auto;
  overflow-x: hidden; }
.rv-analysis .xg-moves { width: 100%; border-radius: 0; overflow: visible; }
.rv-analysis .eqline { font-size: 15px; }
.rv-analysis .xg-moves th, .rv-analysis .xg-moves td { padding: 6px 5px; font-size: 16px;
  vertical-align: top; }
.rv-analysis .xg-moves th { position: sticky; top: 0; z-index: 1; font-size: 13px; padding: 4px 5px; }
.rv-analysis .xg-moves th:nth-child(n+3), .rv-analysis .xg-moves td:nth-child(n+3) { text-align: right; }
.rv-analysis .xg-moves th:nth-child(n+5):not(.xg-shots), .rv-analysis .xg-moves td:nth-child(n+5):not(.xg-shots) { display: none; }
.xg-moves .xg-shots { text-align: right; color: var(--muted); }
.xg-moves td.xg-shots { cursor: help; }
.xg-moves th.xg-shots { cursor: pointer; user-select: none; }
.rv-analysis .xg-moves td.xg-play { white-space: nowrap; width: 100%; }
.rv-analysis .xg-line { font-weight: 600; font-size: 17px; }
.rv-analysis .xg-chances { display: block; margin-top: 2px; font-size: 13px; color: var(--muted);
  font-weight: 400; }
.rv-analysis .lvl-cell { padding-top: 8px; }
.rv-analysis .lvl { font-size: 12px; min-width: 26px; line-height: 18px; }
.rv-summary { background: var(--panel); border: 1px solid #2c313c; border-radius: 8px;
  padding: 8px; font-size: 14px; display: block; }
.rv-summary[hidden] { display: none; }
.rv-scope { margin-bottom: 8px; }
.rv-scope .kf { flex: 1; padding: 2px 8px; font-size: 12px; }
.rv-sumtable { width: 100%; font-variant-numeric: tabular-nums; }
.rv-sumtable th { font-weight: 600; text-align: right; max-width: 90px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.rv-sumtable td { padding: 3px 2px; }
.rv-sumtable td + td { text-align: right; white-space: nowrap; }
.rv-sumtable th.rv-sum-you { color: #5aa9e6; }
.rv-sumtable td.rv-sum-you { color: #5aa9e6; }
.rv-sumtable tr.rv-sum-pr td { font-weight: 600; }
.rv-sumtable tr.rv-sum-sep td { border-top: 1px solid #2c313c; }
/* the all-games log's game header, hovered: that game's summary */
.rv-gamecard { position: fixed; z-index: 1000; width: 400px; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.rv-gamecard[hidden] { display: none; }
.rv-gamecard-head { color: var(--accent); font-weight: 600; margin: 0 2px 6px; }
.rv-boardcol { flex: 1 1 560px; min-width: 340px; }
.rv-stepper { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.rv-stepper-gap { flex: 1; }
.rv-pos-label { color: var(--muted); font-size: 12px; min-width: 70px;
  text-align: center; font-variant-numeric: tabular-nums; }
.rv-context { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.rv-context b { color: var(--text); }
@media (max-width: 900px) {
  #rv-main { flex-direction: column; }
  .rv-logcol { order: 1; position: static; width: 100%; flex-basis: auto; height: 640px; }
  .rv-boardcol { width: 100%; }
}

/* ---------- shadow (/matches/<id>/shadow) ---------- */
#sh-main { display: flex; gap: 16px; padding: 14px 18px; align-items: flex-start; }
/* left column as in review: the game log, and the reveal under it while one is up */
.sh-logcol { flex: 0 0 430px; width: 430px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 10px; height: calc(100vh - 86px); }
#sh-match { font-size: 12px; }
.sh-boardcol { flex: 1 1 560px; min-width: 340px; max-width: 980px; }
#sh-setup { max-width: 620px; }
#sh-setup p { font-size: 13px; line-height: 1.45; }
.sh-setup-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 13px; }
.sh-setup-row > span { width: 64px; color: var(--muted); }
.sh-setup-row .lib-kind-filter { margin-bottom: 0; }
#sh-status { font-size: 15px; text-align: center; min-height: 22px; margin-bottom: 8px; }
#sh-board { width: 100%; height: auto; display: block; border-radius: 10px; touch-action: none; }
#sh-bar { display: flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 40px; margin: 10px 0; }
#sh-movebar { display: flex; align-items: center; gap: 8px; }
#sh-movebar[hidden], #sh-continue[hidden], #sh-review-game[hidden] { display: none; }
#sh-prefs { display: flex; justify-content: flex-end; align-items: center; margin: -4px 0 10px; }
#sh-prefs .pl-speed { font-size: 12px; }
#sh-prefs select, #sh-prefs button { font-size: 12px; }
#sh-note { margin-right: 6px; }
#sh-review-game { font-size: 15px; padding: 8px 18px; }
#sh-play-line { min-width: 140px; text-align: center; font-weight: 600; font-size: 14px; }
#sh-play-line.muted { font-weight: 400; }
#sh-play-line.sh-illegal { color: var(--bad); }
#sh-confirm { border-color: var(--good); color: var(--good); font-weight: 600; }
#sh-continue { font-size: 15px; padding: 8px 24px; }
#sh-reveal { flex: 1 1 60%; min-height: 0; overflow-y: auto; overflow-x: hidden; }
#sh-reveal[hidden] { display: none; }
#sh-reveal .qz-verdict { font-size: 14px; }
#sh-reveal .card { padding: 10px 12px; }
#sh-compare { width: 100%; margin: 8px 0; font-size: 13px; font-variant-numeric: tabular-nums; }
#sh-compare td, #sh-compare th { padding: 3px 5px; text-align: left; }
#sh-compare td:first-child { color: var(--muted); width: 1%; white-space: nowrap; }
#sh-compare tr.sh-you td:nth-child(2) { font-weight: 600; }
#sh-compare tr.sh-best td:nth-child(2) { color: var(--good); }
.sh-reveal-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sh-reveal-sub .lib-kind-filter { margin-bottom: 0; }
.sh-reveal-sub .kf { padding: 2px 10px; font-size: 12px; }
#sh-source { font-size: 12px; }
#sh-analysis .xg-moves { width: 100%; }
/* looking back: a second board and the decision's cards take the place of
   the game's board and reveal, which wait hidden */
#sh-main.browsing #sh-live, #sh-main.browsing #sh-reveal,
#sh-main:not(.browsing) #sh-browse, #sh-main:not(.browsing) #sh-look { display: none; }
#sh-browse > #sh-look-back { border-color: var(--good); color: var(--good); font-weight: 600; }
#sh-analysis .xg-moves th, #sh-analysis .xg-moves td { padding: 4px 5px; font-size: 12px; }
#sh-analysis .xg-moves td:nth-child(2) { white-space: nowrap; }
#sh-runs { margin-top: 16px; border-top: 1px solid #2c313c; padding-top: 10px; }
#sh-runs[hidden] { display: none; }
#sh-runs h3 { font-size: 13px; margin: 0 0 6px; color: var(--muted); font-weight: 600; }
.sh-run { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px;
  padding: 6px 0; border-bottom: 1px solid #262b35; }
.sh-run-btns { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.sh-run-btns button, .sh-run-btns .button-link { font-size: 12px; padding: 2px 10px; }
#sh-summary { max-width: 980px; }
.sh-stats { margin-bottom: 4px; }
.sh-stats td + td, .sh-stats th + th { text-align: right; }
.sh-stats tr.sh-total td { font-weight: 600; border-top: 1px solid #2c313c; }
.sh-stats tr.sh-group td { border-top: 1px solid #2c313c; }
.sh-note { font-size: 11px; margin-bottom: 14px; }
.sh-sumbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.sh-sumbar .lib-kind-filter { margin-bottom: 0; }
.sh-sumbar .kf { padding: 2px 10px; font-size: 12px; }
.sh-sumtable tr.sh-same td { color: var(--muted); }
.sh-better { color: var(--good); }
#sh-summary h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
.sh-sumtable { width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.sh-sumtable a { color: var(--accent); }
#sh-summary .lp-panel-buttons { margin-top: 14px; }
@media (max-width: 900px) {
  #sh-main { flex-direction: column; }
  .sh-logcol { order: 1; position: static; width: 100%; flex-basis: auto; height: 640px; }
  .sh-boardcol { width: 100%; }
}

#mt-detail { position: fixed; inset: 0; z-index: 20; }
#mt-dboard { width: 100%; height: auto; border-radius: 8px; }
.mt-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-chips .kf { padding: 2px 10px; font-size: 12px; border-radius: 999px; }
.mt-chips .kf.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.mt-num { width: 72px; }
.mt-posq { flex-wrap: wrap; }
.mt-posq-label { flex: 1 1 420px; }
.mt-posq-label input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; }
.mt-posq-label input.bad { border-color: var(--bad); }
.mt-posq-err { color: var(--bad, #c0392b); font-size: 0.9em; }
.mt-posq-help { flex-basis: 100%; font-size: 0.9em; }
.mt-posq-help summary { cursor: pointer; color: var(--muted, #888); width: max-content; }
.mt-posq-help ul { margin: 4px 0; padding-left: 20px; }
.mt-posq-help p { margin: 4px 0; }
.mt-errfilters label { display: flex; gap: 6px; align-items: center; }

/* ---------- performance (PR by spot) ---------- */
.mt-pr { max-width: 1100px; margin: 0 auto; }
.mt-pr-note { font-size: 13px; margin: 0 0 12px; line-height: 1.5; }
#mt-pr-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(480px, 1fr)); gap: 12px; }
.mt-pr-section h2 { margin-bottom: 6px; }
.mt-prtable { width: 100%; }
.mt-prtable th.num, .mt-prtable td.num { text-align: right; white-space: nowrap; }
.mt-prtable .mt-pr-val { font-weight: 600; }
.mt-prtable tr.mt-thin td { color: var(--muted); }
.mt-prtable tr.mt-thin .mt-pr-val { font-weight: 400; }
.mt-prtable tr.mt-pr-link { cursor: pointer; }
.mt-prtable tr.mt-pr-link:hover td { background: var(--panel-2); }
.mt-prtable tr.mt-h-total td { border-top: 1px solid var(--panel-2); font-weight: 600; }
.mt-h-sub { font-size: 0.8em; font-weight: 400; }
.mt-errtable td.num { text-align: right; }
.mt-h-missed, .mt-h-over { white-space: nowrap; }
.mt-share { position: relative; min-width: 90px; }
.mt-share-bar { position: absolute; right: 0; top: 4px; bottom: 4px; max-width: 100%;
  background: var(--accent); opacity: 0.18; border-radius: 2px; pointer-events: none; }
@media (max-width: 700px) { #mt-pr-body { grid-template-columns: 1fr; } }

/* ---------- pip-count (half-crossover) drill ---------- */
#pq-main { display: block; max-width: 1020px; margin: 0 auto; padding: 18px; }
#pq-context-bar {
  display: flex; gap: 14px; align-items: center; justify-content: center;
  flex-wrap: wrap; margin-bottom: 10px;
}
#pq-context { color: var(--muted); font-size: 13px; text-align: center; }
#pq-board { width: 100%; height: auto; display: block; border-radius: 10px; }
#pq-question { font-size: 15px; font-weight: 600; text-align: center; margin: 14px 0 10px; }
.pq-form {
  display: flex; justify-content: center; align-items: center; gap: 18px;
  flex-wrap: wrap; margin-bottom: 14px; font-size: 14px;
}
.pq-form[hidden] { display: none; }
.pq-form label { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.pq-form input[type=number] { width: 68px; font-size: 16px; text-align: center; }
.pq-form button, #pq-next { font-size: 15px; padding: 8px 24px; }
#pq-skip { font-size: 13px; padding: 6px 14px; color: var(--muted); }
.pq-note { color: var(--muted); font-size: 12px; text-align: center; margin: -6px 0 14px; }
#pq-reveal, #pq-summary { max-width: 760px; margin: 0 auto; }
.pq-verdict {
  text-align: center; font-size: 17px; font-weight: 700; padding: 8px;
  border-radius: 8px; margin-bottom: 12px;
}
.pq-verdict.good { background: #24382a; color: var(--good); }
.pq-verdict.bad { background: #3f2723; color: var(--bad); }
#pq-result { width: 100%; margin-bottom: 14px; }
#pq-result td.num, #pq-summary td.num { text-align: right; }
#pq-result th.num, #pq-summary th.num { text-align: right; }
td.pq-ok { color: var(--good); }
td.pq-off { color: var(--bad); }
#pq-next { display: block; margin: 0 auto; }
#pq-summary h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
.pq-summary-line { font-size: 15px; margin-bottom: 12px; line-height: 1.6; }
#pq-summary table { width: 100%; }
#pq-summary .lp-panel-buttons { margin-top: 14px; }
.pq-empty { color: var(--muted); text-align: center; margin-top: 40px; }
/* colorless count drill */
.cl-help { max-width: 760px; margin: 0 auto 12px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.cl-help summary { cursor: pointer; color: var(--text); text-align: center; }
.cl-help ol { padding-left: 20px; }
.cl-help li { margin-bottom: 6px; }
.cl-context { color: var(--muted); font-size: 13px; }
.cl-board { width: 100%; height: auto; display: block; border-radius: 10px; }
.cl-question { font-size: 15px; font-weight: 600; text-align: center; margin: 14px 0 10px; }
#cl-form input { width: 76px; font-size: 16px; text-align: center; }
.cl-skip { font-size: 13px; padding: 6px 14px; color: var(--muted); }
.cl-reveal, .cl-summary { max-width: 760px; margin: 0 auto; }
.cl-reveal[hidden], .cl-summary[hidden], #cl-verdict[hidden] { display: none; }
.cl-log { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.cl-line { padding: 6px 10px; border-radius: 6px; background: var(--panel); border-left: 3px solid var(--muted); cursor: pointer; font-size: 14px; }
.cl-line.good { border-left-color: var(--good); }
.cl-line.bad { border-left-color: var(--bad); }
.cl-line.shown { outline: 1px solid var(--accent); }
.cl-work { color: var(--muted); font-size: 12px; margin-top: 2px; }
.cl-next { display: block; margin: 0 auto; font-size: 15px; padding: 8px 24px; }
.cl-summary h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
.cl-summary table { width: 100%; }
.cl-summary td.num, .cl-summary th.num { text-align: right; }
.cl-summary .lp-panel-buttons { margin-top: 14px; }
#pq-main .pt-ctl[hidden] { display: none; }
/* cluster count drill */
.ck-work { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.ck-work > .pq-note { flex-basis: 100%; margin: 0; }
.ck-side { flex: 1 1 300px; background: var(--panel); border-radius: 8px; padding: 8px 10px; }
.ck-side-h { font-weight: 700; margin-bottom: 6px; }
.ck-group { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; }
.ck-hint { color: var(--muted); font-size: 14px; }
.ck-part { display: flex; justify-content: space-between; gap: 10px; padding: 3px 6px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.ck-part:hover { background: var(--panel-2); }
.ck-part.shown { outline: 1px solid var(--accent); }
.ck-ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 8px 0; }
.ck-ref { margin: 0; }
.ck-ref svg { width: 100%; height: auto; display: block; border-radius: 6px; }
.ck-ref figcaption { font-size: 12px; margin-top: 3px; color: var(--text); }
.ck-ref figcaption span { color: var(--muted); }
#ck-form label[hidden] { display: none; }
#ck-form input { width: 76px; font-size: 16px; text-align: center; }

/* ---------- play page ---------- */
#pl-main { display: block; max-width: 1300px; margin: 0 auto; padding: 18px; }
#pl-game { display: flex; gap: 16px; align-items: flex-start; }
#pl-game[hidden] { display: none; }
.pl-play { flex: 1; min-width: 0; }
#pl-logcol { flex: 0 0 250px; width: 250px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 12px; height: calc(100vh - 100px); }
#pl-logpick { width: 100%; }
#pl-logpick[hidden] { display: none; }
#pl-logcol #pl-log { flex: 1 1 auto; width: 100%; min-height: 0; }
#pl-setup { max-width: 640px; margin: 0 auto; }
.pl-setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.pl-setup-grid label { display: flex; flex-direction: column; gap: 4px;
                       font-size: 13px; color: var(--muted); }
.pl-setup-grid input { background: var(--panel-2); color: var(--text);
                       border: 1px solid #3a4150; border-radius: 6px;
                       padding: 4px 8px; font-size: 13px; }
.pl-setup-note { font-size: 13px; margin: 14px 0; }
.pl-setup-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
#pl-start { border-color: var(--good); color: var(--good); font-weight: 600; }
#pl-status-bar { text-align: center; color: var(--muted); font-size: 14px;
                 min-height: 22px; margin-bottom: 10px; position: relative; }
.pl-clock-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pl-clock-fields[hidden] { display: none; }
.pl-clock-loses { grid-column: 1 / -1; }
.pl-clock-loses[hidden] { display: none; }
.pl-clock-loses span { color: var(--text); }
#pl-clockbox { position: absolute; right: 0; top: -4px; display: flex; gap: 6px; align-items: center; }
#pl-clockbox[hidden] { display: none; }
#pl-clock-pause { font-size: 12px; padding: 2px 8px; }
#pl-clock-pause.active { border-color: var(--accent); color: var(--accent); }
#pl-clock { font-variant-numeric: tabular-nums;
            font-size: 16px; font-weight: 600; color: var(--muted);
            border: 1px solid #3a4150; border-radius: 6px; padding: 1px 10px; }
#pl-clock.running { color: var(--text); border-color: var(--accent); }
#pl-clock.low { color: var(--bad, #e06c6c); border-color: var(--bad, #e06c6c); }
#pl-clock:hover { border-color: var(--accent); }
#pl-clock .pl-clock-delay { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
/* the Bronstein delay: a second, smaller timer beside the clock */
#pl-clock-free { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted);
                  border: 1px solid #3a4150; border-radius: 6px; padding: 1px 7px; min-width: 2.2em; text-align: center; }
#pl-clock-free[hidden] { display: none; }
#pl-clock-free.running { color: var(--text); border-color: var(--accent); }
#pl-clock-free.spent { opacity: 0.45; }
/* time stats popover (click the clock) */
.pl-clockstats { position: absolute; right: 0; top: 30px; z-index: 40; background: var(--panel);
  border: 1px solid #3a4150; border-radius: 10px; padding: 10px 12px; min-width: 300px; max-width: 420px;
  max-height: 70vh; overflow: auto; text-align: left; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); font-size: 13px; }
.pl-clockstats[hidden] { display: none; }
.pl-clockstats h4 { margin: 0 0 6px; font-size: 13px; }
.pl-clockstats .cs-sum { color: var(--muted); margin-bottom: 8px; }
.pl-clockstats .cs-sum b { color: var(--text); font-weight: 600; }
.pl-clockstats table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pl-clockstats th { text-align: right; font-weight: 400; color: var(--muted); font-size: 12px; padding: 2px 4px; }
.pl-clockstats th:first-child, .pl-clockstats td:first-child { text-align: left; }
.pl-clockstats td { text-align: right; padding: 2px 4px; }
.pl-clockstats tr.cs-game { cursor: pointer; }
.pl-clockstats tr.cs-game:hover td { background: var(--panel-2); }
.pl-clockstats tr.cs-game.open td { color: var(--accent); }
.pl-clockstats tr.cs-move td { font-size: 12px; color: var(--muted); }
.pl-clockstats tr.cs-move td.cs-play { color: var(--text); padding-left: 14px; max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-clockstats .cs-bar { display: inline-block; height: 8px; border-radius: 2px; background: var(--accent);
  opacity: .55; vertical-align: middle; margin-right: 6px; }
.pl-clockstats tr.cs-move.cs-long .cs-bar { background: var(--bad, #e06c6c); opacity: .8; }
.pl-clockstats .cs-note { color: var(--muted); font-size: 12px; margin-top: 8px; }
#pl-clock.flagged, #pl-clock.over { color: var(--bad, #e06c6c); border-color: var(--bad, #e06c6c); }
#pl-clock.paused { opacity: 0.6; border-style: dashed; }
#pl-board { width: 100%; height: auto; display: block; border-radius: 10px;
            touch-action: none; }
#pl-controls {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  flex-wrap: wrap; margin: 12px 0; min-height: 32px;
}
#pl-controls button { font-size: 14px; padding: 6px 12px; }
/* fixed width so a long play doesn't push the buttons about */
#pl-play-line { flex: 0 0 170px; width: 170px; text-align: center; font-weight: 600; font-size: 14px;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#pl-controls .pl-group { display: inline-flex; gap: 8px; margin-left: 8px; }
/* stacked buttons sharing one place: the hidden one still holds its width */
.pl-slot { display: inline-grid; }
.pl-slot > button { grid-area: 1 / 1; }
.pl-slot > button[hidden] { display: block; visibility: hidden; }
/* two labels in one button: sized to the longer, only one shown */
.pl-two { display: inline-grid; }
.pl-two > span { grid-area: 1 / 1; }
.pl-two > span:last-child, .pl-two.alt > span:first-child { visibility: hidden; }
.pl-two.alt > span:last-child { visibility: visible; }
#pl-play-line.muted { font-weight: 400; color: var(--muted); }
#pl-next, #pl-continue:enabled { border-color: var(--good); color: var(--good); font-weight: 600; }
#pl-lastplay.active { border-color: var(--accent); color: var(--accent); }
#pl-star.active { border-color: #e0b03a; color: #e0b03a; }
.pl-speed { font-size: 13px; color: var(--muted); margin-right: 10px; }
.pl-speed select { font-size: 13px; }
/* roll / double drawn on the board (SVG) */
.pl-bbtn { cursor: pointer; }
.pl-bbtn rect { stroke-width: 3; transition: filter 0.1s; }
.pl-bbtn text { font-size: 22px; font-weight: 700; pointer-events: none; }
.pl-bbtn:hover rect, .pl-bbtn:focus-visible rect { filter: brightness(1.15); }
.pl-bbtn:focus { outline: none; }
.pl-bbtn:focus-visible rect { stroke: #fff; }
.pl-bbtn-roll rect { fill: var(--us); stroke: var(--us-stroke); }
.pl-bbtn-roll text { fill: var(--us-text); }
.pl-bbtn-double rect { fill: var(--board-tray); stroke: var(--board-accent); }
.pl-bbtn-double text { fill: var(--board-accent); }
.pl-bbtn-good rect { fill: var(--board-tray); stroke: var(--good); }
.pl-bbtn-good text { fill: var(--good); }
.pl-bbtn-off { cursor: default; opacity: 0.35; }
.pl-bbtn-off:hover rect { filter: none; }
.pl-bbtn-cancel rect { fill: var(--board-tray); stroke: var(--board-divider); }
.pl-bbtn-cancel text { fill: var(--board-label); }
.pl-bbtn-ask { font-size: 22px; font-weight: 700; fill: var(--board-accent);
               paint-order: stroke; stroke: var(--board-felt); stroke-width: 4px; }
.pl-bbtn-illegal { fill: var(--bad); }
.pl-result-live { margin-top: 6px; }
svg.ci-on.ci-live circle[data-owner] { cursor: grab; }
svg.ci-live circle.ci-sel { stroke: var(--board-accent); stroke-width: 4; }
#pl-resign { margin-left: 16px; color: var(--muted); }
#pl-turbomode.on, #sh-turbo.on, #pl-autoroll.on { border-color: var(--good); color: var(--good); font-weight: 600; }
/* button icons (inline SVG, currentColor) */
.btn-ic { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.btn-ic svg { width: 1em; height: 1em; flex: none; }
#pl-turbomode:not(:disabled) .ic-bolt, #sh-turbo:not(:disabled) .ic-bolt { color: #e0b03a; }
#pl-turbomode.on .ic-bolt, #sh-turbo.on .ic-bolt { color: inherit; }
#pl-resign-box {
  display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap;
  max-width: 720px; margin: 0 auto 14px; padding: 8px 12px; font-size: 14px;
  background: var(--panel-2); border-radius: 8px;
}
#pl-resign-box[hidden] { display: none; }
#pl-takeback-box { max-width: 720px; margin: 0 auto 14px; padding: 10px 12px; font-size: 14px;
                   background: var(--panel-2); border-radius: 8px; }
#pl-takeback-box[hidden] { display: none; }
#pl-turbo-box { max-width: 720px; margin: 0 auto 14px; padding: 10px 12px; font-size: 14px;
  display: flex; flex-direction: column; gap: 6px; }
#pl-turbo-box[hidden] { display: none; }
#pl-turbo-box input[type=number] { width: 4.2em; font-size: 13px; }
#pl-turbo-box .pl-tb-foot { display: flex; align-items: center; gap: 8px; }
#pl-turbo-opts { padding-left: 6px; padding-right: 6px; }
#pl-turbo-opts[aria-expanded=true] { border-color: var(--accent); }
.pl-tb-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.pl-tb-head .muted { font-size: 12px; }
#pl-tb-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
#pl-tb-list button { display: flex; gap: 10px; text-align: left; font-size: 13px; padding: 4px 10px;
                     border-color: transparent; background: none; }
#pl-tb-list button:hover { background: var(--panel); }
#pl-tb-list button.on { border-color: var(--accent); background: var(--panel); }
#pl-tb-list .pl-tb-turn { min-width: 64px; color: var(--muted); }
#pl-tb-list .pl-tb-did { color: var(--muted); margin-left: auto; }
.pl-tb-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.pl-tb-foot .rv-stepper-gap { flex: 1; }
.pl-tb-foot button { font-size: 13px; padding: 4px 14px; }
#pl-tb-go { border-color: var(--good); color: var(--good); font-weight: 600; }
#pl-takeback { color: var(--muted); }
#pl-resign-box button { font-size: 13px; padding: 4px 12px; }
.pl-resign-match { border-color: var(--accent); color: var(--accent); }
#pl-banner { max-width: 640px; margin: 0 auto 14px; padding: 10px 14px; text-align: center;
             background: var(--panel-2); border-radius: 8px; line-height: 1.6; }
#pl-banner a { color: var(--accent); }
@media (max-width: 640px) {
  .pl-setup-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  #pl-game { flex-direction: column; }
  #pl-logcol { order: 1; position: static; width: 100%; flex-basis: auto; height: 270px; }
}

/* ---------- game log column (gamelog.js), /play and match review ---------- */
.gamelog {
  flex: 0 0 250px; width: 250px; overflow-y: auto; padding: 4px 0;
  background: var(--panel); border: 1px solid #2c313c; border-radius: 8px;
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.gl-game { padding: 8px 10px 2px; color: var(--accent); font-size: 12px; font-weight: 600;
  border-top: 1px solid #2c313c; }
.gl-game:first-child { border-top: none; }
.gl-row { display: grid; grid-template-columns: 30px 13px 18px 1fr auto auto; align-items: center;
  gap: 3px; padding: 1px 8px 1px 2px; white-space: nowrap; }
.gl-num { color: var(--muted); font-size: 12px; text-align: right; padding-right: 3px; }
.gl-disc { width: 11px; height: 11px; border-radius: 50%; }
.gl-disc.gl-us { background: var(--us); border: 1px solid var(--us-stroke); }
.gl-disc.gl-them { background: var(--them); border: 1px solid var(--them-stroke); }
.gl-mark { text-align: center; }
.gl-text { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.gl-cube .gl-text { color: var(--accent); font-weight: 400; }
.gl-row.sev-error .gl-text { color: var(--good); }
.gl-row.sev-blunder .gl-text { color: var(--bad); }
/* review: cube actions in the plain text colour unless they're errors */
.rv-log .gl-cube .gl-text { color: var(--text); }
.rv-log .gl-row.sev-error .gl-text { color: var(--good); }
.rv-log .gl-row.sev-blunder .gl-text { color: var(--bad); }
/* the equity an error or blunder cost, at the end of its row */
.gl-cost { font-size: 12px; font-weight: 600; padding-left: 6px; }
.gl-cost:empty { padding: 0; }
.gl-row.sev-error .gl-cost { color: var(--good); }
.gl-row.sev-blunder .gl-cost { color: var(--bad); }
.rv-log .gl-cost { font-size: 14px; }
.gl-noted .gl-text { text-decoration: underline dotted; text-decoration-color: var(--muted);
  text-underline-offset: 3px; }
.gl-pick { cursor: pointer; }
/* outside review's filter: not stepped through, still clickable */
.gl-row.gl-dim:not(.active) { opacity: .4; }
/* your note on a position (review, shadow) */
.note-box h2 { margin-bottom: 6px; }
.note-box textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 52px;
  background: var(--bg); color: var(--text); border: 1px solid #2c313c; border-radius: 6px;
  padding: 6px 8px; font: inherit; font-size: 13px; line-height: 1.4; }
.note-box textarea:focus { outline: none; border-color: var(--accent); }
.note-status { font-size: 11px; text-transform: none; letter-spacing: 0; font-weight: 400; }
#sh-live-note { flex: none; padding: 10px 12px; }
#sh-live-note[hidden], #sh-main.browsing #sh-live-note { display: none; }
.gl-memo { color: var(--accent); font-size: 12px; padding: 0 6px 0 4px; cursor: help; }
.gl-pick:hover { background: var(--panel-2); }
/* a star: starred while playing (or flagged in XG); /play's log can toggle it */
.gl-star { color: #e0b03a; font-size: 13px; padding: 0 4px; }
.gl-star-toggle { cursor: pointer; color: var(--muted); opacity: 0; }
.gl-row:hover .gl-star-toggle, .gl-star-toggle:focus { opacity: 0.8; }
.gl-star-toggle.on { color: #e0b03a; opacity: 1; }
.gl-star-toggle:hover { color: #e0b03a; opacity: 1; }
.gl-row.active, .gl-row.active:hover { background: #2d4f7c; }
.gl-result { padding: 2px 10px 6px 49px; color: var(--muted); font-size: 12px; }
/* a shadow run over the log: your verdict as a bar on the left, the play
   you made instead on a second line */
.gl-agree { box-shadow: inset 3px 0 0 var(--good); }
.gl-differ { box-shadow: inset 3px 0 0 #e8a33d; }
.gl-sub { grid-column: 4; overflow: hidden; text-overflow: ellipsis; font-size: 12px;
  color: #e8a33d; }
.gl-sub.gl-sub-better { color: var(--good); }
.gl-sub.gl-sub-close { color: var(--muted); }
.gl-luck { display: flex; align-items: center; justify-content: center; cursor: help; }
.gl-luck svg { width: 15px; height: 15px; display: block; }
.gl-luck.gl-very-lucky { color: #e8c75a; }
.gl-luck.gl-very-unlucky { color: #8fa6ee; }
#rv-run { max-width: 240px; }
.rv-you .qz-verdict { margin: 4px 0 6px; }
.rv-you-key { font-size: 12px; margin-top: 4px; }
/* luck chip on the dice: gold lucky, blue unlucky (red is taken by
   blunders); "very" is a solid fill */
.gl-dice { display: inline-block; padding: 0 4px; border-radius: 4px; cursor: help;
  line-height: 1.35; }
.gl-dice.gl-lucky { background: rgba(232, 199, 90, 0.22); color: #f0d77e;
  box-shadow: inset 0 0 0 1px rgba(232, 199, 90, 0.45); }
.gl-dice.gl-very-lucky { background: #e8c75a; color: #1d1f24; }
.gl-dice.gl-unlucky { background: rgba(110, 140, 230, 0.22); color: #a9bcf2;
  box-shadow: inset 0 0 0 1px rgba(110, 140, 230, 0.45); }
.gl-dice.gl-very-unlucky { background: #6e8ce6; color: #14161b; }

/* ---------- /play: end-of-game popup and review panel ---------- */
#pl-result { position: fixed; inset: 0; z-index: 25; display: flex;
  align-items: center; justify-content: center; }
#pl-result[hidden] { display: none; }
.pl-result-card { position: relative; width: min(440px, calc(100vw - 32px));
  padding: 20px 22px; text-align: center; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.pl-result-card h3 { font-size: 19px; margin: 0 0 6px; color: var(--accent); }
#pl-result-score { font-size: 15px; line-height: 1.6; margin-bottom: 14px; }
.pl-result-x { position: absolute; top: 8px; right: 8px; border: none; background: none;
  color: var(--muted); font-size: 15px; }
.pl-result-pr { width: 100%; margin-bottom: 8px; }
.pl-result-pr th, .pl-result-pr td { text-align: right; padding: 6px 10px;
  font-size: 14px; font-variant-numeric: tabular-nums; }
.pl-result-pr th:first-child, .pl-result-pr td:first-child { text-align: left; color: var(--muted); }
.pl-result-pr th { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-result-note { font-size: 12px; margin: 0 0 14px; }
.pl-result-xg { font-size: 12px; margin-top: 6px; }
.pl-result-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pl-result-buttons button, .pl-result-buttons .button-link { font-size: 14px; padding: 6px 16px; }
.pl-result-buttons .pl-primary { border-color: var(--good); color: var(--good); font-weight: 600; }

#pl-reviewer, .pl-reviewer { position: fixed; inset: 0; z-index: 30; display: flex;
  flex-direction: column; background: var(--bg); }
#pl-reviewer[hidden], .pl-reviewer[hidden] { display: none; }
.pl-reviewer-bar { display: flex; align-items: center; gap: 12px; padding: 8px 18px;
  background: var(--panel); border-bottom: 1px solid #2c313c; font-size: 14px; }
.pl-reviewer-bar .muted { font-size: 12px; }
#pl-reviewer-next, .pl-reviewer-next { border-color: var(--good); color: var(--good); font-weight: 600; }
#pl-reviewer-frame, .pl-reviewer-frame { flex: 1; width: 100%; border: 0; }

/* ---------- matches page: XG round trip (bot games) ---------- */
.mt-xg { margin-bottom: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.mt-xg[hidden] { display: none; }
.mt-xg-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.mt-xg-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mt-xg-row label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.mt-xg-row input { background: var(--panel-2); color: var(--text); border: 1px solid #3a4150;
  border-radius: 6px; padding: 4px 8px; font-size: 13px; width: 320px; }
.mt-xg-recent { font-size: 12px; }
.mt-xg-recent a { color: var(--accent); }
.mt-xg-badge { font-size: 10px; font-weight: 600; color: var(--good); border: 1px solid var(--good);
  border-radius: 999px; padding: 0 6px; margin-left: 4px; vertical-align: 1px; }
/* the cube turns about its own centre when animated (play.js animateCube) */
.bg-cube { transform-box: fill-box; transform-origin: center; }

/* ---------- take points page (cube.js) ---------- */
#cb-main { display: flex; gap: 18px; padding: 18px; align-items: flex-start; }
#cb-left { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cb-controls { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }
.cb-ctl { display: flex; align-items: center; gap: 8px; }
.cb-ctl[hidden] { display: none; }
.cb-ctl .lib-kind-filter { margin-bottom: 0; }
.cb-label { color: var(--muted); font-size: 12px; }
.cb-slider input { width: 110px; accent-color: var(--accent); }
.cb-check { cursor: pointer; }
.cb-check input { accent-color: var(--accent); margin: 0; }
.cb-off .cb-label, .cb-off .cb-val { opacity: .5; }
/* the gammon presets and both sliders wrap together, never apart */
.cb-pair { display: flex; gap: 12px 22px; align-items: center; }
.cb-val { font-size: 12px; min-width: 32px; font-variant-numeric: tabular-nums; }

.cb-grid-head { display: flex; gap: 12px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.cb-money.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.cb-scroll { overflow-x: auto; }
/* wide enough for an equity (+0.57), so switching units doesn't resize */
#cb-grid td { min-width: 72px; box-sizing: border-box; }
.cb-legend { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px;
  color: var(--muted); margin-top: 10px; }
.cb-sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-left: 8px; }
.cb-sw-good { background: color-mix(in srgb, var(--good) 55%, var(--panel-2)); }
.cb-sw-bad { background: color-mix(in srgb, var(--bad) 55%, var(--panel-2)); }
.cb-sw-none { background: repeating-linear-gradient(45deg, transparent 0 4px, #3a4150 4px 6px); }

#cb-explain { flex: 0 1 560px; min-width: 0; position: sticky; top: 12px; }
#cb-explain h2 { margin: 18px 0 6px; }
#cb-explain p { margin: 6px 0; font-size: 14px; }
.cb-sub { color: var(--muted); font-size: 12px; }
.cb-big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 8px 0 4px; }
.cb-tp { font-size: 34px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.cb-dim { color: var(--muted); font-size: 13px; }
.cb-good { color: var(--good); }
.cb-bad { color: var(--bad); }
.cb-formula { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px !important;
  background: var(--panel-2); border-radius: 6px; padding: 6px 10px; }
.cb-outcomes { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.cb-outcomes td { padding: 3px 6px; border-bottom: 1px solid #2c313c; }
.cb-outcomes td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb-o-pass td:first-child { border-left: 3px solid var(--accent); }
.cb-o-lose td:first-child { border-left: 3px solid var(--bad); }
.cb-o-win td:first-child { border-left: 3px solid var(--good); }

.cb-line { width: 100%; height: auto; display: block; margin: 6px 0; }
.cb-line text { font-size: 13px; text-anchor: middle; fill: var(--text); }
.cb-axis { stroke: var(--muted); stroke-width: 1.5; }
.cb-tick { fill: var(--muted) !important; font-size: 11px !important; }
.cb-risk { fill: color-mix(in srgb, var(--bad) 35%, transparent); }
.cb-gain { fill: color-mix(in srgb, var(--good) 30%, transparent); }
.cb-faint { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; }
.cb-mark { stroke-width: 3; }
.cb-m-lose { stroke: var(--bad); fill: var(--bad) !important; }
.cb-m-win { stroke: var(--good); fill: var(--good) !important; }
.cb-m-pass { stroke: var(--accent); fill: var(--accent) !important; }
.cb-m-money { stroke: var(--muted); stroke-dasharray: 3 2; }
.cb-mlabel { font-weight: 600; stroke: none; }
.cb-dot { fill: var(--panel-2); stroke: var(--muted); stroke-width: 1.5; }
.cb-dot.on { fill: var(--accent); stroke: var(--accent); }
.cb-dlabel { fill: var(--muted) !important; font-size: 12px !important; }
.cb-dlabel.on { fill: var(--accent) !important; font-weight: 600; }
.score-table td.cb-never { background: var(--panel-2); color: var(--muted); }
.cb-sw-never { background: var(--panel-2); border: 1px solid #3a4150; }
.cb-tabs { margin-bottom: 10px !important; }
.cb-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 4px; }
.cb-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px;
  text-align: left; border-radius: 6px; }
.cb-tile.on { border-color: var(--accent); }
.cb-tile-label { color: var(--muted); font-size: 12px; }
.cb-tile-val { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cb-tile.on .cb-tile-val { color: var(--accent); }
.cb-tile-note { color: var(--muted); font-size: 11px; }
.cb-zone { stroke: var(--panel); stroke-width: 1; }
.z-nd { fill: var(--panel-2); background: var(--panel-2); }
.z-you-dt { fill: color-mix(in srgb, var(--good) 35%, var(--panel-2)); background: color-mix(in srgb, var(--good) 35%, var(--panel-2)); }
.z-you-dp { fill: color-mix(in srgb, var(--good) 70%, var(--panel-2)); background: color-mix(in srgb, var(--good) 70%, var(--panel-2)); }
.z-you-tg { fill: color-mix(in srgb, var(--accent) 55%, var(--panel-2)); background: color-mix(in srgb, var(--accent) 55%, var(--panel-2)); }
.z-them-dt { fill: color-mix(in srgb, var(--bad) 35%, var(--panel-2)); background: color-mix(in srgb, var(--bad) 35%, var(--panel-2)); }
.z-them-dp { fill: color-mix(in srgb, var(--bad) 70%, var(--panel-2)); background: color-mix(in srgb, var(--bad) 70%, var(--panel-2)); }
.z-them-tg { fill: color-mix(in srgb, var(--muted) 55%, var(--panel-2)); background: color-mix(in srgb, var(--muted) 55%, var(--panel-2)); }
.cb-zones { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0 8px; }
.cb-zones td { padding: 2px 6px; }
.cb-zones td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.cb-zones .cb-sw { margin: 0 8px 0 0; vertical-align: -2px; }
.cb-eq { fill: none; stroke-width: 2.5; }
.cb-eq-hold { stroke: var(--muted); }
.cb-eq-dbl { stroke: var(--good); }
.cb-key { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.cb-k { display: inline-block; width: 18px; height: 3px; margin-left: 8px; }
.cb-k-hold { background: var(--muted); }
.cb-k-dbl { background: var(--good); }

.score-table td.cb-inbucket { box-shadow: inset 0 0 0 2px var(--accent); }
.cbk { border: 1px solid #2c313c; border-radius: 6px; padding: 8px 10px; margin: 8px 0; }
.cbk.on { border-color: var(--accent); }
.cbk-money { background: var(--panel-2); }
.cbk-head { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; font-size: 14px; }
.cbk-head .cb-dim { font-size: 12px; }
.cbk-why { color: var(--muted); font-size: 12px; margin: 2px 0 4px; }
.cbk-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0; font-variant-numeric: tabular-nums; }
.cbk-table th { color: var(--muted); font-weight: 400; font-size: 12px; text-align: left; padding: 2px 6px; }
.cbk-table td { padding: 2px 6px; white-space: nowrap; }
.cbk-table td span { font-size: 12px; }
.cbk-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cbk-chip { padding: 1px 6px; font-size: 12px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.cbk-chip.on { border-color: var(--accent); color: var(--accent); }

@media (max-width: 1100px) {
  #cb-main { flex-direction: column; align-items: stretch; }
  #cb-explain { position: static; flex-basis: auto; }
}
@media (max-width: 640px) {
  #cb-main { padding: 12px 16px; }
}

/* ---------- race explorer (/race) ---------- */
#rc-main { display: flex; gap: 18px; padding: 18px; align-items: flex-start; }
#rc-left { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.rc-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rc-xgid { display: flex; gap: 6px; margin-left: auto; }
.rc-xgid input { width: 220px; }
#rc-board { width: 100%; height: auto; display: block; border-radius: 10px; }
.rc-hint { color: var(--muted); font-size: 12px; }
#rc-panel { flex: 0 1 540px; min-width: 0; position: sticky; top: 12px; }
#rc-panel h2 { margin: 18px 0 6px; }
#rc-panel p { margin: 6px 0; font-size: 14px; }
.rc-status { color: var(--muted); font-size: 14px; }
.rc-status.rc-error { color: var(--bad); }
.rc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rc-table th { color: var(--muted); font-weight: 600; text-align: right; padding: 3px 6px; }
.rc-table td { padding: 3px 6px; border-bottom: 1px solid #2c313c; }
.rc-table td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-row-best td { color: var(--accent); font-weight: 600; }
.rc-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-chart-head .lib-kind-filter { margin-bottom: 0; }
.rc-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.rc-key { display: inline-flex; align-items: center; gap: 6px; }
.rc-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: baseline; }
.rc-key .rc-sw { margin-right: 0; }
.rc-sw-us, .rc-bar-us { background: var(--rc-us); fill: var(--rc-us); }
.rc-sw-them, .rc-bar-them { background: var(--rc-them); fill: var(--rc-them); }
#rc-panel { --rc-us: #4f95dc; --rc-them: #d27a3c; }
.rc-chart-wrap { position: relative; }
#rc-chart { width: 100%; height: auto; display: block; }
.rc-grid { stroke: #2c313c; stroke-width: 1; }
.rc-base { stroke: #5a6272; stroke-width: 1; }
.rc-axis { fill: var(--muted); font-size: 11px; }
.rc-hit { fill: transparent; }
.rc-hit.on { fill: rgba(255, 255, 255, 0.05); }
.rc-tip { position: absolute; top: 0; transform: translateX(-50%); pointer-events: none;
          background: var(--panel-2); border: 1px solid #3a4150; border-radius: 6px;
          padding: 6px 9px; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-tip[hidden] { display: none; }
@media (max-width: 1000px) {
  #rc-main { flex-direction: column; padding: 12px 16px; }
  #rc-left, #rc-panel { flex: 1 1 auto; width: 100%; position: static; }
  .rc-xgid { margin-left: 0; }
}
#rc-body.rc-stale { opacity: 0.45; transition: opacity .2s .2s; }

/* score grid (scoregrid.js): cube verdict per match score */
.sg { --sg-nd: color-mix(in srgb, var(--muted) 22%, var(--panel-2));
      --sg-dt: color-mix(in srgb, var(--good) 55%, var(--panel-2));
      --sg-dp: color-mix(in srgb, var(--accent) 60%, var(--panel-2));
      --sg-tg: color-mix(in srgb, var(--bad) 60%, var(--panel-2));
      /* lens hues, shaded by size: double / no double / too good, take / pass */
      --sg-h-d: var(--good); --sg-h-nd: #b8bec9; --sg-h-tg: var(--bad);
      --sg-h-t: #5fa0e0; --sg-h-p: var(--accent); }
.sg.sg-stale .sg-table { opacity: 0.45; transition: opacity .2s .2s; }
.sg-controls { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 8px; }
.sg-controls .lib-kind-filter { margin-bottom: 0; }
.sg-status { margin-bottom: 6px; }
.sg-nd { background: var(--sg-nd); color: var(--muted); }
.sg-dt { background: var(--sg-dt); }
.sg-dp { background: var(--sg-dp); }
.sg-tg { background: var(--sg-tg); }
.score-table td.sg-close { border-style: dashed; border-color: var(--text); }
.score-table td.sg-close.st-sel { border-style: solid; }
.score-table td.sg-dead { font-style: italic; }
.score-table td.sg-lens { text-shadow: 0 0 3px var(--bg), 0 0 1px var(--bg); }
.score-table td.sg-lens.sg-dead { filter: saturate(.35); }
.sg-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.sg-key { display: inline-flex; align-items: center; gap: 5px; }
.sg-sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.sg-sw-close { border: 2px dashed var(--text); }
.sg-strip { display: inline-flex; gap: 1px; }
.sg-strip .sg-sw { border-radius: 0; width: 11px; }
.sg-sw-split { background: linear-gradient(to bottom right, var(--sg-h-d) 50%, var(--sg-h-t) 50%); }
.sg-detail { margin-top: 8px; }
.sg-size { margin: 2px 0 6px; font-weight: 600; }
.sg-eq tr.sg-right td:first-child { font-weight: 600; }
.sg-eq td:not(:first-child) { text-align: right; width: 1%; white-space: nowrap; }
.sg-tip { position: fixed; z-index: 20; pointer-events: none; max-width: 460px;
          background: var(--panel); border: 1px solid #3a4150; border-radius: 6px;
          padding: 4px 10px; font-size: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
          font-variant-numeric: tabular-nums; }
.sg-tip[hidden] { display: none; }
.sg-tip p { margin: 4px 0; }

/* score table (scoretable.js): every by-score grid */
.score-table { border-collapse: separate; border-spacing: 2px; font-size: 12px; margin: 0 auto;
  font-variant-numeric: tabular-nums; }
.score-table th { color: var(--muted); font-weight: 600; padding: 2px 6px; }
.score-table th.cb-corner { font-weight: 400; font-size: 11px; white-space: nowrap; }
.score-table td { min-width: 42px; height: 30px; text-align: center; border-radius: 4px;
  cursor: pointer; border: 2px solid transparent; }
.score-table td:hover:not(.st-inert) { border-color: #5a6272; }
.score-table td.st-inert { cursor: default; }
.score-table td.st-sel { border-color: var(--text); font-weight: 700; }
.score-table td.st-none, .score-table td.st-hidden {
  background: repeating-linear-gradient(45deg, transparent 0 4px, #2a2f39 4px 6px); }
.st-money-row th { padding-top: 6px; }
.score-table td.st-pad { background: none; border: 0; }
.kf.st-special { padding: 2px 10px; font-size: 12px; border-radius: 999px; }
.kf.st-special.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

/* race cube reference (racecube.js) */
#rc-ref-wrap { padding: 0 18px 18px; }
#rc-ref-wrap h2 { margin-top: 0; }
.rr { --rr-late: color-mix(in srgb, var(--accent) 70%, var(--panel-2)); }
.rr-controls .lib-kind-filter { flex-wrap: wrap; }
.rr-controls .lib-kind-filter[data-k="length"] .kf.rr-rough { opacity: .65; }
.rr-warn { color: var(--bad); font-size: 13px; margin: 4px 0 8px; }
.rr-table td { min-width: 44px; height: 34px; padding: 2px 4px; line-height: 1.15; }
.rr-cell { cursor: pointer; background: color-mix(in srgb, var(--rr-late) var(--rr-mix), var(--panel-2)); }
.rr-cell span { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-d { color: var(--text); }
.rr-p { color: var(--muted); font-size: 11px; }
.rr-cell .rr-d::before { content: "D "; color: var(--muted); font-size: 10px; }
.rr-cell .rr-p::before { content: "P "; font-size: 10px; }
.rr-na { color: var(--muted); background: none; cursor: default; }
.rr-sw-late { background: var(--rr-late); }
.rr-line { position: relative; height: 18px; margin: 10px 12px 22px; border-radius: 4px; background: var(--panel-2); }
.rr-seg { position: absolute; top: 0; bottom: 0; }
.rr-seg:first-child { border-radius: 4px 0 0 4px; }
.rr-seg:last-of-type { border-radius: 0 4px 4px 0; }
.rr-tick { position: absolute; top: 0; bottom: -4px; border-left: 1px solid var(--text); }
.rr-tick span { position: absolute; top: 20px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.rr-line-label { font-size: 11px; text-align: center; }
@media (max-width: 760px) { #rc-ref-wrap { padding: 0 16px 16px; } }

/* the note under the dice (board.js renderDiceNote): a beat after the
   dice it pops in, a glint runs across, then it lifts and fades.
   The length matches DICE_NOTE_MS. */
.bg-dice-note {
  transform-box: fill-box;
  transform-origin: center;
  animation: bg-dice-note 1500ms ease-out both;
}
.bg-dice-note-glint {
  opacity: 0.75;
  animation: bg-dice-note-glint 1500ms ease-in-out both;
}
@keyframes bg-dice-note {
  0%, 14% { opacity: 0; transform: translateY(-10px) scale(0.6); }
  24% { opacity: 1; transform: translateY(0) scale(1.08); }
  30%, 80% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(8px) scale(0.96); }
}
@keyframes bg-dice-note-glint {
  0%, 32% { transform: translateX(0); }
  56%, 100% { transform: translateX(var(--glint-run)); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-dice-note { animation-name: bg-dice-note-calm; }
  .bg-dice-note-glint { animation: none; opacity: 0; }
}
@keyframes bg-dice-note-calm {
  0%, 14% { opacity: 0; }
  24%, 80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- points drill (points.js) ---------- */

#pt-main { display: block; max-width: 1020px; margin: 0 auto; padding: 18px; }
.sh-about { max-width: 640px; margin: 0 auto 14px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.sh-about summary { cursor: pointer; text-align: center; color: var(--text); }
.sh-about[open] { background: var(--panel); border-radius: 10px; padding: 8px 14px; }
.sh-about p, .sh-about ul { margin: 8px 0; }
.sh-about ul { padding-left: 18px; }
.sh-about b { color: var(--text); }
.pt-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 12px; }
.pt-ctl { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.pt-ctl .lib-kind-filter { margin-bottom: 0; }
#pt-board { width: 100%; height: auto; display: block; border-radius: 10px; }
#pt-board.pt-clickable [data-point] { cursor: pointer; }
#pt-question { font-size: 16px; text-align: center; margin: 14px 0 10px; }
.pt-where { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
#pt-answer { width: 72px; font-size: 18px; text-align: center; background: var(--panel-2);
  color: var(--text); border: 1px solid #3a4150; border-radius: 6px; padding: 6px 8px; }
#pt-form button, #pt-next { font-size: 15px; padding: 8px 24px; }
#pt-form .pt-skip, .pt-skip { font-size: 13px; padding: 6px 14px; color: var(--muted); }
#pt-find-bar[hidden] { display: none; }
#pt-reveal, #pt-summary { max-width: 760px; margin: 0 auto; }
#pt-next { display: block; margin: 0 auto 12px; }
#pt-next[hidden] { display: none; }
#pt-summary h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
#pt-summary table { width: 100%; }
#pt-summary td.num, #pt-summary th.num { text-align: right; }
#pt-summary .lp-panel-buttons { margin-top: 14px; }

/* bear-off drill: the 6×6 roll grid on the reveal */
.bo-grid { margin: 0 auto 10px; border-collapse: collapse; font-size: 13px; }
.bo-grid th, .bo-grid td { width: 30px; height: 26px; text-align: center; padding: 0; }
.bo-grid th { color: var(--muted); font-weight: 600; }
.bo-grid td { border: 1px solid var(--panel-2); }
.bo-grid td.bo-in { color: var(--good); }
.bo-grid td.bo-out { color: var(--bad); background: #3f2723; }
.bo-grid td.bo-double { font-weight: 700; }
.bo-grid td.bo-in.bo-double { background: #2a3140; }
.bo-grid td.bo-blank { border: none; }
#bo-next { display: block; margin: 0 auto 12px; font-size: 15px; padding: 8px 24px; }
#bo-reveal, #bo-summary { max-width: 760px; margin: 0 auto; }
#bo-summary h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
#bo-summary table { width: 100%; }
#bo-summary td.num, #bo-summary th.num { text-align: right; }
#bo-summary .lp-panel-buttons { margin-top: 14px; }
#bo-board { width: 100%; height: auto; display: block; border-radius: 10px; }
#bo-answer { width: 72px; font-size: 18px; text-align: center; background: var(--panel-2);
  color: var(--text); border: 1px solid #3a4150; border-radius: 6px; padding: 6px 8px; }
#bo-form button[type=submit] { font-size: 15px; padding: 8px 24px; }

/* race drill */
#rd-main { display: block; max-width: 1020px; margin: 0 auto; padding: 18px; }
#rd-main:has(.rd-with-ref) { max-width: 1500px; }
#rd-layout.rd-with-ref { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 620px); gap: 24px; align-items: start; }
@media (max-width: 1100px) { #rd-layout.rd-with-ref { grid-template-columns: minmax(0, 1fr); } }
#rd-ref-toggle.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
#rd-board { width: 100%; height: auto; display: block; border-radius: 10px; }
#rd-counts { font-size: 18px; text-align: center; margin-bottom: 10px; }
#rd-counts b { color: var(--accent); font-size: 22px; }
.rd-sub { color: var(--muted); font-size: 12px; font-weight: normal; margin-left: 6px; }
#rd-question { font-size: 16px; text-align: center; margin: 14px 0 10px; }
#rd-answer { width: 72px; font-size: 18px; text-align: center; background: var(--panel-2);
  color: var(--text); border: 1px solid var(--panel-2); border-radius: 6px; padding: 6px; }
#rd-win-form button[type=submit], #rd-cube-form button[data-action] { font-size: 15px; padding: 8px 18px; }
#rd-cube-form[hidden], #rd-main .pt-ctl[hidden] { display: none; }
#rd-reveal, #rd-summary { max-width: 760px; margin: 0 auto; }
#rd-work { font-size: 13px; line-height: 1.7; margin: 0 0 14px; }
#rd-work b { color: var(--muted); font-weight: 600; margin-right: 4px; }
#rd-next { display: block; margin: 0 auto 12px; font-size: 15px; padding: 8px 24px; }
#rd-summary h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
#rd-summary table { width: 100%; }
#rd-summary .lp-panel-buttons { margin-top: 14px; }
#rd-ref { background: var(--panel); border-radius: 10px; padding: 14px 16px; font-size: 13px; }
#rd-ref h3 { font-size: 14px; margin: 14px 0 8px; color: var(--text); }
#rd-ref h3:first-child { margin-top: 0; }
.rd-rules { margin: 0; padding-left: 18px; line-height: 1.55; }
.rd-rules li { margin-bottom: 4px; }
.rd-mono { display: block; font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.rd-scroll { overflow-x: auto; }
.rd-table { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.rd-table th, .rd-table td { padding: 2px 5px; text-align: center; border: 1px solid var(--panel-2); }
.rd-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.rd-table .rd-corner { font-weight: normal; font-size: 11px; }
.rd-plt { color: var(--muted); font-weight: normal; font-size: 10px; margin-left: 4px; opacity: 0.7; }
.rd-table td.rd-dt, .rd-legend .rd-dt { background: #2c3a2a; }
.rd-table td.rd-dp, .rd-legend .rd-dp { background: #45302b; }
.rd-legend { display: flex; gap: 8px; margin-bottom: 6px; font-size: 11px; color: var(--muted); }
.rd-legend span { padding: 1px 8px; border-radius: 4px; border: 1px solid var(--panel-2); }
.rd-table .rd-mark { outline: 2px solid var(--accent); outline-offset: -2px; color: var(--accent); }
.rd-table tr.rd-money th, .rd-table tr.rd-money td { border-top-width: 2px; }
.rd-table tr.rd-money td[colspan] { border: none; }
#rd-scoretable td { white-space: nowrap; }
.pq-note.rd-left { text-align: left; margin: 8px 0 0; }

/* shot-counting drill (shots.js) */
.sh-ref { margin: 0 auto 10px; border-collapse: collapse; font-size: 14px; min-width: 420px; }
.sh-ref th, .sh-ref td { padding: 5px 10px; text-align: left; }
.sh-ref th.num, .sh-ref td.num { text-align: right; }
.sh-ref th { color: var(--muted); font-weight: 600; }
.sh-ref .sh-row { cursor: pointer; border-top: 1px solid var(--panel-2); }
.sh-ref .sh-row:hover, .sh-ref .sh-row.open { background: var(--panel-2); }
.sh-ref .sh-detail td { padding-top: 0; color: var(--muted); font-size: 13px; }
.sh-ref .sh-detail[hidden] { display: none; }
.sh-roll { display: inline-block; margin-right: 14px; }
.sh-roll b { color: var(--text); }
.sh-distance { font-size: 96px; font-weight: 700; text-align: center; line-height: 1.1; margin-top: 24px; color: var(--accent); }
.sh-distance[hidden], #sh-board[hidden] { display: none; }
#sh-board { width: 100%; height: auto; display: block; border-radius: 10px; }
#sh-answer { width: 72px; font-size: 18px; text-align: center; background: var(--panel-2);
  color: var(--text); border: 1px solid #3a4150; border-radius: 6px; padding: 6px 8px; }
#sh-form button[type=submit] { font-size: 15px; padding: 8px 24px; }
.bo-grid td.sh-blocked { color: #e0a050; background: #3d3220; }
.sh-notes { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.7; }
.sh-notes b { color: var(--text); }
#sh-next { display: block; margin: 0 auto 12px; font-size: 15px; padding: 8px 24px; }
#sh-reveal, #sh-summary, #sh-table { max-width: 760px; margin: 0 auto; }
#sh-summary h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
#sh-summary table { width: 100%; }
#sh-summary td.num, #sh-summary th.num { text-align: right; }
#sh-summary .lp-panel-buttons { margin-top: 14px; }
#pt-main .pt-ctl[hidden] { display: none; }
@media (max-width: 520px) { .sh-ref { min-width: 0; width: 100%; } }

/* ---------- cube timeline (/matches/<id>/cube) ---------- */
/* the summary grid and the timelines on the left, the board at review's size on the right */
#ct-main { display: flex; gap: 16px; padding: 14px 18px; align-items: flex-start; }
.ct-gridcol { flex: 0 0 440px; width: 440px; min-width: 0; }
.ct-side { flex: 1 1 560px; min-width: 340px; }
.ct-status { font-size: 12px; margin: 4px 0 6px; min-height: 1.3em; }
.ct-table { border-collapse: separate; border-spacing: 2px; font-size: 11px;
  font-variant-numeric: tabular-nums; width: 100%; table-layout: fixed; }
.ct-table th { color: var(--muted); font-weight: 600; padding: 2px; }
.ct-table thead th.cb-corner { width: 64px; font-weight: 400; font-size: 10px; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.ct-table td { padding: 2px 3px; border-radius: 4px; border: 2px solid transparent;
  background: var(--panel); vertical-align: top; }
.ct-table td.st-none { background: repeating-linear-gradient(45deg, transparent 0 4px, #2a2f39 4px 6px); }
.ct-table td.ct-cell { position: relative; cursor: pointer; }
.ct-table td.ct-cell:hover { background: var(--panel-2); }
.ct-table td.ct-realscore { border-color: var(--accent); }
.ct-table td.ct-picked { box-shadow: inset 0 0 0 1px var(--text); background: var(--panel-2); }
.ct-table td.ct-base { box-shadow: inset 0 0 0 1px var(--muted); }
.ct-sum { display: flex; align-items: center; gap: 3px; line-height: 1; margin: 1px 0; white-space: nowrap; }
.ct-sum .mp-disc { width: 7px; height: 7px; }
.ct-chip { display: inline-block; min-width: 18px; padding: 2px 2px; border-radius: 3px;
  text-align: center; font-weight: 600; color: var(--text); }
.ct-chip.sg-nd, .ct-chip.ct-never { background: none; color: var(--muted); font-weight: 400; }
.ct-n { color: var(--muted); font-size: 10px; }
.ct-add { position: absolute; top: 1px; right: 1px; padding: 0 4px; font-size: 11px; line-height: 1.3;
  display: none; }
.ct-table td.ct-cell:hover .ct-add { display: block; }
.ct-compare { margin: 10px 0 8px; display: flex; flex-direction: column; gap: 4px; }
.ct-cmp-empty { font-size: 12px; margin: 0; }
.ct-cmp-row { display: grid; grid-template-columns: 84px 1fr; gap: 6px; align-items: center; }
.ct-cmp-label { display: flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }
.ct-cmp-label.ct-cmp-real b { color: var(--accent); }
.ct-cmp-tag { font-size: 10px; color: var(--muted); }
.ct-x { margin-left: auto; padding: 0 4px; font-size: 11px; line-height: 1.3; }
.ct-cmp-axis .ct-cmp-label { font-size: 10px; }
.ct-axis { position: relative; height: 12px; font-size: 10px; color: var(--muted); }
.ct-axis span { position: absolute; transform: translateX(-50%); }
.ct-strip { display: block; width: 100%; height: 34px; cursor: pointer; background: var(--panel-2);
  border-radius: 2px; }
.ct-strip .ct-nd { fill: var(--sg-nd); }
.ct-strip .ct-dt { fill: var(--sg-dt); }
.ct-strip .ct-dp { fill: var(--sg-dp); }
.ct-strip .ct-tg { fill: var(--sg-tg); }
.ct-strip .ct-dead { opacity: .55; }
.ct-strip .ct-none { fill: transparent; }
.ct-strip .ct-grid5 { stroke: var(--panel); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ct-strip .ct-sel { fill: none; stroke: var(--text); stroke-width: 2; vector-effect: non-scaling-stroke; }
.ct-strip .ct-real-cube { stroke: var(--text); stroke-width: 2; stroke-dasharray: 3 2;
  vector-effect: non-scaling-stroke; }
.sg-sw.ct-sw-real { background: none; border: 2px solid var(--accent); }
.ct-sw-tick { display: inline-block; width: 0; height: 14px; border-left: 2px dashed var(--text); }
.ct-side .board-row { margin-bottom: 8px; }
.ct-turngrid .score-table td { min-width: 30px; height: 24px; }
.ct-turngrid .score-table td[data-s] { cursor: pointer; }
.ct-turngrid .score-table th.cb-corner { max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) {
  #ct-main { flex-direction: column; }
  .ct-gridcol, .ct-side { width: 100%; flex-basis: auto; }
}
.ct-head { font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
.ct-head .info-tip { margin-left: 4px; vertical-align: -2px; }
.ct-head .cb-dim { font-weight: 400; font-size: 12px; }
.ct-turngrid { margin-bottom: 6px; }
.ct-onroll { margin: 0 0 10px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--panel-2); border-radius: 6px; }
.ct-or-who { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.ct-or-who .cb-dim { font-weight: 400; font-size: 12px; }
.ct-or-link { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--accent); }
.ct-or-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px 12px; }
.ct-or-tile { display: flex; flex-direction: column; gap: 1px; }
/* an "i" that shows its text on hover or focus */
.info-tip { position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--muted); color: var(--muted);
  font: italic 600 10px/1 Georgia, serif; cursor: help; }
.info-tip:hover, .info-tip:focus { color: var(--text); border-color: var(--text); outline: none; }
.info-pop { display: none; position: absolute; z-index: 20; top: 20px; left: -8px; width: 340px;
  padding: 8px 10px; background: var(--panel); border: 1px solid var(--panel-2); border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,.35); color: var(--text); font-family: system-ui, "Segoe UI", sans-serif; font-size: 12px;
  font-weight: 400; font-style: normal; line-height: 1.45; text-align: left; cursor: auto; }
.info-pop p { margin: 0 0 6px; }
.info-pop p:last-child { margin-bottom: 0; }
.info-tip:hover .info-pop, .info-tip:focus .info-pop { display: block; }
/* the chances chart, on demand under the page */
#ct-main { flex-wrap: wrap; }
.ct-chances { flex: 1 0 100%; padding: 10px 12px; background: var(--panel); border: 1px solid var(--panel-2); border-radius: 6px; }
.ct-chances-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; font-size: 13px; margin-bottom: 4px; }
.ct-chances-key { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
.ct-chances-head .ct-x { margin-left: auto; }
.ct-chances-svg { display: block; width: 100%; height: 240px; cursor: crosshair; }
.ct-chances-svg .ch-grid { stroke: var(--panel-2); stroke-width: 1; }
.ct-chances-svg .ch-mid { stroke: var(--muted); stroke-dasharray: 3 3; opacity: .6; }
.ct-chances-svg text { fill: var(--muted); font-size: 11px; }
.ct-chances-svg .ch-ylab { text-anchor: end; }
.ct-chances-svg .ch-xlab { text-anchor: middle; }
.ch-ag { fill: color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 40%, transparent); }
.ch-abg { fill: color-mix(in srgb, var(--good) 80%, transparent); background: color-mix(in srgb, var(--good) 80%, transparent); }
.ch-bg { fill: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 40%, transparent); }
.ch-bbg { fill: color-mix(in srgb, var(--bad) 80%, transparent); background: color-mix(in srgb, var(--bad) 80%, transparent); }
.ct-chances-svg .ch-win { fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linejoin: round; }
.ct-chances-svg .ch-dbl { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 3; }
.ct-chances-svg .ch-sel { stroke: var(--accent); stroke-width: 1; }
.ct-chances-svg .ch-dot { fill: var(--accent); stroke: var(--panel); stroke-width: 1.5; }
.ct-chances-svg .ch-hover { stroke: var(--muted); stroke-width: 1; }
.ch-sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }
.ch-sw-win { height: 0; border-top: 2px solid var(--text); border-radius: 0; vertical-align: 3px; }
.ch-tip-table { border-collapse: collapse; font-size: 12px; margin: 4px 0; }
.ch-tip-table th, .ch-tip-table td { padding: 1px 6px; text-align: right; }
.ch-tip-table th { color: var(--muted); font-weight: 400; }
.ch-tip-table td:first-child { text-align: left; }

/* performance: PR by score grid */
.mt-prg-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.mt-prg-head h2 { margin: 0; }
.mt-prg-scroll { overflow-x: auto; }
#mt-prg td.mt-prg-cell { font-weight: 600; background: var(--panel-2); line-height: 1.1; padding: 3px 4px; }
#mt-prg td.mt-prg-cell .mt-prg-n { display: block; font-size: 10px; font-weight: 400; color: var(--muted); }
#mt-prg td.mt-prg-thin { opacity: .45; font-weight: 400; }
.kf.mt-f-at { padding: 2px 10px; font-size: 12px; border-radius: 999px; border-color: var(--accent); color: var(--accent); }

/* ---------- styled tooltips (shared.js styledTips) ---------- */
.tip { position: fixed; z-index: 1000; max-width: 340px; padding: 7px 10px;
  background: rgba(12, 14, 18, 0.96); color: #e8e6e1; font-size: 12.5px; line-height: 1.45;
  white-space: pre-line; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  pointer-events: none; opacity: 0; transform: translateY(-3px);
  transition: opacity 0.12s ease, transform 0.12s ease; font-variant-numeric: tabular-nums; }
.tip.above { transform: translateY(3px); }
.tip.on { opacity: 1; transform: none; }
.tip b { display: block; font-weight: 600; color: var(--accent); margin-bottom: 2px; }
/* the Sh column's tip: their 21 rolls (upper triangle), the hitting ones filled */
.sh-heat { display: grid; grid-template-columns: 12px repeat(6, 16px); gap: 2px; margin-top: 4px;
  white-space: normal; font-size: 10px; line-height: 16px; }
.sh-heat em { display: block; }
.sh-heat i { font-style: normal; color: var(--muted); text-align: center; }
.sh-heat span, .sh-heat-key span { width: 16px; height: 16px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); }
.sh-heat span.hit, .sh-heat-key span.hit { background: rgba(224, 122, 106, 0.9); }
.sh-heat span.home, .sh-heat-key span.home { background: rgba(224, 122, 106, 0.32); }
.sh-heat-key { display: flex; align-items: center; gap: 4px; margin-top: 5px; white-space: normal;
  font-size: 11px; color: var(--muted); }
.sh-heat-key span { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.sh-heat-key span.home { margin-left: 6px; }

/* ---------- scrollbars: thin, in the theme's colours, the accent on hover ---------- */
/* Chrome drops the ::-webkit-scrollbar styles when scrollbar-color is set,
   so the standard properties are for the others (Firefox) only */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 40%, transparent);
  border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--accent); }
::-webkit-scrollbar-corner { background: transparent; }
/* cluster deck browser */
.ck-browse { max-width: 1020px; margin: 0 auto; }
.ck-browse[hidden] { display: none; }
.ck-browse-h { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 16px 0 4px; }
.ck-browse .ck-ref { cursor: pointer; }
.ck-hide .ck-ref .ck-val { visibility: hidden; }
.ck-hide .ck-ref figcaption span { visibility: hidden; }
.ck-viewer { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.72);
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.ck-viewer[hidden] { display: none; }
.ck-viewer-box { background: var(--panel); border-radius: 10px; padding: 12px 14px;
  width: min(900px, 100%); max-height: 100%; overflow: auto; }
.ck-viewer-box svg { width: 100%; height: auto; display: block; border-radius: 8px; }
.ck-viewer-top { display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.ck-viewer-cap { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.ck-viewer-cap > button { font-size: 20px; padding: 6px 16px; }
.ck-viewer-text { flex: 1; text-align: center; min-height: 52px; }
.ck-viewer-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
#ck-viewer-ans b { font-size: 20px; color: var(--accent); margin-right: 6px; }
#ck-viewer-ans span { color: var(--muted); }
#ck-viewer-ans[hidden], #ck-viewer-show[hidden] { display: none; }
#ck-my-decks { display: contents; }
#ck-new-deck { border-style: dashed; }
.ck-deck-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13px; }
.ck-deck-tools input { font-size: 14px; width: 200px; }
.ck-deck-tools .pq-note { margin: 0; }
.ck-deck-tools button.armed { border-color: var(--bad, #c44); color: var(--bad, #c44); }
.ck-ref { position: relative; }
.ck-card-tools { position: absolute; top: 4px; right: 4px; display: none; gap: 3px; }
.ck-ref:hover .ck-card-tools, .ck-ref:focus-within .ck-card-tools { display: flex; }
.ck-card-tools button { padding: 0 6px; font-size: 12px; line-height: 20px; }
.ck-add-card { display: flex; align-items: center; justify-content: center; min-height: 120px;
  border: 2px dashed var(--panel-2); border-radius: 6px; color: var(--muted); cursor: pointer;
  background: none; font-size: 14px; }
.ck-add-card:hover { border-color: var(--accent); color: var(--accent); }
.ck-editor-board { cursor: pointer; }
.ck-editor-note { color: var(--muted); font-size: 12px; margin-top: 6px; }
.ck-editor-fields { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.ck-editor-fields label { display: flex; align-items: center; gap: 6px; flex: 1 1 260px; font-size: 13px; }
.ck-editor-fields input { flex: 1; font-size: 14px; min-width: 0; }
.ck-editor-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
#ck-editor-val { font-size: 20px; color: var(--accent); }
#ck-editor-count { color: var(--muted); font-size: 13px; }
.ck-editor-buttons { display: flex; gap: 6px; }
#qz-class .qz-label { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--panel-2); }
#qz-class .qz-label-head { font-weight: 600; margin-bottom: 4px; }
#qz-class .qz-label-differs { color: var(--accent); font-weight: 400; }
#qz-class .qz-label-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
#qz-class .qz-label-chips .kf { font-size: 12px; padding: 2px 8px; }
#qz-class .qz-label-chips .qz-label-rule { text-decoration: underline dotted; text-underline-offset: 3px; }
#qz-class #qz-label-note { width: 100%; box-sizing: border-box; font-size: 12px; }
.qz-filters select, .qz-filters button { font-size: 12px; }
.qz-cube-sum { margin: 8px 0 14px; font-size: 13px; }
.qz-cube-grid { margin-top: 6px; border-collapse: collapse; }
.qz-cube-grid th, .qz-cube-grid td { padding: 2px 8px; text-align: center; font-weight: 400; }
.qz-cube-grid thead th, .qz-cube-grid tbody th { color: var(--muted); }
.qz-cube-grid td.ok { color: var(--good, #3a3); font-weight: 600; }
.qz-cube-grid td.bad { color: var(--bad, #d44); font-weight: 600; }
#qz-class .qz-label-chips .kf.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.qz-scores-sum { font-size: 13px; margin-bottom: 8px; line-height: 1.5; }
#qz-scores-card .sg-controls { flex-wrap: wrap; gap: 4px; }
/* the quiz's side column is narrow: tighter cells, so 2..7-away fits */
#qz-scores-card .score-table { font-size: 11px; border-spacing: 1px; }
#qz-scores-card .score-table td { min-width: 0; padding: 4px 3px; }
#qz-scores-card .score-table th { padding: 2px 3px; }
#qz-scores-card .score-table th.cb-corner { font-size: 10px; white-space: normal; }
/* the review's "final" toggle: a play shown as where its checkers land */
.rv-analysis-card h2 { display: flex; align-items: center; gap: 6px; }
.rv-analysis-card h2 .rv-final { margin-left: auto; padding: 1px 10px; font-size: 11px; border-radius: 999px;
  text-transform: none; letter-spacing: 0; }
.rv-analysis-card h2 .rv-final[hidden] { display: none; }
/* the review's shots-vs-rest panel under the candidate plays */
.rv-analysis-card h2 .rv-why-btn { margin-left: auto; padding: 1px 10px; font-size: 11px; border-radius: 999px;
  text-transform: none; letter-spacing: 0; }
.rv-analysis-card h2 .rv-why-btn:not([hidden]) + .rv-final { margin-left: 0; }
/* hero view: first of the header's buttons, so it takes the push right */
.rv-analysis-card h2 .rv-heroview { margin-left: auto; padding: 1px 10px; font-size: 11px; border-radius: 999px;
  text-transform: none; letter-spacing: 0; }
.rv-analysis-card h2 .kf, .rv-analysis-kind { white-space: nowrap; }
.rv-analysis-card h2 .rv-heroview + .rv-why-btn,
.rv-analysis-card h2 .rv-heroview ~ .rv-final { margin-left: 0; }
.rv-analysis-card h2 .rv-why-btn[hidden] { display: none; }
.rv-why-open .rv-analysis:has(.xg-moves) { max-height: 170px; }
.rv-why { margin-top: 8px; padding-top: 8px; border-top: 1px solid #2c313c; font-size: 13px; }
.rv-why[hidden] { display: none; }
.rv-why-head { font-size: 14px; }
.rv-why-sub { margin: 2px 0 6px; font-size: 12px; }
.rv-why-parts { font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.rv-why-parts td { padding: 1px 10px 1px 0; }
.rv-why-parts td.rv-why-n { color: var(--muted); text-align: right; }
.rv-why-parts td.rv-why-eq { text-align: right; }
.rv-why-rolls { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.rv-why-roll { padding: 1px 6px; border-radius: 4px; font-size: 12px; cursor: default; white-space: nowrap; }
.rv-why-roll.neg { background: rgba(224, 122, 106, 0.22); }
.rv-why-roll.pos { background: rgba(90, 169, 230, 0.22); }
.rv-why-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.rv-why-cell { display: flex; justify-content: space-between; align-items: center; padding: 2px 5px;
  border-radius: 4px; border: 1px solid #2c313c; font-size: 12px; cursor: default;
  font-variant-numeric: tabular-nums; }
.rv-why-cell b { font-weight: 600; }
.rv-why-cell i { font-style: normal; font-size: 10px; }

/* an illegal play (transcribed as it was made): a red stop mark in the log
   and the decision card, a tag on its analysis row; not counted in the PR */
.gl-illegal { display: inline-flex; vertical-align: -2px; margin-left: 5px; color: var(--bad); cursor: help; }
.gl-illegal svg { width: 13px; height: 13px; display: block; }
.row-tag-illegal { background: var(--bad); color: #10161e; }
.tx-illegal-word { color: var(--bad); font-style: normal; }

/* ---------- phones (shared.js adds the ☰ button) ---------- */

header .nav-toggle { display: none; }
@media (max-width: 700px) {
  header { padding: 8px 12px; gap: 8px 10px; }
  h1 { margin-right: 4px; }
  header .nav-toggle { display: inline-block; font-size: 16px; padding: 2px 10px; line-height: 1.4; }
  header:not(.nav-open) > .nav-link { display: none; }
  header.nav-open > .nav-link { order: 1; }
  header.nav-open::after { content: ""; flex-basis: 100%; order: 0; }
  header .theme-btn { font-size: 12px; padding: 3px 9px; }
}

/* quiz (and review-style analysis) on phones */
@media (max-width: 700px) {
  #qz-main { padding: 8px; }
  #qz-play { gap: 10px; }
  #qz-context-bar { gap: 6px; }
  #qz-copy, #qz-rolls, #qz-end { font-size: 13px; padding: 4px 10px; }
  #qz-question { font-size: 15px; margin: 10px 0 6px; }
  .rv-analysis:has(.xg-moves) { overflow-x: auto; }
  .rv-analysis .xg-moves th, .rv-analysis .xg-moves td { padding: 5px 3px; font-size: 14px; }
  .rv-analysis .xg-line { font-size: 15px; }
  .rv-analysis .xg-chances { font-size: 12px; }
  .qz-notes { font-size: 14px; }
}
