@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #131F24;
  --bg-darker: #0B1418;
  --bg-card: #18252C;
  --border: #37464F;
  --text: #FFFFFF;
  --text-muted: #AFAFAF;
  --text-dim: #6B7B83;
  --green: #58CC02;
  --green-dark: #46A302;
  --green-shadow: #3C8C00;
  --blue: #1CB0F6;
  --blue-dark: #189AD6;
  --orange: #FF9600;
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --card-font-size: 32px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; overflow-x:hidden; }

body {
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.app {
  display: flex; flex-direction: column;
  min-height: 100%;
}

/* ========== TOP BAR ========== */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-md) var(--sp-lg);
  border-bottom: 2px solid var(--border);
}

.top-bar-brand {
  display: flex; align-items: center; gap: var(--sp-sm);
}

.logo-icon {
  flex-shrink: 0;
}

.logo-text {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--text);
}

.top-bar-pills {
  display: flex; gap: var(--sp-sm);
}

.mode-pill {
  display: flex; align-items: center; justify-content: center;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border);
  background: transparent;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 3px 0 transparent;
}

.mode-pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 3px 0 var(--blue-dark);
}

.mode-pill.active:active {
  box-shadow: 0 0 0 var(--blue-dark);
}

.font-pill {
  width: 40px;
  height: 40px;
  padding: 2px 0;
  text-align: center;
  flex-direction: column;
  gap: 0;
  line-height: 1.05;
}

.font-pill .font-sign {
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.font-pill .font-val {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
}

.font-pill .font-val:last-child {
  min-height: 11px;
}

.font-reset {
  border-color: var(--green);
  color: var(--green);
}

.font-reset.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.font-reset .font-val {
  color: var(--green);
}

/* ========== MODE BAR ========== */
.mode-bar {
  display: flex; gap: var(--sp-sm);
  justify-content: center;
  margin-bottom: 0.5em;
}

.mode-bar .mode-pill.active {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 3px 0 #D47A00;
  color: #fff;
}

.mode-bar .mode-pill.active:active {
  box-shadow: 0 0 0 #D47A00;
}

/* ========== CATEGORY PILLS ========== */
.category-pills {
    display: flex;
    gap: var(--sp-sm);
    padding: 1em;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 2px solid var(--border);
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: center;
    align-items: unset;
}

.category-pills::-webkit-scrollbar { display:none; }

.cat-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 18px;
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  user-select: none;
  font-family: 'Nunito', sans-serif;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 3px 0 transparent;
}

.cat-pill:hover {
  background: rgba(255,255,255,0.04);
}

.cat-pill.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 3px 0 var(--green-shadow);
}

/* ========== MAIN MENU (3 categorías) ========== */
.category-pills {
  justify-content: flex-start;
}

.main-pill {
  height: 38px;
  padding: 0 20px;
  font-size: 13px;
}

.aprender-pill.active {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 3px 0 var(--green-shadow);
}

.aplicar-pill.active {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 3px 0 var(--blue-dark);
}

.leer-pill.active {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 3px 0 #D47A00;
}

/* ========== SUB MENU ========== */
.sub-pills {
  display: flex;
  gap: var(--sp-sm);
  padding: 0.7em 1em;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-bottom: 2px solid var(--border);
  flex-wrap: nowrap;
}

.sub-pills::-webkit-scrollbar { display: none; }

.sub-pills:empty { display: none; }

.sub-pill {
  height: 30px;
  padding: 0 14px;
  font-size: 11px;
}

/* ========== INFO BAR ========== */
.info-bar {
  display: flex;
  gap: var(--sp-sm);
  padding: 8px var(--sp-lg);
  justify-content: center;
}

.info-module {
  flex: 0 1 auto;
  min-width: 120px;
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  justify-content: center;
}

.info-value {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* ========== CONTENT AREA ========== */
.content {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--sp-lg);
  gap: var(--sp-lg);
  overflow-y: auto;
}

.content.no-center {
  justify-content: flex-start;
  padding-bottom: 2em;
}

.lesson-header {
  text-align: center;
}

.lesson-title {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.3px;
  color: var(--text);
}

.lesson-subtitle {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

.numbers-config {
  display: flex; gap: var(--sp-sm);
  width: 100%; max-width: 340px;
  padding: 0 4px;
}

.config-row {
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  flex: 1;
}

.config-label {
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.config-input {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}

.config-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(28,176,246,0.15);
}

.config-input-row {
  display: flex; align-items: center; gap: 2px;
  width: 100%;
}

.config-input-row .config-input {
  flex: 1; min-width: 0;
}

.config-arrows {
  display: flex; flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  padding-right: 0.5em;
}

.config-arrow {
  background: #3c4dff;
  color: #fff;
  border: none;
  border-radius: 4px;
  width: 5em; height: 24px;
  font-size: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  line-height: 1;
  transition: all 0.1s ease;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  font-family: 'Nunito', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.config-arrow:active {
  transform: scale(0.9);
  opacity: 0.85;
}

.binario-config {
  display: flex; justify-content: center;
  width: 100%; max-width: 340px;
  padding: 0 4px;
}

.binario-config .config-row,
.deck-config .config-row {
  flex: 1;
  max-width: 120px;
}

.deck-config {
  display: flex; flex-direction: column;
  gap: var(--sp-md);
  width: 100%; max-width: 340px;
  padding: 0 4px;
}

.deck-count-row {
  display: flex; justify-content: center;
  width: 100%;
}

.deck-suits {
  display: flex; gap: var(--sp-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.suit-pill {
  min-width: 44px;
  height: 36px;
  padding: 0 12px;
  font-size: 16px;
}

.suit-pill svg { pointer-events: none; }

.suit-pill[data-suit="♥"],
.suit-pill[data-suit="♦"] { color: #FF6B6B; }

.suit-pill[data-suit="♣"],
.suit-pill[data-suit="♠"] { color: #E4E9EC; }

.suit-pill.active { color: #fff; }
.personal-config {
  width: 100%; max-width: 340px;
  padding: 0 4px;
}

.personal-textarea {
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-family: Nunito, sans-serif;
  resize: vertical;
  min-height: 120px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  outline: none;
  transition: border-color 0.15s;
}

.personal-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(88,204,2,0.15);
}

.personal-textarea::placeholder {
  color: var(--text-dim);
  font-weight: 500;
}

.personal-modes {
  display: flex; gap: var(--sp-sm);
  margin-top: var(--sp-sm);
  justify-content: center;
}

.instructions-table {
  width: 100%;
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  align-items: stretch;
}

.instru-group + .instru-hr {
  margin-top: var(--sp-lg);
}

.instru-block + .instru-hr {
  margin-top: var(--sp-lg);
}

.instru-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
  align-items: flex-start;
  justify-content: flex-start;
}

.instru-hr {
  border: none;
  height: 2px;
  background: var(--green);
  opacity: 0.5;
  margin: 4px 0 0;
}

.instru-block {
  flex: 0 0 auto;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.instru-title {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--blue);
  text-transform: uppercase;
}

.instructions-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.instructions-table th,
.instructions-table td {
  padding: 8px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.instructions-table th {
  background: rgba(88,204,2,0.1);
  color: var(--green);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.instructions-table th:first-child,
.instructions-table td:first-child {
  text-align: center;
  width: 40px;
  color: var(--green);
  font-weight: 900;
}

.instructions-table td:last-child {
  color: var(--text);
}

.instructions-table tr:last-child td {
  border-bottom: none;
}

.card-wrapper {
  position: relative;
  width: 100%;
  min-height: 120px;
  height: auto;
  max-height: none;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.card {
  position: relative;
  width: calc(100% - 16px);
  min-width: 305px;
  max-width: 800px;
  height: auto;
  min-height: 180px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--sp-md);
  opacity: 0;
  transition: opacity 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  pointer-events: none;
  padding: 24px 0.5em;
  box-sizing: border-box;
}

.card.visible {
  opacity: 1;
  pointer-events: auto;
}

.card-top {
  font-size: var(--card-font-size);
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.card-bottom {
  font-size: calc(var(--card-font-size) * 0.4);
  font-weight: 800;
  color: var(--green);
  text-align: center;
  padding: 8px 24px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(88,204,2,0.06);
}

.card-label {
  position: absolute; top: var(--sp-md); left: var(--sp-lg);
  font-size: 11px; font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.card-index {
  position: absolute; bottom: var(--sp-md); right: var(--sp-lg);
  font-size: 11px; font-weight: 700;
  color: var(--text-dim);
}

.empty-state {
  display: flex; flex-direction: column;
  align-items: center; gap: var(--sp-md);
  position: absolute;
}

.empty-state span {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dim);
}

.empty-state svg {
  opacity: 0.3;
}

.recall-compare {
  display: flex; gap: var(--sp-sm);
  width: 100%; max-width: 340px;
  margin-top: 8px;
}

.recall-input {
  flex: 1;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}

.recall-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(28,176,246,0.15);
}

.compare-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--blue-dark);
  transition: all 0.1s ease;
  font-family: 'Nunito', sans-serif;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.compare-btn:active {
  box-shadow: 0 1px 0 var(--blue-dark);
}

.clean-icon {
  width: 46px; height: 46px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s ease;
}

.clean-icon:active {
  transform: scale(0.9);
}

.card.correct {
  background: #2D8B2D;
  border-color: #58CC02;
}

.card.incorrect {
  background: #8B2D2D;
  border-color: #E12B44;
}

.card.correct .card-top,
.card.correct .card-bottom {
  color: #fff !important;
}

.card.incorrect .card-top,
.card.incorrect .card-bottom {
  color: #fff !important;
}

.card-divider {
  width: 60%;
  height: 2px;
  background: rgba(255,255,255,0.3);
  margin: 4px 0;
  border-radius: 1px;
}

.card-wrong {
  font-size: calc(var(--card-font-size) * 0.35);
  font-weight: 700;
  color: #FF6B6B;
  text-align: center;
  padding: 0 12px;
  word-break: break-word;
}

/* ========== BOTTOM CONTROLS ========== */
.bottom-controls {
  padding: var(--sp-md) var(--sp-lg);
  border-top: 2px solid var(--border);
  display: flex; flex-direction: column;
  gap: var(--sp-md);
}

.speed-box {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px 12px;
  display: flex; flex-direction: column;
  gap: 10px;
}

.speed-label-row {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 2px;
}

.speed-icon-small {
  flex-shrink: 0;
  opacity: 0.6;
}

.speed-title {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.speed-input-row {
  display: flex; align-items: center; gap: var(--sp-sm);
}

.speed-input {
  flex: 1;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

.speed-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(88,204,2,0.15);
}

.speed-unit {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

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

.timer-arrows {
  display: flex; gap: 16px;
}

.timer-col {
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
}

.timer-label {
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.timer-display {
  font-weight: 900;
  font-size: 20px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}

.speed-arrows {
  display: flex; flex-direction: column;
  gap: 12px;
  margin: 0 4px;
}

.speed-arrow {
  background: #3c4dff;
  color: #fff;
  border: none;
  border-radius: 4px;
  width: 5em; height: 24px;
  font-size: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  line-height: 1;
  transition: all 0.1s ease;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  font-family: 'Nunito', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.speed-arrow:active {
  transform: scale(0.9);
  opacity: 0.85;
}

.speed-bar {
  position: relative;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.speed-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #58CC02, #89E219, #FFC800, #FF9600, #FF5C00, #E12B44);
  border-radius: 4px;
  transition: width 0.15s ease;
  width: 0%;
}

.speed-limits {
  display: flex; justify-content: space-between;
  font-size: 10px; font-weight: 700;
  color: var(--text-dim);
}

/* ========== DUO 3D BUTTON ========== */
.duo-btn.hidden {
  display: none;
}

.duo-btn {
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-sm);
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 24px;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--green-shadow);
  transition: all 0.1s ease;
  font-family: 'Nunito', sans-serif;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}

.duo-btn:active {
  box-shadow: 0 1px 0 var(--green-shadow);
}

.duo-btn.paused {
  background: var(--orange);
  box-shadow: 0 4px 0 #D47A00;
}

.duo-btn.paused:active {
  box-shadow: 0 1px 0 #D47A00;
}

.duo-btn .btn-icon { flex-shrink: 0; pointer-events: none; }
.duo-btn .btn-label { white-space: nowrap; }

.action-buttons {
  display: flex; gap: var(--sp-sm);
}

.action-buttons .duo-btn {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}

.action-buttons .duo-btn.full-width {
  flex: 1 1 100%;
}

.action-buttons .duo-btn .btn-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clear-btn {
  background: #3a3a44 !important;
  box-shadow: 0 4px 0 #2a2a32 !important;
}

.clear-btn:active {
  box-shadow: 0 1px 0 #2a2a32 !important;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 900px) {
  .category-pills { justify-content: center; }
  .sub-pills { justify-content: center; }
  .bottom-controls {
    max-width: 500px; margin: 0 auto; width: 100%;
  }
}

/* ========== FOOTER ========== */
.footer {
  width: 100%;
  margin-top: 1.5em;
  background: #0D161A;
  border-top: 1px solid var(--border);
  padding: var(--sp-lg) var(--sp-lg) var(--sp-md);
  font-family: 'Nunito', sans-serif;
}

.footer-container {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.footer-brand {
  text-align: center;
}

.footer-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: var(--sp-sm);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: var(--sp-md);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.footer-social a:hover,
.footer-social a:focus {
  background: var(--blue);
  color: #fff;
  transform: translateY(-2px);
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: var(--sp-xs) 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.footer-copyright {
  font-weight: 700;
  font-size: 12px;
  color: #24ece7;
  letter-spacing: 0.3px;
}

.footer-copyright a {
  color: #f72a52;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.footer-copyright a:hover {
  opacity: 0.8;
}

.footer-links {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-weight: 700;
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--text-muted);
}

@media (min-width: 480px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ========== LECTURA ========== */
#lecturaModule {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  padding: 0 0 2em 0;
}

.lectura-display-wrap {
  width: 100%;
}

.lectura-card {
  position: relative;
  width: 100%;
  min-height: 120px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  cursor: pointer;
  padding: 30px 0.5em;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease;
}
.lectura-card:hover { border-color: var(--blue); }
.lectura-card .card-top {
  font-size: 38px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.15;
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  white-space: pre-wrap;
}

.lectura-progress-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0 4px;
}
.lectura-progress-bar {
  flex: 1;
  height: 12px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lectura-progress-fill {
  height: 100%;
  background: #58CC02;
  border-radius: 6px;
  transition: width 0.15s ease, background 0.2s ease;
  width: 0%;
}
.lectura-progress-label {
  font-weight: 800;
  font-size: 12px;
  color: var(--green);
  min-width: 32px;
  text-align: right;
}
.lectura-timer-label {
  font-weight: 800;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 58px;
  text-align: right;
}

.lectura-nav-row {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
}
.lectura-nav-btn {
  width: 40px;
  height: 32px;
  padding: 0;
  font-size: 12px;
}

.lectura-btn-row {
  display: flex;
  gap: var(--sp-sm);
  width: 100%;
}
.lectura-btn-row .duo-btn {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
}
.lectura-btn-row .duo-btn .btn-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lectura-stop-btn { background: #3a3a44 !important; box-shadow: 0 4px 0 #2a2a32 !important; }
.lectura-stop-btn:active { box-shadow: 0 1px 0 #2a2a32 !important; }

.lectura-loop-btn {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--blue);
  border-radius: var(--radius-sm);
  color: var(--blue);
  cursor: pointer;
  box-shadow: 0 3px 0 transparent;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
}

.lectura-loop-btn.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 3px 0 var(--blue-dark);
}

.lectura-loop-btn.active:active {
  box-shadow: 0 0 0 var(--blue-dark);
}

.lectura-extra-btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  justify-content: center;
}
.lectura-extra-btns .mode-pill { font-size: 11px; padding: 0 12px; height: 28px; }

.lectura-textarea-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.lectura-textarea {
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-family: Nunito, sans-serif;
  resize: vertical;
  min-height: 60px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  outline: none;
  transition: border-color 0.15s;
}
.lectura-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(88,204,2,0.15);
}

.lectura-speed-box { width: 100%; }

.lectura-speed-input-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.lectura-wpm-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 14px;
  flex-shrink: 0;
}

.lectura-wpm-input {
  flex: 1;
  min-width: 0;
}

.lectura-font-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
}
.lectura-font-size {
  font-weight: 800;
  font-size: 13px;
  color: var(--text-muted);
  min-width: 42px;
  text-align: center;
}

.lectura-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  justify-content: center;
}
.lectura-source-row .mode-pill { font-size: 11px; padding: 0 14px; }

/* ========== LECTURA PANEL (OVERLAY) ========== */
.lectura-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: flex-end;
}
.lectura-panel {
  width: 100%;
  max-width: 500px;
  max-height: 75vh;
  background: var(--bg-darker);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.lectura-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px var(--sp-lg);
  border-bottom: 2px solid var(--border);
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
}
.lectura-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  font-family: Nunito, sans-serif;
}
.lectura-panel-tabs {
  display: flex;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}
.lectura-panel-tabs::-webkit-scrollbar { display: none; }
.lectura-panel-tabs .mode-pill { font-size: 11px; padding: 0 12px; height: 28px; }
.lectura-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-sm) var(--sp-md);
}
.lectura-panel-item {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-sm);
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s;
}
.lectura-panel-item:hover { border-color: var(--blue); }
.lectura-item-main {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}
.lectura-item-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.lectura-item-del {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  font-family: Nunito, sans-serif;
}
.lectura-panel-empty {
  text-align: center;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13px;
  padding: var(--sp-lg);
}

/* ========== LECTURA MODAL ========== */
.lectura-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0,0,0,0.65);
  display: none;
  justify-content: center;
  align-items: center;
  padding: var(--sp-lg);
}
.lectura-modal-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.lectura-modal-msg {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: var(--sp-md);
}
.lectura-modal-msg strong { color: var(--blue); }
.lectura-modal-actions {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
  flex-wrap: wrap;
}
.lectura-modal-actions .duo-btn,
.lectura-modal-actions .mode-pill { font-size: 12px; }

.lectura-summary p {
  margin: 4px 0;
  color: var(--text-muted);
}
.lectura-summary strong { color: var(--green); }

.lectura-preview-info {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--sp-sm);
}
.lectura-preview-text {
  font-size: 13px;
  color: var(--text);
  text-align: left;
  background: var(--bg);
  padding: var(--sp-md);
  border-radius: var(--radius-md);
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.lectura-url-input {
  margin-bottom: var(--sp-sm);
}

.lectura-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm);
}
.lectura-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.lectura-stat-num {
  font-weight: 900;
  font-size: 18px;
  color: var(--text);
}
.lectura-stat-lbl {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ========== SIMON ========== */
.simon-pill.active {
  background: #FF2D95;
  border-color: #FF2D95;
  box-shadow: 0 3px 0 #CC1177;
}

#simonModule {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  padding: 0 0 2em 0;
}

.simon-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.simon-colors-config {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 180px;
}

.simon-config-label {
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.simon-config-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.simon-config-controls .config-arrow {
  width: 3em;
}

.simon-color-count {
  font-weight: 900;
  font-size: 15px;
  color: var(--text);
  min-width: 96px;
  text-align: center;
}

.simon-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.simon-round {
  font-weight: 900;
  font-size: 18px;
  color: var(--text);
}

.simon-best {
  font-weight: 800;
  font-size: 12px;
  color: var(--text-muted);
}

.simon-board {
  position: relative;
  width: min(78vw, 340px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background: #0d1013;
  border: 8px solid #1c2228;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.9), 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.simon-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.simon-sector {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: filter 0.1s ease;
}

.simon-sector.lit {
  filter: brightness(1.85) saturate(1.5);
}

.simon-sector:active {
  filter: brightness(1.6);
}

.simon-sector-key {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 15px;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  user-select: none;
}

.center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0d1013;
  border: 3px solid #2a3239;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.center-logo {
  font-weight: 900;
  font-size: clamp(13px, 3.4vw, 20px);
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
}

.center-round {
  font-weight: 800;
  font-size: clamp(9px, 2.4vw, 13px);
  color: #22d3ee;
}

.center-best {
  font-weight: 700;
  font-size: clamp(8px, 2vw, 11px);
  color: #8fa3ad;
}

.speaker-grille {
  width: 46%;
  height: 8px;
  border-radius: 4px;
  background: repeating-linear-gradient(
    90deg,
    #1c2228 0px,
    #1c2228 2px,
    #0a0d10 2px,
    #0a0d10 4px
  );
  margin-top: 4px;
}

.simon-board.shake {
  animation: simonShake 0.45s ease;
}

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

.simon-status {
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-muted);
  min-height: 22px;
}

.simon-play-btn { background: #FF2D95 !important; box-shadow: 0 4px 0 #CC1177 !important; }
.simon-play-btn:active { box-shadow: 0 1px 0 #CC1177 !important; }
.simon-play-btn.paused { background: var(--orange) !important; box-shadow: 0 4px 0 #D47A00 !important; }
.simon-play-btn.paused:active { box-shadow: 0 1px 0 #D47A00 !important; }

/* ========== RESPONSIVE MÓVIL ========== */
@media (max-width: 480px) {
  .logo-text { display: none; }
  .top-bar { padding: var(--sp-sm) var(--sp-md); }
  .top-bar-pills { gap: 10px; }
  .top-bar-pills .mode-pill:not(.font-pill) {
    padding: 0 10px;
    font-size: 11px;
    height: 34px;
  }
  .top-bar-pills .font-pill {
    width: 34px;
    height: 38px;
  }
  .lectura-btn-row { flex-wrap: wrap; }
  .lectura-btn-row .duo-btn {
    flex: 1 1 100%;
    padding: 12px 8px;
  }
  .lectura-btn-row .duo-btn .btn-label { font-size: 11px; letter-spacing: 1px; }
}

/* ========== SUPLEMENTO ========== */
#suplementoModule {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  padding: 0 0 2em 0;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.supl-config {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
}

.supl-config-label {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.supl-config-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.supl-config-controls .config-arrow {
  width: 3em;
}

.supl-count {
  font-weight: 900;
  font-size: 16px;
  color: var(--text);
  min-width: 40px;
  text-align: center;
}

.supl-status {
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-muted);
  min-height: 22px;
}

.supl-score {
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--green);
  min-height: 20px;
}

.supl-label {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: var(--sp-xs);
}

.supl-ref-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.supl-ref-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  width: 72%;
}

.supl-ref-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 6px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 800;
  color: var(--green);
  background: rgba(88, 204, 2, 0.06);
}

.supl-play-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-sm);
}

.supl-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: max(16px, var(--card-font-size));
  font-weight: 900;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.supl-cell:hover {
  border-color: var(--text-muted);
}

.supl-cell.supl-hit {
  background: #a8d8f8;
  border-color: #1CB0F6;
  color: #0b1418;
}

.supl-cell.supl-miss {
  background: rgba(225, 43, 68, 0.85);
  border-color: #E12B44;
  color: #fff;
}

.supl-cell.supl-current {
  background: rgba(28, 176, 246, 0.35);
  border-color: #1CB0F6;
}

.supl-cell.supl-selected,
.supl-ref-cell.supl-selected {
  background: #a8d8f8;
  border-color: #1CB0F6;
  color: #0b1418;
}

.supl-ref-cell.supl-hit {
  background: #a8d8f8;
  border-color: #1CB0F6;
  color: #0b1418;
}

.supl-ref-cell.supl-miss {
  background: rgba(225, 43, 68, 0.85);
  border-color: #E12B44;
  color: #fff;
}

.supl-ref-cell {
  cursor: pointer;
}

@media (max-width: 480px) {
  .supl-ref-grid { grid-template-columns: repeat(6, 1fr); gap: 3px; }
  .supl-play-grid { grid-template-columns: repeat(6, 1fr); gap: 3px; padding: 6px; }
}

/* ========== ANIMALES ========== */
#animalesModule {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  padding: 0 0 2em 0;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.anim-config {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
}

.anim-config-label {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.anim-config-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.anim-config-controls .config-arrow {
  width: 3em;
}

.anim-count {
  font-weight: 900;
  font-size: 16px;
  color: var(--text);
  min-width: 56px;
  width: 64px;
  text-align: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 4px;
  font-family: 'Nunito', sans-serif;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.anim-count::-webkit-outer-spin-button,
.anim-count::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.anim-count:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(28, 176, 246, 0.15);
}

.anim-repeat-btn {
  width: 40px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--blue);
  border-radius: var(--radius-sm);
  color: var(--blue);
  font-weight: 900;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 3px 0 transparent;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
}

.anim-repeat-btn.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 3px 0 var(--blue-dark);
}

.anim-status {
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-muted);
  min-height: 22px;
}

.anim-round {
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--blue);
  min-height: 20px;
}

.anim-card {
  display: none;
  width: 60%;
  margin: 0 auto;
  background: var(--bg-card);
  border: 2px solid var(--blue);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  min-height: 100px;
}

.anim-card.visible {
  display: block;
}

.anim-card-emoji {
  display: block;
  font-size: 64px;
  line-height: 1.1;
}

.anim-card-name {
  display: block;
  margin-top: 6px;
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
}

.anim-label {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: var(--sp-xs);
}

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

.anim-grid-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.anim-grid-btn:hover {
  border-color: var(--text-muted);
}

.anim-grid-emoji {
  font-size: 28px;
  line-height: 1.1;
}

.anim-grid-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.1;
}

.anim-grid-btn.anim-correct {
  background: #a8d8f8;
  border-color: #1CB0F6;
}

.anim-grid-btn.anim-correct .anim-grid-name {
  color: #0b1418;
}

.anim-grid-btn.anim-wrong {
  background: rgba(225, 43, 68, 0.85);
  border-color: #E12B44;
}

.anim-grid-btn.anim-wrong .anim-grid-name {
  color: #fff;
}

@media (max-width: 480px) {
  .anim-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
  .anim-card { width: 70%; }
}

/* ========== PAO ========== */
#paoModule {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  padding: 0 0 2em 0;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

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

.pao-brand {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--blue);
  text-transform: uppercase;
}

.pao-range {
  font-weight: 900;
  font-size: 22px;
  color: var(--text);
  letter-spacing: 1px;
}

.pao-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-sm);
}

.pao-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 4px;
}

.pao-stat span {
  font-weight: 900;
  font-size: 18px;
  color: var(--text);
}

.pao-stat small {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

.pao-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
  transition: border-color 0.2s ease;
}

.pao-card.pao-correct {
  border-color: #58CC02;
}

.pao-card.pao-incorrect {
  border-color: #E12B44;
}

.pao-scene {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.pao-word {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
}

.pao-persona { color: var(--text); }
.pao-accion { color: #E8A33D; }
.pao-objeto { color: var(--blue); }

.pao-input {
  width: 160px;
  text-align: center;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.2em;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  padding: 10px 0;
  outline: none;
  transition: border-color 0.15s;
  font-variant-numeric: tabular-nums;
}

.pao-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(28, 176, 246, 0.15);
}

.pao-feedback-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
}

.pao-feedback {
  font-weight: 900;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.pao-feedback.correct { color: #5FBE82; }
.pao-feedback.incorrect { color: #E07561; }

.pao-answer {
  font-size: 14px;
  color: var(--text-muted);
}

.pao-answer strong {
  font-size: 20px;
  color: var(--text);
}

.pao-answer .pao-wrong {
  color: #E07561;
}

.pao-next-btn {
  max-width: 200px;
}

.pao-check-btn {
  max-width: 160px;
}

.pao-hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
}

.pao-edit {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-md);
}

.pao-reset-btn {
  width: 100%;
  margin-bottom: var(--sp-md);
  color: #E07561;
  border-color: #E07561;
}

.pao-reset-btn:active {
  box-shadow: 0 0 0 #E07561;
}

.pao-edit-cat {
  margin-bottom: var(--sp-md);
}

.pao-edit-title {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: var(--sp-sm);
}

.pao-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pao-edit-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pao-edit-idx {
  width: 16px;
  text-align: center;
  font-weight: 800;
  font-size: 12px;
  color: var(--text-dim);
}

.pao-edit-input {
  flex: 1;
  min-height: 34px;
  padding: 4px 8px;
  font-size: 12px;
}
