/* ==========================================================
   4°B · Generación '92 · Instituto Linares
   Cada página = una pantalla (viewport) en escritorio.
   En móvil fluye con scroll natural.
   ========================================================== */

:root {
    --navy-950: #070e26; --navy-900: #0b1536; --navy-800: #101e47; --navy-700: #1a2b63; --navy-600: #2a3d7f;
    --gold: #fcc41f; --gold-deep: #d9a008; --gold-soft: #ffe08a; --red: #e63b2e;
    --paper: #f6f0e1; --paper-2: #ece3cd; --ink: #1b2236; --ink-soft: #4a5370;

    --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --f-type: 'Special Elite', 'Courier New', monospace;

    --header-h: 64px;
    --foot-h: 40px;
    --gutter: clamp(14px, 2.6vw, 40px);
    --radius: 14px;
    --shadow-1: 0 6px 20px rgba(5, 9, 24, .18);
    --shadow-2: 0 18px 50px rgba(5, 9, 24, .38);
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
    font-family: var(--f-body); font-size: 16px; line-height: 1.55; color: #e8ecf8;
    background: var(--navy-950); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.12; margin: 0; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; background: var(--gold); color: var(--navy-900); padding: 10px 16px; border-radius: 8px; font-weight: 700; transition: top .2s; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
html.lb-open, html.lb-open body { overflow: hidden; }

.eyebrow { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
em { font-style: italic; font-weight: 500; color: var(--gold); }
.empty { text-align: center; color: #9fb0dc; padding: 30px 0; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em; text-decoration: none;
    font-weight: 600; font-size: .95rem; line-height: 1; padding: 14px 24px; border-radius: 999px; border: 2px solid transparent;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn-sm { padding: 10px 16px; font-size: .86rem; }
.btn-gold { background: var(--gold); color: var(--navy-900); box-shadow: 0 8px 22px rgba(252, 196, 31, .25); }
.btn-gold:hover { background: #ffd24d; box-shadow: 0 12px 30px rgba(252, 196, 31, .4); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-600); box-shadow: var(--shadow-1); }
.btn-ghost-dark { color: var(--navy-800); border-color: rgba(16, 30, 71, .3); background: rgba(255, 255, 255, .6); }
.btn-ghost-dark:hover { border-color: var(--navy-800); background: #fff; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ==========================================================
   ESTRUCTURA: header, página, pie
   ========================================================== */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
    background: rgba(8, 15, 40, .96); border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.nav { height: 100%; width: min(1400px, 100% - 2 * var(--gutter)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex-shrink: 0; }
.brand-mark { height: 40px; width: auto; transition: transform .35s var(--ease); }
.brand:hover .brand-mark { transform: scale(1.06) rotate(-2deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--f-display); font-size: 1.02rem; }
.brand-text small { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

.nav-list { display: flex; align-items: center; gap: 0; }
.nav-link { position: relative; display: block; padding: 8px 11px; text-decoration: none; font-size: .9rem; font-weight: 500; color: #cdd5ee; transition: color .2s; white-space: nowrap; }
.nav-link::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-chat-li { margin-left: 8px; }
.nav-chat { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid rgba(252, 196, 31, .55); background: rgba(252, 196, 31, .1); color: var(--gold); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .84rem; transition: background .2s, color .2s; white-space: nowrap; }
.nav-chat:hover { background: var(--gold); color: var(--navy-900); }
.nav-chat small { font-weight: 500; opacity: .85; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; animation: pulse 2s infinite; display: inline-block; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; position: relative; z-index: 110; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2.5px; background: #fff; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s, top .3s var(--ease); }
.nav-toggle span:nth-child(1) { top: 14px; } .nav-toggle span:nth-child(2) { top: 21px; } .nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1320px) {
    .nav-toggle { display: block; }
    .nav-list {
        position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 2px; padding: 80px 24px 40px;
        background: rgba(7, 14, 38, .98); opacity: 0; visibility: hidden; transform: translateY(-10px);
        transition: opacity .3s, transform .3s var(--ease), visibility .3s; z-index: 105;
    }
    .nav-list.is-open { opacity: 1; visibility: visible; transform: none; }
    .nav-link { font-family: var(--f-display); font-size: 1.5rem; padding: 9px 20px; }
    .nav-link::after { left: 20px; right: 20px; bottom: 4px; }
    .nav-chat-li { margin: 16px 0 0; }
    .nav-chat { font-size: 1rem; padding: 12px 22px; }
    body.nav-open .chat-fab { display: none; }
}

.page { flex: 1; min-height: 0; padding-top: var(--header-h); display: flex; flex-direction: column; position: relative; }
.page > * { flex: 1; min-height: 0; }

.foot {
    flex: none; min-height: var(--foot-h); display: flex; align-items: center; justify-content: space-between; gap: 6px 18px; flex-wrap: wrap;
    padding: 6px var(--gutter); font-size: .76rem; color: #8d9bc4; background: var(--navy-950); border-top: 1px solid rgba(255, 255, 255, .07);
    position: relative; z-index: 3;
}
.foot-c { font-family: var(--f-display); font-style: italic; color: #cdd5ee; font-size: .9rem; }
.foot-r { font-family: var(--f-type); color: var(--gold); letter-spacing: .05em; }
.foot-admin { color: #6f7ca6; text-decoration: none; }
.foot-admin:hover { color: var(--gold); }

/* Escritorio: la página ocupa exactamente la pantalla */
@media (min-width: 901px) and (min-height: 560px) {
    html, body { height: 100vh; height: 100dvh; overflow: hidden; }
}
@media (max-width: 900px), (max-height: 559px) {
    .page > * { flex: 1 0 auto; }
}

/* Barras de desplazamiento internas, discretas */
.gal-main, .gal-side, .bd-scroll, .bd-left, .wall-scroll, .junta-scroll, .vp-list, .mag-index, .lb-thumbs, .chat-log, .vp-colls {
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent;
}

/* ==========================================================
   INICIO
   ========================================================== */
.is-home { background: var(--navy-900); isolation: isolate; }
.home-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--navy-900); flex: none; }
.home-bg-img { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(36px) saturate(1.15); opacity: 0; transform: scale(1.08); transition: opacity 1.4s ease, transform 9s ease-out; }
.home-bg-img.is-active { opacity: .5; transform: scale(1.18); }
.home-bg-shade { position: absolute; inset: 0; background:
    radial-gradient(900px 500px at 12% 45%, rgba(11, 21, 54, .95), rgba(11, 21, 54, .5) 60%, transparent),
    linear-gradient(180deg, rgba(7, 14, 38, .4), rgba(7, 14, 38, .88)); }
.home { display: flex; flex-direction: column; padding: clamp(10px, 2vh, 24px) var(--gutter) clamp(10px, 2vh, 20px); gap: clamp(10px, 2vh, 22px); width: min(1400px, 100%); margin-inline: auto; }
.home-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 4vw, 60px); align-items: center; }
.home-copy h1 { font-size: clamp(2rem, min(4.4vw, 7.2vh), 3.9rem); letter-spacing: -.02em; text-wrap: balance; color: #fff; }
.home-lead { margin-top: clamp(10px, 2vh, 20px); font-size: clamp(.98rem, 1.9vh, 1.15rem); color: #cdd5ee; max-width: 520px; }
.home-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(14px, 3vh, 30px); }
.home-pill { display: inline-block; margin-top: clamp(12px, 2.4vh, 24px); padding: 9px 16px; border-radius: 999px; text-decoration: none; font-size: .9rem; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); transition: background .2s, border-color .2s; }
.home-pill:hover { background: rgba(255, 255, 255, .15); border-color: var(--gold); }
.home-pill.is-today { background: var(--gold); color: var(--navy-900); font-weight: 700; border-color: var(--gold); }
.home-stage { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.home-slides { position: relative; flex: 1; min-height: 0; }
.home-slide { position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; opacity: 0; transform: translateY(12px) scale(.985); transition: opacity .9s var(--ease), transform .9s var(--ease); pointer-events: none; }
.home-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.home-slide img {
    width: auto; height: auto; max-width: 100%; max-height: calc(100% - 34px); object-fit: contain;
    border: 8px solid #f8f3e6; border-radius: 3px; box-shadow: var(--shadow-2), 0 0 0 1px rgba(0, 0, 0, .25);
    transform: rotate(-.8deg); transition: transform .5s var(--ease);
}
.home-slide:nth-child(even) img { transform: rotate(.9deg); }
.home-slide img:hover { transform: rotate(0) scale(1.012); }
.home-slide figcaption { font-family: var(--f-type); font-size: .98rem; color: var(--gold-soft); letter-spacing: .04em; height: 24px; }
.home-dots { display: flex; justify-content: center; gap: 8px; flex: none; }
.home-dot { width: 30px; height: 5px; border: 0; padding: 0; border-radius: 3px; background: rgba(255, 255, 255, .25); transition: background .2s, width .3s; }
.home-dot:hover { background: rgba(255, 255, 255, .5); }
.home-dot.is-active { background: var(--gold); width: 48px; }

.home-tiles { flex: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.tile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(6px); transition: transform .3s var(--ease), border-color .2s, background .2s; min-width: 0; }
.tile:hover { transform: translateY(-3px); border-color: var(--gold); background: rgba(255, 255, 255, .13); }
.tile-ico { font-size: 1.35rem; flex: none; }
.tile-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.tile-txt strong { font-size: .9rem; color: #fff; }
.tile-txt small { font-size: .7rem; color: #9fb0dc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1500px) { .tile-txt small { display: none; } }
@media (max-width: 1100px) { .home-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
    .home-main { grid-template-columns: minmax(0, 1fr); }
    .home-stage { order: -1; height: clamp(230px, 40vh, 400px); }
    .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================
   HISTORIA
   ========================================================== */
.story { display: flex; flex-direction: column; background: radial-gradient(1100px 600px at 70% 30%, #1d2c63 0%, var(--navy-900) 55%, var(--navy-950) 100%); }
.story-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.story-step {
    position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
    gap: clamp(20px, 5vw, 80px); align-items: center; padding: clamp(12px, 3vh, 36px) var(--gutter); width: min(1300px, 100%); margin-inline: auto;
    opacity: 0; visibility: hidden; transform: translateX(46px); transition: opacity .6s var(--ease), transform .7s var(--ease), visibility .6s;
}
.story-step.is-active { opacity: 1; visibility: visible; transform: none; }
.story-step.is-past { transform: translateX(-46px); }
.story-photo { margin: 0; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; }
.story-photo img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border: 10px solid #f8f3e6; box-shadow: var(--shadow-2); transform: rotate(-1.2deg); transition: transform .5s var(--ease); }
.story-photo img:hover { transform: rotate(0) scale(1.01); }
.story-year { display: block; font-family: var(--f-display); font-weight: 700; font-size: clamp(3rem, min(11vw, 15vh), 7.5rem); line-height: 1; color: var(--gold); letter-spacing: -.02em; }
.story-text h1 { font-size: clamp(1.5rem, min(3vw, 5vh), 2.5rem); color: #fff; margin: 6px 0 12px; }
.story-text p { font-size: clamp(1rem, 2.1vh, 1.2rem); color: #b8c2e0; max-width: 520px; }
.story-text-wide { grid-column: 1 / -1; text-align: center; margin-inline: auto; }
.story-text-wide p { margin-inline: auto; }
.story-ctas { margin-top: 22px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.story-rail { flex: none; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px var(--gutter) 16px; }
.story-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); font-size: 1.5rem; line-height: 1; transition: background .2s, color .2s; }
.story-arrow:hover:not(:disabled) { background: var(--gold); color: var(--navy-900); }
.story-arrow:disabled { opacity: .3; cursor: default; }
.story-dots { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.story-dots button { border: 0; background: rgba(255, 255, 255, .08); padding: 9px 16px; border-radius: 999px; font-family: var(--f-display); font-weight: 700; font-size: .95rem; color: #9fb0dc; transition: background .25s, color .25s, transform .25s; }
.story-dots button:hover { color: #fff; }
.story-dots button.is-done { color: #fff; background: rgba(252, 196, 31, .18); }
.story-dots button.is-active { background: var(--gold); color: var(--navy-900); transform: scale(1.08); }
@media (max-width: 900px) {
    .story-stage { min-height: 70vh; }
    .story-step { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1.3fr) auto; align-content: center; text-align: center; }
    .story-text p { margin-inline: auto; }
    .story-year { font-size: 3.4rem; }
}

/* ==========================================================
   GALERÍA
   ========================================================== */
.gal { display: grid; grid-template-columns: 300px minmax(0, 1fr); background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); }
.gal-side { display: flex; flex-direction: column; padding: 18px 16px; border-right: 1px solid rgba(255, 255, 255, .08); overflow: auto; min-height: 0; }
.gal-side-head h1 { font-size: 1.9rem; color: #fff; }
.gal-side-head p { color: #9fb0dc; font-size: .88rem; margin: 2px 0 14px; }
.gal-albums { display: flex; flex-direction: column; gap: 8px; }
.album-item { display: flex; align-items: center; gap: 12px; text-align: left; padding: 8px; border-radius: 12px; border: 1px solid transparent; background: rgba(255, 255, 255, .04); transition: background .2s, border-color .2s, transform .25s var(--ease); }
.album-item:hover { background: rgba(255, 255, 255, .09); transform: translateX(3px); }
.album-item.is-active { background: rgba(252, 196, 31, .12); border-color: var(--gold); }
.album-thumb { flex: 0 0 62px; height: 62px; border-radius: 8px; overflow: hidden; background: var(--navy-700); }
.album-thumb img { width: 100%; height: 100%; object-fit: cover; }
.album-info { display: flex; flex-direction: column; min-width: 0; }
.album-name { font-family: var(--f-display); font-weight: 700; font-size: .98rem; line-height: 1.2; color: #fff; }
.album-item.is-active .album-name { color: var(--gold); }
.album-count { font-size: .76rem; color: #9fb0dc; }

.gal-main { overflow: auto; min-height: 0; padding: 18px clamp(14px, 2vw, 28px) 28px; }
.album-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.album-head h2 { font-size: 1.6rem; color: #fff; }
.album-head p { color: #b8c2e0; font-size: .92rem; margin-top: 2px; }
.album-panel:not([hidden]) { animation: panelIn .45s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } }

.masonry { columns: 4 200px; column-gap: 12px; }
.ph { position: relative; display: block; margin: 0 0 12px; break-inside: avoid; border-radius: 10px; overflow: hidden; background: var(--navy-700); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); cursor: zoom-in; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.ph img { width: 100%; height: auto; transition: transform .7s var(--ease); }
.ph-over { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-between; padding: 10px; background: linear-gradient(180deg, transparent 50%, rgba(7, 14, 38, .85)); opacity: 0; transition: opacity .25s; }
.ph-n { font-family: var(--f-type); font-size: .82rem; color: var(--gold); }
.ph-zoom { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--navy-900); font-weight: 700; transform: scale(.6); transition: transform .3s var(--ease); }
.ph:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0, 0, 0, .5), 0 0 0 2px var(--gold); z-index: 2; }
.ph:hover img { transform: scale(1.05); }
.ph:hover .ph-over, .ph:focus-visible .ph-over { opacity: 1; }
.ph:hover .ph-zoom { transform: scale(1); }
@media (hover: none) { .ph-over { display: none; } }

@media (max-width: 900px) {
    .gal { grid-template-columns: minmax(0, 1fr); }
    .gal-side { min-width: 0; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); padding: 12px var(--gutter); overflow: visible; }
    .gal-side-head { display: flex; align-items: baseline; gap: 12px; }
    .gal-side-head .eyebrow { display: none; }
    .gal-side-head p { margin: 0; }
    .gal-albums { flex-direction: row; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
    .album-item { flex: 0 0 auto; width: 210px; scroll-snap-align: start; }
    .masonry { columns: 2 140px; }
}

/* ---------- Lightbox (compacto: ventana con marco, no pantalla completa) ---------- */
.lb { position: fixed; inset: 0; z-index: 500; background: rgba(4, 8, 22, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: clamp(10px, 3vh, 32px) clamp(10px, 3vw, 40px); opacity: 0; transition: opacity .2s; height: 100vh; height: 100dvh; }
.lb[hidden] { display: none; }
.lb.is-open { opacity: 1; }
.lb-panel { width: min(960px, 100%); height: min(640px, 100%); display: flex; flex-direction: column; background: var(--navy-950); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; transform: scale(.97); transition: transform .25s var(--ease); }
.lb.is-open .lb-panel { transform: none; }
.lb:fullscreen { padding: 0; background: #000; }
.lb:fullscreen .lb-panel { width: 100%; height: 100%; border-radius: 0; border: 0; }
.lb-top { flex: none; height: 44px; display: flex; justify-content: space-between; align-items: center; padding: 0 8px 0 14px; gap: 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.lb-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; color: #fff; font-family: var(--f-display); font-weight: 700; font-size: .95rem; }
.lb-title #lb-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { font-family: var(--f-type); color: var(--gold); font-size: .82rem; font-weight: 400; white-space: nowrap; }
.lb-actions { display: flex; gap: 4px; flex: none; align-items: center; }
.lb-actions button, .lb-actions a { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .09); color: #fff; font-size: .9rem; display: grid; place-items: center; text-decoration: none; transition: background .2s, color .2s; }
.lb-actions button:hover, .lb-actions a:hover { background: var(--gold); color: var(--navy-900); }
.lb-actions button.is-on { background: var(--gold); color: var(--navy-900); }
.lb-actions #lb-close { width: 34px; height: 34px; margin-left: 6px; background: var(--gold); color: var(--navy-900); font-size: 1rem; font-weight: 700; }
.lb-actions #lb-close:hover { background: #fff; }
.lb-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: none; background: #05091b; }
.lb-stage img {
    position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: 100%; max-height: 100%;
    object-fit: contain; user-select: none; -webkit-user-drag: none; will-change: transform; cursor: zoom-in; transition: opacity .2s;
}
.lb-stage.is-zoomed img { cursor: grab; max-width: none; max-height: none; }
.lb-stage.is-loading img { opacity: .35; }
.lb-stage.is-loading::after { content: ''; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .5); color: #fff; font-size: 1.5rem; line-height: 1; padding-bottom: 3px; transition: background .2s, color .2s; }
.lb-nav:hover { background: var(--gold); color: var(--navy-900); }
.lb-nav[hidden] { display: none; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; text-align: center; padding: 18px 56px 6px; background: linear-gradient(transparent, rgba(4, 8, 22, .8)); color: #e8ecf8; font-size: .84rem; pointer-events: none; }
.lb-cap[hidden] { display: none; }
.lb-thumbs { flex: none; height: 54px; display: flex; gap: 6px; overflow-x: auto; padding: 6px 10px; align-items: center; border-top: 1px solid rgba(255, 255, 255, .08); }
.lb-thumbs[hidden] { display: none; }
.lb-thumbs button { flex: 0 0 auto; width: 48px; height: 38px; padding: 0; border: 2px solid transparent; border-radius: 5px; overflow: hidden; opacity: .5; background: var(--navy-700); transition: opacity .2s, border-color .2s; }
.lb-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumbs button:hover { opacity: .9; }
.lb-thumbs button.is-active { opacity: 1; border-color: var(--gold); }
@media (max-width: 700px) {
    .lb { padding: 8px; }
    .lb-panel { height: min(78vh, 100%); border-radius: 12px; }
    .lb-thumbs { display: none; }
    #lb-share, #lb-full { display: none; }
}

/* ==========================================================
   ANUARIO
   ========================================================== */
.mag { display: flex; flex-direction: column; padding: 8px var(--gutter) 10px; background: radial-gradient(1200px 600px at 50% 40%, #1d2c63 0%, var(--navy-900) 55%, var(--navy-950) 100%); }
.mag-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; margin-bottom: 6px; }
.mag-title h1 { font-size: clamp(1.4rem, 3vh, 2rem); color: #fff; line-height: 1; }
.mag-title .eyebrow { margin: 0; font-size: .66rem; }
.mag-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); flex-wrap: wrap; }
.mag-bar input[type=range] { width: clamp(100px, 18vw, 240px); accent-color: var(--gold); }
.mag-pos { font-family: var(--f-type); color: var(--gold); min-width: 58px; text-align: center; font-size: .9rem; }
.mag-btn { background: rgba(255, 255, 255, .08); border: 0; color: #fff; padding: 7px 12px; border-radius: 999px; text-decoration: none; font-size: .82rem; white-space: nowrap; transition: background .2s, color .2s; }
.mag-btn:hover { background: var(--gold); color: var(--navy-900); }
.mag-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.mag-fit { width: min(100%, calc((100vh - var(--header-h) - var(--foot-h) - 90px) * 1.37)); width: min(100%, calc((100dvh - var(--header-h) - var(--foot-h) - 90px) * 1.37)); width: min(100%, calc(var(--stage-h, 520px) * 1.37)); }
.mag-book .stf__wrapper { transition: transform .6s var(--ease); filter: drop-shadow(0 24px 34px rgba(0, 0, 0, .55)); }
.mag-book.is-cover .stf__wrapper { clip-path: inset(0 0 0 50%); transform: translateX(-25%); }
.mag-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold-soft); z-index: 2; }
.mag-loading[hidden] { display: none; }
.spinner { width: 22px; height: 22px; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
.mag-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .45); color: #fff; font-size: 1.8rem; line-height: 1; padding-bottom: 3px; transition: background .2s, color .2s; }
.mag-nav:hover { background: var(--gold); color: var(--navy-900); }
.mag-prev { left: 0; } .mag-next { right: 0; }
.mag-index { position: absolute; top: 0; right: 0; bottom: 0; z-index: 8; width: min(380px, 92%); overflow: auto; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; align-content: start; background: rgba(7, 14, 38, .97); border-left: 1px solid rgba(255, 255, 255, .12); animation: slideIn .3s var(--ease); }
.mag-index[hidden] { display: none; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
.mag-index button { background: none; border: 2px solid transparent; border-radius: 6px; padding: 0; position: relative; overflow: hidden; transition: transform .2s, border-color .2s; }
.mag-index button:hover { transform: translateY(-3px); border-color: var(--gold); }
.mag-index span { position: absolute; bottom: 3px; right: 4px; font-size: .7rem; background: rgba(0, 0, 0, .7); color: #fff; padding: 0 6px; border-radius: 8px; }
.mag:fullscreen { padding: 12px; background: var(--navy-950); }
.mag:fullscreen .mag-fit { width: min(100%, calc(var(--stage-h, 520px) * 1.37)); }
@media (max-width: 900px) {
    .mag-stage { min-height: 70vh; }
    .mag-fit { width: 100%; }
    .mag-btn span { display: none; }
    .mag-prev { left: 2px; } .mag-next { right: 2px; }
}

/* ==========================================================
   HIMNO
   ========================================================== */
.vp { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(14px, 2vw, 28px); padding: 14px var(--gutter); background: var(--navy-800); position: relative; width: 100%; }
.vp-main { display: flex; flex-direction: column; min-height: 0; align-items: center; }
.vp-head { align-self: stretch; margin-bottom: 8px; }
.vp-head h1 { font-size: clamp(1.4rem, 3.4vh, 2.2rem); color: #fff; }
.vp-head .eyebrow { margin: 0; font-size: .66rem; }
.vp-screen { position: relative; width: 100%; max-width: calc((100vh - var(--header-h) - var(--foot-h) - 170px) * 16 / 9); max-width: calc((100dvh - var(--header-h) - var(--foot-h) - 170px) * 16 / 9); aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-2), 0 0 0 1px rgba(255, 255, 255, .1); flex: none; }
.vp-yt, .vp-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vp-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: var(--navy-900); }
.vp-fallback[hidden] { display: none; }
.vp-info { align-self: stretch; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 10px; }
.vp-info p { color: #b8c2e0; font-size: .92rem; flex: 1 1 240px; }
.vp-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.vp-side { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.vp-colls { display: flex; gap: 6px; padding: 10px; overflow-x: auto; border-bottom: 1px solid rgba(255, 255, 255, .1); flex: none; }
.vp-coll { flex: 0 0 auto; border: 1px solid rgba(255, 255, 255, .2); background: transparent; padding: 7px 14px; border-radius: 999px; font-size: .84rem; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.vp-coll:hover { border-color: var(--gold); }
.vp-coll.is-active { background: var(--gold); color: var(--navy-900); border-color: var(--gold); font-weight: 600; }
.vp-list { overflow-y: auto; padding: 8px; flex: 1; min-height: 0; }
.vp-item { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; width: 100%; text-align: left; background: transparent; border: 0; padding: 7px; border-radius: 10px; color: #dbe2f7; transition: background .2s; }
.vp-item:hover { background: rgba(255, 255, 255, .08); }
.vp-item.is-active { background: rgba(252, 196, 31, .15); color: #fff; }
.vp-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--navy-700); }
.vp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vp-item.is-active .vp-thumb::after { content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(7, 14, 38, .6); color: var(--gold); font-size: 1.3rem; }
.vp-item-title { font-size: .88rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vp-item-n { display: block; font-family: var(--f-type); color: var(--gold); font-size: .74rem; }
.lyrics-modal { position: fixed; inset: 0; z-index: 400; background: rgba(4, 8, 22, .85); display: grid; place-items: center; padding: 20px; }
.lyrics-modal[hidden] { display: none; }
.lyrics-box { position: relative; background: var(--navy-800); border-radius: 20px; padding: 28px 32px; width: min(620px, 100%); max-height: 85vh; overflow: auto; border: 1px solid rgba(255, 255, 255, .15); }
.lyrics-box h2 { color: var(--gold); margin-bottom: 14px; }
.lyrics-box > div { font-family: var(--f-display); font-size: 1.15rem; line-height: 1.8; }
.lyrics-box .chat-x { position: absolute; top: 12px; right: 12px; }
@media (max-width: 1000px) { .vp { grid-template-columns: minmax(0, 1fr); } .vp-side { max-height: 420px; } .vp-screen { max-width: 100%; } }

/* Música */
.vp-music { background: radial-gradient(900px 500px at 25% 20%, #3a2a78 0%, var(--navy-800) 60%, var(--navy-900) 100%); }
.vp-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.vp-head > .eyebrow { flex: 1 0 100%; }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 24px; margin-bottom: 4px; }
.eq i { width: 4px; background: var(--gold); border-radius: 2px; animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(1) { height: 40%; animation-delay: -.2s; } .eq i:nth-child(2) { height: 80%; animation-delay: -.5s; }
.eq i:nth-child(3) { height: 55%; animation-delay: -.8s; } .eq i:nth-child(4) { height: 95%; animation-delay: -.1s; } .eq i:nth-child(5) { height: 45%; animation-delay: -.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.eq i { transform-origin: bottom; }
.song-form { display: flex; flex-direction: column; gap: 12px; color: #fff; }
.song-form p { color: #b8c2e0; font-size: .92rem; }
.song-form label { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; font-weight: 600; }
.song-form input[type=text], .song-form textarea { width: 100%; border: 1.5px solid rgba(255, 255, 255, .25); border-radius: 10px; padding: 10px 12px; background: var(--navy-900); color: #fff; font: inherit; font-weight: 400; }
.song-form input:focus, .song-form textarea:focus { outline: 3px solid var(--gold); }
.song-form .form-msg.is-ok { color: #7be0a0; } .song-form .form-msg.is-err { color: #ff9b94; }

/* ==========================================================
   CUMPLEAÑOS
   ========================================================== */
.bd { display: flex; flex-direction: column; gap: 12px; padding: 14px var(--gutter) 10px; background: var(--paper); background-image: radial-gradient(rgba(27, 34, 54, .05) 1px, transparent 1px); background-size: 22px 22px; color: var(--ink); position: relative; width: 100%; }
.bd-top { flex: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }
.bd-head h1 { font-size: clamp(1.4rem, 3.2vh, 2rem); color: var(--navy-800); }
.bd-head em { color: var(--gold-deep); }
.bd-head .eyebrow { color: var(--gold-deep); margin: 0; font-size: .66rem; }
.bd-search input { border: 1.5px solid rgba(16, 30, 71, .2); background: #fff; padding: 9px 16px; border-radius: 999px; font: inherit; font-size: .9rem; width: min(300px, 100%); color: var(--ink); }
.bd-search input:focus { outline: 3px solid var(--gold); border-color: var(--navy-800); }

.bd-cards { flex: none; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.next-bd { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-1); border: 1px solid rgba(16, 30, 71, .08); position: relative; overflow: hidden; }
.next-bd::before { content: ''; position: absolute; right: -50px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(var(--gold-soft), transparent 70%); opacity: .7; }
.next-bd-date { width: 84px; height: 96px; border-radius: 12px; background: var(--navy-800); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; border-top: 10px solid var(--red); position: relative; }
.nbd-day { font-family: var(--f-display); font-size: 2.5rem; font-weight: 700; line-height: 1; }
.nbd-mon { font-size: .74rem; letter-spacing: .2em; color: var(--gold); font-weight: 700; margin-top: 3px; }
.next-bd-main { position: relative; min-width: 0; }
.next-bd .eyebrow { color: var(--gold-deep); margin: 0; font-size: .64rem; }
.next-bd h2 { font-size: 1.25rem; color: var(--navy-800); margin: 2px 0 8px; }
.countdown { display: flex; gap: 6px; max-width: 340px; }
.countdown div { flex: 1; text-align: center; background: var(--paper); border-radius: 9px; padding: 4px; }
.countdown b { display: block; font-family: var(--f-display); font-size: 1.2rem; color: var(--navy-800); line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.next-bd-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.next-bd-actions .btn { padding: 8px 12px; font-size: .78rem; }
.next-bd.is-today { background: linear-gradient(135deg, #fff, #fff4cc); }
.next-bd.is-today .countdown { display: none; }

.alarms { background: var(--navy-800); color: #e8ecf8; border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 8px; }
.alarms h2 { font-size: 1.05rem; color: #fff; }
.alarm-tabs { display: flex; gap: 4px; background: rgba(255, 255, 255, .07); border-radius: 999px; padding: 4px; }
.alarm-tabs button { flex: 1; border: 0; background: transparent; padding: 6px 6px; border-radius: 999px; font-size: .78rem; font-weight: 600; color: #b8c2e0; transition: background .2s, color .2s; white-space: nowrap; }
.alarm-tabs button.is-active { background: var(--gold); color: var(--navy-900); }
.alarm-pane[hidden] { display: none; }
.alarm-pane p { font-size: .84rem; color: #b8c2e0; margin-bottom: 8px; }
.alarm-btns, .alarm-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.alarm-form label { font-size: .84rem; display: flex; align-items: center; gap: 8px; }
.alarm-form select { background: var(--navy-900); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; padding: 6px 8px; font: inherit; }
.alarm-status { font-size: .82rem; color: var(--gold-soft); }

.bd-months { flex: none; display: flex; gap: 5px; flex-wrap: wrap; }
.bd-month { border: 1.5px solid rgba(16, 30, 71, .2); background: #fff; color: var(--navy-800); padding: 6px 11px; border-radius: 999px; font-size: .82rem; font-weight: 600; transition: background .2s, color .2s, border-color .2s; }
.bd-month b { font-weight: 700; margin-left: 4px; color: var(--red); }
.bd-month:hover { border-color: var(--navy-800); }
.bd-month.is-empty { opacity: .45; }
.bd-month[aria-selected=true] { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.bd-month[aria-selected=true] b { color: var(--gold); }

.bd-scroll { flex: 1; min-height: 0; overflow: auto; padding: 2px 4px 6px 2px; }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.bd-card { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px 10px; border: 1px solid rgba(16, 30, 71, .08); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.bd-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.bd-card[hidden] { display: none; }
.bd-date { flex: 0 0 46px; height: 52px; border-radius: 9px; background: var(--paper); border-top: 5px solid var(--red); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.bd-date b { font-family: var(--f-display); font-size: 1.3rem; color: var(--navy-800); }
.bd-date span { font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin-top: 3px; }
.bd-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bd-info strong { font-size: .88rem; color: var(--ink); line-height: 1.25; }
.bd-when { color: var(--ink-soft); font-size: .76rem; }
.bd-card.is-today { background: linear-gradient(135deg, #fff, #fff1bd); box-shadow: 0 0 0 2px var(--gold); }
.bd-card.is-today .bd-when { color: var(--red); font-weight: 700; }
.bd-card.is-soon .bd-when { color: var(--navy-600); font-weight: 600; }
.bd-act { display: flex; gap: 0; }
.bd-fav, .bd-ics { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; font-size: 1rem; text-decoration: none; transition: background .2s, transform .2s; }
.bd-fav:hover, .bd-ics:hover { background: var(--paper); transform: scale(1.12); }
.bd-fav { color: #b8a15a; font-size: 1.3rem; }
.bd-fav[aria-pressed=true] { color: var(--gold-deep); }
.bd .empty { color: var(--ink-soft); }
.bd-missing { margin-top: 12px; font-size: .84rem; color: var(--ink-soft); padding: 10px 12px; border: 2px dashed rgba(16, 30, 71, .25); border-radius: 12px; }
.bd-missing a { color: var(--navy-700); font-weight: 600; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 400; }
@media (max-width: 900px) { .bd-cards { grid-template-columns: minmax(0, 1fr); } .bd-search { flex: 1 1 100%; } .bd-search input { width: 100%; } }

/* ==========================================================
   PIZARRÓN
   ========================================================== */
.wall { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: clamp(14px, 2vw, 26px); padding: 14px var(--gutter); position: relative; color: var(--ink);
    background-color: #b98550; background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .08) 0 2px, transparent 3px),
        radial-gradient(circle at 70% 60%, rgba(0, 0, 0, .1) 0 2px, transparent 3px),
        radial-gradient(circle at 40% 80%, rgba(0, 0, 0, .08) 0 1.5px, transparent 2.5px),
        linear-gradient(135deg, #c9985f, #a9743f);
    background-size: 26px 26px, 31px 31px, 19px 19px, cover; }
.wall-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; }
.wall-head h1 { font-size: clamp(1.5rem, 3.4vh, 2.1rem); color: #2a1a0a; }
.wall-head h1 em { color: #7a1d12; }
.wall-head .eyebrow { color: #3a2410; margin: 0; font-size: .66rem; }
.wall-head p { color: #3d2a14; font-size: .92rem; margin-top: 4px; }
.wall-form, .idea-form { background: #fffdf5; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.idea-form h2 { font-size: 1.2rem; color: var(--navy-800); }
.wall-form label, .idea-form label, .contact-form label { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; font-weight: 600; }
.wall-form input[type=text], .wall-form textarea, .idea-form input, .idea-form textarea, .idea-form select, .contact-form input[type=text], .contact-form input[type=email], .contact-form textarea {
    width: 100%; border: 1.5px solid rgba(16, 30, 71, .22); border-radius: 10px; padding: 9px 12px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; transition: border-color .2s, box-shadow .2s;
}
.wall-form textarea, .idea-form textarea, .contact-form textarea { resize: vertical; min-height: 70px; }
.wall-form input:focus, .wall-form textarea:focus, .idea-form input:focus, .idea-form textarea:focus, .idea-form select:focus, .contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(252, 196, 31, .5); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: .84rem; font-weight: 600; margin-bottom: 6px; padding: 0; }
.wall-cats, .ct-types { display: flex; flex-wrap: wrap; gap: 6px; }
.wall-cats legend, .ct-types legend { width: 100%; }
.wall-cats label, .ct-types label { display: block; }
.wall-cats input, .ct-types input, .wall-colors input { position: absolute; opacity: 0; pointer-events: none; }
.wall-cats span, .ct-types span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1.5px solid rgba(16, 30, 71, .22); font-weight: 600; font-size: .82rem; cursor: pointer; transition: all .2s; }
.wall-cats input:checked + span, .ct-types input:checked + span { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.wall-cats input:focus-visible + span, .ct-types input:focus-visible + span, .wall-colors input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.wall-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wall-colors { display: flex; gap: 6px; }
.wall-colors label { display: block; }
.sw { display: block; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; border: 2px solid rgba(0, 0, 0, .12); box-shadow: 1px 2px 4px rgba(0, 0, 0, .15); transition: transform .2s; }
.wall-colors input:checked + .sw { border-color: var(--navy-800); transform: scale(1.15) rotate(-4deg); }
.counter { align-self: flex-end; color: var(--ink-soft); font-weight: 400; font-size: .76rem; }
.c-amarillo { background: #fff3a3; } .c-rosa { background: #ffc4d6; } .c-celeste { background: #b9e4ff; } .c-verde { background: #c9f0b6; } .c-naranja { background: #ffd2a0; }
.form-msg { min-height: 1.3em; font-size: .86rem; font-weight: 600; }
.form-msg.is-ok { color: #1d7a3a; } .form-msg.is-err { color: #b3261e; }

.wall-board { display: flex; flex-direction: column; min-height: 0; }
.wall-filter { flex: none; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { border: 0; background: rgba(255, 255, 255, .55); color: #2a1a0a; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .86rem; transition: background .2s, transform .2s; }
.chip:hover { background: rgba(255, 255, 255, .85); transform: translateY(-1px); }
.chip.is-active { background: #2a1a0a; color: #fff; }
.wall-scroll { flex: 1; min-height: 0; overflow: auto; border-radius: var(--radius); background: rgba(80, 45, 15, .12); box-shadow: inset 0 0 0 6px rgba(120, 75, 30, .45), inset 0 4px 20px rgba(0, 0, 0, .25); padding: 22px 20px; }
.corkboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 24px 18px; }
.note { position: relative; padding: 24px 16px 12px; min-height: 140px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; transform: rotate(var(--r, 0deg)); box-shadow: 3px 6px 14px rgba(0, 0, 0, .28); transition: transform .35s var(--ease), box-shadow .35s var(--ease); color: #2b2a22; border-radius: 2px 2px 14px 2px; animation: noteIn .6s var(--ease) backwards; }
.note::before { content: ''; position: absolute; top: 7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff7a6b, var(--red) 60%, #8c1a12); box-shadow: 1px 3px 4px rgba(0, 0, 0, .4); }
.note:hover { transform: rotate(0) scale(1.04) translateY(-4px); box-shadow: 6px 14px 26px rgba(0, 0, 0, .38); z-index: 3; }
@keyframes noteIn { from { opacity: 0; transform: translateY(-30px) rotate(calc(var(--r, 0deg) * 3)) scale(.9); } }
.note.c-amarillo { background: #fff3a3; } .note.c-rosa { background: #ffc4d6; } .note.c-celeste { background: #b9e4ff; } .note.c-verde { background: #c9f0b6; } .note.c-naranja { background: #ffd2a0; }
.note-cat { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.note-text { font-family: var(--f-type); font-size: 1rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.note-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; font-size: .76rem; }
.note-by { font-weight: 700; } .note-by small { display: block; font-weight: 400; opacity: .7; }
.note-react { display: flex; gap: 3px; }
.rx { border: 0; background: rgba(255, 255, 255, .55); border-radius: 999px; padding: 3px 8px; font-size: .76rem; transition: transform .2s, background .2s; }
.rx:hover { transform: scale(1.15); background: #fff; }
.rx.is-on { background: var(--navy-800); color: #fff; }
.rx-flag { opacity: .45; }
.note:hover .rx-flag { opacity: 1; }
.wall-mod { flex: none; margin-bottom: 10px; padding: 8px 14px; border-radius: 12px; background: var(--navy-800); color: #fff; font-size: .86rem; border: 1px solid var(--gold); }
.wall-mod[hidden] { display: none; }
.wall-mod a { color: var(--gold); }
.note-mod { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; padding-top: 8px; border-top: 1px dashed rgba(0, 0, 0, .25); }
.note-mod button { border: 0; background: rgba(0, 0, 0, .12); border-radius: 999px; padding: 4px 9px; font-size: .72rem; font-weight: 600; }
.note-mod button:hover { background: var(--red); color: #fff; }
.note-mod button[data-mod=ok]:hover { background: #1d7a3a; }
.note-flag { font-size: .72rem; font-weight: 700; color: #8c1a12; align-self: center; }
.note.is-hidden { opacity: .6; outline: 2px dashed var(--red); }
.wall-more { margin: 20px auto 0; display: flex; background: #2a1a0a; color: #fff; border-color: transparent; }
.wall-more[hidden] { display: none; }
.wall-loading, .wall-empty { grid-column: 1 / -1; text-align: center; color: #3d2a14; padding: 40px 0; font-family: var(--f-type); }
@media (max-width: 900px) { .wall { grid-template-columns: minmax(0, 1fr); } .wall-side, .wall-scroll { overflow: visible; } .wall-scroll { padding: 18px 12px; } }

/* ==========================================================
   PRÓXIMA JUNTA
   ========================================================== */
.junta { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto minmax(0, 1fr); gap: 14px clamp(16px, 2.4vw, 34px); padding: 16px var(--gutter) 12px; background: linear-gradient(135deg, #ffd24d 0%, var(--gold) 45%, #f0b400 100%); color: var(--navy-900); width: 100%; }
.junta-hero { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 20px 40px; align-items: center; }
.junta-head h1 { font-size: clamp(2rem, 5.4vh, 3.2rem); color: var(--navy-900); letter-spacing: -.01em; }
.junta-head .eyebrow { color: var(--navy-800); margin: 0 0 4px; font-size: .7rem; }
.junta-head p { margin-top: 8px; color: #3a3510; max-width: 620px; font-size: 1rem; }
.junta-meter { background: rgba(255, 255, 255, .6); border-radius: 18px; padding: 14px 18px; box-shadow: 0 6px 18px rgba(11, 21, 54, .12); }
.jm-big { display: flex; align-items: baseline; gap: 10px; }
.jm-big > span { font-family: var(--f-display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--navy-800); }
.jm-big small { font-size: .9rem; color: #3a3510; font-weight: 600; }
.jm-bar { height: 12px; background: rgba(16, 30, 71, .15); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.jm-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--navy-700), var(--navy-600)); border-radius: 999px; transition: width 1s var(--ease); }
.jm-hint { font-size: .82rem; color: #3a3510; }

.junta-ideas { min-height: 0; display: flex; flex-direction: column; }
.junta-scroll { flex: 1; min-height: 0; overflow: auto; padding: 14px 6px 10px 2px; }
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; align-items: stretch; }
.ideas .empty { color: #3a3510; grid-column: 1 / -1; }
.idea { background: #fffdf5; border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 8px 22px rgba(11, 21, 54, .16); display: flex; flex-direction: column; gap: 10px; position: relative; animation: panelIn .45s var(--ease) backwards; color: var(--ink); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.idea:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(11, 21, 54, .22); }
.idea.is-winner { box-shadow: 0 0 0 3px var(--navy-800), 0 8px 22px rgba(11, 21, 54, .2); }
.idea-flag { position: absolute; top: -11px; left: 16px; background: var(--navy-800); color: var(--gold); font-size: .7rem; font-weight: 700; letter-spacing: .08em; padding: 3px 12px; border-radius: 999px; text-transform: uppercase; }
.idea > div:first-of-type { flex: 1; }
.idea h4 { font-size: 1.15rem; color: var(--navy-800); }
.idea p { color: var(--ink-soft); font-size: .92rem; margin-top: 4px; white-space: pre-line; overflow-wrap: anywhere; }
.idea-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.idea-tags span { font-size: .74rem; background: var(--paper); border-radius: 999px; padding: 2px 10px; color: var(--ink-soft); font-weight: 600; }
.idea-act { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(16, 30, 71, .1); }
.vote { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid rgba(16, 30, 71, .25); background: #fff; border-radius: 999px; padding: 8px 10px; font-weight: 600; font-size: .84rem; color: var(--navy-800); transition: all .2s; }
.vote b { font-family: var(--f-display); }
.vote:hover { border-color: var(--navy-800); transform: translateY(-1px); }
.vote.is-on { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.vote.is-on b { color: var(--gold); }
.idea-add { border: 2px dashed rgba(16, 30, 71, .4); background: rgba(255, 255, 255, .3); border-radius: 16px; min-height: 150px; font-weight: 700; color: var(--navy-800); font-size: 1rem; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s, border-color .2s; }
.idea-add:hover { background: rgba(255, 255, 255, .6); border-color: var(--navy-800); }

.junta-side { min-height: 0; overflow: auto; }
.junta .idea-form { box-shadow: 0 10px 28px rgba(11, 21, 54, .2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 1000px) {
    .junta { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
    .junta-hero { grid-template-columns: minmax(0, 1fr); }
    .junta-scroll, .junta-side { overflow: visible; }
}
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }

/* ==========================================================
   CONTACTO
   ========================================================== */
.contact { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.5fr); gap: clamp(16px, 3vw, 44px); padding: 14px var(--gutter); background: var(--navy-800); align-items: center; width: min(1300px, 100%); margin-inline: auto; }
.contact-side { display: flex; flex-direction: column; gap: 10px; }
.contact-head h1 { font-size: clamp(1.6rem, 4.2vh, 2.4rem); color: #fff; }
.contact-head .eyebrow { margin: 0; font-size: .66rem; }
.contact-head p { color: #b8c2e0; margin: 6px 0 4px; font-size: .95rem; }
.channel { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); text-decoration: none; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); transition: transform .3s var(--ease), border-color .2s, background .2s; }
.channel:hover { transform: translateX(6px); border-color: var(--gold); background: rgba(255, 255, 255, .1); }
.ch-ico { font-size: 1.4rem; width: 42px; height: 42px; display: grid; place-items: center; background: rgba(252, 196, 31, .15); border-radius: 11px; flex: none; }
.channel strong { display: block; color: #fff; font-size: .95rem; }
.channel small { color: #b8c2e0; word-break: break-all; }
.contact-note { font-size: .84rem; color: #b8c2e0; padding: 10px 12px; border-radius: 12px; background: rgba(252, 196, 31, .09); border: 1px solid rgba(252, 196, 31, .28); }
.contact-form { background: #fffdf5; color: var(--ink); border-radius: 20px; padding: clamp(16px, 2.4vw, 26px); display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-2); }
.contact-form small { font-weight: 400; color: var(--ink-soft); }
.drop { position: relative; display: flex !important; flex-direction: row !important; align-items: center; flex-wrap: wrap; gap: 10px !important; padding: 12px 14px; border: 2px dashed rgba(16, 30, 71, .3); border-radius: var(--radius); background: var(--paper); cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.is-over { border-color: var(--navy-800); background: #fff7d6; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-ico { font-size: 1.5rem; }
.drop-txt { font-weight: 400; font-size: .88rem; flex: 1 1 200px; }
.drop-list { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.drop-list span { font-size: .74rem; background: #fff; border-radius: 8px; padding: 3px 8px; border: 1px solid rgba(16, 30, 71, .15); }
.contact-send-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
@media (max-width: 900px) { .contact { grid-template-columns: minmax(0, 1fr); align-items: start; } }

/* ==========================================================
   CHAT + TOAST
   ========================================================== */
.chat-fab { position: fixed; right: 18px; bottom: calc(var(--foot-h) + 14px); z-index: 300; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--gold); color: var(--navy-900); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: transform .3s var(--ease); }
.chat-fab:hover { transform: scale(1.08) rotate(-4deg); }
.chat-fab.is-hidden { transform: scale(0); pointer-events: none; }
.chat-badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.chat-badge[hidden] { display: none; }
.chat { position: fixed; right: 18px; bottom: calc(var(--foot-h) + 10px); z-index: 310; width: min(380px, 100% - 24px); height: min(540px, 100% - var(--header-h) - var(--foot-h) - 20px); display: flex; flex-direction: column; background: var(--navy-900); color: #fff; border-radius: 20px; box-shadow: 0 24px 70px rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .12); overflow: hidden; animation: chatIn .35s var(--ease); }
.chat[hidden] { display: none; }
@keyframes chatIn { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--navy-800); border-bottom: 3px solid var(--gold); }
.chat-head small { display: flex; align-items: center; gap: 6px; font-size: .76rem; color: #b8c2e0; }
.chat-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); font-size: 1.4rem; line-height: 1; color: #fff; }
.chat-x:hover { background: var(--red); }
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 86%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: rgba(255, 255, 255, .1); font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; animation: panelIn .3s var(--ease); }
.msg b { display: block; font-size: .72rem; color: var(--gold); margin-bottom: 1px; }
.msg time { display: block; font-size: .66rem; opacity: .55; text-align: right; margin-top: 2px; }
.msg.me { align-self: flex-end; background: var(--gold); color: var(--navy-900); border-radius: 14px 14px 4px 14px; }
.msg.me b { color: var(--navy-700); }
.chat-empty { margin: auto; text-align: center; color: #9fb0dc; font-size: .9rem; padding: 20px; }
.chat-form { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--navy-800); }
.chat-form input[type=text] { width: 100%; border: 1px solid rgba(255, 255, 255, .2); background: var(--navy-900); color: #fff; border-radius: 10px; padding: 9px 12px; font: inherit; }
.chat-form input:focus { outline: 2px solid var(--gold); }
.chat-row { display: flex; gap: 6px; align-items: center; }
.chat-head-r { display: flex; align-items: center; gap: 8px; }
.chat-wa { font-size: .74rem; font-weight: 700; text-decoration: none; background: #25d366; color: #06361a; padding: 5px 10px; border-radius: 999px; }
.chat-wa:hover { background: #3be082; }
.chat-ico { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); font-size: 1.15rem; cursor: pointer; transition: background .2s; }
.chat-ico:hover { background: rgba(252, 196, 31, .3); }
.chat-row input[type=text] { flex: 1; min-width: 0; }
.emoji-pop { position: absolute; left: 10px; right: 10px; bottom: 112px; z-index: 5; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; max-height: 180px; overflow: auto; background: var(--navy-800); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.emoji-pop[hidden] { display: none; }
.emoji-pop button { border: 0; background: transparent; font-size: 1.35rem; line-height: 1; padding: 6px 0; border-radius: 8px; }
.emoji-pop button:hover { background: rgba(255, 255, 255, .14); transform: scale(1.15); }
.chat-attach { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8rem; padding: 5px 10px; border-radius: 10px; background: rgba(252, 196, 31, .15); color: var(--gold-soft); }
.chat-attach[hidden] { display: none; }
.chat-attach button { border: 0; background: transparent; color: #fff; font-size: 1.1rem; }
.msg-img { display: block; max-width: 100%; max-height: 220px; width: auto; height: auto; border-radius: 10px; margin: 4px 0; cursor: zoom-in; object-fit: contain; background: rgba(0, 0, 0, .25); }
.msg-t { display: block; }
.foot-wa { color: #25d366; text-decoration: none; font-weight: 600; }
.foot-wa:hover { text-decoration: underline; }
.toast { position: fixed; left: 50%; bottom: calc(var(--foot-h) + 18px); transform: translateX(-50%); z-index: 700; background: var(--navy-800); color: #fff; padding: 11px 22px; border-radius: 999px; border: 1px solid var(--gold); box-shadow: var(--shadow-2); font-weight: 600; font-size: .92rem; max-width: calc(100% - 32px); text-align: center; }
.toast[hidden] { display: none; }
@media (max-width: 520px) { .chat { right: 8px; bottom: 8px; height: min(72vh, 100% - 16px); } .chat-fab { bottom: 14px; } }

/* ---------- Preferencias ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print { .site-header, .chat, .chat-fab, .lb, .foot { display: none !important; } }


/* ---------- Chat: reacciones, menciones, fijado, página completa ---------- */
.chat-btn { height: 30px; min-width: 30px; padding: 0 8px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: .8rem; font-weight: 600; transition: background .2s; }
.chat-btn:hover { background: rgba(252, 196, 31, .35); }
.chat-collapse { display: none; }
.chat-pin { padding: 8px 14px; background: rgba(252, 196, 31, .16); color: var(--gold-soft); font-size: .84rem; border-bottom: 1px solid rgba(252, 196, 31, .3); }
.chat-pin[hidden] { display: none; }
.msg-n { cursor: pointer; }
.msg-n:hover { text-decoration: underline; }
.msg .at { color: #9fd0ff; font-weight: 700; }
.msg.me .at { color: var(--navy-700); }
.msg.mention { box-shadow: 0 0 0 2px var(--gold); }
.msg-rx { display: flex; gap: 4px; margin-top: 4px; }
.msg-rx button { border: 0; background: rgba(255, 255, 255, .08); color: inherit; border-radius: 999px; padding: 1px 7px; font-size: .74rem; line-height: 1.6; opacity: .55; transition: opacity .15s, background .15s; }
.msg-rx button i { font-style: normal; font-weight: 700; margin-left: 3px; }
.msg:hover .msg-rx button, .msg-rx button.has { opacity: 1; }
.msg-rx button.on { background: rgba(252, 196, 31, .45); }
.msg.me .msg-rx button { background: rgba(11, 21, 54, .12); }
.msg.me .msg-rx button.on { background: rgba(11, 21, 54, .35); }

/* Página completa */
.pg-chat .chat-fab { display: none; }
.pg-chat .chat-expand { display: none; }
.pg-chat .chat-collapse { display: inline-block; }
.pg-chat .chat-x { display: none; }
.pg-chat .chat {
    position: fixed; top: calc(var(--header-h) + 10px); bottom: calc(var(--foot-h) + 10px); left: 50%; right: auto;
    width: min(920px, calc(100% - 2 * var(--gutter))); height: auto; transform: translateX(-50%); animation: none; z-index: 20;
}
.pg-chat .emoji-pop { bottom: 118px; }
.pg-chat .msg { max-width: 70%; }
.pg-chat .msg-img { max-height: 320px; }


/* ---------- Mini-reproductor persistente ---------- */
.mp { position: sticky; bottom: 0; z-index: 80; flex: none; display: flex; align-items: center; gap: 14px; height: 72px; padding: 0 var(--gutter) 0 0; background: linear-gradient(90deg, #1a1450, var(--navy-900) 40%); border-top: 2px solid var(--gold); box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); }
.mp[hidden] { display: none; }
.mp-prog { position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: rgba(255, 255, 255, .15); }
.mp-prog i { display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 1s linear; }
.mp-slot { flex: none; width: 128px; height: 100%; background: #000; }
.mp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mp-info strong { font-size: .92rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-info small { font-size: .74rem; color: var(--gold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-ctrl { display: flex; align-items: center; gap: 6px; flex: none; }
.mp-ctrl button, .mp-ctrl a { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: .95rem; display: grid; place-items: center; text-decoration: none; transition: background .2s, color .2s; }
.mp-ctrl button:hover, .mp-ctrl a:hover { background: var(--gold); color: var(--navy-900); }
.mp-ctrl .mp-main { width: 44px; height: 44px; background: var(--gold); color: var(--navy-900); font-size: 1rem; }
.mp-ctrl input[type=range] { width: 84px; accent-color: var(--gold); }
.mp-video { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 60; background: #000; overflow: hidden; display: none; }
.mp-video.on { display: block; }
.mp-video.is-mini { z-index: 85; }
.mp-video:not(.is-mini) { border-radius: var(--radius); }
.mp-video iframe, #mp-yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
body.has-mp .chat-fab { bottom: calc(var(--foot-h) + 66px); }
body.has-mp .chat { bottom: calc(var(--foot-h) + 62px); height: min(540px, 100% - var(--header-h) - var(--foot-h) - 72px); }
body.has-mp.pg-chat .chat { bottom: calc(var(--foot-h) + 82px); height: auto; }
body.has-mp .toast { bottom: calc(var(--foot-h) + 72px); }
@media (max-width: 640px) {
    .mp { height: 64px; gap: 10px; }
    .mp-slot { width: 96px; }
    .mp-ctrl input[type=range], .mp-ctrl #mp-prev { display: none; }
}

/* Transición suave entre páginas */
.page { transition: opacity .12s ease; }
.page.is-leaving { opacity: 0; }
.page.is-entering { animation: pageIn .35s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }

/* Inicio: acceso a la música */
.home-music { display: flex; align-items: stretch; gap: 8px; margin-top: clamp(12px, 2.2vh, 22px); max-width: 520px; }
.hm-play { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; text-align: left; color: inherit;
    background: linear-gradient(135deg, rgba(252, 196, 31, .22), rgba(58, 42, 120, .55)); border: 1px solid rgba(252, 196, 31, .55); backdrop-filter: blur(6px);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s, background .3s; }
.hm-play:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.home-music.is-playing .hm-play { background: linear-gradient(135deg, rgba(252, 196, 31, .4), rgba(58, 42, 120, .6)); border-color: var(--gold); }
.home-music .eq { height: 30px; margin: 0; flex: none; }
.home-music:not(.is-playing) .eq i { animation-play-state: paused; }
.hm-txt { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.hm-txt strong { font-family: var(--f-display); font-size: 1.05rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-txt small { font-size: .8rem; color: var(--gold-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-go { flex: none; width: 52px; border-radius: 16px; background: var(--gold); color: var(--navy-900); display: grid; place-items: center; font-size: 1.7rem; line-height: 1; padding-bottom: 4px; text-decoration: none; transition: transform .3s var(--ease), background .2s; }
.hm-go:hover { transform: translateX(3px); background: #ffd24d; }

/* Páginas: si el contenido no cabe en el alto de la ventana, se desplaza dentro de su marco (no se sale) */
.page > * { min-width: 0; }
@media (min-width: 901px) and (min-height: 560px) {
    .page > .bd, .page > .contact, .page > .junta, .page > .wall, .page > .vp, .page > .home, .page > .story { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(128, 128, 128, .5) transparent; }
}
.bd-scroll { min-height: 150px; }
.next-bd::before { right: -30px; top: -40px; width: 140px; height: 140px; }
.next-bd-main, .next-bd h2, .bd-info strong { overflow-wrap: anywhere; }
.next-bd { max-width: 100%; }


/* ---------- Aviso emergente ---------- */
.b4av { position: fixed; inset: 0; z-index: 650; display: grid; place-items: center; padding: 20px; background: rgba(4, 8, 22, .72); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.b4av[hidden] { display: none; }
.b4av.is-open { opacity: 1; }
.b4av-box { position: relative; width: min(480px, 100%); margin-top: 40px; text-align: center; padding: 34px 30px 26px; border-radius: 22px;
    background: linear-gradient(160deg, #1a2b63, var(--navy-900) 65%); color: #fff; border: 1px solid rgba(252, 196, 31, .6); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 6px rgba(252, 196, 31, .12);
    transform: translateY(14px) scale(.97); transition: transform .35s var(--ease); }
.b4av.is-open .b4av-box { transform: none; }
.b4av-ico { display: grid; place-items: center; width: 68px; height: 68px; margin: -64px auto 14px; border-radius: 50%; background: var(--gold); font-size: 2rem; box-shadow: 0 10px 24px rgba(0, 0, 0, .4); }
.b4av-box h2 { font-size: 1.6rem; margin-bottom: 10px; }
.b4av-text { color: #cdd5ee; line-height: 1.6; overflow-wrap: anywhere; max-height: 42vh; overflow: auto; }
.b4av-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.b4av-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.4rem; line-height: 1; }
.b4av-x:hover { background: var(--red); }

/* Inicio: accesos (tarjetas en columna para que nada se salga) */
.home-tiles { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.tile { flex-direction: column; text-align: center; justify-content: center; gap: 4px; padding: 10px 6px; }
.tile-txt { align-items: center; max-width: 100%; }
.tile-txt strong { font-size: .86rem; max-width: 100%; overflow-wrap: anywhere; }
.tile-txt small { max-width: 100%; }
@media (max-width: 1100px) { .home-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .home-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* Pizarrón: imágenes en las notas */
.wall-photo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wall-photo-btn { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1.5px dashed rgba(16, 30, 71, .4); background: var(--paper); font-weight: 600; font-size: .84rem; cursor: pointer; transition: background .2s, border-color .2s; }
.wall-photo-btn:hover { background: #fff7d6; border-color: var(--navy-800); }
.wall-photo-name { font-size: .78rem; color: var(--ink-soft); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wall-photo-x { border: 0; background: rgba(0, 0, 0, .1); border-radius: 50%; width: 24px; height: 24px; line-height: 1; font-size: 1rem; }
.wall-photo-x[hidden] { display: none; }
.note-img { display: block; width: 100%; height: auto; max-height: 230px; object-fit: contain; border-radius: 4px; margin: 6px 0 4px; background: rgba(0, 0, 0, .08); cursor: zoom-in; border: 4px solid rgba(255, 255, 255, .85); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); box-sizing: border-box; }


/* Reproductor más compacto (barra baja) */
.mp { height: 48px; gap: 10px; padding-right: var(--gutter); }
.mp-slot { width: 86px; }
.mp-info strong { font-size: .8rem; line-height: 1.2; }
.mp-info small { font-size: .66rem; line-height: 1.2; }
.mp-ctrl { gap: 4px; }
.mp-ctrl button, .mp-ctrl a { width: 30px; height: 30px; font-size: .8rem; }
.mp-ctrl .mp-main { width: 34px; height: 34px; font-size: .9rem; }
.mp-ctrl input[type=range] { width: 72px; }
@media (max-width: 640px) {
    .mp { height: 44px; gap: 8px; }
    .mp-slot { width: 78px; }
}
