 :root {
  color-scheme: dark;
  --bg: #090814;
  --bg-soft: #111024;
  --card: rgba(255, 255, 255, 0.075);
  --card-strong: rgba(255, 255, 255, 0.12);
  --text: #f8f4ff;
  --muted: #c9bfdc;
  --soft: #8f84a7;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #b981ff;
  --accent-2: #7af7d4;
  --accent-3: #ffcf7a;
  --danger: #ff7d9a;
  --ok: #7af7d4;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 28px;
  --radius-small: 18px;
  --max: 1160px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(185, 129, 255, 0.24), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(122, 247, 212, 0.16), transparent 28rem),
    linear-gradient(145deg, #080713 0%, #151128 48%, #080713 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent 75%);
}

a { color: inherit; text-decoration: none; }

button, input {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -6rem;
  z-index: 20;
  padding: .8rem 1rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
}

.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: max(0.85rem, env(safe-area-inset-top)) 1rem 0.85rem;
  backdrop-filter: blur(22px);
  background: rgba(9, 8, 20, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  width: min(var(--max), calc(100% - 1rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: .75rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0d0920;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
}

.nav-links a {
  padding: .64rem .9rem;
  color: var(--muted);
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: rgba(255,255,255,0.08);
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .65rem .9rem;
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.section-pad {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 5.5rem 0;
}

.hero {
  padding-top: 6.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, .62fr);
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 .85rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .75rem;
  font-weight: 800;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 780px;
  margin-bottom: 1.25rem;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: .88;
  letter-spacing: -0.085em;
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: .96;
  letter-spacing: -0.065em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.035em;
  margin-bottom: .7rem;
}

.hero-text,
.section-heading p,
.card-kicker + h2 + p,
.game-card p,
.print-card p,
.privacy-grid p,
.daily-panel p,
.coming-box p,
.principles p {
  color: var(--muted);
  line-height: 1.68;
}

.hero-text {
  max-width: 650px;
  font-size: 1.1rem;
}

.hero-actions,
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .85rem 1.15rem;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

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

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0d0920;
  font-weight: 850;
}

.button.secondary {
  background: rgba(255,255,255,0.075);
  color: var(--text);
}

.button.compact {
  min-height: 2.45rem;
  padding: .58rem .85rem;
  font-size: .92rem;
}

.profile-card,
.daily-panel,
.game-card,
.game-panel,
.print-card,
.privacy-grid,
.principles article {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,0.035));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-card {
  padding: 1.5rem;
  transform: rotate(1deg);
}

.avatar {
  display: grid;
  place-items: center;
  width: 7rem;
  height: 7rem;
  margin-bottom: 1.2rem;
  border-radius: 2rem;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.75), transparent 16%),
    linear-gradient(135deg, var(--accent), #5d4dff 48%, var(--accent-2));
  color: #070512;
  font-size: 2rem;
  font-weight: 950;
}

.card-kicker {
  color: var(--accent-3);
  font-weight: 750;
  margin-bottom: .3rem;
}

.profile-card h2 {
  font-size: 2rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.2rem;
}

.pill-row span {
  padding: .5rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  font-size: .9rem;
}

.section-heading {
  max-width: 850px;
  margin-bottom: 1.5rem;
}

.inline-heading {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.principles,
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.principles article,
.game-card {
  padding: 1.25rem;
}

.number {
  display: block;
  margin-bottom: 1.25rem;
  color: var(--accent-2);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.game-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.active-card {
  border-color: rgba(122, 247, 212, 0.55);
  background: linear-gradient(180deg, rgba(122, 247, 212, .13), rgba(255,255,255,0.045));
}

.game-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.1rem;
  border-radius: 1rem;
  background: rgba(255,255,255,.08);
  color: var(--accent-2);
}

.game-card .button {
  margin-top: auto;
}

.play-area {
  margin-top: 1rem;
}

.game-panel {
  padding: 1.25rem;
}

.hidden { display: none !important; }

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-head h2 {
  font-size: clamp(1.9rem, 3.5vw, 3.2rem);
}

.wordsearch-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: .36rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(0,0,0,.18);
}

.letter-cell,
.sudoku-cell {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .75rem;
  background: rgba(255,255,255,.07);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.letter-cell.selected {
  border-color: var(--accent-3);
  background: rgba(255, 207, 122, .22);
}

.letter-cell.found {
  border-color: rgba(122, 247, 212, .5);
  background: rgba(122, 247, 212, .18);
  color: #dbfff5;
}

.word-list-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.055);
  padding: 1rem;
}

.word-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: .5rem;
}

.word-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem .7rem;
  border-radius: .9rem;
  background: rgba(255,255,255,.055);
  color: var(--muted);
}

.word-list li.found {
  color: var(--ok);
  text-decoration: line-through;
}

.hint-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.daily-panel,
.print-card,
.privacy-grid {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.daily-date {
  display: inline-flex;
  margin-bottom: .8rem;
  color: var(--accent-3);
  font-weight: 850;
}

.progress-box {
  min-width: 150px;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(0,0,0,.18);
  text-align: center;
}

.progress-box strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -0.06em;
}

.progress-box span {
  color: var(--muted);
  font-size: .88rem;
}

.sudoku-wrap {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.sudoku-grid {
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: .24rem;
  padding: .7rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.18);
}

.sudoku-cell {
  border-radius: .42rem;
  text-align: center;
  font-size: clamp(.9rem, 3vw, 1.15rem);
}

.sudoku-cell.fixed {
  background: rgba(185, 129, 255, .18);
  color: var(--accent-2);
}

.sudoku-cell.error {
  border-color: var(--danger);
  background: rgba(255, 125, 154, .16);
}

.sudoku-cell:nth-child(3n) {
  border-right-color: rgba(255,255,255,.36);
}

.sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-cell:nth-child(n+46):nth-child(-n+54) {
  border-bottom-color: rgba(255,255,255,.36);
}

.coming-box {
  padding: 2rem;
  border-radius: 24px;
  background: rgba(255,255,255,.055);
}

.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--soft);
  border-top: 1px solid var(--line);
}

.site-footer a { color: var(--muted); }

@media (max-width: 850px) {
  .menu-button { display: inline-flex; }

  .nav-links {
    position: absolute;
    top: calc(100% + .7rem);
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border-radius: 22px;
    padding: .6rem;
    background: rgba(15, 13, 31, .96);
  }

  .nav-links.open { display: flex; }

  .nav-links a { padding: .85rem 1rem; }

  .hero-grid,
  .principles,
  .game-grid,
  .wordsearch-layout,
  .privacy-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 4.5rem;
  }

  .section-pad {
    padding: 4rem 0;
  }

  .profile-card {
    transform: none;
  }

  .panel-head,
  .inline-heading,
  .daily-panel,
  .print-card {
    align-items: stretch;
    flex-direction: column;
  }

  .word-grid {
    gap: .22rem;
    padding: .45rem;
  }

  .letter-cell {
    border-radius: .45rem;
    font-size: .85rem;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .site-header,
  .hero,
  .manifesto,
  .game-grid,
  #sudokuPanel,
  #comingPanel,
  #imprimir,
  #privacidad,
  .site-footer,
  .panel-actions,
  .button {
    display: none !important;
  }

  .section-pad {
    width: 100%;
    padding: 0;
  }

  .game-panel,
  .word-list-card,
  .word-grid {
    box-shadow: none;
    background: #fff;
    border-color: #111;
  }

  .wordsearch-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
  }

  .letter-cell {
    color: #111;
    background: #fff;
    border-color: #111;
  }
}


.stats-strip {
  width: min(var(--max), calc(100% - 2rem));
  margin: -1.75rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
}

.stat-item {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.065);
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}

.stat-item strong {
  display: block;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  letter-spacing: -0.075em;
  line-height: 1;
}

.stat-item span {
  display: block;
  margin-top: .35rem;
  color: var(--muted);
  font-size: .92rem;
}

.four-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chain-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}

.chain-board {
  display: grid;
  gap: .75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(0,0,0,.18);
}

.chain-row {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: .65rem;
  align-items: center;
}

.chain-badge {
  display: grid;
  place-items: center;
  height: 3rem;
  border-radius: 1rem;
  background: rgba(122, 247, 212, .13);
  color: var(--accent-2);
  font-weight: 950;
}

.chain-input {
  min-height: 3rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: .7rem .9rem;
  background: rgba(255,255,255,.075);
  color: var(--text);
  outline: none;
}

.chain-input:focus {
  border-color: rgba(122,247,212,.55);
}

.chain-input.correct {
  border-color: rgba(122,247,212,.6);
  background: rgba(122,247,212,.12);
}

.chain-input.error {
  border-color: var(--danger);
  background: rgba(255,125,154,.12);
}

.chain-message {
  margin-top: 1rem;
  color: var(--accent-3);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.roadmap-grid article {
  min-height: 220px;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,0.035));
}

.roadmap-grid span {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--accent-2);
  font-weight: 950;
  letter-spacing: -0.05em;
}

.roadmap-grid p {
  color: var(--muted);
  line-height: 1.62;
}

@media (max-width: 1050px) {
  .four-grid,
  .roadmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: -1rem;
  }

  .chain-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .four-grid,
  .roadmap-grid,
  .stats-strip {
    grid-template-columns: 1fr;
  }
}


.six-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.classic-word-layout,
.crypto-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}

.classic-word-board {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(0,0,0,.18);
}

.classic-clue {
  margin: 0 0 1rem;
  color: var(--accent-3);
  font-weight: 800;
  line-height: 1.55;
}

.big-word,
.scrambled-word {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 1rem 0;
}

.big-word span,
.scrambled-word span {
  min-width: 2.35rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: rgba(255,255,255,.075);
  font-size: 1.25rem;
  font-weight: 950;
}

.scrambled-word span {
  color: var(--accent-2);
  transform: rotate(-2deg);
}

.letter-bank {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1rem;
}

.letter-button {
  min-width: 2.25rem;
  min-height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: rgba(255,255,255,.075);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.letter-button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.word-answer,
.crypto-answer {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: .85rem 1rem;
  background: rgba(255,255,255,.075);
  color: var(--text);
  outline: none;
}

.word-answer:focus,
.crypto-answer:focus {
  border-color: rgba(122,247,212,.55);
}

.crypto-answer {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.5;
}

.attempts-meter {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  margin: .75rem 0 1rem;
  border-radius: 1.4rem;
  background: rgba(122,247,212,.13);
  color: var(--accent-2);
  font-size: 2.3rem;
  font-weight: 950;
}

.crypto-code {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .8rem;
  margin: 1rem 0;
  line-height: 1.8;
}

.crypto-word {
  display: inline-flex;
  gap: .25rem;
}

.crypto-letter {
  min-width: 1.9rem;
  min-height: 2.15rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: rgba(255,255,255,.065);
  color: var(--accent-2);
  font-weight: 900;
}

@media (max-width: 1050px) {
  .six-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .classic-word-layout,
  .crypto-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .six-grid {
    grid-template-columns: 1fr;
  }

  .big-word span,
  .scrambled-word span {
    min-width: 2rem;
    height: 2.35rem;
    font-size: 1rem;
  }
}


/* Vista dedicada de juego: evita que en móvil el tablero compita con la portada/listado. */
.game-view-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: 0 0 1rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.065);
}

.game-view-toolbar span {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 800;
}

body.game-focus {
  overflow-x: hidden;
}

body.game-focus .site-header,
body.game-focus .hero,
body.game-focus .stats-strip,
body.game-focus .manifesto,
body.game-focus #diario,
body.game-focus #imprimir,
body.game-focus #privacidad,
body.game-focus .site-footer,
body.game-focus .roadmap-grid,
body.game-focus #roadmap-title,
body.game-focus [aria-labelledby="roadmap-title"],
body.game-focus #juegos > .section-heading,
body.game-focus #juegos > .game-grid {
  display: none !important;
}

body.game-focus #juegos {
  width: min(var(--max), calc(100% - 1rem));
  min-height: 100svh;
  padding: max(1rem, env(safe-area-inset-top)) 0 max(1rem, env(safe-area-inset-bottom));
}

body.game-focus .play-area {
  margin-top: 0;
}

body.game-focus .game-view-toolbar {
  display: flex;
  position: sticky;
  top: max(.5rem, env(safe-area-inset-top));
  z-index: 30;
  backdrop-filter: blur(18px);
}

body.game-focus .game-panel {
  box-shadow: none;
}

/* Ajustes móviles del Sudoku: números centrados y casillas más legibles. */
.sudoku-cell {
  min-width: 0;
  min-height: 0;
  padding: 0;
  line-height: 1;
  display: grid;
  place-items: center;
  appearance: none;
  -webkit-appearance: none;
}

.sudoku-cell:disabled {
  opacity: 1;
  -webkit-text-fill-color: var(--accent-2);
}

@media (max-width: 850px) {
  body.game-focus .game-panel {
    padding: .75rem;
    border-radius: 22px;
  }

  body.game-focus .panel-head {
    gap: .75rem;
    margin-bottom: .75rem;
  }

  body.game-focus .panel-head h2 {
    font-size: clamp(1.7rem, 9vw, 2.6rem);
    margin-bottom: .25rem;
  }

  body.game-focus .panel-actions {
    margin-top: .5rem;
  }

  body.game-focus .button.compact {
    min-height: 2.7rem;
  }

  .sudoku-wrap {
    justify-items: center;
  }

  .sudoku-grid {
    width: min(100%, calc(100svw - 2.5rem));
    gap: .16rem;
    padding: .45rem;
    border-radius: 18px;
  }

  .sudoku-cell {
    border-radius: .34rem;
    font-size: clamp(.82rem, 4.8vw, 1.15rem);
    font-weight: 900;
  }

  .wordsearch-layout,
  .classic-word-layout,
  .crypto-layout {
    gap: .75rem;
  }

  body.game-focus .word-grid {
    width: 100%;
    gap: .16rem;
    padding: .35rem;
    border-radius: 18px;
  }

  body.game-focus .letter-cell {
    font-size: clamp(.62rem, 3.2vw, .9rem);
    border-radius: .36rem;
  }
}

@media (max-width: 390px) {
  body.game-focus #juegos {
    width: calc(100% - .5rem);
  }

  body.game-focus .game-panel {
    padding: .5rem;
  }

  .sudoku-grid {
    width: calc(100svw - 1.25rem);
    gap: .1rem;
    padding: .3rem;
  }

  .sudoku-cell {
    font-size: clamp(.72rem, 4.6vw, 1rem);
    border-radius: .24rem;
  }

  body.game-focus .panel-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}


.game-help-box {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(122, 247, 212, .24);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(122, 247, 212, .105), rgba(185, 129, 255, .07)),
    rgba(255,255,255,.045);
}

.game-help-box h3 {
  margin-bottom: .65rem;
  color: var(--text);
}

.game-help-box ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.65;
}

.game-help-box li + li {
  margin-top: .25rem;
}

.game-help-box p {
  margin: .75rem 0 0;
  color: var(--accent-3);
  line-height: 1.55;
}

@media (max-width: 850px) {
  .game-help-box {
    padding: .85rem;
    border-radius: 18px;
  }

  .game-help-box ol {
    line-height: 1.5;
  }

  .game-help-box p {
    font-size: .94rem;
  }
}

@media print {
  .game-help-box {
    display: none !important;
  }
}


/* V6: palabras objetivo siempre en una sola línea. */
.big-word,
.scrambled-word,
.single-line-word {
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding-bottom: .25rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.big-word span,
.scrambled-word span,
.single-line-word span {
  flex: 0 0 auto;
}

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

.choice-button,
.syllable-button {
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: .75rem .85rem;
  background: rgba(255,255,255,.075);
  color: var(--text);
  cursor: pointer;
  font-weight: 850;
  text-align: center;
}

.choice-button.correct,
.syllable-button.correct {
  border-color: rgba(122,247,212,.65);
  background: rgba(122,247,212,.14);
}

.choice-button.error {
  border-color: var(--danger);
  background: rgba(255,125,154,.14);
}

.syllable-button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.selected-syllables {
  min-height: 3.4rem;
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 1rem 0;
  padding: .65rem;
  border: 1px dashed rgba(122,247,212,.45);
  border-radius: 1rem;
  background: rgba(122,247,212,.08);
}

.selected-syllables span {
  min-width: auto;
  height: auto;
  padding: .55rem .7rem;
  border-radius: .8rem;
  background: rgba(255,255,255,.075);
  font-weight: 950;
}

.nine-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1050px) {
  .nine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .nine-grid,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .big-word,
  .scrambled-word {
    gap: .32rem;
  }
}


.games-grid-expanded {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ladder-board {
  display: grid;
  gap: .55rem;
  margin: 1rem 0;
}

.ladder-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: .65rem;
  align-items: center;
}

.ladder-label {
  color: var(--accent-2);
  font-weight: 900;
}

.ladder-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: .75rem .85rem;
  background: rgba(255,255,255,.075);
  color: var(--text);
  outline: none;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .08em;
}

.ladder-input.fixed {
  border-color: rgba(122,247,212,.4);
  background: rgba(122,247,212,.1);
  color: var(--accent-2);
}

.ladder-input.error,
.word-answer.error {
  border-color: var(--danger);
  background: rgba(255,125,154,.12);
}

.ladder-input.correct,
.word-answer.correct {
  border-color: rgba(122,247,212,.65);
  background: rgba(122,247,212,.12);
}

.missing-vowels {
  min-height: 3.4rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 1rem 0;
  padding: .65rem;
  border: 1px dashed rgba(122,247,212,.45);
  border-radius: 1rem;
  background: rgba(122,247,212,.08);
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: .14em;
}

.proverb-line,
.riddle-line {
  font-size: 1.15rem;
  color: var(--text);
}

@media (max-width: 1200px) {
  .games-grid-expanded {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .games-grid-expanded {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ladder-row {
    grid-template-columns: 4.5rem 1fr;
  }
}

@media (max-width: 520px) {
  .games-grid-expanded {
    grid-template-columns: 1fr;
  }

  .ladder-row {
    grid-template-columns: 1fr;
    gap: .3rem;
  }
}


.mini-example {
  display: flex;
  flex-wrap: nowrap;
  gap: .4rem;
  margin-top: .9rem;
  overflow-x: auto;
  padding-bottom: .2rem;
}

.mini-example span {
  flex: 0 0 auto;
  padding: .45rem .6rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: rgba(122,247,212,.1);
  color: var(--accent-2);
  font-weight: 950;
}

@media (max-width: 520px) {
  .mini-example {
    font-size: .88rem;
  }
}


.crypto-help-list {
  display: grid;
  gap: .45rem;
  margin-top: .85rem;
}

.crypto-help-item {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .48rem .6rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: rgba(255,255,255,.055);
  color: var(--muted);
  font-weight: 850;
}

.crypto-help-item strong {
  color: var(--accent-2);
}

.choice-button.explained {
  border-color: rgba(122,247,212,.65);
}


.hive-board {
  width: min(100%, 360px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
  margin: 0 auto 1rem;
}

.hive-cell {
  min-height: 4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: rgba(255,255,255,.075);
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 950;
}

.hive-cell.center {
  border-color: rgba(122,247,212,.7);
  background: rgba(122,247,212,.15);
  color: var(--accent-2);
}

.category-grid {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, minmax(0, 1fr));
  gap: .45rem;
  overflow-x: auto;
}

.category-cell {
  min-width: 8rem;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: .85rem;
  padding: .6rem;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-weight: 800;
}

.category-cell.header {
  color: var(--accent-2);
  background: rgba(122,247,212,.1);
}

.category-cell input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  text-transform: uppercase;
}

.phrase-mask {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .65rem;
  margin: 1rem 0;
}

.phrase-word {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: .25rem;
}

.phrase-letter {
  width: 1.85rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: rgba(255,255,255,.075);
  font-weight: 950;
}

.waffle-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .28rem;
  width: min(100%, 420px);
}

.waffle-cell {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: rgba(255,255,255,.075);
  color: var(--text);
  text-align: center;
  font-weight: 950;
  text-transform: uppercase;
}

.waffle-cell.blocked {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
}

.multiword-board {
  display: grid;
  gap: .85rem;
}

.multiword-card {
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: .9rem;
  background: rgba(255,255,255,.055);
}

.multiword-card label {
  display: block;
  margin-bottom: .45rem;
  color: var(--accent-2);
  font-weight: 900;
}

.unlock-pattern {
  min-height: 3.4rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 1rem 0;
  padding: .65rem;
  border: 1px dashed rgba(122,247,212,.45);
  border-radius: 1rem;
  background: rgba(122,247,212,.08);
}

.unlock-pattern span {
  min-width: 2.15rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: rgba(255,255,255,.075);
  font-weight: 950;
}

@media (max-width: 650px) {
  .category-grid {
    grid-template-columns: 7rem repeat(3, 7rem);
  }

  .hive-cell {
    min-height: 3.2rem;
  }

  .phrase-letter {
    width: 1.55rem;
    height: 2rem;
  }
}
