/* =========================================================
   TEMAS — cada uno define los mismos tokens
   ========================================================= */

/* ---------- NOCHE (neón de piscina) ---------- */
:root, [data-tema="noche"] {
  --bg: #0a0f1f; --ink: #f4f1ea; --muted: #a9b4cc;
  --hero-bg:
    radial-gradient(circle at 12% 18%, rgba(255, 61, 127, .38), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(34, 211, 238, .32), transparent 46%),
    #0a0f1f;
  --hero-ink: #f4f1ea; --kicker: #22d3ee;
  --plan-bg: #0d1630; --plan-ink: #f4f1ea;
  --finde-bg: #0a0f1f; --finde-ink: #f4f1ea;
  --muro-bg: #05070f; --muro-ink: #f4f1ea;
  --rsvp-bg: #0d1630; --rsvp-grid: rgba(34, 211, 238, .12);
  --card-bg: #141d38; --card-ink: #f4f1ea; --card-muted: #a9b4cc;
  --card-border: 1px solid rgba(255, 255, 255, .08); --card-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  --accent: #ff3d7f; --accent-ink: #fff; --accent-shadow: #b3124d;
  --accent-2: #22d3ee; --accent-3: #c6ff3d;
  --tile-bg: rgba(255, 255, 255, .06); --tile-ink: #f4f1ea; --tile-border: 2px solid #22d3ee; --tile-shadow: 0 0 22px rgba(34, 211, 238, .35);
  --tile-big-bg: #ff3d7f; --tile-big-ink: #fff; --tile-big-shadow: 0 0 34px rgba(255, 61, 127, .7);
  --strip-a: #ff3d7f; --strip-b: #22d3ee;
  --star-bg: linear-gradient(135deg, #ff3d7f, #8b2cff); --star-ink: #fff; --day-bg: #1c2747; --day-ink: #f4f1ea; --star-day-bg: #0a0f1f;
  --field-bg: #0a0f1f; --field-border: #2a3760; --field-ink: #f4f1ea;
  --chip-on-bg: #22d3ee; --chip-on-ink: #0a0f1f;
  --foot-bg: #05070f; --foot-ink: #7c88a6;
  --frame-shadow: 0 14px 36px rgba(0, 0, 0, .55);
  --display: "Anton", "Bricolage Grotesque", sans-serif; --display-weight: 400; --display-case: uppercase; --display-track: .01em; --display-stretch: 100%;
  --h1-shadow: 0 0 28px rgba(255, 61, 127, .55), 0 0 2px rgba(255, 255, 255, .4);
  --radius: 18px;
}

/* ---------- AFICHE (impresión rosa y azul) ---------- */
[data-tema="afiche"] {
  --bg: #f4ecdc; --ink: #1b1f4b; --muted: #555a80;
  --hero-bg:
    radial-gradient(rgba(255, 79, 154, .55) 1.6px, transparent 1.8px) 0 0 / 12px 12px,
    #f4ecdc;
  --hero-ink: #2541d9; --kicker: #ff4f9a;
  --plan-bg: #ff4f9a; --plan-ink: #1b1f4b;
  --finde-bg: #f4ecdc; --finde-ink: #1b1f4b;
  --muro-bg: #2541d9; --muro-ink: #f4ecdc;
  --rsvp-bg: #f4ecdc; --rsvp-grid: rgba(37, 65, 217, .1);
  --card-bg: #fffaf0; --card-ink: #1b1f4b; --card-muted: #555a80;
  --card-border: 2.5px solid #1b1f4b; --card-shadow: 7px 7px 0 #1b1f4b;
  --accent: #2541d9; --accent-ink: #fff; --accent-shadow: #1b1f4b;
  --accent-2: #ff4f9a; --accent-3: #ffd23f;
  --tile-bg: #fffaf0; --tile-ink: #1b1f4b; --tile-border: 2.5px solid #1b1f4b; --tile-shadow: 6px 6px 0 #ff4f9a;
  --tile-big-bg: #ff4f9a; --tile-big-ink: #1b1f4b; --tile-big-shadow: 6px 6px 0 #2541d9;
  --strip-a: #2541d9; --strip-b: #ff4f9a;
  --star-bg: #2541d9; --star-ink: #fff; --day-bg: #ffd23f; --day-ink: #1b1f4b; --star-day-bg: #ff4f9a;
  --field-bg: #fffaf0; --field-border: #1b1f4b; --field-ink: #1b1f4b;
  --chip-on-bg: #1b1f4b; --chip-on-ink: #fff;
  --foot-bg: #1b1f4b; --foot-ink: #c9c3e6;
  --frame-shadow: 6px 6px 0 #1b1f4b;
  --display: "Bricolage Grotesque", sans-serif; --display-weight: 800; --display-case: none; --display-track: -.03em; --display-stretch: 75%;
  --h1-shadow: 6px 5px 0 #ff4f9a;
  --radius: 6px;
}

/* ---------- SOL (el original) ---------- */
[data-tema="sol"] {
  --bg: #fff6e5; --ink: #10233a; --muted: #4b5d73;
  --hero-bg: linear-gradient(180deg, #ffe9b8 0%, #ffd98a 45%, #ffc677 100%);
  --hero-ink: #0b2a4a; --kicker: #ff6b4a;
  --plan-bg: #19b5d8; --plan-ink: #0b2a4a;
  --finde-bg: #fde9c4; --finde-ink: #10233a;
  --muro-bg: #0b2a4a; --muro-ink: #fff6e5;
  --rsvp-bg: #19b5d8; --rsvp-grid: rgba(255, 255, 255, .2);
  --card-bg: #fff; --card-ink: #10233a; --card-muted: #4b5d73;
  --card-border: 0 solid transparent; --card-shadow: 0 10px 0 rgba(11, 42, 74, .14);
  --accent: #ff6b4a; --accent-ink: #fff; --accent-shadow: #c94a2e;
  --accent-2: #19b5d8; --accent-3: #ffc93c;
  --tile-bg: rgba(255, 255, 255, .65); --tile-ink: #0b2a4a; --tile-border: 2px solid rgba(11, 42, 74, .15); --tile-shadow: none;
  --tile-big-bg: #ff6b4a; --tile-big-ink: #fff; --tile-big-shadow: 0 6px 0 #c94a2e;
  --strip-a: #19b5d8; --strip-b: #0b2a4a;
  --star-bg: #0b2a4a; --star-ink: #fff6e5; --day-bg: #fff6e5; --day-ink: #0b2a4a; --star-day-bg: #ffc93c;
  --field-bg: #f7fbfd; --field-border: #d6e3ee; --field-ink: #10233a;
  --chip-on-bg: #0b2a4a; --chip-on-ink: #fff;
  --foot-bg: #0b2a4a; --foot-ink: #8fa3bb;
  --frame-shadow: 0 10px 24px rgba(11, 42, 74, .25);
  --display: "Bricolage Grotesque", sans-serif; --display-weight: 800; --display-case: none; --display-track: -.03em; --display-stretch: 100%;
  --h1-shadow: none;
  --radius: 20px;
}

/* =========================================================
   BASE
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink); background: var(--bg);
  line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--display); font-weight: var(--display-weight); text-transform: var(--display-case);
  letter-spacing: var(--display-track); font-stretch: var(--display-stretch); line-height: 1; margin: 0;
}
h3 { text-transform: none; letter-spacing: -.01em; font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-stretch: 100%; }
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 2; }
.wrap.narrow { max-width: 640px; }
.section { padding: 96px 0; position: relative; overflow: hidden; }
.section h2, .muro h2, .galeria h2 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.lead { font-size: 1.15rem; opacity: .85; max-width: 46ch; margin: 14px 0 36px; }
.emoji { font-size: 2rem; line-height: 1; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1rem "DM Sans", sans-serif; padding: 14px 24px; border-radius: 999px; border: 0;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 0 var(--accent-shadow); transition: transform .12s, box-shadow .12s;
}
[data-tema="afiche"] .btn { border-radius: 8px; border: 2.5px solid #1b1f4b; box-shadow: 5px 5px 0 #1b1f4b; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--accent-shadow); }
.btn-big { font-size: 1.1rem; padding: 17px 28px; }
.btn.small { padding: 10px 18px; font-size: .95rem; white-space: nowrap; }
.btn.full { width: 100%; }
.btn.ghost { background: transparent; color: currentColor; box-shadow: none; border: 2px solid currentColor; }
.btn.wa { background: #25d366; color: #fff; box-shadow: 0 6px 0 #179d4b; }

/* ---------- Polaroid ---------- */
.polaroid {
  background: #fff; padding: 9px 9px 34px; border-radius: 4px; margin: 0;
  box-shadow: var(--frame-shadow); cursor: zoom-in; position: relative; transition: transform .25s;
}
[data-tema="afiche"] .polaroid { border: 2.5px solid #1b1f4b; border-radius: 2px; }
.polaroid img, .polaroid video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; background: #ddd; }
.polaroid figcaption {
  position: absolute; left: 0; right: 0; bottom: 7px; text-align: center;
  font: 700 .85rem "Bricolage Grotesque", sans-serif; color: #1b1f4b;
}
.polaroid:hover { transform: rotate(0deg) scale(1.04) !important; z-index: 5; }
.polaroid.tape::before {
  content: ""; position: absolute; top: -11px; left: 50%; width: 78px; height: 24px; z-index: 2;
  transform: translateX(-50%) rotate(-4deg); background: color-mix(in srgb, var(--accent-3) 80%, transparent);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; min-height: 100svh; background: var(--hero-bg); color: var(--hero-ink);
  display: flex; flex-direction: column; overflow: hidden;
}
.deco { position: absolute; pointer-events: none; }
/* noche: grano + aro neón */
[data-tema="noche"] .hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-tema="noche"] .deco-a { width: 560px; height: 560px; right: -160px; top: -200px; border-radius: 50%; border: 2px solid rgba(34, 211, 238, .5); box-shadow: 0 0 60px rgba(34, 211, 238, .35), inset 0 0 60px rgba(34, 211, 238, .2); }
[data-tema="noche"] .deco-b { width: 240px; height: 240px; left: -80px; bottom: -60px; border-radius: 50%; border: 2px solid rgba(255, 61, 127, .55); box-shadow: 0 0 50px rgba(255, 61, 127, .4); }
/* afiche: círculos de tinta */
[data-tema="afiche"] .hero { background-attachment: local; }
[data-tema="afiche"] .deco-a { width: 520px; height: 520px; right: -120px; top: -160px; border-radius: 50%; background: #ffd23f; mix-blend-mode: multiply; }
[data-tema="afiche"] .deco-b { width: 520px; height: 520px; right: -60px; top: -110px; border-radius: 50%; border: 3px solid #2541d9; }
/* sol: sol + olas */
[data-tema="sol"] .deco-a {
  width: 520px; height: 520px; right: -140px; top: -140px; border-radius: 50%;
  background: radial-gradient(circle, #fff3c4 0%, #ffc93c 55%, rgba(255, 201, 60, 0) 72%); animation: pulse 6s ease-in-out infinite;
}
[data-tema="sol"] .deco-b {
  left: 0; right: 0; bottom: -1px; height: 120px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%23bdeef8' d='M0,70 C240,120 480,20 720,60 C960,100 1200,20 1440,60 L1440,120 L0,120 Z'/%3E%3Cpath fill='%2319b5d8' d='M0,90 C260,50 520,130 760,90 C1000,50 1240,110 1440,84 L1440,120 L0,120 Z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}
@keyframes pulse { 50% { transform: scale(1.06); } }

.topnav { position: relative; z-index: 3; display: flex; gap: 22px; justify-content: flex-end; align-items: center; padding: 20px 24px; font-weight: 700; }
.topnav a { text-decoration: none; }
.topnav a:hover { text-decoration: underline; }
.topnav .pill { background: var(--accent); color: var(--accent-ink); padding: 8px 16px; border-radius: 999px; }
.topnav .pill:hover { text-decoration: none; }

.hero-inner {
  position: relative; z-index: 2; flex: 1; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 36px;
  max-width: 1240px; width: 100%; margin: 0 auto; padding: 0 24px 110px;
}
.kicker { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--kicker); margin: 0 0 10px; }
.hero h1 { font-size: clamp(3.6rem, 9.5vw, 8.8rem); text-shadow: var(--h1-shadow); margin-bottom: 26px; }
.hero h1 sup { font-size: .38em; vertical-align: 1em; color: var(--accent); text-shadow: none; }
[data-tema="noche"] .hero h1 sup { color: var(--accent-2); }

/* 12 + 12 = 24 */
.math { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.math .tile {
  min-width: 96px; padding: 10px 14px 8px; text-align: center; border-radius: 14px;
  background: var(--tile-bg); color: var(--tile-ink); border: var(--tile-border); box-shadow: var(--tile-shadow);
  opacity: 0; transform: translateY(18px) scale(.8);
}
[data-tema="afiche"] .math .tile { border-radius: 4px; }
.math .tile b { display: block; font: 400 3.4rem/1 var(--display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); letter-spacing: var(--display-track); }
.math .tile span { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; opacity: .75; }
.math .tile.big { background: var(--tile-big-bg); color: var(--tile-big-ink); box-shadow: var(--tile-big-shadow); border-color: transparent; min-width: 112px; }
[data-tema="afiche"] .math .tile.big { border: 2.5px solid #1b1f4b; }
.math .tile.big b { font-size: 4.2rem; }
.math .op { font: normal 2.6rem/1 var(--display); color: var(--accent); opacity: 0; transform: scale(.4); }
[data-tema="noche"] .math .op { color: var(--accent-2); }
.math.go .tile, .math.go .op { animation: popIn .55s cubic-bezier(.3, 1.6, .5, 1) forwards; }
.math.go > :nth-child(2) { animation-delay: .25s; }
.math.go > :nth-child(3) { animation-delay: .45s; }
.math.go > :nth-child(4) { animation-delay: .7s; }
.math.go > :nth-child(5) { animation: popIn .7s cubic-bezier(.3, 1.8, .5, 1) .95s forwards, wiggle 4s ease-in-out 2.2s infinite; }
@keyframes popIn { to { opacity: 1; transform: none; } }
@keyframes wiggle { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-7deg) scale(1.06); } 95% { transform: rotate(6deg) scale(1.06); } }
.math-note { margin: 0 0 22px; font-weight: 500; opacity: .9; max-width: 44ch; }

.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-bottom: 20px; }
.hero-meta > div:first-child { display: flex; flex-direction: column; }
.hero-meta strong { font: 700 1.3rem "Bricolage Grotesque", sans-serif; }
.maplink { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; opacity: .85; }
.weather {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: .92rem;
  background: var(--tile-bg); border: var(--tile-border);
}
.weather:empty { display: none; }
.weather b { font: 700 1.1rem "Bricolage Grotesque", sans-serif; }
.weather .wx-ico { font-size: 1.3rem; }

.countdown { display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.countdown div { background: var(--tile-bg); border: var(--tile-border); border-radius: 14px; padding: 8px 12px; min-width: 70px; text-align: center; }
[data-tema="afiche"] .countdown div { border-radius: 4px; }
.countdown b { display: block; font: 700 1.8rem "Bricolage Grotesque", sans-serif; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }

.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.cal { position: relative; }
.cal-menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 10; min-width: 230px; background: #fff; color: #1b1f4b;
  border-radius: 14px; padding: 6px; box-shadow: 0 14px 30px rgba(0, 0, 0, .3); display: flex; flex-direction: column;
}
.cal-menu a { padding: 12px 14px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.cal-menu a:hover { background: #f3eee4; }

/* Pila de fotos (rota) */
.hero-pile { position: relative; height: 600px; }
.hero-pile .polaroid {
  position: absolute; width: 66%;
  transition: left .7s cubic-bezier(.3, 1.3, .5, 1), top .7s cubic-bezier(.3, 1.3, .5, 1), transform .7s cubic-bezier(.3, 1.3, .5, 1), opacity .5s;
}
.hero-pile .slot-2 { left: 0; top: 0; transform: rotate(-9deg); z-index: 1; }
.hero-pile .slot-1 { left: 36%; top: 12%; transform: rotate(7deg); z-index: 2; }
.hero-pile .slot-0 { left: 14%; top: 30%; transform: rotate(-2deg); z-index: 3; }
.hero-pile .slot-out { left: 14%; top: 52%; transform: rotate(-12deg) scale(.85); opacity: 0; z-index: 0; pointer-events: none; }

/* =========================================================
   CARRUSELES
   ========================================================= */
.strip { overflow: hidden; padding: 34px 0 40px; position: relative; z-index: 3; }
.strip-a { background: var(--strip-a); }
.strip-b { background: var(--strip-b); }
.track { display: flex; gap: 26px; width: max-content; animation: marquee 120s linear infinite; }
.strip-b .track { animation-direction: reverse; }
.strip:hover .track { animation-play-state: paused; }
.track .polaroid { width: 260px; flex: 0 0 auto; }
.track .polaroid:nth-child(odd) { transform: rotate(-3deg); }
.track .polaroid:nth-child(even) { transform: rotate(2.5deg) translateY(10px); }
.track .polaroid:nth-child(3n) { transform: rotate(-1deg) translateY(-8px); }
@keyframes marquee { to { transform: translateX(-50%); } }
.strip-cta { background: var(--strip-b); text-align: center; padding: 0 20px 40px; margin-top: -8px; position: relative; z-index: 3; }

/* Fotos flotantes */
.float { position: absolute; z-index: 1; width: 230px; will-change: transform; }
.float .polaroid { width: 100%; }
.f1 { right: 3%; top: 60px; } .f1 .polaroid { transform: rotate(8deg); }
.f2 { left: -60px; bottom: 30px; width: 170px; } .f2 .polaroid { transform: rotate(-10deg); }
.f3 { right: 5%; top: 110px; width: 250px; } .f3 .polaroid { transform: rotate(-6deg); }
.f4 { right: 22%; bottom: 40px; width: 180px; } .f4 .polaroid { transform: rotate(11deg); }

/* =========================================================
   SECCIONES
   ========================================================= */
.s-plan { background: var(--plan-bg); color: var(--plan-ink); }
.s-finde { background: var(--finde-bg); color: var(--finde-ink); }
.s-rsvp {
  background-color: var(--rsvp-bg); color: var(--ink);
  background-image: linear-gradient(var(--rsvp-grid) 2px, transparent 2px), linear-gradient(90deg, var(--rsvp-grid) 2px, transparent 2px);
  background-size: 34px 34px;
}
[data-tema="sol"] .s-rsvp { color: #0b2a4a; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 840px; }
.card { background: var(--card-bg); color: var(--card-ink); border: var(--card-border); border-radius: var(--radius); padding: 24px; box-shadow: var(--card-shadow); }
.card h3 { font-size: 1.4rem; margin: 12px 0 8px; }
.card p, .card ul { margin: 0; color: var(--card-muted); }
.card ul { padding-left: 18px; }
.card .note { margin-top: 12px; font-size: .92rem; color: var(--accent); font-weight: 700; }
[data-tema="noche"] .card .note, [data-tema="noche"] .card .link { color: var(--accent-2); }
.card .link { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--accent); }
.consigna {
  margin-top: 22px; display: flex; gap: 16px; align-items: flex-start; max-width: 840px;
  background: var(--card-bg); color: var(--card-ink); border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--radius); padding: 24px;
}
.consigna h3 { font-size: 1.3rem; color: var(--accent); }
[data-tema="noche"] .consigna h3 { color: var(--accent-3); }
.consigna p { margin: 6px 0 0; color: var(--card-muted); }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; max-width: 660px; }
.timeline li {
  display: grid; grid-template-columns: 88px 1fr; gap: 18px; padding: 20px;
  background: var(--card-bg); color: var(--card-ink); border: var(--card-border); border-radius: var(--radius); box-shadow: var(--card-shadow);
}
.timeline .day { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--day-bg); color: var(--day-ink); border-radius: 12px; padding: 8px; }
.timeline .day b { text-transform: uppercase; font-size: .8rem; letter-spacing: .1em; opacity: .75; }
.timeline .day span { font: 2.4rem/1 var(--display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); }
.timeline h3 { font-size: 1.35rem; margin: 2px 0 6px; }
.timeline p { margin: 0; color: var(--card-muted); }
.timeline .tag { font-size: .82rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
[data-tema="noche"] .timeline .tag { color: var(--accent-2); }
.timeline li.star { background: var(--star-bg); color: var(--star-ink); transform: rotate(-.8deg) scale(1.02); }
.timeline li.star p, .timeline li.star .tag { color: var(--star-ink); opacity: .92; }
.timeline li.star .day { background: var(--star-day-bg); color: var(--star-ink); }
[data-tema="sol"] .timeline li.star .day, [data-tema="afiche"] .timeline li.star .day { color: #1b1f4b; }

/* =========================================================
   MURO DE FOTOS (horizontal al bajar)
   ========================================================= */
.muro { position: relative; background: var(--muro-bg); color: var(--muro-ink); }
.muro-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.muro-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 5vw; }
.muro-track { display: flex; align-items: center; gap: 34px; padding: 0 5vw; width: max-content; will-change: transform; }
.wall-item { margin: 0; height: 60svh; position: relative; cursor: zoom-in; flex: 0 0 auto; background: #fff; padding: 10px 10px 40px; box-shadow: var(--frame-shadow); border-radius: 4px; }
[data-tema="afiche"] .wall-item { border: 2.5px solid #1b1f4b; }
.wall-item img, .wall-item video { height: 100%; width: auto; aspect-ratio: var(--ar, 4 / 3); object-fit: cover; background: #222; }
.wall-item:nth-child(odd) { transform: rotate(-1.6deg); }
.wall-item:nth-child(even) { transform: rotate(1.4deg) translateY(14px); }
.wall-item figcaption { position: absolute; left: 12px; bottom: 9px; font: 700 .9rem "Bricolage Grotesque", sans-serif; color: #1b1f4b; }
.wall-item .play { position: absolute; top: 18px; right: 18px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; }
.wall-year {
  flex: 0 0 auto; font: 34svh/0.8 var(--display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 3px var(--accent); padding: 0 10px;
}
[data-tema="noche"] .wall-year { -webkit-text-stroke-color: var(--accent-2); text-shadow: 0 0 30px rgba(34, 211, 238, .35); }
[data-tema="afiche"] .wall-year { color: #ff4f9a; -webkit-text-stroke: 0; text-shadow: 8px 6px 0 #1b1f4b; }
[data-tema="sol"] .wall-year { -webkit-text-stroke-color: #ffc93c; }
.muro-bar { margin: 0 5vw; height: 4px; background: rgba(255, 255, 255, .15); border-radius: 4px; overflow: hidden; }
.muro-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
[data-tema="noche"] .muro-bar i { background: var(--accent-2); }

/* =========================================================
   GALERÍA COMPLETA
   ========================================================= */
.galeria { position: fixed; inset: 0; z-index: 40; background: var(--bg); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; }
.gal-head {
  position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 16px 20px; background: var(--bg); border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
}
.gal-head h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-right: auto; }
.gal-years { display: flex; flex-wrap: wrap; gap: 6px; order: 3; width: 100%; }
.gal-years button {
  font: 700 .95rem "DM Sans", sans-serif; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); border: 2px solid color-mix(in srgb, var(--ink) 30%, transparent);
}
.gal-years button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.gal-close { background: none; border: 0; color: var(--ink); font-size: 2.6rem; line-height: 1; cursor: pointer; order: 2; }
.gal-grid { columns: 4 220px; column-gap: 10px; padding: 14px 16px 60px; }
.gal-grid figure { margin: 0 0 10px; break-inside: avoid; position: relative; cursor: zoom-in; border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.gal-grid img, .gal-grid video { width: 100%; }
.gal-grid figcaption { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(4, 8, 18, .94); display: grid; place-items: center; padding: 20px; touch-action: pan-y; }
.lb-content img, .lb-content video { max-height: 84vh; max-width: 88vw; border-radius: 10px; }
.lb-close { position: absolute; top: 12px; right: 18px; background: none; border: 0; color: #fff; font-size: 2.8rem; cursor: pointer; line-height: 1; z-index: 2; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .12); border: 0; color: #fff; font-size: 2.4rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; line-height: 1; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #c9d1e3; margin: 0; font-size: .9rem; }

/* =========================================================
   FORMULARIO / CAPTCHA / LISTO
   ========================================================= */
.form, .captcha, .done { background: var(--card-bg); color: var(--card-ink); border: var(--card-border); border-radius: 22px; padding: 28px; box-shadow: var(--card-shadow); }
[data-tema="afiche"] .form, [data-tema="afiche"] .captcha, [data-tema="afiche"] .done { border-radius: 6px; }
.hp { position: absolute; left: -9999px; }
.field { display: block; border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.field > span, .field legend { display: block; font-weight: 700; margin-bottom: 8px; }
.field em { font-weight: 400; opacity: .7; font-style: normal; }
input[type="text"], select, textarea {
  width: 100%; font: 1rem "DM Sans", sans-serif; color: var(--field-ink); padding: 14px 16px; border-radius: 12px;
  border: 2px solid var(--field-border); background: var(--field-bg); transition: border-color .15s;
}
input[type="text"]:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row .field { flex: 0 0 150px; } .row .grow { flex: 1 1 200px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.col { flex-direction: column; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 11px 16px; border-radius: 12px; border: 2px solid var(--field-border); background: var(--field-bg); color: var(--field-ink); font-weight: 500; transition: all .12s; }
.chips.col span { display: block; }
.chips label:hover span { border-color: var(--accent); }
.chips input:checked + span { background: var(--chip-on-bg); border-color: var(--chip-on-bg); color: var(--chip-on-ink); }
.chips input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.hint { margin: 10px 0 0; font-size: .9rem; color: #0f7a3a; background: #e7f9ee; padding: 10px 12px; border-radius: 10px; }
.error { color: #ff5a4f; font-weight: 700; min-height: 1.2em; margin: 0 0 12px; }
.form.is-no .if-viene { display: none; }

.captcha-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid color-mix(in srgb, var(--card-ink) 12%, transparent); padding-bottom: 16px; margin-bottom: 18px; }
.captcha-logo { font-size: 1.8rem; }
.captcha-head b { display: block; }
.captcha-head span { font-size: .85rem; opacity: .7; }
.captcha-body h4 { font: 700 1.35rem "Bricolage Grotesque", sans-serif; margin: 0 0 4px; }
.captcha-body > p { margin: 0 0 14px; opacity: .75; }
.cap-photo { width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; margin-bottom: 14px; }
.years { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.years button { font: 800 1.15rem "Bricolage Grotesque", sans-serif; color: var(--field-ink); padding: 14px 0; border-radius: 12px; border: 2px solid var(--field-border); background: var(--field-bg); cursor: pointer; }
.years button:hover { border-color: var(--accent); }
.years button.wrong { border-color: #ff5a4f; color: #ff5a4f; text-decoration: line-through; }
.years button.right { background: #25d366; border-color: #25d366; color: #fff; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.pgrid button { padding: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; cursor: pointer; border: 4px solid transparent; position: relative; background: #222; }
.pgrid img { width: 100%; height: 100%; object-fit: cover; transition: transform .15s; }
.pgrid button.sel { border-color: var(--accent); }
.pgrid button.sel img { transform: scale(.9); }
.pgrid button.sel::after { content: "🥴"; position: absolute; top: 4px; right: 4px; font-size: 1.1rem; background: var(--accent); border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; }
.captcha-msg { min-height: 1.4em; margin: 12px 0 0; font-weight: 700; color: #ff5a4f; }
.captcha-msg.good { color: #1fbf63; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

.done { text-align: center; }
.done-emoji { font-size: 4rem; animation: pop .5s cubic-bezier(.5, 1.8, .5, 1); }
@keyframes pop { from { transform: scale(0); } }
.done h3 { font-size: 2rem; margin: 8px 0; }
.done p { opacity: .8; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 18px 0 14px; }

.foot { background: var(--foot-bg); color: var(--foot-ink); text-align: center; padding: 34px 20px; font-size: .9rem; }
.foot p { margin: 0; }
.foot a { color: var(--accent-3); }
.foot-math { font: 3rem/1 var(--display) !important; font-weight: var(--display-weight) !important; font-stretch: var(--display-stretch); color: var(--accent-2); margin-bottom: 10px !important; }

.confetti { position: fixed; top: -20px; z-index: 70; font-size: 1.6rem; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* Selector de diseño */
.tema-switch {
  position: fixed; left: 12px; bottom: 12px; z-index: 80; display: flex; gap: 4px; align-items: center;
  background: #fff; color: #1b1f4b; padding: 6px 8px 6px 12px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); font: 700 .85rem "DM Sans", sans-serif;
}
.tema-switch button { font: inherit; border: 0; background: #eee; color: #1b1f4b; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.tema-switch button.on { background: #1b1f4b; color: #fff; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1239px) { .float { display: none; } }
@media (max-width: 980px) { .cards { grid-template-columns: 1fr; max-width: none; } }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding: 0 16px 80px; gap: 0; }
  .hero-pile { height: 300px; order: -1; margin: 0 auto 10px; max-width: 420px; width: 100%; }
  .hero-pile .polaroid { width: 52%; padding: 6px 6px 24px; }
  .hero-pile .polaroid figcaption { font-size: .72rem; bottom: 4px; }
  .hero-pile .slot-2 { left: 0; top: 8%; }
  .hero-pile .slot-1 { left: 46%; top: 2%; }
  .hero-pile .slot-0 { left: 23%; top: 16%; }
  .hero-pile .slot-out { left: 23%; top: 32%; }
}
@media (max-width: 640px) {
  .section { padding: 68px 0; }
  .topnav { gap: 14px; padding: 14px 16px; font-size: .92rem; }
  .topnav a:not(.pill) { display: none; }
  .wrap { padding: 0 16px; }
  .hero h1 { margin-bottom: 18px; }
  .math { gap: 6px; }
  .math .tile { min-width: 0; flex: 1; padding: 8px 6px 6px; }
  .math .tile b { font-size: 2.3rem; }
  .math .tile.big b { font-size: 2.8rem; }
  .math .tile span { font-size: .62rem; letter-spacing: .08em; }
  .math .op { font-size: 1.7rem; }
  .countdown div { min-width: 0; flex: 1; padding: 8px 6px; }
  .countdown b { font-size: 1.5rem; }
  .cta .btn-big { padding: 15px 22px; font-size: 1rem; }
  .track .polaroid { width: 190px; }
  .wall-item { height: 52svh; padding: 7px 7px 32px; }
  .wall-year { font-size: 22svh; }
  .muro-track { gap: 22px; }
  .timeline li { grid-template-columns: 64px 1fr; gap: 14px; padding: 16px; }
  .timeline .day span { font-size: 1.9rem; }
  .form, .captcha, .done { padding: 20px; }
  .row .field { flex: 1 1 100%; }
  .gal-grid { columns: 2 140px; column-gap: 6px; padding: 10px 8px 50px; }
  .gal-grid figure { margin-bottom: 6px; }
  .lb-nav { width: 42px; height: 42px; font-size: 2rem; }
  .lb-prev { left: 6px; } .lb-next { right: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .math .tile, .math .op { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   MODO "ES HOY"
   ========================================================= */
.hoy-bar {
  position: relative; z-index: 3; margin: 0 24px 8px; padding: 18px 22px; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 0 var(--accent-shadow);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px;
}
.hoy-title { display: flex; flex-direction: column; margin-right: auto; }
.hoy-title b { font: var(--display-weight) clamp(2rem, 6vw, 3.2rem)/1 var(--display); letter-spacing: var(--display-track); text-transform: uppercase; }
.hoy-title span { font-weight: 700; opacity: .9; }
.hoy-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hoy-bar .btn { background: var(--accent-ink); color: var(--accent); box-shadow: none; }
.hoy-bar .btn.ghost { background: transparent; color: var(--accent-ink); }
.hoy-consigna { width: 100%; margin: 0; font-weight: 700; font-size: .95rem; }
.countdown .cd-msg { flex: 1; min-width: 200px; text-align: left; padding: 10px 16px; }
.countdown .cd-msg b { font-size: 2rem; }

/* =========================================================
   BARRIL
   ========================================================= */
.barril {
  display: flex; align-items: center; gap: 18px; margin: -12px 0 28px; padding: 14px 20px 14px 14px;
  background: var(--card-bg); color: var(--card-ink); border: var(--card-border); border-radius: var(--radius); box-shadow: var(--card-shadow);
}
.barril svg { width: 78px; flex: none; }
.keg-body { fill: color-mix(in srgb, var(--ink) 8%, #fff); stroke: var(--ink); stroke-width: 3; }
.keg-hoop, .keg-tap { fill: var(--ink); }
.keg-beer { fill: #ffb627; transition: y 1.6s cubic-bezier(.3, 1.2, .4, 1); }
.keg-foam { fill: #fff8e7; transition: y 1.6s cubic-bezier(.3, 1.2, .4, 1); }
.barril-txt { display: flex; flex-direction: column; }
.barril-txt b { font: var(--display-weight) clamp(1.6rem, 5vw, 2.2rem)/1.05 var(--display); letter-spacing: var(--display-track); }
.barril-txt span { color: var(--card-muted); }

/* =========================================================
   ÁLBUM 2026
   ========================================================= */
.s-album { background: var(--bg); }
.album-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.album-grid { columns: 4 200px; column-gap: 10px; }
.album-grid figure { margin: 0 0 10px; break-inside: avoid; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: color-mix(in srgb, var(--ink) 10%, transparent); box-shadow: var(--frame-shadow); }
.album-grid img { width: 100%; }
