/**
 * Estilos canónicos para Cifras y Letras
 * Fijate Tools - https://fijate.com/tools/cifras-y-letras/
 */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta Midnight Slate TV Concurso */
  --bg-page: #0b0f17;
  --bg-card: #111827;
  --bg-card-subtle: #182234;
  --bg-input: #1e293b;
  --border-color: #273549;
  --border-color-focus: #3b82f6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.15);

  --accent-gold: #f59e0b;
  --accent-gold-light: rgba(245, 158, 11, 0.15);
  --accent-green: #10b981;
  --accent-green-light: rgba(16, 185, 129, 0.15);
  --accent-red: #ef4444;
  --accent-red-light: rgba(239, 68, 68, 0.15);

  --tile-bg: linear-gradient(145deg, #1e293b, #0f172a);
  --tile-border: #334155;
  --tile-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  --tile-text: #f8fafc;

  --target-bg: linear-gradient(135deg, #090e17, #131c2d);
  --target-border: #3b82f6;
  --target-glow: 0 0 25px rgba(59, 130, 246, 0.35);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

[data-theme="light"],
body.light-theme {
  --bg-page: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --bg-input: #f1f5f9;
  --border-color: #cbd5e1;
  --border-color-focus: #2563eb;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.12);

  --tile-bg: linear-gradient(145deg, #ffffff, #e2e8f0);
  --tile-border: #cbd5e1;
  --tile-shadow: 0 4px 8px rgba(0, 0, 0, 0.08), inset 0 1px 1px #ffffff;
  --tile-text: #0f172a;

  --target-bg: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  --target-border: #2563eb;
  --target-glow: 0 0 18px rgba(37, 99, 235, 0.2);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.target-title,
.verdict-title {
  font-family: var(--font-heading);
}

.mono {
  font-family: var(--font-mono);
}

.small-muted {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ======================================================== */
/* CARD PRINCIPAL Y MARCADOR TV                             */
/* ======================================================== */

.game-stage-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
}

.tv-scoreboard-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.contestant-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.contestant-human {
  justify-content: flex-start;
}

.contestant-ai {
  justify-content: flex-end;
}

.contestant-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-avatar {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
}

.contestant-meta {
  display: flex;
  flex-direction: column;
}

.text-right {
  text-align: right;
  align-items: flex-end;
}

.contestant-name {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.ai-name-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.contestant-score {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}

.tv-match-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.4rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.round-indicator {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
}

.match-mode-label {
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--font-heading);
}

.difficulty-select {
  padding: 0.2rem 1.6rem 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

/* ======================================================== */
/* BARRA DE MODOS Y HERRAMIENTAS                           */
/* ======================================================== */

.game-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.toolbar-modes {
  display: flex;
  gap: 0.4rem;
  background: var(--bg-card-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.btn-mode {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mode.active,
.btn-mode:hover {
  background: var(--primary-color);
  color: #ffffff;
}

.toolbar-actions {
  display: flex;
  gap: 0.4rem;
}

.btn-action-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-icon:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* ======================================================== */
/* CRONÓMETRO DE PLATÓ (45S)                                */
/* ======================================================== */

.timer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.circular-timer-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-svg {
  transform: rotate(-90deg);
}

.timer-circle-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 6;
}

.timer-circle-progress {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 326.72; /* 2 * PI * 52 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.25s linear, stroke 0.3s ease;
}

.timer-circle-progress.warning {
  stroke: var(--accent-gold);
}

.timer-circle-progress.danger {
  stroke: var(--accent-red);
  animation: pulse-danger 0.5s infinite alternate;
}

@keyframes pulse-danger {
  from { stroke-width: 6; }
  to { stroke-width: 8; }
}

.timer-value-display {
  position: absolute;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.timer-status-text {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ======================================================== */
/* 1. ZONA DE CIFRAS                                        */
/* ======================================================== */

.target-number-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem;
  background: var(--target-bg);
  border: 2px solid var(--target-border);
  border-radius: var(--radius-md);
  box-shadow: var(--target-glow);
  margin-bottom: 1.5rem;
  text-align: center;
}

.target-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.target-display {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #60a5fa;
  text-shadow: 0 0 15px rgba(96, 165, 250, 0.5);
}

.cifras-workbench {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tiles-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 600;
  font-size: 0.95rem;
}

.cifras-tiles-rack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.tile-number {
  min-width: 72px;
  height: 64px;
  padding: 0 0.85rem;
  border-radius: var(--radius-md);
  background: var(--tile-bg);
  border: 2px solid var(--tile-border);
  color: var(--tile-text);
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--tile-shadow);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.tile-number:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.tile-number.selected {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.6);
  transform: translateY(-4px) scale(1.05);
}

.tile-number.is-result {
  border-color: var(--accent-gold);
}

.tile-number.is-result::after {
  content: '★';
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.65rem;
  color: var(--accent-gold);
}

.cifras-operators-rack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

.btn-operator {
  height: 50px;
  font-size: 1.8rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-operator:hover {
  border-color: var(--accent-gold);
  background: var(--accent-gold-light);
  color: var(--accent-gold);
}

.btn-operator.selected {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #0f172a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.cifras-steps-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.steps-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.current-nearest-label strong {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.steps-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 48px;
}

.step-item {
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.cifras-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ======================================================== */
/* 2. ZONA DE LETRAS                                        */
/* ======================================================== */

.letras-draw-phase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  text-align: center;
}

.draw-prompt {
  font-weight: 700;
  font-size: 1rem;
}

.draw-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.btn-draw {
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.letras-rack-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0 1.5rem;
}

.tile-letter {
  width: 52px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--tile-bg);
  border: 2px solid var(--tile-border);
  color: var(--tile-text);
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--tile-shadow);
  cursor: pointer;
  user-select: none;
  padding: 0;
  outline: none;
  transition: all 0.15s ease;
}

.tile-letter:hover:not(.used) {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.tile-letter:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.4);
}

.tile-letter.used {
  opacity: 0.35;
  cursor: not-allowed;
  transform: scale(0.92);
}

.word-builder-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.word-composition-line {
  min-height: 70px;
  background: var(--bg-card-subtle);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.word-placeholder-text {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.letter-slot {
  width: 44px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--primary-color);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
  transition: transform 0.1s ease;
  border: none;
  outline: none;
  padding: 0;
}

.letter-slot:hover {
  transform: scale(1.08);
}

.word-builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ======================================================== */
/* 3. PANEL DE VEREDICTO (FIN DE RONDA)                     */
/* ======================================================== */

.verdict-card {
  background: var(--bg-card-subtle);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.verdict-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.verdict-badge {
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary-light);
  color: var(--primary-color);
}

.verdict-badge.win {
  background: var(--accent-green-light);
  color: var(--accent-green);
}

.verdict-badge.tie {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
}

.verdict-badge.loss {
  background: var(--accent-red-light);
  color: var(--accent-red);
}

.verdict-title {
  font-size: 1.5rem;
  font-weight: 800;
}

.verdict-duel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.duel-column {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.duel-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.duel-contestant {
  font-weight: 700;
  font-size: 0.95rem;
}

.duel-points {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary-color);
}

.duel-answer-box {
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
}

.duel-validity-status {
  font-size: 0.85rem;
  font-weight: 600;
}

.duel-validity-status.valid {
  color: var(--accent-green);
}

.duel-validity-status.invalid {
  color: var(--accent-red);
}

.duel-definition-box {
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  border-left: 3px solid var(--primary-color);
}

.experts-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.expert-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.expert-avatar-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--accent-green-light);
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.expert-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.expert-content {
  font-size: 0.95rem;
  line-height: 1.5;
}

.expert-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.expert-step {
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-green);
}

.expert-words-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.expert-word-badge {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.verdict-actions {
  display: flex;
  justify-content: center;
}

.btn-next-round {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
}

/* ======================================================== */
/* BOTONES Y CONTROLES GENERALES                            */
/* ======================================================== */

.btn-primary {
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-touch {
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  flex: 1 1 0%;
}

.w-100 {
  width: 100%;
}

/* ======================================================== */
/* MODALES ACCESIBLES SIN ALERTS                            */
/* ======================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}

.modal-card-wide {
  max-width: 650px;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-trophy-icon {
  font-size: 2.5rem;
  margin-right: 0.5rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.btn-close-modal:hover {
  color: var(--text-main);
  background: var(--bg-card-subtle);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  line-height: 1.5;
}

.modal-final-scores {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin: 1rem 0;
}

.final-score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.final-contestant {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.final-points {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.final-score-vs {
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-dim);
}

.match-summary-lead {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.match-breakdown-details {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  text-align: left;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0.5rem;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-sm);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* ======================================================== */
/* SECCIÓN SEO DIDÁCTICA                                    */
/* ======================================================== */

.tool-guide-article {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.tool-guide-article h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.tool-guide-article h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
}

.tool-guide-article p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.guide-grid-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.guide-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.guide-card h3 {
  margin-top: 0;
}

.guide-card ul {
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.guide-card li {
  margin-bottom: 0.4rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.guide-table th,
.guide-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.guide-table th {
  background: var(--bg-card-subtle);
  font-weight: 700;
}

/* ======================================================== */
/* RESPONSIVE MÓVIL (< 768px)                               */
/* ======================================================== */

@media (max-width: 768px) {
  .game-stage-card {
    padding: 1rem;
  }

  .tv-scoreboard-bar {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    text-align: center;
  }

  .contestant-card {
    justify-content: center;
  }

  .text-right {
    text-align: center;
    align-items: center;
  }

  .toolbar-modes {
    width: 100%;
    justify-content: space-between;
  }

  .btn-mode {
    flex: 1;
    padding: 0.5rem 0.4rem;
    font-size: 0.75rem;
    text-align: center;
  }

  .target-display {
    font-size: 2.75rem;
  }

  .tile-number {
    min-width: 60px;
    height: 54px;
    font-size: 1.4rem;
  }

  .tile-letter {
    width: 44px;
    height: 50px;
    font-size: 1.4rem;
  }

  .verdict-duel-grid {
    grid-template-columns: 1fr;
  }

  .guide-grid-cards {
    grid-template-columns: 1fr;
  }

  .cifras-control-actions,
  .word-builder-actions {
    flex-direction: column;
  }

  .btn-touch {
    width: 100%;
  }
}
