/* ============================================================
   Chess Board — chess.com-inspired dark theme
   ============================================================ */
:root {
  --bg: #302e2b;
  --bg-deep: #262522;
  --bg-deeper: #1f1e1b;
  --bg-raised: #3c3a37;
  --line: #45423e;
  --text: #ffffff;
  --text-2: #c3c2c1;
  --muted: #989795;

  --green: #81b64c;
  --green-hi: #95c95f;
  --green-shadow: #45753c;

  --sq-light: #ebecd0;
  --sq-dark: #739552;
  --hl-light: #f5f682;
  --hl-dark: #b9ca43;

  --c-brilliant: #26c2a3;
  --c-great: #749bbf;
  --c-best: #81b64c;
  --c-excellent: #81b64c;
  --c-good: #95b776;
  --c-book: #a88865;
  --c-inaccuracy: #f7c631;
  --c-mistake: #ffa459;
  --c-miss: #ff7769;
  --c-blunder: #fa412d;

  --radius: 6px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}
button { font-family: inherit; color: inherit; }
[hidden] { display: none !important; }

/* #app is sized by JS (--W/--H). With the 90° option it is rotated as a whole. */
#app {
  position: fixed; left: 0; top: 0;
  width: var(--W, 100vw); height: var(--H, 100vh);
  overflow: hidden;
  transform-origin: 0 0;
}
#app.rot90 { transform: translateX(var(--vw)) rotate(90deg); }

.screen { position: absolute; inset: 0; display: none; }
.screen.active { display: block; }

/* ---------------- Buttons ---------------- */
.btn {
  border: 0; cursor: pointer; border-radius: 8px;
  font-weight: 800; font-size: 17px; padding: 12px 18px;
  transition: filter .12s, transform .05s;
}
.btn:active { transform: translateY(2px); }
.btn-primary {
  background: var(--green); color: #fff;
  box-shadow: 0 5px 0 var(--green-shadow);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.btn-primary:hover { background: var(--green-hi); }
.btn-primary:active { box-shadow: 0 2px 0 var(--green-shadow); transform: translateY(3px); }
.btn-secondary { background: var(--bg-raised); color: var(--text-2); box-shadow: 0 4px 0 #23211f; }
.btn-secondary:hover { filter: brightness(1.12); }
.btn-danger { background: #c9422b; color: #fff; box-shadow: 0 4px 0 #7e2516; }
.btn-xl { font-size: 26px; padding: 18px; width: 100%; }

.icon-btn {
  background: transparent; border: 0; cursor: pointer;
  width: 40px; height: 40px; border-radius: 6px;
  font-size: 22px; color: var(--text-2);
}
.icon-btn:hover { background: var(--bg-raised); color: #fff; }

/* ---------------- Board ---------------- */
.board-frame {
  position: relative;
  width: var(--board); height: var(--board);
  border-radius: 4px; overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.board {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  touch-action: none;
}
.sq { position: relative; }
.sq.light { background: var(--sq-light); }
.sq.dark { background: var(--sq-dark); }
.sq.light.hl { background: var(--hl-light); }
.sq.dark.hl { background: var(--hl-dark); }
.sq.check {
  background-image: radial-gradient(ellipse at center, rgba(255,0,0,1) 0%, rgba(231,0,0,1) 25%, rgba(169,0,0,0) 89%, rgba(158,0,0,0) 100%);
}
.sq.drop-target::before {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 calc(var(--board) * 0.006 + 2px) rgba(255,255,255,.65);
  z-index: 1;
}

.coord {
  position: absolute; font-weight: 700; line-height: 1;
  font-size: calc(var(--board) * 0.026);
  pointer-events: none; z-index: 1;
}
.sq.light .coord { color: var(--sq-dark); }
.sq.dark .coord { color: var(--sq-light); }
.coord.rank { left: 4%; top: 4%; }
.coord.file { right: 5%; bottom: 3%; }
.coord.flip { transform: rotate(180deg); }
.coord.rank.flip { left: auto; top: auto; right: 4%; bottom: 4%; }
.coord.file.flip { right: auto; bottom: auto; left: 5%; top: 3%; }

.piece {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 2; pointer-events: none;
  transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(var(--rot, 0deg));
  will-change: transform;
}
.piece.anim { transition: transform .16s ease-out; }
.piece.ghosted { opacity: .35; }
.ftf .piece.pb { --rot: 180deg; }

.hint::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 33%; height: 33%; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(0,0,0,.14); z-index: 3; pointer-events: none;
}
.hint.cap::after {
  width: 100%; height: 100%; background: transparent;
  box-shadow: inset 0 0 0 calc(var(--board) * 0.011) rgba(0,0,0,.14);
}

.drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none;
  will-change: transform;
}

/* Promotion picker */
.promo {
  position: absolute; z-index: 20;
  width: calc(var(--board) / 8);
  background: #fff; border-radius: 3px;
  box-shadow: 0 6px 18px rgba(0,0,0,.55);
  display: flex; flex-direction: column; overflow: hidden;
}
.promo.from-bottom { flex-direction: column-reverse; }
.promo button {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  height: calc(var(--board) / 8); width: 100%; position: relative;
}
.promo button img { width: 100%; height: 100%; display: block; transition: transform .1s; }
.promo button:hover img { transform: scale(1.08); }
.promo button.cancel { height: calc(var(--board) / 16); background: #f1f1f1; color: #8b8987; font-size: calc(var(--board) / 30); font-weight: 700; }
.promo.ftf-flip button img { transform: rotate(180deg); }
.promo-veil { position: absolute; inset: 0; z-index: 19; background: rgba(0,0,0,.35); }

/* Arrow + badge overlay (review) */
.board-overlay { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.board-overlay svg { width: 100%; height: 100%; display: block; }
.sq-badge {
  position: absolute; z-index: 6; pointer-events: none;
  width: calc(var(--board) / 8 * 0.42); height: calc(var(--board) / 8 * 0.42);
  transform: translate(-60%, -40%);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.4));
}

/* ---------------- Setup ---------------- */
.setup-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 32px; padding: 24px;
}
.layout-portrait .setup-wrap { flex-direction: column; gap: 18px; }
.setup-preview .board-frame { --board: var(--preview); }
.setup-card {
  background: var(--bg-deep); border-radius: 10px;
  padding: 22px; width: min(440px, 100%);
  display: flex; flex-direction: column; gap: 14px;
  max-height: 100%; overflow: auto;
}
.setup-title { display: flex; align-items: center; gap: 10px; }
.setup-title img { width: 44px; height: 44px; }
.setup-title h1 { margin: 0; font-size: 30px; font-weight: 800; }
.setup-sub { margin: -6px 0 2px; color: var(--muted); font-size: 15px; }

.tc-group-label {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px; color: var(--text-2);
  margin: 4px 0 6px;
}
.tc-group-label .ico { font-size: 16px; }
.tc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tc-btn {
  background: var(--bg-raised); border: 2px solid transparent;
  border-radius: 6px; padding: 12px 4px; cursor: pointer;
  font-weight: 700; font-size: 16px; color: var(--text-2);
}
.tc-btn:hover { filter: brightness(1.12); }
.tc-btn.selected { border-color: var(--green); color: #fff; background: #3e4a33; }

.custom-tc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.custom-tc label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.custom-tc input {
  background: var(--bg-deeper); border: 1px solid var(--line); color: #fff;
  border-radius: 6px; padding: 10px; font-size: 17px; font-weight: 700; width: 100%;
  -webkit-user-select: text; user-select: text;
}

.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; color: var(--text-2); font-weight: 600; }
.toggle input { display: none; }
.toggle .track {
  flex: none; width: 42px; height: 24px; border-radius: 12px;
  background: #5a5855; position: relative; transition: background .15s;
}
.toggle .track::after {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .15s;
}
.toggle input:checked + .track { background: var(--green); }
.toggle input:checked + .track::after { transform: translateX(18px); }

/* ---------------- Game ---------------- */
.game-grid {
  position: absolute; inset: 0;
  display: grid;
  padding: var(--gutter);
  gap: var(--gap);
}
.layout-portrait .game-grid {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr var(--board) 1fr;
  grid-template-areas: "b" "board" "w";
}
.layout-landscape .game-grid {
  grid-template-columns: 1fr var(--board) 1fr;
  grid-template-rows: 1fr;
  grid-template-areas: "w board b";
}
#panel-b { grid-area: b; }
#panel-w { grid-area: w; }
.board-area { grid-area: board; display: flex; align-items: center; justify-content: center; }

.paused-overlay {
  position: absolute; inset: 0; z-index: 30;
  background: rgba(20,19,17,.72);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.paused-card { text-align: center; font-size: calc(var(--board) * .06); font-weight: 800; }
.paused-card small { display: block; font-size: .4em; color: var(--text-2); font-weight: 600; margin-top: 6px; }
.paused-icon { font-size: 1.4em; letter-spacing: -.1em; margin-bottom: 4px; }

/* Panels: sized by the grid; inner content may be rotated 180° for the far player */
.panel { position: relative; min-width: 0; min-height: 0; container-type: size; }
.panel-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: 10px;
}
.panel.flipped .panel-inner { transform: rotate(180deg); }

/* portrait: info row + clock on the line nearest the board, actions under */
.layout-portrait .panel-inner { justify-content: flex-start; }
.layout-portrait .p-top { display: flex; align-items: center; gap: 12px; }
.layout-portrait .p-top .p-info { flex: 1; min-width: 0; }

/* landscape: column, content hugs the player's own edge */
.layout-landscape .panel-inner { justify-content: flex-end; }
.layout-landscape .panel:not(.flipped)[data-color="b"] .panel-inner { justify-content: flex-start; }
.layout-landscape .p-top { display: flex; flex-direction: column; gap: 10px; }

.p-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  flex: none; width: 46px; height: 46px; border-radius: 4px;
  background: var(--bg-raised); display: grid; place-items: center; overflow: hidden;
}
.avatar img { width: 92%; height: 92%; }
.p-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.p-name { font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.turn-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(129,182,76,.25); visibility: hidden; }
.panel.to-move .turn-dot { visibility: visible; }
.p-captured { display: flex; align-items: center; min-height: 20px; flex-wrap: wrap; }
.cap-group { display: inline-flex; margin-right: 4px; }
.cap-group img { width: 20px; height: 20px; margin-right: -9px; }
.cap-group img:last-child { margin-right: 0; }
.adv { font-size: 13px; color: var(--muted); font-weight: 700; margin-left: 6px; }

.clock {
  flex: none;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  border-radius: 4px; padding: 6px 12px;
  font-variant-numeric: tabular-nums; font-weight: 700;
  font-size: var(--clock-font, 34px);
  min-width: 6.2ch;
  transition: background .15s, color .15s, opacity .15s;
}
.panel[data-color="w"] .clock { background: #989795; color: #4a4846; }
.panel[data-color="w"].to-move .clock { background: #ffffff; color: #312e2b; }
.panel[data-color="b"] .clock { background: #2b2927; color: #7c7a78; }
.panel[data-color="b"].to-move .clock { background: #262421; color: #ffffff; box-shadow: inset 0 0 0 2px #4b4847; }
.panel.low .clock { background: #e02828 !important; color: #fff !important; }
.clock-icon { width: .55em; height: .55em; opacity: .0; }
.panel.to-move.running .clock-icon { opacity: .85; animation: spin 2s steps(8) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.clock.untimed { font-size: 18px; min-width: 0; padding: 8px 12px; }

.p-status {
  min-height: 0; font-size: 15px; font-weight: 700; color: var(--text-2);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.p-status:empty { display: none; }
.p-status .warn { color: #ff6b5a; }
.p-status .btn { padding: 8px 14px; font-size: 15px; }

.p-actions { display: flex; gap: 8px; }
.act {
  flex: 1; min-width: 0;
  background: var(--bg-deep); border: 0; border-radius: 6px;
  padding: 10px 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 700; font-size: 14px; color: var(--text-2);
}
.act svg { width: 20px; height: 20px; flex: none; }
.act:hover { background: var(--bg-raised); color: #fff; }
.act:disabled { opacity: .35; cursor: default; }
.act.armed { background: #8a2c1c; color: #fff; }
.layout-landscape .p-actions { flex-wrap: wrap; }
.layout-landscape .act { flex: 1 1 calc(50% - 4px); }

.p-bottom { display: flex; flex-direction: column; gap: 10px; }
.layout-portrait .p-bottom { flex-direction: row; align-items: center; }
.layout-portrait .p-status { flex: 1; min-width: 0; order: 2; }
.layout-portrait .p-actions { flex: none; }
.layout-portrait .act { flex: none; width: 50px; }
.layout-portrait .act span { display: none; }
.layout-landscape .p-status { order: -1; }
/* A prompt (draw offer, resign confirm, game over) takes the row in narrow portrait panels */
@container (max-width: 700px) {
  .layout-portrait .p-bottom:has(.p-status .btn) .p-actions { display: none; }
}

/* Roomier / tighter panels */
@container (min-width: 620px) and (min-height: 124px) {
  .layout-portrait .act { width: auto; padding: 10px 14px; }
  .layout-portrait .act span { display: inline; }
}
@container (max-height: 100px) {
  .layout-portrait .panel-inner { gap: 6px; }
  .layout-portrait .avatar { width: 34px; height: 34px; }
  .layout-portrait .act { padding: 6px 4px; width: 42px; }
}
@container (max-height: 80px) {
  .layout-portrait .p-actions { display: none; }
}
@container (max-width: 190px) {
  .layout-landscape .act span { display: none; }
  .layout-landscape .act { flex-basis: calc(33% - 6px); }
}

/* ---------------- Modal ---------------- */
.modal-layer {
  position: absolute; inset: 0; z-index: 200;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal {
  background: var(--bg-deep); border-radius: 12px;
  width: min(400px, 100%); max-height: 100%; overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  transition: transform .2s;
}
.modal.flipped { transform: rotate(180deg); }
.modal-head { padding: 22px 22px 10px; text-align: center; }
.modal-head h2 { margin: 0; font-size: 28px; font-weight: 800; }
.modal-head p { margin: 6px 0 0; color: var(--muted); font-size: 15px; font-weight: 600; }
.modal-body { padding: 10px 22px 22px; display: flex; flex-direction: column; gap: 12px; }
.modal-trophy { font-size: 46px; line-height: 1; margin-bottom: 6px; }
.result-players { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 4px 0 8px; }
.result-player { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; color: var(--text-2); }
.result-player .avatar { width: 64px; height: 64px; }
.result-player.winner .avatar { box-shadow: 0 0 0 3px var(--green); }
.result-score { font-size: 22px; font-weight: 800; color: var(--muted); }
.modal-row { display: flex; gap: 10px; }
.modal-row .btn { flex: 1; }
.seg { display: flex; background: var(--bg-deeper); border-radius: 8px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 6px;
  font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer;
}
.seg button.on { background: var(--bg-raised); color: #fff; }
.setting { display: flex; flex-direction: column; gap: 6px; }
.setting-label { font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.setting-hint { font-size: 12px; color: var(--muted); }

.toast {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #1b1a18; color: #fff; padding: 10px 18px; border-radius: 8px;
  font-weight: 700; z-index: 300; box-shadow: 0 6px 20px rgba(0,0,0,.5);
}

/* ---------------- Review ---------------- */
.review-grid { position: absolute; inset: 0; display: grid; gap: var(--gap); padding: var(--gutter); }
.layout-landscape .review-grid { grid-template-columns: auto minmax(0, 1fr); }
.layout-portrait .review-grid { grid-template-rows: auto minmax(0, 1fr); }
.review-board-area { display: flex; gap: 8px; align-items: center; justify-content: center; }

.eval-bar {
  position: relative; width: var(--evalw); height: var(--board);
  background: #403d39; border-radius: 3px; overflow: hidden; flex: none;
}
.eval-fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
  background: #fff; transition: height .35s ease;
}
.eval-bar.flipped .eval-fill { bottom: auto; top: 0; }
.eval-text {
  position: absolute; left: 0; right: 0; text-align: center;
  font-size: calc(var(--evalw) * .42); font-weight: 800; bottom: 4px; color: #403d39;
}
.eval-text.top { bottom: auto; top: 4px; color: #fff; }

.review-panel {
  background: var(--bg-deep); border-radius: 8px;
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.review-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 8px; border-bottom: 1px solid #1a1917; background: var(--bg-deeper);
}
.review-title { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.review-title .star { color: var(--green); font-size: 20px; }

.review-progress { padding: 18px 16px; }
.rv-progress-label { font-weight: 700; color: var(--text-2); margin-bottom: 10px; font-size: 15px; }
.rv-progress-bar { height: 10px; background: var(--bg-deeper); border-radius: 5px; overflow: hidden; }
#rv-progress-fill { height: 100%; width: 0; background: var(--green); transition: width .2s; }

/* children keep their natural height; the body scrolls instead of squashing them */
.review-body > * { flex-shrink: 0; }
.review-body { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }

.coach {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-raised); border-radius: 8px; padding: 12px;
  min-height: 64px;
  position: sticky; top: -12px; z-index: 2;
  box-shadow: 0 -12px 0 var(--bg-deep), 0 6px 10px rgba(0,0,0,.25);
}
.coach-badge { width: 36px; height: 36px; flex: none; }
.coach-badge:empty { display: none; }
.coach-text { flex: 1; min-width: 0; }
.coach-line { font-weight: 800; font-size: 16px; }
.coach-sub { color: var(--text-2); font-size: 14px; margin-top: 3px; font-weight: 600; }
.coach-sub:empty { display: none; }
.coach-eval {
  flex: none; font-weight: 800; font-size: 14px; padding: 4px 8px; border-radius: 4px;
  background: #fff; color: #312e2b; font-variant-numeric: tabular-nums;
}
.coach-eval.neg { background: #1f1e1b; color: #fff; }
.coach-eval:empty { display: none; }
.coach { flex-wrap: wrap; }
.best-line { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; }
.best-line:empty { display: none; }
.bl-actions { display: flex; gap: 8px; }
.bl-actions .btn { padding: 9px 14px; font-size: 15px; box-shadow: 0 3px 0 var(--green-shadow); }
.bl-actions .btn-secondary { box-shadow: 0 3px 0 #23211f; }
.bl-actions .btn:disabled { opacity: .4; cursor: default; }
.bl-moves { display: flex; flex-wrap: wrap; gap: 2px 4px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.bl-moves .g { display: inline-flex; align-items: center; white-space: nowrap; }
.bl-moves .n { color: var(--muted); padding: 3px 2px 3px 4px; }
.bl-moves .m { padding: 3px 6px; border-radius: 4px; cursor: pointer; }
.bl-moves .m:hover { background: #4b4847; }
.bl-moves .m.cur { background: var(--green); color: #fff; }

.eval-graph {
  width: 100%; height: 96px; flex: none; border-radius: 6px;
  background: #403d39; cursor: pointer; display: block;
}

.rv-summary { display: flex; flex-direction: column; gap: 2px; }
.acc-row { display: grid; grid-template-columns: 1fr 72px 72px; align-items: center; gap: 8px; margin-bottom: 8px; }
.acc-label { font-weight: 700; color: var(--text-2); }
.acc-box { text-align: center; border-radius: 6px; padding: 8px 0; font-weight: 800; font-size: 20px; }
.acc-box.w { background: #fff; color: #312e2b; }
.acc-box.b { background: #1f1e1b; color: #fff; border: 1px solid #4b4847; }
.acc-sub { grid-column: 2 / span 2; display: grid; grid-template-columns: 1fr 1fr; text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: -4px; }
.cls-row { display: grid; grid-template-columns: 1fr 72px 72px; align-items: center; gap: 8px; padding: 3px 0; font-weight: 700; }
.cls-row .lbl { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.cls-row .lbl svg { width: 22px; height: 22px; flex: none; }
.cls-row .cnt { text-align: center; font-size: 16px; }
.cls-row .cnt.zero { opacity: .35; }

.rv-opening { font-size: 13px; color: var(--muted); font-weight: 700; }
.rv-opening:empty { display: none; }

.move-list { display: grid; grid-template-columns: 38px 1fr 1fr; font-size: 15px; font-weight: 700; }
.move-list .num { color: var(--muted); padding: 5px 0; text-align: right; padding-right: 8px; }
.move-list .mv {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; border-radius: 4px; cursor: pointer; color: var(--text-2);
}
.move-list .mv:nth-of-type(odd) { }
.move-list .mv:hover { background: var(--bg-raised); }
.move-list .mv.cur { background: #4b4847; color: #fff; border-bottom: 2px solid #8c8a88; }
.move-list .mv svg { width: 17px; height: 17px; flex: none; }
.move-list .row-bg { grid-column: 1 / -1; }

.review-nav {
  display: flex; gap: 6px; padding: 8px; background: var(--bg-deeper);
  border-top: 1px solid #1a1917;
}
.nav-btn {
  flex: 1; border: 0; background: var(--bg-raised); border-radius: 6px;
  padding: 12px 0; font-size: 18px; cursor: pointer; color: var(--text-2); font-weight: 800;
}
.nav-btn:hover { filter: brightness(1.15); color: #fff; }
#rv-next { background: var(--green); color: #fff; box-shadow: 0 3px 0 var(--green-shadow); }
#rv-pgn { flex: .8; font-size: 13px; }
