/* =====================================================
   Mentum · estilos
   Basado en el sistema de diseño de Mentum (tokens y componentes mn-*).
   Tema claro por defecto. Oscuro: según la preferencia del sistema, o forzado con el
   botón de tema (data-theme en <html>). El Desafío se juega siempre en oscuro
   ("arena", clase .arena en <html>). El bloque oscuro está repetido a propósito:
   uno para la preferencia del sistema y otro para la elección manual y la arena.
===================================================== */

/* Tipografías propias (antes desde Google Fonts): solo el subconjunto latino, que cubre
   el español. Archivo es variable en peso y ancho; Source Serif 4, en peso y tamaño óptico.
   Licencia SIL Open Font License (ver assets/fonts/LEEME.md). */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 100%;
  font-display: swap;
  src: url(../fonts/archivo-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/source-serif-4-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/source-serif-4-italic-latin.woff2) format('woff2');
}

:root {
  color-scheme: light;

  --paper: #F5F5F3;
  --surface: #FFFFFF;
  --surface-sunk: #EBEBE7;
  --line: #DEDED8;
  --line-strong: #8E8E86;
  --ink: #111217;
  --ink-soft: #3C3D45;
  --ink-muted: #686A73;

  --accent: #5B3BE8;
  --accent-deep: #4526C4;
  --accent-soft: #ECE8FF;
  --on-accent: #FFFFFF;
  --mark: #CDBFFF;

  --correct: #157046;
  --correct-soft: #DDF3E5;
  --correct-fill: #9FE0B5;
  --on-fill: #111217;
  --wrong: #B42318;
  --wrong-soft: #FBE3E0;
  --wrong-fill: #B42318;
  --on-wrong: #FFFFFF;
  --alerta: #9A5B00;
  --alerta-soft: #FCEFD9;

  /* Solo para las medallas del podio del ranking */
  --oro: #D4AE3A;
  --plata: #A9AEB7;
  --bronce: #C07F4A;

  --rama-civil: #E8590C;
  --rama-constitucional: #1C7ED6;
  --rama-penal: #D6336C;
  --rama-procesal: #0C8599;

  --shadow-sheet: 0 1px 0 #1112170f, 0 1px 2px #1112170d;
  --shadow-lift: 0 12px 28px -14px #11121747, 0 2px 4px #1112170d;
  --focus-ring: 0 0 0 2px #f5f5f3, 0 0 0 4px #5b3be8;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --radius-sm: 4px; --radius-md: 6px; --radius-lg: 10px; --radius-full: 9999px;

  --font-sans: Archivo, "Segoe UI", system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --paper: #0E0F13;
    --surface: #17181E;
    --surface-sunk: #1F2027;
    --line: #2A2C35;
    --line-strong: #6B6E7A;
    --ink: #F2F2F4;
    --ink-soft: #C5C6CD;
    --ink-muted: #9597A1;

    --accent: #9D8BFF;
    --accent-deep: #B9ABFF;
    --accent-soft: #2B2454;
    --on-accent: #0E0F13;
    --mark: #463A99;

    --correct: #5ED69B;
    --correct-soft: #12301F;
    --correct-fill: #6FD9A0;
    --on-fill: #0E0F13;
    --wrong: #FF8A80;
    --wrong-soft: #3A1512;
    --wrong-fill: #C4302B;
    --alerta: #F0B25A;
    --alerta-soft: #3A2A0E;
    --oro: #E3BE4F;
    --plata: #B9BEC7;
    --bronce: #D08A52;

    --shadow-sheet: 0 1px 0 #00000066;
    --shadow-lift: 0 12px 28px -12px #000000cc;
    --focus-ring: 0 0 0 2px #0e0f13, 0 0 0 4px #9d8bff;
  }
}

:root[data-theme="dark"],
:root.arena {
  color-scheme: dark;

  --paper: #0E0F13;
  --surface: #17181E;
  --surface-sunk: #1F2027;
  --line: #2A2C35;
  --line-strong: #6B6E7A;
  --ink: #F2F2F4;
  --ink-soft: #C5C6CD;
  --ink-muted: #9597A1;

  --accent: #9D8BFF;
  --accent-deep: #B9ABFF;
  --accent-soft: #2B2454;
  --on-accent: #0E0F13;
  --mark: #463A99;

  --correct: #5ED69B;
  --correct-soft: #12301F;
  --correct-fill: #6FD9A0;
  --on-fill: #0E0F13;
  --wrong: #FF8A80;
  --wrong-soft: #3A1512;
  --wrong-fill: #C4302B;
  --alerta: #F0B25A;
  --alerta-soft: #3A2A0E;
  --oro: #E3BE4F;
  --plata: #B9BEC7;
  --bronce: #D08A52;

  --shadow-sheet: 0 1px 0 #00000066;
  --shadow-lift: 0 12px 28px -12px #000000cc;
  --focus-ring: 0 0 0 2px #0e0f13, 0 0 0 4px #9d8bff;
}

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

html, body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  /* clip (no hidden) para no romper el header sticky */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}

button { font-family: inherit; touch-action: manipulation; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* =====================================================
   COMPONENTES DEL SISTEMA (mn-*)
===================================================== */

.mn-label {
  font: 700 12px/16px var(--font-sans);
  font-stretch: 75%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.mn-mark {
  color: var(--ink);
  background: linear-gradient(100deg, transparent 0.12em, var(--mark) 0.2em, var(--mark) calc(100% - 0.18em), transparent calc(100% - 0.1em)) 0 88% / 100% 48% no-repeat;
  padding: 0 0.12em;
  margin: 0 -0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Logotipo */
.mn-logo { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; border-radius: var(--radius-md); }
.mn-logo:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Logotipo «Las fichas»: MENTUM en seis fichas con relieve. La primera M es la
   ficha en juego: violeta, inclinada −6° (como las banderitas) y con un punto.
   --f es el ancho de cada ficha; todo lo demás se calcula a partir de él. */
.mn-fichas {
  --f: 26px;
  display: inline-flex;
  align-items: flex-start;
  gap: calc(var(--f) * .11);
  padding-bottom: calc(var(--f) * .1);
  flex: none;
}
.mn-fichas .ficha {
  position: relative;
  width: var(--f);
  height: calc(var(--f) * 1.08);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border: max(1.5px, calc(var(--f) * .075)) solid var(--ink);
  border-radius: calc(var(--f) * .22);
  background: var(--surface);
  box-shadow: 0 calc(var(--f) * .1) 0 var(--ink);
  color: var(--ink);
  font: 800 calc(var(--f) * .62)/1 var(--font-sans);
}
.mn-fichas .ficha--m {
  background: var(--accent);
  color: var(--on-accent);
  font-size: calc(var(--f) * .56);
  transform: rotate(-6deg);
}
.mn-fichas .ficha--m::after {
  content: "";
  position: absolute;
  top: calc(var(--f) * .08);
  right: calc(var(--f) * .08);
  width: max(3px, calc(var(--f) * .12));
  height: max(3px, calc(var(--f) * .12));
  border-radius: 50%;
  background: var(--on-accent);
}
.mn-fichas--sm { --f: 18px; }
.mn-beta {
  font: 700 11px/1 var(--font-sans);
  font-stretch: 75%;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 7px;
  border-radius: var(--radius-full);
}

/* Relieve de ficha: todo lo que se puede apretar tiene borde y un canto abajo,
   igual que las fichas del logotipo. Al apretar, baja y el canto desaparece.
   Cada componente define --relieve; el foco de teclado se suma encima. */
.mn-btn:focus-visible, .mn-card:focus-visible, .mn-mode__opt:focus-visible,
.mn-choice:focus-visible, .review-cta:focus-visible, .theme-toggle:focus-visible,
.ramo-card:focus-visible, .ramo-filter:focus-visible {
  box-shadow: var(--relieve, 0 0 transparent), var(--focus-ring);
}

/* Botones */
.mn-btn {
  --relieve: 0 4px 0 var(--ink);
  font: 700 15px/20px var(--font-sans);
  height: 48px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--relieve);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition: background .15s, border-color .15s, box-shadow .1s, transform .1s;
}
@media (hover: hover) { .mn-btn:hover { background: var(--surface-sunk); } }
.mn-btn:active { --relieve: 0 0 0 var(--ink); transform: translateY(4px); }
.mn-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mn-btn--primary { background: var(--accent); color: var(--on-accent); }
@media (hover: hover) { .mn-btn--primary:hover { background: var(--accent-deep); } }
.mn-btn--ghost { --relieve: none; border-color: transparent; background: transparent; color: var(--ink-soft); }
@media (hover: hover) { .mn-btn--ghost:hover { background: var(--surface-sunk); border-color: transparent; color: var(--ink); } }
.mn-btn--ghost:active { --relieve: none; transform: none; }
.mn-btn--block { width: 100%; }
.mn-btn--danger { background: var(--wrong-fill); color: var(--on-wrong); }
@media (hover: hover) { .mn-btn--danger:hover { background: var(--wrong-fill); } }
.mn-btn:disabled { opacity: .6; cursor: default; transform: none; }
.mn-btn--sm { height: 36px; padding: 0 var(--space-3) 0 var(--space-2); font-size: 14px; }

/* Fichas */
.mn-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  font: 600 12px/1 var(--font-sans);
  background: var(--surface-sunk);
  color: var(--ink-soft);
  white-space: nowrap;
}
/* Fecha de actualización bajo el título (texto normal: en mayúsculas cuesta leerla) */
.privacy-updated { font: 500 14px/20px var(--font-sans); color: var(--ink-muted); margin-top: var(--space-2); }
.mn-chip svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mn-chip b { font-weight: 800; font-stretch: 75%; font-size: 14px; }
.mn-chip--ok { background: var(--correct-soft); color: var(--correct); }
.mn-chip--bad { background: var(--wrong-soft); color: var(--wrong); }
.mn-chip--review { background: var(--alerta-soft); color: var(--alerta); }
/* Récord: neutro con cifra en negrita (el violeta queda para lo que está en juego) */
.mn-chip--best { background: var(--surface-sunk); color: var(--ink); }
.mn-chip--time { background: var(--accent-soft); color: var(--accent); }
.mn-level { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.mn-level i { width: 3px; border-radius: 1px; background: var(--line-strong); opacity: .45; }
.mn-level i:nth-child(1) { height: 5px; }
.mn-level i:nth-child(2) { height: 8px; }
.mn-level i:nth-child(3) { height: 11px; }
.mn-level i.on { background: var(--ink); opacity: 1; }

/* Aviso */
.mn-notice {
  display: flex;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  font: 500 13px/19px var(--font-sans);
}
.mn-notice::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--ink-muted);
  box-shadow: 0 0 0 4px var(--surface-sunk);
}
.mn-notice strong { color: var(--ink); font-weight: 700; }

/* Selector de modo */
.mn-mode { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
/* Cada modo es una tecla: sin elegir está arriba; el elegido queda apretado */
.mn-mode__opt {
  --relieve: 0 4px 0 var(--ink);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: var(--relieve);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .1s, transform .1s;
}
.mn-mode__opt svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.mn-mode__opt b { display: block; font: 700 15px/20px var(--font-sans); color: var(--ink); }
.mn-mode__opt span span { display: block; font: 500 12px/16px var(--font-sans); color: var(--ink-muted); }
@media (hover: hover) { .mn-mode__opt:hover { background: var(--surface-sunk); } }
.mn-mode__opt[aria-pressed="true"] {
  --relieve: 0 1px 0 var(--accent);
  transform: translateY(3px);
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.mn-mode__opt[aria-pressed="true"] b { color: var(--accent); }
/* El visto confirma cuál está elegido: el relieve solo no basta (el apretado puede leerse como apagado).
   Va como insignia en la esquina para no quitarle ancho al texto en celular. */
.mn-mode__opt { position: relative; }
.mn-mode__check {
  display: none;
  position: absolute;
  top: -10px;
  right: -10px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 0 2px var(--paper);
  align-items: center;
  justify-content: center;
}
.mn-mode__opt .mn-mode__check svg { width: 14px; height: 14px; stroke-width: 3; }
.mn-mode__opt[aria-pressed="true"] .mn-mode__check { display: inline-flex; }

/* Encabezado de rama */
.mn-rama {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}
.mn-rama h2 {
  font: 700 24px/30px var(--font-sans);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.mn-flag {
  width: 12px;
  height: 16px;
  border-radius: 2px 2px 3px 3px;
  background: var(--flag, var(--rama-civil));
  transform: rotate(-6deg);
  flex: none;
}

/* Tarjeta de rosco */
.mn-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  background: var(--surface);
  /* Relieve de ficha más suave que los botones (gris) para que la lista no pese;
     al pasar el cursor toma el borde de tinta y sube */
  --relieve: 0 4px 0 var(--line-strong);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--relieve);
  transition: box-shadow .12s var(--ease), border-color .12s var(--ease), transform .12s var(--ease);
}
@media (hover: hover) { .mn-card:hover { --relieve: 0 6px 0 var(--ink); border-color: var(--ink); transform: translateY(-2px); } }
.mn-card:active { --relieve: 0 1px 0 var(--ink); border-color: var(--ink); transform: translateY(3px); }
.mn-card__body { min-width: 0; }
.mn-card__title { display: block; font: 650 18px/24px var(--font-sans); letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.mn-card__tema { display: block; font: 500 13px/18px var(--font-sans); color: var(--ink-muted); margin: 2px 0 var(--space-3); }
.mn-card__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.mn-card__go { width: 20px; height: 20px; fill: none; stroke: var(--ink-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s, stroke .2s; }
@media (hover: hover) { .mn-card:hover .mn-card__go { transform: translateX(3px); stroke: var(--accent); } }

/* Barra del juego y reloj */
.mn-gamebar { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); }
.mn-gamebar .mn-btn { margin-right: auto; }
.mn-timer {
  font: 800 18px/1 var(--font-sans);
  font-stretch: 75%;
  height: 32px;
  min-width: 58px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
.mn-timer.warning { color: var(--alerta); border-color: var(--alerta); }
.mn-timer.critical { color: var(--wrong); border-color: var(--wrong); background: var(--wrong-soft); }

/* Panel de pista */
.mn-clue {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sheet);
  margin-bottom: var(--space-3);
  transition: border-color .3s var(--ease);
}
.mn-clue__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 12px/1 var(--font-sans);
  font-stretch: 75%;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 10px;
  border-radius: var(--radius-full);
}
.mn-clue__tag b { font-size: 15px; font-weight: 900; letter-spacing: 0; }
.mn-clue__text {
  font-family: var(--font-serif);
  font-size: clamp(18px, 4.8vw, 20px);
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
  margin-top: var(--space-3);
  min-height: 4.5em;
  text-wrap: pretty;
}
.mn-clue__reveal { display: none; margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.mn-clue__reveal.show { display: block; animation: fadeIn 0.3s var(--ease); }
.mn-clue__status {
  font: 700 12px/16px var(--font-sans);
  font-stretch: 75%;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.mn-clue.is-correct { border-color: var(--correct); }
.mn-clue.is-correct .mn-clue__status { color: var(--correct); }
.mn-clue.is-wrong .mn-clue__status { color: var(--wrong); }
.mn-clue__answer { font-family: var(--font-serif); font-size: 26px; line-height: 32px; font-weight: 600; margin: 4px 0 var(--space-3); color: var(--ink); }
/* Lo que escribió la persona, para compararlo con la respuesta */
.mn-clue__yours, .review-yours { margin: 0 0 var(--space-3); font: 500 14px/20px var(--font-sans); color: var(--ink-muted); }
.mn-clue__yours b, .review-yours b { font: 600 15px/20px var(--font-serif); color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--wrong); }
.review-yours { margin: 6px 0 0; }

/* Reporte de una tarjeta: enlace discreto que se abre en un formulario corto */
.report-slot { margin-top: var(--space-3); }
.review-content .report-slot { margin-top: 2px; }
.link-btn.report-toggle { font-size: 13px; color: var(--ink-muted); text-decoration-color: var(--line-strong); }
@media (hover: hover) { .link-btn.report-toggle:hover { color: var(--ink); } }
.report-form { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-2); }
.report-form__label { font: 700 14px/20px var(--font-sans); color: var(--ink); }
.report-reasons .mn-choice { height: auto; min-height: 44px; padding: 8px var(--space-3); font-size: 14px; line-height: 18px; text-align: left; }
.report-form .feedback-input-inline { margin-top: 0; }
.report-form .field__error { margin: 0; }
.report-form__actions { display: flex; gap: var(--space-2); justify-content: flex-end; }
.report-form__actions .mn-btn--sm { height: 44px; padding: 0 var(--space-4); }
.report-done { margin: 0; font: 600 14px/20px var(--font-sans); color: var(--correct); }
.mn-clue__tip {
  background: var(--surface-sunk);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 23px;
  color: var(--ink-soft);
}
.mn-clue__tip::before {
  content: 'Tip';
  display: block;
  margin-bottom: 2px;
  font: 700 12px/16px var(--font-sans);
  font-stretch: 75%;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Campo de respuesta */
.mn-answer { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
.mn-input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 var(--space-4);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  font: 500 16px/1 var(--font-sans);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.mn-input::placeholder { color: var(--ink-muted); }
.mn-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mn-answer .mn-btn { height: 52px; }
.secondary-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.secondary-row .mn-btn { padding: 0 var(--space-2); }
.secondary-row:has(#btnShow.hidden) { grid-template-columns: 1fr; }
#btnContinue { height: 52px; scroll-margin-bottom: var(--space-4); }

/* Opciones de feedback */
.mn-choices { display: flex; gap: 6px; flex-wrap: wrap; }
.mn-choice {
  min-width: 44px;
  height: 44px;
  padding: 0 var(--space-4);
  --relieve: 0 3px 0 var(--line-strong);
  border-radius: var(--radius-md);
  border: 2px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--relieve);
  font: 600 15px/1 var(--font-sans);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, box-shadow .1s, transform .1s;
}
@media (hover: hover) { .mn-choice:hover { --relieve: 0 3px 0 var(--ink); border-color: var(--ink); color: var(--ink); } }
/* Elegida: queda apretada */
.mn-choice.selected { --relieve: 0 0 0 var(--ink); transform: translateY(3px); background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mn-choice--num { padding: 0; width: 44px; font-weight: 800; font-stretch: 75%; font-size: 17px; }
.pill-btn { flex: 1; }
.letter-pills .mn-choice { width: 38px; min-width: 38px; height: 38px; font-size: 15px; }

/* Marcador */
.mn-score { display: flex; align-items: baseline; gap: 6px; }
.mn-score b { font: 800 88px/80px var(--font-sans); font-stretch: 75%; letter-spacing: -0.02em; color: var(--ink); }
.mn-score span { font: 700 32px/1 var(--font-sans); font-stretch: 75%; color: var(--ink-muted); }
.mn-bar { height: 6px; border-radius: var(--radius-full); background: var(--surface-sunk); overflow: hidden; }
/* La barra se llena una vez: se anima con transform (no con width) para no recalcular la página */
.mn-bar i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: inherit; transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease) .15s; }

/* =====================================================
   ESTRUCTURA DE LA PÁGINA
===================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px var(--space-6);
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-sub { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--ink-muted); }

/* Botones del encabezado (progreso, ranking, tema): fichas redondas con relieve suave,
   como las tarjetas. El ::after amplía el área táctil a 44px sin agrandar el dibujo. */
.theme-toggle {
  --relieve: 0 3px 0 var(--line-strong);
  position: relative;
  flex: none;
  width: 38px;
  height: 38px;
  margin-left: var(--space-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 2px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--relieve);
  cursor: pointer;
  transition: border-color .15s, box-shadow .1s, transform .1s;
}
.theme-toggle::after { content: ''; position: absolute; inset: -5px; border-radius: inherit; }
@media (hover: hover) { .theme-toggle:hover { --relieve: 0 3px 0 var(--ink); border-color: var(--ink); } }
.theme-toggle:active { --relieve: 0 0 0 var(--ink); transform: translateY(3px); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* El tema se elige en Ajustes (engranaje); el engranaje se ve también en la arena */
.header-progress svg { stroke-width: 2.4; }
/* El ranking es del Desafío: su botón solo aparece en la arena */
.header-ranking { display: none; }
.arena .header-ranking { display: inline-flex; }

/* =====================================================
   MODOS DE JUEGO: Estudio (tranquilo) y Desafío (arena)
===================================================== */

.game-mode {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-2);
}
.game-mode span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  font: 700 12px/1 var(--font-sans);
  font-stretch: 75%;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--surface-sunk);
  color: var(--ink-soft);
}
.game-mode svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Arena: fondo con una luz violeta desde arriba, etiqueta y reloj encendidos */
.arena body {
  background:
    radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    var(--paper);
  background-attachment: fixed;
}
.arena .site-header { background: color-mix(in srgb, var(--paper) 70%, transparent); }
.arena .game-mode span { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 45%, transparent); }
.arena .mn-timer { font-size: 22px; height: 38px; min-width: 70px; border-color: var(--accent); color: var(--accent); }
.arena .mn-timer.warning { color: var(--alerta); border-color: var(--alerta); }
.arena .mn-timer.critical { color: var(--wrong); border-color: var(--wrong); }
.arena .rosco-center { box-shadow: 0 0 0 1px var(--line), 0 0 40px color-mix(in srgb, var(--accent) 18%, transparent); }
.arena .mn-clue { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }

/* Anillo de tiempo alrededor de la letra central */
.time-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
  z-index: 4;
}
.time-ring circle { fill: none; stroke-width: 2.4; }
.time-ring .track { stroke: var(--line); }
.time-ring .left {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 194.78;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke .3s;
}
.time-ring.warning .left { stroke: var(--alerta); }
.time-ring.critical .left { stroke: var(--wrong); }

.container { max-width: 1040px; margin: 0 auto; padding: 40px var(--space-6) 72px; }

.view { display: none; animation: fadeIn 0.35s var(--ease); }
.view.active { display: block; }
#view-home, #view-results { max-width: 640px; margin: 0 auto; }

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

/* Inicio */
.home-hero { margin-bottom: var(--space-8); }
.home-hero .mn-label { margin-bottom: var(--space-3); }
.home-hero h1 {
  font: 800 clamp(36px, 8.5vw, 52px)/1.02 var(--font-sans);
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: var(--space-4);
  max-width: 580px;
  text-wrap: balance;
}
.home-hero p { color: var(--ink-soft); font-size: 16px; line-height: 24px; max-width: 480px; }

.home-notice { margin-top: 40px; }
.mode-section { margin-bottom: var(--space-6); }
.mode-section .mn-label { margin-bottom: var(--space-3); }
.mode-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.link-btn.howto-link { font-size: 13px; padding: 12px 0; margin: -12px 0 0; }

/* Cómo se juega (primera visita) */
.howto {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}
.howto h2 { font: 700 18px/24px var(--font-sans); color: var(--ink); margin: 0 0 var(--space-3); }
.howto ul { margin: 0 0 var(--space-4); padding-left: 20px; display: flex; flex-direction: column; gap: var(--space-2); font: 500 15px/22px var(--font-sans); color: var(--ink-soft); max-width: 65ch; }
.howto b { color: var(--ink); }

/* Rosco del día: la única tarjeta en color de marca */
.daily {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-4);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: 40px;
  overflow: hidden;
}
.daily__text { min-width: 0; }
.daily__label {
  font: 700 12px/16px var(--font-sans);
  font-stretch: 75%;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: var(--space-2);
}
.daily__title { font: 800 26px/30px var(--font-sans); letter-spacing: -0.025em; text-wrap: balance; }
.daily__tema { font: 500 14px/20px var(--font-sans); opacity: .85; margin: 4px 0 var(--space-5); }
.daily__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
/* Sobre el violeta, el botón es una ficha del color del texto con canto oscuro */
.daily .mn-btn { --relieve: 0 4px 0 rgba(14, 15, 19, .45); background: var(--on-accent); border-color: var(--on-accent); color: var(--accent); }
@media (hover: hover) { .daily .mn-btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); } }
.daily .mn-btn:active { --relieve: 0 0 0 transparent; }
.daily .mn-btn:focus-visible { box-shadow: var(--relieve), 0 0 0 2px var(--accent), 0 0 0 4px var(--on-accent); }
/* La racha es una recompensa: ámbar (el violeta queda para lo que está en juego) */
.daily__streak {
  font: 700 13px/1 var(--font-sans);
  font-stretch: 75%;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 8px 11px;
  border-radius: var(--radius-full);
  background: var(--alerta-soft);
  color: var(--alerta);
}
.daily__ring { width: 132px; height: 132px; flex: none; }
.daily__ring .dot { fill: currentColor; opacity: .35; }
.daily__ring .on { fill: currentColor; }
.daily__ring .day { font: 800 58px/1 var(--font-sans); font-stretch: 75%; fill: currentColor; text-anchor: middle; }
.daily__ring .month { font: 700 18px/1 var(--font-sans); font-stretch: 75%; letter-spacing: .12em; fill: currentColor; opacity: .85; text-anchor: middle; }
@media (max-width: 480px) {
  .daily { padding: var(--space-5); gap: var(--space-3); }
  .daily__ring { width: 88px; height: 88px; align-self: start; }
  .daily__title { font-size: 22px; line-height: 26px; }
}

.rosco-group-list { display: flex; flex-direction: column; gap: var(--space-3); }

/* Sigue donde quedaste: el rosco por terminar y el repaso, juntos */
.home-continue { margin-bottom: 40px; }
.home-continue > .mn-label { margin-bottom: var(--space-3); }
.home-continue__list { display: flex; flex-direction: column; gap: var(--space-3); }
.home-continue .review-cta { margin-bottom: 0; }
#continueSlot:empty { display: none; }

/* Filtros por rama: teclas como las opciones de feedback; la elegida queda apretada */
.ramo-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.ramo-filter {
  --relieve: 0 3px 0 var(--line-strong);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  border: 2px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--relieve);
  font: 600 15px/1 var(--font-sans);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, box-shadow .1s, transform .1s;
}
.ramo-filter .mn-flag { width: 9px; height: 12px; }
@media (hover: hover) { .ramo-filter:hover { --relieve: 0 3px 0 var(--ink); border-color: var(--ink); color: var(--ink); } }
.ramo-filter[aria-pressed="true"] { --relieve: 0 0 0 var(--ink); transform: translateY(3px); background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Ficha de ramo: misma ficha que las tarjetas de rosco, compacta y en grilla.
   El dominio es pasado (no está en juego): barra neutra, no violeta. */
.ramo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); }
.ramo-card {
  --relieve: 0 4px 0 var(--line-strong);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 140px;
  padding: var(--space-4);
  text-align: left;
  cursor: pointer;
  color: inherit;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--relieve);
  transition: box-shadow .12s var(--ease), border-color .12s var(--ease), transform .12s var(--ease);
}
@media (hover: hover) { .ramo-card:hover { --relieve: 0 6px 0 var(--ink); border-color: var(--ink); transform: translateY(-2px); } }
.ramo-card:active { --relieve: 0 1px 0 var(--ink); border-color: var(--ink); transform: translateY(3px); }
.ramo-card__rama {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font: 700 12px/16px var(--font-sans);
  font-stretch: 75%;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
}
.ramo-card__rama .mn-flag { width: 9px; height: 12px; }
.ramo-card__name { font: 700 18px/22px var(--font-sans); letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.ramo-card__count { font: 500 13px/18px var(--font-sans); color: var(--ink-muted); margin-top: 2px; }
.ramo-card__foot { display: flex; align-items: center; gap: var(--space-2); margin-top: auto; padding-top: var(--space-3); }
.ramo-card__dominio { font: 700 14px/1 var(--font-sans); font-stretch: 75%; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dominio-meter { flex: 1; height: 6px; border-radius: var(--radius-full); background: var(--line); overflow: hidden; }
.dominio-meter i { display: block; height: 100%; background: var(--ink); border-radius: 0 3px 3px 0; }

/* Pantalla de un ramo */
#view-ramo { max-width: 640px; margin: 0 auto; }
.ramo-head { margin-bottom: var(--space-6); }
.ramo-head__rama { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.ramo-head__rama .mn-flag { width: 9px; height: 12px; }
.ramo-head h1 { font: 800 clamp(34px, 8vw, 44px)/1.05 var(--font-sans); letter-spacing: -0.035em; text-wrap: balance; }
.ramo-head__meta { font: 500 15px/22px var(--font-sans); color: var(--ink-soft); margin: var(--space-2) 0 var(--space-3); }
.ramo-head__meter { max-width: 320px; height: 8px; }
.ramo-mix {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.ramo-mix__text { flex: 1 1 260px; min-width: 0; }
.ramo-mix__text b { display: block; font: 700 18px/24px var(--font-sans); color: var(--ink); }
.ramo-mix__text span { display: block; font: 500 14px/20px var(--font-sans); color: var(--ink-soft); margin-top: 2px; max-width: 52ch; }

/* Portada en computador: dos columnas. Título y modo a la izquierda, Rosco del día
   a la derecha; «Cómo se juega», «Sigue donde quedaste», los ramos (en cuatro columnas) y el aviso,
   abajo a lo ancho. Así el Rosco del día mide lo mismo que el título y el modo, sin huecos. */
@media (min-width: 1024px) {
  #view-home.active {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    /* La segunda fila absorbe la altura extra del Rosco del día */
    grid-template-rows: auto 1fr;
    column-gap: var(--space-12);
    align-items: start;
  }
  #view-home > .home-hero, #view-home > .mode-section { grid-column: 1; }
  #view-home > .daily { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; margin-bottom: 40px; }
  #view-home > .howto, #view-home > .home-continue, #view-home > .ramos, #view-home > .home-notice, #view-home > .ranking-teaser { grid-column: 1 / -1; }
  .home-continue__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-4); }
  .ramo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
  /* El ramo usa el ancho completo para sus roscos en dos columnas */
  #view-ramo { max-width: none; }
  #view-home .home-hero h1 { font-size: 56px; }
  /* A lo ancho, las cuatro reglas en dos columnas para que no quede media tarjeta vacía */
  .howto ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--space-12); max-width: none; }
  .daily { grid-template-columns: 1fr; align-content: space-between; }
  .daily__ring { order: -1; justify-self: center; width: 168px; height: 168px; margin-bottom: var(--space-2); }
  .rosco-group-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
}
.list-message { text-align: center; padding: 28px 16px; color: var(--ink-muted); font-size: 14px; }
.list-error {
  background: var(--wrong-soft);
  border: 1px solid var(--wrong);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  color: var(--wrong);
  font-size: 13px;
  line-height: 1.5;
}

/* Juego */
.game-layout { display: grid; gap: var(--space-2); }
.game-board, .game-panel { min-width: 0; }

.rosco-title {
  font: 650 18px/24px var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: center;
  margin-bottom: var(--space-4);
  text-wrap: balance;
}

.rosco-ring {
  position: relative;
  /* En celular se limita por alto para que la pista quede visible sin hacer scroll */
  width: min(340px, calc(100vw - 40px), 42vh);
  aspect-ratio: 1;
  margin: 0 auto var(--space-5);
}
.rosco-center {
  position: absolute;
  inset: 29%;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  z-index: 5;
}
.rosco-center-letter {
  font: 800 clamp(52px, 15vw, 72px)/1 var(--font-sans);
  font-stretch: 75%;
  color: var(--accent);
}
.rosco-center .mn-label { font-size: 11px; letter-spacing: .12em; }

.letter-node {
  position: absolute;
  width: 10.4%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 clamp(12px, 3.6vw, 15px)/1 var(--font-sans);
  background: var(--surface);
  color: var(--ink-muted);
  border: 1.5px solid var(--line-strong);
  /* Cada letra es una ficha redonda con su canto */
  box-shadow: 0 2px 0 var(--line-strong);
  transition: all .3s var(--ease);
  z-index: 1;
}
/* La letra en juego: la ficha violeta del logotipo */
.letter-node.active {
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--ink);
  transform: scale(1.16);
  z-index: 10;
  box-shadow: 0 3px 0 var(--ink), 0 0 0 6px var(--accent-soft);
}
.letter-node.correct { background: var(--correct-fill); color: var(--on-fill); border-color: var(--correct); box-shadow: 0 2px 0 var(--correct); }
.letter-node.incorrect { background: var(--wrong-fill); color: var(--on-wrong); border-color: var(--wrong-fill); box-shadow: 0 2px 0 var(--ink); }
.letter-node.skipped { background: var(--paper); color: var(--ink-muted); border-style: dashed; box-shadow: none; }

@media (max-width: 879px) {
  .container:has(#view-game.active) { padding-top: var(--space-4); }
  /* El modo ya se ve en el reloj y en la arena: la etiqueta se oculta para ganar espacio */
  .game-mode { display: none; }
  .rosco-title { font-size: 15px; line-height: 20px; color: var(--ink-soft); margin-bottom: var(--space-3); }
  .rosco-ring { width: min(340px, calc(100vw - 40px), 38vh); margin-bottom: var(--space-4); }
}
@media (min-width: 880px) {
  .game-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-12); align-items: center; }
  .rosco-ring { width: min(420px, 100%); margin-bottom: 0; }
  .game-panel { max-width: 460px; }
  .mn-clue { padding: var(--space-6); }
  .rosco-title { font-size: 20px; line-height: 26px; }
}

/* Resultados */
.results-hero { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-6); }
.results-hero h2 { font: 700 24px/30px var(--font-sans); letter-spacing: -0.02em; }
.results-hero .mn-bar { max-width: 360px; }
.results-subtitle { color: var(--ink-soft); font-size: 16px; line-height: 24px; }
.results-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.results-review-btn { height: auto; min-height: 52px; padding: 12px var(--space-5); line-height: 22px; margin-bottom: var(--space-2); text-wrap: balance; }
.results-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-bottom: 40px; }

.review-section { margin-bottom: 40px; }
.review-section .mn-label { margin-bottom: var(--space-3); }
.review-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sheet);
}
.review-item { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 14px var(--space-4); align-items: start; }
.review-item + .review-item { border-top: 1px solid var(--line); }
.review-letter {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 14px/1 var(--font-sans);
  border: 1.5px solid transparent;
}
.review-letter.correct { background: var(--correct-fill); color: var(--on-fill); border-color: var(--correct); }
.review-letter.incorrect { background: var(--wrong-fill); color: var(--on-wrong); }
.review-letter.skipped { background: var(--paper); color: var(--ink-muted); border: 1.5px dashed var(--line-strong); }
.review-content { min-width: 0; }
.review-answer { font: 600 17px/22px var(--font-serif); color: var(--ink); }
.review-pista { font: 400 14px/21px var(--font-serif); color: var(--ink-soft); margin-top: 4px; }
/* La definición va plegada: la respuesta se ve y «Definición» la abre */
.review-def > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-3);
  row-gap: 2px;
  min-height: 30px;
  padding-top: 4px;
}
.review-def > summary::-webkit-details-marker { display: none; }
.review-def__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 13px/18px var(--font-sans);
  color: var(--ink-muted);
}
.review-def__hint::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s var(--ease);
}
@media (hover: hover) { .review-def > summary:hover .review-def__hint { color: var(--ink); } }
.review-def[open] .review-def__hint::after { transform: rotate(-135deg) translateY(-1px); }
.review-def > summary:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.review-empty { font-size: 15px; color: var(--ink-soft); padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.review-more { margin-top: var(--space-3); }
.review-more > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font: 600 15px/1 var(--font-sans);
  color: var(--correct);
}
.review-more > summary::-webkit-details-marker { display: none; }
.review-more > summary::after {
  content: '';
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s var(--ease);
}
.review-more[open] > summary { border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom-color: transparent; }
.review-more[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.review-more[open] .review-list { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* Registro de resultado */
.register-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5) var(--space-5);
  box-shadow: var(--shadow-sheet);
  margin-bottom: 40px;
}
.register-card h3 { font: 700 22px/28px var(--font-sans); letter-spacing: -0.02em; margin-bottom: 4px; }
.register-card > p { font-size: 14px; line-height: 20px; color: var(--ink-soft); margin-bottom: var(--space-5); }
.register-fields { display: flex; flex-direction: column; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font: 600 14px/18px var(--font-sans); color: var(--ink); }
.field .mn-input { flex: none; width: 100%; height: 48px; }
.mn-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%), linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.field__error { font: 600 14px/20px var(--font-sans); color: var(--wrong); }
.feedback-card .field__error { margin-bottom: var(--space-3); }
.register-done {
  padding: var(--space-4);
  color: var(--correct);
  background: var(--correct-soft);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
}

.register-hint { margin-bottom: 40px; }

/* Puntaje del Desafío y récord */
.results-points { font: 600 14px/20px var(--font-sans); color: var(--ink-soft); }
.record-chip { align-self: flex-start; }

/* Repaso de errores: acceso desde la portada y desde el progreso */
.review-cta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  margin-bottom: 40px;
  padding: var(--space-4) var(--space-5);
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  /* Misma ficha que las tarjetas de rosco, sobre fondo hundido */
  --relieve: 0 4px 0 var(--ink-muted);
  background: var(--surface-sunk);
  border: 2px solid var(--ink-muted);
  border-radius: var(--radius-lg);
  box-shadow: var(--relieve);
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease), transform .12s var(--ease);
}
@media (hover: hover) { .review-cta:hover { --relieve: 0 6px 0 var(--ink); border-color: var(--ink); transform: translateY(-2px); } }
.review-cta:active { --relieve: 0 1px 0 var(--ink); border-color: var(--ink); transform: translateY(3px); }
@media (hover: hover) { .review-cta:hover .mn-card__go { transform: translateX(3px); stroke: var(--ink); } }
.review-cta__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--paper);
}
.review-cta__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.review-cta__text b { display: block; font: 700 17px/22px var(--font-sans); }
.review-cta__text span { display: block; font: 500 13px/18px var(--font-sans); color: var(--ink-soft); margin-top: 2px; }

/* Compartir resultado */
.share-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: var(--space-5);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sheet);
  margin-bottom: 40px;
}
.share-card__preview { width: 132px; aspect-ratio: 4 / 5; border-radius: var(--radius-md); background: #0E0F13; object-fit: cover; box-shadow: var(--shadow-lift); }
.share-card h3 { font: 700 20px/26px var(--font-sans); letter-spacing: -0.02em; margin-bottom: 4px; }
.share-card__body > p { font-size: 14px; line-height: 20px; color: var(--ink-soft); margin-bottom: var(--space-4); }
.share-card__actions { display: grid; gap: var(--space-2); }
.share-card__actions a.mn-btn { text-decoration: none; }
.share-card__done { margin-top: var(--space-3); font: 600 14px/20px var(--font-sans); color: var(--correct); }
@media (max-width: 420px) {
  .share-card { grid-template-columns: 96px 1fr; gap: var(--space-4); padding: var(--space-4); }
  .share-card__preview { width: 96px; }
}

/* =====================================================
   TU PROGRESO
===================================================== */

#view-progress { max-width: 640px; margin: 0 auto; }
.progress-back { margin-bottom: var(--space-4); }
.progress-head { margin-bottom: var(--space-6); }
.progress-head .mn-label { margin-bottom: var(--space-2); }
.progress-head h1 { font: 800 clamp(34px, 8vw, 44px)/1.05 var(--font-sans); letter-spacing: -0.035em; }
.progress-empty { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); }
.progress-empty p { color: var(--ink-soft); margin-bottom: var(--space-4); }

.stat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); margin-bottom: 40px; }
@media (min-width: 560px) { .stat-tiles { grid-template-columns: repeat(4, 1fr); } }
.stat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); }
.stat-tile__label { font: 600 13px/18px var(--font-sans); color: var(--ink-muted); margin-bottom: 6px; }
/* Cifras grandes: proporcionales, no tabulares */
.stat-tile__value { font: 800 28px/1 var(--font-sans); font-stretch: 75%; font-variant-numeric: proportional-nums; color: var(--ink); }

.progress-section { margin-bottom: 40px; }
.progress-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.progress-section h2 { font: 700 22px/28px var(--font-sans); letter-spacing: -0.02em; }
.progress-section__sub { font-size: 14px; line-height: 20px; color: var(--ink-muted); margin: 4px 0 var(--space-4); }
.link-btn { background: none; border: none; padding: 4px 0; font: 600 14px/20px var(--font-sans); color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Columnas de rondas: una serie, marcas finas, grilla sólida y tenue */
.rounds-chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-4) var(--space-3) 52px; }
.rounds-chart__plot { position: relative; height: 170px; }
.rounds-chart__grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
.rounds-chart__grid span { position: absolute; right: calc(100% + 10px); top: -9px; font: 600 12px/1 var(--font-sans); color: var(--ink-muted); }
.rounds-chart__cols { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-around; gap: 2px; }
.rounds-chart__col {
  position: relative;
  flex: 1;
  max-width: 44px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: default;
  border-radius: var(--radius-sm);
}
.rounds-chart__bar { width: min(24px, 70%); background: var(--accent); border-radius: 4px 4px 0 0; transition: opacity .15s; }
.rounds-chart__col:hover .rounds-chart__bar, .rounds-chart__col:focus-visible .rounds-chart__bar { opacity: .75; }
.rounds-chart__value { position: absolute; font: 700 13px/1 var(--font-sans); color: var(--ink); white-space: nowrap; }
.rounds-chart__axis { display: flex; justify-content: space-between; margin-top: var(--space-2); font: 500 12px/16px var(--font-sans); color: var(--ink-muted); }

.rounds-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow-x: auto; }
.rounds-table table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.rounds-table th, .rounds-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rounds-table th { font: 700 12px/16px var(--font-sans); font-stretch: 75%; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.rounds-table tr:last-child td { border-bottom: none; }

/* Dominio: un medidor por rosco (relleno acento sobre pista acento suave) */
.mastery-group { margin-bottom: var(--space-5); }
.mastery-group h3 { display: flex; align-items: center; gap: var(--space-2); font: 700 16px/22px var(--font-sans); margin-bottom: var(--space-3); }
.mastery-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(80px, 1fr) 76px;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.mastery-row__name { font: 600 14px/19px var(--font-sans); color: var(--ink); }
.mastery-row__meter { height: 8px; border-radius: var(--radius-full); background: var(--accent-soft); overflow: hidden; }
.mastery-row__meter i { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.mastery-row__value { font: 700 14px/1 var(--font-sans); color: var(--ink-soft); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 420px) {
  .mastery-row { grid-template-columns: 1fr auto; }
  .mastery-row__meter { grid-column: 1 / -1; grid-row: 2; }
}

/* =====================================================
   PRIVACIDAD
===================================================== */

#view-privacy { max-width: 640px; margin: 0 auto; }
.legal { color: var(--ink-soft); font-size: 16px; line-height: 24px; }
.legal h2 { font: 700 20px/26px var(--font-sans); letter-spacing: -0.02em; color: var(--ink); margin: var(--space-8) 0 var(--space-2); text-wrap: balance; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal ul { max-width: 65ch; }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: var(--space-3); }
.legal ul { padding-left: 1.25em; display: flex; flex-direction: column; gap: var(--space-2); }
.legal strong { color: var(--ink); }
.legal a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.footer-link { margin-top: var(--space-2); font-size: 12px; min-height: 44px; padding: 0 var(--space-3); color: var(--ink-muted); }
.link-btn--inline { padding: 0; font-size: inherit; line-height: inherit; }

/* Tooltip de los gráficos */
.chart-tip {
  position: absolute;
  z-index: 60;
  max-width: 280px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--paper);
  font: 600 13px/18px var(--font-sans);
  box-shadow: var(--shadow-lift);
  pointer-events: none;
}

/* Diálogo */
.mn-dialog {
  margin: auto;
  width: min(360px, calc(100vw - 32px));
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lift);
}
.mn-dialog::backdrop { background: rgba(14, 15, 19, .55); backdrop-filter: blur(2px); }
.mn-dialog[open] { animation: fadeIn .2s var(--ease); }
.mn-dialog h3 { font: 700 20px/26px var(--font-sans); letter-spacing: -0.02em; margin-bottom: 6px; }
.mn-dialog p { font-size: 15px; line-height: 22px; color: var(--ink-soft); margin-bottom: var(--space-5); }
.mn-dialog__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.mn-dialog__actions .mn-btn { padding: 0 var(--space-3); white-space: nowrap; }

/* Feedback */
.feedback-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5) var(--space-5);
  box-shadow: var(--shadow-sheet);
}
.feedback-card h3 { font: 700 22px/28px var(--font-sans); letter-spacing: -0.02em; margin-bottom: 4px; }
.feedback-card > p { font-size: 14px; color: var(--ink-soft); margin-bottom: var(--space-6); }
.feedback-question { margin-bottom: var(--space-6); }
.feedback-more-btn { display: block; margin: calc(var(--space-2) * -1) 0 var(--space-5); min-height: 44px; }
.feedback-q-label { display: block; font: 600 15px/20px var(--font-sans); color: var(--ink); margin-bottom: 10px; }
.feedback-input-inline,
textarea.feedback-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  font-family: inherit;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.feedback-input-inline { padding: 11px 12px; font-size: 16px; margin-top: var(--space-2); }
textarea.feedback-input { padding: 12px; font-size: 16px; resize: vertical; min-height: 88px; }
.feedback-input-inline:focus,
textarea.feedback-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.feedback-input-inline::placeholder, textarea.feedback-input::placeholder { color: var(--ink-muted); }
.feedback-thanks {
  display: none;
  text-align: center;
  padding: var(--space-4);
  color: var(--correct);
  background: var(--correct-soft);
  border-radius: var(--radius-md);
  font-weight: 600;
}
.feedback-thanks.show { display: block; }

/* Pie */
.footer {
  text-align: center;
  padding: 36px var(--space-5) 44px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.7;
  border-top: 1px solid var(--line);
}
.footer-brand { display: flex; justify-content: center; margin-bottom: 10px; }

/* =====================================================
   RANKING DEL DESAFÍO
===================================================== */

/* Ficha neutra de universidad: solo la sigla, igual para todas */
.mn-uni {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  background: var(--surface-sunk);
  color: var(--ink-soft);
  font: 800 12px/1 var(--font-sans);
  font-stretch: 75%;
  letter-spacing: .06em;
  white-space: nowrap;
}

/* Podio compacto en la portada del Desafío */
.ranking-teaser {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: 40px;
}
.ranking-teaser__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.ranking-teaser__head .mn-label { margin-bottom: 4px; }
.ranking-teaser__head .mn-btn { flex: none; white-space: nowrap; }
.ranking-teaser h2 { font: 700 20px/26px var(--font-sans); letter-spacing: -0.02em; }
.ranking-teaser__note { margin-top: var(--space-3); font-size: 13px; line-height: 18px; color: var(--ink-muted); }

#view-ranking { max-width: 720px; margin: 0 auto; }
.ranking-update { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.ranking-sample { margin-bottom: var(--space-5); }

/* Pestañas Individual / Universidades */
.ranking-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  max-width: 420px;
  padding: 4px;
  margin-bottom: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.ranking-tab {
  height: 44px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink-soft);
  font: 700 15px/1 var(--font-sans);
  cursor: pointer;
}
@media (hover: hover) { .ranking-tab:hover { color: var(--ink); background: var(--surface-sunk); } }
.ranking-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }

/* Podio: 2.º, 1.º y 3.º */
.ranking-podio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); align-items: end; margin-bottom: var(--space-4); }
.podio { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.podio--1 { order: 2; }
.podio--2 { order: 1; }
.podio--3 { order: 3; }
.podio .ranking-pos { width: 48px; height: 48px; font-size: 22px; }
.podio__name { font: 700 15px/19px var(--font-sans); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podio__name b, .ranking-name b { color: var(--accent); font-weight: 800; }
.podio__block {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-4) var(--space-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--medalla, var(--line-strong));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.podio--1 .podio__block { --medalla: var(--oro); min-height: 128px; }
.podio--2 .podio__block { --medalla: var(--plata); min-height: 104px; }
.podio--3 .podio__block { --medalla: var(--bronce); min-height: 88px; }
.podio__block b { font: 800 28px/1 var(--font-sans); font-stretch: 75%; color: var(--ink); }
.podio__block small { font-size: 12px; color: var(--ink-muted); }
.podio.is-me .podio__block { background: var(--accent-soft); }

/* Filas */
.ranking-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ranking-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto 52px;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.ranking-list--mini .ranking-row { grid-template-columns: 36px minmax(0, 1fr) auto auto; }
.ranking-row.is-me { background: var(--accent-soft); border: 2px solid var(--accent); }
.ranking-pos {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 16px/1 var(--font-sans);
  font-stretch: 75%;
  color: var(--ink-muted);
}
.ranking-pos--1 { background: var(--oro); color: var(--on-fill); }
.ranking-pos--2 { background: var(--plata); color: var(--on-fill); }
.ranking-pos--3 { background: var(--bronce); color: var(--on-fill); }
.ranking-name { font: 650 16px/20px var(--font-sans); color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-pts { font: 800 20px/1 var(--font-sans); font-stretch: 75%; color: var(--ink); text-align: right; white-space: nowrap; }
.ranking-pts small { margin-left: 3px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--ink-muted); }
.ranking-cambio { font: 700 13px/1 var(--font-sans); color: var(--ink-muted); text-align: right; white-space: nowrap; }
.ranking-cambio--sube { color: var(--correct); }
.ranking-cambio--nuevo { color: var(--accent); }

/* Filas de universidades */
.ranking-explica {
  margin-bottom: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-sunk);
  border-radius: var(--radius-lg);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 23px;
  color: var(--ink-soft);
}
.ranking-explica strong { font-family: var(--font-sans); color: var(--ink); }
.ranking-row--uni { grid-template-columns: 36px minmax(0, 1fr) auto 110px auto; }
.ranking-row--uni .ranking-name { display: flex; align-items: center; gap: 10px; }
.ranking-uni-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ranking-uni-n { font-size: 13px; color: var(--ink-muted); white-space: nowrap; }
.ranking-bar { height: 8px; border-radius: var(--radius-full); background: var(--surface-sunk); overflow: hidden; }
.ranking-bar i { display: block; height: 100%; border-radius: inherit; background: var(--line-strong); }
.ranking-row.is-me .ranking-bar i { background: var(--accent); }

.ranking-how {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding: var(--space-5);
  background: var(--surface-sunk);
  border-radius: var(--radius-lg);
}
.ranking-how p { font-family: var(--font-serif); font-size: 15px; line-height: 23px; color: var(--ink-soft); }

@media (max-width: 560px) {
  /* En celular la sigla baja bajo el nombre y la barra de universidades se oculta */
  .ranking-row { grid-template-columns: 30px minmax(0, 1fr) auto auto; column-gap: var(--space-2); row-gap: 2px; padding: var(--space-2) var(--space-3); }
  .ranking-row .mn-uni { grid-column: 2; grid-row: 2; justify-self: start; }
  .ranking-row .ranking-pos { grid-row: 1 / span 2; }
  .ranking-row .ranking-pts, .ranking-row .ranking-cambio { grid-row: 1 / span 2; }
  .ranking-list--mini .ranking-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .ranking-row--uni { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .ranking-row--uni .ranking-name { flex-direction: column; align-items: flex-start; gap: 4px; white-space: normal; }
  .ranking-row--uni .mn-uni { grid-row: auto; grid-column: auto; }
  .ranking-row--uni .ranking-uni-n { grid-column: 2; grid-row: 2; }
  .ranking-row--uni .ranking-bar { display: none; }
  .ranking-row--uni .ranking-pts { grid-column: 3; }
  .podio .ranking-pos { width: 40px; height: 40px; font-size: 19px; }
  .podio__block b { font-size: 22px; }
}

/* Utilidades */
.hidden { display: none !important; }
/* Solo para lectores de pantalla: no se ve, pero se lee */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mn-input.shake { animation: shake 0.4s; }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}

@media (max-width: 480px) {
  .container { padding: 28px var(--space-4) 56px; }
  .site-header-inner { padding: 10px var(--space-4); }
  .mn-card { padding: var(--space-4); gap: var(--space-3); }
  .mn-clue { padding: var(--space-4); }
  .mn-mode__opt { padding: var(--space-3); gap: 10px; }
  .mn-mode__opt[aria-pressed="true"] { padding: calc(var(--space-3) - .5px); }
  .mn-score b { font-size: 76px; line-height: 70px; }
}
@media (max-width: 480px) {
  .brand-sub { display: none; }
  .site-header .mn-fichas { --f: 22px; }
  .header-progress { margin-left: auto; }
}
@media (max-width: 360px) {
  .mn-chip { padding: 0 8px; }
}

/* =====================================================
   INTERACCIÓN Y MOVIMIENTO
   Una sola regla para todo lo que se aprieta: con el mouse encima la ficha sube y su
   canto crece; al apretar baja; al soltar vuelve. Solo en equipos con mouse (hover: hover),
   para que en el celular nada quede «levantado» después de tocarlo. Lo elegido, lo
   deshabilitado y los botones fantasma no suben.
===================================================== */
@media (hover: hover) {
  .mn-btn:not(.mn-btn--ghost):not(:disabled):hover { --relieve: 0 6px 0 var(--ink); transform: translateY(-2px); }
  .mn-btn:not(.mn-btn--ghost):not(:disabled):active { --relieve: 0 0 0 var(--ink); transform: translateY(4px); }
  .daily .mn-btn:not(:disabled):hover { --relieve: 0 6px 0 rgba(14, 15, 19, .45); }
  .daily .mn-btn:not(:disabled):active { --relieve: 0 0 0 transparent; }
  .mn-mode__opt[aria-pressed="false"]:hover { --relieve: 0 6px 0 var(--ink); transform: translateY(-2px); }
  .mn-choice:not(.selected):hover { --relieve: 0 5px 0 var(--ink); transform: translateY(-2px); }
  .theme-toggle:hover { --relieve: 0 5px 0 var(--ink); transform: translateY(-2px); }
  .theme-toggle:active { --relieve: 0 0 0 var(--ink); transform: translateY(3px); }
}
.mn-mode__opt[aria-pressed="false"]:active { --relieve: 0 1px 0 var(--ink); transform: translateY(3px); }
.mn-choice:not(.selected):active { --relieve: 0 0 0 var(--ink); transform: translateY(3px); }

/* Al responder, la letra del rosco se voltea como una ficha y aparece con su color */
.letter-node.voltea { animation: voltear .32s var(--ease); }
@keyframes voltear {
  0% { transform: scale(1.16) rotateY(0); }
  50% { transform: scale(1.08) rotateY(90deg); }
  100% { transform: scale(1) rotateY(0); }
}

/* Desafío: la pista destella un instante en verde o rojo (no frena el juego) */
.mn-clue.destello-ok { animation: destelloOk .35s var(--ease); }
.mn-clue.destello-mal { animation: destelloMal .35s var(--ease); }
@keyframes destelloOk { from { box-shadow: var(--shadow-sheet), 0 0 0 3px var(--correct); } to { box-shadow: var(--shadow-sheet), 0 0 0 3px transparent; } }
@keyframes destelloMal { from { box-shadow: var(--shadow-sheet), 0 0 0 3px var(--wrong); } to { box-shadow: var(--shadow-sheet), 0 0 0 3px transparent; } }

/* La letra grande del centro entra desde abajo: se nota que el juego avanzó */
.rosco-center-letter.entra { animation: entraLetra .2s var(--ease); }
@keyframes entraLetra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Las confirmaciones (registrado, enviado, copiado) aparecen con un fundido, no de golpe */
.register-done, .feedback-thanks.show, .report-done, .share-card__done { animation: fadeIn .25s var(--ease); }

/* =====================================================
   AJUSTES
   Filas sobre una tarjeta plana (solo informa); las opciones son fichas mn-choice
   y la elegida queda apretada, igual que en el feedback.
===================================================== */
#view-settings { max-width: 640px; margin: 0 auto; }
.settings-group { margin-bottom: 40px; }
.settings-group h2 { font: 700 22px/28px var(--font-sans); letter-spacing: -0.02em; color: var(--ink); margin-bottom: var(--space-3); }
.settings-group__sub { font-size: 14px; line-height: 20px; color: var(--ink-muted); margin: -4px 0 var(--space-4); max-width: 65ch; }
.settings-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.settings-card--pad { padding: var(--space-5); overflow: visible; }
.settings-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); padding: var(--space-4) var(--space-5) var(--space-5); }
.settings-row + .settings-row { border-top: 1px solid var(--line); }
.settings-row__text { flex: 1 1 220px; min-width: 0; }
.settings-row__title { display: block; font: 600 16px/22px var(--font-sans); color: var(--ink); }
.settings-row__desc { display: block; font: 500 13px/18px var(--font-sans); color: var(--ink-muted); margin-top: 2px; max-width: 46ch; }
.settings-choices { flex: none; }
/* Vista previa del tamaño del texto: misma letra que la definición del juego */
.settings-preview { flex: 1 1 100%; font: 400 18px/1.5 var(--font-serif); color: var(--ink-soft); background: var(--surface-sunk); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); text-wrap: pretty; }
.texto-grande .settings-preview { font-size: 23px; }
.settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin-top: var(--space-4); }
.register-fields .settings-actions { margin-top: 0; }
.settings-card--pad .field__error { margin-top: var(--space-3); }
.settings-done { margin-top: var(--space-3); font: 600 14px/20px var(--font-sans); color: var(--correct); animation: fadeIn .25s var(--ease); }
.settings-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  min-height: 52px;
  padding: 0 var(--space-5);
  background: none;
  border: none;
  text-align: left;
  font: 600 15px/20px var(--font-sans);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.settings-link + .settings-link { border-top: 1px solid var(--line); }
.settings-link svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--ink-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s, stroke .2s; }
.settings-link:focus-visible { box-shadow: none; outline: 2px solid var(--accent); outline-offset: -4px; }
@media (hover: hover) {
  .settings-link:not(.settings-link--static):hover { background: var(--surface-sunk); }
  .settings-link:not(.settings-link--static):hover svg { transform: translateX(3px); stroke: var(--ink); }
}
.settings-link--static { cursor: default; font-weight: 500; color: var(--ink-soft); }
.settings-link--static span { font: 600 14px/20px var(--font-sans); color: var(--ink-muted); }

/* Texto grande (Ajustes): lo que más se lee, la definición, la respuesta y los tips */
.texto-grande .mn-clue__text { font-size: clamp(21px, 5.6vw, 24px); }
.texto-grande .mn-clue__answer { font-size: 30px; line-height: 36px; }
.texto-grande .mn-clue__tip { font-size: 17px; line-height: 26px; }
.texto-grande .review-answer { font-size: 19px; line-height: 24px; }
.texto-grande .review-pista { font-size: 16px; line-height: 24px; }

/* Movimiento reducido (Ajustes): lo mismo que pide el sistema con prefers-reduced-motion */
.menos-movimiento *, .menos-movimiento *::before, .menos-movimiento *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
