/* Klask Madrid · estilos de la web oficial */
@font-face { font-family: "Kabel"; src: url("../assets/fonts/kabel-ultra.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Kabel"; src: url("../assets/fonts/kabel-demi.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --color-red: oklch(50% 0.17 27);
  --color-red-deep: oklch(40% 0.15 27);
  --color-navy: oklch(26% 0.07 285);
  --color-navy-2: oklch(33% 0.08 285);
  --color-sky: oklch(58% 0.11 262);
  --color-white: oklch(99% 0 0);
  --color-ink: oklch(18% 0.03 285);
  --color-white-soft: oklch(99% 0 0 / 0.87);
  --color-focus: oklch(88% 0.16 95);
  --color-gold: oklch(86% 0.15 88);
  --color-live: oklch(66% 0.21 27); /* próximo torneo: rojo vivo que se lee sobre el azul */
  --color-bronze: oklch(66% 0.12 55);
  --color-silver: oklch(99% 0 0);
  --color-park: oklch(78% 0.13 155);
  --color-shell-1: #3f3f3f; --color-shell-2: #1a1a1a; --color-shell-gold: #c9a15a; --color-shell-gold-2: #8a6a33;
  /* brand colours of the social networks */
  --color-instagram: #E4405F; --color-ig-1: #FDF497; --color-ig-2: #FD5949; --color-ig-3: #D6249F; --color-ig-4: #285AEB;
  --color-youtube: #FF0000;
  --color-facebook: #0866FF;
  --color-whatsapp: #25D366;

  --font-display: "Kabel", "Arial Black", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --space-xs: 0.5rem; --space-sm: 0.75rem; --space-md: 1rem; --space-lg: 1.5rem;
  --space-xl: 2.5rem; --space-2xl: clamp(2.5rem, 2vw + 1.75rem, 3.5rem); --space-3xl: clamp(2.5rem, 3vw + 1.5rem, 4.5rem); --space-4xl: 9rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 220ms;
  --radius: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { background: var(--color-navy); } /* por si el contenido es mas corto que la pantalla (toolbar de Safari recogida): que no se vea blanco debajo */
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--color-navy); color: var(--color-white);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.55;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

.wrap { width: min(1240px, 100% - 2rem); margin-inline: auto; }

/* ---------- Nav: slab ---------- */
.nav { position: sticky; top: 0; z-index: 10; background: var(--color-navy); }
.nav .wrap { display: flex; align-items: center; gap: var(--space-lg); min-height: 64px; }
.nav__brand { display: flex; align-items: center; gap: var(--space-sm); min-height: 44px; text-decoration: none; font-family: var(--font-display); font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; }
.nav__brand img { width: 40px; height: 40px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; white-space: nowrap;
  font: 700 1rem/1 var(--font-body); text-decoration: none; cursor: pointer; min-height: 44px; box-sizing: border-box;
  padding: .9rem 1.4rem; border-radius: var(--radius); border: 2px solid currentColor;
  transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.btn--solid { background: var(--color-white); color: var(--color-red-deep); border-color: var(--color-white); }
.btn--ghost { color: var(--color-white); background: transparent; }
.btn:active { transform: translateY(1px); }
.nav .btn { padding: .65rem 1.1rem; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: var(--space-3xl) var(--space-2xl); overflow: clip; background: var(--color-red); }
/* hero de MadKlask: fondo navy con las cintas del logo del torneo, en vez del rojo liso del resto de la web */
.hero--ribbons { background: var(--color-navy); }
.hero__ribbons { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero--ribbons .wrap { position: relative; z-index: 1; }
/* las cintas solo cubren el bloque del logo/título (su propio contenedor, que se ajusta a ese contenido);
   se difuminan hacia la base para que la descripción de debajo quede sobre fondo navy liso y se lea bien */
.hero__ribbonwrap { position: relative; padding-block: var(--space-sm) var(--space-lg); margin-bottom: var(--space-sm); }
.hero__ribbonwrap .hero__ribbons {
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 96%);
}
/* título de /madklask: en pantallas anchas "MadKlask Open" cabe en una línea; en móvil sigue en dos */
@media (min-width: 900px) { .mk-title__br { display: none; } .hero h1.mk-title { font-size: clamp(3.2rem, 5vw, 4.6rem) !important; white-space: nowrap; } }
/* dos dibujos de cintas: el de móvil (estrecho) y uno propio para pantallas anchas, donde el de móvil se ampliaba y se cortaba */
.hero__ribbons--wide { display: none; }
@media (min-width: 768px) {
  .hero__ribbons--narrow { display: none; }
  /* en pantallas anchas las cintas empiezan justo debajo del menú (suben por el hueco de arriba del hero, --rib-top)
     y se difuminan poco a poco hasta justo encima del texto de debajo (--rib-bottom) */
  .hero__ribbons--wide { display: block; top: calc(-1 * var(--rib-top, var(--space-3xl))); bottom: auto; height: calc(100% + var(--rib-top, var(--space-3xl)) + var(--rib-bottom, 2rem));
    -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%); mask-image: linear-gradient(to bottom, #000 50%, transparent 100%); }
}
/* el botón hueco (ver el plan) sobre las cintas: un fondo oscuro translúcido evita que la cinta se vea "a través" del texto */
.hero--ribbons .btn--ghost { background: oklch(14% 0.03 285 / 0.45); backdrop-filter: blur(3px); }
/* placa circular blanca del logo de MadKlask sobre el fondo de cintas */
.hero__badge { display: flex; align-items: center; justify-content: center; width: 148px; height: 148px; background: #fff; border-radius: 50%; box-shadow: 0 14px 34px rgba(0, 0, 0, .3); box-sizing: border-box; flex: none; }
.hero__badge--sm { width: 120px; height: 120px; box-shadow: 0 10px 26px rgba(0, 0, 0, .3); }
@media (max-width: 500px) { .hero__badge { width: 112px; height: 112px; } .hero__badge--sm { width: 92px; height: 92px; } }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-2xl); align-items: center; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(3.5rem, 11vw, 9rem); line-height: .86; letter-spacing: -0.01em; margin: 0;
  overflow-wrap: anywhere; min-width: 0;
}
.hero h1 .hero__w { display: block; width: fit-content; transform-origin: left center; transition: transform 350ms var(--ease-out); }
.hero h1 .hero__w--2 { color: var(--color-navy); }
/* al pasar el ratón, solo esa palabra crece */
@media (hover: hover) { .hero h1 .hero__w:hover { transform: scale(1.08); } }
@media (max-width: 640px) { .hero h1 .hero__w { margin-inline: auto; transform-origin: center; } }
.hero__lede { max-width: 34ch; font-size: clamp(1.125rem, 1.6vw, 1.35rem); margin: var(--space-xl) 0; color: var(--color-white); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-md); }
/* Crest: the logo is a slight oval (875×852), so the text follows a concentric oval with the same proportions */
.crest { display: block; justify-self: center; width: min(500px, 100%); height: auto; overflow: visible; }
.crest { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.crest:focus { outline: none; }
.crest:focus-visible:not(:active) { filter: drop-shadow(0 0 10px var(--color-focus)); }
.crest__ring, .crest__img { transform-box: view-box; transform-origin: 531.5px 520px; }
/* efecto al pulsar el escudo: piezas que salen disparadas (las mueve main.js) */
.burst { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 60; will-change: transform, opacity; }
.burst--star { color: var(--color-gold); font-size: 22px; line-height: 1; text-shadow: 0 1px 0 var(--color-red-deep); }
.burst--ball { width: 14px; height: 14px; border-radius: 50%; background: #ffd335; box-shadow: inset 0 0 0 2px #aa7b00; }
.burst--bit { width: 10px; height: 6px; border-radius: 2px; }
.burst--wave { width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 4px solid var(--color-gold); }
.crest text { font-family: var(--font-display); font-weight: 600; font-size: 58px; fill: var(--color-white); text-transform: uppercase; }
@media (max-width: 860px) {
  .hero__grid { gap: var(--space-xl); }
  .hero h1 { font-size: 8.6vw; }
}
@media (max-width: 640px) {
  .hero { padding-block: var(--space-xl); }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); text-align: center; }
  .crest { width: min(240px, 66%); order: -1; }
  .hero h1 { font-size: clamp(3.2rem, 17vw, 5rem); }
  .hero__lede { margin: var(--space-lg) auto; }
  .hero__ctas { justify-content: center; }
}


/* ---------- Galería: carrusel de polaroids ---------- */
.gallery { --sec: var(--color-navy); background: var(--sec); padding-block: var(--space-3xl) var(--space-2xl); }
.gallery__track { display: flex; gap: var(--space-lg); overflow-x: auto; scroll-behavior: auto; padding: 2.5rem 0; cursor: grab; overscroll-behavior-x: contain; scrollbar-width: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { outline-offset: -6px; }
.sticker { flex: 0 0 clamp(220px, 24vw, 300px); margin: 0; background: var(--color-white); padding: .6rem .6rem 0; transform: rotate(var(--r, 0deg)); box-shadow: 0 10px 0 var(--color-red-deep); transition: transform 400ms var(--ease-out); }
.sticker:nth-child(4n+1) { --r: -3deg; } .sticker:nth-child(4n+2) { --r: 2deg; } .sticker:nth-child(4n+3) { --r: -1.5deg; } .sticker:nth-child(4n) { --r: 2.5deg; }
.sticker:nth-child(even) { margin-top: 1.5rem; }
@media (hover: hover) { .sticker:hover { transform: rotate(0deg) translateY(-6px); } }
.sticker img { aspect-ratio: 4/5; object-fit: cover; width: 100%; }
/* fotos de grupo apaisadas: misma altura que las verticales */
.sticker--wide { flex-basis: calc(clamp(220px, 24vw, 300px) * 1.5625 - 0.675rem); }
.sticker--wide img { aspect-ratio: 5/4; }
.gallery__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-md) var(--space-lg); }
.gallery__title { margin: 0; }
.gallery__tabs { display: flex; gap: .3rem; padding: .3rem; border-radius: 999px; background: oklch(18% 0.03 285 / 0.18); }
.gallery__tab { border: 0; border-radius: 999px; padding: .55rem 1.1rem; min-height: 44px; box-sizing: border-box; background: transparent; color: var(--color-white); font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.gallery__tab[aria-selected="true"] { background: var(--color-white); color: var(--color-red-deep); }
@media (hover: hover) { .gallery__tab[aria-selected="false"]:hover { background: oklch(99% 0 0 / 0.15); } }
.gallery__tab:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.gallery__sub { margin-top: var(--space-sm); margin-bottom: 0; color: var(--color-white-soft); }
@media (max-width: 600px) {
  .gallery__tabs { width: 100%; }
  .gallery__tab { flex: 1; padding: .55rem .4rem; font-size: .85rem; }
}
.sticker figcaption { color: var(--color-ink); font-weight: 700; padding: .6rem .2rem .8rem; font-size: .95rem; }
.gallery__nav { display: flex; justify-content: flex-end; gap: var(--space-sm); }
.gallery__btn { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--color-white); background: transparent; color: var(--color-white); display: grid; place-items: center; cursor: pointer; transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.gallery__btn svg { width: 18px; height: 18px; }

/* ---------- Matchday programme ---------- */
.programme { --sec: var(--color-navy); background: var(--sec); padding-block: var(--space-3xl); }
#eventos.programme { --sec: oklch(21% 0.05 250); } /* home: cada seccion con su color */
.programme__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-lg); margin-bottom: var(--space-2xl); }
h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.25rem, 6vw, 4.5rem); line-height: .92; margin: 0; overflow-wrap: normal; word-break: normal; min-width: 0; text-wrap: balance; }
.programme__head p { max-width: 38ch; margin: 0; color: var(--color-white-soft); }

.featured { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-xl); align-items: center; background: var(--color-navy-2); border-radius: 24px; padding: var(--space-lg) var(--space-xl); margin-bottom: var(--space-lg); }
.featured img { width: clamp(120px, 14vw, 170px); margin-inline: auto; }
/* el logo de MadKlask sobre un círculo blanco, para que se lea sobre el fondo azul */
.featured .featured__badge { background: #fff; border-radius: 50%; padding: 7%; box-sizing: border-box; }
.featured h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.2rem); text-transform: uppercase; line-height: 1; margin: 0 0 var(--space-sm); }
.tag { display: inline-block; font-weight: 700; font-size: .85rem; background: var(--color-red); padding: .3rem .75rem; border-radius: var(--radius); margin-bottom: var(--space-md); }
.featured p { color: var(--color-white-soft); max-width: 50ch; }
@media (max-width: 760px) { .featured { grid-template-columns: minmax(0, 1fr); padding: var(--space-lg); gap: var(--space-md); } }

.fixtures { list-style: none; margin: 0; padding: 0; }
.fixture { display: grid; grid-template-columns: 7rem minmax(0, 1fr) auto; gap: var(--space-lg); align-items: center; padding-block: var(--space-lg); }
.fixture + .fixture { border-top: 2px solid oklch(99% 0 0 / 0.15); }
.fixture__date { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--color-sky); }
.fixture__date small { display: block; font-family: var(--font-body); font-size: .8rem; font-weight: 500; color: var(--color-white-soft); margin-top: .3rem; }
.fixture h3 { margin: 0; font-size: 1.25rem; }
.fixture p { margin: .2rem 0 0; color: var(--color-white-soft); }
.fixture .btn { padding: .6rem 1rem; font-size: .9rem; }
@media (max-width: 640px) { .fixture { grid-template-columns: 5rem minmax(0, 1fr); } .fixture .btn { grid-column: 2; justify-self: start; } }

/* ---------- Views band ---------- */
.views { background: var(--color-navy); padding-block: var(--space-3xl); }
.views__big { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(3rem, 10vw, 8.5rem); line-height: .9; margin: 0; overflow-wrap: anywhere; min-width: 0; font-variant-numeric: tabular-nums; }
.views__label { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; color: var(--color-gold); font-size: clamp(1.4rem, 3.4vw, 2.6rem); line-height: 1; margin: var(--space-sm) 0 var(--space-2xl); }
.views__note { margin: var(--space-lg) 0 0; font-size: .85rem; color: var(--color-white-soft); }
/* redes: cabecera de perfil al estilo de cada app y sus 3 vídeos más vistos */
.socialboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); }
.profile { background: oklch(99% 0 0 / 0.06); border: 1px solid oklch(99% 0 0 / 0.12); border-radius: 24px; padding: var(--space-lg); min-width: 0; }
.profile__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-md); align-items: center; }
.profile__avatar { width: 76px; height: 76px; border-radius: 50%; padding: 3px; display: block; }
.profile--ig .profile__avatar { background: conic-gradient(from 210deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); }
.profile--yt .profile__avatar { background: #ff0033; }
.profile__avatar img { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--color-navy); background: var(--color-red); object-fit: cover; display: block; }
.profile__name { margin: 0; font-weight: 700; font-size: 1.15rem; display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; }
.profile__net { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 999px; background: oklch(99% 0 0 / 0.12); color: var(--color-white-soft); }
.profile__stats { list-style: none; margin: .45rem 0 0; padding: 0; display: flex; gap: 1.6rem; color: var(--color-white-soft); font-size: .85rem; }
.profile__stats li { display: flex; flex-direction: column; white-space: nowrap; line-height: 1.15; }
.profile__stats b { color: var(--color-white); font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; line-height: 1.05; }
.profile__cta { align-self: center; text-decoration: none; font-weight: 700; font-size: .92rem; padding: .6rem 1.1rem; border-radius: 10px; color: #fff; transition: transform var(--dur) var(--ease-out), filter var(--dur) var(--ease-out); }
@media (hover: hover) { .profile__cta:hover { transform: translateY(-2px); filter: brightness(1.08); } }
.profile__lede { margin: var(--space-lg) 0 var(--space-sm); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-white-soft); }
.vids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.vid { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; color: #fff; text-decoration: none; background: oklch(20% 0.04 285); isolation: isolate; }
.vid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); z-index: -2; }
.vid::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, oklch(12% 0.04 285 / 0.92) 0%, oklch(12% 0.04 285 / 0.35) 38%, transparent 62%); }
.vid__views { position: absolute; left: .7rem; right: .5rem; bottom: .65rem; display: flex; align-items: center; gap: .35rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.15rem, 2.2vw, 1.75rem); line-height: 1; text-shadow: 0 2px 10px oklch(0% 0 0 / 0.5); white-space: nowrap; }
.vid__views svg { width: .85em; height: .85em; flex: none; }
.vid__title { position: absolute; left: .7rem; right: .6rem; top: .6rem; font-size: .72rem; font-weight: 700; line-height: 1.2; text-shadow: 0 1px 6px oklch(0% 0 0 / 0.7); }
.profile--yt .vid__title { top: auto; bottom: calc(.65rem + clamp(1.15rem, 2.2vw, 1.75rem) + .35rem); }
@media (hover: hover) { .vid:hover img { transform: scale(1.06); } }
.vid:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
/* vídeos recomendados: dos finales completas, sin cifra de visualizaciones */
.highlights { margin-top: var(--space-2xl); }
.highlights__lede { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.2rem, 2.6vw, 1.8rem); margin: 0 0 var(--space-md); }
.highlights__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); }
.highlight { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; color: var(--color-white); text-decoration: none; background: oklch(20% 0.04 285); isolation: isolate; border: 2px solid oklch(99% 0 0 / 0.18); transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.highlight img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 600ms var(--ease-out); }
.highlight::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, oklch(12% 0.04 285 / 0.88) 0%, transparent 55%); }
.highlight__title { position: absolute; left: .8rem; right: .8rem; bottom: .65rem; font-weight: 700; font-size: .92rem; line-height: 1.35; text-shadow: 0 1px 6px oklch(0% 0 0 / 0.6); }
.highlight__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: clamp(44px, 10vw, 60px); height: clamp(44px, 10vw, 60px); display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--color-white); background: oklch(10% 0.02 285 / 0.55); color: var(--color-white); pointer-events: none; transition: background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.highlight__play svg { width: 42%; height: 42%; }
@media (hover: hover) { .highlight:hover { border-color: var(--color-white); } .highlight:hover img { transform: scale(1.06); } .highlight:hover .highlight__play { background: var(--color-red); transform: translate(-50%, -50%) scale(1.08); } }
.highlight:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
@media (max-width: 640px) { .highlights__grid { grid-template-columns: minmax(0, 1fr); } .highlight__title { font-size: .85rem; } }
@media (max-width: 1000px) { .socialboard { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 380px) {
  .profile__stats { flex-direction: column; gap: .3rem; }
  .profile__stats li { flex-direction: row; align-items: baseline; gap: .4rem; }
}
@media (max-width: 520px) {
  .profile { padding: var(--space-md); border-radius: 20px; }
  .profile__head { grid-template-columns: auto minmax(0, 1fr); }
  .profile__avatar { width: 62px; height: 62px; }
  .profile__cta { grid-column: 1 / -1; text-align: center; }
  .vid__views { font-size: 1.05rem; left: .45rem; bottom: .5rem; }
  .vid__title { font-size: .62rem; left: .45rem; }
  .profile--yt .vid__title { bottom: calc(.5rem + 1.05rem + .3rem); }
}

/* ---------- History (palmarés) ---------- */
.history { --sec: var(--color-red-deep); background: var(--sec); padding-block: var(--space-3xl); }
.history__intro p { max-width: 40ch; font-size: 1.15rem; margin: var(--space-md) 0 0; }
.history__intro { position: sticky; top: 96px; }
.history__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--space-2xl); align-items: start; }
.history h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 var(--space-md); color: var(--color-navy); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr) auto; gap: var(--space-md); align-items: center; padding-block: .85rem; }
.timeline li + li { border-top: 2px solid oklch(99% 0 0 / 0.22); }
.timeline time { font-family: var(--font-display); font-weight: 600; font-size: .95rem; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* cuando la fila tiene una línea de más (una pequeña bajo el nombre), la fecha se alinea con el nombre, no con el bloque entero */
.timeline li:has(small) time, .timeline__btn:has(small) time { align-self: start; }
.timeline b { display: block; font-size: 1.05rem; line-height: 1.25; }
.timeline small { display: block; color: var(--color-white-soft); font-size: .88rem; }
.place { display: inline-flex; align-items: center; line-height: 1; font-family: var(--font-display); font-weight: 800; font-size: .9rem; white-space: nowrap; padding: .35rem .7rem; border-radius: var(--radius); border: 2px solid var(--color-silver); background: var(--color-silver); color: var(--color-ink); }
.place--gold { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-ink); }
.place--bronze { background: var(--color-bronze); border-color: var(--color-bronze); color: var(--color-ink); }
.place--next { background: var(--color-navy); border-color: var(--color-navy); color: var(--color-white); }
@media (max-width: 900px) { .history__cols { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); } .history__intro { position: static; } }

/* ---------- Map (dot map of Europe, Natural Earth data) ---------- */
.intl { --sec: oklch(29% 0.1 305); background: var(--sec); padding-block: var(--space-3xl); }
.intl__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--space-2xl); align-items: center; }
.intl h2 { font-size: clamp(1.8rem, 3.4vw, 3rem); }
.intl__side > p { color: var(--color-white-soft); max-width: 44ch; margin: var(--space-md) 0 var(--space-xl); }
.intl .map { max-width: 680px; width: 100%; justify-self: center; }
@media (max-width: 900px) { .intl h2 { font-size: min(8vw, 3.4rem); } .intl__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); } .intl__side > p { margin: 0; } .intl .map { order: -1; } .intl__side { display: contents; } .intl__side > h2, .intl__side > p { order: -2; } }
.map { position: relative; aspect-ratio: 630 / 690; }
.map img { width: 100%; height: 100%; }
.pin { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer; color: var(--color-white); font: inherit; }
.pin__dot { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--color-white); box-shadow: 0 0 0 4px var(--sec, var(--color-navy)); transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.pin--win .pin__dot { background: var(--color-gold); }
.pin--bronze .pin__dot { background: var(--color-bronze); }
.pin--next .pin__dot { position: relative; background: var(--color-live); }
/* dos ondas que salen del punto, como un radar */
.pin--next .pin__dot::before, .pin--next .pin__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--color-live); opacity: 0; animation: ping 2.4s var(--ease-out) infinite; pointer-events: none; }
.pin--next .pin__dot::after { animation-delay: 1.2s; }
@media (prefers-reduced-motion: reduce) { .pin--next .pin__dot::before { animation: none; opacity: .35; transform: scale(2); } .pin--next .pin__dot::after { display: none; } }
.pin__when { margin-left: .4em; padding-left: .4em; border-left: 1px solid oklch(99% 0 0 / 0.35); color: var(--color-gold); }
.pin[aria-pressed="true"] .pin__when { color: var(--color-red-deep); border-color: oklch(26% 0.07 285 / 0.3); }
/* zona de toque de 44 px alrededor del punto (en el móvil el punto solo mide 11 px) */
.pin::before { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; }
/* ciudades muy juntas: cada una se queda con su mitad, la del lado de su nombre */
.pin--hit-l::before { width: 30px; transform: translate(-90%, -50%); }
.pin--hit-r::before { width: 30px; transform: translate(-10%, -50%); }
.pin--hit-t::before { height: 30px; transform: translate(-50%, -90%); }
.pin--hit-b::before { height: 30px; transform: translate(-50%, -10%); }
@keyframes ping { from { transform: scale(1); opacity: .6; } to { transform: scale(3.2); opacity: 0; } }
.pin__label { position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); font-family: var(--font-display); font-weight: 600; font-size: clamp(.68rem, 1.4vw, .85rem); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; background: color-mix(in oklch, var(--sec, var(--color-navy)) 80%, transparent); padding: .1rem .35rem; border-radius: 6px; }
.pin__label--l { left: auto; right: calc(100% + 6px); }
.pin__label--t { left: 50%; top: auto; bottom: calc(100% + 6px); transform: translateX(-50%); }
.pin__label--b { left: 50%; top: calc(100% + 6px); transform: translateX(-50%); }
.pin[aria-pressed="true"] .pin__dot { transform: scale(1.35); box-shadow: 0 0 0 4px var(--sec, var(--color-navy)), 0 0 0 7px var(--color-white); }
@media (hover: hover) { .pin:hover .pin__dot { transform: scale(1.35); box-shadow: 0 0 0 4px var(--sec, var(--color-navy)), 0 0 0 7px var(--color-white); } }
.pin[aria-pressed="true"] .pin__label { background: var(--color-white); color: var(--color-navy); }
.pin:focus-visible { outline: none; }
.pin:focus-visible .pin__dot { box-shadow: 0 0 0 4px var(--sec, var(--color-navy)), 0 0 0 7px var(--color-focus); }
.map__panel { min-height: 9rem; }
.map__panel .map__end { display: inline-flex; align-items: center; gap: .5rem; }
.map__panel .timeline__btn .map__end svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease-out); }
@media (hover: hover) { .map__panel .timeline__btn:hover .map__end svg { transform: translateX(3px); } }
.map__panel h3, .map__panel h4 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.5rem; margin: 0 0 var(--space-sm); }
.map__panel .timeline li { border-color: oklch(99% 0 0 / 0.15); }
.map__panel .place--next { background: var(--color-red-deep); border-color: var(--color-red-deep); color: var(--color-white); }
.intl__ranking { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; margin-top: var(--space-lg); justify-self: start; }
.intl__ranking small { font-weight: 500; opacity: .7; }
.intl__ranking svg { width: 14px; height: 14px; }
.map__legend { display: flex; flex-wrap: wrap; gap: var(--space-lg); margin-top: var(--space-md); font-size: .85rem; color: var(--color-white-soft); }
.lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--color-silver); margin-right: .45rem; vertical-align: 0; }
.lg--win::before { background: var(--color-gold); }
.lg--bronze::before { background: var(--color-bronze); }
.lg--next::before { background: var(--color-live); box-shadow: 0 0 0 3px oklch(66% 0.21 27 / 0.3); }

/* ---------- Social icons ---------- */
.socials { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-top: var(--space-2xl); padding-top: var(--space-xl); border-top: 2px solid oklch(18% 0.03 285 / 0.12); }
.social { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--color-ink); font-weight: 700; white-space: nowrap; padding: .45rem 1.1rem .45rem .45rem; border-radius: 18px; background: oklch(18% 0.03 285 / 0.06); transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out); }
/* mismo formato para todos: cuadrado redondeado tipo icono de app */
.social svg { width: 44px; height: 44px; padding: 10px; border-radius: 13px; fill: var(--color-white); background: var(--brand); }
@media (hover: hover) { .social:hover { transform: translateY(-3px); background: oklch(18% 0.03 285 / 0.1); } }
.social--instagram { --brand: var(--color-instagram); }
.social--instagram svg { background: radial-gradient(circle at 30% 107%, var(--color-ig-1) 0%, var(--color-ig-1) 5%, var(--color-ig-2) 45%, var(--color-ig-3) 60%, var(--color-ig-4) 90%); }
.social--youtube { --brand: var(--color-youtube); }
.social--facebook { --brand: var(--color-facebook); }
.social--whatsapp { --brand: var(--color-whatsapp); }
@media (max-width: 420px) { .timeline li { grid-template-columns: minmax(0, 1fr) auto; } .timeline time { grid-column: 1 / -1; } }

/* ---------- How to score ---------- */
.rules { --sec: oklch(45% 0.11 255); background: var(--sec); padding-block: var(--space-3xl); }
.rules__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xl) var(--space-2xl); align-items: end; margin-bottom: var(--space-2xl); }
.rules__head p { margin: 0; max-width: 46ch; font-size: 1.15rem; }
.rules__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-md); }
.rule { background: var(--color-white); color: var(--color-ink); border-radius: 24px; padding: var(--space-xl) var(--space-lg); display: flex; flex-direction: column; }
.rule:nth-child(even) { background: var(--color-navy); color: var(--color-white); }
.rule { --card: var(--color-white); }
.rule:nth-child(even) { --card: var(--color-navy); }
.rule__icon { display: block; color: var(--color-navy); margin-bottom: var(--space-lg); }
.rule:nth-child(even) .rule__icon { color: var(--color-white); }
.rule__icon svg { display: block; width: 132px; height: 104px; margin-left: -10px; fill: currentColor; }
.rule__icon .stroke { fill: none; stroke: currentColor; }
.rule__icon .cut { stroke: var(--card); stroke-width: 1.6; }
.rule__icon .spark line { stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.rule__icon .dots { stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 0.1 4.5; }
.rule h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.3rem; line-height: 1.05; margin: 0 0 var(--space-sm); }
.rule p { margin: 0; font-size: 1rem; line-height: 1.5; }
.rules__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-lg); margin-top: var(--space-2xl); padding-top: var(--space-xl); border-top: 2px solid oklch(99% 0 0 / 0.22); }
.rules__foot p { margin: 0; font-weight: 700; font-size: 1.3rem; }
@media (max-width: 960px) { .rules__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rules__head { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .rules__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Statement footer ---------- */
.foot { background: var(--color-white); color: var(--color-red-deep); padding-block: var(--space-3xl) var(--space-xl); }
.foot__big { color: var(--color-red); font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(4rem, 16vw, 13rem); line-height: .82; margin: 0; overflow-wrap: anywhere; }
.foot__row { display: flex; flex-wrap: wrap; gap: var(--space-xl); justify-content: space-between; align-items: end; margin-top: var(--space-2xl); color: var(--color-ink); }
.foot__row p { margin: 0; max-width: 40ch; }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.foot .btn--solid { background: var(--color-red); color: var(--color-white); border-color: var(--color-red); }
.foot .btn--ghost { color: var(--color-navy); }
.foot small { display: block; margin-top: var(--space-2xl); color: var(--color-ink); opacity: .75; }
/* el enlace va en una línea pequeña, pero su zona de toque real llega a 44 px sin mover el texto alrededor */
.foot small a { display: inline-block; padding-block: 13px; margin-block: -13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 120ms !important; scroll-behavior: auto !important; }
}

[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--color-white); color: var(--color-ink); padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Resultados: torneos clicables + ventana ---------- */
.timeline li.timeline__item--link { display: block; padding: 0; }
.timeline__btn { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr) auto; gap: var(--space-md); align-items: center; width: 100%; padding: .85rem .6rem; margin-inline: -.6rem; box-sizing: content-box; background: none; border: 0; border-radius: 12px; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color var(--dur) var(--ease-out); }
@media (hover: hover) { .timeline__btn:hover { background: oklch(99% 0 0 / 0.1); } }
.timeline__more { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; font-weight: 700; white-space: nowrap; padding: .35rem .5rem .35rem .75rem; border-radius: var(--radius); background: var(--color-navy); color: var(--color-white); transition: transform var(--dur) var(--ease-out); }
.timeline__more svg { width: 14px; height: 14px; }
@media (hover: hover) { .timeline__btn:hover .timeline__more { transform: translateX(3px); } }
@media (max-width: 420px) { .timeline__btn { grid-template-columns: minmax(0, 1fr) auto; } .timeline__btn time { grid-column: 1 / -1; } }

.res-dialog { width: min(440px, calc(100% - 2rem)); max-height: min(75vh, 640px); padding: 0; border: 0; border-radius: 22px; background: var(--color-navy); color: var(--color-white); box-shadow: 0 30px 80px oklch(10% 0.04 285 / 0.6); overflow: hidden; }
.res-dialog[open] { display: flex; flex-direction: column; animation: pop 220ms var(--ease-out); }
.res-dialog::backdrop { background: oklch(14% 0.04 285 / 0.6); }
/* foto en grande: en medio, sin ocupar toda la pantalla */
.photo-dialog { padding: .6rem; border: 0; border-radius: 18px; background: var(--color-white); box-shadow: 0 30px 80px oklch(10% 0.04 285 / 0.6); overflow: visible; max-width: none; max-height: none; }
.photo-dialog::backdrop { background: oklch(14% 0.04 285 / 0.75); }
.photo-dialog[open] { animation: pop 260ms var(--ease-out); }
.photo-dialog img { display: block; width: auto; height: auto; max-width: min(900px, calc(100vw - 4rem)); max-height: min(78vh, calc(100vh - 8rem)); border-radius: 12px; background: oklch(90% 0 0); }
.photo-dialog__close { position: absolute; top: -14px; right: -14px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--color-white); background: var(--color-navy); color: var(--color-white); cursor: pointer; }
.photo-dialog__close svg { width: 16px; height: 16px; }
@media (max-width: 600px) { .photo-dialog img { max-width: calc(100vw - 2.4rem); } .photo-dialog__close { top: -12px; right: -8px; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.res-dialog__head { display: flex; justify-content: space-between; align-items: start; gap: var(--space-md); padding: var(--space-lg) var(--space-lg) var(--space-md); border-bottom: 1px solid oklch(99% 0 0 / 0.15); }
.res-dialog__head h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.35rem; line-height: 1.05; margin: 0; }
.res-dialog__date { margin: .3rem 0 0; font-size: .9rem; color: var(--color-white-soft); }
.res-dialog__close { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 0; background: oklch(99% 0 0 / 0.1); color: var(--color-white); cursor: pointer; }
@media (hover: hover) { .res-dialog__close:hover { background: oklch(99% 0 0 / 0.2); } }
.res-dialog__close svg { width: 14px; height: 14px; }
.res-dialog .res__list { overflow-y: auto; padding: var(--space-sm) calc(var(--space-lg) + 12px) var(--space-md) var(--space-lg); margin: 0; list-style: none; scrollbar-width: none; overscroll-behavior: contain; }
.res-dialog .res__list::-webkit-scrollbar { display: none; }
.res__list li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); align-items: baseline; padding-block: .6rem; border-top: 1px solid oklch(99% 0 0 / 0.12); font-weight: 500; }
.res__list li:first-child { border-top: 0; }
.res__pos { font-family: var(--font-display); font-weight: 800; color: var(--color-gold); }
.res__pos--txt { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 600px) { .pin__dot { width: 11px; height: 11px; box-shadow: 0 0 0 3px oklch(26% 0.07 285 / 0.9); } .pin__label { font-size: .62rem; } }

/* ---------- Dónde jugamos: mapa de Madrid ---------- */
.venues-section { --sec: var(--color-red-deep); background: var(--sec); padding-bottom: var(--space-3xl); }
.venues { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--space-2xl); align-items: center; background: var(--color-navy); border-radius: 28px; padding: clamp(1.25rem, 3vw, 2.5rem); }
.venues h2 { color: var(--color-white); font-size: clamp(1.5rem, 3vw, 2.1rem); }
.venues__hint { margin: -.2rem 0 var(--space-lg); color: var(--color-white-soft); font-size: .95rem; }
.venue__addr { margin: -.35rem 0 var(--space-md); color: var(--color-white-soft); font-size: .9rem; }
.venue__dir { display: inline-flex; align-items: center; padding-block: 10px; margin-block: -10px; color: var(--color-gold); font-weight: 700; text-decoration: underline; text-underline-offset: .15em; }
@media (hover: hover) { .venue__dir:hover { color: var(--color-white); } }
.map--madrid { aspect-ratio: 600 / 397; width: 100%; max-width: 760px; justify-self: center; }
.map__overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.map__overlay .mborder { fill: none; stroke: oklch(99% 0 0 / 0.35); stroke-width: 1.1; stroke-dasharray: 3 3; stroke-linejoin: round; }
.map__overlay .mriver { fill: none; stroke: var(--color-sky); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .95; }
.map__overlay .mlab { font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; fill: oklch(99% 0 0 / 0.55); text-anchor: middle; paint-order: stroke; stroke: var(--color-navy); stroke-width: 3px; }
.map__overlay .mlab--on { fill: var(--color-white); }
.map__overlay .mlab--park { fill: var(--color-park); font-size: 10px; }
.map__overlay .mlab--river { fill: var(--color-sky); font-size: 9.5px; }
@media (max-width: 1100px) {
  .venues { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  .venues__side { display: contents; }
  .venues__side > h2, .venues__hint { order: -2; }
  .map--madrid { order: -1; }
}
.venues .timeline__more { background: oklch(99% 0 0 / 0.14); }

/* Lista de cada sitio: fecha encima y nombre a todo el ancho */
.venues .timeline__btn, .venues .timeline li:not(.timeline__item--link) { grid-template-columns: minmax(0, 1fr) auto; row-gap: .15rem; }
.venues .timeline time { grid-column: 1; grid-row: 1; font-size: .85rem; color: var(--color-white-soft); }
.venues .timeline li > div, .venues .timeline__btn > div { grid-column: 1; grid-row: 2; }
.venues .timeline li:not(.timeline__item--link) > div { grid-column: 1 / -1; }
.venues .timeline__btn .timeline__more { grid-row: 1 / span 2; grid-column: 2; align-self: center; }

.map__overlay .mscale path { fill: none; stroke: oklch(99% 0 0 / 0.7); stroke-width: 1.5; }
.map__overlay .mlab--scale { fill: oklch(99% 0 0 / 0.8); font-size: 9.5px; }
/* Móvil: textos del mapa más grandes y solo los importantes */
@media (max-width: 600px) {
  .map__overlay .mlab { font-size: 19px; stroke-width: 5px; }
  .map__overlay .mlab--park { font-size: 17px; }
  .map__overlay .mlab--river, .map__overlay .mlab--scale { font-size: 15px; }
  .map__overlay .mlab--minor, .map__overlay .mlab--river { display: none; }
}
.pin__label .l-short { display: none; }
@media (max-width: 600px) { .map--madrid .pin__label .l-long { display: none; } .map--madrid .pin__label .l-short { display: inline; } }

/* ---------- Cómo se marca: tablero animado ---------- */
.klask-demo { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--space-xl); align-items: center; }
/* marco como la pantalla del juego: fondo oscuro y borde dorado */
.kd-stage { position: relative; padding: clamp(.6rem, 2vw, 1.4rem) clamp(.6rem, 2vw, 1.4rem) clamp(1.6rem, 3.4vw, 2.6rem); border-radius: 18px; background: radial-gradient(circle at 50% 45%, var(--color-shell-1), var(--color-shell-2) 72%); box-shadow: 0 0 0 4px var(--color-shell-gold), 0 0 0 7px var(--color-shell-gold-2), 0 26px 40px oklch(20% 0.08 27 / 0.45); }
.kd-board { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 18px oklch(5% 0 0 / 0.5)); transition: opacity 120ms linear; }
.kd-board .kd-track text { font-family: var(--font-body); font-weight: 700; font-size: 16px; fill: rgba(45, 32, 18, .9); text-anchor: middle; dominant-baseline: middle; }
.kd-made { position: absolute; right: clamp(.8rem, 2.4vw, 1.8rem); bottom: clamp(.3rem, 1vw, .7rem); margin: 0; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: clamp(.55rem, 1.1vw, .8rem); color: oklch(99% 0 0 / 0.78); }
/* botón para pausar la animación del tablero, centrado sobre el tablero azul */
.kd-pause { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; width: clamp(48px, 11vw, 68px); height: clamp(48px, 11vw, 68px); padding: 0; display: grid; place-items: center; border-radius: 50%; border: 2px solid oklch(99% 0 0 / 0.85); background: oklch(10% 0.04 285 / 0.5); color: oklch(99% 0 0 / 0.95); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.kd-pause svg { width: 38%; height: 38%; }
.kd-pause .ic-play { display: none; }
.kd-pause[aria-pressed="true"] .ic-pause { display: none; }
.kd-pause[aria-pressed="true"] .ic-play { display: block; }
/* el botón de pausa solo aparece al pasar el ratón por el tablero; el de reanudar (ya en pausa) se queda siempre visible */
@media (hover: hover) {
  .kd-pause { opacity: 0; transition: opacity var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out); }
  .kd-stage:hover .kd-pause, .kd-pause:focus-visible, .kd-pause[aria-pressed="true"] { opacity: 1; }
  .kd-pause:hover { background: oklch(10% 0.04 285 / 0.7); }
}
/* en móvil no hay hover: el botón se ve un momento y luego se esconde solo (JS añade .kd-stage--hide); si está en pausa se queda visible */
@media (hover: none) {
  .kd-pause { transition: opacity 500ms var(--ease-out); }
  .kd-stage--hide .kd-pause:not([aria-pressed="true"]) { opacity: 0; }
}
.kd-board .kd-striker, .kd-board .kd-biscuit, .kd-board #kdBallG, .kd-board #kdFlash { transform-box: view-box; }
.kd-pop { position: absolute; left: 50%; bottom: 11%; transform: translate(-50%, 0) scale(.6); opacity: 0; pointer-events: none; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(.9rem, 2vw, 1.35rem); white-space: nowrap; background: var(--color-gold); color: var(--color-ink); padding: .45rem .9rem; border-radius: 999px; box-shadow: 0 10px 24px oklch(15% 0.05 285 / 0.4); }
.kd-pop.is-on { animation: kdPop 1.6s var(--ease-out) forwards; }
@keyframes kdPop { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 25% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -8px) scale(1); } }
.kd-tabs { display: grid; gap: var(--space-sm); }
.kd-tab { position: relative; overflow: hidden; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: var(--space-md); align-items: center; text-align: left; padding: var(--space-md) var(--space-lg); border-radius: 18px; border: 0; cursor: pointer; background: oklch(99% 0 0 / 0.1); color: var(--color-white); font: inherit; transition: background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
@media (hover: hover) { .kd-tab:hover { background: oklch(99% 0 0 / 0.18); } }
.kd-tab[aria-selected="true"] { background: var(--color-white); color: var(--color-ink); transform: translateX(-4px); }
.kd-tab__n { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; background: oklch(99% 0 0 / 0.15); }
.kd-tab[aria-selected="true"] .kd-tab__n { background: var(--color-red); color: var(--color-white); }
.kd-tab b { display: block; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.15rem; line-height: 1.05; }
.kd-tab small { display: block; margin-top: .2rem; font-size: .92rem; opacity: .85; }
.kd-tab__bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--color-navy); transform-origin: left; transform: scaleX(var(--p, 0)); opacity: 0; }
.kd-tab[aria-selected="true"] .kd-tab__bar { opacity: 1; }
@media (max-width: 1000px) {
  .klask-demo { grid-template-columns: minmax(0, 1fr); }
  .kd-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kd-tab[aria-selected="true"] { transform: none; }
}
@media (max-width: 520px) {
  .kd-tab { grid-template-columns: minmax(0, 1fr); gap: .4rem; padding: var(--space-sm) var(--space-md); }
  .kd-tab__n { width: 2rem; height: 2rem; font-size: 1rem; }
  .kd-tab small { display: none; }
  .kd-tab b { font-size: 1rem; }
}
/* galería: se arrastra; al pasar por una foto, lupa para verla en grande */
.gallery__track.is-dragging { cursor: grabbing; user-select: none; }
.gallery__track.is-dragging .sticker { pointer-events: none; }
.sticker { cursor: zoom-in; }
.gallery__track.is-dragging, .gallery__track.is-dragging .sticker { cursor: grabbing; }
.sticker:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }


/* formulario de contacto */
.contact-dialog { width: min(520px, calc(100% - 2rem)); max-height: min(92vh, 740px); flex-direction: column; }
.contact-dialog[open] { display: flex; }
.contact-dialog[open] { animation: pop 260ms var(--ease-out); }
.contact { display: grid; gap: var(--space-md); padding: var(--space-lg); overflow-y: auto; }
.contact__field { display: grid; gap: .35rem; font-weight: 700; font-size: .9rem; }
.contact__field input, .contact__field textarea { width: 100%; font: 500 1rem/1.4 var(--font-body); color: var(--color-white); background: oklch(99% 0 0 / 0.08); border: 2px solid oklch(99% 0 0 / 0.2); border-radius: 12px; padding: .75rem .9rem; transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out); }
.contact__field textarea { resize: vertical; min-height: 7.5rem; }
.contact__field input::placeholder { color: oklch(99% 0 0 / 0.4); }
.contact__field input:focus, .contact__field textarea:focus { outline: none; border-color: var(--color-gold); background: oklch(99% 0 0 / 0.12); }
.contact__field input[aria-invalid="true"], .contact__field textarea[aria-invalid="true"] { border-color: var(--color-live); }
.contact__err { display: none; margin: -.1rem 0 0; font-weight: 600; font-size: .8rem; color: var(--color-live); }
.contact__field input[aria-invalid="true"] ~ .contact__err, .contact__field textarea[aria-invalid="true"] ~ .contact__err { display: block; }
.contact__trap { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.contact__status { margin: 0; min-height: 1.3em; font-size: .92rem; color: var(--color-white-soft); }
.contact__status.is-ok { padding: .5rem .75rem; border-radius: 10px; background: oklch(45% 0.16 145 / 0.22); color: var(--color-white); font-weight: 700; }
.contact__status.is-error { color: var(--color-live); font-weight: 700; }
.contact__send { justify-content: center; border-color: var(--color-white); }
.contact__send[disabled] { opacity: .6; cursor: progress; }

/* TODOS los botones: contorno blanco y fondo transparente; al pasar el ratón o pulsar se rellenan de blanco.
   (en el pie, que es blanco, lo mismo pero en rojo) */
.btn, .btn--solid, .btn--ghost, .profile__cta, .contact__send {
  background: transparent; color: var(--color-white); border: 2px solid var(--color-white); border-radius: var(--radius);
}
.btn:active, .btn--solid:active, .btn--ghost:active, .profile__cta:active, .contact__send:active, .gallery__btn:active { background: var(--color-white); color: var(--color-navy); transform: translateY(1px); }
@media (hover: hover) {
  .btn:hover, .btn--solid:hover, .btn--ghost:hover, .profile__cta:hover, .contact__send:hover, .gallery__btn:hover { background: var(--color-white); color: var(--color-navy); border-color: var(--color-white); transform: translateY(-2px); filter: none; }
}
.btn:focus-visible, .profile__cta:focus-visible, .contact__send:focus-visible { background: var(--color-white); color: var(--color-navy); }
.profile__cta, .profile--ig .profile__cta, .profile--yt .profile__cta { display: inline-block; font-weight: 700; padding: .6rem 1.1rem; border-radius: var(--radius); }
.foot .btn, .foot .btn--solid, .foot .btn--ghost { background: transparent; color: var(--color-red); border-color: var(--color-red); }
.foot .btn:active { background: var(--color-red); color: var(--color-white); }
@media (hover: hover) { .foot .btn:hover, .foot .btn--solid:hover, .foot .btn--ghost:hover { background: var(--color-red); color: var(--color-white); border-color: var(--color-red); } }
@media (max-width: 600px), (max-height: 760px) {
  .contact { gap: .7rem; padding: var(--space-md); }
  .contact__field { gap: .25rem; font-size: .85rem; }
  .contact__field input, .contact__field textarea { padding: .6rem .8rem; }
  .contact__field textarea { min-height: 5.2rem; }
  .contact-dialog .res-dialog__head { padding: var(--space-md); }
  .contact__status { min-height: 0; }
}

/* ---------- Menú ---------- */
html { scroll-padding-top: 64px; } /* = altura del menú: la sección queda justo debajo, sin franja de la anterior */
.nav__menu { margin-left: auto; }
.nav__links { display: flex; gap: .2rem; list-style: none; margin: 0; padding: .3rem; border-radius: 999px; background: oklch(99% 0 0 / 0.08); }
.nav__links a { display: flex; align-items: center; gap: .35rem; text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; padding: .5rem .95rem; border-radius: 999px; color: var(--color-white-soft); transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.nav__links a svg { width: 12px; height: 12px; opacity: .7; }
@media (hover: hover) { .nav__links a:hover { background: oklch(99% 0 0 / 0.14); color: var(--color-white); } }
.nav__links a[aria-current="true"] { background: var(--color-white); color: var(--color-navy); }
.nav__toggle { display: none; position: relative; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 2px solid var(--color-white); background: transparent; color: var(--color-white); cursor: pointer; flex: none; -webkit-tap-highlight-color: transparent; transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 300ms var(--ease-out), opacity 200ms var(--ease-out); }
.nav__toggle span:nth-child(1) { top: 13px; } .nav__toggle span:nth-child(2) { top: 19px; } .nav__toggle span:nth-child(3) { top: 25px; }
.nav__toggle[aria-expanded="true"] { background: var(--color-white); color: var(--color-navy); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (hover: hover) { .nav__toggle:hover { background: var(--color-white); color: var(--color-navy); } }
@media (max-width: 1100px) {
  .nav__toggle { display: block; }
  .nav__cta { margin-left: auto; }
  .nav__menu { position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: var(--color-navy); border-top: 1px solid oklch(99% 0 0 / 0.12); box-shadow: 0 24px 40px oklch(10% 0.04 285 / 0.45);
    max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; padding: var(--space-sm) 1rem var(--space-lg);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s linear 220ms; }
  .nav.is-open .nav__menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav__links { flex-direction: column; gap: 0; padding: 0; border-radius: 0; background: none; width: min(1240px, 100%); margin-inline: auto; }
  .nav__links li { border-bottom: 1px solid oklch(99% 0 0 / 0.1); }
  .nav__links li:last-child { border-bottom: 0; }
  .nav__links a { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; text-transform: uppercase; letter-spacing: .01em; padding: 1rem .25rem; border-radius: 0; color: var(--color-white); background: none; }
  .nav__links a svg { width: 18px; height: 18px; }
  .nav__links a[aria-current="true"] { background: none; color: var(--color-gold); }
  .nav__links a[aria-current="true"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-gold); margin-right: .2rem; }
  .nav.is-open .nav__links li { animation: navIn 320ms var(--ease-out) backwards; }
  .nav.is-open .nav__links li:nth-child(2) { animation-delay: 40ms; } .nav.is-open .nav__links li:nth-child(3) { animation-delay: 80ms; }
  .nav.is-open .nav__links li:nth-child(4) { animation-delay: 120ms; } .nav.is-open .nav__links li:nth-child(5) { animation-delay: 160ms; } .nav.is-open .nav__links li:nth-child(6) { animation-delay: 200ms; }
}
@keyframes navIn { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .nav__menu, .nav__toggle span { transition: none; } .nav.is-open .nav__links li { animation: none; } }

/* inicio en móvil: los dos botones en la misma fila */
@media (max-width: 819px) {
  .hero__ctas { flex-wrap: nowrap; gap: .5rem; }
  .hero__ctas .btn { flex: 1 1 0; min-width: 0; justify-content: center; padding: .85rem .4rem; font-size: .88rem; }
}
@media (max-width: 640px) { .hero__ctas { justify-content: center; } }
@media (max-width: 360px) { .hero__ctas .btn { font-size: .78rem; padding-inline: .25rem; } }


/* el escudo y el logo del menú crecen al pasar el ratón: se nota que se pueden pulsar */
.crest { transition: transform 350ms var(--ease-out); } /* crece todo junto: escudo y aro de texto */
.nav__brand { transition: transform 300ms var(--ease-out); transform-origin: left center; }
@media (hover: hover) {
  .crest:hover { transform: scale(1.06); }
  .nav__brand:hover { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { .crest:hover, .nav__brand:hover { transform: none; } }

/* barra de desplazamiento propia de la ventana de resultados: siempre visible (también en iPhone),
   se arrastra y, al pulsar en el carril, baja hasta ese punto */
.cbar { position: absolute; right: 8px; width: 10px; border-radius: 999px; background: oklch(99% 0 0 / 0.12); opacity: 0; pointer-events: none; touch-action: none; transition: opacity 200ms var(--ease-out), width 150ms var(--ease-out); cursor: pointer; }
.cbar::before { content: ""; position: absolute; inset: 0 -9px; } /* zona de toque más ancha */
.cbar.is-on { opacity: 1; pointer-events: auto; }
.cbar__thumb { position: absolute; left: 0; right: 0; top: 0; min-height: 40px; border-radius: 999px; background: var(--color-gold); box-shadow: 0 0 0 2px oklch(26% 0.07 285); cursor: grab; touch-action: none; }
.cbar.is-drag .cbar__thumb { cursor: grabbing; background: var(--color-white); }
@media (hover: hover) { .cbar:hover { width: 12px; } .cbar__thumb:hover { background: var(--color-white); } }

/* ---------- Menú: logo grande y alineado, botón de idioma ---------- */
.nav .wrap { align-items: center; }
.nav__brand { gap: .6rem; line-height: 1; }
.nav__brand img { width: 46px; height: 46px; flex: none; display: block; }
.nav__name { display: block; font-size: 1.15rem; line-height: 1; padding-top: .1em; } /* Kabel en mayúsculas queda alto: se baja un poco para centrarlo con el logo */
.nav__lang { flex: none; width: 44px; height: 44px; padding: 0; margin-left: .25rem; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--color-white); background: transparent; color: var(--color-white); font: 800 .78rem/1 var(--font-body); letter-spacing: .04em; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.nav__lang svg { width: 24px; height: 24px; }
.nav__lang:active { background: var(--color-white); color: var(--color-navy); }
@media (hover: hover) { .nav__lang:hover { background: var(--color-white); color: var(--color-navy); } }
.nav__join { display: none; }
@media (max-width: 1100px) {
  .nav__lang { margin-left: auto; }
  .nav__cta { margin-left: 0; }
}
@media (max-width: 700px) {
  .nav .wrap { gap: .5rem; }
  .nav__name > span { display: block; }   /* KLASK / MADRID en dos líneas: más grande en el mismo ancho */
  .nav__name { font-size: 1.2rem; line-height: .95; letter-spacing: .01em; }
  .nav__brand img { width: 46px; height: 46px; }
}
@media (max-width: 400px) { .nav__name { font-size: 1.08rem; } .nav__brand { gap: .45rem; } .nav__brand img { width: 42px; height: 42px; } .nav .btn { padding: .55rem .85rem; } }
@media (max-width: 340px) { .nav__cta { display: none; } .nav__join { display: block; } .nav__lang { margin-left: auto; } }

/* paneles de los mapas (internacionales y sedes): línea encima del primero y debajo del último */
.map__panel .timeline li:first-child { border-top: 2px solid oklch(99% 0 0 / 0.15); }
.map__panel .timeline li:last-child { border-bottom: 2px solid oklch(99% 0 0 / 0.15); }
/* enlace a la clasificación en klaskranking (se abre en otra pestaña) */
a.timeline__btn { text-decoration: none; color: inherit; }

/* botón para volver arriba: aparece al bajar, se ve sobre cualquier fondo (azul con borde blanco) */
.to-top { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 9; width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--color-white); background: var(--color-navy); color: var(--color-white); cursor: pointer; box-shadow: 0 8px 22px oklch(10% 0.04 285 / 0.45); -webkit-tap-highlight-color: transparent;
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out), visibility 0s linear 250ms, background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.to-top svg { width: 22px; height: 22px; }
.to-top.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:active { background: var(--color-white); color: var(--color-navy); }
@media (hover: hover) { .to-top.is-on:hover { background: var(--color-white); color: var(--color-navy); transform: translateY(-3px); } }
@media (max-width: 700px) { .to-top { bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; opacity: .88; } .to-top.is-on { opacity: .88; } .to-top:active, .to-top:focus-visible { opacity: 1; } } /* por encima de la barra inferior del móvil, algo transparente para no tapar del todo lo que hay debajo */
@media (prefers-reduced-motion: reduce) { .to-top { transition: opacity 120ms linear, visibility 0s linear 120ms; transform: none; } }
@media (max-width: 700px) { .foot { padding-bottom: calc(var(--space-xl) + 5.5rem); } } /* el botón de subir no tapa el texto final */
/* pie mínimo (solo el copyright, páginas de MadKlask): no hace falta tanto hueco como en el pie grande de la portada */
@media (max-width: 700px) { .foot--min { padding-bottom: calc(var(--space-md) + 2.2rem); } }
/* pie mínimo: sin el hueco grande de arriba del pie grande, y los enlaces como texto simple en vez de botones pastilla */
.foot--min { padding-top: var(--space-lg); }
.foot--min .foot__links { gap: var(--space-sm) var(--space-lg); margin-bottom: var(--space-md); }
.foot--min .foot__links a { font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: .2em; text-decoration-color: oklch(55% 0.2 25 / .4); }
.foot--min small { margin-top: 0; }
/* nav sin botón nav__cta (p.ej. /register): en móvil el nav__menu pasa a desplegable y deja de empujar lo demás a la derecha */
@media (max-width: 1100px) { .nav--plain .nav__lang { margin-left: auto; } }
@media (max-width: 700px) { .vitrina { padding-bottom: calc(var(--space-2xl) + 4rem); } } /* ni el último estante de la vitrina */

/* ---------- Vitrina de trofeos ---------- */
.vitrina { background: oklch(14% 0.04 285); color: var(--color-white); padding-block: var(--space-3xl); }
.vitrina h2 { color: var(--color-white); }
.vitrina__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-lg); margin-bottom: var(--space-2xl); }
.vitrina__head p { max-width: 38ch; margin: 0; color: var(--color-white-soft); }
.history__trophies, .intl__trophies { gap: .5rem; }
.history__trophies { margin-top: var(--space-lg); }
.history__trophies svg, .intl__trophies svg { width: 20px; height: 20px; flex: none; }
.intl__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: var(--space-lg); }
.intl__actions .intl__ranking { margin-top: 0; }

.cabinet { --wood: oklch(31% 0.08 285); position: relative; max-width: 980px; margin-inline: auto; padding-bottom: 34px; }
.cabinet__crown { position: relative; z-index: 2; margin: 0 -10px -10px; padding: .9rem 1rem 1.2rem; border-radius: 24px 24px 0 0; background: var(--color-navy); border: 3px solid var(--color-shell-gold); border-bottom: 0; text-align: center; box-shadow: 0 8px 0 var(--color-red-deep); }
.cabinet__crown span { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--color-gold); font-size: clamp(1rem, 2.8vw, 1.7rem); }
.cabinet__crown i { position: absolute; bottom: -7px; width: 56px; height: 12px; border-radius: 0 0 40px 40px; background: oklch(96% .07 92); box-shadow: 0 0 28px 12px oklch(92% .12 90 / .5); transform: translateX(-50%); }
.cabinet__crown i:nth-of-type(1) { left: 17%; } .cabinet__crown i:nth-of-type(2) { left: 50%; } .cabinet__crown i:nth-of-type(3) { left: 83%; }
.cabinet__body { position: relative; border: 14px solid var(--wood); border-top-width: 12px; border-radius: 0 0 6px 6px; padding-top: 18px; padding-bottom: 6px;
  background: radial-gradient(circle, oklch(99% 0 0 / 0.06) 1.5px, transparent 2px) 0 0 / 15px 15px, linear-gradient(180deg, oklch(25% 0.07 285), oklch(17% 0.05 285));
  box-shadow: inset 0 0 0 3px var(--color-shell-gold), inset 0 0 50px oklch(8% 0.04 285 / 0.7), 0 12px 0 var(--color-red-deep); }
.cabinet__glass { position: absolute; inset: 0; pointer-events: none; z-index: 4; background: linear-gradient(112deg, oklch(99% 0 0 / 0.13) 0 7%, transparent 7% 12%, oklch(99% 0 0 / 0.07) 12% 15%, transparent 15%); }
.cabinet__feet { display: flex; justify-content: space-between; padding-inline: 6%; margin-top: 12px; }
.cabinet__feet i { width: 70px; height: 30px; background: var(--color-navy); border-radius: 0 0 10px 10px; box-shadow: 0 6px 0 var(--color-red-deep); }

.shelf { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: clamp(.15rem, 2vw, 1.5rem); padding: 1.1rem clamp(.4rem, 3vw, 2rem) 0; margin-bottom: 34px; }
.shelf::after { content: ""; position: absolute; left: 0; right: 0; bottom: -16px; height: 16px; background: linear-gradient(180deg, oklch(46% 0.09 285), oklch(31% 0.08 285)); border-top: 2px solid var(--color-shell-gold); box-shadow: 0 8px 16px oklch(8% 0.04 285 / 0.55); }
.trophy { position: relative; isolation: isolate; display: block; padding: 0 .2rem; background: none; border: 0; color: inherit; font: inherit; text-align: center; cursor: pointer; transform-origin: 50% 90%; transition: transform 380ms var(--ease-out); -webkit-tap-highlight-color: transparent; }
.trophy__art { display: block; width: calc(min(100%, 130px) * var(--s, 1)); margin-inline: auto; }
.trophy__art svg { display: block; width: 100%; height: auto; overflow: visible; transition: filter 320ms var(--ease-out); }
.trophy .t-num { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.trophy .t-plate, .td__stage .t-plate { font-family: var(--font-display); font-weight: 800; font-size: 7.5px; letter-spacing: .04em; }
.td__stage .t-num { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.trophy__lamp { position: absolute; z-index: -1; left: 50%; top: -14%; width: 190%; height: 135%; transform: translateX(-50%); background: radial-gradient(closest-side, oklch(93% 0.12 92 / 0.5), oklch(93% 0.12 92 / 0.2) 55%, oklch(93% 0.12 92 / 0) 100%); opacity: 0; transition: opacity 350ms var(--ease-out); pointer-events: none; }
.trophy__plate { display: grid; margin: .5rem auto 0; width: max-content; max-width: 100%; padding: .26rem .5rem .3rem; border-radius: 4px; background: oklch(95% 0.04 92); color: var(--color-ink); box-shadow: 0 3px 0 var(--color-red-deep); font-size: clamp(.43rem, 1.95vw, .68rem); line-height: 1.15; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
@media (max-width: 600px) { .trophy__plate { padding: .22rem .28rem .26rem; } }
.trophy__plate b { font-family: var(--font-display); font-weight: 800; }
.trophy__plate i { font-style: normal; font-weight: 700; color: var(--color-red-deep); }
.trophy--empty { cursor: default; color: oklch(99% 0 0 / 0.32); }
.trophy--empty .trophy__plate { background: none; box-shadow: none; color: inherit; }
.trophy--empty .trophy__plate i { color: inherit; }
.spark { position: absolute; width: 13px; height: 13px; background: oklch(97% 0.1 95); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; transform: scale(0); pointer-events: none; }
.spark--1 { top: 8%; left: 14%; } .spark--2 { top: 26%; right: 8%; } .spark--3 { top: 52%; left: 4%; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@keyframes lit { from { filter: brightness(0.35) saturate(0.6); transform: translateY(10px); } }
.cabinet.is-lit .trophy { animation: lit 800ms var(--ease-out) backwards; }
.cabinet.is-lit .shelf:nth-of-type(2) .trophy { animation-delay: 250ms; } .cabinet.is-lit .shelf:nth-of-type(3) .trophy { animation-delay: 500ms; }
.cabinet.is-lit .trophy:nth-child(2) { animation-delay: 100ms; } .cabinet.is-lit .trophy:nth-child(3) { animation-delay: 200ms; } .cabinet.is-lit .trophy:nth-child(4) { animation-delay: 300ms; }
.trophy[data-id]:active { transform: scale(1.1); }
.trophy[data-id]:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: 8px; }
@media (hover: hover) {
  .trophy[data-id]:hover { transform: translateY(-10px) scale(1.2); z-index: 7; }
  .trophy[data-id]:hover .trophy__lamp { opacity: 1; }
  .trophy[data-id]:hover svg { filter: drop-shadow(0 0 14px oklch(92% 0.13 92 / 0.6)); }
  .trophy[data-id]:hover .spark { animation: twinkle 1100ms ease-in-out infinite; }
  .trophy[data-id]:hover .spark--2 { animation-delay: 300ms; } .trophy[data-id]:hover .spark--3 { animation-delay: 650ms; }
}
.trophy[data-id]:focus-visible .trophy__lamp { opacity: 1; }
@media (max-width: 600px) { .cabinet__body { border-width: 9px; border-top-width: 9px; } .cabinet__crown { margin-inline: -6px; } .shelf { margin-bottom: 30px; } .cabinet__feet i { width: 46px; height: 22px; } }

/* ventana grande del trofeo: la foto es la protagonista (columna derecha, a lo alto) */
.trophy-dialog { padding: 0; border: 0; border-radius: 26px; background: var(--color-navy); color: var(--color-white); width: min(1060px, calc(100% - 2rem)); max-height: min(94vh, 840px); overflow: hidden; box-shadow: 0 30px 80px oklch(10% 0.04 285 / 0.6); }
.trophy-dialog::backdrop { background: oklch(14% 0.04 285 / 0.8); }
.trophy-dialog[open] { animation: pop 260ms var(--ease-out); }
.trophy-dialog__close { position: absolute; z-index: 3; top: 12px; right: 12px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--color-white); background: var(--color-navy); color: var(--color-white); cursor: pointer; }
.trophy-dialog__close svg { width: 15px; height: 15px; }
@media (hover: hover) { .trophy-dialog__close:hover { background: var(--color-white); color: var(--color-navy); } }
.td { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); grid-template-areas: "stage photo" "info photo"; grid-template-rows: auto 1fr; max-height: min(94vh, 840px); }
.td--nophoto { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-areas: "stage info"; grid-template-rows: auto; }
.td__stage { grid-area: stage; position: relative; display: grid; place-items: center; min-height: 290px; padding: 1.6rem 1rem 1rem; overflow: hidden; background: radial-gradient(ellipse at 50% 38%, oklch(48% 0.12 285), oklch(26% 0.07 285) 72%); }
.td--nophoto .td__stage { min-height: 400px; padding-block: 2rem; }
.td__stage::before { content: ""; position: absolute; left: 50%; top: 46%; width: 150%; aspect-ratio: 1; translate: -50% -50%; background: repeating-conic-gradient(from 0deg, oklch(92% 0.12 92 / 0.14) 0 8deg, transparent 8deg 20deg); -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%); mask: radial-gradient(circle, #000 18%, transparent 66%); animation: tdSpin 50s linear infinite; }
@keyframes tdSpin { to { rotate: 360deg; } }
.td__stage svg { position: relative; width: min(100%, 190px); height: auto; overflow: visible; filter: drop-shadow(0 0 26px oklch(92% 0.13 92 / 0.5)); animation: tdIn 700ms var(--ease-out), tdFloat 4s ease-in-out 700ms infinite; }
.td--nophoto .td__stage svg { width: min(100%, 240px); }
@keyframes tdIn { from { transform: scale(0.5) rotate(-8deg); opacity: 0; } }
@keyframes tdFloat { 50% { transform: translateY(-8px); } }
.td__info { grid-area: info; display: grid; align-content: start; gap: .7rem; padding: 1.4rem 1.6rem 1.8rem; overflow-y: auto; }
.td--nophoto .td__info { padding: 2.4rem 2.2rem 2rem 1.6rem; }
.td__kicker { justify-self: start; margin: 0; padding: .32rem .85rem; border-radius: 999px; background: var(--color-gold); color: var(--color-navy); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.td h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: .98; margin: 0; }
.td--nophoto h3 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.td__meta { margin: 0; color: var(--color-white-soft); }
.td__meta time { font-variant-numeric: tabular-nums; }
.td__flag { display: inline-flex; vertical-align: -.1em; }
.td__flag svg { width: 1.2em; height: .84em; border-radius: 2px; box-shadow: 0 0 0 1px oklch(99% 0 0 / 0.25); }
.td__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; margin: 0; }
.td__who dt { color: var(--color-gold); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.td__who dd { margin: 0; font-weight: 700; font-size: 1.2rem; }
.td__results { justify-self: start; margin-top: .3rem; padding: .6rem 1.1rem; font-size: .9rem; border-color: var(--color-white-soft); }
.td__results svg { width: 13px; height: 13px; }
.td__photo { grid-area: photo; align-self: center; justify-self: center; margin: 1.5rem 1.6rem 1.5rem 0; padding: .6rem .6rem 1.8rem; width: fit-content; max-width: calc(100% - 1.6rem); background: var(--color-white); transform: rotate(1.4deg); box-shadow: 0 10px 0 var(--color-red-deep); }
.td__photo[hidden] { display: none; }
.td__photo img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(94vh, 840px); max-height: calc(min(94vh, 840px) - 6.4rem); background: oklch(90% 0 0); }
@media (max-width: 760px) {
  .trophy-dialog { max-height: 94vh; overflow-y: auto; }
  .td, .td--nophoto { display: flex; flex-direction: column; max-height: none; }
  .td__stage, .td--nophoto .td__stage { min-height: 230px; padding: 1.5rem 1rem; }
  .td__stage svg, .td--nophoto .td__stage svg { width: 150px; }
  .td__info, .td--nophoto .td__info { padding: 1.2rem 1.3rem .4rem; overflow: visible; }
  .td__photo { margin: 1rem 1.3rem 1.6rem; max-width: calc(100% - 2.6rem); align-self: center; }
  .td__photo img { max-height: none; width: 100%; }
}
@media (max-width: 340px) { .trophy__plate { font-size: .38rem; letter-spacing: 0; padding-inline: .16rem; } }

/* vitrina: 6 por fila, trofeos más grandes y el nombre solo al pasar el ratón */
.cabinet { max-width: 1320px; }
/* filas con distinto numero de trofeos (6 y 7): flex en vez de grid de N columnas, para que el
   tamaño de cada trofeo no dependa de cuantos haya en SU fila (si no, la fila de 7 salia mas pequeña).
   container-type en vez de vw: así el ancho del trofeo se calcula sobre el espacio real del propio
   estante (igual en ambas filas), no sobre el ancho de toda la ventana, que a anchos intermedios
   (tablet) no guarda la misma proporción y hacía que la fila de 7 se saliera del mueble */
.shelf { container-type: inline-size; display: flex; flex-wrap: nowrap; justify-content: center; gap: clamp(.1rem, 1.2vw, 1rem); padding: 1.4rem clamp(.2rem, 1.5vw, 1.2rem) 0; margin-bottom: 44px; row-gap: 0; }
.shelf > .trophy { flex: 0 0 auto; }
/* el tope (151px) es el que cabe con 7 trofeos en la fila de abajo a todo el ancho de la vitrina */
.trophy__art { width: calc(clamp(72px, 12cqw, 151px) * var(--s, 1)); }
.trophy__plate { position: absolute; left: 50%; top: calc(100% + 8px); margin: 0; z-index: 6; transform: translate(-50%, -4px); opacity: 0; pointer-events: none; white-space: nowrap; font-size: .72rem; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
@media (hover: hover) { .trophy[data-id]:hover .trophy__plate { opacity: 1; transform: translate(-50%, 0); } }
.trophy[data-id]:focus-visible .trophy__plate { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 700px) {
  .shelf { padding: 1rem .2rem 0; margin-bottom: 36px; }
  .trophy__art { width: calc(clamp(72px, 28vw, 120px) * var(--s, 1)); }
  .trophy { padding: 0 .1rem; }
}
.trophy__plate { display: flex; align-items: baseline; gap: .45rem; top: calc(100% + 20px); padding: .3rem .7rem .34rem; }
.shelf { margin-bottom: 54px; }
@media (max-width: 700px) { .shelf { margin-bottom: 40px; } }
.shelf { padding-inline: clamp(.8rem, 3.2vw, 2.6rem); }
@media (max-width: 700px) { .shelf { padding-inline: .5rem; } }
.trophy__plate { width: max-content; max-width: none; }

/* trofeos: imágenes recortadas (la altura de cada una va en --h, 1 = la más alta) */
.trophy__art { position: relative; aspect-ratio: 3 / 5; }
.trophy__art::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -1.5%; height: 3.4%; border-radius: 50%; background: oklch(10% 0.03 285 / 0.5); filter: blur(3px); z-index: -1; }
.trophy__art img { position: absolute; left: 0; bottom: 0; width: 100%; height: calc(var(--h, 1) * 100%); object-fit: contain; object-position: 50% 100%; transition: filter 320ms var(--ease-out); -webkit-user-drag: none; }
@media (hover: hover) { .trophy[data-id]:hover .trophy__art img { filter: drop-shadow(0 0 14px oklch(92% 0.13 92 / 0.6)); } }
.td__stage img { position: relative; display: block; width: auto; max-width: min(100%, 240px); height: min(46vh, 340px); object-fit: contain; filter: drop-shadow(0 0 26px oklch(92% 0.13 92 / 0.5)); animation: tdIn 700ms var(--ease-out), tdFloat 4s ease-in-out 700ms infinite; }
.td--nophoto .td__stage img { height: min(52vh, 380px); }
@media (max-width: 700px) { .td__stage img, .td--nophoto .td__stage img { height: 230px; max-width: 70%; } }
@media (prefers-reduced-motion: reduce) { .td__stage img { animation: none; } }

/* ---------- MadKlask: plan del fin de semana, franja de datos y CTA ---------- */
.schedule { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); }
@media (max-width: 760px) { .schedule { grid-template-columns: minmax(0, 1fr); } }
.day { background: var(--color-navy-2); border-radius: 20px; padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); }
.day h3, .day h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.4rem; margin: 0; }
.day ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-sm); }
.day li b { display: block; color: var(--color-gold); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .15rem; }
.day li p { margin: 0; color: var(--color-white-soft); font-size: .96rem; }
.day li p small { display: block; margin-top: .2rem; opacity: .7; font-size: .8rem; font-style: italic; }
/* podios de /madklask: cada puesto en una línea (puesto · nombre · país) */
.day .podium li { display: flex; align-items: baseline; gap: .7rem; }
.day .podium li b { flex: none; min-width: 2.4rem; margin: 0; }
.day .podium li p { color: var(--color-white); }
.day .podium li p small { display: inline; margin: 0 0 0 .4rem; font-style: normal; opacity: .65; }
/* ---------- MadKlask: países que han participado en las ediciones anteriores ---------- */
.countries { padding-block: 0 var(--space-2xl); }
.countries__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, calc(50% - var(--space-md))), 1fr)); gap: var(--space-md); margin-top: var(--space-lg); }
.countries__grid > div { background: var(--color-navy-2); border-radius: 20px; padding: clamp(1.25rem, 3vw, 2.25rem) var(--space-md); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: clamp(150px, 18vw, 220px); }
.countries__grid img { display: block; margin: 0 auto .9rem; width: clamp(56px, 6vw, 84px); height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px oklch(99% 0 0 / 0.15), 0 8px 20px oklch(10% 0.04 285 / 0.35); }
.countries__grid b { display: block; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1.05; }
.countries__grid small { display: block; margin-top: .4rem; color: var(--color-gold); font-weight: 700; font-size: clamp(.9rem, 1.2vw, 1.05rem); }

.info-strip { padding-block: var(--space-2xl); }
.info-strip .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); text-align: center; }
@media (max-width: 700px) { .info-strip .wrap { grid-template-columns: minmax(0, 1fr); } }
.info-strip dt { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--color-gold); }
.info-strip dd { margin: .3rem 0 0; color: var(--color-white-soft); font-size: .95rem; }

.cta-band { background: var(--color-red); padding-block: var(--space-2xl); text-align: center; }
.cta-band .wrap { max-width: 640px; display: flex; flex-direction: column; align-items: center; gap: var(--space-md); }
.cta-band p { margin: 0; color: var(--color-white-soft); }

/* ---------- Formularios (inscripción) ---------- */
.form { display: flex; flex-direction: column; gap: var(--space-lg); max-width: 680px; margin-inline: auto; }
.form__group { display: flex; flex-direction: column; gap: var(--space-sm); background: var(--color-navy-2); border-radius: 20px; padding: var(--space-lg); }
.form__group h2 { font-size: 1.3rem; text-transform: none; }
.form label { font-weight: 700; font-size: .92rem; display: flex; flex-direction: column; gap: .4rem; }
.form label[hidden] { display: none; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form select, .form textarea {
  /* 16px minimo: por debajo, Safari en iPhone hace zoom automatico al tocar el campo (y luego parece que la pagina se desliza de lado) */
  font: inherit; font-size: 1rem; padding: .75rem .9rem; border-radius: 10px; border: 2px solid transparent;
  background: var(--color-white); color: var(--color-ink); min-height: 44px; box-sizing: border-box;
}
.form input:user-invalid, .form select:user-invalid { border-color: var(--color-live); }
.form textarea { min-height: 90px; resize: vertical; font-family: inherit; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
@media (max-width: 600px) { .form__row { grid-template-columns: minmax(0, 1fr); } }
.form__sub { display: flex; flex-direction: column; gap: .5rem; }
.form__sub + .form__sub { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid oklch(99% 0 0 / 0.12); }
.form__sub > p { margin: 0; font-weight: 700; font-size: .95rem; }
.form__choice { display: flex; flex-wrap: wrap; gap: .6rem; }
.form__choice label { flex-direction: row; align-items: center; gap: .55rem; background: var(--color-navy); border-radius: 999px; padding: .6rem 1.1rem; font-weight: 500; cursor: pointer; }
.form__choice input { width: 18px; height: 18px; accent-color: var(--color-gold); flex: none; }
.form__note { font-size: .85rem; color: var(--color-white-soft); font-weight: 500; margin: 0; }
.form label.form__check { flex-direction: row; align-items: flex-start; gap: .6rem; cursor: pointer; }
.form__check input { width: 20px; height: 20px; margin-top: .1rem; accent-color: var(--color-gold); flex: none; }
.form__check span { font-weight: 500; font-size: .92rem; }
.form__submit { font-size: 1.05rem; padding: 1rem 1.6rem; }
.form__msg { font-weight: 700; padding: .9rem 1.1rem; border-radius: 12px; display: none; }
.form__msg.is-ok { display: block; background: oklch(66% 0.12 155 / .25); }
.form__msg.is-error { display: block; background: oklch(66% 0.21 27 / .3); }

/* ---------- /madklask: marino alternado con un solo color en cada sitio (las cintas, el programa y el bloque de inscribirse) ---------- */
.mk #plan { --sec: oklch(37% 0.14 258); }                      /* azul MadKlask */
.mk #plan .day { background: oklch(29% 0.11 262); }
.mk #history { --sec: var(--color-navy); }                     /* podios: marino, puestos en amarillo */
.mk .countries { background: oklch(20% 0.05 280); padding-block: var(--space-3xl) var(--space-2xl); } /* marino más oscuro: se nota el cambio de sección */
.mk .cta-band { background: oklch(50% 0.19 18); }              /* rojo MadKlask: lo que más importa, inscribirse */
/* /register: acceso al formulario de contacto debajo de la inscripción */
.form__help { max-width: 680px; margin: var(--space-xl) auto 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-sm) var(--space-md); text-align: center; }
.form__help p { margin: 0; color: var(--color-white-soft); }
/* /register: pregunta o casilla sin contestar al enviar */
.form__choice.is-missing label { box-shadow: 0 0 0 2px var(--color-live); }
.form label.form__check.is-missing { border-radius: 10px; box-shadow: 0 0 0 2px var(--color-live); padding: .5rem .6rem; }
.form__missing { margin: -.2rem 0 0; color: #ff8f8f; font-weight: 700; font-size: .88rem; }
.form input.is-missing, .form select.is-missing, .form textarea.is-missing { border-color: var(--color-live); }
/* /register: el plan de cada día dentro de sus preguntas */
.form__desc { margin: -.15rem 0 .2rem; color: var(--color-white-soft); font-size: .95rem; }
.form__desc small, .form__plan small { opacity: .7; font-style: italic; }
.form__plan { list-style: none; margin: 0 0 var(--space-xs, .25rem); padding: 0; display: grid; gap: .35rem; color: var(--color-white-soft); font-size: .95rem; }
.form__plan b { color: var(--color-gold); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; margin-right: .4rem; }
.form__eventlink { margin: var(--space-sm) 0 0; color: var(--color-white-soft); }
.form__sub .form__desc { font-weight: 400; }
