/* 126: guía pública debajo de cada juego y modo invitado (docs/prompts/126a_modo_invitado_base.md). */

.game-guide {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 40px 80px;
  box-sizing: border-box;
  color: var(--text, #e8ecff);
  font-size: var(--type-body, 20px);
  line-height: 1.55;
}

.game-guide h2 {
  font-family: "Orbitron", sans-serif;
  font-size: var(--type-title, 34px);
  margin: 0 0 16px;
}

.game-guide h3 {
  font-family: "Orbitron", sans-serif;
  font-size: var(--type-meta, 24px);
  margin: 28px 0 8px;
  color: var(--cyan, #00f0ff);
}

.game-guide p,
.game-guide li {
  color: var(--text-muted, #b9c0e0);
}

.game-guide a {
  color: var(--cyan, #00f0ff);
}

/* Mientras corre la partida la guía no se ve (y no se puede scrollear sin querer). */
html.guide-playing .game-guide,
html.is-preview .game-guide,
.game-shell[data-play="on"] .game-guide,
html.guide-playing .game-footer,
html.is-preview .game-footer,
.game-shell[data-play="on"] .game-footer {
  display: none;
}

/* 131a: el pie de los juegos va debajo de la guía, con el mismo ancho, y como la guía no se ve mientras jugás. */
.game-footer {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 40px 28px;
  box-sizing: border-box;
  justify-content: center;
}

/* En el celular (menú, sin partida) el stage es una columna flex: con la guía el contenido pasa el alto
   de la pantalla, así que nada se achica (sin esto el main quedaba en 0 de alto y el header se pisaba).
   El header, el juego y la guía conservan su alto y la guía queda abajo, scrolleando. */
.game-shell[data-layout="mobile"]:not([data-play="on"]) .game-stage-body > * {
  flex-shrink: 0;
}

.guest-banner {
  margin: 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #c084fc;
  background: rgba(5, 6, 15, 0.82);
  color: #e7d4ff;
  font-weight: 700;
  font-size: var(--type-small, 16px);
  white-space: nowrap;
}

.guest-cta {
  margin-top: 16px;
  text-align: center;
}

.guest-cta p {
  margin: 0 0 10px;
}

.ls-guest-note {
  margin: 14px 0 0;
  text-align: center;
}

.game-shell[data-layout="mobile"] .guest-banner {
  white-space: normal;
  text-align: center;
}

/* 127d: el header del juego se pinta ya armado. El cartel, "Crear cuenta", "Ver juegos" y el botón de sonido
   vienen en el HTML; el script del <head> marca html.is-guest antes del primer pintado. Sin JS (buscadores)
   no hay is-guest: se ve el header de siempre. */
html:not(.is-guest) [data-guest-only],
html.is-guest [data-account-only],
html.is-guest #auth-badge,
html.is-guest #account-loading {
  display: none !important;
}

/* 128a: botón "Guía" del menú (solo en el menú, nunca jugando) y partes plegables de la guía.
   Cada parte es un <details class="guide-part" open> con el <h3> dentro del <summary>: el texto sigue en el HTML.
   En PC las partes quedan abiertas y se ven igual que antes (el summary no se puede tocar). En el celular
   arrancan plegadas (script inline al final de la guía) y el summary es una fila de 44 px con +/−. */
.guide-jump {
  margin: 12px 0 0;
  text-align: center;
}

.guide-jump .btn {
  min-height: 40px;
  padding: 6px 22px;
  font-size: var(--type-small, 16px);
  text-decoration: none;
}

.game-shell[data-layout="mobile"] .overlay-panel .guide-jump {
  margin: 8px 0 0;
}

.game-shell[data-layout="mobile"] .overlay-panel .guide-jump .btn {
  min-height: 40px;
  padding: 6px 22px;
  font-size: 15px;
}

html.is-preview .guide-jump {
  display: none;
}

.game-guide details.guide-part > summary {
  display: block;
  list-style: none;
  cursor: default;
  pointer-events: none;
}

.game-guide details.guide-part > summary::-webkit-details-marker {
  display: none;
}

.game-guide details.guide-part > summary::marker {
  content: "";
}

.game-guide details.guide-part ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.game-guide details.guide-part li {
  margin: 0 0 6px;
}

.game-shell[data-layout="mobile"] .game-guide details.guide-part {
  border-top: 1px solid rgba(0, 240, 255, 0.22);
}

.game-shell[data-layout="mobile"] .game-guide details.guide-part:last-of-type {
  border-bottom: 1px solid rgba(0, 240, 255, 0.22);
  margin-bottom: 16px;
}

.game-shell[data-layout="mobile"] .game-guide details.guide-part > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 6px 0;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.game-shell[data-layout="mobile"] .game-guide details.guide-part > summary h3 {
  margin: 0;
}

.game-shell[data-layout="mobile"] .game-guide details.guide-part > summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 1em;
  text-align: center;
  font-family: "Orbitron", sans-serif;
  font-size: var(--type-meta, 24px);
  line-height: 1;
  color: var(--cyan, #00f0ff);
}

.game-shell[data-layout="mobile"] .game-guide details.guide-part[open] > summary::after {
  content: "−";
}

.game-shell[data-layout="mobile"] .game-guide details.guide-part > summary:focus-visible {
  outline: 2px solid var(--cyan, #00f0ff);
  outline-offset: 2px;
}
