/* =====================================================================
   Kinora — estilos. Oscuro: negro + morados con degradado y brillo.
   ===================================================================== */
:root, [data-theme="dark"] {
  --fondo: #050408;
  --vidrio: rgba(20, 15, 34, .72);
  --vidrio-2: rgba(34, 26, 56, .8);
  --borde: rgba(167, 139, 250, .18);
  --borde-fuerte: rgba(192, 132, 252, .45);
  --texto: #f3f0ff;
  --gris: #a19bba;
  --m1: #7c3aed;  /* violeta */
  --m2: #a855f7;  /* púrpura */
  --m3: #d946ef;  /* fucsia */
  --m4: #6366f1;  /* índigo */
  --grad: linear-gradient(100deg, var(--m4), var(--m1) 35%, var(--m2) 65%, var(--m3));
  --brillo: 0 0 0 1px var(--borde-fuerte), 0 0 38px -6px rgba(168, 85, 247, .55), 0 30px 80px -30px rgba(124, 58, 237, .6);
  --glow-a: rgba(124, 58, 237, .38);
  --glow-b: rgba(217, 70, 239, .2);
  --puntos: rgba(167, 139, 250, .07);
  --error: #ff8fa3;
  --ok: #c4b5fd;
  --velo: rgba(3, 2, 8, .86);
  --barra: rgba(5, 4, 8, .72);
  color-scheme: dark;
}
[data-theme="light"] {
  --fondo: #faf8ff;
  --vidrio: rgba(255, 255, 255, .78);
  --vidrio-2: rgba(243, 238, 255, .95);
  --borde: rgba(124, 58, 237, .16);
  --borde-fuerte: rgba(124, 58, 237, .4);
  --texto: #1a1230;
  --gris: #645c80;
  --brillo: 0 0 0 1px var(--borde-fuerte), 0 0 34px -8px rgba(168, 85, 247, .4), 0 24px 60px -30px rgba(124, 58, 237, .35);
  --glow-a: rgba(168, 85, 247, .22);
  --glow-b: rgba(217, 70, 239, .12);
  --puntos: rgba(124, 58, 237, .07);
  --error: #c0264a;
  --ok: #6d28d9;
  --velo: rgba(26, 18, 48, .6);
  --barra: rgba(250, 248, 255, .78);
  color-scheme: light;
}
:root {
  --r-s: 6px; --r-m: 10px; --r-l: 14px;
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --top-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--top-h) + 16px); }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 400 16px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
.bg-glow { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 45% at 50% -5%, var(--glow-a), transparent 70%),
    radial-gradient(35% 30% at 85% 30%, var(--glow-b), transparent 70%),
    radial-gradient(30% 30% at 10% 60%, var(--glow-b), transparent 70%),
    radial-gradient(circle at 1px 1px, var(--puntos) 1px, transparent 1.5px) 0 0 / 22px 22px; }
img, svg, canvas, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; }
:focus-visible { outline: 2px solid var(--m2); outline-offset: 2px; border-radius: var(--r-s); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--m2); color: #fff; padding: 8px 12px; border-radius: var(--r-s); }
.skip:focus { left: 8px; }

.coin { width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff1c2 0 18%, #f4c04e 19% 62%, #c8902a 63%); box-shadow: inset 0 0 0 1.5px #b07c1f; }
.play { width: 16px; height: 16px; flex: none; border-radius: 50%; background: #fff; position: relative; }
.play::after { content: ""; position: absolute; left: 6px; top: 4.5px; border-left: 6px solid var(--m1); border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: var(--r-m); border: 1px solid transparent; font-weight: 600; font-size: .93rem; white-space: nowrap;
  transition: filter .15s, border-color .15s, box-shadow .2s; }
.btn.wide { width: 100%; height: 46px; margin-top: 10px; }
.btn-grad { background: var(--grad); color: #fff; box-shadow: 0 6px 24px -8px rgba(168, 85, 247, .7); }
.btn-grad:hover { filter: brightness(1.12); box-shadow: 0 8px 30px -6px rgba(217, 70, 239, .75); }
.btn-grad:disabled { filter: grayscale(.7) brightness(.8); }
.btn-ghost { background: var(--vidrio); border-color: var(--borde); color: var(--texto); }
.btn-ghost:hover { border-color: var(--borde-fuerte); }
.btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.btn-google svg { width: 18px; height: 18px; flex: none; }
.icon-btn { height: 36px; min-width: 36px; padding: 0 10px; border-radius: var(--r-m); border: 1px solid var(--borde); background: var(--vidrio);
  color: var(--gris); font-size: .8rem; font-weight: 600; display: inline-grid; place-items: center; }
.icon-btn:hover { color: var(--texto); border-color: var(--borde-fuerte); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }

/* barra superior */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 28px; padding: 0 24px;
  background: var(--barra); backdrop-filter: blur(14px); border-bottom: 1px solid var(--borde); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--grad); box-shadow: 0 0 18px -2px rgba(168, 85, 247, .8); transform: rotate(-8deg); }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.topnav { display: flex; gap: 2px; }
.topnav button { background: none; border: 0; color: var(--gris); padding: 8px 12px; border-radius: var(--r-m); font-weight: 500; }
.topnav button:hover { color: var(--texto); background: var(--vidrio-2); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.balance { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r-m);
  background: var(--vidrio); border: 1px solid var(--borde); font-weight: 700; font-variant-numeric: tabular-nums; }
.balance:hover { border-color: var(--borde-fuerte); }
.balance.bump { animation: bump .45s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--grad); font-weight: 700; color: #fff; }

/* escena */
.stage { position: relative; height: 165vh; }
.stage-sticky { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); display: grid; place-items: center; padding: 0 20px; }
.morph { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.hero-text { position: absolute; left: 0; right: 0; bottom: 12%; text-align: center; z-index: 1; }
.hero-sub { color: var(--gris); font-size: clamp(1rem, 1.6vw, 1.2rem); }
.scroll-hint { margin-top: 18px; color: var(--gris); font-size: .85rem; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.scroll-hint::after { content: ""; width: 1px; height: 32px; background: linear-gradient(var(--m2), transparent); animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 50% { transform: translateY(6px); opacity: .4; } }

.composer { position: relative; z-index: 1; width: min(940px, 100%); min-width: 0;
  background: var(--vidrio); backdrop-filter: blur(16px); border-radius: var(--r-l); padding: 18px;
  border: 1px solid transparent; opacity: 0; }
.stage.formed .composer { box-shadow: var(--brillo); }
.stage:not(.formed) .composer { pointer-events: none; }
.composer > * { opacity: var(--c, 0); }
.composer textarea { width: 100%; resize: none; min-height: 104px; background: transparent; border: 0; color: var(--texto); font: 500 1.2rem/1.5 var(--f-body); padding: 4px; }
.composer textarea::placeholder { color: var(--gris); }
.composer textarea:focus { outline: none; }

.templates { display: flex; gap: 6px; overflow-x: auto; padding: 2px 4px 12px; scrollbar-width: none; }
.templates::-webkit-scrollbar { display: none; }
.tpl { flex: none; height: 30px; padding: 0 12px; border-radius: var(--r-m); border: 1px solid var(--borde); background: transparent; color: var(--gris); font-size: .82rem; font-weight: 500; white-space: nowrap; }
.tpl:hover { color: var(--texto); border-color: var(--borde-fuerte); background: rgba(168, 85, 247, .1); }
.card img, .viewer-media img.real { width: 100%; height: auto; display: block; }
.refs { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 4px 10px; }
.refs:empty { display: none; }
.ref-chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 4px 6px 4px 4px; border: 1px solid var(--borde); border-radius: var(--r-m); background: var(--vidrio-2); font-size: .85rem; max-width: 260px; }
.ref-chip img, .ref-chip video { width: 36px; height: 36px; object-fit: cover; border-radius: var(--r-s); }
.ref-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-chip button { border: 0; background: none; color: var(--gris); font-size: 1.1rem; width: 24px; height: 24px; border-radius: var(--r-s); }

.controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--borde); }
.control-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dd { position: relative; }
.dd-btn, .ref-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; border-radius: var(--r-m);
  border: 1px solid var(--borde); background: var(--vidrio-2); color: var(--texto); font-size: .86rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.dd-btn:hover, .ref-btn:hover { border-color: var(--borde-fuerte); }
.dd-btn .caret { width: 10px; height: 10px; fill: none; stroke: var(--gris); stroke-width: 2; }
.ref-btn svg, .dd-btn .ico, .dd-menu .ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ref-btn:focus-within { outline: 2px solid var(--m2); outline-offset: 2px; }
.ref-btn.has { border-color: var(--borde-fuerte); color: var(--ok); }
.dd-menu { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 20; min-width: 230px; list-style: none; margin: 0; padding: 6px;
  background: var(--vidrio-2); backdrop-filter: blur(16px); border: 1px solid var(--borde-fuerte); border-radius: var(--r-l); box-shadow: var(--brillo); }
.dd-menu li button { width: 100%; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; padding: 9px 10px; border: 0; background: none; border-radius: var(--r-m); text-align: left; }
.dd-menu li button:hover, .dd-menu li button:focus-visible, .dd-menu li button[aria-selected="true"] { background: rgba(168, 85, 247, .16); }
.dd-menu .opt-title { font-weight: 600; display: block; }
.dd-menu .opt-sub { display: block; color: var(--gris); font-size: .8rem; white-space: nowrap; }
.ratio-ico { border: 1.8px solid currentColor; border-radius: 3px; display: inline-block; }
.ratio-ico.r11 { width: 14px; height: 14px; } .ratio-ico.r169 { width: 18px; height: 10px; } .ratio-ico.r916 { width: 10px; height: 18px; }
.lvl-dots { display: inline-flex; gap: 3px; }
.lvl-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--borde-fuerte); opacity: .5; }
.lvl-dots i.on { background: var(--m3); opacity: 1; box-shadow: 0 0 6px var(--m3); }

.num-field { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 6px 0 11px; border-radius: var(--r-m);
  border: 1px solid var(--borde); background: var(--vidrio-2); font-size: .86rem; }
.num-field:focus-within { border-color: var(--borde-fuerte); }
.num-field .lbl, .num-field .unit { color: var(--gris); }
.num-field .lbl { margin-right: 4px; }
.num-field input[type=number] { width: 44px; height: 26px; border: 0; border-radius: var(--r-s); background: rgba(168, 85, 247, .12); color: var(--texto);
  font: 600 .9rem var(--f-body); text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.num-field input::-webkit-outer-spin-button, .num-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-field input:disabled { opacity: .4; }
.num-field input:focus { outline: 1px solid var(--m2); }
.num-field .step { width: 24px; height: 24px; border: 0; border-radius: var(--r-s); background: none; color: var(--gris); font-size: 1rem; line-height: 1; }
.num-field .step:hover { background: rgba(168, 85, 247, .16); color: var(--texto); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--texto); margin-right: 4px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 28px; height: 16px; border-radius: 8px; background: var(--borde-fuerte); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .track { background: var(--grad); }
.switch input:checked + .track::after { transform: translateX(12px); }
.switch input:focus-visible + .track { outline: 2px solid var(--m2); outline-offset: 2px; }
.gen { height: 44px; padding: 0 8px 0 20px; font-size: 1rem; gap: 12px; margin-left: auto; }
.gen-cost { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--r-s); background: rgba(0, 0, 0, .25); font-variant-numeric: tabular-nums; font-size: .9rem; }
.form-msg { margin-top: 10px; min-height: 1.4em; font-size: .9rem; color: var(--error); }
.form-msg.ok { color: var(--ok); }

/* secciones */
main > section:not(.stage) { max-width: 1200px; margin: 0 auto 80px; padding: 0 24px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 22px; }

/* cinta de modelos: solo nombres, rápida y constante */
main > section.models { max-width: none; padding: 0; margin-bottom: 72px; }
.marquee { overflow: hidden; padding: 16px 0; border-block: 1px solid var(--borde); background: linear-gradient(90deg, transparent, rgba(124, 58, 237, .08), transparent);
  -webkit-mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 44px; width: max-content; animation: marquee 10s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }
.model-name { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 2.1rem); letter-spacing: -0.02em; white-space: nowrap;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.model-sep { width: 8px; height: 8px; border-radius: 50%; background: var(--m2); box-shadow: 0 0 10px var(--m3); flex: none; }

/* 3 ejemplos */
.carousel { position: relative; height: clamp(300px, 42vw, 520px); overflow: hidden; border-radius: var(--r-l); }
.ex { position: absolute; top: 0; left: 50%; width: min(760px, 72%); height: 100%; border-radius: var(--r-l); overflow: hidden; border: 0; padding: 0; background: #000;
  transition: transform .9s cubic-bezier(.65, 0, .35, 1), opacity .9s cubic-bezier(.65, 0, .35, 1), filter .9s; transform: translateX(-50%) scale(.82); opacity: 0; }
.ex .ex-media { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex.vertical { background-size: cover; background-position: center; }
.ex.vertical::before { content: ""; position: absolute; inset: 0; background: inherit; filter: blur(28px) brightness(.55); transform: scale(1.15); }
.ex.vertical .ex-media { position: relative; object-fit: contain; }
.viewer-media video, .viewer-media img { width: 100%; max-height: 70vh; object-fit: contain; background: #000; display: block; }
.ex[data-pos="0"] { transform: translateX(-50%) scale(1); opacity: 1; z-index: 3; box-shadow: var(--brillo); }
.ex[data-pos="-1"] { transform: translateX(-112%) scale(.8); opacity: .35; z-index: 2; filter: saturate(.5); }
.ex[data-pos="1"] { transform: translateX(12%) scale(.8); opacity: .35; z-index: 2; filter: saturate(.5); }
.ex-cap { position: absolute; inset: auto 0 0 0; padding: 48px 22px 18px; text-align: left; background: linear-gradient(transparent, rgba(5, 4, 8, .88)); color: #f3f0ff; }
.ex-cap p { font-size: 1.05rem; max-width: 52ch; font-weight: 600; }
.ex-cap small { color: #c4b5fd; font-size: .82rem; }
.ex[data-pos="1"] .ex-cap, .ex[data-pos="-1"] .ex-cap { opacity: 0; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.dots button { width: 28px; height: 5px; border-radius: 3px; border: 0; background: var(--borde-fuerte); opacity: .5; padding: 0; }
.dots button[aria-selected="true"] { background: var(--grad); opacity: 1; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-3%, -2%); } }

.mine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.empty { color: var(--gris); border: 1px dashed var(--borde-fuerte); border-radius: var(--r-l); padding: 28px; text-align: center; background: var(--vidrio); }
.card { position: relative; display: block; width: 100%; border: 1px solid var(--borde); padding: 0; border-radius: var(--r-l); overflow: hidden; background: #000; text-align: left; }
.card:hover { box-shadow: var(--brillo); }
.card canvas { width: 100%; height: auto; }
.card.is-video canvas { animation: drift 9s ease-in-out infinite alternate; }
.card .kind { position: absolute; top: 8px; left: 8px; font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: var(--r-s); background: rgba(5, 4, 8, .7); color: #f3f0ff; }

/* comprar tokens */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pack { border: 1px solid var(--borde); border-radius: var(--r-l); background: var(--vidrio); backdrop-filter: blur(12px); padding: 20px; display: flex; flex-direction: column; gap: 6px; text-align: left; transition: box-shadow .2s, border-color .2s; }
.pack:hover { box-shadow: var(--brillo); border-color: transparent; }
.pack-tokens { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 800; font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.pack-tokens .coin { width: 20px; height: 20px; }
.pack-price { font-weight: 600; }
.pack-tag { align-self: flex-start; font-size: .75rem; color: #fff; background: var(--grad); border-radius: var(--r-s); padding: 1px 8px; }
.pack-buy { color: var(--gris); font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; margin-top: 4px; }
.fine { color: var(--gris); font-size: .88rem; margin-top: 14px; }

.footer { max-width: 1200px; margin: 0 auto; padding: 28px 24px 40px; border-top: 1px solid var(--borde); display: flex; justify-content: space-between; color: var(--gris); font-size: .9rem; flex-wrap: wrap; gap: 12px; }
.footer nav { display: flex; gap: 18px; }
.footer a { text-decoration: none; } .footer a:hover { color: var(--texto); }

/* diálogos */
.modal { width: min(440px, calc(100vw - 32px)); background: var(--vidrio-2); backdrop-filter: blur(18px); color: var(--texto); border: 1px solid var(--borde-fuerte); border-radius: var(--r-l); padding: 28px 24px 24px; box-shadow: var(--brillo); }
.modal::backdrop { background: var(--velo); backdrop-filter: blur(3px); }
.modal h2 { font-size: 1.4rem; margin-bottom: 8px; padding-right: 28px; }
.modal-close-wrap { position: absolute; top: 12px; right: 12px; margin: 0; }
.modal-close { width: 32px; height: 32px; border-radius: var(--r-s); border: 1px solid var(--borde); background: var(--vidrio); font-size: 1.2rem; line-height: 1; }
.modal-text { color: var(--gris); margin-bottom: 16px; }
.modal-note { color: var(--gris); font-size: .85rem; margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.big-balance { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 2.4rem; margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
.big-balance .coin { width: 28px; height: 28px; }
.meter { height: 6px; border-radius: 3px; background: var(--borde); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .3s linear; }
.viewer { width: min(780px, calc(100vw - 32px)); }
.viewer.full { width: calc(100vw - 24px); max-width: none; height: calc(100vh - 24px); max-height: none; display: flex; flex-direction: column; padding: 16px; }
.viewer.full .viewer-media { flex: 1; min-height: 0; display: grid; place-items: center; background: #000; }
.viewer.full .viewer-media img, .viewer.full .viewer-media video, .viewer.full .viewer-media canvas { width: auto; max-width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.viewer.full .viewer-prompt { margin-top: 12px; }
.viewer.full .viewer-meta { margin-bottom: 10px; }
.viewer.full #reuseBtn { align-self: flex-start; }
.viewer-media { border-radius: var(--r-m); overflow: hidden; }
.viewer-media canvas { width: 100%; }
.viewer-media.is-video canvas { animation: drift 9s ease-in-out infinite alternate; }
.viewer-prompt { font-size: 1.05rem; margin: 16px 0 4px; }
.viewer-meta { color: var(--gris); font-size: .88rem; margin-bottom: 16px; }

.overlay { position: fixed; inset: 0; z-index: 60; background: var(--velo); display: grid; place-items: center; padding: 16px; }
.ad-frame { width: min(720px, 100%); }
.ad-label { margin-bottom: 8px; color: #c4b5fd; font-size: .85rem; }
.ad-slot { aspect-ratio: 16 / 9; border-radius: var(--r-l); border: 1px dashed rgba(192, 132, 252, .5);
  background: repeating-linear-gradient(-45deg, #120d20 0 14px, #171028 14px 28px); display: grid; place-items: center; text-align: center; padding: 24px; color: #a19bba; }
.ad-slot p { max-width: 36ch; }
.ad-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; color: #f3f0ff; }
.ad-foot .meter { flex: 1; background: rgba(167, 139, 250, .2); }
.ad-foot p { font-variant-numeric: tabular-nums; min-width: 9ch; text-align: right; }
.wait-box { width: min(560px, 100%); background: var(--vidrio-2); border: 1px solid var(--borde-fuerte); border-radius: var(--r-l); padding: 28px; box-shadow: var(--brillo); }
.wait-box h2 { font-size: 1.5rem; }
.wait-prompt { color: var(--gris); margin: 6px 0 20px; }
.wait-step { color: var(--gris); font-size: .9rem; margin: 10px 0 20px; }
.banner-slot { height: 100px; border-radius: var(--r-m); border: 1px dashed var(--borde-fuerte); display: grid; place-items: center; text-align: center; padding: 12px; color: var(--gris); font-size: .85rem; background: var(--vidrio); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--grad); color: #fff; padding: 10px 16px; border-radius: var(--r-m); font-weight: 600; font-size: .92rem; transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px -8px rgba(168, 85, 247, .7); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* responsive */
@media (max-width: 1120px) { .topnav button { padding: 8px 8px; } .topbar { gap: 16px; } }
@media (max-width: 960px) {
  .topbar { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 0; row-gap: 0; }
  .topnav { order: 3; width: 100%; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav button { flex: none; }
  .ex { width: 86%; }
  .ex[data-pos="-1"] { transform: translateX(-118%) scale(.8); }
  .ex[data-pos="1"] { transform: translateX(18%) scale(.8); }
}
@media (max-width: 600px) {
  :root { --top-h: 58px; }
  .topbar { gap: 8px; padding: 0 10px; }
  .brand-name, #langBtn { display: none; }
  .top-actions { gap: 6px; }
  .top-actions .btn { padding: 0 10px; font-size: .85rem; height: 34px; }
  .composer { padding: 14px; }
  .composer textarea { font-size: 1.05rem; min-height: 88px; }
  .ref-btn span { display: none; }
  .gen { width: 100%; justify-content: space-between; }
  .stage-sticky { padding: 0 12px; }
  main > section:not(.stage) { padding: 0 16px; }
}

/* sin animaciones */
.stage.static { height: auto; }
.stage.static .stage-sticky { position: relative; top: 0; height: auto; padding: 48px 20px; }
.stage.static .morph, .stage.static .hero-text { display: none; }
.stage.static .composer { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .marquee { overflow-x: auto; }
}
