:root {
  --bg: #0e1117;
  --surface: #161b25;
  --border: #252d3d;
  --accent: #4ade80;
  --accent2: #86efac;
  --warn: #f59e0b;
  --danger: #f87171;
  --text: #e2e8f0;
  --muted: #64748b;
  --private: #34d399;
  --rare: #fbbf24;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 40px;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 222, 128, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}
.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
}

/* ── HEADER ── */
header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.logo {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.logo span {
  font-size: 13px;
  font-family: 'DM Mono', monospace;
  color: var(--muted);
  font-weight: 400;
  margin-left: 12px;
  letter-spacing: 0.05em;
}
.score-display {
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.score-display strong {
  color: var(--text);
  font-size: 18px;
  display: block;
}

/* ── HOME SCREEN ── */
.home-screen {
  text-align: center;
  padding: 20px 0 40px;
}
.home-tagline {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 48px;
  line-height: 1.8;
}
.home-tagline strong {
  color: var(--accent2);
  font-style: normal;
  display: block;
  margin-top: 8px;
  font-size: 14px;
}
.home-tiles {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
  align-items: center;
}
.btn-deal {
  width: 100%;
  padding: 18px 0;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0e1117;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 14px;
}
.btn-deal:hover {
  background: var(--accent2);
}
.btn-howto {
  width: 100%;
  padding: 14px 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-howto:hover {
  border-color: var(--muted);
  color: var(--text);
}

/* ── WHAT'S NEW BANNER ── */
.whats-new {
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  text-align: left;
  position: relative;
}
.whats-new-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.whats-new-label {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.whats-new-version {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.whats-new-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.whats-new-close:hover {
  color: var(--text);
}
.whats-new ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.whats-new ul li {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  padding-left: 14px;
  position: relative;
}
.whats-new ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.whats-new ul li strong {
  color: var(--text);
}

/* ── WORD SAVED NOTICE ── */
.word-saved {
  font-size: 11px;
  color: var(--accent2);
  margin-bottom: 12px;
  min-height: 16px;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.2s;
}
.word-saved.show {
  opacity: 1;
}

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(14, 17, 23, 0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show {
  display: flex;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  padding: 28px 24px 24px;
  position: relative;
  animation: modalIn 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
}
@keyframes modalIn {
  from {
    transform: scale(0.94) translateY(8px);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.modal-close:hover {
  color: var(--text);
}
.modal-page {
  display: none;
}
.modal-page.active {
  display: block;
}
.modal-counter {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.modal-title {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.modal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
  line-height: 1.6;
}

/* demo tiles */
.demo-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.demo-lbl {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.demo-tiles {
  display: flex;
  gap: 6px;
  align-items: center;
}
.dt {
  width: 44px;
  height: 48px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.dt.priv {
  border-color: var(--private);
  color: var(--private);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.15);
}
.dt.grey {
  background: var(--border);
  border-color: transparent;
}
.demo-sep {
  width: 1px;
  height: 48px;
  background: var(--border);
  margin: 0 2px;
}

/* lock/press demo */
.demo-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.db {
  padding: 13px 0;
  border-radius: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  border: 1px solid;
}
.db-lock {
  background: var(--accent);
  border-color: var(--accent);
  color: #0e1117;
}
.db-press {
  background: transparent;
  border-color: var(--warn);
  color: var(--warn);
}
.tip {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 13px;
  line-height: 1.6;
  margin-bottom: 10px;
}
.tip strong {
  color: var(--text);
}
.tip.warn strong {
  color: var(--warn);
}
.tip.accent strong {
  color: var(--accent);
}

/* scoring table */
.stbl {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}
.stbl td {
  padding: 8px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.stbl td:first-child {
  color: var(--muted);
}
.stbl td:last-child {
  color: var(--accent);
  font-weight: 500;
  text-align: right;
}
.bonus-row {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.bonus-row:last-child {
  border-bottom: none;
}
.bpts {
  color: var(--accent);
  font-weight: 500;
  min-width: 26px;
}
.bdesc {
  color: var(--muted);
}

/* modal nav */
.modal-nav {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.mnav {
  flex: 1;
  padding: 13px 0;
  border-radius: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid;
}
.mnav-prev {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.mnav-prev:hover {
  border-color: var(--muted);
  color: var(--text);
}
.mnav-next {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.mnav-next:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.mnav-deal {
  background: var(--accent);
  border-color: var(--accent);
  color: #0e1117;
}
.mnav-deal:hover {
  background: var(--accent2);
  border-color: var(--accent2);
}

/* ── STAGE TRACK ── */
.stage-track {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  align-items: center;
}
.stage-pip {
  height: 3px;
  flex: 1;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.4s;
}
.stage-pip.active {
  background: var(--accent);
}
.stage-pip.done {
  background: var(--muted);
}
.stage-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── TILES ── */
.tiles-section {
  margin-bottom: 20px;
}
.tiles-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.tiles-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.tile {
  width: 52px;
  height: 58px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s;
}
.tile.private {
  border-color: var(--private);
  color: var(--private);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.15);
}
.tile.rare {
  border-color: var(--rare);
  color: var(--rare);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.15);
}
.tile.hidden {
  background: var(--border);
  border-color: transparent;
}
.tile.reveal {
  animation: tileReveal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes tileReveal {
  0% {
    transform: scale(0.6) rotateY(90deg);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.tiles-divider {
  width: 1px;
  height: 58px;
  background: var(--border);
  margin: 0 4px;
}

/* ── TIMER ── */
.timer-wrap {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.timer-bar-bg {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.timer-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition:
    width 1s linear,
    background 0.5s;
}
.timer-bar.warn {
  background: var(--warn);
}
.timer-bar.danger {
  background: var(--danger);
}
.timer-num {
  font-size: 13px;
  color: var(--muted);
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.timer-num.pulse {
  color: var(--danger);
  animation: pulse 0.5s ease infinite alternate;
}
@keyframes pulse {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.4;
  }
}

/* ── INPUT ── */
.input-wrap {
  margin-bottom: 20px;
}
.word-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s;
  caret-color: var(--accent);
}
.word-input:focus {
  border-color: var(--accent);
}
.word-input.shake {
  animation: shake 0.3s ease;
  border-color: var(--danger);
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  60% {
    transform: translateX(6px);
  }
}
.word-input.valid {
  border-color: var(--accent);
}
.input-hint {
  font-size: 11px;
  color: var(--danger);
  margin-top: 6px;
  min-height: 16px;
}

/* ── GAME BUTTONS ── */
.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.btn {
  padding: 14px 0;
  border-radius: 10px;
  border: 1px solid;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-lock {
  background: var(--accent);
  border-color: var(--accent);
  color: #0e1117;
}
.btn-lock:hover {
  background: var(--accent2);
  border-color: var(--accent2);
}
.btn-press {
  background: transparent;
  border-color: var(--warn);
  color: var(--warn);
}
.btn-press:hover {
  background: rgba(245, 158, 11, 0.1);
}
.btn-submit {
  grid-column: 1/-1;
  background: var(--accent);
  border-color: var(--accent);
  color: #0e1117;
  padding: 16px 0;
  font-size: 14px;
}
.btn-submit:hover {
  background: var(--accent2);
}
.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── LOCKED BADGE ── */
.locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 6px;
  padding: 8px 14px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--accent2);
}
.locked-badge strong {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  letter-spacing: 0.08em;
}

/* ── PRESSBOT STATUS ── */
.ai-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}
.ai-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.ai-dot.ready {
  background: #39d353;
  animation: aiPulse 1.2s ease infinite alternate;
}
.ai-dot.thinking {
  background: #e3b341;
  animation: aiPulse 0.8s ease infinite alternate;
}
.ai-dot.waiting {
  background: #555555;
}
.ai-dot.lockedin {
  background: #a78bfa;
}
@keyframes aiPulse {
  from { opacity: 1; }
  to   { opacity: 0.3; }
}

/* ── PRESSBOT TABLE DIVIDER ── */
.pressbot-divider {
  text-align: center;
  font-size: 10px;
  color: var(--border);
  letter-spacing: 0.3em;
  margin-bottom: 16px;
  user-select: none;
}

/* ── PENALTY NOTICE ── */
.penalty-notice {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 11px;
  color: var(--danger);
  margin-bottom: 16px;
  display: none;
}
.penalty-notice.show {
  display: block;
}

/* ── RESULT SCREEN ── */
/* ── MODE SELECTOR (v3.0) ── */
.mode-selector {
  margin-bottom: 16px;
}
.mode-selector-label {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 8px;
}
.mode-pills {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
  gap: 3px;
}
.mode-pill {
  flex: 1;
  padding: 8px 4px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  background: transparent;
  transition: all 0.15s;
  outline: none;
}
.mode-pill:hover {
  background: rgba(255, 255, 255, 0.04);
}
.mode-pill.active-classic {
  background: #14532d;
  outline: 1px solid rgba(74, 222, 128, 0.35);
}
.mode-pill.active-strategic {
  background: #1e3a5f;
  outline: 1px solid rgba(96, 165, 250, 0.35);
}
.mode-pill.active-mastermind {
  background: #2e1065;
  outline: 1px solid rgba(167, 139, 250, 0.35);
}
.mode-pill-name {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #334155;
}
.mode-pill.active-classic .mode-pill-name {
  color: #4ade80;
}
.mode-pill.active-strategic .mode-pill-name {
  color: #60a5fa;
}
.mode-pill.active-mastermind .mode-pill-name {
  color: #a78bfa;
}
.mode-pill-desc {
  font-size: 8px;
  margin-top: 3px;
  letter-spacing: 0.05em;
  color: #1e293b;
}
.mode-pill.active-classic .mode-pill-desc {
  color: rgba(74, 222, 128, 0.6);
}
.mode-pill.active-strategic .mode-pill-desc {
  color: rgba(96, 165, 250, 0.6);
}
.mode-pill.active-mastermind .mode-pill-desc {
  color: rgba(167, 139, 250, 0.6);
}
.btn-rematch.mode-classic {
  background: #14532d;
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #4ade80;
}
.btn-rematch.mode-strategic {
  background: #1e3a5f;
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #60a5fa;
}
.btn-rematch.mode-mastermind {
  background: #2e1065;
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: #a78bfa;
}
.btn-rematch.mode-classic:hover {
  background: #166534;
}
.btn-rematch.mode-strategic:hover {
  background: #1e40af;
}
.btn-rematch.mode-mastermind:hover {
  background: #3b0764;
}
.result-screen {
  display: none;
}
.result-screen.show {
  display: block;
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.result-header {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.round-verdict {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  text-align: center;
  margin-bottom: 20px;
}
.round-verdict.win {
  color: var(--accent);
}
.round-verdict.lose {
  color: var(--danger);
}
.round-verdict.tie {
  color: var(--warn);
}
.result-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

/* ── Share bar (v3.1) ── */
#playerCard {
  padding: 0;
  overflow: hidden;
}
#playerCard .player-card-inner {
  padding: 16px;
}
.share-bar {
  border-top: 1px solid rgba(57, 211, 83, 0.15);
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.share-bar:hover {
  background: rgba(57, 211, 83, 0.05);
}
.share-bar-left {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(57, 211, 83, 0.75);
  font-weight: 600;
}
.share-bar-arrow {
  font-size: 9px;
  color: rgba(57, 211, 83, 0.4);
  transition: transform 0.2s ease;
}
.share-bar-arrow.open {
  transform: rotate(180deg);
}
.share-panel {
  display: none;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(57, 211, 83, 0.1);
  background: rgba(57, 211, 83, 0.02);
}
.share-panel.open {
  display: block;
}
.share-copy-btn {
  width: 100%;
  padding: 10px;
  border-radius: 7px;
  font-family:
    DM Mono,
    monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: var(--accent);
  color: #0d1117;
}
.share-copy-btn:hover {
  opacity: 0.88;
}
.share-copy-btn.copied {
  background: var(--surface-2);
  color: var(--accent);
  border: 1px solid rgba(57, 211, 83, 0.3);
}

.share-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.share-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.share-btn-sub {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.share-image-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(57, 211, 83, 0.3);
}
.share-image-btn:hover {
  background: rgba(57, 211, 83, 0.08);
}
.share-image-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.result-card.winner {
  border-color: var(--accent);
  background: rgba(74, 222, 128, 0.06);
}
.result-card.loser {
  opacity: 0.7;
}
.result-card-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.result-word {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.result-score {
  font-size: 28px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 4px;
}
.result-breakdown {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.raisin-moment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  text-align: center;
}
.raisin-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.raisin-word {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--warn);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.raisin-found {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 4px;
}
.raisin-score {
  font-size: 12px;
  color: var(--muted);
}
.btn-rematch {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0e1117;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 12px;
}
.btn-rematch:hover {
  background: var(--accent2);
}
.btn-home {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-home:hover {
  border-color: var(--muted);
  color: var(--text);
}

/* ── RESULT COMMUNITY TILES ── */
.result-community {
  margin-bottom: 20px;
}
.result-community-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.result-tiles-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.result-tile {
  width: 44px;
  height: 50px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.result-tile.private {
  border-color: var(--private);
  color: var(--private);
}
.result-tile.rare {
  border-color: var(--rare);
  color: var(--rare);
}
.result-tile.unused {
  opacity: 0.35;
}
.result-tiles-divider {
  width: 1px;
  height: 50px;
  background: var(--border);
  margin: 0 2px;
}

/* ── STAGE BADGE on result cards ── */
.result-stage-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 8px;
}
.result-stage-badge.flop {
  color: var(--accent);
  border-color: rgba(74, 222, 128, 0.3);
}
.result-stage-badge.turn {
  color: var(--warn);
  border-color: rgba(245, 158, 11, 0.3);
}
.result-stage-badge.river {
  color: var(--muted);
  border-color: var(--border);
}

/* ── P3: Header tier pill (v3.4) ── */
.header-tier-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  vertical-align: middle;
}
.header-tier-pill.classic  { background: #14532d; color: #4ade80; }
.header-tier-pill.strategic { background: #1e3a5f; color: #60a5fa; }
.header-tier-pill.mastermind { background: #2e1065; color: #a78bfa; }

/* ── P3: Bottom sheet (v3.4) ── */
.sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
}
.sheet-overlay.open { display: block; }

.tier-sheet {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 24px 20px 32px;
  z-index: 201;
  transition: transform 0.25s ease;
}
.tier-sheet.open { transform: translateX(-50%) translateY(0); }

.tier-sheet-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 16px;
}
.tier-sheet-options {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.tier-sheet-option {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.tier-sheet-option:hover { border-color: var(--muted); }
.tier-sheet-option.active-classic  { border-color: #4ade80; background: #14532d22; }
.tier-sheet-option.active-strategic { border-color: #60a5fa; background: #1e3a5f22; }
.tier-sheet-option.active-mastermind { border-color: #a78bfa; background: #2e106522; }
.tier-sheet-option-name {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.tier-sheet-option.active-classic .tier-sheet-option-name  { color: #4ade80; }
.tier-sheet-option.active-strategic .tier-sheet-option-name { color: #60a5fa; }
.tier-sheet-option.active-mastermind .tier-sheet-option-name { color: #a78bfa; }
.tier-sheet-option-desc {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--muted);
}
.tier-sheet-cancel {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.tier-sheet-cancel:hover { border-color: var(--muted); color: var(--text); }

/* ── P3: Contextual PRESS+ prompt (v3.4) ── */
.press-prompt {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 24px 20px 32px;
  z-index: 201;
  transition: transform 0.25s ease;
}
.press-prompt.open { transform: translateX(-50%) translateY(0); }
.press-prompt-text {
  font-size: 12px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: center;
}
.press-prompt-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.press-prompt-join {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #0d1117;
  border: none;
  border-radius: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}
.press-prompt-join:hover { background: #86efac; }
.press-prompt-dismiss {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.press-prompt-dismiss:hover { border-color: var(--muted); color: var(--text); }


/* ── ADMIN PANEL — tile override QA tool ── */
.admin-panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.80);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.admin-panel.hidden { display: none; }

.admin-panel-inner {
  background: #0d1117;
  border: 1px solid #e3b341;
  border-radius: 8px;
  padding: 24px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: 'DM Mono', monospace;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #e3b341;
  text-transform: uppercase;
}
.admin-close {
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}
.admin-close:hover { color: #e6edf3; }

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-field-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: #8b949e;
  text-transform: uppercase;
}
.admin-input {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: #e6edf3;
  outline: none;
  text-transform: uppercase;
}
.admin-input:focus { border-color: #e3b341; }
.admin-hint {
  font-size: 9px;
  color: #484f58;
  letter-spacing: 0.5px;
}

.admin-status {
  font-size: 10px;
  min-height: 14px;
  color: #f85149;
  letter-spacing: 0.5px;
}
.admin-status.ok { color: #39d353; }

.admin-apply {
  background: #e3b341;
  color: #0d1117;
  border: none;
  border-radius: 6px;
  padding: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.admin-apply:hover { background: #f0c040; }
