:root {
  --red: #e05b4c;
  --yellow: #e8b53a;
  --blue: #4c8fe0;
  --green: #4faa60;
  --ink: #10171a;
  --panel: #18231f;
  --line: rgba(255, 255, 255, 0.14);
  --text: #eef5f0;
  --muted: #9db2a8;
  --accent: #ffd166;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; background: #0d1412; color: var(--text);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  overscroll-behavior: none; touch-action: manipulation;
}
#app { position: relative; width: 100%; height: 100%; overflow: hidden; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.hidden { display: none !important; }

/* ---------- 大厅 ---------- */
#lobby { align-items: center; justify-content: safe center; overflow-y: auto; gap: 14px; padding: 24px; text-align: center; }
.logo {
  margin: 0; font-size: clamp(30px, 9vw, 52px); letter-spacing: .12em;
  color: var(--accent); text-shadow: 0 6px 0 rgba(0, 0, 0, .45);
}
.sub { margin: 0; color: var(--muted); font-size: 14px; }
.lobby-btns { display: flex; flex-direction: column; gap: 12px; width: min(420px, 92vw); margin-top: 8px; }
.big-btn {
  padding: 16px 18px; font-size: 19px; font-weight: 700; color: #241a06;
  background: linear-gradient(180deg, #ffe08a, #f0b740); border: 0; border-radius: 14px;
  box-shadow: 0 5px 0 #a97a1e, 0 10px 20px rgba(0, 0, 0, .35); cursor: pointer;
  touch-action: manipulation;
}
.big-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #a97a1e; }
.big-btn:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; box-shadow: none; transform: none; }
.ranked-btn { background: linear-gradient(180deg, #e5d5ff, #bc9deb); color: #29183c; box-shadow: 0 5px 0 #70529b, 0 10px 20px #0005; }
.ranked-btn:active { box-shadow: 0 2px 0 #70529b; }
.rank-profile { margin: 0 0 2px; color: #e4d3ff; font-size: 13px; }
.seat-info .seat-rank { color: #e5d3ff; font-weight: 700; }
.rank-result { margin: 12px 0; color: #e5d3ff; font-weight: 750; }
.howto { width: min(520px, 92vw); color: var(--muted); font-size: 13px; text-align: left; line-height: 1.6; }
.howto summary { color: var(--accent); cursor: pointer; }

/* ---------- 月面牌局 ---------- */
#table {
  --table-ink: #f8f1ff;
  --table-muted: #c3b7db;
  --table-active: #ffe08b;
  --table-line: #514669;
  --table-panel: #211a32;
  background: radial-gradient(ellipse at 69% 16%, #312344, #181222 57%, #110e19 100%);
  color: var(--table-ink);
  align-items: center; overflow-y: auto; overscroll-behavior: contain;
  padding: max(20px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}
.table-frame {
  position: relative; isolation: isolate; flex: none; width: min(100%, 1120px);
  min-height: min(100%, 780px); margin-block: auto; display: grid; gap: 12px;
  grid-template:
    "brand opponent" auto
    "console stage" minmax(290px, 1fr)
    "log player" auto
    "footer player" auto / clamp(216px, 24%, 254px) minmax(0, 1fr);
}
.table-frame::before {
  content: ""; z-index: -1; grid-area: 1 / 1 / -1 / 2; position: absolute; inset: 0;
  border: 1px solid var(--table-line); border-radius: 24px;
  background: linear-gradient(155deg, #30233e, var(--table-panel) 52%);
}
.table-brand {
  grid-area: brand; display: flex; align-items: center; gap: 11px; min-width: 0; padding: 16px 14px;
}
.mission-patch { width: 53px; height: 53px; flex: none; }
.table-kicker {
  display: block; color: #d4bee9; font: 700 9px/1.2 system-ui, sans-serif; letter-spacing: .18em;
}
.table-brand h2 { margin: 3px 0 0; color: #ffe4a2; font-size: clamp(18px, 2vw, 23px); line-height: 1.2; }

.opp-rack, .hand-wrap {
  min-width: 0; border: 1px solid var(--table-line); border-radius: 20px; background: var(--table-panel);
}
.opp-rack {
  grid-area: opponent; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 12px; padding: 10px 16px;
}
.opp-rack > .count-pill { justify-self: end; }
.seat {
  min-width: 0; display: flex; align-items: center; gap: 8px; width: max-content; max-width: 100%;
  padding: 3px 9px 3px 3px; border: 1px solid transparent; border-radius: 999px;
}
.seat.active { border-color: #c9a451; background: #3f312e; }
.seat-avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: #ffda81; color: #322030; font-size: 14px; font-weight: 800;
}
.seat-opp .seat-avatar { background: #cbbaf9; }
.seat-info { min-width: 0; display: grid; }
.seat-info b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-info span { color: var(--table-muted); font-size: 11px; }
.seat.active .seat-info span { color: var(--table-active); }
.rack-label { color: var(--table-muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.count-pill, .deck-count {
  display: inline-block; padding: 3px 8px; border-radius: 999px; background: #423653; color: #f5e9ff;
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.opp-fan { display: flex; justify-content: center; min-width: 1px; min-height: 58px; padding-bottom: 4px; }
.opp-fan .card-back {
  flex: none; width: 38px; height: 54px; border-radius: 6px;
  box-shadow: 0 4px 7px #080611a0; transform: translateY(var(--fan-drop)) rotate(var(--fan-tilt));
}
.opp-fan .card-back + .card-back { margin-inline-start: -15px; }

.middle {
  grid-area: stage; position: relative; isolation: isolate; min-width: 0; display: grid;
  align-content: center; justify-items: center; gap: 12px; padding: 50px 14px 32px;
  border: 1px solid #69538c; border-radius: 38px 38px 38px 12px;
  background: radial-gradient(ellipse at 50% 64%, #4e3868, #302449 60%, #251c39);
  box-shadow: inset 0 0 0 6px #20182e80, inset 0 1px #a990bf46;
}
.orbit-map { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.stage-mark, .stage-index { position: absolute; top: 18px; color: #ddd0f5; }
.stage-mark {
  left: 22px; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .16em;
}
.stage-mark i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ffe08b; box-shadow: 0 0 9px #ffe08b9e; }
.stage-index { right: 22px; font-size: 17px; line-height: 1; }
.piles { display: flex; align-items: flex-start; justify-content: center; gap: clamp(32px, 6vw, 88px); }
.pile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pile-discard { margin-top: 18px; }
.pile-label {
  padding: 3px 12px; border: 1px solid #796698; border-radius: 999px; background: #2b2141;
  color: #eee3ff; font-size: 12px; font-weight: 750; white-space: nowrap;
}
.pile-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 10px; }
.pile-btn:disabled { cursor: default; }
.pile-btn:enabled:hover .card-back { outline: 2px solid #d2baf9; outline-offset: 2px; }
.pile-btn.draw-needed:enabled .card-back {
  position: relative; outline: 3px solid #ffcf62; outline-offset: 2px;
  box-shadow: 0 0 17px #ffc968aa, 0 6px 13px #150d25a0;
}
.pile-btn.draw-needed:enabled .card-back::after {
  content: ""; position: absolute; inset: -4px; border-radius: inherit;
  box-shadow: 0 0 14px 3px #f9ca62; pointer-events: none; opacity: .42;
}
.piles .card-back, .piles .card.big { width: 96px; height: 142px; }
.deck-count { position: absolute; top: -5px; right: -12px; background: #ffe5a4; color: #2e2036; border: 1px solid #a9814b; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.flag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 750; border: 1px solid #796698; background: #231a35;
}
#flagColor::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--flag-color, var(--green)); }
.flag.red { --flag-color: var(--red); }
.flag.yellow { --flag-color: var(--yellow); }
.flag.blue { --flag-color: var(--blue); }
.flag.green { --flag-color: var(--green); }
#flagPending { background: #643b4b; color: #ffe3d9; border-color: #ae6774; }

.table-console { grid-area: console; align-self: start; min-width: 0; display: grid; gap: 13px; padding: 0 15px; }
.turn-box {
  display: grid; gap: 3px; padding: 12px 14px; border: 1px solid #625172; border-inline-start: 4px solid #b79add;
  border-radius: 5px 14px 14px 5px; background: #382b4a;
}
#table:has(.seat-me.active) .turn-box { border-inline-start-color: var(--table-active); background: #443348; }
.turn-label { color: var(--table-muted); font-size: 11px; letter-spacing: .13em; }
#flagTurn { font-size: 23px; line-height: 1.15; color: #ffe4a2; white-space: nowrap; }
#table .hint { color: #eee2f6; line-height: 1.45; text-align: left; overflow-wrap: anywhere; }
#table .actions { justify-content: flex-start; }

.hand-wrap { grid-area: player; align-self: end; padding: 8px 14px 4px; box-shadow: inset 0 3px #b695d830; }
.hand-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-inline: 2px; }
.hand-tools { flex: none; display: flex; align-items: center; gap: 8px; }
.table-log {
  grid-area: log; min-width: 0; align-self: end; margin: 0 15px; padding-top: 10px;
  border-top: 1px dashed #665379; color: var(--table-muted);
}
.log-title { display: block; margin-bottom: 5px; color: #e9d7ff; font-size: 12px; letter-spacing: .1em; }
.turn-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12px; line-height: 1.35; }
.turn-log li { overflow-wrap: anywhere; }
.turn-log li::before { content: "·"; margin-inline-end: 5px; color: #e8c47d; }
.turn-log li:last-child { color: var(--table-ink); }
.table-footer { grid-area: footer; display: flex; align-items: center; gap: 7px; padding: 0 15px 14px; }
.card-back, .card {
  width: 74px; height: 108px; border-radius: 10px; display: grid; place-items: center;
  background: #24332c; border: 2px solid rgba(255, 255, 255, .2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .45);
}
.card-back {
  background:
    url('../assets/cards/yellow/back.webp?v=5') center / 100% 100% no-repeat,
    repeating-linear-gradient(45deg, #2f463b 0 6px, #263a31 6px 12px);
  background-origin: border-box;
  border-color: transparent;
}
.card.big { width: 96px; height: 140px; font-size: 30px; font-weight: 800; }
.card { color: #0e1512; position: relative; }
.card.red { background: linear-gradient(160deg, #ff8a7a, #d0412f); }
.card.yellow { background: linear-gradient(160deg, #ffe08a, #d9a521); }
.card.blue { background: linear-gradient(160deg, #8ec2ff, #2f6fc4); }
.card.green { background: linear-gradient(160deg, #9ae2a8, #3d8a4e); }
.card.wild { background: linear-gradient(135deg, #e05b4c, #e8b53a, #4c8fe0, #4faa60); }
.card .corner { position: absolute; top: 5px; left: 7px; font-size: 12px; font-weight: 700; opacity: .85; }
.card .face { font-size: 26px; line-height: 1; }
/* 启动预载：卡面没就绪之前挡住界面，进度条只报真实完成数 */
.boot {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 38%, #23372c, #131c17 62%);
}
.boot.hidden { display: none; }
.boot-inner { text-align: center; padding: 0 24px; }
.boot-title { margin: 0 0 14px; font-size: 20px; font-weight: 800; color: var(--accent); letter-spacing: .12em; }
.boot-bar {
  width: min(240px, 62vw); height: 6px; margin: 0 auto 12px;
  border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden;
}
.boot-bar span { display: block; width: 0; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #bfe08a); transition: width .12s linear; }
.boot-text { margin: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
body.booting, .booting #app { visibility: hidden; }
body.booting .boot, .booting .boot { visibility: visible; }

.card-art {
  position: absolute; inset: -2px; display: block;
  width: calc(100% + 4px); height: calc(100% + 4px);
  border-radius: inherit; pointer-events: none;
}

.hint { margin: 0; text-align: center; font-size: 13px; color: var(--accent); min-height: 18px; }
.log { margin: 0; text-align: center; font-size: 11.5px; color: var(--muted); min-height: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hand-wrap { min-width: 0; }
.hand {
  overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #9a81bb transparent;
  -webkit-overflow-scrolling: touch; touch-action: pan-x;
}
.hand-cards { display: flex; width: max-content; min-width: 100%; justify-content: center; gap: 7px; padding: 14px 10px 12px; }
.hand .card { flex: 0 0 auto; width: 76px; height: 112px; font-size: 22px; }
.hand .card.group-start { margin-inline-start: 8px; }
.hand .card.playable {
  outline: 2px solid var(--table-active); outline-offset: 1px; cursor: pointer;
  transform: translateY(-4px);
}
.hand .card.dim { filter: saturate(.72) brightness(.92); }
.hand .card.playable:focus-visible, .hand .card.playable:hover { z-index: 3; }
.actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.act {
  padding: 11px 16px; border-radius: 12px; font-size: 15px; font-weight: 700;
  color: #10201a; background: #cfe8d6; border: 0; box-shadow: 0 3px 0 #7f9c88; cursor: pointer;
  touch-action: manipulation;
}
.act:active { transform: translateY(2px); box-shadow: 0 1px 0 #7f9c88; }
.act:disabled { opacity: .38; box-shadow: none; transform: none; cursor: not-allowed; }
.act.danger { background: #ffc7bd; box-shadow: 0 3px 0 #a5534a; }
.act.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); box-shadow: none; }
#table .act {
  min-height: 44px; padding: 7px 10px; border-radius: 10px; font-size: 13px;
  border: 1px solid #816ba0; box-shadow: none; background: #3f3255; color: #f8edff;
}
#table .act.call { border-color: #d2a857; background: #ffdb88; color: #33233a; }
#table .act.danger { border-color: #ce8b8d; background: #f1adab; color: #3f243b; }
#table .act.ghost { border-color: #655477; background: transparent; color: #d8c8e8; }
#table #btnSortHand { white-space: nowrap; }
#table #btnSortHand[aria-pressed="true"] { border-color: #c5a5ef; background: #d8befb; color: #29183c; }
#table .act:active { transform: translateY(1px); }
#table button:focus-visible { outline: 3px solid #ffe08b; outline-offset: 3px; }
#table:focus { outline: none; }

/* ---------- 弹层 ---------- */
.overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(6, 10, 9, .72); backdrop-filter: blur(3px); z-index: 10;
}
.panel {
  width: min(360px, 90vw); padding: 22px; border-radius: 18px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.panel h2 { margin: 0 0 8px; font-size: 22px; color: var(--accent); }
.color-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 14px; }
.color-btn { padding: 18px; border-radius: 12px; border: 0; font-size: 17px; font-weight: 800; color: #0e1512; cursor: pointer; }
.color-btn.red { background: #e05b4c; }
.color-btn.yellow { background: #e8b53a; }
.color-btn.blue { background: #4c8fe0; }
.color-btn.green { background: #4faa60; }
.over-btns { display: grid; gap: 10px; margin-top: 6px; }
#over.win .panel { border-color: #b88742; }

/* ---------- 牌桌动效 ---------- */
#tableFx { position: fixed; inset: 0; z-index: 8; pointer-events: none; overflow: hidden; }
.fx-flight, .fx-rim, .fx-badge { position: absolute; pointer-events: none; opacity: 0; }
.fx-flight { margin: 0; box-shadow: 0 10px 18px rgba(0, 0, 0, .45); }
.fx-rim { border: 2px solid currentColor; border-radius: 10px; }
.fx-rim.fx-special { border-width: 3px; box-shadow: 0 0 15px currentColor; }
.fx-badge {
  display: grid; place-items: center;
  color: #17231c; background: #ffe08a; border-radius: 99px;
  font-size: 15px; font-weight: 800; box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
}
@media (prefers-reduced-motion: no-preference) {
  .pile-btn.draw-needed:enabled .card-back::after { animation: draw-glow 1.85s ease-in-out infinite alternate; }
  @keyframes draw-glow { from { opacity: .28; } to { opacity: .72; } }
  #colorPick .panel, #over .panel {
    animation: panel-in 230ms cubic-bezier(.2,.7,.2,1);
  }
  @keyframes panel-in {
    from { opacity: 0; transform: translateY(10px) scale(.96); }
    72% { opacity: 1; transform: translateY(-2px) scale(1.01); }
    to { opacity: 1; transform: none; }
  }
}

@media (min-width: 760px) {
  .hand-cards.fanned { gap: 0; }
  .hand-cards.fanned .card + .card { margin-inline-start: -17px; }
  .hand-cards.fanned .card { transform: translateY(var(--fan-drop)) rotate(var(--fan-tilt)); }
  .hand-cards.fanned .card.playable { transform: translateY(calc(var(--fan-drop) - 8px)) rotate(var(--fan-tilt)); }
}

@media (max-width: 759px) {
  #table { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .table-frame {
    width: min(100%, 490px); min-height: 100%; margin-block: 0; gap: 8px;
    grid-template:
      "brand" auto
      "opponent" auto
      "stage" minmax(209px, 1fr)
      "console" auto
      "player" auto
      "log" auto
      "footer" auto / minmax(0, 1fr);
  }
  .table-frame::before { display: none; }
  .table-brand { padding: 0 3px; gap: 8px; }
  .mission-patch { width: 42px; height: 42px; }
  .table-brand h2 { font-size: 18px; }
  .opp-rack { grid-template-columns: minmax(0, 1fr) auto auto; padding: 6px 8px; gap: 6px; }
  .opp-rack, .hand-wrap { border-radius: 14px; }
  .seat { gap: 5px; padding-inline-end: 5px; }
  .seat-avatar { width: 25px; height: 25px; font-size: 12px; }
  .seat-info b { font-size: 12px; }
  .seat-info span { font-size: 10px; }
  .opp-fan { min-height: 41px; }
  .opp-fan .card-back { width: 24px; height: 36px; border-radius: 4px; }
  .opp-fan .card-back + .card-back { margin-inline-start: -12px; }
  .middle { padding: 36px 10px 14px; gap: 8px; border-radius: 23px 23px 23px 8px; }
  .stage-mark, .stage-index { top: 11px; }
  .stage-mark { left: 14px; }
  .stage-index { right: 14px; }
  .piles { gap: 35px; }
  .piles .card-back, .piles .card.big { width: 64px; height: 96px; border-radius: 8px; }
  .pile-discard { margin-top: 11px; }
  .table-console {
    grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 9px;
    padding: 7px 8px; border: 1px solid var(--table-line); border-radius: 14px; background: var(--table-panel);
  }
  .turn-box { padding: 5px 8px; }
  #flagTurn { font-size: 15px; }
  #table .hint { font-size: 12px; }
  #table .actions { grid-column: 1 / -1; }
  .hand-wrap { padding: 5px 7px 2px; }
  .hand-cards { padding: 9px 5px 7px; }
  .hand .card { width: 59px; height: 88px; border-radius: 8px; }
  .table-log { margin: 0 2px; padding: 6px 0 0; }
  .log-title { display: none; }
  .turn-log li:not(:last-child) { display: none; }
  .table-footer { justify-content: space-between; padding: 0; }
}

/* ---------- 好友房 ---------- */
.join-box { display: flex; gap: 8px; align-items: center; width: min(420px, 92vw); }
.code-input {
  flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; font-size: 18px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--text);
  background: #101a16; border: 1px solid var(--line); outline: none;
}
.code-input:focus { border-color: var(--accent); }
#room { align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; }
.room-title { margin: 0; font-size: 24px; color: var(--accent); }
.room-code-row { display: flex; align-items: center; gap: 12px; }
.room-code {
  font-size: clamp(30px, 11vw, 44px); font-weight: 800; letter-spacing: .28em;
  color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.4);
}
.room-players {
  list-style: none; margin: 6px 0; padding: 0; width: min(420px, 92vw);
  display: grid; gap: 8px;
}
.room-players li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.05);
  border: 1px solid var(--line); font-size: 15px;
}
.room-players b { color: var(--accent); font-size: 13px; font-weight: 700; }
.room-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: min(420px, 92vw); }
.room-actions .big-btn { flex: 1 1 140px; }

/* ---------------- 全服榜 ---------------- */
.board-panel { width: min(520px, 94vw); max-height: min(78vh, 620px); display: flex; flex-direction: column; gap: 8px; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.board-head h2 { margin: 0; }
.board-list {
  list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 90px;
  display: flex; flex-direction: column; gap: 5px; scrollbar-width: thin;
}
.board-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04);
  border: 1px solid var(--line); font-size: 14px; color: var(--ink);
}
.board-row.board-me { border-color: #b88742; background: rgba(184,135,66,.16); }
.board-rank { color: var(--accent); font-size: 13px; }
.board-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-tier { color: #e4d3ff; font-size: 12px; }
.board-score { color: var(--muted); font-size: 12px; text-align: right; }
#board .rank-profile { margin: 0; font-size: 13px; }
#board .hint { min-height: 18px; margin: 0; }
#board .act { align-self: flex-start; }
@media (max-width: 430px) {
  .board-row { grid-template-columns: 36px minmax(0, 1fr) auto; font-size: 13px; }
  .board-score { grid-column: 2 / 4; text-align: left; color: var(--muted); }
}
