/* 5 WORDS — Parker Puzzle Master design system (navy chrome, ivory play surface, gold accents).
   Scores in black text. No emoji. */

:root {
  --navy: #0a1628;
  --navy-2: #101f38;
  --navy-3: #18294a;
  --gold: #c9a227;
  --gold-soft: #e8d9a0;
  --ivory: #faf6ec;
  --ivory-2: #f2ecdb;
  --ink: #16203a;
  --bad: #d92d20;
  --green: #2e8b57;
  --absent: #5a6478;
  --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); }

/* ---------- layout ---------- */
.stage {
  max-width: 1100px; margin: 0 auto; padding: 10px 24px 48px;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(270px, 0.7fr);
  gap: 32px; align-items: stretch;
}
.boardSide { display: flex; flex-direction: column; }

/* ---------- 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; }
.actsMeter { display: flex; gap: 4px; margin-top: 7px; }
.actsMeter .seg { flex: 1; height: 4px; border-radius: 2px; background: #e4ddc9; transition: background 0.4s; }
.actsMeter .seg.done { background: var(--gold); }
.actsMeter .seg.fail { background: #cdb9ae; }

/* ---------- act banner ---------- */
.actBanner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--ivory); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(2, 8, 20, 0.4), 0 0 0 1px rgba(201, 162, 39, 0.35);
}
.stageName { display: block; font-family: 'Libre Baskerville', Georgia, serif; font-weight: 700; font-size: 1.25rem; color: #14203c; }
.stageStep { display: block; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #8a93a6; margin-top: 2px; }
.abRight { text-align: right; }
.abLabel { display: block; font-size: 0.64rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #8a7415; margin-bottom: 5px; }
.collectedMini { display: flex; gap: 5px; justify-content: flex-end; }
.collectedMini .cm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  font-weight: 800; font-size: 0.95rem; color: #1d1602;
  background: #efe9d8; border: 1.5px solid #ddd3b8;
}
.collectedMini .cm.got {
  background: linear-gradient(135deg, #d9b133, var(--gold)); border-color: #a8861c;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.45);
  animation: cmPop 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}
@keyframes cmPop { from { transform: scale(0.4); } to { transform: scale(1); } }

/* ---------- guess grid ---------- */
.boardFrame {
  position: relative;
  background: linear-gradient(160deg, #101f38, #15254a);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201, 162, 39, 0.45), 0 0 0 6px rgba(201, 162, 39, 0.07);
  user-select: none; touch-action: manipulation;
}
.grid { display: flex; flex-direction: column; gap: 8px; max-width: 360px; margin: 0 auto; }
.gRow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gRow.shake { animation: rowShake 0.4s ease; }
@keyframes rowShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-4px); } }
.tile {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1; min-height: 48px; border-radius: 10px;
  background: var(--ivory); border: 1.5px solid rgba(201, 162, 39, 0.25);
  box-shadow: 0 3px 10px rgba(2, 8, 20, 0.45);
  font-size: clamp(1.2rem, 4vmin, 1.7rem); font-weight: 800; color: var(--ink);
  text-transform: uppercase;
  transition: transform 0.1s ease, background 0.15s, border-color 0.15s, color 0.15s;
}
.tile.filled { border-color: var(--gold); transform: scale(1.04); }
.tile.dim { background: rgba(250, 246, 236, 0.13); border-color: rgba(255, 255, 255, 0.1); box-shadow: none; }
.tile.flip { animation: tileFlip 0.5s ease both; }
@keyframes tileFlip {
  0% { transform: rotateX(0); }
  49% { transform: rotateX(90deg); }
  51% { transform: rotateX(90deg); }
  100% { transform: rotateX(0); }
}
.tile.g { background: var(--green); border-color: #226b42; color: #ffffff; }
.tile.y { background: linear-gradient(135deg, #d9b133, var(--gold)); border-color: #a8861c; color: #1d1602; }
.tile.b { background: var(--absent); border-color: #475063; color: #e8ecf5; }
.tile.hintGiven { box-shadow: 0 0 0 2.5px var(--gold), 0 3px 10px rgba(2, 8, 20, 0.45); }
.tile.hl { animation: hlGlow 1.1s ease both; box-shadow: 0 0 0 3px var(--gold), 0 0 22px rgba(201, 162, 39, 0.9); z-index: 2; }
@keyframes hlGlow {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1.06); }
}

/* ---------- mystery round ---------- */
.mysteryArea { text-align: center; padding: 6px 4px 2px; }
.myTitle { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.3rem; color: var(--gold-soft); }
.mySub { font-size: 0.8rem; color: #93a0bb; margin: 6px 0 16px; }
.mySlots { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.mySlot {
  display: flex; align-items: center; justify-content: center;
  width: clamp(46px, 11vmin, 60px); aspect-ratio: 1; border-radius: 10px;
  background: rgba(250, 246, 236, 0.1); border: 1.5px dashed rgba(201, 162, 39, 0.5);
  font-size: clamp(1.2rem, 4vmin, 1.7rem); font-weight: 800; color: #f4f0e4;
  transition: background 0.15s, border-color 0.15s;
}
.mySlot.filled { background: var(--ivory); border: 1.5px solid var(--gold); color: var(--ink); }
.mySlots.shake { animation: rowShake 0.4s ease; }
.myTiles { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.myTile {
  display: inline-flex; align-items: center; justify-content: center;
  width: clamp(46px, 11vmin, 60px); aspect-ratio: 1; border-radius: 10px;
  background: linear-gradient(135deg, #d9b133, var(--gold)); border: 1.5px solid #a8861c;
  font-size: clamp(1.2rem, 4vmin, 1.7rem); font-weight: 800; color: #1d1602;
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.4);
  transition: transform 0.12s ease, opacity 0.15s;
}
.myTile:hover { transform: translateY(-3px); }
.myTile.used { opacity: 0.22; pointer-events: none; transform: scale(0.92); }
.myActions { display: flex; gap: 10px; justify-content: center; align-items: center; margin-bottom: 10px; }
.myAttempts { font-size: 0.74rem; color: #8a93a6; padding-bottom: 6px; }
#mySubmit:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- reveal strip ---------- */
.revealStrip {
  margin: 12px auto 0; max-width: 360px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--ivory); border-radius: 10px; padding: 10px 16px;
  box-shadow: 0 4px 14px rgba(2, 8, 20, 0.35);
  animation: rise 0.3s ease;
}
.rsText { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #8a93a6; }
.rsWord { font-family: 'Libre Baskerville', Georgia, serif; font-weight: 700; font-size: 1.15rem; color: #000000; letter-spacing: 0.18em; }

.pauseShade {
  position: absolute; inset: 0; border-radius: var(--radius); z-index: 5;
  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); }

/* ---------- keyboard ---------- */
.keyboard { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; user-select: none; touch-action: manipulation; }
.kbRow { display: flex; gap: 6px; justify-content: center; }
.key {
  flex: 1; max-width: 44px; min-height: 52px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700; font-size: 0.95rem; color: #e8ecf5; text-transform: uppercase;
  transition: background 0.15s, transform 0.08s ease, color 0.15s;
}
.key:active { transform: scale(0.94); }
.key.wide { max-width: 70px; flex: 1.6; font-size: 0.68rem; letter-spacing: 0.04em; }
.key.g { background: var(--green); border-color: #226b42; color: #fff; }
.key.y { background: linear-gradient(135deg, #d9b133, var(--gold)); border-color: #a8861c; color: #1d1602; }
.key.b { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.04); color: #5d6880; }

/* ---------- buttons ---------- */
.miniBtn {
  padding: 9px 14px; 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; }
.miniBtn.dark { color: #2a3550; border-color: #d4cdb9; background: #fff; }
.miniBtn.dark:hover { background: #f2ecdb; color: #14203c; }
.miniBtn.dark2 { padding: 12px 18px; }
.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%; }
.goldBtn.slim { padding: 10px 22px; font-size: 0.82rem; }
.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; }

/* ---------- panel ---------- */
.panel { display: flex; flex-direction: column; gap: 14px; }
.actionRow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actBtn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 6px; border-radius: 12px; font-size: 0.74rem; 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:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.actsGuide { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; padding: 14px 16px; }
.agTitle { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #93a0bb; margin-bottom: 10px; }
.agRow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.84rem; }
.agRow:last-of-type { border-bottom: 0; }
.agNum {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; font-size: 0.7rem; font-weight: 800;
  background: rgba(255, 255, 255, 0.08); color: #aeb9d2; flex: none;
}
.agRow.live .agNum { background: var(--gold); color: #1d1602; }
.agRow.done .agNum { background: rgba(201, 162, 39, 0.25); color: var(--gold-soft); }
.agRow.fail .agNum { background: rgba(217, 45, 32, 0.25); color: #e8a9a3; }
.agName { font-weight: 700; color: #e8ecf5; flex: 1; letter-spacing: 0.04em; }
.agRow.done .agName, .agRow.fail .agName { font-family: 'Libre Baskerville', Georgia, serif; letter-spacing: 0.14em; }
.agPick { font-size: 0.72rem; color: #8a93a6; font-variant-numeric: tabular-nums; }
.agRow.done .agPick { color: var(--gold-soft); }
.agNote { font-size: 0.7rem; color: #7d8aa8; margin-top: 10px; line-height: 1.4; }

.bests { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; padding: 14px 16px; }
.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; }

/* ---------- post-game 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; }

/* ---------- effects ---------- */
.floatPts {
  position: fixed; pointer-events: none; font-weight: 800; color: var(--gold);
  font-size: 1.15rem; animation: floatUp 0.95s 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(-34px); } }
.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); }
}
.flyLetter {
  position: fixed; z-index: 90; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, #d9b133, var(--gold)); color: #1d1602;
  font-weight: 800; font-size: 1.3rem;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.55);
  transition: all 0.8s cubic-bezier(0.3, 0.7, 0.3, 1);
}

/* ---------- modals (universal Parker pattern: X, backdrop click, Esc) ---------- */
.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: rise 0.25s ease;
}
@keyframes rise { 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; }
.confirmCard { max-width: 420px; }
.diffGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.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); }
.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; }
.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); } }
.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 14px; 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; }
.careerLine { font-size: 0.78rem; color: #5a6478; margin: -4px 0 12px; }
.hintActions { display: flex; gap: 10px; justify-content: center; margin-top: 4px; flex-wrap: wrap; }
.hintActions .goldBtn { padding: 12px 26px; font-size: 0.88rem; }
.hintActions .ghostBtn { color: #5a6478; border-color: #d4cdb9; }
.hintActions .ghostBtn:hover { background: #f2ecdb; color: #1a2238; }
.microcopy { font-size: 0.72rem; color: #8a93a6; margin-top: 12px; line-height: 1.45; }

/* ---------- the five words (completion reveal) ---------- */
.fiveActs { margin: 4px 0 16px; padding: 14px 16px; background: #fff; border: 1px solid #e7e1cf; border-radius: 14px; }
.faTitle { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.05rem; color: #14203c; }
.faSub { font-size: 0.78rem; color: #5a6478; margin: 4px 0 10px; }
.faRows { display: flex; flex-direction: column; gap: 6px; }
.faRow {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  opacity: 0; transform: translateY(6px); transition: opacity 0.4s ease, transform 0.4s ease;
}
.faRow.show { opacity: 1; transform: translateY(0); }
.faLetter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 7px;
  font-weight: 800; font-size: 0.95rem; color: var(--ink);
  background: #f2ecdb; border: 1px solid #e2dcc8;
}
.faLetter.gold { background: linear-gradient(135deg, #d9b133, var(--gold)); border-color: #a8861c; color: #1d1602; box-shadow: 0 2px 6px rgba(201, 162, 39, 0.4); }
.faPts { font-size: 0.76rem; font-weight: 800; color: #000000; min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.faRow.failRow .faLetter:not(.gold) { background: #f5e4e2; border-color: #e8cbc7; color: #8c4a43; }
.faMystery { margin-top: 8px; padding-top: 10px; border-top: 1px dashed #e2dcc8; }
.faMyLabel { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #8a7415; margin-bottom: 6px; }

/* ---------- share row ---------- */
.shareRow { margin: 2px 0 14px; }
.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); }

/* ---------- 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; }

/* ---------- help ---------- */
.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; }
.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; }

/* ---------- 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: rise 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; }
  .panel { width: 100%; }
  .actBanner { flex-wrap: wrap; }
  .key { min-height: 48px; }
  .diffGrid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .hud { gap: 6px; }
  .pill { padding: 7px 12px; font-size: 0.78rem; }
  .grid, .gRow { gap: 6px; }
  .boardFrame { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
