/* ==========================================================================
   El Mago · León Vive la Magia — estilos
   Mundo: el escenario del cartel (arco zodiacal, cielo pintado, madera),
   rótulos del festival y naipes antiguos como único lenguaje de control.
   ========================================================================== */

@font-face { font-family: "Montserrat"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/montserrat-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/montserrat-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 500; font-style: italic; font-display: swap; src: url(../fonts/montserrat-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/montserrat-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/montserrat-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-style: normal; font-display: swap; src: url(../fonts/montserrat-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Kaushan Script"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/kaushan-script-latin-400-normal.woff2) format("woff2"); }

:root {
  /* cielo */
  --sky-950: #0b2129;
  --sky-900: #0f2c35;
  --sky-800: #154250;
  --sky-700: #1e5867;
  /* papel y naipe */
  --cream: #f4e8cc;
  --cream-soft: #e9dab6;
  --ivory: #fcf5e6;
  --ivory-2: #f2e5c6;
  /* tinta */
  --ink: #2b170c;
  --ink-2: #5a3a24;
  --red: #b4252b;
  --red-deep: #861a1f;
  --red-bright: #cc3530;
  --orange: #f0a02a;
  --orange-2: #f6b947;
  --gold: #e2b25a;
  --gold-deep: #a97a26;
  --wood: #a56d35;
  --espresso: #1d130c;
  --espresso-2: #120c07;

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Kaushan Script", "Montserrat", cursive;

  /* ancho del escenario (el arco escala con él) */
  --w: min(100vw, max(360px, min(600px, 70vh)));
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.3, 1.25, .5, 1);
  --shadow-card: 0 2px 3px rgba(20, 10, 4, .35), 0 10px 22px rgba(8, 20, 24, .45);
  --shadow-lift: 0 6px 10px rgba(20, 10, 4, .3), 0 22px 34px rgba(8, 20, 24, .55);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--cream);
  background: var(--sky-900);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

::selection { background: var(--orange); color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange-2); outline-offset: 3px; border-radius: 6px; }

/* scrollbar a juego */
html { scrollbar-color: var(--wood) var(--espresso-2); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--espresso-2); }
::-webkit-scrollbar-thumb { background: var(--wood); border-radius: 10px; border: 2px solid var(--espresso-2); }

.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.script { font-family: var(--script); font-weight: 400; letter-spacing: 0; }

/* -------------------------------------------------------------------------- */
/* cielo de fondo (se ve a los lados en escritorio)                           */
/* -------------------------------------------------------------------------- */
.sky {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(6, 18, 22, .75) 100%),
    url(../img/cielo.webp) center / cover no-repeat,
    var(--sky-800);
}

/* -------------------------------------------------------------------------- */
/* ESCENARIO: el arco del cartel como marco de 9 piezas                       */
/* -------------------------------------------------------------------------- */
.stage {
  position: relative;
  width: var(--w);
  margin: 0 auto;
  min-height: 100svh;
  border-style: solid;
  border-width: calc(var(--w) * .6348) calc(var(--w) * .1309) calc(var(--w) * .3379) calc(var(--w) * .1318);
  border-image: url(../img/arco.webp) 650 134 346 135 fill / 1 / 0 stretch;
  isolation: isolate;
}
/* foco de luz cálida sobre las tablas, como en el cartel */
.stage::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: calc(var(--w) * -.13); right: calc(var(--w) * -.13); bottom: calc(var(--w) * -.34); height: calc(var(--w) * .5);
  background: radial-gradient(50% 45% at 50% 82%, rgba(255, 214, 140, .28), transparent 70%);
}

.crown-fx {
  position: absolute; pointer-events: none; z-index: 0;
  top: calc(var(--w) * -.6348); left: calc(var(--w) * -.1318);
  width: var(--w); height: calc(var(--w) * .6348);
}
.glint {
  position: absolute; left: var(--x); top: var(--y);
  width: calc(var(--w) * .05 * var(--s, 1)); aspect-ratio: 1;
  translate: -50% -50%;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff1c9' d='M12 0c.6 6.6 2.4 10.4 12 12-9.6 1.6-11.4 5.4-12 12-.6-6.6-2.4-10.4-12-12C9.6 10.4 11.4 6.6 12 0z'/%3E%3C/svg%3E");
  filter: drop-shadow(0 0 3px rgba(255, 220, 150, .9));
  opacity: 0; scale: .2;
  animation: glint 5.2s var(--d, 0s) infinite var(--ease-out);
}
@keyframes glint {
  0%, 62%, 100% { opacity: 0; scale: .2; rotate: 0deg; }
  70% { opacity: 1; scale: 1; rotate: 45deg; }
  82% { opacity: 0; scale: .35; rotate: 90deg; }
}

.stage-in {
  position: relative; z-index: 1;
  /* subimos el contenido dentro de la corona y lo dejamos montar sobre las columnas */
  margin: calc(var(--w) * -.47) calc(var(--w) * -.085) calc(var(--w) * -.27);
  min-height: calc(100svh - var(--w) * .6348 - var(--w) * .3379 + var(--w) * .74);
  display: flex; flex-direction: column;
}
.view { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; }

/* sombra de lectura sobre el cielo */
.legible { text-shadow: 0 1px 2px rgba(6, 22, 28, .8), 0 2px 14px rgba(6, 22, 28, .7); }

/* -------------------------------------------------------------------------- */
/* INTRO                                                                      */
/* -------------------------------------------------------------------------- */
.leon {
  margin: 0;
  font-weight: 800; font-size: calc(var(--w) * .066); line-height: 1;
  letter-spacing: .05em; text-transform: uppercase; color: var(--orange-2);
  text-shadow: 0 2px 0 #6b3412, 0 3px 10px rgba(6, 22, 28, .6);
}
.lettering { margin: calc(var(--w) * .012) 0 0; width: 108%; max-width: none; }
.lettering img { width: 100%; height: auto; filter: drop-shadow(0 6px 10px rgba(6, 18, 22, .5)); }
.edition {
  margin: calc(var(--w) * .02) 0 0;
  display: flex; flex-direction: column; gap: 2px;
  text-shadow: 0 1px 2px rgba(6, 22, 28, .85), 0 2px 12px rgba(6, 22, 28, .7);
}
.edition strong { font-weight: 800; font-size: calc(var(--w) * .043); letter-spacing: .02em; text-transform: uppercase; color: var(--orange-2); line-height: 1.15; }
.edition span { font-weight: 400; font-size: calc(var(--w) * .05); color: var(--cream); line-height: 1.15; }
.edition em { font-style: normal; font-weight: 700; font-size: calc(var(--w) * .033); letter-spacing: .06em; text-transform: uppercase; color: var(--cream); }

.pitch {
  margin: calc(var(--w) * .035) 0 0;
  display: flex; flex-direction: column; align-items: center;
  max-width: 360px; padding: 0 12px;
  position: relative;
}
.pitch::before {
  content: ""; position: absolute; z-index: -1; inset: 20% 0 -8%;
  background: radial-gradient(closest-side, rgba(8, 26, 32, .7), transparent);
}
.pitch .mago { width: calc(var(--w) * .25); max-width: 132px; height: auto; filter: drop-shadow(0 6px 10px rgba(6, 18, 22, .55)); }
.say { margin: 10px 0 0; font-size: 15.5px; line-height: 1.42; font-weight: 500; color: var(--cream); text-shadow: 0 1px 2px rgba(6, 22, 28, .9), 0 2px 12px rgba(6, 22, 28, .8); text-wrap: balance; }
.say .script { display: block; font-size: clamp(21px, calc(var(--w) * .06), 27px); line-height: 1.15; color: var(--orange-2); margin-bottom: 4px; text-shadow: 0 2px 0 rgba(70, 30, 8, .75), 0 2px 12px rgba(6, 22, 28, .7); }

.hand {
  margin: 14px 0 0; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  -webkit-tap-highlight-color: transparent;
}
.hand-cards { position: relative; width: 150px; height: 92px; display: block; }
.mini-back {
  position: absolute; left: 50%; bottom: 0; width: 58px; aspect-ratio: 5 / 7;
  border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-card);
  transform-origin: 50% 130%;
  translate: -50% 0;
  transition: rotate .5s var(--ease-spring), translate .5s var(--ease-spring);
  animation: breathe 3.6s ease-in-out infinite;
}
.mini-back svg { width: 100%; height: 100%; }
.mini-back:nth-child(1) { rotate: -18deg; animation-delay: -.4s; }
.mini-back:nth-child(2) { rotate: 0deg; translate: -50% -6px; animation-delay: -1.2s; }
.mini-back:nth-child(3) { rotate: 18deg; animation-delay: -2s; }
@keyframes breathe { 50% { margin-bottom: 4px; } }
.hand:hover .mini-back:nth-child(1), .hand:focus-visible .mini-back:nth-child(1) { rotate: -28deg; }
.hand:hover .mini-back:nth-child(3), .hand:focus-visible .mini-back:nth-child(3) { rotate: 28deg; }
.hand:hover .mini-back:nth-child(2), .hand:focus-visible .mini-back:nth-child(2) { translate: -50% -16px; }
.hand:focus-visible { outline: none; }
.hand:focus-visible .btn { outline: 3px solid var(--orange-2); outline-offset: 3px; }

.scene { margin: calc(var(--w) * .06) 0 0; width: 78%; position: relative; }
.scene img { width: 100%; height: auto; filter: drop-shadow(0 10px 16px rgba(10, 8, 4, .45)); }

.quiet-link {
  margin: 12px 0 0; font-size: 13.5px; font-weight: 600; color: var(--cream);
  text-decoration: underline; text-decoration-color: rgba(244, 232, 204, .45); text-underline-offset: 3px;
  position: relative; z-index: 2;
}
.quiet-link:hover { text-decoration-color: var(--orange-2); color: #fff; }

/* -------------------------------------------------------------------------- */
/* BOTONES                                                                    */
/* -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 20px;
  border: 0; border-radius: 12px; cursor: pointer;
  font-weight: 700; font-size: 15px; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, translate .15s, box-shadow .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { translate: 0 1px; }
.btn-primary {
  color: var(--ivory);
  background: linear-gradient(180deg, var(--red-bright), var(--red) 55%, var(--red-deep));
  box-shadow: inset 0 0 0 1px rgba(242, 196, 106, .55), inset 0 1px 0 rgba(255, 220, 180, .35), 0 3px 4px rgba(30, 6, 4, .35), 0 8px 18px rgba(8, 20, 24, .35);
}
.btn-primary:hover { background: linear-gradient(180deg, #d93f37, #c02d2f 55%, var(--red)); }
.btn-primary:disabled { cursor: not-allowed; color: rgba(252, 245, 230, .55); background: #4a2a22; box-shadow: inset 0 0 0 1px rgba(242, 196, 106, .3), 0 3px 8px rgba(0, 0, 0, .35); }
.btn-ghost {
  color: var(--cream); background: rgba(14, 9, 5, .55);
  box-shadow: inset 0 0 0 1px rgba(244, 232, 204, .4);
}
.btn-ghost:hover { background: rgba(14, 9, 5, .75); box-shadow: inset 0 0 0 1px rgba(244, 232, 204, .7); }
.btn-cream { color: var(--ink); background: linear-gradient(180deg, #fff8e8, var(--cream)); box-shadow: inset 0 0 0 1px rgba(169, 122, 38, .45), 0 3px 4px rgba(20, 10, 4, .3), 0 8px 18px rgba(8, 20, 24, .3); }
.btn-cream:hover { background: #fffaf0; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--orange-2); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* -------------------------------------------------------------------------- */
/* PREGUNTAS                                                                  */
/* -------------------------------------------------------------------------- */
.q-head { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 calc(var(--w) * .07); }
.q-head::before {
  content: ""; position: absolute; z-index: -1; inset: 18% 0 -16%;
  background: radial-gradient(closest-side, rgba(8, 26, 32, .62), transparent);
  pointer-events: none;
}
.mago-sm { width: calc(var(--w) * .15); height: auto; filter: drop-shadow(0 4px 6px rgba(6, 18, 22, .5)); }
.mago-md { width: calc(var(--w) * .22); height: auto; filter: drop-shadow(0 6px 10px rgba(6, 18, 22, .5)); }
.mago-line { margin: 8px 0 0; font-size: clamp(19px, calc(var(--w) * .056), 26px); line-height: 1.15; color: var(--orange-2); text-shadow: 0 2px 0 rgba(70, 30, 8, .7), 0 2px 12px rgba(6, 22, 28, .7); }
.q-title {
  margin: 6px 0 0; outline: none;
  font-weight: 700; font-size: clamp(21px, calc(var(--w) * .062), 29px); line-height: 1.18; letter-spacing: -.01em;
  color: #fff7e6; text-wrap: balance;
  text-shadow: 0 1px 2px rgba(6, 22, 28, .85), 0 2px 14px rgba(6, 22, 28, .75);
}
.q-hint { margin: 6px 0 0; font-size: 14px; font-weight: 500; color: var(--cream); text-shadow: 0 1px 2px rgba(6, 22, 28, .9), 0 2px 10px rgba(6, 22, 28, .8); }

.deal {
  --gap: 10px;
  display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start;
  gap: var(--gap);
  margin: 18px 0 0; padding: 0;
  width: 100%;
  perspective: 1200px;
}

/* --- naipe de opción --- */
.pcard {
  --cw: 112px;
  position: relative; width: var(--cw); aspect-ratio: 5 / 7;
  padding: 0; border: 0; background: none; cursor: pointer;
  rotate: var(--tilt, 0deg);
  transition: translate .35s var(--ease-spring), rotate .35s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.pcard-inner {
  position: absolute; inset: 0; display: block;
  transform-style: preserve-3d;
  transition: transform .5s var(--ease-out);
}
.pcard.is-flipped .pcard-inner { transform: rotateY(180deg); }
.face, .back {
  position: absolute; inset: 0; display: block;
  border-radius: calc(var(--cw) * .085);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow .3s;
}
.face {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .7), transparent 60%),
    linear-gradient(180deg, var(--ivory), var(--ivory-2));
  color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--cw) * .2) calc(var(--cw) * .1);
  overflow: hidden;
}
.face::before, .face::after { content: ""; position: absolute; pointer-events: none; border-radius: calc(var(--cw) * .05); }
.face::before { inset: calc(var(--cw) * .05); border: 1.5px solid var(--red); opacity: .85; }
.face::after { inset: calc(var(--cw) * .075); border: .75px solid var(--red); opacity: .55; }
.back { transform: rotateY(180deg); overflow: hidden; }
.back svg { width: 100%; height: 100%; }

.idx {
  position: absolute; display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-weight: 800; font-size: calc(var(--cw) * .12); line-height: 1; letter-spacing: -.02em;
  color: var(--suit, var(--red));
  z-index: 1;
}
.idx svg { width: calc(var(--cw) * .085); height: calc(var(--cw) * .085); fill: currentColor; }
.idx.tl { top: calc(var(--cw) * .1); left: calc(var(--cw) * .1); }
.idx.br { bottom: calc(var(--cw) * .1); right: calc(var(--cw) * .1); rotate: 180deg; }
.emblem { width: calc(var(--cw) * .3); height: calc(var(--cw) * .3); stroke: var(--red); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: calc(var(--cw) * .07); }
.big { font-weight: 800; font-size: calc(var(--cw) * .32); line-height: .95; letter-spacing: -.03em; color: var(--red); margin-bottom: calc(var(--cw) * .04); white-space: nowrap; }
.lbl { position: relative; z-index: 1; hyphens: manual; font-weight: 700; font-size: clamp(12px, calc(var(--cw) * .118), 15px); line-height: 1.18; text-wrap: balance; }
.sub { position: relative; z-index: 1; margin-top: 3px; font-weight: 500; font-size: clamp(10.5px, calc(var(--cw) * .092), 12.5px); line-height: 1.2; color: var(--ink-2); text-wrap: balance; }

.pcard .seal {
  position: absolute; z-index: 3; top: -9px; right: -9px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #e0453c, var(--red-deep));
  color: var(--ivory); box-shadow: 0 2px 4px rgba(30, 6, 4, .45), inset 0 0 0 1.5px rgba(242, 196, 106, .7);
  scale: 0; transition: scale .3s var(--ease-spring);
}
.pcard .seal svg { width: 16px; height: 16px; stroke-width: 3; }
.pcard[aria-pressed="true"] { translate: 0 -10px; rotate: 0deg; z-index: 2; }
.pcard[aria-pressed="true"] .face { box-shadow: 0 0 0 3px var(--orange-2), var(--shadow-lift); }
.pcard[aria-pressed="true"] .seal { scale: 1; }
@media (hover: hover) {
  .pcard:not([disabled]):hover { translate: 0 -5px; }
  .pcard[aria-pressed="true"]:hover { translate: 0 -12px; }
  .pcard:not([disabled]):hover .face { box-shadow: var(--shadow-lift); }
  .pcard[aria-pressed="true"]:hover .face { box-shadow: 0 0 0 3px var(--orange-2), var(--shadow-lift); }
}
.pcard:focus-visible { outline: none; }
.pcard:focus-visible .face { box-shadow: 0 0 0 3px var(--sky-950), 0 0 0 6px var(--orange-2), var(--shadow-lift); }
.pcard[disabled] { cursor: not-allowed; }
.pcard[disabled] .face { filter: grayscale(.8); opacity: .5; }
.pcard .past { position: absolute; z-index: 2; left: 50%; top: 50%; translate: -50% -50%; rotate: -14deg; padding: 2px 8px; border: 2px solid var(--red); border-radius: 4px; color: var(--red); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; background: rgba(252, 245, 230, .85); }

.q-nav {
  margin-top: auto; padding: 22px 0 calc(var(--w) * .035);
  width: 100%;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
}
.q-nav .btn { padding: 0 16px; }
.pips { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 5px; }
@media (max-width: 359px) { .q-nav { gap: 6px; } .q-nav #back span { display: none; } .q-nav .btn { padding: 0 12px; } .pips { gap: 4px; } .pips .pip { width: 12px; } }
.pip {
  width: 15px; aspect-ratio: 5 / 7; border-radius: 3px;
  background: rgba(14, 9, 5, .55); box-shadow: inset 0 0 0 1px rgba(244, 232, 204, .45);
  transition: background .3s, box-shadow .3s, scale .3s var(--ease-spring);
  overflow: hidden;
}
.pip svg { width: 100%; height: 100%; opacity: 0; transition: opacity .25s; }
.pip.is-current { box-shadow: inset 0 0 0 1.5px var(--orange-2); scale: 1.15; }
.pip.is-done svg { opacity: 1; }
.pip.is-done { box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }

/* -------------------------------------------------------------------------- */
/* BARAJAR                                                                    */
/* -------------------------------------------------------------------------- */
.view-shuffle { justify-content: flex-start; position: relative; }
.view-shuffle .mago-md { margin-top: calc(var(--w) * .02); }
.shuffle-line { text-wrap: balance; padding: 0 calc(var(--w) * .085); margin: 10px 0 0; font-size: clamp(24px, calc(var(--w) * .07), 34px); line-height: 1.15; color: var(--orange-2); text-shadow: 0 2px 0 rgba(70, 30, 8, .7), 0 2px 14px rgba(6, 22, 28, .75); min-height: 2.4em; }
.riffle { position: relative; width: 100%; height: calc(var(--w) * .62); margin-top: 6px; }
.riffle .rc { position: absolute; left: 50%; top: 50%; width: calc(var(--w) * .24); aspect-ratio: 5 / 7; margin: calc(var(--w) * -.168) 0 0 calc(var(--w) * -.12); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-card); }
.riffle .rc svg { width: 100%; height: 100%; }
.dust { position: absolute; inset: -20% -10%; width: 120%; height: 140%; pointer-events: none; }

/* -------------------------------------------------------------------------- */
/* REVELACIÓN                                                                 */
/* -------------------------------------------------------------------------- */
.view-reveal { padding: 0 calc(var(--w) * .07); }
.abra { margin: 6px 0 0; font-size: clamp(30px, calc(var(--w) * .1), 48px); line-height: 1.05; color: var(--orange-2); text-shadow: 0 3px 0 rgba(90, 36, 10, .8), 0 3px 16px rgba(6, 22, 28, .7); }
.reveal-title { margin: 6px 0 0; outline: none; font-weight: 800; font-size: clamp(22px, calc(var(--w) * .066), 30px); line-height: 1.15; color: #fff7e6; text-shadow: 0 1px 2px rgba(6, 22, 28, .85), 0 2px 14px rgba(6, 22, 28, .75); }
.reveal-sub { margin: 8px 0 0; max-width: 34ch; font-size: 15.5px; line-height: 1.45; font-weight: 500; color: var(--cream); text-shadow: 0 1px 2px rgba(6, 22, 28, .9), 0 2px 12px rgba(6, 22, 28, .85); text-wrap: pretty; }
.chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.spread { list-style: none; margin: 22px calc(var(--w) * -.07) 0; padding: 0; align-self: stretch; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 8px; perspective: 1200px; }
.spread > li { display: block; }
.mcard { display: block; text-decoration: none; color: inherit; }
.mcard .face { padding: calc(var(--cw) * .24) calc(var(--cw) * .1) calc(var(--cw) * .14); justify-content: flex-end; }
.mcard .lbl { font-size: clamp(11.5px, calc(var(--cw) * .115), 13.5px); }
.mcard .lbl.is-long { font-size: clamp(10.5px, calc(var(--cw) * .1), 12px); line-height: 1.12; }
.mcard .sub { font-size: clamp(10px, calc(var(--cw) * .088), 11.5px); }
.m-day { position: relative; z-index: 1; margin-bottom: auto; padding-top: calc(var(--cw) * .06); font-weight: 800; font-size: calc(var(--cw) * .17); line-height: 1; letter-spacing: -.02em; color: var(--red); text-transform: capitalize; }
.mcard .idx b { font-size: calc(var(--cw) * .1); }
@media (hover: hover) { .mcard:hover { translate: 0 -5px; } .mcard:hover .face { box-shadow: var(--shadow-lift); } }
.mcard:focus-visible { outline: none; }
.mcard:focus-visible .face { box-shadow: 0 0 0 3px var(--sky-950), 0 0 0 6px var(--orange-2), var(--shadow-lift); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 8px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(14, 9, 5, .62); box-shadow: inset 0 0 0 1px rgba(226, 178, 90, .55);
  color: var(--cream); font-size: 13px; font-weight: 600;
}
.chip svg.ic { width: 15px; height: 15px; color: var(--orange-2); }
.chip:hover { background: rgba(14, 9, 5, .82); box-shadow: inset 0 0 0 1px var(--orange-2); }
.btn-down { margin: 22px 0 calc(var(--w) * .05); }

/* -------------------------------------------------------------------------- */
/* RESULTADOS                                                                 */
/* -------------------------------------------------------------------------- */
.results {
  position: relative;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(9, 30, 37, .74), rgba(9, 30, 37, .82));
  border: solid var(--cream);
  border-width: 0 max(4px, calc(var(--w) * .0098)) max(4px, calc(var(--w) * .0098));
  box-shadow: inset 0 0 0 1px rgba(226, 178, 90, .55);
  padding: 34px 16px 56px;
}
.results-in { max-width: 1060px; margin: 0 auto; }
.shared-note, .cheat {
  max-width: 640px; margin: 0 auto 22px; padding: 12px 16px;
  border-radius: 12px; font-size: 14.5px; line-height: 1.45; text-align: center;
  background: rgba(244, 232, 204, .07); box-shadow: inset 0 0 0 1px rgba(226, 178, 90, .35);
}
.cheat strong { color: var(--orange-2); }

.agenda { display: grid; gap: 8px; }
.day { margin: 0 0 30px; scroll-margin-top: 16px; }
.day-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0 0 16px; }
.day-head .orn { width: min(320px, 82%); height: 24px; color: var(--gold); opacity: .8; }
.day-head h3 { margin: 4px 0 0; font-weight: 400; line-height: 1.05; }
.day-head .wd { display: block; font-family: var(--script); font-size: 34px; color: var(--orange); text-transform: capitalize; }
.day-head .dt { display: block; margin-top: 4px; font-family: var(--font); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--cream); }
.day-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; justify-content: center; grid-template-columns: minmax(0, 560px); }

/* --- naipe de resultado --- */
.rslot { scroll-margin-top: 20px; }
.rcard {
  --cw: 300px;
  position: relative;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 16px;
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, .75), transparent 60%),
    linear-gradient(180deg, var(--ivory), var(--ivory-2));
  box-shadow: var(--shadow-card);
  padding: 22px 16px 18px 50px;
  text-align: left;
}
.rcard::before, .rcard::after { content: ""; position: absolute; pointer-events: none; border-radius: 11px; }
.rcard::before { inset: 7px; border: 1.5px solid var(--red); opacity: .8; }
.rcard::after { inset: 10px; border: .75px solid var(--red); opacity: .5; }
.r-idx { position: absolute; left: 15px; top: 20px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--suit, var(--red)); z-index: 1; }
.r-idx b { font-weight: 800; font-size: 15px; line-height: 1; letter-spacing: -.02em; writing-mode: vertical-rl; rotate: 180deg; }
.r-idx svg { width: 14px; height: 14px; fill: currentColor; }
.r-idx.br { left: auto; top: auto; right: 18px; bottom: 18px; rotate: 180deg; display: none; }
@media (min-width: 420px) { .rcard { padding: 22px 46px 18px 58px; } .r-idx { left: 18px; } .r-idx.br { display: flex; } }
.r-letter { position: relative; z-index: 1; height: 38px; width: auto; max-width: 78%; margin: -2px 0 8px -4px; object-fit: contain; object-position: left center; }
.r-letter-text { position: relative; z-index: 1; margin: 0 0 6px; font-family: var(--script); font-size: 26px; line-height: 1.1; color: var(--red); }
.r-artist { position: relative; z-index: 1; margin: 2px 0 0; font-weight: 800; font-size: 21px; line-height: 1.15; letter-spacing: -.01em; }
.r-title { position: relative; z-index: 1; margin: 2px 0 0; font-weight: 500; font-style: italic; font-size: 16px; line-height: 1.3; color: var(--ink-2); }
.r-cast { position: relative; z-index: 1; margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.r-blurb { position: relative; z-index: 1; margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.r-facts { position: relative; z-index: 1; list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px dashed rgba(180, 37, 43, .35); display: grid; gap: 6px; font-size: 14px; line-height: 1.35; font-weight: 500; }
.r-facts li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; }
.r-facts .ic { width: 17px; height: 17px; margin-top: 1px; color: var(--red); stroke-width: 1.8; }
.r-facts a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(180, 37, 43, .45); text-underline-offset: 3px; }
.r-facts a:hover { text-decoration-color: var(--red); }
.r-why { position: relative; z-index: 1; margin: 12px 0 0; padding: 8px 10px; border-radius: 8px; background: rgba(180, 37, 43, .07); font-size: 13px; line-height: 1.4; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.r-why .ic { width: 16px; height: 16px; margin-top: 1px; color: var(--gold-deep); }
.r-why b { color: var(--ink); font-weight: 700; }
.r-actions { position: relative; z-index: 1; margin: 14px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 6px; }
.r-actions > .btn-primary, .r-actions > :only-child { grid-column: 1 / -1; }
.r-actions .btn { min-height: 44px; padding: 0 8px; gap: .4em; font-size: 13.5px; border-radius: 10px; justify-content: center; white-space: nowrap; }
@media (min-width: 420px) { .r-actions { display: flex; flex-wrap: wrap; } .r-actions .btn { padding: 0 12px; font-size: 14px; } }
.btn-line { color: var(--red-deep); background: transparent; box-shadow: inset 0 0 0 1.5px rgba(180, 37, 43, .55); }
.btn-line:hover { background: rgba(180, 37, 43, .08); box-shadow: inset 0 0 0 1.5px var(--red); }
.r-more { position: relative; z-index: 1; margin: 12px 0 0; font-size: 13.5px; }
.r-town { position: relative; z-index: 1; width: 100%; min-height: 44px; margin: 12px 0 0; padding: 10px 0 0; display: flex; align-items: center; gap: 8px; border: 0; border-top: 1px dashed rgba(180, 37, 43, .35); background: none; font: 700 13.5px/1.3 var(--font); color: var(--red-deep); text-align: left; cursor: pointer; }
.r-town span { flex: 1; }
.r-town b { font-weight: 600; color: var(--ink-2); }
.r-town .ic { width: 16px; height: 16px; flex: none; }
.r-town:hover span { text-decoration: underline; text-underline-offset: 3px; }
.r-town:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.r-more summary { cursor: pointer; font-weight: 700; color: var(--red-deep); list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.r-more summary::-webkit-details-marker { display: none; }
.r-more summary .ic { width: 16px; height: 16px; transition: rotate .25s; }
.r-more[open] summary .ic { rotate: 180deg; }
.r-more ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; color: var(--ink-2); }
.r-more li { line-height: 1.4; }
.r-more li b { color: var(--ink); font-weight: 700; }

/* --- más cartas --- */
.section-title { margin: 8px 0 18px; text-align: center; font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--cream); }
.section-title .script { display: block; font-size: 32px; letter-spacing: 0; text-transform: none; color: var(--orange); line-height: 1.1; }
.more { margin-top: 12px; }
.more-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 560px); justify-content: center; }
.rcard.is-compact { padding: 18px 16px 16px 48px; }
.rcard.is-compact .r-letter { height: 30px; }
.rcard.is-compact .r-artist { font-size: 18px; }
.rcard.is-compact .r-title { font-size: 14.5px; }

/* --- acciones y taquilla --- */
.actions { margin: 34px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 720px; }
.toast { margin: 14px auto 0; max-width: 420px; text-align: center; font-size: 14px; font-weight: 600; color: var(--orange-2); }
.box-office { margin: 48px auto 0; max-width: 560px; text-align: center; font-size: 14.5px; line-height: 1.55; color: var(--cream); }
.box-office .orn { width: min(320px, 82%); height: 24px; margin: 0 auto; color: var(--gold); opacity: .75; }
.box-office h3 { margin: 6px 0 10px; font-size: 32px; font-weight: 400; color: var(--orange); }
.box-office p { margin: 4px 0; }
.box-office strong { font-weight: 700; }
.box-office a { color: var(--orange-2); font-weight: 700; text-underline-offset: 3px; }
.box-office .fine { margin-top: 14px; font-size: 12.5px; color: rgba(244, 232, 204, .72); }

/* -------------------------------------------------------------------------- */
/* PIE                                                                        */
/* -------------------------------------------------------------------------- */
/* aviso legal y privacidad */
.legal-link { margin: 0; padding: 8px 16px 0; text-align: center; }
.legal-link a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 12px; font-weight: 500; letter-spacing: .02em; color: rgba(244, 232, 204, .74); text-decoration: underline; text-decoration-color: rgba(244, 232, 204, .3); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.legal-link a:hover { color: var(--cream); text-decoration-color: var(--orange-2); }
.legal-link + .credit { padding-top: 0; }
.legal-panel { position: relative; margin: 0 auto; background: linear-gradient(180deg, rgba(9, 30, 37, .8), rgba(9, 30, 37, .88)); border: max(4px, calc(var(--w) * .0098)) solid var(--cream); box-shadow: inset 0 0 0 1px rgba(226, 178, 90, .55); padding: 26px 18px 40px; }
.legal-in { max-width: 68ch; margin: 0 auto; font-size: 15px; line-height: 1.62; color: var(--cream); }
.legal-brand { display: block; width: min(240px, 62%); margin: 0 auto 18px; border-radius: 8px; }
.legal-brand img { width: 100%; height: auto; filter: drop-shadow(0 4px 8px rgba(6, 18, 22, .5)); }
.legal-in > .orn { display: block; width: min(320px, 82%); height: 24px; margin: 0 auto 6px; color: var(--gold); opacity: .8; }
.legal-in .section-title { margin: 0 0 14px; font-size: 32px; letter-spacing: 0; text-transform: none; }
.legal-lead { margin: 0 0 6px; font-size: 16px; text-align: center; text-wrap: pretty; }
.legal-in h2 { margin: 30px 0 8px; font-size: 15px; font-weight: 800; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; color: var(--orange-2); }
.legal-in p { margin: 0 0 10px; text-wrap: pretty; }
.legal-in a:not(.legal-brand) { color: var(--orange-2); font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-in a:not(.legal-brand):hover { color: var(--cream); }
.legal-data { margin: 10px 0 14px; padding: 4px 16px; border-radius: 12px; background: rgba(244, 232, 204, .06); box-shadow: inset 0 0 0 1px rgba(226, 178, 90, .3); }
.legal-data div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 9px 0; }
.legal-data div + div { border-top: 1px solid rgba(244, 232, 204, .12); }
@media (max-width: 479px) { .legal-data div { grid-template-columns: minmax(0, 1fr); gap: 1px; } }
.legal-data dt { padding-top: 2px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: rgba(244, 232, 204, .78); }
.legal-data dd { margin: 0; overflow-wrap: anywhere; }
.legal-in .legal-date { margin-top: 26px; font-size: 13px; color: rgba(244, 232, 204, .74); }
@media (min-width: 900px) { .legal-panel { max-width: 920px; margin: 40px auto 48px; border-width: 10px; border-radius: 3px; padding: 44px 40px 56px; box-shadow: inset 0 0 0 1px rgba(226, 178, 90, .6), 0 18px 40px rgba(4, 14, 18, .45); } }

/* navegación discreta antes del pie (páginas de zona) */
.zone-nav { display: flex; justify-content: center; gap: 8px; max-width: 520px; margin: 0 auto; padding: 18px 12px 24px; }
.zone-nav .btn { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 6px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; line-height: 1.2; white-space: normal; text-align: center; text-wrap: balance; }
.zone-nav .btn-ghost { color: rgba(244, 232, 204, .92); background: rgba(14, 9, 5, .32); box-shadow: inset 0 0 0 1px rgba(244, 232, 204, .28); }
.zone-nav .btn-ghost:hover { color: var(--cream); background: rgba(14, 9, 5, .6); box-shadow: inset 0 0 0 1px rgba(244, 232, 204, .6); }
.zone-nav .btn:focus-visible { outline: 3px solid var(--orange-2); outline-offset: 2px; }
.zone-nav .ic { color: var(--orange-2); }
@media (max-width: 479px) { .zone-nav .btn { flex-direction: column; gap: 4px; min-height: 60px; } }
@media (min-width: 480px) { .zone-nav { max-width: none; } .zone-nav .btn { flex: 0 1 auto; padding: 6px 16px; white-space: nowrap; } }
@media (min-width: 900px) { .zone-nav { padding: 0 12px 36px; } }
.foot { background: var(--espresso-2); }
.sponsors { background: linear-gradient(180deg, #f7ecd2, var(--cream)); padding: 22px 16px 26px; text-align: center; box-shadow: inset 0 6px 0 -3px var(--gold-deep); }
.sponsors p { margin: 0 0 12px; font-family: var(--script); font-size: 24px; color: var(--ink-2); }
.sponsors img { width: min(480px, 100%); height: auto; margin: 0 auto; }
/* patrocinador principal de una zona: el logo tal cual, sobre su placa blanca, antes de la hoja general */
.sponsor-lead { width: min(340px, 86%); margin: 4px auto 22px; padding: 14px 18px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(169, 122, 38, .35), 0 6px 16px rgba(43, 23, 12, .12); }
.sponsors .sponsor-lead img { width: 100%; height: auto; margin: 0; }
/* comunes de todas las zonas: Junta de Castilla y León + Renfe, y debajo Ministerio de Cultura + INAEM */
.sponsor-common { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.sponsors .sponsor-common img { width: min(460px, 100%); height: auto; margin: 0; }
.sponsors .sponsor-common img.is-small { width: min(207px, 52%); }
.credit { margin: 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); text-align: center; }
.credit a { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 500; letter-spacing: .04em; color: rgba(244, 232, 204, .55); text-decoration: none; transition: color .2s; }
.credit img { height: 13px; width: auto; opacity: .55; transition: opacity .2s; }
.credit a:hover { color: rgba(244, 232, 204, .9); }
.credit a:hover img { opacity: .9; }

/* -------------------------------------------------------------------------- */
/* ESCRITORIO                                                                 */
/* -------------------------------------------------------------------------- */
@media (min-width: 700px) {
  .scene { width: 64%; }
}
@media (min-width: 900px) {
  .results { max-width: 1120px; margin: 32px auto 48px; border-width: 10px; border-radius: 3px; padding: 48px 36px 64px; box-shadow: inset 0 0 0 1px rgba(226, 178, 90, .6), 0 18px 40px rgba(4, 14, 18, .45); }
  .agenda { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); column-gap: 28px; align-items: start; }
  .agenda[data-days="1"] { grid-template-columns: minmax(0, 560px); justify-content: center; }
  .day-list { grid-template-columns: minmax(0, 1fr); }
  .agenda[data-days="1"] .day-list { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
  .more-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
}

/* -------------------------------------------------------------------------- */
/* MOVIMIENTO REDUCIDO                                                        */
/* -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .glint { animation: none; opacity: 0; }
  .pcard, .pcard-inner, .mini-back { transition: none !important; }
}

/* ==========================================================================
   ZONAS · portada de cada territorio
   ========================================================================== */
.edition .zplace { font-family: var(--script); font-size: calc(var(--w) * .088); line-height: 1.05; color: var(--orange-2); text-shadow: 0 2px 0 rgba(70, 30, 8, .75), 0 2px 14px rgba(6, 22, 28, .7); margin: 2px 0 4px; }
.edition .zplace.has-img { margin: 4px auto 6px; width: 86%; }
.edition .zplace.has-img img { width: 100%; height: auto; filter: drop-shadow(0 4px 8px rgba(6, 18, 22, .5)); }
.zstats { margin: 12px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--cream); text-shadow: 0 1px 2px rgba(6, 22, 28, .9), 0 2px 10px rgba(6, 22, 28, .8); }
.intro-or { margin: 6px 0 4px; font-family: var(--script); font-size: 19px; line-height: 1; color: var(--orange-2); text-shadow: 0 2px 0 rgba(70, 30, 8, .75), 0 2px 10px rgba(6, 22, 28, .7); }
.intro-alt { position: relative; z-index: 2; min-height: 48px; }
.intro-alt .ic { color: var(--red); }
.intro-links { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; position: relative; z-index: 2; }
.intro-links a { min-height: 44px; display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--cream); text-decoration: underline; text-decoration-color: rgba(244, 232, 204, .45); text-underline-offset: 3px; text-shadow: 0 1px 2px rgba(6, 22, 28, .9), 0 2px 10px rgba(6, 22, 28, .8); }
.intro-links a:hover { color: #fff; text-decoration-color: var(--orange-2); }

/* --- naipe de zona (solo texto) --- */
.pcard.is-text .face { padding-top: calc(var(--cw) * .26); padding-bottom: calc(var(--cw) * .22); }
.pcard.is-text .lbl { font-size: clamp(12.5px, calc(var(--cw) * .125), 15.5px); line-height: 1.16; color: var(--red-deep); }
.pcard.is-text .lbl.is-long { font-size: clamp(11.5px, calc(var(--cw) * .108), 14px); }
.pcard.is-text .sub { margin-top: 5px; }

/* --- calendario: una carta pequeña por día --- */
.view-intro:has(.zplace:not([hidden])) .pitch .mago { width: calc(var(--w) * .19); }
.view-intro:has(.zplace:not([hidden])) .hand { margin-top: 6px; gap: 4px; }
.view-intro:has(.zplace:not([hidden])) .hand-cards { scale: .78; margin: -6px 0; }
.deal.is-calendar { display: block; perspective: none; }
.cal { width: 100%; max-width: 420px; margin: 0 auto; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-head { margin-bottom: 6px; }
.cal-head span { text-align: center; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; color: var(--cream); text-shadow: 0 1px 2px rgba(6, 22, 28, .9), 0 2px 8px rgba(6, 22, 28, .8); }
.cal-empty { aspect-ratio: 4 / 5; display: grid; place-items: center; border-radius: 6px; font-size: 12px; font-weight: 600; color: rgba(244, 232, 204, .5); background: rgba(9, 30, 37, .28); box-shadow: inset 0 0 0 1px rgba(244, 232, 204, .14); }
.pcard.dcard { --cw: 48px; width: auto; aspect-ratio: 4 / 5; rotate: none; }
.pcard.dcard .face, .pcard.dcard .back { border-radius: 6px; }
.pcard.dcard .face { padding: 0; gap: 1px; }
.pcard.dcard .face::before { inset: 2.5px; border-width: 1px; border-radius: 4px; }
.pcard.dcard .face::after { display: none; }
.d-num { position: relative; z-index: 1; font-weight: 800; font-size: 19px; line-height: 1; letter-spacing: -.03em; color: var(--red); }
.d-mon { position: relative; z-index: 1; font-weight: 700; font-size: 9.5px; line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.pcard.dcard[aria-pressed="true"] { translate: 0 -3px; }
.pcard.dcard[aria-pressed="true"] .face { box-shadow: 0 0 0 2.5px var(--orange-2), var(--shadow-card); }
.pcard.dcard .seal { top: -6px; right: -6px; width: 19px; height: 19px; }
.pcard.dcard .seal svg { width: 11px; height: 11px; }
@media (hover: hover) { .pcard.dcard:not([disabled]):hover { translate: 0 -2px; } .pcard.dcard[aria-pressed="true"]:hover { translate: 0 -4px; } }
.pcard.wcard { --cw: 100px; display: block; width: min(100%, 260px); aspect-ratio: auto; height: 54px; margin: 10px auto 0; rotate: none; }
@media (min-width: 900px) { .cal { max-width: 380px; } }
.pcard.wcard .face { flex-direction: row; flex-wrap: wrap; align-content: center; justify-content: center; column-gap: 8px; padding: 0 18px 0 16px; text-align: left; }
.pcard.wcard .face::before { inset: 4px; } .pcard.wcard .face::after { inset: 6.5px; }
.pcard.wcard .emblem { width: 24px; height: 24px; margin: 0; }
.pcard.wcard .lbl { font-size: 14px; }
.pcard.wcard .sub { flex-basis: 100%; text-align: center; margin-top: -2px; }
.pcard.wcard[aria-pressed="true"] { translate: 0 -4px; }

/* --- cabecera de población en las cartas de resultado --- */
.r-place { position: relative; z-index: 1; margin: -4px 0 6px; font-family: var(--script); font-size: 30px; line-height: 1.08; color: var(--red); text-wrap: balance; }
.rcard.is-compact .r-place { font-size: 25px; }

/* ==========================================================================
   MAPA DE LA MAGIA
   ========================================================================== */
.mapa-panel {
  position: relative; margin: 0 auto;
  background: linear-gradient(180deg, rgba(9, 30, 37, .74), rgba(9, 30, 37, .82));
  border: solid var(--cream);
  border-width: 0 max(4px, calc(var(--w) * .0098)) max(4px, calc(var(--w) * .0098));
  box-shadow: inset 0 0 0 1px rgba(226, 178, 90, .55);
  padding: 34px 16px 44px;
  scroll-margin-top: 0;
}
.mapa-in { max-width: 760px; margin: 0 auto; }
.mapa-panel .section-title { margin: 0 0 18px; }
.section-title span + span { display: block; margin-top: 8px; }
.section-title .sub-plain { text-transform: none; letter-spacing: .005em; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--cream); }
.mapa-search { position: relative; display: grid; gap: 6px; max-width: 420px; margin: 0 auto 18px; }
.mapa-search label { font-size: 13px; font-weight: 700; color: var(--cream); }
.field { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 12px; background: linear-gradient(180deg, #fffaf0, var(--cream)); box-shadow: inset 0 0 0 1.5px rgba(169, 122, 38, .6), 0 3px 8px rgba(4, 14, 18, .35); color: var(--ink-2); }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--red), 0 0 0 3px var(--orange-2); }
.field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: 600 16px var(--font); color: var(--ink); caret-color: var(--red); }
.field input::placeholder { color: #7a5a3f; font-weight: 500; }
.field input::-webkit-search-cancel-button, .field input::-webkit-calendar-picker-indicator { display: none; -webkit-appearance: none; }
.field-clear { flex: none; width: 44px; height: 44px; margin-right: -12px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--ink-2); cursor: pointer; }
.field-clear[hidden] { display: none; }
.field-clear:hover { color: var(--red); }
.field-clear:focus-visible { outline: 2px solid var(--red); outline-offset: -5px; }
.suggest { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; max-height: 312px; overflow: auto; border-radius: 12px; background: linear-gradient(180deg, var(--ivory), var(--ivory-2)); box-shadow: inset 0 0 0 1.5px rgba(180, 37, 43, .55), var(--shadow-lift); }
.suggest[hidden] { display: none; }
.suggest li[role="option"] { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 12px; border-radius: 8px; font-size: 15px; font-weight: 600; line-height: 1.25; color: var(--ink); cursor: pointer; }
.suggest li small { font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.suggest li[role="option"]:hover, .suggest li[aria-selected="true"] { background: rgba(180, 37, 43, .1); color: var(--red-deep); }
.suggest-none { padding: 12px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.mapa-in > .orn, .home-in > .orn { display: block; width: min(320px, 82%); height: 24px; margin: 0 auto 6px; color: var(--gold); opacity: .8; }
.home-in > .orn-gap { margin-top: 40px; }
.mapa-box { position: relative; width: 100%; margin: 0 auto; }
.mapa-box svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 8px 14px rgba(4, 14, 18, .45)); }
.mapa-box.is-pickable { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.m-land { fill: var(--cream); stroke: #6b4526; stroke-width: calc(1.6px * var(--sw, 1)); stroke-linejoin: round; }
.m-land.is-off { fill: #d9cdb0; }
.m-land.is-zone { fill: #f7eed6; }
.m-mesh { fill: none; stroke: rgba(107, 69, 38, .26); stroke-width: calc(.7px * var(--sw, 1)); stroke-linejoin: round; }
.m-dot { fill: var(--red); stroke: var(--ivory); stroke-width: calc(1px * var(--sw, 1)); transition: fill .2s; }
.m-dot { transition: opacity .5s ease var(--d, 0ms), fill .2s; }
.m-pin > * { transition: opacity .45s ease .55s, scale .6s var(--ease-out) .55s; }
.m-label { transition: opacity .5s ease .75s; }
.mapa-box:not(.is-in) .m-dot, .mapa-box:not(.is-in) .m-label { opacity: 0; }
.mapa-box:not(.is-in) .m-pin > * { opacity: 0; scale: .6; }
@media (prefers-reduced-motion: reduce) { .m-dot, .m-pin > *, .m-label { transition: none; } }
.m-dot.is-on { fill: var(--orange); stroke: var(--ink); stroke-width: calc(1.4px * var(--sw, 1)); }
.m-ring { fill: none; stroke: var(--orange-2); stroke-width: calc(2.4px * var(--sw, 1)); pointer-events: none; }
.m-labels { position: absolute; inset: 0; pointer-events: none; }
.m-label { position: absolute; translate: -50% -135%; padding: 0 2px; font-size: 10.5px; font-weight: 800; line-height: 1; letter-spacing: .01em; white-space: nowrap; color: var(--ink); text-shadow: 0 0 2px var(--cream), 0 0 2px var(--cream), 0 0 3px var(--cream), 0 0 4px var(--cream); }
.m-pin { position: absolute; translate: -50% -50%; pointer-events: auto; display: inline-flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px; text-decoration: none; color: var(--ink); }
.m-pin i { width: 13px; height: 13px; rotate: 45deg; background: var(--orange); box-shadow: 0 0 0 1.5px var(--ink), 0 2px 4px rgba(20, 10, 4, .4); }
.m-pin b { margin-top: 3px; padding: 2px 6px; border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1.1; white-space: nowrap; background: var(--ink); color: var(--cream); }
.m-pin:hover b, .m-pin:focus-visible b { background: var(--red); }
.mapa-hint[hidden] { display: none; }
.mapa-hint { margin: 12px 0 0; text-align: center; font-size: 13px; font-weight: 500; color: var(--cream); }
.mapa-detail { margin: 14px auto 0; max-width: 520px; min-height: 8px; }
.mapa-card { position: relative; padding: 24px 26px 26px; border-radius: 16px; color: var(--ink); background: radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, .75), transparent 60%), linear-gradient(180deg, var(--ivory), var(--ivory-2)); box-shadow: var(--shadow-card); }
.mapa-card::before, .mapa-card::after { content: ""; position: absolute; pointer-events: none; border-radius: 11px; }
.mapa-card::before { inset: 7px; border: 1.5px solid var(--red); opacity: .8; }
.mapa-card::after { inset: 10px; border: .75px solid var(--red); opacity: .5; }
.mapa-card > * { position: relative; z-index: 1; }
.mapa-card h3 { margin: 0 0 8px; font-size: 28px; font-weight: 400; line-height: 1.1; color: var(--red); }
.mapa-card ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.mapa-card li b { color: var(--ink); font-weight: 700; margin-right: 4px; }
.mapa-none { margin: 0; padding: 12px 16px; border-radius: 12px; text-align: center; font-size: 14px; color: var(--cream); background: rgba(244, 232, 204, .07); box-shadow: inset 0 0 0 1px rgba(226, 178, 90, .35); }
.mapa-credit { margin: 18px 0 0; text-align: center; font-size: 12px; color: rgba(244, 232, 204, .7); }
.zone-note { max-width: 560px; margin: 44px auto 0; text-align: center; font-size: 14.5px; line-height: 1.55; color: var(--cream); }
.zone-note .orn { width: min(320px, 82%); height: 24px; margin: 0 auto 10px; color: var(--gold); opacity: .75; }
.zone-note a { color: var(--orange-2); font-weight: 700; text-underline-offset: 3px; }
.zone-note .fine { margin-top: 12px; font-size: 12.5px; color: rgba(244, 232, 204, .72); }
@media (min-width: 700px) { .m-label { font-size: 12.5px; } .m-pin b { font-size: 12.5px; } }
@media (min-width: 900px) {
  .mapa-panel { max-width: 1120px; margin: 32px auto 48px; border-width: 10px; border-radius: 3px; padding: 44px 36px 52px; box-shadow: inset 0 0 0 1px rgba(226, 178, 90, .6), 0 18px 40px rgba(4, 14, 18, .45); }
}

/* ==========================================================================
   PORTADA · eligetumagia.es
   ========================================================================== */
.view-home .pitch { max-width: 400px; }
.view-home .pitch .mago { width: calc(var(--w) * .18); }
.zcard { --cw: min(112px, calc((var(--w) * .907 - 20px) / 3)); }
@media (min-width: 700px) { .zcard { --cw: min(106px, calc((var(--w) * .907 - 30px) / 4)); } .view-home .pitch .mago { width: calc(var(--w) * .15); } .view-home .pitch { margin-top: calc(var(--w) * .02); } .zcards { gap: 10px; } }
.zcards { list-style: none; margin: 12px 0 0; padding: 0; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 10px; perspective: 1200px; }
.zcards > li { display: block; }
.pcard.zcard { display: block; text-decoration: none; }
.zcard .face { padding: calc(var(--cw) * .25) calc(var(--cw) * .08) calc(var(--cw) * .3); justify-content: center; }
.z-name { position: relative; z-index: 1; font-family: var(--script); font-size: clamp(17px, calc(var(--cw) * .19), 24px); line-height: 1.02; color: var(--red); text-wrap: balance; }
.zcard.is-long .z-name { font-size: clamp(15px, calc(var(--cw) * .165), 21px); }
.z-dates { position: relative; z-index: 1; margin-top: calc(var(--cw) * .07); font-weight: 700; font-size: clamp(10.5px, calc(var(--cw) * .095), 12px); line-height: 1.15; color: var(--ink); }
.z-count { position: relative; z-index: 1; margin-top: 3px; font-weight: 500; font-size: clamp(10.5px, calc(var(--cw) * .092), 12px); line-height: 1.2; color: var(--ink-2); }
@media (hover: hover) { .zcard:hover { translate: 0 -6px; rotate: 0deg; } .zcard:hover .face { box-shadow: 0 0 0 3px var(--orange-2), var(--shadow-lift); } }
.zcard:focus-visible .face { box-shadow: 0 0 0 3px var(--sky-950), 0 0 0 6px var(--orange-2), var(--shadow-lift); }
.home-cta { margin: 22px 0 calc(var(--w) * .05); display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; position: relative; z-index: 2; }
.home-panel { position: relative; margin: 0 auto; background: linear-gradient(180deg, rgba(9, 30, 37, .74), rgba(9, 30, 37, .82)); border: solid var(--cream); border-width: 0 max(4px, calc(var(--w) * .0098)) max(4px, calc(var(--w) * .0098)); box-shadow: inset 0 0 0 1px rgba(226, 178, 90, .55); padding: 34px 16px 48px; }
.home-in { max-width: 860px; margin: 0 auto; }
.home-panel .section-title { margin: 0 0 16px; }
.home-about { max-width: 62ch; margin: 0 auto; text-align: center; font-size: 16px; line-height: 1.6; color: var(--cream); text-wrap: pretty; }
.home-about strong { color: #fff7e6; font-weight: 700; }
.home-about + .home-about { margin-top: 12px; }
.home-map { margin: 34px auto 0; max-width: 760px; }
.m-pin.is-zone i { width: 12px; height: 12px; }
.m-pin.is-zone b { background: var(--red); color: var(--ivory); box-shadow: 0 0 0 1.5px var(--ivory), 0 2px 5px rgba(20, 10, 4, .45); font-size: 11px; }
.m-pin.is-zone:hover b, .m-pin.is-zone:focus-visible b { background: var(--ink); }
.m-pin.to-left { flex-direction: row-reverse; translate: calc(-100% + 12px) -50%; } .m-pin.to-right { flex-direction: row; translate: -12px -50%; }
.m-pin.to-left b, .m-pin.to-right b { margin: 0 4px; }
.m-pin.to-up { flex-direction: column-reverse; translate: -50% calc(-100% + 12px); } .m-pin.to-up b { margin: 0 0 3px; }
.m-label.is-prov { translate: -50% -50%; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(43, 23, 12, .8); text-shadow: none; }
@media (max-width: 519px) { .m-label.is-prov { font-size: 9px; letter-spacing: .03em; } }
.map-legend { margin: 14px auto 0; max-width: 60ch; display: grid; gap: 6px; text-align: center; font-size: 13.5px; line-height: 1.5; color: var(--cream); }
.map-legend a { color: var(--orange-2); font-weight: 700; text-underline-offset: 3px; }
@media (min-width: 700px) { .m-pin.is-zone b { font-size: 13px; padding: 3px 9px; } .m-label.is-prov { font-size: 11px; } }
@media (min-width: 900px) {
  .home-panel { max-width: 1120px; margin: 32px auto 48px; border-width: 10px; border-radius: 3px; padding: 48px 36px 60px; box-shadow: inset 0 0 0 1px rgba(226, 178, 90, .6), 0 18px 40px rgba(4, 14, 18, .45); }
}
