/* Playing card SVGs (52): Byron Knoll, public domain — https://code.google.com/p/vector-playing-cards/  via  https://github.com/notpeter/Vector-Playing-Cards */
/* back.svg: original to this project */

:root {
  --felt-1: #0d5c3d;
  --felt-2: #073d28;
  --felt-edge: #042419;
  --gold: #d4af37;
  --gold-soft: #b8962e;
  --gold-bronze: #b8862b;
  --gold-light: #f4d77a;
  --gold-deep: #8a6520;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --card-white: #f7f2e8;
  --card-red: #b91c2c;
  --card-ink: #1a1a1a;
  --ink: #f7f2e8;
  --ink-dim: rgba(247, 242, 232, 0.65);
  --ink-faint: rgba(247, 242, 232, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Lora', Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 35%, var(--felt-1) 0%, var(--felt-2) 55%, var(--felt-edge) 100%);
  background-attachment: fixed;
  -webkit-user-select: none;
  user-select: none;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* Fine-grain felt noise overlay (SVG turbulence) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.16 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
  opacity: 0.85;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.hidden {
  display: none !important;
}

/* ============ HOME ============ */
.screen-home {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

.home-col {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  height: 100dvh;
  padding: 6vh 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.home-header {
  text-align: center;
  width: 100%;
}

.app-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: clamp(44px, 11vw, 60px);
  letter-spacing: -0.02em;
  line-height: 1.25;
  background: linear-gradient(180deg,
    #f4d77a 0%,
    #d4af37 25%,
    #b8862b 50%,
    #d4af37 75%,
    #f4d77a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4))
    drop-shadow(0 0 18px rgba(212, 175, 55, 0.18));
}

/* ============ HOME DECK ============ */
.deck-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.home-deck {
  position: relative;
  width: 96px;
  height: 134px;
  margin: 0 auto;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.5));
}

.deck-card {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  will-change: transform;
}

.deck-card img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

.deck-card-5 { transform: translate(-4px, 4px) rotate(-2deg);   z-index: 1; }
.deck-card-4 { transform: translate(3px, 3px) rotate(1.5deg);   z-index: 2; }
.deck-card-3 { transform: translate(-2px, 2px) rotate(-1deg);   z-index: 3; }
.deck-card-2 { transform: translate(1px, 1px) rotate(0.5deg);   z-index: 4; }
.deck-card-1 { transform: translate(0, 0) rotate(0deg);         z-index: 5; }

.deck-card-1 { animation: deckShuffle1 5s ease-in-out infinite; }
.deck-card-2 { animation: deckShuffle2 5s ease-in-out infinite; }
.deck-card-3 { animation: deckShuffle3 5s ease-in-out infinite; }
.deck-card-4 { animation: deckShuffle4 5s ease-in-out infinite; }
.deck-card-5 { animation: deckShuffle5 5s ease-in-out infinite; }

/* Timeline:
   0-7%   : Cards 1,2,3 fly out right (fanned, independent). Cards 4,5 begin leaning left.
   7-10%  : Cards 1,2,3 immediately reverse direction; z-index drops mid-flight.
   10-14% : Cards 1,2,3 slide in BEHIND cards 4,5 to their resting back positions.
   10-14% : Cards 4,5 un-lean back to origin.
   14-100%: Rest. Cards 4,5 prominent on top; cards 1,2,3 sit behind, peeking out at the bottom. */

@keyframes deckShuffle1 {
  /* Top card: highest angle, flies out, slides in BEHIND deck at the back */
  0%   { transform: translate(0, 0)          rotate(0deg);    z-index: 5; }
  7%   { transform: translate(110px, -30px)  rotate(25deg);   z-index: 5; }
  10%  { transform: translate(75px, -18px)   rotate(15deg);   z-index: 0; }
  14%  { transform: translate(-2px, 6px)     rotate(-1deg);   z-index: 0; }
  100% { transform: translate(-2px, 6px)     rotate(-1deg);   z-index: 0; }
}

@keyframes deckShuffle2 {
  /* 2nd card: middle angle, flies furthest right */
  0%   { transform: translate(1px, 1px)      rotate(0.5deg);  z-index: 4; }
  7%   { transform: translate(120px, -5px)   rotate(18deg);   z-index: 4; }
  10%  { transform: translate(82px, 0)       rotate(10deg);   z-index: -1; }
  14%  { transform: translate(2px, 7px)      rotate(1deg);    z-index: -1; }
  100% { transform: translate(2px, 7px)      rotate(1deg);    z-index: -1; }
}

@keyframes deckShuffle3 {
  /* 3rd card: shallowest angle, flies out lower-right */
  0%   { transform: translate(-2px, 2px)     rotate(-1deg);   z-index: 3; }
  7%   { transform: translate(105px, 20px)   rotate(8deg);    z-index: 3; }
  10%  { transform: translate(72px, 14px)    rotate(4deg);    z-index: -2; }
  14%  { transform: translate(-4px, 8px)     rotate(-1.5deg); z-index: -2; }
  100% { transform: translate(-4px, 8px)     rotate(-1.5deg); z-index: -2; }
}

@keyframes deckShuffle4 {
  /* Slight left lean while cards above are out, then unlean */
  0%   { transform: translate(3px, 3px)      rotate(1.5deg);  z-index: 2; }
  4%   { transform: translate(-3px, 4px)     rotate(-0.5deg); z-index: 2; }
  10%  { transform: translate(-3px, 4px)     rotate(-0.5deg); z-index: 2; }
  14%  { transform: translate(3px, 3px)      rotate(1.5deg);  z-index: 2; }
  100% { transform: translate(3px, 3px)      rotate(1.5deg);  z-index: 2; }
}

@keyframes deckShuffle5 {
  /* More pronounced left lean (further from pivot) */
  0%   { transform: translate(-4px, 4px)     rotate(-2deg);   z-index: 1; }
  4%   { transform: translate(-13px, 5px)    rotate(-4deg);   z-index: 1; }
  10%  { transform: translate(-13px, 5px)    rotate(-4deg);   z-index: 1; }
  14%  { transform: translate(-4px, 4px)     rotate(-2deg);   z-index: 1; }
  100% { transform: translate(-4px, 4px)     rotate(-2deg);   z-index: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .deck-card-1, .deck-card-2, .deck-card-3, .deck-card-4, .deck-card-5 {
    animation: none;
  }
}

/* ============ MODE BUTTONS ============ */
.mode-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mode-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 18px;
  min-height: 72px;
  background: rgba(0, 0, 0, 0.22);
  border: none;
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.18s ease, box-shadow 0.22s ease, transform 0.18s ease;
}

.mode-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    var(--gold-bronze) 0%,
    var(--gold-light) 50%,
    var(--gold-bronze) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.mode-btn:hover,
.mode-btn:focus-visible {
  background: rgba(0, 0, 0, 0.32);
  box-shadow:
    inset 0 0 18px rgba(212, 175, 55, 0.18),
    0 6px 18px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
  outline: none;
}

.mode-btn:active {
  transform: translateY(0);
}

.mode-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1.15;
  background: linear-gradient(180deg,
    #f4d77a 0%,
    #d4af37 45%,
    #b8862b 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.mini-card {
  flex-shrink: 0;
  width: 38px;
  height: auto;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
  user-select: none;
  -webkit-user-drag: none;
}

/* ============ GOLD TEXT UTILITY ============ */
.gold-text {
  background: linear-gradient(180deg,
    #f4d77a 0%,
    #d4af37 25%,
    #b8862b 50%,
    #d4af37 75%,
    #f4d77a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ============ GAME SCREEN ============ */
.game-screen {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 100dvh;
  margin: 0 auto;
  padding: 28px 14px 24px;
  display: flex;
  flex-direction: column;
}

/* topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 32px;
}

.icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--gold);
  cursor: pointer;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  transition: box-shadow 0.18s ease, color 0.18s ease;
}

.icon-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    var(--gold-bronze) 0%,
    var(--gold-light) 50%,
    var(--gold-bronze) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  color: var(--gold-light);
  box-shadow: 0 0 14px var(--gold-glow);
  outline: none;
}

.top-mode {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  flex: 1;
}

/* count panel (Learn to Count) */
.count-panel {
  position: absolute;
  top: 100px;
  left: 14px;
  z-index: 4;
  max-width: 120px;
  padding: 8px 8px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 4px;
  text-align: center;
}

.count-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    var(--gold-bronze) 0%,
    var(--gold-light) 50%,
    var(--gold-bronze) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.cp-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 2px;
}

.cp-hero {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
  text-align: center;
}

.cp-hero.pos        { color: #6ee7b7; }
.cp-hero.strong-pos { color: #34d399; }
.cp-hero.neg        { color: #fb7185; }

.cp-secondary {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-dim);
}

.cp-secondary strong {
  color: var(--ink);
  font-weight: 600;
}

.cp-divider {
  margin: 7px 0 5px;
  border-top: 1px dashed rgba(212, 175, 55, 0.35);
}

.advantage {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 10px;
  color: var(--gold);
}

.advantage.pos        { color: #6ee7b7; }
.advantage.strong-pos { color: #34d399; }
.advantage.neg        { color: #fb7185; }

/* deck indicator (Learn to Count + Test Yourself) */
.deck-indicator {
  position: absolute;
  top: 100px;
  right: 14px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.deck-stack-mini {
  position: relative;
  width: 36px;
  height: 46px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.4));
}

.deck-stack-mini img {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 42px;
  border-radius: 2px;
}

.deck-stack-mini img:nth-child(1) { transform: translate(0, 0); }
.deck-stack-mini img:nth-child(2) { transform: translate(2px, -2px); }
.deck-stack-mini img:nth-child(3) { transform: translate(4px, -4px); }

.deck-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

.decks-box {
  margin-top: 6px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  text-align: center;
  min-width: 50px;
}

.decks-box-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  line-height: 1.1;
}

.decks-box-label {
  font-family: 'Lora', Georgia, serif;
  font-size: 9px;
  color: var(--ink-faint);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* table */
.table {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 5vh, 50px);
  padding: 12px 0 6px;
}

.dealer-area,
.player-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.seat-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
}

.hand-zone {
  position: relative;
  min-height: 100px;
  display: block;
}

.card {
  position: absolute;
  width: 70px;
  height: 98px;
  top: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  transform: rotate(var(--rot, 0deg));
  transition: left 0.3s ease, top 0.3s ease, transform 0.3s ease;
  will-change: transform;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
}

.card.flipped .card-inner { transform: rotateY(180deg); }

.card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-face img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 4px;
  object-fit: cover;
}

.card-back { transform: rotateY(180deg); }

@keyframes dealCard {
  0%   { transform: translate(140px, -180px) rotate(160deg) scale(0.7); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(0, 0) rotate(var(--rot, 0deg)) scale(1); opacity: 1; }
}

.card.dealing {
  animation: dealCard 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* hand score pill */
.hand-score {
  position: relative;
  min-width: 56px;
  padding: 4px 14px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.4);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  align-self: center;
}

.hand-score::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    var(--gold-bronze) 0%,
    var(--gold-light) 50%,
    var(--gold-bronze) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.hand-score.bust { color: #fb7185; }
.hand-score.bust::before {
  background: linear-gradient(135deg, #7a1d2a 0%, #fb7185 50%, #7a1d2a 100%);
}

.hand-score.blackjack {
  color: var(--gold-light);
  box-shadow: 0 0 14px var(--gold-glow);
}

.hand-score.win { color: #6ee7b7; }
.hand-score.win::before {
  background: linear-gradient(135deg, #1d7a52 0%, #6ee7b7 50%, #1d7a52 100%);
}

/* message overlay */
.message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg,
    #f4d77a 0%,
    #d4af37 25%,
    #b8862b 50%,
    #d4af37 75%,
    #f4d77a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 6;
}

.message.show { opacity: 1; }

.message.win {
  background: linear-gradient(180deg, #d1fae5 0%, #34d399 50%, #10b981 100%);
  background-clip: text;
  -webkit-background-clip: text;
  filter:
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 14px rgba(52, 211, 153, 0.45));
}

.message.lose {
  background: linear-gradient(180deg, #fecaca 0%, #fb7185 50%, #e11d48 100%);
  background-clip: text;
  -webkit-background-clip: text;
  filter:
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 14px rgba(251, 113, 133, 0.45));
}

/* .message.push and .message.mixed use the default gold gradient */

/* hand-of-split indicator */
.hand-indicator {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
}

/* money row (Test Yourself): bankroll + current bet on one line */
.money-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 20px;
  padding: 6px 0;
  margin-bottom: 4px;
}

.bankroll {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.bankroll-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.bankroll-amount {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

/* action bar */
.action-bar {
  position: relative;
  padding: 8px 0 12px;
}

.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.action-btn {
  position: relative;
  padding: 12px 4px;
  background: rgba(0, 0, 0, 0.22);
  border: none;
  border-radius: 4px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.15s ease;
}

.action-btn > span {
  background: linear-gradient(180deg,
    #f4d77a 0%,
    #d4af37 45%,
    #b8862b 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.action-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    var(--gold-bronze) 0%,
    var(--gold-light) 50%,
    var(--gold-bronze) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.action-btn:not(:disabled):hover {
  background-color: rgba(0, 0, 0, 0.34);
}

.action-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.deal-btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.deal-btn {
  padding: 14px 52px;
  border: none;
  border-radius: 4px;
  background: linear-gradient(180deg, #f4d77a 0%, #d4af37 50%, #b8862b 100%);
  color: #2a1c00;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow:
    0 6px 24px var(--gold-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.deal-btn:hover,
.deal-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 8px 28px rgba(212, 175, 55, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  outline: none;
}

.deal-btn:active {
  transform: translateY(0);
}

/* ============ CHIPS ============ */
.chip-rack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  margin-bottom: 6px;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.chip-rack.disabled,
.money-row.disabled {
  opacity: 0.35;
  filter: saturate(0.5);
  pointer-events: none;
}

.money-row {
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.chip-row {
  display: flex;
  flex-direction: row;
  gap: 6px;
  justify-content: center;
  flex-wrap: nowrap;
}

.bet-display {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.bet-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.bet-amount {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.bet-clear {
  background: none;
  border: none;
  padding: 0;
  font-family: 'Lora', Georgia, serif;
  font-size: 10px;
  color: var(--ink-dim);
  cursor: pointer;
}

.bet-clear:hover {
  color: var(--ink);
  text-decoration: underline;
}

.bet-result {
  position: absolute;
  top: -28px;
  right: 0;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 16px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
}

.bet-result.show {
  animation: betResultFloat 2.4s ease forwards;
}

.bet-result.positive { color: #6ee7b7; }
.bet-result.negative { color: #fb7185; }
.bet-result.push     { color: #fcd34d; }

@keyframes betResultFloat {
  0%   { opacity: 0; transform: translateY(6px); }
  15%  { opacity: 1; transform: translateY(0); }
  75%  { opacity: 1; transform: translateY(-4px); }
  100% { opacity: 0; transform: translateY(-14px); }
}

.chip {
  width: clamp(44px, 11vw, 54px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--chip-color);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(255, 255, 255, 0.2);
  transition: transform 0.15s, box-shadow 0.15s;
}

.chip::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    var(--chip-color) 0deg 22.5deg,
    #f7f2e8 22.5deg 45deg
  );
  z-index: -1;
}

.chip::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--chip-color);
  border: 1.5px dashed rgba(255, 255, 255, 0.4);
}

.chip-label {
  position: relative;
  z-index: 1;
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  font-size: clamp(10px, 2.6vw, 12px);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

.chip:hover  { transform: translateY(-2px); }
.chip:active { transform: translateY(0); }

.chip.selected {
  transform: translateY(-12px) scale(1.18);
  box-shadow:
    0 0 0 3px var(--gold),
    0 12px 26px rgba(0, 0, 0, 0.55),
    0 0 32px rgba(212, 175, 55, 0.6);
  z-index: 5;
}

.mode2-chips.has-selection .chip:not(.selected) {
  opacity: 0.38;
  filter: saturate(0.5);
}

.deal-btn:disabled,
.deal-btn[disabled] {
  opacity: 0.32;
  cursor: not-allowed;
  filter: grayscale(0.5);
  box-shadow: none;
  pointer-events: none;
  transform: none;
}

.chip-skip   { --chip-color: #6b6b6b; }
.chip-low    { --chip-color: #2563eb; }
.chip-high   { --chip-color: #d4af37; }
.chip-green  { --chip-color: #1e7f3f; }
.chip-orange { --chip-color: #d97706; }
.chip-black  { --chip-color: #1a1a1a; }
.chip-pink   { --chip-color: #be185d; }
.chip-purple { --chip-color: #6b21a8; }

/* ============ BANKRUPT MODAL ============ */
.bankrupt-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: auto;
}

.bankrupt-modal.hidden {
  display: none;
}

.bankrupt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: bankruptFade 0.3s ease;
}

.bankrupt-card {
  position: relative;
  background: linear-gradient(180deg, rgba(13, 92, 61, 0.85), rgba(7, 61, 40, 0.85));
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 32px 28px 32px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(212, 175, 55, 0.15);
  animation: bankruptCardIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bankrupt-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #f4d77a 0%, #d4af37 25%, #b8862b 50%, #d4af37 75%, #f4d77a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.bankrupt-body {
  font-family: 'Lora', Georgia, serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-dim);
  margin-bottom: 26px;
}

.bankrupt-btn {
  appearance: none;
  background: linear-gradient(180deg, #f4d77a, #d4af37, #b8862b);
  border: none;
  color: #2a1c00;
  padding: 12px 32px;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  border-radius: 3px;
  box-shadow:
    0 4px 18px rgba(212, 175, 55, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bankrupt-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 22px rgba(212, 175, 55, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes bankruptFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes bankruptCardIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============ TUTORIAL MODAL (Mode 1) ============ */
.tutorial-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.tutorial-modal.hidden { display: none; }

.tutorial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tutorial-card {
  position: relative;
  background: linear-gradient(180deg, rgba(13, 92, 61, 0.85), rgba(7, 61, 40, 0.85));
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 28px 26px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(212, 175, 55, 0.15);
  animation: bankruptCardIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tutorial-progress {
  font-family: 'Playfair Display', serif;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 8px;
}

.tutorial-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.15;
  text-align: center;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #f4d77a 0%, #d4af37 25%, #b8862b 50%, #d4af37 75%, #f4d77a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.tutorial-body {
  font-family: 'Lora', Georgia, serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-dim);
  margin-bottom: 22px;
}

.tutorial-body strong { color: var(--ink); font-weight: 600; }
.tutorial-body em     { color: var(--gold); font-style: normal; font-weight: 600; }

.tutorial-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.tutorial-skip {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--ink-dim);
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tutorial-skip:hover { color: var(--ink); }

.tutorial-next {
  appearance: none;
  background: linear-gradient(180deg, #f4d77a, #d4af37, #b8862b);
  border: none;
  color: #2a1c00;
  padding: 11px 26px;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  border-radius: 3px;
  box-shadow:
    0 4px 14px rgba(212, 175, 55, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.15s ease;
}

.tutorial-next:hover { transform: translateY(-1px); }

/* ============ TUTORIAL VISUALS (Mode 1) ============ */
.tutorial-visual {
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
}

.tutorial-text {
  font-family: 'Lora', Georgia, serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-dim);
}

.tut-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.tut-hand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.tut-cards-row {
  display: flex;
  gap: 4px;
}

.tut-cards-row.tut-spaced { gap: 14px; }

.tut-cards-row img,
.tut-mini img {
  width: 46px;
  height: 65px;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.tut-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.tut-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.tut-label {
  font-family: 'Lora', Georgia, serif;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  text-align: center;
}

.tut-label.tut-bust { color: #e57373; }

.tut-vs {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-faint);
}

.tut-review-mockup {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 4px;
  padding: 10px 14px;
  min-width: 260px;
}

.tut-review-mockup .review-title {
  font-family: 'Playfair Display', serif;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 8px;
}

.tut-review-mockup .review-line {
  font-family: 'Lora', Georgia, serif;
  font-size: 12px;
  line-height: 1.5;
}

.tut-review-mockup .review-line.correct { color: #a7d4b3; }
.tut-review-mockup .review-line.miss { color: #f0c275; }

.tut-review-mockup .review-summary {
  font-family: 'Lora', Georgia, serif;
  font-size: 11px;
  font-style: italic;
  color: var(--ink-faint);
  text-align: center;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

/* ============ ROUND REVIEW (Mode 1) ============ */
.round-review {
  max-width: 400px;
  width: 100%;
  margin: 10px auto 0;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.round-review.show {
  opacity: 1;
  transform: translateY(0);
}

.round-review .review-title {
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 8px;
}

.round-review .review-line {
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  line-height: 1.55;
}

.round-review .review-line.correct { color: #a7d4b3; }
.round-review .review-line.miss { color: #f0c275; }

.round-review .review-section-label {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-top: 6px;
  margin-bottom: 4px;
}

.round-review .review-section-label:first-of-type {
  margin-top: 0;
}

.round-review .review-summary {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

/* ============ MODE 2: SUB-MODE SWITCHER ============ */
.submode-switcher {
  display: flex;
  gap: 0;
  margin: 8px auto 14px;
  width: fit-content;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 100px;
  padding: 3px;
  position: relative;
  z-index: 5;
}

.submode-switcher.hidden { display: none; }

.submode-btn {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--ink-faint);
  font-family: 'Lora', Georgia, serif;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  letter-spacing: 0.05em;
}

.submode-btn.active {
  background: linear-gradient(180deg, rgba(212,175,55,0.25), rgba(212,175,55,0.1));
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.4);
}

/* ============ MODE 2: DEAL BUTTON POSITIONING ============ */
#gameScreen[data-mode="2"] .deal-btn-wrap {
  margin-top: 12px;
}

/* ============ MODE 2: COUNT BADGE ON DEALT CARDS ============ */
@keyframes countBadgePop {
  0%   { opacity: 0; transform: scale(0.6) translateY(6px); }
  20%  { opacity: 1; transform: scale(1) translateY(0); }
  80%  { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(1) translateY(-6px); }
}

.count-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transform: scale(0.6) translateY(6px);
  animation: countBadgePop 1.6s ease 0.25s forwards;
}

.count-badge.plus  { background: #1f4a36; color: #b7e4c7; border: 1px solid #6ee7b7; }
.count-badge.zero  { background: #2c3e50; color: #aab8c2; border: 1px solid #5d7290; }
.count-badge.minus { background: #4a1f1f; color: #f0c0c0; border: 1px solid #e57373; }

/* ============ MODE 2: COUNT PANEL HIDDEN-MODE MASK + CHECK BUTTON ============ */
.count-panel.hidden-mode .cp-label,
.count-panel.hidden-mode .cp-hero,
.count-panel.hidden-mode .cp-secondary,
.count-panel.hidden-mode .cp-divider,
.count-panel.hidden-mode .advantage {
  visibility: hidden;
}

.count-panel.hidden-mode::after {
  content: "Count Hidden";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 30px; /* leave room for the Check button */
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}

.check-count-btn {
  display: block;
  margin: 8px auto 0;
  appearance: none;
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold);
  font-family: 'Lora', Georgia, serif;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 100px;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.check-count-btn:hover { background: rgba(212, 175, 55, 0.1); }
.check-count-btn.hidden { display: none; }
.check-count-btn.revealed { background: rgba(212, 175, 55, 0.15); }

/* ============ MODE 2: RAMP CHIP COLORS ============ */
.chip-ramp-1 { --chip-color: #1e7f3f; }
.chip-ramp-2 { --chip-color: #2563eb; }
.chip-ramp-4 { --chip-color: #b91c2c; }
.chip-ramp-8 {
  --chip-color: #1a1a1a;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(212, 175, 55, 0.4);
}

/* ============ MODE 2: QUIZ MODAL ============ */
.quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.quiz-modal.hidden { display: none; }

.quiz-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 16px 0 14px;
}

.quiz-step {
  appearance: none;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
}

.quiz-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  min-width: 60px;
  text-align: center;
}

.quiz-result {
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  text-align: center;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 3px;
}

.quiz-result.hidden { display: none; }
.quiz-result.correct { background: rgba(110,231,183,0.1); color: #6ee7b7; border: 1px solid rgba(110,231,183,0.3); }
.quiz-result.miss    { background: rgba(240,160,160,0.1); color: #f0a0a0; border: 1px solid rgba(240,160,160,0.3); }

/* ============ MODE 2: TUTORIAL VISUALS ============ */
.tut-value.plus  { color: #6ee7b7; }
.tut-value.zero  { color: #94a3b8; }
.tut-value.minus { color: #f0a0a0; }

.hilo-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hilo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
}

.hilo-cards {
  display: flex;
}

.hilo-cards img {
  width: 32px;
  height: 45px;
  margin-left: -14px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hilo-cards img:first-child { margin-left: 0; }

.hilo-label {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}

.hilo-group.plus  .hilo-label { background: rgba(110,231,183,0.15); color: #6ee7b7; }
.hilo-group.zero  .hilo-label { background: rgba(148,163,184,0.15); color: #94a3b8; }
.hilo-group.minus .hilo-label { background: rgba(240,160,160,0.15); color: #f0a0a0; }

.rc-sequence {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.rc-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rc-step img { width: 36px; height: 51px; border-radius: 2px; }

.rc-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
}

.rc-val.plus  { color: #6ee7b7; }
.rc-val.zero  { color: #94a3b8; }
.rc-val.minus { color: #f0a0a0; }

.rc-total {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.tc-calc {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.tc-piece { text-align: center; }

.tc-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.tc-piece.tc-result .tc-num { color: var(--gold); }

.tc-cap {
  font-family: 'Lora', Georgia, serif;
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}

.tc-op {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  color: var(--ink-faint);
}

.edge-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'Lora', Georgia, serif;
  font-size: 12px;
}

.edge-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.3);
}

.edge-label  { color: var(--ink-dim); font-family: 'JetBrains Mono', monospace; }
.edge-house  { color: #f0a0a0; }
.edge-even   { color: #94a3b8; }
.edge-player { color: #6ee7b7; font-weight: 600; }

.ramp {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ramp-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 12px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.3);
  font-family: 'Lora', Georgia, serif;
  font-size: 12px;
}

.ramp-step.ramp-top { background: rgba(212, 175, 55, 0.15); }
.ramp-tc  { color: var(--ink-dim); font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.ramp-bet { color: var(--gold); font-family: 'Playfair Display', serif; font-weight: 700; }

.submode-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'Lora', Georgia, serif;
  font-size: 12px;
}

.sp-row {
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  color: var(--ink-dim);
}

.sp-row strong { color: var(--gold); font-weight: 600; }
