/* Parker Sudoku — exquisite Puzzle Master layout
   Palette: deep navy chrome, ivory board, gold accents. Scores in black text. */

:root {
  --navy: #0a1628;
  --navy-2: #101f38;
  --navy-3: #18294a;
  --gold: #c9a227;
  --gold-soft: #e8d9a0;
  --ivory: #faf6ec;
  --ivory-2: #f2ecdb;
  --line: #d8d2c2;
  --line-strong: #2c3550;
  --ink: #16203a;        /* given digits */
  --ink-player: #1d4ed8; /* player digits */
  --ink-note: #8a93a6;
  --bad: #d92d20;
  --bad-bg: #fde8e8;
  --peer: #eef2e4;
  --same: #f3e8c8;
  --sel: #fdf3d0;
  --radius: 14px;
  --shadow-lg: 0 18px 50px rgba(2, 8, 20, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(201, 162, 39, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(29, 78, 216, 0.10), transparent 55%),
    var(--navy);
  color: #e8ecf5;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
*:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- masthead ---------- */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1100px; margin: 0 auto; padding: 22px 24px 10px;
}
.brand h1 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.7rem; letter-spacing: 0.16em; color: #f4f0e4; font-weight: 700;
}
.brand h1 span { color: var(--gold); }
.byline { font-size: 0.78rem; color: #93a0bb; letter-spacing: 0.04em; margin-top: 3px; }
.hud { display: flex; align-items: center; gap: 10px; }
.pill {
  background: linear-gradient(135deg, var(--navy-3), var(--navy-2));
  border: 1px solid rgba(201, 162, 39, 0.45);
  color: var(--gold-soft); font-weight: 700; font-size: 0.86rem;
  padding: 8px 18px; border-radius: 999px; letter-spacing: 0.03em;
  transition: transform 0.12s ease, border-color 0.2s;
}
.pill:hover { transform: translateY(-1px); border-color: var(--gold); }
.timerWrap { display: flex; align-items: center; gap: 6px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 1rem; color: #cfd8ea; min-width: 52px; text-align: right; }
.iconBtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; color: #aeb9d2;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s, color 0.15s, transform 0.12s;
}
.iconBtn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; transform: translateY(-1px); }
.iconBtn.dark { background: rgba(0, 0, 0, 0.06); color: #5a6478; }

/* ---------- stage layout ---------- */
.stage {
  max-width: 1100px; margin: 0 auto; padding: 10px 24px 48px;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 32px; align-items: stretch; /* both columns end on the same line */
}

/* ---------- score chips ---------- */
.scoreRow { display: flex; gap: 10px; margin-bottom: 14px; }
.chip {
  background: var(--ivory); border-radius: 12px; padding: 10px 16px;
  box-shadow: 0 4px 16px rgba(2, 8, 20, 0.35);
  display: flex; flex-direction: column; gap: 2px; flex: 1;
}
.chip.small { flex: 0 0 auto; min-width: 86px; }
.chipLabel { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #6b7280; }
.chipValue { font-size: 1.12rem; font-weight: 800; color: #000000; font-variant-numeric: tabular-nums; }
.chipValue b { color: #000000; }
.pointsChip { position: relative; }
.meter { height: 4px; border-radius: 2px; background: #e4ddc9; margin-top: 6px; overflow: hidden; }
.meterFill { height: 100%; width: 0%; border-radius: 2px; background: linear-gradient(90deg, var(--gold), #e3c45a); transition: width 0.35s ease; }

/* ---------- board ---------- */
.boardFrame { position: relative; }
.board {
  display: grid; grid-template-columns: repeat(9, 1fr); grid-template-rows: repeat(9, 1fr);
  aspect-ratio: 1 / 1; width: 100%;
  background: var(--ivory); border-radius: var(--radius);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201, 162, 39, 0.35), 0 0 0 6px rgba(201, 162, 39, 0.07);
  overflow: hidden; user-select: none; touch-action: manipulation;
}
.cell {
  position: relative; display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: clamp(18px, 4.2vmin, 34px); font-weight: 600; color: var(--ink-player);
  transition: background 0.1s ease;
}
.cell.c2, .cell.c5 { border-right: 2.5px solid var(--line-strong); }
.cell.r2, .cell.r5 { border-bottom: 2.5px solid var(--line-strong); }
.cell.c8 { border-right: 0; }
.cell.r8 { border-bottom: 0; }
.cell.given { color: var(--ink); font-weight: 800; }
.cell.peer { background: var(--peer); }
.cell.same { background: var(--same); }
.cell.hintGlow { background: #f8ecbe; box-shadow: inset 0 0 0 2px var(--gold); }
.cell.selected { background: var(--sel); box-shadow: inset 0 0 0 2.5px var(--gold); }
.cell.bad { color: var(--bad); background: var(--bad-bg); }
.cell.justPlaced { animation: pop 0.18s ease; }
@keyframes pop { 0% { transform: scale(0.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.notes {
  position: absolute; inset: 2px; display: grid;
  grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
}
.notes span {
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(7px, 1.35vmin, 11px); font-weight: 600; color: var(--ink-note); line-height: 1;
}
.board.dark { background: #141d33; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201,162,39,0.5); }
.board.dark .cell { border-color: #243355; color: #9db4f5; }
.board.dark .cell.c2, .board.dark .cell.c5 { border-right-color: #c9a22766; }
.board.dark .cell.r2, .board.dark .cell.r5 { border-bottom-color: #c9a22766; }
.board.dark .cell.given { color: #f1ead2; }
.board.dark .cell.peer { background: #1a2440; }
.board.dark .cell.same { background: #2a3050; }
.board.dark .cell.selected { background: #34406b; }
.board.dark .cell.bad { background: #46202a; }
.board.dark .notes span { color: #5e6e92; }

.pauseShade {
  position: absolute; inset: 0; border-radius: var(--radius);
  background: rgba(10, 22, 40, 0.92); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
.pauseTitle { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.5rem; color: var(--gold-soft); }
.craftNote { color: #93a0bb; font-size: 0.85rem; }

/* ---------- post-game review bar ---------- */
.postBar {
  margin-top: 12px; padding: 12px 16px; border-radius: 12px;
  background: var(--ivory); box-shadow: 0 6px 20px rgba(2, 8, 20, 0.4);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.postSummary { font-weight: 800; color: #000000; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.postBtns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.miniBtn.dark { color: #2a3550; border-color: #d4cdb9; background: #fff; }
.miniBtn.dark:hover { background: #f2ecdb; color: #14203c; }
.goldBtn.slim { padding: 10px 22px; font-size: 0.82rem; }

/* ---------- share row ---------- */
.shareRow { margin: 2px 0 16px; }
.shareLabel { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #8a93a6; }
.shareBtns { display: flex; gap: 10px; justify-content: center; margin-top: 9px; }
.shareBtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: #14203c; color: #f4f0e4;
  transition: background 0.15s, transform 0.12s ease, color 0.15s;
}
.shareBtn:hover { background: var(--gold); color: #1d1602; transform: translateY(-2px); }
.careerLine { font-size: 0.78rem; color: #5a6478; margin: -8px 0 12px; }
.microcopy { font-size: 0.72rem; color: #8a93a6; margin-top: 12px; line-height: 1.45; }

/* ---------- cinematic reveal ---------- */
.cell.revealFill { animation: revealPop 0.55s cubic-bezier(0.2, 0.8, 0.3, 1.1) both; }
@keyframes revealPop {
  0% { transform: scale(0.55); opacity: 0.2; background: #f3e3a9; }
  55% { transform: scale(1.12); opacity: 1; background: #f8ecbe; }
  100% { transform: scale(1); background: inherit; }
}
.skipPill {
  position: absolute; right: 12px; bottom: 12px; z-index: 8;
  padding: 8px 20px; border-radius: 999px;
  background: rgba(10, 22, 40, 0.85); color: var(--gold-soft);
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid rgba(201, 162, 39, 0.55); backdrop-filter: blur(4px);
  transition: background 0.15s, transform 0.12s;
}
.skipPill:hover { background: rgba(20, 32, 60, 0.95); transform: translateY(-1px); }

/* ---------- solve celebration ---------- */
.cell.wave { animation: cellWave 0.65s ease both; }
@keyframes cellWave {
  0% { background: inherit; }
  45% { background: #f3e3a9; box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.6); }
  100% { background: inherit; box-shadow: none; }
}
.spark {
  position: fixed; width: 5px; height: 5px; border-radius: 50%;
  background: linear-gradient(135deg, #f0d97a, var(--gold));
  pointer-events: none; z-index: 70;
  animation: sparkFly 1.05s cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
}
@keyframes sparkFly {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.35); }
}
.done .laurel svg { animation: laurelIn 0.7s ease both; transform-origin: center; }
@keyframes laurelIn { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }

/* points float */
.floatPts {
  position: absolute; pointer-events: none; font-weight: 800; color: var(--gold);
  font-size: 1rem; animation: floatUp 0.85s ease forwards; z-index: 5;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
@keyframes floatUp { 0% { opacity: 0; transform: translateY(4px); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px); } }

/* ---------- panel ---------- */
.panel { display: flex; flex-direction: column; gap: 14px; }
.actionRow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.actionRow.secondary { grid-template-columns: repeat(3, 1fr); }
.actBtn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 4px; border-radius: 12px; font-size: 0.72rem; font-weight: 600;
  color: #c4cde0; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s, transform 0.12s, color 0.15s;
}
.actBtn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; transform: translateY(-1px); }
.actBtn.gold { color: var(--gold-soft); border-color: rgba(201, 162, 39, 0.5); }
.actBtn.gold:hover { color: #ffe9a8; }
.actBtn.toggle[aria-pressed="true"] { background: rgba(201, 162, 39, 0.18); border-color: var(--gold); color: #ffe9a8; }
.actBtn em { font-style: normal; opacity: 0.7; }
.miniBtn {
  padding: 9px 6px; border-radius: 10px; font-size: 0.74rem; font-weight: 600;
  color: #aeb9d2; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s, color 0.15s;
}
.miniBtn:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }

.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.numKey {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 1.35; border-radius: 12px;
  background: var(--ivory); color: #0f1a30; font-size: 1.5rem; font-weight: 800;
  box-shadow: 0 3px 10px rgba(2, 8, 20, 0.35);
  transition: transform 0.1s ease, box-shadow 0.15s;
}
.numKey:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(2, 8, 20, 0.45); }
.numKey:active { transform: translateY(0); }
.numKey .cnt { font-size: 0.62rem; font-weight: 700; color: #8b8468; margin-top: 1px; }
.numKey.done { opacity: 0.35; }
.numKey.noteMode { background: var(--ivory-2); box-shadow: 0 3px 10px rgba(2,8,20,0.35), inset 0 0 0 2px var(--gold); }

.goldBtn {
  background: linear-gradient(135deg, #d9b133, var(--gold));
  color: #1d1602; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.02em;
  padding: 14px 32px; border-radius: 12px;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.3);
  transition: transform 0.12s ease, box-shadow 0.2s;
}
.goldBtn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(201, 162, 39, 0.42); }
.goldBtn.wide { width: 100%; }
.ghostBtn {
  padding: 12px 24px; border-radius: 12px; font-weight: 600; font-size: 0.88rem;
  color: #aeb9d2; border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 0.15s, color 0.15s;
}
.ghostBtn:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }

.bests { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; padding: 14px 16px; margin-top: auto; /* bottom-aligns with the grid */ }
.bestsTitle { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #93a0bb; margin-bottom: 8px; }
.bestsBody { display: flex; flex-direction: column; gap: 5px; font-size: 0.8rem; color: #c4cde0; }
.bestsBody .row { display: flex; justify-content: space-between; }
.bestsBody .row b { font-variant-numeric: tabular-nums; }

/* ---------- hint card ---------- */
.hintCard {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: min(480px, calc(100vw - 32px));
  background: var(--ivory); color: #1a2238; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(2, 8, 20, 0.6);
  padding: 16px 18px; z-index: 60;
  animation: rise 0.22s ease;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.hintHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hintTech {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: #7a6310; background: #f3e8c8; padding: 4px 10px; border-radius: 999px;
}
.hintWhy { font-size: 0.92rem; line-height: 1.5; color: #2a3550; }
.hintActions { display: flex; gap: 10px; margin-top: 12px; }
.hintActions .goldBtn { padding: 10px 24px; font-size: 0.85rem; }
.hintActions .ghostBtn { color: #5a6478; border-color: #d4cdb9; }
.hintActions .ghostBtn:hover { background: #f2ecdb; color: #1a2238; }

/* ---------- modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(6, 12, 24, 0.7); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.modalCard {
  position: relative;
  width: min(540px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  background: var(--ivory); color: #1a2238; border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  padding: 28px; text-align: center;
  animation: rise2 0.25s ease;
}
@keyframes rise2 { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.modalX {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: #efe9d8; color: #5a6478;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}
.modalX:hover { background: #14203c; color: var(--gold-soft); transform: rotate(90deg); }
.modalTitle { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.45rem; color: #14203c; }
.modalSub { font-size: 0.88rem; color: #5a6478; margin: 8px 0 18px; }
.diffGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.diffCard {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left;
  background: #fff; border: 1.5px solid #e2dcc8; border-radius: 14px; padding: 14px 16px;
  transition: transform 0.12s ease, border-color 0.15s, box-shadow 0.2s;
}
.diffCard:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 10px 24px rgba(160, 130, 30, 0.18); }
.diffCard.gm { grid-column: 1 / -1; background: linear-gradient(135deg, #14203c, #1c2c52); border-color: #2c3550; }
.diffCard.gm .diffName { color: var(--gold-soft); }
.diffCard.gm .diffDesc { color: #93a0bb; }
.diffCard.gm .diffPts { color: #c9b873; }
.diffName { font-family: 'Libre Baskerville', Georgia, serif; font-weight: 700; font-size: 1.02rem; color: #14203c; }
.diffDesc { font-size: 0.78rem; color: #5a6478; }
.diffPts { font-size: 0.72rem; font-weight: 700; color: #8a7415; letter-spacing: 0.03em; }

.done .laurel { margin-bottom: 4px; }
.doneStats { display: flex; gap: 10px; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.doneStat { background: #fff; border: 1px solid #e7e1cf; border-radius: 12px; padding: 10px 18px; min-width: 86px; }
.doneStat.big { min-width: 130px; }
.dsLabel { display: block; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #8a93a6; }
.dsValue { display: block; font-size: 1.3rem; font-weight: 800; color: #000000; font-variant-numeric: tabular-nums; }
.doneStat.big .dsValue { font-size: 1.7rem; }
.rwiqCard {
  background: #fff; border: 1.5px solid var(--gold); border-radius: 14px;
  padding: 14px 20px; margin: 4px auto 18px; max-width: 320px;
  display: flex; flex-direction: column; gap: 2px;
}
.rwiqLabel { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #8a7415; }
.rwiqScore { font-size: 2.3rem; font-weight: 800; color: #000000; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rwiqBreak { font-size: 0.74rem; color: #5a6478; }
.modal .hintActions { justify-content: center; }

.setRows { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; text-align: left; }
.setRow {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 6px; font-size: 0.9rem; color: #2a3550; border-bottom: 1px solid #eee7d4; cursor: pointer;
}
.setRow input { width: 20px; height: 20px; accent-color: var(--gold); cursor: pointer; }
.setNote {
  font-style: normal; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: #8a7415; background: #f3e8c8;
  padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle;
}
.confirmCard { max-width: 420px; }

.helpCard { text-align: left; }
.helpTabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.helpTab {
  padding: 8px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  color: #5a6478; background: #efe9d8; transition: background 0.15s, color 0.15s;
}
.helpTab.active { background: #14203c; color: var(--gold-soft); }
.helpBody { font-size: 0.9rem; line-height: 1.6; color: #2a3550; margin-bottom: 18px; }
.helpBody h3 { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.02rem; color: #14203c; margin: 14px 0 6px; }
.helpBody h3:first-child { margin-top: 0; }
.helpBody p { margin-bottom: 8px; }
.keyTable { width: 100%; border-collapse: collapse; margin: 8px 0; }
.keyTable td { padding: 7px 8px; border-bottom: 1px solid #eee7d4; font-size: 0.84rem; }
.keyTable td:first-child { font-weight: 700; color: #14203c; white-space: nowrap; }
kbd {
  background: #fff; border: 1px solid #d4cdb9; border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 7px; font-family: inherit; font-size: 0.78rem; font-weight: 700;
}
.helpBody details { border: 1px solid #e7e1cf; border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: #fff; }
.helpBody summary { font-weight: 700; color: #14203c; cursor: pointer; font-size: 0.9rem; }
.helpBody details p { margin: 8px 0 2px; font-size: 0.85rem; }

/* ---------- members brain report ---------- */
.brainReport {
  margin-top: 20px; padding-top: 18px; border-top: 1.5px solid #e7e1cf; text-align: left;
}
.brHead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.brHead h3 { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.15rem; color: #14203c; }
.brBadge {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  background: #14203c; color: var(--gold-soft); padding: 4px 10px; border-radius: 999px;
}
.brFree {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #8a7415; background: #f3e8c8; padding: 4px 10px; border-radius: 999px;
}
.brIntro { font-size: 0.8rem; color: #5a6478; line-height: 1.5; margin-bottom: 14px; }
.brainReport h4 {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: #8a93a6; margin: 16px 0 8px;
}
.brRegion { margin-bottom: 9px; }
.brRegionTop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.brRegionName { font-weight: 700; font-size: 0.84rem; color: #14203c; }
.brRegionName small { font-weight: 600; color: #8a93a6; font-size: 0.72rem; margin-left: 6px; }
.brTag {
  font-size: 0.56rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; background: #efe9d8; color: #6b7280; margin-left: 6px; vertical-align: 2px;
}
.brTag.primary { background: #f3e8c8; color: #8a7415; }
.brRegionScore { font-weight: 800; color: #000000; font-variant-numeric: tabular-nums; }
.brBar { height: 6px; border-radius: 3px; background: #efe9d8; margin-top: 4px; overflow: hidden; }
.brBarFill { height: 100%; border-radius: 3px; }
.brRegionWhy { font-size: 0.72rem; color: #7a8398; margin-top: 3px; line-height: 1.4; }
.brTable { display: flex; flex-direction: column; }
.brTable .brRow {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 7px 2px; border-bottom: 1px solid #f0ead8; font-size: 0.82rem; color: #2a3550;
}
.brTable .brRow b { color: #000000; font-variant-numeric: tabular-nums; text-align: right; }
.brTrend { display: flex; align-items: flex-end; gap: 5px; height: 64px; padding: 4px 2px 0; }
.brTrendBar {
  flex: 1; max-width: 34px; border-radius: 4px 4px 0 0; min-height: 4px;
  background: linear-gradient(180deg, #e3c45a, var(--gold));
  position: relative;
}
.brTrendBar.assisted { background: #d8d2c2; }
.brTrendBar span {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-size: 0.6rem; font-weight: 700; color: #000000;
}
.brTrendEmpty { font-size: 0.78rem; color: #8a93a6; padding: 6px 0 14px; }
.brFootnote { font-size: 0.7rem; color: #98a0b2; line-height: 1.45; margin-top: 14px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: var(--ivory); color: #1a2238; font-weight: 600; font-size: 0.86rem;
  padding: 10px 22px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 100; animation: rise2 0.2s ease;
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .stage { grid-template-columns: 1fr; gap: 18px; padding: 8px 14px 40px; }
  .masthead { padding: 16px 14px 6px; flex-wrap: wrap; }
  .brand h1 { font-size: 1.3rem; }
  .board { width: min(100%, 62vh); margin: 0 auto; }
  .boardFrame { display: flex; justify-content: center; }
  .panel { max-width: min(100%, 62vh); margin: 0 auto; width: 100%; }
  .numpad { grid-template-columns: repeat(9, 1fr); gap: 5px; }
  .numKey { aspect-ratio: 0.78; font-size: 1.25rem; border-radius: 9px; }
  .numKey .cnt { font-size: 0.56rem; }
  .actionRow { grid-template-columns: repeat(4, 1fr); }
  .diffGrid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .hud { gap: 6px; }
  .pill { padding: 7px 12px; font-size: 0.78rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
