@import url("https://api.fontshare.com/v2/css?f[]=zodiak@400,700,800&display=swap");

:root {
  color-scheme: dark;
  --negro: #090909;
  --panel: #181715;
  --hueso: #eee7dc;
  --suave: #c0b8aa;
  --rojo: #811923;
  --rojo-claro: #d74a50;
  --acido: #c7ec83;
  --metal: #9b978b;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  color: var(--hueso);
  background: var(--negro);
  font-family: "Zodiak", Georgia, serif;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  min-height: 44px;
}

a {
  color: inherit;
  text-underline-offset: 5px;
}

img {
  max-width: 100%;
}

iframe {
  border: 0;
}

p {
  font-size: 1rem;
  line-height: 1.75;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--acido);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px;
  background: #000;
}

.skip-link:focus {
  top: 16px;
}

.contenedor {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0;
}

.seccion {
  margin-bottom: 76px;
}

.etiqueta,
.instruccion,
.boton,
button,
small {
  font-family: "Courier New", monospace;
}

.etiqueta {
  color: var(--acido);
  font-size: .8rem;
  letter-spacing: .12em;
}

.instruccion {
  color: var(--suave);
  font-size: .95rem;
}

.titulo-seccion {
  padding: 18px 22px;
  margin: 0 0 26px;
  border: 1px solid #a87b73;
  border-left: 7px solid var(--rojo-claro);
  border-bottom: 4px double #bb9e8b;
  background: linear-gradient(110deg, #66151c, #200c0e 85%);
  color: var(--hueso);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.035em;
  box-shadow: 5px 5px 0 #000;
}

/* PORTADA */

.portada {
  position: relative;
  min-height: 580px;
  min-height: min(760px, 85svh);
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  background: #000;
}

.portada-montana {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .66;
  z-index: -2;
}

.portada::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #000, transparent 35%),
    linear-gradient(90deg, #0004, #0001, #0004);
  z-index: -1;
}

.portada-contenido {
  width: min(900px, calc(100% - 32px));
  padding: 70px 0 50px;
  text-align: center;
}

.portada h1 {
  margin: 24px 0;
  color: #fff;
  font-size: clamp(3.8rem, 9vw, 8rem);
  line-height: .94;
  font-weight: 800;
  letter-spacing: -.06em;
  text-shadow: 0 4px 12px #000;
}

.portada h1 span {
  font-size: .3em;
  letter-spacing: 0;
}

.tagline {
  font-size: 1.2rem;
  font-style: italic;
  color: #e7ddcb;
  margin-bottom: 28px;
}

.boton {
  display: inline-block;
  padding: 14px 20px;
  text-decoration: none;
  font-size: .875rem;
}

.boton-rojo {
  background: var(--rojo);
  color: #fff1e2;
  border: 3px double #c4a08e;
  padding: 14px 20px;
}

.boton-rojo:hover {
  background: #a5252f;
}

/* ACCESOS */

.accesos {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 18px max(18px, calc((100vw - 1120px) / 2));
  border-block: 4px double var(--metal);
  background: #161513;
}

.accesos a {
  display: block;
  padding: 18px 14px;
  border: 1px solid var(--metal);
  border-bottom: 3px solid #4a463e;
  background: linear-gradient(130deg, #36332d, #151514 70%);
  text-decoration: none;
  box-shadow: 3px 3px #000;
}

.accesos a:hover {
  background: #401017;
  border-color: var(--acido);
}

.accesos span,
.accesos small {
  display: block;
  font: .75rem/1.5 "Courier New", monospace;
}

.accesos span {
  color: var(--acido);
}

.accesos strong {
  display: block;
  margin: 12px 0;
  font-size: 1.25rem;
}

.accesos small {
  color: #c8beae;
}

/* HISTORIAS */

.historias-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 1fr);
  align-items: center;
  gap: 48px;
}

.introduccion {
  color: #d2c8b9;
}

.recorte {
  margin: 26px 0;
  padding: 20px 24px;
  color: #211d18;
  background: #d9d1c0;
  border: 1px solid #a79982;
  border-left: 6px solid #831b24;
  box-shadow: 6px 7px #000;
}

.recorte:nth-of-type(even) {
  transform: rotate(-1deg);
}

.recorte p {
  font-family: "Courier New", monospace;
}

.recorte p:last-child {
  margin-bottom: 0;
}

.recorte-meta {
  border-bottom: 1px dashed #95836d;
  padding-bottom: 10px;
  color: #71141d;
  font-size: .875rem;
  font-weight: bold;
}

/* REPRODUCTOR */

.reproductor {
  width: min(100%, 340px);
  justify-self: center;
  padding: 18px;
  border: 4px ridge #a4a08f;
  border-radius: 14px;
  background: linear-gradient(125deg, #8a877a, #33382b 30%, #171a14);
  box-shadow: 10px 12px #000;
}

.reproductor-marca {
  margin: 3px 0 14px;
  text-align: center;
  font: bold .75rem "Courier New", monospace;
  letter-spacing: .18em;
  color: #e9dfc8;
}

.reproductor-pantalla {
  height: 340px;
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 5px inset #575b47;
  border-radius: 3px;
  background: #0c1209;
  color: #d3e8aa;
  font-family: "Courier New", monospace;
}

.pantalla-cabecera {
  flex-shrink: 0;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #4b6030;
  font-size: .75rem;
  color: var(--acido);
}

.dev-vista {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.pantalla-intro,
.pantalla-etiqueta {
  margin: 4px 0 14px;
  color: #c5d5aa;
  font: .875rem/1.5 "Courier New", monospace;
}

.opcion-pantalla {
  display: block;
  width: 100%;
  padding: 13px 8px;
  margin-bottom: 10px;
  text-align: left;
  color: #d9ecb6;
  background: #192111;
  border: 1px solid #546c32;
  font-size: .875rem;
}

.opcion-pantalla span {
  display: block;
  margin-top: 5px;
  color: #a8b38d;
  font-size: .75rem;
}

.opcion-pantalla:hover,
.track-button:hover {
  background: #334722;
}

.enlace-pantalla {
  display: block;
  padding: 10px 0;
  font-size: .75rem;
  line-height: 1.6;
  color: #d9ecb6;
}

.track-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.track-button {
  width: 100%;
  padding: 12px 4px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #334125;
  color: #d9ecb6;
  background: transparent;
  font-size: .875rem;
  line-height: 1.5;
}

.track-button small {
  display: block;
  color: #a9b39a;
  font-size: .75rem;
}

.track-button:disabled {
  color: #929786;
  cursor: default;
}

#music-player {
  width: 100%;
  min-height: 150px;
  background: #000;
}

#gallery-image {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: contain;
}

.galeria-controles,
.reproductor-controles {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.reproductor-controles button,
.galeria-controles button {
  padding: 10px 14px;
  color: #e5e5c9;
  background: #30352b;
  border: 2px outset #797c65;
  font-size: .8rem;
}

/* CHAT */

.chat-marco {
  width: min(650px, 100%);
  margin: 0 auto 76px;
  padding: 14px;
  border: 5px ridge #99968a;
  border-radius: 5px;
  background: #25251f;
  box-shadow: 8px 9px #000;
}

.chat-marco h2 {
  padding: 10px 12px;
  margin: 0 0 12px;
  background: #57121a;
  color: #eee0cc;
  font: bold .875rem/1.5 "Courier New", monospace;
}

.chat-marco iframe {
  display: block;
  width: 100%;
  height: 240px;
  border: 3px inset #676b57;
  background: #111;
}

/* TV Y JUEGO NARRATIVO */

.televisor {
  padding: 22px;
  border: 5px ridge #9b9587;
  border-radius: 18px;
  background: linear-gradient(120deg, #514e44, #22221e 40%, #161713);
  box-shadow: 9px 12px #000;
}

.tv-pantalla {
  position: relative;
  min-height: 340px;
  max-height: 650px;
  overflow: auto;
  border: 9px solid #050604;
  border-radius: 18px;
  background: #0d140a;
}

.tv-apagada {
  min-height: 330px;
  display: grid;
  align-content: center;
  justify-items: center;
  color: #8b907e;
  background: #0c0e0a;
  font-family: "Courier New", monospace;
}

.tv-apagada span {
  font-size: 3rem;
}

.tv-apagada p {
  font-size: .875rem;
  letter-spacing: .15em;
}

#tv-photo {
  width: 100%;
  height: 360px;
  display: block;
  object-fit: contain;
  background: #000;
}

#game-content {
  padding: 24px;
}

#story-text p {
  color: #d9e8c4;
  font: 1rem/1.8 "Courier New", monospace;
}

#story-choices {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

#story-choices button {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #637d43;
  background: #1b2713;
  color: #def2b4;
  text-align: left;
  font-size: 1rem;
  line-height: 1.5;
}

#story-choices button:hover {
  background: #354a23;
}

.tv-controles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 20px;
}

.tv-controles button {
  padding: 12px 16px;
  background: #292c23;
  color: #e8e0c9;
  border: 2px outset #8f8c76;
  font-size: .875rem;
}

.tv-controles button:disabled {
  opacity: .5;
  cursor: default;
}

.tv-controles button[aria-pressed="true"] {
  background: #612027;
}

.tv-controles output {
  padding: 12px;
  border: 2px inset #6d715a;
  background: #0b1107;
  color: var(--acido);
  font: .875rem "Courier New", monospace;
}

.archivo-finales {
  margin-top: 24px;
  border: 1px solid #8d7d65;
  border-top: 4px double #b09b7c;
  padding: 18px 22px;
  background: #181711;
}

.archivo-finales summary {
  cursor: pointer;
  color: #e2d4bb;
  font: .875rem/1.6 "Courier New", monospace;
}

#endings-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0;
  list-style: none;
}

#endings-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font: .875rem/1.5 "Courier New", monospace;
  color: #b5b5a3;
}

#endings-list li.encontrado {
  color: var(--acido);
}

/* LABERINTO */

.maze-container {
  width: min(500px, 100%);
  margin: 28px auto;
  padding: 22px;
  border: 4px ridge #6a7657;
  background: #151a10;
  box-shadow: 8px 9px #000;
}

.maze-status {
  padding: 12px;
  min-height: 68px;
  margin: 0 0 16px;
  border: 1px solid #5c7141;
  background: #0b1007;
  color: var(--acido);
  font: .875rem/1.5 "Courier New", monospace;
}

.maze-board {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 3px;
  padding: 5px;
  background: #030402;
  border: 1px solid #7e8f64;
}

.maze-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  background: #20251b;
  color: #fff;
  font: bold 1.2rem "Courier New", monospace;
}

.maze-wall {
  background: #596245;
  border: 1px solid #798660;
}

.maze-exit {
  background: #345922;
  color: #d8ffbb;
}

.maze-player {
  background: #d4deb1;
  color: #182210;
}

.maze-monster {
  background: #751722;
  color: #fff;
}

.maze-candy {
  color: #f0d58b;
}

.maze-leyenda {
  color: #bac4a6;
  font: .75rem/1.6 "Courier New", monospace;
}

.maze-controls {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin-top: 20px;
}

.maze-controls > div {
  display: flex;
  gap: 7px;
}

.maze-controls button {
  width: 48px;
  min-height: 44px;
  background: #3c4530;
  color: #e7efcd;
  border: 2px outset #86906e;
}

/* ARCANOS */

.tarot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 30px 0;
}

.tarot-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid #39322d;
  background: #000;
  transition: border-color .2s, transform .2s;
}

.tarot-card:hover {
  border-color: #cf9589;
  transform: translateY(-5px);
}

.tarot-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
}

.carta-olvidada {
  text-align: center;
  margin-top: 36px;
}

#lost-card {
  width: 160px;
  height: 230px;
  border: 3px double #9ba57a;
  background: #11150b;
  color: var(--acido);
  font-size: 3rem;
}

#lost-card:hover {
  background: #323d20;
}

/* RADIO */

.radio-refugio {
  padding: 36px;
  border: 7px ridge #95724f;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 43px,
      #08040255 44px,
      transparent 46px
    ),
    linear-gradient(110deg, #503022, #251b14 75%);
  box-shadow: 10px 12px #000;
}

.radio-refugio > h2 {
  margin: 12px 0 22px;
  padding-bottom: 22px;
  border-bottom: 4px double #bf9f77;
  color: #f1d4a5;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
}

.radio-refugio > p {
  color: #e2c4a1;
}

.radio-refugio > .etiqueta {
  color: #d2e3a1;
}

.radio-equipo {
  margin-top: 28px;
  padding: 24px;
  border: 5px ridge #958b73;
  background: #22241b;
  box-shadow: 0 12px 24px #0008;
}

.radio-display {
  padding: 16px;
  margin: 0 0 20px;
  background: #10180b;
  border: 3px inset #777b56;
  color: #e4edb3;
  font: .875rem/1.5 "Courier New", monospace;
  letter-spacing: .08em;
}

.radio-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-buttons button {
  flex: 1;
  padding: 12px;
  border: 2px outset #9b927c;
  background: #484638;
  color: #f2e6ca;
  font-size: .875rem;
}

.radio-buttons button:hover {
  background: #5b342a;
}

#podcast-wrapper {
  margin-top: 20px;
}

#podcast-player {
  width: 100%;
  height: 170px;
  background: #10100d;
}

#podcast-external {
  display: block;
  margin-top: 12px;
  color: #d3e8a6;
  font: .875rem/1.6 "Courier New", monospace;
}

/* MAPAS */

.mapa {
  position: relative;
  width: 100%;
  border: 4px double #9b8e79;
  background: #000;
}

.mapa > img {
  display: block;
  width: 100%;
  height: auto;
}

.map-point {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 2px solid #f3e8cf;
  border-radius: 50%;
  background: #a61e29;
  box-shadow: 0 0 0 5px #6e182766;
  z-index: 2;
}

.map-point:hover,
.map-point:focus-visible {
  background: var(--acido);
}

.map-point > span {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: max-content;
  max-width: 145px;
  padding: 8px 10px;
  border: 1px solid #a6967e;
  background: #111;
  color: #f3e8cf;
  font: .8rem/1.4 "Courier New", monospace;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}

.map-point:hover > span,
.map-point:focus-visible > span {
  opacity: 1;
}

.enlaces-mapa {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
  font: .875rem/1.6 "Courier New", monospace;
}

.enlaces-mapa a {
  color: #d4e8ab;
}

/* FORMULARIO */

.formulario {
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 3px double #a48775;
  background: #1c1714;
}

.formulario label {
  color: #e4c6ae;
}

.formulario input:not([type="hidden"]),
.formulario textarea {
  display: block;
  width: 100%;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid #a18870;
  border-radius: 0;
  background: #080807;
  color: #efe5d5;
  font-size: 1rem;
}

.formulario textarea {
  resize: vertical;
}

/* AVISOS Y CARTAS */

dialog {
  width: min(540px, calc(100% - 32px));
  max-height: 85dvh;
  overflow: auto;
  padding: 28px;
  background: #191511;
  color: var(--hueso);
  border: 4px double #b3967d;
  box-shadow: 0 20px 80px #000;
}

dialog::backdrop {
  background: #000c;
}

dialog h2 {
  margin-top: 0;
  color: #f0c5b7;
  font-size: 1.65rem;
  line-height: 1.3;
}

dialog button {
  padding: 12px 18px;
  background: #681721;
  color: #fff0dd;
  border: 1px solid #c2a18c;
}

footer {
  padding: 30px 20px;
  border-top: 3px double #746957;
  color: #b8ad9b;
  text-align: center;
  font: .8rem/1.8 "Courier New", monospace;
}

.volver {
  display: inline-block;
  margin-bottom: 28px;
  padding: 12px 16px;
  background: #221c16;
  border: 1px solid #8c7963;
  text-decoration: none;
  font: .875rem/1.5 "Courier New", monospace;
}

/* ADAPTACIÓN */

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

  .historias-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

@media (max-width: 600px) {
  .portada {
    min-height: 480px;
  }

  .portada h1 {
    font-size: clamp(3.6rem, 15vw, 5rem);
  }

  .accesos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }

  .accesos a:last-child {
    grid-column: 1 / -1;
  }

  .contenedor {
    width: calc(100% - 28px);
    padding-top: 32px;
  }

  .titulo-seccion {
    padding: 15px;
  }

  .tarot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .televisor {
    padding: 10px;
  }

  #game-content {
    padding: 16px;
  }

  #endings-list {
    grid-template-columns: 1fr;
  }

  .radio-refugio {
    padding: 20px 14px;
  }

  .radio-equipo {
    padding: 16px 12px;
  }

  .radio-buttons button {
    flex-basis: 100%;
  }

  .formulario {
    padding: 20px;
  }

  .maze-container {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* V9: cursor personalizado del proyecto */
html,body{cursor:url("estrella.png") 16 16,auto;}
a,button,input,textarea,select,summary,[role="button"]{cursor:url("estrella.png") 16 16,pointer;}
