:root {
  --bg-dark: #07110c;
  --felt-primary: #0f3822;
  --felt-radial: #185434;
  --felt-border: #266b46;
  --panel-bg: rgba(10, 25, 17, 0.88);
  --panel-border: rgba(255, 255, 255, 0.12);
  --gold: #f5c542;
  --gold-hover: #ffd666;
  --gold-dim: rgba(245, 197, 66, 0.2);
  --text-main: #f0f6f2;
  --text-muted: #9cb3a5;
  --danger: #e5484d;
  --success: #30a46c;
  --info: #3b82f6;
  --card-white: #ffffff;
  --card-red: #d32f2f;
  --card-black: #1a1a1a;
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  user-select: none;
}

.app-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
  max-width: 1880px;
  margin: 0 auto;
  overflow: hidden;
}

/* Keyboard badge styling */
kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: #111;
  background-color: #e2e8f0;
  border: 1px solid #94a3b8;
  border-bottom-width: 2px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(6, 15, 10, 0.95);
  border-bottom: 1px solid var(--panel-border);
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  background: linear-gradient(135deg, var(--gold), #b8860b);
  color: #0b1911;
  font-weight: 900;
  font-size: 0.95rem;
  padding: 8px 10px;
  border-radius: 8px;
  letter-spacing: 1px;
}

.brand h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand .subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Count HUD */
.hud-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(18, 45, 30, 0.75);
  border: 1px solid rgba(245, 197, 66, 0.35);
  padding: 6px 18px;
  border-radius: 999px;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hud-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
}

.hud-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.hud-value {
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hud-value.highlight {
  color: var(--gold);
}

.hud-panel.masked .count-secret {
  filter: blur(7px);
  opacity: 0.5;
  transition: filter 0.2s ease;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Main Table Container */
.table-container {
  display: grid;
  grid-template-columns: 270px 1fr 270px;
  gap: 16px;
  padding: 14px 20px;
  background: radial-gradient(circle at center, var(--felt-radial) 0%, var(--felt-primary) 65%, #071f12 100%);
  overflow: hidden;
  position: relative;
}

/* Side Panels */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
  overflow-y: auto;
}

.panel-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  margin-bottom: 10px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--text-main);
}

/* Shoe Bar */
.shoe-bar-outer {
  position: relative;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 8px;
}

.shoe-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #eab308);
  transition: width 0.3s ease;
}

.shoe-cut-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--danger);
  box-shadow: 0 0 6px var(--danger);
}

.shoe-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Stats Rows */
.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-row:last-child {
  border-bottom: none;
}

/* Trainer Toggles */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  padding: 5px 0;
  cursor: pointer;
}

.toggle-row input {
  accent-color: var(--gold);
  width: 15px;
  height: 15px;
}

/* Card Values Grid */
.card-tags-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.tag-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px;
  font-size: 0.75rem;
}

.tag-pill .rank {
  font-weight: 700;
  color: var(--text-muted);
}

.tag-pill .val {
  font-weight: 800;
}

.tag-pill.pos .val { color: #4ade80; }
.tag-pill.zero .val { color: #94a3b8; }
.tag-pill.neg .val { color: #f87171; }

/* Shortcut List */
.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.77rem;
  color: var(--text-muted);
}

/* Center Felt Area */
.felt-area {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border: 2px solid rgba(245, 197, 66, 0.22);
  border-radius: 28px;
  padding: 16px 24px;
  position: relative;
  background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.04), transparent 70%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.35);
}

.table-arc-text {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: rgba(245, 197, 66, 0.45);
  font-weight: 700;
  text-align: center;
}

/* Dealer & Player Zones */
.dealer-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 155px;
}

.zone-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zone-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.hand-total-badge {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 2px 9px;
  border-radius: 999px;
}

.hand-total-badge.bust {
  background: var(--danger);
  border-color: #ff8b8e;
}

.hand-total-badge.bj {
  background: var(--gold);
  color: #111;
}

/* Cards Row */
.cards-row {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 116px;
}

.playing-card {
  width: 82px;
  height: 116px;
  background: var(--card-white);
  border-radius: 8px;
  box-shadow: -4px 4px 12px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px;
  position: relative;
  margin-left: -22px;
  transition: transform 0.2s ease;
  animation: dealCard 0.18s ease-out;
}

.playing-card:first-child {
  margin-left: 0;
}

@keyframes dealCard {
  from {
    opacity: 0;
    transform: translate(80px, -90px) rotate(12deg) scale(0.75);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

@keyframes flipReveal {
  0% {
    transform: perspective(600px) rotateY(90deg) scale(1.06);
  }
  100% {
    transform: perspective(600px) rotateY(0deg) scale(1);
  }
}

.playing-card.flip-reveal {
  animation: flipReveal 0.28s ease-out;
}

.playing-card.red {
  color: var(--card-red);
}

.playing-card.black {
  color: var(--card-black);
}

.playing-card.hole-card {
  background: repeating-linear-gradient(
    45deg,
    #1e3a8a,
    #1e3a8a 6px,
    #172554 6px,
    #172554 12px
  );
  border: 3px solid #f8fafc;
}

.card-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.card-corner.bottom {
  align-self: flex-end;
  transform: rotate(180deg);
}

.card-rank {
  font-size: 1.05rem;
  font-weight: 800;
}

.card-suit-sm {
  font-size: 0.85rem;
}

.card-center-suit {
  font-size: 2.1rem;
  align-self: center;
  line-height: 1;
}

.card-count-tag {
  position: absolute;
  top: -8px;
  right: -6px;
  background: #0f172a;
  color: var(--gold);
  border: 1px solid var(--gold);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 99px;
  animation: popTag 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-count-tag.pos {
  color: #4ade80;
  border-color: #4ade80;
}

.card-count-tag.neg {
  color: #f87171;
  border-color: #f87171;
}

@keyframes popTag {
  from {
    transform: scale(0.3) translateY(6px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.hud-panel.masked ~ .table-container .card-count-tag {
  display: none;
}

/* Center Prompts / Status Banner */
.center-banner-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 5;
  max-width: 560px;
  width: 100%;
}

.status-banner {
  background: rgba(7, 17, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.prompt-box {
  background: rgba(10, 22, 16, 0.96);
  border: 2px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.prompt-box.warning-box {
  border-color: #f97316;
}

.prompt-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.prompt-Sub, .prompt-desc {
  font-size: 0.82rem;
  color: var(--text-main);
  margin-bottom: 10px;
}

.prompt-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.quiz-form {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.quiz-form input {
  width: 130px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  background: #0f1f16;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

.quiz-feedback {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Player Hands Container */
.player-zone {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 28px;
  min-height: 175px;
  width: 100%;
}

.player-hand-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.player-hand-box.active-hand {
  border-color: var(--gold);
  background: rgba(245, 197, 66, 0.08);
  box-shadow: 0 0 20px rgba(245, 197, 66, 0.2);
}

.hand-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hand-bet-chip {
  background: rgba(245, 197, 66, 0.2);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
}

.hand-outcome-pill {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
}

.outcome-win { background: var(--success); color: #fff; }
.outcome-loss { background: var(--danger); color: #fff; }
.outcome-push { background: #64748b; color: #fff; }
.outcome-bj { background: var(--gold); color: #111; }

/* Bottom Control Deck */
.control-deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(6, 15, 10, 0.96);
  border-top: 1px solid var(--panel-border);
  gap: 20px;
  flex-wrap: wrap;
}

.bankroll-box {
  display: flex;
  gap: 20px;
}

.bank-item {
  display: flex;
  flex-direction: column;
}

.bank-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 700;
}

.bank-val {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bank-val.gold {
  color: var(--gold);
}

.bank-val-wrap,
.bet-stack-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.payout-float {
  font-size: 0.9rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 99px;
  animation: floatUpFade 1.5s ease-out forwards;
}

.payout-float.win {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.16);
}

.payout-float.loss {
  color: #f87171;
  background: rgba(248, 113, 113, 0.16);
}

@keyframes floatUpFade {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.85);
  }
  20% {
    opacity: 1;
    transform: translateY(0) scale(1.05);
  }
  80% {
    opacity: 1;
    transform: translateY(-4px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

.mini-chip-stack {
  display: flex;
  align-items: center;
  margin-left: 4px;
}

.mini-chip {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.85);
  margin-left: -7px;
  box-shadow: -1px 2px 4px rgba(0, 0, 0, 0.5);
  animation: chipBounce 0.2s ease-out;
}

.mini-chip:first-child {
  margin-left: 0;
}

@keyframes chipBounce {
  from {
    transform: translateY(-12px) scale(0.7);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes warnShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.prompt-box.warning-box {
  border-color: #f97316;
  animation: warnShake 0.35s ease-in-out;
}

/* Chips Rack */
.chips-rack {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px dashed rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease, opacity 0.2s;
  position: relative;
}

.chip:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.05);
}

.chip:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.chip-amount {
  font-size: 0.78rem;
  line-height: 1;
}

.chip kbd {
  margin: 2px 0 0 0;
  font-size: 0.62rem;
  padding: 1px 4px;
}

.chip-5 { background: #dc2626; }
.chip-25 { background: #16a34a; }
.chip-100 { background: #1e293b; border-color: var(--gold); }
.chip-500 { background: #7e22ce; }
.chip-1000 { background: #ca8a04; color: #111; }

.bet-utility-btns {
  display: flex;
  gap: 6px;
  margin-left: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.86rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-main);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.78rem;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--gold);
}

.btn-secondary {
  background: #1e293b;
  border-color: #334155;
}

.btn-secondary:hover:not(:disabled) {
  background: #334155;
}

.btn-gold {
  background: var(--gold);
  color: #111;
}

.btn-gold:hover:not(:disabled) {
  background: var(--gold-hover);
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-deal {
  background: linear-gradient(135deg, var(--gold), #eab308);
  color: #0b1911;
  font-size: 0.95rem;
  font-weight: 900;
  padding: 11px 22px;
  box-shadow: 0 4px 14px rgba(245, 197, 66, 0.35);
}

.btn-deal:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--gold-hover);
}

.btn-action {
  padding: 11px 16px;
  font-weight: 800;
}

.btn-hit { background: #16a34a; }
.btn-hit:hover:not(:disabled) { background: #22c55e; }

.btn-stand { background: #dc2626; }
.btn-stand:hover:not(:disabled) { background: #ef4444; }

.btn-double { background: #2563eb; }
.btn-double:hover:not(:disabled) { background: #3b82f6; }

.btn-split { background: #7c3aed; }
.btn-split:hover:not(:disabled) { background: #8b5cf6; }

.btn-surrender { background: #475569; }
.btn-surrender:hover:not(:disabled) { background: #64748b; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  background: #0d1f16;
  border: 1px solid rgba(245, 197, 66, 0.4);
  border-radius: var(--radius-lg);
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--panel-border);
}

.modal-header h2 {
  font-size: 1.1rem;
  color: var(--gold);
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.modal-section h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
}

.form-group select,
.form-group input[type="number"] {
  padding: 8px 10px;
  background: #07120c;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
}

.system-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.custom-tags-editor {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.tag-input-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px;
  border-radius: 6px;
}

.tag-input-box label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 3px;
}

.tag-input-box input {
  width: 100%;
  text-align: center;
  background: #07120c;
  border: 1px solid var(--panel-border);
  color: #fff;
  border-radius: 4px;
  padding: 4px;
  font-size: 0.8rem;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--panel-border);
  display: flex;
  justify-content: flex-end;
}

/* Analyzer Table inside Modal */
.analyzer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.analyzer-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 14px;
}

.analyzer-card h4 {
  color: var(--gold);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.analyzer-stat-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 4px 0;
}

.rec-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--gold);
  color: #111;
  font-weight: 900;
}

/* SEO Reference & Strategy Guide Modal */
.guide-modal-card {
  max-width: 820px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.seo-guide-article {
  user-select: text;
  line-height: 1.55;
  font-size: 0.88rem;
  color: var(--text-main);
}

.guide-section {
  margin-bottom: 20px;
}

.guide-section:last-child {
  margin-bottom: 0;
}

.guide-section h3 {
  color: var(--gold);
  font-size: 0.96rem;
  margin-bottom: 8px;
}

.guide-section p {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.guide-section ul {
  padding-left: 18px;
  color: var(--text-muted);
}

.guide-section li {
  margin-bottom: 4px;
}

.guide-section li strong {
  color: var(--text-main);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 6px;
}

.guide-table th,
.guide-table td {
  border: 1px solid var(--panel-border);
  padding: 7px 10px;
  text-align: left;
}

.guide-table th {
  background: rgba(245, 197, 66, 0.12);
  color: var(--gold);
  font-weight: 700;
}

.guide-table td {
  color: var(--text-muted);
}

.guide-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
}

/* =========================================================================
   ONE-STOP-SHOP SIDEBAR NAVIGATION & MAIN WORKSPACE STAGE
   ========================================================================= */

.workspace-layout {
  display: grid;
  grid-template-columns: 208px 1fr;
  height: 100%;
  overflow: hidden;
}

.workspace-sidebar {
  background: rgba(5, 13, 9, 0.96);
  border-right: 1px solid var(--panel-border);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 5;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  padding: 0 10px 4px;
}

.workspace-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ws-tab-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 11px 12px;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ws-tab-btn .ws-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.ws-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.ws-tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.22), rgba(245, 197, 66, 0.08));
  color: var(--gold);
  border-color: rgba(245, 197, 66, 0.45);
  box-shadow: inset 3px 0 0 var(--gold);
}

.workspace-main {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.trainer-screen {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  overflow: hidden;
}

.hub-view {
  height: 100%;
  padding: 22px 26px 52px;
  overflow-y: auto;
  user-select: text;
}

@media (max-width: 1024px) {
  .workspace-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .workspace-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--panel-border);
    padding: 8px 12px;
  }
  .sidebar-section-label {
    display: none;
  }
  .workspace-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .ws-tab-btn {
    width: auto;
    white-space: nowrap;
    padding: 7px 12px;
  }
}

.hub-container {
  max-width: 1520px;
  margin: 0 auto;
}

.hub-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hub-header-row h2 {
  font-size: 1.35rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.hub-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 860px;
}

.hub-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hub-card h3 {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.hub-select {
  padding: 7px 11px;
  background: #07120c;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
}

.hub-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
}

/* Speed Drills Lab */
#view-drills .card-count-tag {
  display: none !important;
}

.drill-inline-val {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-tiny {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-tiny:hover {
  background: rgba(245, 197, 66, 0.18);
  border-color: var(--gold);
  color: var(--gold);
}

.btn-tiny.running {
  background: rgba(34, 197, 94, 0.18);
  border-color: #22c55e;
  color: #4ade80;
}

.rc-masked {
  color: var(--text-muted);
  letter-spacing: 0.12em;
}

.cd-ready-prompt {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 480px;
}

.drill-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.drill-tab-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.drill-tab-btn.active {
  background: var(--gold-dim);
  color: var(--gold);
  border-color: var(--gold);
}

.drill-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: 18px;
}

.drill-stat-group {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.drill-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drill-stat span {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.drill-stat strong {
  font-size: 1.15rem;
}

.drill-controls-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cd-stage-area {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, var(--felt-radial), var(--felt-primary));
  border: 2px solid var(--felt-border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.drill-tip {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Visual Acrylic Discard Tray */
.discard-drill-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: center;
}

.discard-visual-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.discard-visual-col h4 {
  font-size: 0.82rem;
  color: var(--gold);
  text-transform: uppercase;
}

.discard-tray-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.discard-markers {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  padding: 2px 0;
}

.discard-tray-cylinder {
  width: 108px;
  height: 240px;
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 3px;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.65);
}

.discard-card-stack {
  width: 100%;
  background: repeating-linear-gradient(
    to top,
    #f1f5f9 0px,
    #f1f5f9 2px,
    #b91c1c 2px,
    #b91c1c 4px
  );
  border-radius: 2px;
  transition: height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.dt-form-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 460px;
}

/* Flashcard Stage */
.fc-table-stage {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  background: radial-gradient(circle at center, var(--felt-radial), var(--felt-primary));
  border: 2px solid var(--felt-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 18px;
}

.fc-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.fc-actions-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quiz-feedback.fb-ok {
  color: #4ade80;
  background: rgba(48, 164, 108, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 10px 14px;
  border-radius: 8px;
}

.quiz-feedback.fb-err {
  color: #fca5a5;
  background: rgba(229, 72, 77, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.4);
  padding: 10px 14px;
  border-radius: 8px;
}

/* Strategy & Index Matrices */
.charts-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.matrix-inspector-bar {
  background: rgba(18, 45, 30, 0.85);
  border: 1px solid rgba(245, 197, 66, 0.35);
  border-radius: 8px;
  padding: 11px 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inspector-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.inspector-dev {
  color: var(--gold);
  font-size: 0.83rem;
}

.inspector-leak {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.matrices-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1240px) {
  .matrices-grid-3 {
    grid-template-columns: 1fr;
  }
}

.matrix-box h4 {
  color: var(--gold);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.matrix-scroll {
  overflow-x: auto;
}

.strat-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  text-align: center;
}

.strat-matrix-table th,
.strat-matrix-table td {
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 4px;
  position: relative;
}

.strat-matrix-table thead th {
  background: rgba(0, 0, 0, 0.45);
  color: var(--gold);
  font-weight: 800;
}

.strat-matrix-table .row-hdr {
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  font-weight: 700;
  white-space: nowrap;
  padding: 5px 7px;
}

.strat-cell {
  cursor: pointer;
  font-weight: 800;
  min-width: 34px;
  height: 30px;
  transition: transform 0.1s ease;
}

.strat-cell:hover {
  transform: scale(1.12);
  z-index: 3;
  outline: 2px solid #fff;
}

.act-H {
  background: rgba(59, 130, 246, 0.32);
  color: #dbeafe;
}

.act-S {
  background: rgba(245, 197, 66, 0.28);
  color: #fef08a;
}

.act-D {
  background: rgba(48, 164, 108, 0.42);
  color: #bbf7d0;
}

.act-P {
  background: rgba(168, 85, 247, 0.38);
  color: #f3e8ff;
}

.act-R {
  background: rgba(229, 72, 77, 0.42);
  color: #fecaca;
}

.cell-dev-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  font-size: 0.56rem;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 3px;
  background: #111;
  color: var(--gold);
  border: 1px solid rgba(245, 197, 66, 0.65);
  font-weight: 800;
}

.cell-leak-dot {
  position: absolute;
  bottom: 1px;
  left: 2px;
  font-size: 0.6rem;
  font-weight: 900;
  color: #ff4d4f;
}

.strat-cell.has-leak {
  box-shadow: inset 0 0 0 2px #ff4d4f;
}

.matrix-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/* Bankroll & RoR Calculator */
.kpi-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 1100px) {
  .kpi-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kpi-val {
  font-size: 1.25rem;
  color: var(--text-main);
}

.calc-main-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
}

@media (max-width: 1100px) {
  .calc-main-grid {
    grid-template-columns: 1fr;
  }
}

.calc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

/* AP Encyclopedia Correlation Bars */
.corr-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.corr-bar {
  width: 80px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.corr-fill {
  height: 100%;
  border-radius: 999px;
}

.corr-fill.bc {
  background: var(--gold);
}

.corr-fill.pe {
  background: #4ade80;
}

.corr-fill.ic {
  background: #60a5fa;
}

.mini-tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  margin: 1px;
  color: var(--text-main);
}

.academy-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1100px) {
  .academy-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   PRO-BLACKJACK AP CALCULATOR & BJA H17/S17 DEVIATION CHART MODALS
   ========================================================================= */

.modal-card.modal-xl {
  max-width: 1120px;
}

.modal-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.bja-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bja-header-actions .btn.active-rule {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}

.ap-metrics-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  background: linear-gradient(180deg, rgba(20, 48, 28, 0.9), rgba(12, 30, 19, 0.95));
  border: 1px solid rgba(245, 197, 66, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.ap-metric-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 6px;
}

.ap-metric-lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.ap-metric-val {
  font-size: 1.02rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.ap-metric-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.ap-calc-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 16px;
}

.ap-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.preset-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 0.72rem;
  border-radius: 6px;
}

.ramp-table-wrap {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
}

.ramp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.ramp-table th,
.ramp-table td {
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ramp-table th {
  background: #08150e;
  color: var(--gold);
  font-size: 0.7rem;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 2;
}

.ramp-table tr.active-tc-row {
  background: rgba(245, 197, 66, 0.16);
  outline: 1px solid var(--gold);
}

.ramp-adv-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.ramp-adv-pill.pos {
  background: rgba(48, 164, 108, 0.25);
  color: #4ade80;
}

.ramp-adv-pill.neg {
  background: rgba(229, 72, 77, 0.22);
  color: #f87171;
}

.ramp-unit-input {
  width: 58px;
  padding: 3px 5px;
  background: #07120c;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  color: var(--gold);
  font-weight: 800;
  text-align: center;
  font-size: 0.78rem;
}

.bja-active-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 197, 66, 0.12);
  border: 1px solid rgba(245, 197, 66, 0.4);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 14px;
  font-size: 0.82rem;
}

.bja-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.bja-section-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px 12px;
}

.bja-section-card h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bja-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.bja-matrix th,
.bja-matrix td {
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 3px;
  min-width: 28px;
  font-weight: 700;
}

.bja-matrix th {
  background: #14281d;
  color: #cbd5e1;
  font-weight: 800;
}

.bja-matrix td.row-lbl {
  background: #102118;
  color: #f8fafc;
  font-weight: 800;
  min-width: 42px;
}

.bja-cell.cell-green {
  background: #15803d;
  color: #fff;
}

.bja-cell.cell-teal {
  background: #0f766e;
  color: #e2e8f0;
}

.bja-cell.cell-gold {
  background: #ca8a04;
  color: #111;
}

.bja-cell.cell-white {
  background: #f1f5f9;
  color: #1e293b;
}

.bja-cell.cell-empty {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.25);
}

.bja-cell.has-dev {
  color: #dc2626 !important;
  font-weight: 900;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.7);
}

.bja-cell.cell-green.has-dev,
.bja-cell.cell-teal.has-dev {
  background: #dcfce7;
  color: #b91c1c !important;
  border: 1px solid #16a34a;
}

.bja-cell.cell-gold.has-dev {
  background: #fef08a;
  color: #b91c1c !important;
}

.bja-cell.active-match {
  outline: 3px solid #f5c542;
  outline-offset: -2px;
  box-shadow: 0 0 12px rgba(245, 197, 66, 0.9);
  position: relative;
  z-index: 3;
  transform: scale(1.08);
}

.bja-ins-footer {
  margin-top: 12px;
  background: #14281d;
  border: 1px solid rgba(245, 197, 66, 0.35);
  border-radius: 8px;
  padding: 8px 14px;
  text-align: center;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.bja-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.bja-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bja-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

/* =========================================================================
   MEMORIZATION & SPACED REPETITION (SM-2) WORKSPACE (#view-memory)
   ========================================================================= */

#view-memory .card-count-tag {
  display: none !important;
}

.srs-main-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 1120px) {
  .srs-main-grid {
    grid-template-columns: 1fr;
  }
}

.srs-card-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: 14px;
}

.srs-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.srs-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.srs-pill-cat {
  background: rgba(245, 197, 66, 0.16);
  color: var(--gold);
  border: 1px solid rgba(245, 197, 66, 0.4);
}

.srs-pill-state {
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.srs-pill-state.st-mastered {
  background: rgba(74, 222, 128, 0.18);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.4);
}

.srs-pill-state.st-learning {
  background: rgba(251, 191, 36, 0.18);
  color: #fde047;
  border-color: rgba(251, 191, 36, 0.4);
}

.srs-meta-stats {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.srs-felt-stage {
  background: radial-gradient(circle at center, var(--felt-radial), var(--felt-primary));
  border: 2px solid var(--felt-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.srs-tc-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(245, 197, 66, 0.35);
  border-radius: 8px;
  padding: 6px 14px;
  margin: 0 auto 14px;
  width: fit-content;
  font-size: 0.8rem;
}

.srs-tc-banner span {
  color: var(--text-muted);
  font-weight: 700;
}

.srs-tc-banner strong {
  color: var(--gold);
  font-size: 1rem;
}

.srs-cards-row-wrap {
  background: transparent;
  border: none;
  padding: 6px 0 12px;
  margin-bottom: 6px;
}

.srs-question-box {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
}

.srs-question-box h3 {
  color: #fff;
  font-size: 1.08rem;
  margin-bottom: 4px;
}

.srs-question-box p {
  font-size: 0.83rem;
  color: var(--text-muted);
}

.srs-back-panel {
  border-top: 1px solid var(--panel-border);
  padding-top: 14px;
  animation: fadeIn 0.18s ease;
}

.srs-result-banner {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 12px;
  line-height: 1.45;
}

.srs-result-banner.res-ok {
  background: rgba(48, 164, 108, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #bbf7d0;
}

.srs-result-banner.res-err {
  background: rgba(229, 72, 77, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.srs-result-banner.res-neutral {
  background: rgba(245, 197, 66, 0.12);
  border: 1px solid rgba(245, 197, 66, 0.4);
  color: var(--text-main);
}

.srs-mnemonic-box {
  background: rgba(15, 36, 24, 0.9);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.srs-mnemonic-hdr {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.srs-mnemonic-box p {
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.45;
}

.srs-grade-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 8px;
}

.srs-grade-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.srs-grade-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 8px;
}

.srs-grade-btn .g-title {
  font-size: 0.84rem;
  font-weight: 800;
}

.srs-grade-btn .g-int {
  font-size: 0.72rem;
  opacity: 0.85;
}

.grade-again {
  background: rgba(220, 38, 38, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: #fca5a5;
}
.grade-again:hover { background: rgba(220, 38, 38, 0.4); }

.grade-hard {
  background: rgba(217, 119, 6, 0.25);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fde68a;
}
.grade-hard:hover { background: rgba(217, 119, 6, 0.4); }

.grade-good {
  background: rgba(22, 163, 74, 0.28);
  border: 1px solid rgba(74, 222, 128, 0.55);
  color: #bbf7d0;
}
.grade-good:hover { background: rgba(22, 163, 74, 0.45); }

.grade-easy {
  background: rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(96, 165, 250, 0.55);
  color: #bfdbfe;
}
.grade-easy:hover { background: rgba(37, 99, 235, 0.45); }

.srs-decks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.srs-deck-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.srs-deck-row:hover,
.srs-deck-row.active-deck {
  border-color: var(--gold);
  background: rgba(245, 197, 66, 0.08);
}

.srs-deck-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.srs-deck-counts {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.srs-prog-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.srs-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #4ade80);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.srs-priority-box {
  background: rgba(245, 197, 66, 0.07);
  border: 1px solid rgba(245, 197, 66, 0.28);
  border-radius: 8px;
  padding: 11px 13px;
}

.srs-priority-box h4 {
  font-size: 0.82rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.srs-chunk-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 14px 16px;
}

.srs-chunk-card h4 {
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.srs-chunk-list {
  padding-left: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.srs-chunk-list li {
  margin-bottom: 7px;
}

.srs-chunk-list li strong {
  color: var(--text-main);
}
