/* Fuentes alojadas en la propia web (sin Google Fonts). */
@font-face { font-family: "Chakra Petch"; font-weight: 500; font-display: swap; src: url("/fonts/chakra-petch-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("/fonts/chakra-petch-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url("/fonts/chakra-petch-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("/fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("/fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("/fonts/figtree-latin-700-normal.woff2") format("woff2"); }
/* Layout: plataforma tipo canal. Menú lateral plegable, barra superior con buscador, destacado + próximo evento, filas deslizables; panel de Zaber con pestañas. */
:root {
  color-scheme: dark;
  --bg: #0e0813;
  --side: #130b19;
  --card: #1a1022;
  --card-hi: #23152e;
  --line: rgba(238, 227, 236, .08);
  --line-hi: rgba(238, 227, 236, .16);
  --violet: #a42fcb;
  --violet-hi: #c45dea;
  --violet-deep: #5b0f78;
  --hair: #eee3ec;
  --muted: #9d8aa6;
  --eye: #ffd10b;
  --on-eye: #1c1206;
  --ok: #5fd39a;
  --bad: #ff6b8b;
  --display: "Chakra Petch", "Arial Narrow", sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --r-s: 4px;
  --r-m: 6px;
  --r-l: 10px;
  --side-w: 236px;
  --on-violet: #fff;
  /* Capas: borde de luz arriba + sombra suave debajo, como hojas apiladas. */
  --lift: inset 0 1px 0 rgba(255, 255, 255, .045), 0 1px 2px rgba(0, 0, 0, .35), 0 16px 32px -22px rgba(0, 0, 0, .9);
  --lift-hi: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 4px rgba(0, 0, 0, .35), 0 26px 50px -24px rgba(0, 0, 0, .95);
  --surface: linear-gradient(180deg, color-mix(in srgb, var(--card-hi) 70%, var(--card)) 0, var(--card) 140px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; -webkit-tap-highlight-color: transparent; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); color: var(--hair); font: 400 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, label, [role=button] { touch-action: manipulation; }
button { cursor: pointer; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 25; background: var(--bg); }
:focus-visible { outline: 2px solid var(--eye); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.muted { color: var(--muted); }
svg.i { width: 20px; height: 20px; flex: none; }

/* ---------- botones ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .5em; white-space: nowrap;
  border: 1px solid var(--line-hi); background: var(--card); border-radius: var(--r-m); padding: .62em 1.15em; font-weight: 600;
  transition: border-color .2s, background .2s, transform .15s; }
.btn:hover { border-color: var(--muted); background: var(--card-hi); }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--eye); color: var(--on-eye); border-color: transparent; }
.btn.primary:hover { background: color-mix(in srgb, var(--eye) 86%, white); border-color: transparent; }
.btn.violet { background: var(--violet); border-color: transparent; color: var(--on-violet); }
.btn.violet:hover { background: var(--violet-hi); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: rgba(255,107,139,.35); background: transparent; }
.btn.danger:hover { background: rgba(255,107,139,.08); border-color: var(--bad); }
.btn.sm { padding: .42em .9em; font-size: .88rem; }
.btn svg.i { width: 16px; height: 16px; }
.round { width: 40px; height: 40px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--line-hi); background: var(--card); position: relative; transition: background .2s, border-color .2s, transform .15s; flex: none; }
.round:hover { background: var(--card-hi); border-color: var(--muted); }
.round:active { transform: scale(.92); }
.round.sm { width: 32px; height: 32px; }
.round.sm svg.i { width: 16px; height: 16px; }
.round.go { background: var(--eye); color: var(--on-eye); border: 0; }
.act { display: inline-flex; align-items: center; gap: .45em; background: none; border: 0; padding: .45em .6em; border-radius: var(--r-m); color: var(--hair); font-weight: 600; font-variant-numeric: tabular-nums; transition: background .2s; }
.act:hover { background: var(--card-hi); }
.act[aria-pressed="true"] { color: var(--eye); }
.act[aria-pressed="true"] svg { fill: currentColor; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 600; font-size: .82rem; }
.link-btn:hover { color: var(--hair); }
.link-btn[aria-pressed="true"] { color: var(--eye); }
.link-btn.del:hover { color: var(--bad); }

/* ---------- estructura ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .35s cubic-bezier(.3,.8,.3,1); }
.app.collapsed { --side-w: 76px; }
aside.side { position: sticky; top: 0; height: 100vh; height: 100dvh; padding-left: max(14px, env(safe-area-inset-left, 0px)) !important; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; gap: 18px; overflow-y: auto; overflow-x: hidden; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 6px; min-width: 0; }
.logo img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.logo b { font-family: var(--display); font-size: 1.45rem; letter-spacing: .02em; }
nav.menu { display: grid; gap: 2px; position: relative; }
nav.menu .ind { position: absolute; left: 0; right: 0; height: 42px; border-radius: var(--r-m); background: var(--card-hi); box-shadow: inset 2px 0 0 var(--eye); transition: transform .35s cubic-bezier(.3,.8,.3,1), opacity .2s; z-index: 0; }
nav.menu a { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: var(--r-m); color: var(--muted); font-weight: 500; transition: color .2s; white-space: nowrap; }
nav.menu a:hover { color: var(--hair); }
nav.menu a[aria-current="page"] { color: var(--hair); }
.count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--eye); color: var(--on-eye); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.side h4 { margin: 0; padding: 0 12px; font-size: .78rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.socials { display: grid; gap: 2px; }
.socials a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: .92rem; white-space: nowrap; }
.socials a:hover { color: var(--hair); background: var(--card); }
.who-card { margin-top: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; display: grid; gap: 12px; }
.who-card .row { display: flex; align-items: center; gap: 10px; }
.who-card img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; }
.who-card small { color: var(--muted); display: block; font-variant-numeric: tabular-nums; }
.app.collapsed .lbl, .app.collapsed .logo b, .app.collapsed .logo svg, .app.collapsed .side h4, .app.collapsed .who-card .txt, .app.collapsed .who-card .btn, .app.collapsed nav.menu .count { display: none; }
.app.collapsed .side-top { flex-direction: column; }
.app.collapsed .who-card { display: none; }
.app.collapsed nav.menu a, .app.collapsed .socials a { justify-content: center; padding: 0; }
.app.collapsed .socials a { height: 38px; }

main.main { min-width: 0; }
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 14px; height: 68px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .logo { display: none; padding: 0; }
.search { position: relative; flex: 1; max-width: 520px; }
#q::-webkit-search-cancel-button, #q::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
#q { width: 100%; height: 42px; border-radius: var(--r-m); border: 1px solid var(--line-hi); background: var(--card); padding: 0 16px 0 42px; transition: border-color .2s, background .2s; }
#q:focus { outline: none; border-color: var(--violet); background: var(--card-hi); }
.search > svg { position: absolute; left: 14px; top: 11px; color: var(--muted); }
#searchClose, #searchBtn { display: none; }
.suggest, .mpop { position: absolute; z-index: 30; background: var(--card); border: 1px solid var(--line-hi); border-radius: var(--r-m); padding: 6px; box-shadow: 0 20px 50px -20px #000; }
.suggest { top: 48px; left: 0; right: 0; }
.suggest button, .mpop button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px; border: 0; background: none; border-radius: 10px; text-align: left; }
.suggest button:hover, .suggest button:focus-visible, .mpop button:hover, .mpop button:focus-visible, .mpop button.on { background: var(--card-hi); }
.suggest .th { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; flex: none; }
.suggest small, .mpop small { display: block; color: var(--muted); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: flex; padding: 3px; border: 1px solid var(--line-hi); border-radius: var(--r-m); position: relative; }
.lang button { position: relative; z-index: 1; border: 0; background: none; padding: .3em .75em; border-radius: var(--r-s); font-size: .8rem; font-weight: 700; color: var(--muted); transition: color .25s; }
.lang button[aria-pressed="true"] { color: var(--bg); }
.lang .pill-bg { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: var(--r-s); background: var(--hair); transition: transform .3s cubic-bezier(.3,.8,.3,1); }
.lang[data-on="en"] .pill-bg { transform: translateX(100%); }
.dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--eye); box-shadow: 0 0 0 2px var(--card); }
.mebtn { border: 0; padding: 0; background: none; border-radius: 50%; }
.av-img { border-radius: 50%; object-fit: cover; display: block; flex: none; }
.me { width: 40px; height: 40px; border: 1px solid var(--line-hi); }
.pop { position: absolute; top: 60px; right: 28px; width: min(360px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line-hi); border-radius: var(--r-m); padding: 8px; box-shadow: 0 30px 60px -20px #000; }
.pop h3 { font-size: 1.05rem; padding: 8px 10px 10px; }
.pop.menu-pop { width: 240px; }
.menu-pop .head { display: flex; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-pop .head small { color: var(--muted); display: block; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; border: 0; background: none; text-align: left; color: var(--hair); }
.menu-pop a:hover, .menu-pop button:hover { background: var(--card-hi); }
.note { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 10px; border-radius: 10px; }
.note:hover { background: var(--card-hi); }
.note small { color: var(--muted); display: block; }

.page { padding-block: 26px 110px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); max-width: 1680px; margin-inline: auto; }
section.view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.back:hover { color: var(--hair); }

/* ---------- inicio ---------- */
.lead { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 18px; }
.lead.solo { grid-template-columns: minmax(0, 1fr); }
.feature { position: relative; overflow: hidden; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--card); display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px; padding: 26px; align-items: center; isolation: isolate; }
.feature .art { aspect-ratio: 1; border-radius: var(--r-m); overflow: hidden; box-shadow: 0 0 0 1px var(--line-hi); cursor: pointer; position: relative; }
.feature .art > * { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.feature .art.blur > * { filter: blur(22px); }
.feature .txt { display: grid; gap: 14px; justify-items: start; min-width: 0; }
.tag { display: inline-flex; align-items: center; gap: 6px; color: var(--eye); font-size: .88rem; font-weight: 600; }
.feature h1 { font-size: clamp(2.2rem, 4.2vw, 3.8rem); letter-spacing: -.01em; }
.feature .meta { color: var(--muted); font-size: .92rem; }
.feature .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.premiere { position: relative; overflow: hidden; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--card); display: grid; align-content: end; min-height: 300px; isolation: isolate; }
.premiere .teaser { position: absolute; inset: 0; z-index: -2; transform: scale(1.2); }
.premiere .teaser > * { width: 100%; height: 100%; object-fit: cover; filter: blur(18px) saturate(1.3); }
.premiere::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14,8,19,.2), rgba(14,8,19,.92) 70%); }
.premiere .in { padding: 22px; display: grid; gap: 12px; }
.premiere h3 { font-size: 1.5rem; }
.clock { display: flex; gap: 8px; }
.clock div { flex: 1; background: rgba(14,8,19,.6); border: 1px solid var(--line-hi); border-radius: var(--r-m); padding: 8px 4px; text-align: center; backdrop-filter: blur(6px); }
.clock b { display: block; font-family: var(--display); font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; }
.clock small { color: var(--muted); font-size: .72rem; }
.row-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.row-head .more { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.row-head a.link { color: var(--muted); font-weight: 600; font-size: .92rem; margin-right: 6px; }
.row-head a.link:hover { color: var(--hair); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, calc((100% - 4 * 16px) / 5)); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.card { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 10px; border: 0; background: none; padding: 0; text-align: left; min-width: 0; }
.card > * { min-width: 0; }
.thumb { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-m); overflow: hidden; background: var(--card); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s; }
.thumb > .pic { position: absolute; inset: 0; transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .3s; }
.pic > *, .media > *:not(.x), .mini > * { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (hover: hover) { .card:hover .thumb { box-shadow: 0 0 0 2px var(--hair); } }
.thumb .b18 { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 2px 7px; border-radius: var(--r-s); background: rgba(14,8,19,.8); font-size: .72rem; font-weight: 700; backdrop-filter: blur(4px); }
.thumb .lk { position: absolute; right: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--r-s); background: rgba(14,8,19,.75); font-size: .78rem; font-weight: 600; backdrop-filter: blur(4px); font-variant-numeric: tabular-nums; }
.thumb .lk svg { width: 13px; height: 13px; }
.thumb .ex { position: absolute; left: 10px; bottom: 12px; z-index: 2; font-size: .68rem; color: rgba(238,227,236,.7); }
.blur > .pic { filter: blur(22px) saturate(.8); transform: scale(1.15); }
.veil { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; text-align: center; }
.veil span { background: rgba(14,8,19,.7); border: 1px solid var(--line-hi); padding: 10px 16px; border-radius: var(--r-m); font-size: .82rem; backdrop-filter: blur(4px); }
.veil b { display: block; font-family: var(--display); font-size: 1.4rem; line-height: 1.1; }
.card .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .s { color: var(--muted); font-size: .84rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.col { position: relative; overflow: hidden; border-radius: var(--r-m); aspect-ratio: 16 / 10; border: 1px solid var(--line); display: flex; align-items: flex-end; padding: 16px; isolation: isolate; text-align: left; background: var(--card); }
.col .pic { position: absolute; inset: 0; z-index: -2; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.col::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(14,8,19,.82) 68%, rgba(14,8,19,.96)); }
@media (hover: hover) { .col:hover { border-color: var(--hair); } }
.col b { font-family: var(--display); font-size: 1.25rem; display: block; }
.col small { color: #cbb9d3; }
.band { position: relative; overflow: hidden; border-radius: var(--r-l); padding: 34px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; background: var(--violet-deep); border: 0; isolation: isolate; }
.band h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); max-width: 22ch; }
.band p { color: #d8c8de; max-width: 52ch; margin-top: 8px; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--eye); margin-bottom: 10px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--eye); }
.live.off { color: var(--muted); }
.live.off i { background: var(--muted); animation: none; }
.about { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; padding: 30px; border-radius: var(--r-l); background: var(--card); border: 1px solid var(--line); }
.about p { color: #d4c6da; max-width: 56ch; margin-top: 10px; white-space: pre-line; }
.nums { display: flex; flex-wrap: wrap; gap: 14px 28px; align-content: center; }
.nums div { display: grid; gap: 2px; }
.nums b { font-family: var(--display); font-size: 1.6rem; display: block; line-height: 1; font-variant-numeric: tabular-nums; }
.nums small { color: var(--muted); }

/* galería */
.gal-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.gal-head h2 { font-size: 2rem; margin-right: auto; }
.seg { display: flex; padding: 3px; gap: 2px; border-radius: var(--r-m); background: var(--card); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg button { border: 0; background: none; padding: .38em .95em; border-radius: var(--r-s); color: var(--muted); font-weight: 600; font-size: .88rem; transition: background .2s, color .2s; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--hair); color: var(--bg); }
select.sort { height: 38px; border-radius: var(--r-m); border: 1px solid var(--line-hi); background: var(--card); padding: 0 14px; width: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px 16px; }
.empty { padding: 50px 24px; text-align: center; border: 1px dashed var(--line-hi); border-radius: var(--r-l); display: grid; gap: 12px; justify-items: center; color: var(--muted); }
.empty svg { width: 30px; height: 30px; color: var(--violet-hi); }
.chipset { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: var(--r-s); border: 1px solid var(--line-hi); background: none; font-size: .82rem; color: var(--muted); }
button.chip:hover { color: var(--hair); }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--violet-hi) 16%, transparent); border-color: var(--violet); color: var(--hair); }
.chip .x { border: 0; background: none; padding: 0; color: inherit; display: grid; }
.chip .x svg { width: 12px; height: 12px; }

/* diálogos */
dialog { border: 1px solid var(--line-hi); background: var(--bg); color: var(--hair); border-radius: var(--r-l); padding: 0; width: 100%; max-width: min(1120px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: hidden; }
dialog::backdrop { background: rgba(8, 4, 11, .78); backdrop-filter: blur(6px); }
dialog.small { max-width: 440px; overflow: visible; }
dialog.mid { max-width: 680px; overflow-y: auto; }
.close { position: absolute; top: 12px; right: 12px; z-index: 3; }
.detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); max-height: calc(100dvh - 34px); }
.detail .stage { position: relative; background: #08040b; display: grid; place-items: center; overflow: hidden; min-height: 340px; }
.detail .stage .back { position: absolute; inset: -10%; filter: blur(40px) saturate(1.3); opacity: .45; }
.detail .stage .front { position: relative; width: min(100%, 640px); aspect-ratio: var(--ar, 1); max-height: calc(100dvh - 34px); }
.detail .stage .front > * { width: 100%; height: 100%; object-fit: contain; display: block; }
.detail .stage { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.navb { position: absolute; top: 50%; margin-top: -20px; z-index: 2; background: rgba(14,8,19,.6); backdrop-filter: blur(6px); }
.navb.prev { left: 14px; }
.navb.next { right: 14px; }
.bigheart { position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; margin: -55px 0 0 -55px; color: var(--eye); filter: drop-shadow(0 8px 30px rgba(0,0,0,.5)); opacity: 0; pointer-events: none; z-index: 3; }
.swipe-hint { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: .75rem; color: rgba(238,227,236,.75); background: rgba(14,8,19,.6); padding: 3px 10px; border-radius: 999px; display: none; white-space: nowrap; }
.detail .side { padding: 28px 26px 0; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; min-width: 0; }
.detail h2 { font-size: 2rem; padding-right: 40px; }
.author { display: flex; align-items: center; gap: 10px; }
.author small { display: block; color: var(--muted); }
.bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-m); background: var(--card); border: 1px solid var(--line); align-self: flex-start; }
.owner-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border-radius: var(--r-m); border: 1px dashed var(--violet); background: color-mix(in srgb, var(--violet) 6%, transparent); align-items: center; margin-right: 44px; }
.owner-bar small { color: var(--violet-hi); font-weight: 700; margin-right: auto; }
.sharebox { display: flex; flex-wrap: wrap; gap: 8px; }
.comments { display: grid; gap: 18px; }
.cm { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
.cm .n { font-size: .85rem; color: var(--muted); }
.cm .n b { color: var(--hair); }
.cm p { overflow-wrap: anywhere; }
.cm .tools { display: flex; gap: 14px; margin-top: 4px; align-items: center; }
.cm .tools .link-btn { display: inline-flex; align-items: center; gap: 4px; }
.cm .tools svg { width: 14px; height: 14px; }
.cm .tools [aria-pressed="true"] svg { fill: currentColor; }
.replies { display: grid; gap: 14px; margin: 12px 0 0 44px; padding-left: 14px; border-left: 2px solid var(--line-hi); }
.replies .cm { grid-template-columns: 28px minmax(0, 1fr); }
.mention { color: var(--violet-hi); font-weight: 600; }
.badge { font-size: .7rem; padding: 1px 6px; border-radius: var(--r-s); background: var(--violet); color: var(--on-violet); margin-left: 6px; font-weight: 600; }
.cbox { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 18px; display: grid; gap: 8px; margin-top: auto; }
.replying { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); }
.cform { display: flex; gap: 8px; align-items: flex-end; position: relative; }
.cform textarea { flex: 1; min-height: 44px; height: 44px; resize: none; border-radius: var(--r-m); padding: .6em 1em; }
.mpop { bottom: calc(100% + 6px); left: 0; width: 240px; }
.mpop .av-img { width: 28px; height: 28px; }
.dlg-pad { padding: 30px; display: grid; gap: 16px; position: relative; }
.dlg-pad h2 { font-size: 2rem; padding-right: 40px; }

/* formularios */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .field > .lab { font-weight: 600; font-size: .92rem; }
.field small { color: var(--muted); font-size: .84rem; }
.field .err { color: var(--bad); font-size: .84rem; }
.field .err:empty { display: none; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=datetime-local], textarea, select { width: 100%; background: var(--card); border: 1px solid var(--line-hi); border-radius: var(--r-m); padding: .7em .9em; transition: border-color .2s; min-width: 0; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--violet); }
input[aria-invalid="true"] { border-color: var(--bad); }
textarea { min-height: 110px; resize: vertical; }
.drop { border: 1.5px dashed var(--line-hi); border-radius: var(--r-m); padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s; display: grid; gap: 6px; justify-items: center; }
.drop:hover { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 6%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: .3em; accent-color: var(--eye); width: 16px; height: 16px; flex: none; }
.switch { position: relative; display: inline-flex; flex: none; width: 42px; height: 24px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--card-hi); border: 1px solid var(--line-hi); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .25s cubic-bezier(.3,.8,.3,1), background .2s; }
.switch input:checked + span { background: var(--violet); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--eye); outline-offset: 2px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px; display: grid; gap: 18px; align-content: start; min-width: 0; }
.panel input[type=text], .panel input[type=email], .panel input[type=password], .panel input[type=url], .panel input[type=datetime-local], .panel textarea, .panel select { background: var(--bg); }
.panel h3 { font-size: 1.3rem; }
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 80; transform: translateX(-50%); background: var(--hair); color: var(--bg); padding: .65em 1.1em; border-radius: var(--r-m); font-weight: 700; display: flex; align-items: center; gap: 8px; box-shadow: 0 20px 40px -12px #000; max-width: calc(100vw - 32px); }
.toast svg { width: 16px; height: 16px; color: var(--violet); flex: none; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs:empty { display: none; }
.media { width: 92px; height: 92px; border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line-hi); position: relative; flex: none; background: var(--card-hi); }
.media.lg { width: 160px; height: 200px; }
.media .x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(14,8,19,.8); display: grid; place-items: center; }
.media .x svg { width: 12px; height: 12px; }

/* pestañas */
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabbar button { border: 0; background: none; padding: 10px 14px; color: var(--muted); font-weight: 600; white-space: nowrap; position: relative; display: inline-flex; align-items: center; gap: 6px; }
.tabbar button[aria-selected="true"] { color: var(--hair); }
.tabbar button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--eye); }
.tabbar .count { margin: 0; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: start; }
.two.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.two.wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; }
.lrows { display: grid; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lrow:last-child { border-bottom: 0; }
.lrow .grow { flex: 1; min-width: 160px; }
.lrow .mini { width: 48px; height: 60px; border-radius: 8px; overflow: hidden; flex: none; }
.lrow .tools { display: flex; gap: 6px; }

/* comisiones */
.steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r-m); background: var(--card); border: 1px solid var(--line); }
.steps li::before { content: counter(s); width: 44px; height: 44px; border-radius: var(--r-m); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1.3rem; background: var(--card-hi); color: var(--violet-hi); }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: .9rem; }
.gate { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 30px; display: grid; gap: 14px; justify-items: start; }
.gate svg { width: 28px; height: 28px; color: var(--eye); }
.ccard { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r-m); background: var(--card); border: 1px solid var(--line); text-align: left; width: 100%; transition: border-color .2s, transform .2s; }
.panel .ccard { background: var(--bg); }
@media (hover: hover) { .ccard:hover { border-color: var(--violet); } }
.ccard .mini { width: 56px; height: 56px; border-radius: var(--r-s); overflow: hidden; }
.ccard small { color: var(--muted); display: block; }
.ccard .bar-p { height: 4px; border-radius: 4px; background: var(--card-hi); margin-top: 8px; overflow: hidden; }
.ccard .bar-p i { display: block; height: 100%; background: var(--violet-hi); border-radius: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--r-s); font-size: .78rem; font-weight: 700; border: 1px solid var(--line-hi); white-space: nowrap; }
.pill.requested { background: var(--eye); color: var(--on-eye); border-color: transparent; }
.pill.quoted { color: var(--violet-hi); border-color: var(--violet); }
.pill.accepted, .pill.sketch, .pill.color { background: var(--violet); color: var(--on-violet); border-color: transparent; }
.pill.done { color: var(--ok); border-color: rgba(95,211,154,.4); }
.pill.rejected, .pill.cancelled { color: var(--bad); border-color: rgba(255,107,139,.4); }
.pill.wait { color: var(--eye); border-color: color-mix(in srgb, var(--eye) 40%, transparent); }
.pill.ok { color: var(--ok); border-color: rgba(95,211,154,.4); }
.stepper { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.stepper div { display: grid; gap: 6px; font-size: .78rem; color: var(--muted); }
.stepper i { height: 6px; border-radius: 6px; background: var(--card-hi); display: block; }
.stepper .done i { background: var(--violet); }
.stepper .now i { background: var(--eye); }
.stepper .now { color: var(--hair); font-weight: 700; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; }
.tl li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 22px; }
.tl li::before { content: ""; position: absolute; left: 17px; top: 42px; bottom: 4px; width: 2px; background: var(--line-hi); }
.tl li:last-child { padding-bottom: 0; }
.tl li:last-child::before { display: none; }
.tl .who { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .88rem; color: var(--muted); }
.tl .who b { color: var(--hair); }
.tl .body { background: var(--bg); border: 1px solid var(--line); border-radius: 4px var(--r-m) var(--r-m) var(--r-m); padding: 12px 14px; margin-top: 6px; display: grid; gap: 10px; }
.tl .body:empty { display: none; }
.tl .body p { overflow-wrap: anywhere; }
.tl li.mine .body { background: color-mix(in srgb, var(--violet) 12%, transparent); border-color: color-mix(in srgb, var(--violet) 30%, transparent); }
.approve { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px dashed var(--line-hi); }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.summary dt { color: var(--muted); font-size: .88rem; }
.summary dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* mensajes */
.inbox { display: grid; grid-template-columns: 290px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; min-height: 520px; background: var(--card); }
.threads { border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 8px; gap: 2px; }
.threads button { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; text-align: left; padding: 10px; border: 0; background: none; border-radius: var(--r-m); transition: background .2s; }
.threads button:hover, .threads button[aria-current="true"] { background: var(--card-hi); }
.threads small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.thread .th-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.msgs { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 72%; padding: .6em .95em; border-radius: 12px 12px 12px 3px; background: var(--card-hi); overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--violet); color: var(--on-violet); border-radius: 12px 12px 3px 12px; }
.msg.mine .mention { color: var(--on-violet); text-decoration: underline; }
.msg time { display: block; font-size: .72rem; opacity: .65; margin-top: 2px; }
.compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.compose input { flex: 1; min-width: 0; }

/* panel */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpis div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; }
.kpis b { font-family: var(--display); font-size: 2rem; display: block; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpis small { color: var(--muted); }
.ptitle { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.ptitle h2 { font-size: 2rem; }
.panel .ptitle h3 { font-size: 1.3rem; }
.avatar-edit { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-edit .big { width: 96px; height: 96px; box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--violet); }
.setrow { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setrow:last-child { border-bottom: 0; }
.setrow .grow { flex: 1; min-width: 0; }
.setrow small { color: var(--muted); display: block; }
.social-row { display: grid; grid-template-columns: 36px 100px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.social-row:last-child { border-bottom: 0; }
.social-row .ic { width: 36px; height: 36px; border-radius: var(--r-m); background: var(--bg); display: grid; place-items: center; }
.social-row .err { grid-column: 1 / -1; margin-top: -4px; }
.social-row.off input[type=url], .social-row.off .ic, .social-row.off b { opacity: .45; }

/* aviso de edad */
.age { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: var(--bg); isolation: isolate; overflow: hidden; }
.age .box { max-width: 440px; width: 100%; text-align: center; display: grid; gap: 18px; justify-items: center; padding: 34px 28px; border-radius: var(--r-l); background: var(--card); border: 1px solid var(--line-hi); }
.age img { width: 96px; height: 96px; border-radius: 50%; }
.age h2 { font-size: 2rem; }
.age .acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

nav.tabs { display: none; }
footer.foot { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .88rem; }
footer.foot span:first-child { margin-right: auto; }

@media (max-width: 1180px) {
  .rail { grid-auto-columns: minmax(190px, calc((100% - 3 * 16px) / 4)); }
  .lead { grid-template-columns: 1fr; }
  .premiere { min-height: 220px; }
  .two.wide, .two.even { grid-template-columns: 1fr; }
  .two.wide > .summary { order: -1; }
}
@media (max-width: 980px) {
  .app, .app.collapsed { grid-template-columns: 1fr; }
  aside.side { display: none; }
  .top .logo { display: flex; }
  .top .logo b, .top .logo svg { display: none; }
  header.top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); gap: 10px; }
  .page { padding-block: 20px calc(110px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .pop { right: 16px; }
  nav.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--side) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  nav.tabs a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; min-height: 52px; align-content: center; font-size: .7rem; color: var(--muted); position: relative; }
  nav.tabs a svg { transition: transform .25s cubic-bezier(.3,.8,.3,1); }
  nav.tabs a[aria-current="page"] svg { transform: translateY(-2px) scale(1.12); }
  nav.tabs a:active svg { transform: scale(.85); }
  nav.tabs a[aria-current="page"] { color: var(--eye); }
  nav.tabs .count { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .two, .about { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: 1fr; overflow-y: auto; }
  .detail .side { overflow: visible; }
  .detail .stage .front { max-height: 62dvh; }
  .inbox { grid-template-columns: 1fr; }
  .threads { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .threads button { min-width: 180px; }
}
@media (max-width: 640px) {
  .feature { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
  .rail { grid-auto-columns: 46%; gap: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band { grid-template-columns: 1fr; padding: 24px; }
  .row2 { grid-template-columns: 1fr; }
  .nums b { font-size: 1.4rem; }
  .lang button { padding: .3em .55em; }

  .about, .panel { padding: 20px; }
  .stepper span { display: none; }
  .social-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .social-row input[type=url] { grid-column: 1 / -1; grid-row: 2; }
  .ccard { grid-template-columns: 48px minmax(0, 1fr); }
  .ccard .pill { grid-column: 2; justify-self: start; }
  .ccard .mini { width: 48px; height: 48px; }
  .media.lg { width: 120px; height: 150px; }
  .replies { margin-left: 16px; }
}
/* ---------- táctil ---------- */
@media (pointer: coarse) {
  input, textarea, select { font-size: 16px; }
  .round.sm { width: 40px; height: 40px; }
  .link-btn { padding: 8px 6px; margin: -8px -6px; font-size: .88rem; }
  .cm .tools { gap: 18px; }
  .chip { padding: 7px 13px; font-size: .88rem; }
  .act { padding: .65em .85em; }
  .seg button { padding: .6em 1.05em; }
  .tabbar button { padding: 13px 14px; }
  .switch { width: 50px; height: 30px; }
  .switch span::after { width: 22px; height: 22px; }
  .switch input:checked + span::after { transform: translateX(20px); }
  .row-head .more .round { display: none; }
  .navb { display: none; }
  .swipe-hint { display: block; }
  .btn:active, .ccard:active, .card:active .thumb { transform: scale(.97); }
  .rail { scroll-padding-inline: 0; }
}

/* ---------- móvil vertical ---------- */
@media (max-width: 640px) {
  #searchBtn { display: inline-grid !important; }
  header.top .search { display: none; }
  header.top.searching .search { display: block; position: absolute; inset: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); max-width: none; display: flex; align-items: center; gap: 12px; z-index: 2; background: var(--bg); }
  header.top.searching .search > svg { top: 50%; margin-top: -10px; }
  header.top.searching .search input { flex: 1; }
  header.top.searching .suggest { top: 60px; }
  header.top.searching #searchClose { display: block; }
  .top .right { margin-left: auto; }
  .ptitle h2, .gal-head h2 { font-size: 1.7rem; }
  .feature h1 { font-size: 1.9rem; }
  /* diálogos a pantalla completa y hojas inferiores */
  dialog, dialog.mid { max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  dialog.mid { padding-bottom: env(safe-area-inset-bottom, 0px); }
  dialog.small { max-width: 100vw; width: 100vw; height: auto; max-height: 92dvh; overflow-y: auto; inset: auto 0 0 0; margin: 0; border-radius: var(--r-l) var(--r-l) 0 0; border: 1px solid var(--line-hi); border-bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  dialog.small .dlg-pad::before { content: ""; justify-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line-hi); margin: -14px 0 4px; }
  .detail { max-height: 100dvh; height: 100dvh; grid-auto-rows: max-content; }
  .detail .stage { min-height: 0; }
  .detail .stage .front { max-height: 58dvh; }
  .detail .side { padding: 20px 16px 0; }
  .detail h2 { font-size: 1.7rem; padding-right: 0; }
  .owner-bar { margin-right: 0; }
  #detail .close, dialog.mid .close { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); background: rgba(14,8,19,.7); backdrop-filter: blur(6px); }
  .cbox { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .dlg-pad { padding: 24px 18px; }
  .inbox { min-height: calc(100dvh - 260px); }
  .msg { max-width: 85%; }
}

/* ---------- móvil horizontal: menú lateral de iconos en vez de barra inferior ---------- */
@media (orientation: landscape) and (max-height: 560px) {
  .app, .app.collapsed { grid-template-columns: calc(72px + env(safe-area-inset-left, 0px)) minmax(0, 1fr); --side-w: 72px; }
  aside.side { display: flex; padding: 10px 8px; gap: 8px; }
  aside.side .lbl, aside.side .logo b, aside.side .logo svg, aside.side h4, aside.side .who-card, aside.side nav.menu .count, #collapse { display: none; }
  aside.side .logo { justify-content: center; padding: 0; }
  aside.side .logo img { width: 34px; height: 34px; }
  nav.menu a, .socials a { justify-content: center; padding: 0; height: 44px; }
  nav.menu .ind { height: 44px; }
  nav.tabs { display: none !important; }
  .top .logo { display: none !important; }
  header.top { height: 56px; }
  .page { padding-block: 16px 40px; padding-left: 20px; padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .toast { bottom: 20px; }
  .feature { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); padding: 18px; }
  .lead { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .premiere { min-height: 0; }
  .rail { grid-auto-columns: minmax(160px, calc((100% - 3 * 14px) / 4)); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .two, .two.even, .two.wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* ficha: imagen a la izquierda, texto a la derecha, todo a pantalla completa */
  dialog#detail { max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .detail { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); height: 100dvh; max-height: 100dvh; overflow: hidden; }
  .detail .stage { min-height: 0; padding-left: env(safe-area-inset-left, 0px); }
  .detail .stage .front { max-height: 100dvh; height: 100dvh; width: auto; }
  .detail .side { overflow-y: auto; max-height: 100dvh; padding: 18px 18px 0; padding-right: max(18px, env(safe-area-inset-right, 0px)); }
  .detail h2 { font-size: 1.6rem; }
  .close { right: max(12px, env(safe-area-inset-right, 0px)); }
  dialog.mid, dialog.small { max-height: 100dvh; }
  dialog.mid { width: min(720px, 100vw); }
  .inbox { min-height: calc(100dvh - 150px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- añadidos para la web real ---------- */
.err { color: var(--bad); font-size: .86rem; }
.err:empty { display: none; }
.form-err { background: rgba(255,107,139,.1); border: 1px solid rgba(255,107,139,.35); color: #ffc2cf; border-radius: var(--r-m); padding: .6em .9em; font-size: .9rem; }
.form-err:empty { display: none; }
.auth-switch { display: flex; gap: 6px; justify-content: center; font-size: .9rem; color: var(--muted); }
.auth-switch .link-btn { font-size: .9rem; color: var(--violet-hi); margin: 0; padding: 0; }
.btn[disabled], .round[disabled] { opacity: .55; pointer-events: none; }
.btn.busy::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--card) 25%, var(--card-hi) 50%, var(--card) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-m); }
@keyframes shimmer { to { background-position: -200% 0; } }
.feature.empty-feature { grid-template-columns: 1fr; text-align: left; }
.feature.empty-feature .txt { max-width: 52ch; }
.msg .thumbs { margin-top: 6px; }
.msg .media { width: 160px; height: 160px; }
.msg a.media, .tl a.media { display: block; }
.compose .clip { flex: none; }
.compose-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
.compose-files:empty { display: none; }
.compose-files .media { width: 56px; height: 56px; }
.note { color: var(--hair); }
.note.unread { background: color-mix(in srgb, var(--violet) 10%, transparent); }
.note p { margin: 0; }
.notes-empty { padding: 4px 10px 14px; color: var(--muted); }
.av-fallback { display: grid; place-items: center; background: var(--violet-deep); font-weight: 700; color: var(--hair); }
.lightbox { border: 0; background: rgba(8,4,11,.94); max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; border-radius: 0; }
.lightbox img { width: 100%; height: 100%; object-fit: contain; }
.lightbox .close { position: fixed; }
.inbox.solo { grid-template-columns: minmax(0, 1fr); }

/* ---------- profundidad ---------- */
.panel, .about, .gate, .steps li, .ccard, .inbox, .kpis > div, .who-card { background: var(--surface); box-shadow: var(--lift); }
.panel .ccard, .panel .panel { background: var(--bg); box-shadow: none; }
.feature, .premiere { box-shadow: var(--lift-hi); }
.feature .art { box-shadow: 0 0 0 1px var(--line-hi), 0 22px 44px -22px #000; }
/* La obra destacada tiñe su tarjeta con sus propios colores (la imagen difuminada detrás). */
.feature::before { content: ""; position: absolute; inset: -30%; z-index: -1; background: var(--feat, none) center / cover; filter: blur(60px) saturate(1.25); opacity: .32; pointer-events: none; }
.feature::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, transparent 20%, color-mix(in srgb, var(--card) 70%, transparent)); pointer-events: none; }
.thumb { box-shadow: 0 0 0 1px var(--line), 0 14px 28px -20px #000; transition: box-shadow .2s, transform .2s; }
@media (hover: hover) { .card:hover .thumb { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--hair), 0 20px 34px -18px #000; } }
.col { box-shadow: var(--lift); }
.band { box-shadow: var(--lift-hi); background: linear-gradient(180deg, color-mix(in srgb, var(--violet-deep) 82%, var(--violet)) 0, var(--violet-deep) 70%); }
.btn.primary { box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 2px 0 color-mix(in srgb, var(--eye) 55%, black); }
.btn.primary:active { box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset; transform: translateY(1px); }
.row-head h2 { font-size: 1.7rem; letter-spacing: -.005em; }
header.top { box-shadow: 0 1px 0 var(--line), 0 10px 24px -20px #000; border-bottom: 0; }
aside.side { box-shadow: 1px 0 0 var(--line), 12px 0 30px -28px #000; border-right: 0; }

/* ---------- subir obra (barra superior, solo la artista) ---------- */
@media (max-width: 640px) { #topUpload span { display: none; } #topUpload { padding: .5em .6em; } }

/* ---------- recorte de imágenes ---------- */
.crop-stage { --cs: min(360px, calc(100vw - 72px)); position: relative; display: block; width: var(--cs); height: var(--cs); flex: none; justify-self: center; border-radius: var(--r-m); overflow: hidden; background: #08040b; box-shadow: var(--lift); }
.crop-stage canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-zoom { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.crop-zoom input { flex: 1; accent-color: var(--eye); }

/* ---------- encargos: falta información ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-m); border: 1px solid var(--line-hi); background: var(--card); }
.notice svg { color: var(--muted); margin-top: 2px; }
.notice p { color: var(--muted); margin-top: 4px; }
.notice.act-now { border-color: color-mix(in srgb, var(--eye) 45%, transparent); background: color-mix(in srgb, var(--eye) 8%, var(--card)); }
.notice.act-now svg { color: var(--eye); }
form#updForm:not(.panel) { display: grid; gap: 16px; }
.panel > .seg { justify-self: start; }

/* ---------- panel: cifras, visitas, listas ---------- */
.kpis em { display: block; font-style: normal; font-size: .8rem; color: var(--ok); margin-top: 4px; }
.bars { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; align-items: end; height: 140px; padding-top: 6px; border-bottom: 1px solid var(--line-hi); }
.bars i { position: relative; height: max(2px, var(--h)); background: color-mix(in srgb, var(--violet) 70%, transparent); border-radius: 3px 3px 0 0; transition: background .15s; }
.bars i:last-child { background: var(--eye); }
.bars i span { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .75rem; background: var(--hair); color: var(--bg); padding: 2px 7px; border-radius: var(--r-s); opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 2; }
.bars i:hover { background: var(--violet-hi); }
.bars i:hover span { opacity: 1; }
.toplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: top; }
.toplist button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px; border: 0; background: none; border-radius: var(--r-m); text-align: left; }
.toplist button:hover { background: var(--card-hi); }
.toplist .mini { width: 44px; height: 54px; border-radius: var(--r-s); overflow: hidden; flex: none; background: var(--card-hi); }
.toplist .mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.toplist .grow { flex: 1; min-width: 0; }
.toplist b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toplist small { color: var(--muted); }
.num { font-family: var(--display); font-size: 1.25rem; font-variant-numeric: tabular-nums; }

/* ---------- identidad de la web ---------- */
.icon-edit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-icon { width: 64px; height: 64px; border-radius: var(--r-m); object-fit: cover; box-shadow: 0 0 0 1px var(--line-hi), 0 10px 20px -14px #000; }
.color-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.color-row:last-child { border-bottom: 0; }
.color-row .grow { flex: 1; min-width: 0; }
.color-row small { display: block; color: var(--muted); }
.color-row input[type=color] { width: 44px; height: 44px; padding: 3px; border-radius: var(--r-m); border: 1px solid var(--line-hi); background: var(--bg); cursor: pointer; flex: none; }
.color-row input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-row input[type=color]::-webkit-color-swatch { border: 0; border-radius: var(--r-s); }
.color-row input[type=color]::-moz-color-swatch { border: 0; border-radius: var(--r-s); }
@media (max-width: 640px) { .bars { gap: 2px; height: 110px; } }

/* ---------- entrega final, cancelar y textos legales ---------- */
.dl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px dashed var(--line-hi); }
.summary .dl-row { margin-top: 4px; }
svg.flip { transform: rotate(180deg); }
.link-btn.inline { display: inline; font-size: inherit; color: var(--violet-hi); text-decoration: underline; text-underline-offset: 3px; margin: 0; padding: 0; }
.panel.summary { align-content: start; }
footer.foot a:hover { color: var(--hair); }
footer.foot .fict { flex-basis: 100%; margin: 4px 0 0; font-size: .8rem; }
.page-doc { display: grid; gap: 18px; max-width: 72ch; }
.page-doc h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.prose { display: grid; gap: 14px; color: #d8cadf; line-height: 1.65; }
.prose h3 { font-size: 1.25rem; color: var(--hair); margin-top: 14px; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.prose li::marker { color: var(--violet-hi); }
#pageDlg .prose { max-height: 62dvh; overflow-y: auto; padding-right: 6px; }

/* ---------- tarjeta de la cuenta (menú) y avisos de obras nuevas ---------- */
.who-card a.row { border-radius: var(--r-s); margin: -4px; padding: 4px; transition: background .2s; }
.who-card a.row:hover { background: var(--card-hi); }
.who-card .txt { min-width: 0; }
.who-card .txt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-card p.txt { font-size: .86rem; line-height: 1.4; }
.who-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.who-btns .btn { padding-inline: .5em; }
.follow-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 18px; }
.follow-box small { max-width: 44ch; }
#followBtn[aria-pressed="true"] { border-color: color-mix(in srgb, var(--eye) 50%, transparent); color: var(--eye); }

/* ---------- obras con varias imágenes ---------- */
.thumb .multi { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: var(--r-s); background: rgba(14,8,19,.8); font-size: .75rem; font-weight: 700; backdrop-filter: blur(4px); }
.thumb .multi svg { width: 13px; height: 13px; }
.pages { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; gap: 6px; justify-content: center; padding: 10px; overflow-x: auto; scrollbar-width: none; background: linear-gradient(transparent, rgba(8,4,11,.85)); }
.pages::-webkit-scrollbar { display: none; }
.pages button { flex: none; width: 46px; height: 46px; padding: 0; border-radius: var(--r-s); overflow: hidden; border: 2px solid transparent; background: var(--card); opacity: .65; transition: opacity .15s, border-color .15s; }
.pages button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pages button:hover { opacity: 1; }
.pages button[aria-current="true"] { opacity: 1; border-color: var(--eye); }
.detail .stage.blur .pages img { filter: blur(6px); }
.wf-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.wf-pic { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-m); overflow: hidden; background: var(--card-hi); box-shadow: 0 0 0 1px var(--line-hi); }
.wf-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wf-pic .cov { position: absolute; top: 6px; left: 6px; z-index: 1; padding: 1px 7px; border-radius: var(--r-s); background: var(--eye); color: var(--on-eye); font-size: .72rem; font-weight: 700; }
.wf-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(8,4,11,.85)); }
.wf-tools .round.sm { width: 30px; height: 30px; background: rgba(14,8,19,.8); }
.wf-tools .round[disabled] { opacity: .3; }
@media (pointer: coarse) { .wf-tools .round.sm { width: 34px; height: 34px; } }

/* ---------- portada en ruleta ---------- */
.lead > .hero { min-width: 0; }
.hero { position: relative; border-radius: var(--r-l); overflow: hidden; border: 1px solid var(--line); background: var(--card); box-shadow: var(--lift-hi); }
.hero-track { display: grid; }
/* Todas las diapositivas en la misma celda: la zona mide lo que la más alta y pasan con un fundido. */
.hero-track > .slide { grid-area: 1 / 1; min-width: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s linear .7s; }
.hero-track > .slide.on { opacity: 1; visibility: visible; z-index: 1; transition: opacity .7s ease; }
.hero .feature { border: 0; border-radius: 0; box-shadow: none; min-height: 352px; }
.feature .ftitle { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; font-size: clamp(2.2rem, 4.2vw, 3.8rem); letter-spacing: -.01em; text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feature .fdesc { color: #d4c6da; max-width: 46ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.hero-arrow { position: absolute; top: 50%; margin-top: -20px; z-index: 3; background: rgba(14, 8, 19, .62); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; }
.hero-arrow.prev { left: 12px; }
.hero-arrow.next { right: 12px; }
.hero:hover .hero-arrow, .hero:focus-within .hero-arrow { opacity: 1; }
.hero.single .hero-arrow { display: none; }
.hero-dots { position: absolute; right: 14px; bottom: 8px; z-index: 3; display: flex; gap: 2px; }
.hero-dots button { position: relative; width: 28px; height: 22px; padding: 0; border: 0; background: none; }
.hero-dots button::before, .hero-dots button::after { content: ""; position: absolute; left: 3px; right: 3px; top: 9px; height: 4px; border-radius: 4px; }
.hero-dots button::before { background: rgba(255, 255, 255, .3); }
.hero-dots button:hover::before { background: rgba(255, 255, 255, .55); }
/* La barra de la diapositiva actual se llena mientras dura; se para con el ratón encima. */
.hero-dots button[aria-current="true"]::after { background: var(--eye); transform-origin: left; animation: heroProg var(--dur, 7s) linear forwards; }
.hero.paused .hero-dots button[aria-current="true"]::after { animation-play-state: paused; }
@keyframes heroProg { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .hero-dots button[aria-current="true"]::after { animation: none; } }
@media (pointer: coarse) { .hero-arrow { display: none; } }

/* ---------- banners ---------- */
.banner { position: relative; overflow: hidden; isolation: isolate; min-height: 352px; container-type: inline-size; background: var(--card); color: #fff; }
.bn-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.bn-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bn-bg.fx-blur img { filter: blur(14px); transform: scale(1.08); }
.bn-bg.fx-mica img { filter: blur(48px) saturate(1.7) brightness(.85); transform: scale(1.25); }
.bn-bg.fx-mica::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--card) 40%, transparent); }
.bn-bg.fx-bw img { filter: grayscale(1) contrast(1.05); }
.bn-bg.blur18 img { filter: blur(34px) saturate(.8); transform: scale(1.2); }
.bn-shade { position: absolute; inset: 0; z-index: -1; background: rgba(8, 4, 11, var(--ov, .3)); pointer-events: none; }
.bn-els { position: absolute; inset: 0; }
.bn-el { position: absolute; min-width: 0; }
.bn-el.a-center { text-align: center; }
.bn-el.a-right { text-align: right; }
.bn-el h2 { font-family: var(--display); font-weight: 700; line-height: 1.02; margin: 0; white-space: pre-line; overflow-wrap: anywhere; text-wrap: balance; }
.bn-el.t-title.s-s h2 { font-size: clamp(1.05rem, 2.6cqw, 2.6rem); }
.bn-el.t-title.s-m h2 { font-size: clamp(1.3rem, 3.6cqw, 3.6rem); }
.bn-el.t-title.s-l h2 { font-size: clamp(1.6rem, 4.8cqw, 4.8rem); }
.bn-el.t-title.s-xl h2 { font-size: clamp(1.9rem, 6.2cqw, 6.2rem); }
.bn-el p { margin: 0; white-space: pre-line; line-height: 1.5; text-wrap: pretty; overflow-wrap: anywhere; }
.bn-el.s-s { font-size: clamp(.78rem, 1.35cqw, 1.35rem); }
.bn-el.s-m { font-size: clamp(.86rem, 1.65cqw, 1.65rem); }
.bn-el.s-l { font-size: clamp(.95rem, 2.05cqw, 2.05rem); }
.bn-el.s-xl { font-size: clamp(1.05rem, 2.6cqw, 2.6rem); }
.bn-el .tag { font-size: inherit; }
.bn-el.t-button, .bn-el.t-link { display: flex; }
.bn-el.t-button.a-center, .bn-el.t-link.a-center { justify-content: center; }
.bn-el.t-button.a-right, .bn-el.t-link.a-right { justify-content: flex-end; }
.bn-el.t-button .btn { font-size: inherit; }
.bn-el .bn-link { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.bn-el .bn-img, .bn-el .bn-img img { display: block; width: 100%; }
.bn-el.t-image img { height: auto; border-radius: var(--r-m); box-shadow: 0 20px 40px -20px #000; }
.bn-el.glass { background: color-mix(in srgb, var(--bg) 42%, transparent); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r-m); padding: .7em .9em; }
.bn-el.t-image.glass { padding: .5em; }
/* En el móvil, los elementos se apilan en orden para que nada se pise. */
@media (max-width: 640px) {
  .hero .feature { min-height: 0; }
  .feature .ftitle { font-size: 1.9rem; }
  .hero-dots { left: 0; right: 0; justify-content: center; bottom: 2px; }
  .hero .banner { min-height: 0; display: flex; flex-direction: column; justify-content: center; }
  .hero .bn-els { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px 18px 40px; }
  .hero .bn-el { position: static !important; width: auto !important; max-width: 100%; }
  .hero .bn-el.t-image { width: 70% !important; }
  .hero .bn-el.t-image.a-center { margin-inline: auto; }
  .hero .bn-el.t-image.a-right { margin-left: auto; }
}

/* ---------- panel: portada ---------- */
.lrow .mini.wide { width: 120px; height: 60px; position: relative; flex: none; border-radius: var(--r-s); overflow: hidden; min-height: 0; }
.lrow .mini.banner .bn-els { display: none; }
svg.rot { transform: rotate(90deg); }
.sl-add { display: flex; gap: 8px; flex-wrap: wrap; }
.sl-add select { width: auto; max-width: 320px; }

/* ---------- pizarra de banners ---------- */
dialog.wide { max-width: min(1240px, calc(100vw - 32px)); overflow-y: auto; }
.bed { padding: 26px; display: grid; gap: 16px; position: relative; }
.bed h2 { font-size: 1.8rem; padding-right: 44px; }
.bed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.bed-main { display: grid; gap: 12px; min-width: 0; position: sticky; top: 0; }
.bed-board { width: 100%; min-height: 0 !important; border-radius: var(--r-l); border: 1px solid var(--line-hi); box-shadow: var(--lift-hi); }
.bed-board .bn-el { cursor: grab; outline: 1px dashed rgba(255, 255, 255, .35); outline-offset: 2px; touch-action: none; user-select: none; -webkit-user-select: none; }
.bed-board .bn-el:active { cursor: grabbing; }
.bed-board .bn-el.sel { outline: 2px solid var(--eye); }
.bed-board .bn-el a, .bed-board .bn-el .btn, .bed-board .bn-el img { pointer-events: none; }
.bn-resize { position: absolute; top: 50%; right: -7px; width: 12px; height: 28px; margin-top: -14px; border-radius: 4px; background: var(--eye); cursor: ew-resize; display: none; touch-action: none; }
.bed-board .bn-el.sel .bn-resize { display: block; }
.bn-noimg { display: grid; place-items: center; aspect-ratio: 4 / 3; border: 1.5px dashed rgba(255, 255, 255, .5); border-radius: var(--r-m); font-size: .85rem; }
.bed-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bed-side { display: grid; gap: 14px; }
.bed-side .panel { padding: 18px; gap: 12px; }
.bed-side .seg { flex-wrap: wrap; justify-self: start; }
@media (max-width: 980px) { .bed-grid { grid-template-columns: 1fr; } .bed-main { position: static; } }
@media (max-width: 640px) { .bed { padding: 20px 14px; } }
.sl-interval { max-width: 420px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg); }
.sl-dur { width: auto; padding: .35em .6em; font-size: .85rem; }

/* ---------- portada: misma proporción en cualquier pantalla ---------- */
/* Un "molde" invisible en la misma celda fija la altura mínima según el ancho (3,4 : 1), así los banners se ven
   igual que en la pizarra aunque la pantalla sea muy ancha. Todas las diapositivas se estiran a esa altura. */
.hero-track::before { content: ""; grid-area: 1 / 1; aspect-ratio: 3.4 / 1; pointer-events: none; }
.hero .banner { min-height: 0; }
.hero .feature { grid-template-columns: minmax(0, clamp(280px, 20vw, 420px)) minmax(0, 1fr); }
@media (max-width: 640px) { .hero-track::before { display: none; } .hero .feature { grid-template-columns: 1fr; } }

/* ---------- ficha: la imagen arriba, las miniaturas debajo (no encima) ---------- */
.detail .stage { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.detail .stage .front { flex: none; cursor: zoom-in; }
.detail .stage.has-pages .front { max-height: calc(100dvh - 34px - 70px); }
.detail .stage .pages { position: relative; inset: auto; align-self: stretch; flex: none; background: none; padding: 10px 12px; }
.detail .stage.has-pages .swipe-hint { display: none !important; }
.expand { position: absolute; top: 14px; left: 14px; z-index: 3; background: rgba(14, 8, 19, .62); backdrop-filter: blur(6px); }

/* ---------- visor a pantalla completa ---------- */
dialog.viewer { max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; overflow: hidden; }
dialog.viewer::backdrop { background: rgba(4, 2, 6, calc(.96 * var(--fade, 1))); backdrop-filter: none; }
.vw-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: zoom-in; }
.viewer.zoomed .vw-stage { cursor: grab; }
.viewer.zoomed .vw-stage:active { cursor: grabbing; }
#vwImg { max-width: 100vw; max-height: 100dvh; object-fit: contain; transform-origin: center; will-change: transform; -webkit-user-drag: none; }
.vw-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 14px; padding: calc(12px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(rgba(4, 2, 6, .7), transparent); color: var(--hair); pointer-events: none; }
.vw-top > * { pointer-events: auto; }
.vw-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.vw-hint { font-size: .82rem; color: rgba(238, 227, 236, .7); }
.viewer.zoomed .vw-hint { visibility: hidden; }
.vw-tools { margin-left: auto; display: flex; gap: 8px; }
.vw-tools .round, .vw-nav { background: rgba(14, 8, 19, .62); backdrop-filter: blur(6px); }
.vw-tools .round b { font-size: 1.3rem; line-height: 1; }
.vw-nav { position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; z-index: 2; }
.vw-nav.prev { left: max(14px, env(safe-area-inset-left, 0px)); }
.vw-nav.next { right: max(14px, env(safe-area-inset-right, 0px)); }
.viewer.single .vw-nav, .viewer.single .vw-count { display: none; }
@media (pointer: coarse) { .vw-nav, .vw-tools #vwIn, .vw-tools #vwOut { display: none; } }

/* ---------- ficha en el celular ---------- */
@media (max-width: 640px) {
  .detail .stage .front, .detail .stage.has-pages .front { max-height: 66dvh; width: 100%; }
  .expand { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: max(10px, env(safe-area-inset-left, 0px)); z-index: 4; }
  .detail .side { gap: 14px; }
  .detail h2 { font-size: 1.45rem; line-height: 1.15; }
  /* Acciones grandes, del ancho de la pantalla, fáciles de tocar. */
  .detail .bar { align-self: stretch; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail .bar .act { justify-content: center; padding: .8em .4em; }
  .detail .sharebox .btn { flex: 1; justify-content: center; }
  .vw-hint { display: none; }
}
