/* ==========================================================================
   SPEKTAKULAR · sistema visual
   - Sin scroll de página: todo cabe en 100dvh; los listados largos se paginan (data-fit).
   - Responsive de móvil a TV: la escala tipográfica crece con el viewport.
   - Temas oscuro (escenario nocturno) y claro (logo sobre blanco). RTL con propiedades lógicas.
   ========================================================================== */

:root {
  --font-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;

  --gold: #f8c04a;
  --gold-2: #ffe29a;
  --gold-3: #c9861c;
  --orange: #ff8a2e;
  --pink: #ff4f9a;
  --magenta: #e04fff;
  --violet: #9b6bff;
  --blue: #3fa3ff;
  --cyan: #38e1ff;
  --green: #2fd98b;
  --red: #ff5a6e;

  --bg: #07060d;
  --bg-2: #100c1f;
  --bg-3: #1a1430;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-2: rgba(255, 255, 255, 0.09);
  --surface-3: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.11);
  --border-2: rgba(255, 255, 255, 0.2);
  --text: #f6f2ff;
  --text-2: #cdc6e6;
  --muted: #958db3;
  --on-gold: #1d1203;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --glass: blur(18px) saturate(140%);
  --grad-gold: linear-gradient(135deg, #ffe9a8 0%, #f8c04a 45%, #e09422 100%);
  --grad-fire: linear-gradient(120deg, #ffc43d 0%, #ff7a45 30%, #ff4f9a 60%, #9b6bff 85%, #3fa3ff 100%);
  --grad-text: linear-gradient(180deg, #fff1c4 0%, #f8c04a 55%, #d18d22 100%);

  --r-sm: 0.5rem;
  --r: 0.9rem;
  --r-lg: 1.4rem;
  --gap: clamp(0.6rem, 1.2vmin, 1.25rem);
  --top-h: 3.6rem;
  --rail-w: 5.2rem;
  --bottom-h: 0px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fbf8ff;
  --bg-2: #f2ecff;
  --bg-3: #e8defc;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-2: rgba(255, 255, 255, 0.95);
  --surface-3: #ffffff;
  --border: rgba(44, 22, 92, 0.1);
  --border-2: rgba(44, 22, 92, 0.2);
  --text: #1b1233;
  --text-2: #3e3460;
  --muted: #6f6790;
  --gold: #d89614;
  --gold-2: #f3c35a;
  --gold-3: #9a6608;
  --shadow: 0 18px 50px -24px rgba(60, 30, 120, 0.35);
  --grad-text: linear-gradient(180deg, #e9b23e 0%, #c98a12 55%, #94620a 100%);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  height: 100%;
  font-size: clamp(14px, calc(0.42vw + 0.42vh + 6.2px), 30px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { display: inline-block; vertical-align: -0.22em; width: 1.2em; height: 1.2em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.gold-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fire-text { background: var(--grad-fire); -webkit-background-clip: text; background-clip: text; color: transparent; }
.display { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; font-optical-sizing: auto; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- fondo escénico ---------- */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.stage-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 15% -10%, rgba(155, 107, 255, 0.22), transparent 60%),
    radial-gradient(50vmax 35vmax at 100% 10%, rgba(255, 79, 154, 0.16), transparent 60%),
    radial-gradient(70vmax 40vmax at 50% 120%, rgba(248, 192, 74, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
:root[data-theme="light"] .stage-bg {
  background:
    radial-gradient(60vmax 40vmax at 10% -10%, rgba(155, 107, 255, 0.18), transparent 60%),
    radial-gradient(50vmax 35vmax at 100% 0%, rgba(255, 79, 154, 0.12), transparent 60%),
    radial-gradient(70vmax 40vmax at 50% 120%, rgba(248, 192, 74, 0.2), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-2) 100%);
}
.spotlight {
  position: fixed; z-index: 0; pointer-events: none; inset-block-start: -30vh; width: 60vw; height: 140vh;
  background: conic-gradient(from 180deg at 50% 0%, transparent 42%, rgba(255, 226, 154, 0.07) 50%, transparent 58%);
  filter: blur(6px); animation: sweep 14s ease-in-out infinite alternate;
}
.spotlight.l { inset-inline-start: -10vw; transform-origin: 50% 0; }
.spotlight.r { inset-inline-end: -10vw; transform-origin: 50% 0; animation-delay: -7s; }
@keyframes sweep { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }

/* ---------- marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: 0.01em; }
.brand .mark { width: 2.4rem; height: auto; filter: drop-shadow(0 0 12px rgba(255, 122, 69, 0.45)); }
.brand .word { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .dot { color: var(--muted); font-weight: 600; font-size: 0.75em; -webkit-text-fill-color: var(--muted); }

/* ---------- botones ---------- */
.btn {
  --b-bg: var(--surface-2); --b-fg: var(--text); --b-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 2.6rem; padding: 0.55em 1.15em; border-radius: 999px;
  border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg);
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em; white-space: nowrap;
  transition: transform 0.15s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { transform: translateY(-1px); border-color: var(--border-2); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn-gold {
  --b-bg: var(--grad-gold); --b-fg: var(--on-gold); --b-bd: transparent;
  box-shadow: 0 8px 30px -8px rgba(248, 192, 74, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-gold:hover { box-shadow: 0 10px 40px -6px rgba(248, 192, 74, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn-fire {
  --b-bg: var(--grad-fire); --b-fg: #fff; --b-bd: transparent; background-size: 200% 100%;
  box-shadow: 0 8px 30px -8px rgba(255, 79, 154, 0.6); animation: shimmer 6s linear infinite;
}
@keyframes shimmer { 0% { background-position: 0% 0; } 50% { background-position: 100% 0; } 100% { background-position: 0% 0; } }
.btn-ghost { --b-bg: transparent; }
.btn-danger { --b-bg: rgba(255, 90, 110, 0.12); --b-fg: var(--red); --b-bd: rgba(255, 90, 110, 0.35); }
.btn-sm { min-height: 2.1rem; padding: 0.35em 0.85em; font-size: 0.85rem; }
.btn-lg { min-height: 3.2rem; padding: 0.7em 1.6em; font-size: 1.05rem; }
.btn-icon { width: 2.6rem; min-height: 2.6rem; padding: 0; border-radius: 50%; }
.btn-icon.btn-sm { width: 2.1rem; min-height: 2.1rem; }
.btn-block { width: 100%; }
.link { color: var(--gold); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---------- formularios ---------- */
.field { display: grid; gap: 0.3rem; min-width: 0; }
.field > label, .label { font-size: 0.78rem; font-weight: 700; color: var(--text-2); letter-spacing: 0.04em; text-transform: uppercase; }
.field .hint { font-size: 0.75rem; color: var(--muted); }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea {
  width: 100%; min-height: 2.65rem; padding: 0.55em 0.85em;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); outline: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field textarea { resize: none; min-height: 5.5rem; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 1.1em) 55%, calc(100% - 0.8em) 55%; background-size: 0.3em 0.3em; background-repeat: no-repeat; padding-inline-end: 2em; }
[dir="rtl"] .field select { background-position: 1.1em 55%, 0.8em 55%; }
.field select option, .field select optgroup { background: var(--bg-2); color: var(--text); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(248, 192, 74, 0.18); background: var(--surface-2); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field-error { color: var(--red); font-size: 0.78rem; font-weight: 600; }
.input-icon { position: relative; }
.input-icon > .ico { position: absolute; inset-inline-start: 0.8em; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > input { padding-inline-start: 2.4em !important; }
.input-icon > .reveal { position: absolute; inset-inline-end: 0.35rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); padding: 0.4rem; }
.row { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.88rem; color: var(--text-2); cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--gold); margin-top: 0.1rem; flex: none; }
.pw-meter { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--red); transition: width 0.3s, background 0.3s; }
.code-input { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 1.8rem !important; letter-spacing: 0.55em; text-align: center; padding-inline-start: 0.55em !important; }

/* switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 0.75rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 2.8rem; height: 1.6rem; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-2); position: relative; transition: background 0.2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 0.15rem; inset-inline-start: 0.15rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); transition: transform 0.25s var(--ease); }
.switch input:checked + .track { background: var(--grad-gold); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(1.2rem); }
[dir="rtl"] .switch input:checked + .track::after { transform: translateX(-1.2rem); }
.switch input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* segmented */
.seg { display: inline-flex; padding: 0.2rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); gap: 0.2rem; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-flex; align-items: center; gap: 0.35em; padding: 0.35em 0.85em; border-radius: 999px; font-size: 0.82rem; font-weight: 700; color: var(--muted); cursor: pointer; transition: 0.2s; }
.seg input:checked + span { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
.seg input:checked + span.is-public { background: rgba(47, 217, 139, 0.16); color: var(--green); }
.seg input:checked + span.is-private { background: rgba(255, 90, 110, 0.14); color: var(--red); }

/* ---------- tarjetas / superficies ---------- */
.glass { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); box-shadow: var(--shadow); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 0.9rem 1rem; min-width: 0; position: relative; }
.card-hover { transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s; }
.card-hover:hover { transform: translateY(-3px); border-color: var(--border-2); background: var(--surface-2); }
.badge { display: inline-flex; align-items: center; gap: 0.3em; padding: 0.15em 0.6em; border-radius: 999px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.badge-gold { background: rgba(248, 192, 74, 0.14); border-color: rgba(248, 192, 74, 0.4); color: var(--gold); }
.badge-green { background: rgba(47, 217, 139, 0.12); border-color: rgba(47, 217, 139, 0.35); color: var(--green); }
.badge-red { background: rgba(255, 90, 110, 0.12); border-color: rgba(255, 90, 110, 0.35); color: var(--red); }
.badge-violet { background: rgba(155, 107, 255, 0.14); border-color: rgba(155, 107, 255, 0.4); color: var(--violet); }
.chip { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.3em 0.8em; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 0.82rem; font-weight: 600; }
.avatar { --s: 2.4rem; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--grad-fire); color: #fff; font-weight: 800; font-size: calc(var(--s) * 0.38); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--border-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sq { border-radius: 28%; }

/* tipo de perfil → color */
.t-individual { --tc: #ffc43d; }
.t-professional { --tc: #ff4f9a; }
.t-representative { --tc: #9b6bff; }
.t-client { --tc: #3fa3ff; }
.t-provider { --tc: #2fd98b; }
.type-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--tc, var(--gold)); box-shadow: 0 0 10px var(--tc); flex: none; }
.type-ico { width: 2.6rem; height: 2.6rem; border-radius: 0.8rem; display: grid; place-items: center; flex: none; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 40%, transparent); }
.type-ico .ico { width: 1.35rem; height: 1.35rem; }

/* progreso */
.ring { --p: 0; --s: 3rem; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; flex: none; background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--surface-2) 0); position: relative; font-size: calc(var(--s) * 0.26); font-weight: 800; }
.ring::before { content: ""; position: absolute; inset: 0.25rem; border-radius: 50%; background: var(--bg-2); }
.ring span { position: relative; }
.bar { height: 0.4rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad-fire); border-radius: inherit; }
.stars { display: inline-flex; gap: 0.1rem; color: var(--gold); }
.stars .ico { width: 0.95em; height: 0.95em; }
.stars .off { color: var(--surface-3); }

/* ---------- paginación por ajuste (sin scroll) ---------- */
.fit-wrap { display: flex; flex-direction: column; min-height: 0; flex: 1; gap: 0.6rem; }
.fit { flex: 1; min-height: 0; overflow: hidden; position: relative; }
.fit.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 17rem)), 1fr)); align-content: start; }
.fit.stack { display: flex; flex-direction: column; gap: var(--gap); }
.fit-item { min-width: 0; animation: fitIn 0.35s var(--ease) both; }
.fit.measuring .fit-item { animation: none; }
@keyframes fitIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fit-nav { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex: none; }
.fit-nav .count { font-size: 0.82rem; font-weight: 700; color: var(--muted); min-width: 3.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.fit-dots { display: flex; gap: 0.3rem; }
.fit-dots i { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--surface-3); transition: 0.25s; }
.fit-dots i.on { background: var(--gold); width: 1.2rem; border-radius: 999px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 90; inset-inline-end: 1rem; inset-block-start: calc(var(--top-h) + 0.6rem); display: grid; gap: 0.5rem; max-width: min(26rem, calc(100vw - 2rem)); }
.toast { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.8rem 1rem; border-radius: var(--r); background: var(--bg-3); border: 1px solid var(--border-2); box-shadow: var(--shadow); font-size: 0.9rem; font-weight: 600; animation: toastIn 0.45s var(--ease) both; }
.toast .ico { margin-top: 0.1rem; }
.toast.success { border-color: rgba(47, 217, 139, 0.45); } .toast.success .ico { color: var(--green); }
.toast.error { border-color: rgba(255, 90, 110, 0.5); } .toast.error .ico { color: var(--red); }
.toast.warning { border-color: rgba(248, 192, 74, 0.5); } .toast.warning .ico { color: var(--gold); }
.toast.out { animation: toastOut 0.35s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

/* ---------- modal ---------- */
dialog.modal { padding: 0; border: 1px solid var(--border-2); border-radius: var(--r-lg); background: var(--bg-2); color: var(--text); width: min(44rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); height: auto; box-shadow: 0 30px 120px -20px rgba(0, 0, 0, 0.8); overflow: hidden; }
dialog.modal[open] { display: flex; flex-direction: column; animation: modalIn 0.35s var(--ease) both; }
dialog.modal::backdrop { background: rgba(5, 3, 12, 0.65); backdrop-filter: blur(6px); }
:root[data-theme="light"] dialog.modal::backdrop { background: rgba(40, 20, 90, 0.25); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; gap: 0.8rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); flex: none; }
.modal-head h3 { font-size: 1.15rem; flex: 1; }
.modal-body { padding: 1rem 1.2rem; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal-foot { display: flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.2rem; border-top: 1px solid var(--border); flex: none; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }
dialog.modal form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
dialog.modal form[data-delete-form] { display: none; }
dialog.modal.tall { height: min(40rem, calc(100dvh - 1.5rem)); }
dialog.modal.wide { width: min(64rem, calc(100vw - 1.5rem)); }

/* ---------- selector de idioma ---------- */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); gap: 0.4rem; align-content: start; }
.lang-opt { display: flex; flex-direction: column; padding: 0.5rem 0.75rem; border-radius: var(--r-sm); border: 1px solid transparent; background: var(--surface); transition: 0.15s; }
.lang-opt:hover { border-color: var(--border-2); background: var(--surface-2); }
.lang-opt.on { border-color: var(--gold); background: rgba(248, 192, 74, 0.1); }
.lang-opt b { font-size: 0.92rem; }
.lang-opt small { color: var(--muted); font-size: 0.72rem; }
.lang-opt .auto { color: var(--violet); }

/* =========================================================================
   LAYOUT PÚBLICO (escenario)
   ========================================================================= */
.pub { display: flex; flex-direction: column; height: 100%; position: relative; z-index: 1; }
.pub-top { flex: none; height: var(--top-h); display: flex; align-items: center; gap: 0.75rem; padding: 0 clamp(0.8rem, 3vw, 2.5rem); position: relative; z-index: 5; }
.pub-top .grow { flex: 1; }
.pub-top .btn { min-height: 2.3rem; }
.pub-main { flex: 1; min-height: 0; position: relative; display: flex; }
.top-actions { display: flex; align-items: center; gap: 0.4rem; }

/* ---------- landing: deck de diapositivas ---------- */
.deck { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.slide {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: clamp(0.5rem, 2vh, 2rem) clamp(1rem, 6vw, 6rem) clamp(3.2rem, 7vh, 4.5rem);
  opacity: 0; visibility: hidden; transform: translateY(30px) scale(0.985);
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease), visibility 0s 0.8s;
}
.slide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity 0.7s var(--ease), transform 0.8s var(--ease), visibility 0s; }
.deck.instant .slide { transition: none !important; }
.slide.is-prev { transform: translateY(-30px) scale(0.985); }
.slide-inner > *, .hero > *, .concept > *, .join > * { min-width: 0; }
.slide-inner { width: 100%; max-width: 78rem; max-height: 100%; display: flex; flex-direction: column; gap: clamp(0.6rem, 2.2vh, 1.8rem); }
.deck-nav { position: absolute; z-index: 6; inset-inline-end: clamp(0.5rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 0.55rem; }
.deck-nav button { position: relative; width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 1px solid var(--border-2); background: transparent; padding: 0; transition: 0.3s var(--ease); }
.deck-nav button.on { background: var(--gold); border-color: var(--gold); height: 1.8rem; border-radius: 999px; box-shadow: 0 0 16px rgba(248, 192, 74, 0.6); }
.deck-nav button span { position: absolute; inset-inline-end: 1.4rem; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 0.75rem; font-weight: 700; color: var(--text-2); opacity: 0; transition: 0.2s; pointer-events: none; }
.deck-nav button:hover span { opacity: 1; }
.deck-arrows { position: absolute; z-index: 6; inset-inline: 0; bottom: clamp(0.6rem, 2vh, 1.4rem); display: flex; justify-content: center; align-items: center; gap: 0.8rem; }
.deck-arrows .hint { font-size: 0.75rem; color: var(--muted); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.deck-progress { position: absolute; z-index: 6; inset-inline: 0; top: 0; height: 2px; }
.deck-progress i { display: block; height: 100%; background: var(--grad-fire); transition: width 0.6s var(--ease); }

.kicker { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.kicker::before { content: ""; width: 1.8rem; height: 2px; background: var(--grad-fire); border-radius: 2px; }
.h-hero { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.3rem, min(7.5vw, 11vh), 7.5rem); line-height: 0.98; letter-spacing: -0.02em; }
.h-slide { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, min(4.6vw, 7vh), 4.4rem); line-height: 1.02; letter-spacing: -0.015em; }
.lead { font-size: clamp(1rem, min(1.6vw, 2.6vh), 1.45rem); color: var(--text-2); max-width: 46rem; }

/* hero */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(1rem, 4vw, 4rem); }
.hero-copy { display: flex; flex-direction: column; gap: clamp(0.7rem, 2.4vh, 1.6rem); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hero-visual { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-height: 62vh; justify-self: center; width: 100%; }
.hero-visual .mark-big { width: 88%; filter: drop-shadow(0 0 40px rgba(255, 79, 154, 0.35)); animation: float 7s ease-in-out infinite; }
.hero-visual .orbit { position: absolute; inset: 4%; border-radius: 50%; border: 1px dashed var(--border-2); animation: spin 60s linear infinite; }
.hero-visual .orbit.o2 { inset: 16%; animation-duration: 40s; animation-direction: reverse; border-style: solid; border-color: var(--border); }
.orbit-chip { position: absolute; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--bg-3); border: 1px solid var(--border-2); box-shadow: var(--shadow); white-space: nowrap; animation: float 6s ease-in-out infinite; }
.orbit-chip .type-dot { width: 0.5rem; height: 0.5rem; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.stats { display: flex; gap: clamp(1rem, 3vw, 2.5rem); flex-wrap: wrap; }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(1.4rem, min(3vw, 4.5vh), 2.6rem); line-height: 1; }
.stat span { font-size: 0.75rem; color: var(--muted); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

/* concepto */
.concept { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1rem, 4vw, 4rem); align-items: center; }
.pillars { display: grid; gap: var(--gap); }
.pillar { display: flex; gap: 0.9rem; align-items: flex-start; padding: clamp(0.7rem, 1.6vh, 1.1rem) 1rem; }
.pillar .type-ico { --tc: var(--gold); }
.pillar h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.pillar p { font-size: 0.88rem; color: var(--text-2); }
.flow { position: relative; aspect-ratio: 16 / 11; max-height: 58vh; width: 100%; }
.flow svg { width: 100%; height: 100%; overflow: visible; }
.flow .node rect, .flow .node ellipse { fill: var(--surface-2); stroke: var(--border-2); }
.flow .node text { fill: var(--text); font: 700 15px var(--font-ui); text-anchor: middle; dominant-baseline: middle; }
.flow .node.hl rect { fill: rgba(248, 192, 74, 0.15); stroke: var(--gold); }
.flow .edge { stroke: url(#flowGrad); stroke-width: 2.5; fill: none; stroke-dasharray: 6 8; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }

/* tipos de perfil */
.types { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gap); }
.type-card { display: flex; flex-direction: column; gap: 0.6rem; padding: clamp(0.8rem, 2vh, 1.4rem) 1rem; border-radius: var(--r-lg); background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 12%, transparent), var(--surface)); border: 1px solid color-mix(in srgb, var(--tc) 30%, var(--border)); position: relative; overflow: hidden; transition: transform 0.35s var(--ease), box-shadow 0.35s; }
.type-card::after { content: ""; position: absolute; inset-inline-end: -30%; inset-block-start: -30%; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tc) 30%, transparent), transparent 70%); pointer-events: none; }
.type-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px -20px var(--tc); }
.type-card h3 { font-family: var(--font-display); font-size: 1.25rem; }
.type-card p { font-size: 0.84rem; color: var(--text-2); }
.type-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.25rem; font-size: 0.8rem; color: var(--text-2); }
.type-card li { display: flex; gap: 0.4rem; align-items: center; }
.type-card li .ico { color: var(--tc); width: 0.95em; height: 0.95em; }
.type-card .go { margin-top: auto; font-size: 0.82rem; font-weight: 800; color: var(--tc); display: inline-flex; align-items: center; gap: 0.3rem; }

/* proceso */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); counter-reset: st; position: relative; }
.steps::before { content: ""; position: absolute; inset-inline: 6%; top: 1.9rem; height: 2px; background: var(--grad-fire); opacity: 0.6; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; }
.step .num { width: 3.8rem; height: 3.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); border: 2px solid var(--border-2); position: relative; z-index: 1; box-shadow: 0 0 0 6px var(--bg); }
.step .num .ico { width: 1.5rem; height: 1.5rem; color: var(--gold); }
.step h3 { font-size: 0.98rem; }
.step p { font-size: 0.8rem; color: var(--text-2); }
.modes { display: flex; gap: var(--gap); flex-wrap: wrap; justify-content: center; }

/* ecosistema */
.eco { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.eco-card { display: flex; gap: 0.9rem; align-items: flex-start; padding: clamp(0.7rem, 1.8vh, 1.2rem) 1rem; }
.eco-card .sub { font-family: ui-monospace, Menlo, monospace; font-size: 0.75rem; color: var(--gold); }
.eco-card h3 { font-size: 1.05rem; }
.eco-card p { font-size: 0.84rem; color: var(--text-2); }
.eco-card .type-ico { --tc: var(--c); }

/* únete */
.join { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 4vw, 4rem); align-items: center; }
.join-types { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.join-types a { display: flex; gap: 0.7rem; align-items: center; padding: 0.75rem 0.9rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); font-weight: 700; transition: 0.25s var(--ease); }
.join-types a:hover { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 10%, var(--surface)); transform: translateX(4px); }
.foot-links { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); }
.foot-links a:hover { color: var(--text); }

/* ---------- pantallas de acceso ---------- */
.auth { flex: 1; display: grid; grid-template-columns: 1fr minmax(0, 30rem); align-items: center; gap: clamp(1rem, 5vw, 5rem); padding: clamp(0.5rem, 2vh, 2rem) clamp(1rem, 6vw, 6rem); min-height: 0; }
.auth-aside { display: flex; flex-direction: column; gap: 1.2rem; }
.auth-aside .mark-big { width: min(22rem, 70%); filter: drop-shadow(0 0 40px rgba(255, 79, 154, 0.35)); }
.auth-card { padding: clamp(1rem, 3vh, 2rem) clamp(1rem, 3vw, 2rem); display: flex; flex-direction: column; gap: clamp(0.6rem, 1.8vh, 1rem); max-height: 100%; min-height: 0; }
.auth-card h1 { font-family: var(--font-display); font-size: clamp(1.5rem, min(3vw, 4.5vh), 2.2rem); }
.auth-card .sub { color: var(--text-2); font-size: 0.92rem; }
.auth-card form { display: flex; flex-direction: column; gap: clamp(0.55rem, 1.6vh, 0.9rem); min-height: 0; }
.auth-card .alt { text-align: center; font-size: 0.88rem; color: var(--text-2); }
.auth-card .divider { display: flex; align-items: center; gap: 0.8rem; color: var(--muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.auth-card .divider::before, .auth-card .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth.single { grid-template-columns: minmax(0, 30rem); justify-content: center; }

/* asistente de registro */
.wizard { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: clamp(0.3rem, 1.5vh, 1.5rem) clamp(0.8rem, 5vw, 5rem) clamp(0.6rem, 2vh, 1.5rem); gap: clamp(0.5rem, 1.6vh, 1rem); max-width: 84rem; width: 100%; margin: 0 auto; }
.wizard-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; flex: none; }
.wizard-head h1 { font-family: var(--font-display); font-size: clamp(1.4rem, min(3vw, 4.5vh), 2.4rem); flex: 1; min-width: 12rem; }
.wsteps { display: flex; gap: 0.35rem; align-items: center; }
.wsteps li { list-style: none; display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.wsteps li i { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: var(--surface); border: 1px solid var(--border); }
.wsteps li.on { color: var(--text); }
.wsteps li.on i { background: var(--grad-gold); color: var(--on-gold); border: 0; }
.wsteps li.done i { background: rgba(47, 217, 139, 0.18); color: var(--green); border-color: rgba(47, 217, 139, 0.4); }
.wsteps li + li::before { content: ""; width: 1.4rem; height: 1px; background: var(--border-2); }
.wsteps { margin: 0; padding: 0; }
.wstage { flex: 1; min-height: 0; position: relative; }
.wpane { position: absolute; inset: 0; display: flex; flex-direction: column; gap: var(--gap); opacity: 0; visibility: hidden; transform: translateX(30px); transition: 0.5s var(--ease); }
[dir="rtl"] .wpane { transform: translateX(-30px); }
.wpane.on { opacity: 1; visibility: visible; transform: none; }
.wpane .pane-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wfoot { flex: none; display: flex; gap: 0.6rem; align-items: center; }
.wfoot .spacer { flex: 1; }
.pick-types { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gap); min-height: 0; margin-block: auto; }
.pick-type { position: relative; cursor: pointer; display: flex; }
.pick-type input { position: absolute; opacity: 0; }
.pick-type .type-card { flex: 1; cursor: pointer; }
.pick-type input:checked + .type-card { border-color: var(--tc); box-shadow: 0 0 0 2px var(--tc), 0 20px 50px -20px var(--tc); transform: translateY(-4px); }
.pick-type input:checked + .type-card::before { content: "✓"; position: absolute; inset-inline-end: 0.8rem; top: 0.7rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--tc); color: #111; font-weight: 900; font-size: 0.85rem; z-index: 1; }
.pick-type input:focus-visible + .type-card { outline: 2px solid var(--gold); outline-offset: 3px; }
.wgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-content: start; }
.wgrid .full { grid-column: 1 / -1; }
.summary { display: grid; gap: 0.5rem; }
.summary div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.8rem; border-radius: var(--r-sm); background: var(--surface); font-size: 0.9rem; }
.summary dt, .summary span { color: var(--muted); }

/* =========================================================================
   LAYOUT APLICACIÓN
   ========================================================================= */
.app { display: grid; grid-template-columns: var(--rail-w) 1fr; grid-template-rows: 100%; height: 100%; position: relative; z-index: 1; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.7rem 0.4rem; border-inline-end: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); z-index: 4; }
.rail .home { margin-bottom: 0.6rem; }
.rail .home img { width: 3rem; filter: drop-shadow(0 0 10px rgba(255, 122, 69, 0.5)); }
.rail a.nav, .rail button.nav { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.55rem 0.2rem; border-radius: var(--r); font-size: 0.66rem; font-weight: 700; color: var(--muted); border: 1px solid transparent; background: none; position: relative; transition: 0.2s; }
.rail .nav .ico { width: 1.45rem; height: 1.45rem; }
.rail .nav:hover { color: var(--text); background: var(--surface); }
.rail .nav.on { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.rail .nav.on::before { content: ""; position: absolute; inset-inline-start: -0.45rem; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: var(--grad-fire); }
.rail .nav.on .ico { color: var(--gold); }
.rail .nav .soon { position: absolute; top: 0.25rem; inset-inline-end: 0.3rem; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--violet); }
.rail .spacer { flex: 1; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { flex: none; height: var(--top-h); display: flex; align-items: center; gap: 0.6rem; padding: 0 clamp(0.6rem, 2vw, 1.5rem); border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); z-index: 3; }
.topbar .title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.6rem; }
.topbar .title h1 { font-size: 1.15rem; font-weight: 800; }
.topbar .mobile-brand { display: none; }
.bell { position: relative; }
.bell .count { position: absolute; top: -0.15rem; inset-inline-end: -0.15rem; min-width: 1.15rem; height: 1.15rem; padding: 0 0.3rem; border-radius: 999px; background: var(--pink); color: #fff; font-size: 0.66rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.content { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: clamp(0.6rem, 1.6vw, 1.4rem); gap: var(--gap); position: relative; }
.bottombar { display: none; }

/* menú desplegable */
.dd { position: relative; }
.dd-menu { position: absolute; z-index: 40; inset-inline-end: 0; top: calc(100% + 0.4rem); min-width: 15rem; max-width: calc(100vw - 1rem); padding: 0.4rem; border-radius: var(--r); background: var(--bg-3); border: 1px solid var(--border-2); box-shadow: var(--shadow); display: none; }
.dd.open .dd-menu { display: grid; gap: 0.15rem; animation: modalIn 0.2s var(--ease); }
.dd-menu a, .dd-menu button { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.55rem 0.7rem; border-radius: var(--r-sm); border: 0; background: none; text-align: start; font-size: 0.9rem; font-weight: 600; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--surface-2); }
.dd-menu .sep { height: 1px; background: var(--border); margin: 0.25rem 0; }
.dd-menu .head { padding: 0.5rem 0.7rem; font-size: 0.72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.dd-menu .on { background: var(--surface-2); }
.switcher-btn { display: flex; align-items: center; gap: 0.55rem; padding: 0.25rem 0.75rem 0.25rem 0.3rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); max-width: 16rem; }
.switcher-btn .ellipsis { font-weight: 700; font-size: 0.88rem; }
.switcher-btn .avatar { --s: 1.9rem; }

/* ---------- dashboard ---------- */
.dash { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem); grid-template-rows: auto minmax(0, 1fr); gap: var(--gap); }
.dash-hello { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.9rem 1.2rem; }
.dash-hello h2 { font-family: var(--font-display); font-size: clamp(1.3rem, min(2.6vw, 4vh), 2rem); }
.dash-hello .grow { flex: 1; min-width: 12rem; }
.dash-col { display: flex; flex-direction: column; min-height: 0; gap: var(--gap); }
.panel { display: flex; flex-direction: column; min-height: 0; padding: 0.9rem 1rem; gap: 0.7rem; }
.panel-head { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.panel-head h3 { font-size: 1rem; flex: 1; display: flex; align-items: center; gap: 0.5rem; }
.pcard { display: flex; flex-direction: column; gap: 0.7rem; padding: 0; overflow: hidden; height: 100%; }
.pcard .cover { height: 4.2rem; background: linear-gradient(120deg, color-mix(in srgb, var(--tc) 55%, #000), color-mix(in srgb, var(--tc) 20%, transparent)), var(--grad-fire); background-size: cover; background-position: center; position: relative; flex: none; }
.pcard .cover img { width: 100%; height: 100%; object-fit: cover; }
.pcard .who { display: flex; gap: 0.7rem; align-items: flex-end; margin-top: -2rem; padding: 0 1rem; position: relative; }
.pcard .who .avatar { --s: 3.6rem; box-shadow: 0 0 0 3px var(--bg-2); }
.pcard .who h3 { font-size: 1.05rem; }
.pcard .body { padding: 0 1rem; display: grid; gap: 0.55rem; flex: 1; align-content: start; }
.pcard .metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
.pcard .metrics div { text-align: center; padding: 0.4rem; border-radius: var(--r-sm); background: var(--surface); }
.pcard .metrics b { display: block; font-size: 1.05rem; }
.pcard .metrics span { font-size: 0.66rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.pcard .actions { display: flex; gap: 0.4rem; padding: 0.7rem 1rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pcard.add { align-items: center; justify-content: center; text-align: center; padding: 1rem; border-style: dashed; color: var(--muted); gap: 0.5rem; }
.pcard.add .plus { width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--gold); }
.notif { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.6rem 0.7rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid transparent; transition: 0.2s; }
.notif:hover { border-color: var(--border-2); }
.notif.unread { background: var(--surface-2); border-inline-start: 3px solid var(--pink); }
.notif .ic { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--gold); flex: none; }
.notif p { font-size: 0.85rem; }
.notif small { color: var(--muted); font-size: 0.72rem; }
.notif .acts { display: flex; gap: 0.35rem; margin-top: 0.4rem; }
.alert { display: flex; gap: 0.7rem; align-items: center; padding: 0.7rem 0.9rem; border-radius: var(--r); background: rgba(248, 192, 74, 0.1); border: 1px solid rgba(248, 192, 74, 0.35); font-size: 0.88rem; }
.alert .ico { color: var(--gold); }
.empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 1rem; gap: 0.6rem; align-content: center; }
.empty .ico { width: 2.6rem; height: 2.6rem; color: var(--border-2); margin: 0 auto; }

/* ---------- editor de perfil ---------- */
.editor { flex: 1; min-height: 0; display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: var(--gap); }
.ed-side { display: flex; flex-direction: column; gap: 0.7rem; min-height: 0; padding: 0.9rem; }
.ed-id { display: flex; gap: 0.7rem; align-items: center; }
.ed-id .avatar { --s: 3rem; }
.ed-id h2 { font-size: 1rem; }
.ed-tabs { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; min-height: 0; }
.ed-tabs a { display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.65rem; border-radius: var(--r-sm); font-size: 0.9rem; font-weight: 600; color: var(--text-2); transition: 0.15s; }
.ed-tabs a:hover { background: var(--surface); color: var(--text); }
.ed-tabs a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--gold); }
[dir="rtl"] .ed-tabs a.on { box-shadow: inset -3px 0 0 var(--gold); }
.ed-tabs a .n { margin-inline-start: auto; font-size: 0.72rem; font-weight: 800; color: var(--muted); background: var(--surface); padding: 0.05rem 0.45rem; border-radius: 999px; }
.ed-tabs a .ico { color: var(--muted); }
.ed-tabs a.on .ico { color: var(--gold); }
.ed-tabs-select { display: none; }
.ed-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 0.9rem 1rem; gap: 0.8rem; }
.ed-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; flex: none; }
.ed-head h2 { font-size: 1.25rem; flex: 1; display: flex; align-items: center; gap: 0.5rem; min-width: 10rem; }
.ed-head .desc { flex-basis: 100%; font-size: 0.85rem; color: var(--muted); }
.item { display: flex; flex-direction: column; gap: 0.45rem; height: 100%; }
.item-top { display: flex; gap: 0.6rem; align-items: flex-start; }
.item-top .ic { width: 2.2rem; height: 2.2rem; border-radius: 0.65rem; display: grid; place-items: center; background: var(--surface-2); color: var(--gold); flex: none; }
.item-top h4 { font-size: 0.98rem; }
.item-top .sub { font-size: 0.8rem; color: var(--text-2); }
.item .meta { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; font-size: 0.76rem; color: var(--muted); }
.item .txt { font-size: 0.82rem; color: var(--text-2); }
.item .acts { display: flex; gap: 0.3rem; margin-top: auto; justify-content: flex-end; }
.media-thumb { aspect-ratio: 16 / 10; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); position: relative; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-thumb .ico { width: 2rem; height: 2rem; }
.media-thumb .kind { position: absolute; top: 0.4rem; inset-inline-start: 0.4rem; }
.media-thumb audio { width: 92%; }
.form-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); align-content: start; }
.form-grid .full { grid-column: 1 / -1; }
fieldset.fs { border: 1px solid var(--border); border-radius: var(--r); padding: 0.8rem 0.9rem 0.9rem; margin: 0; display: grid; gap: 0.7rem; align-content: start; min-width: 0; }
fieldset.fs .row { grid-template-columns: 1fr 1fr; }
fieldset.fs legend { padding: 0 0.4rem; font-size: 0.8rem; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; display: flex; align-items: center; gap: 0.4rem; }
.form-foot { display: flex; align-items: center; gap: 0.6rem; flex: none; flex-wrap: wrap; }
.form-foot .spacer { flex: 1; }
.img-pick { display: flex; gap: 0.8rem; align-items: center; }
.img-pick .avatar { --s: 4rem; }
.img-pick .cover-prev { width: 9rem; height: 3.4rem; border-radius: var(--r-sm); background: var(--grad-fire); background-size: cover; background-position: center; flex: none; border: 1px solid var(--border); }
.privacy-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.65rem 0.8rem; }
.privacy-row .grow { flex: 1; min-width: 0; }
.privacy-row h4 { font-size: 0.92rem; }
.privacy-row p { font-size: 0.76rem; color: var(--muted); }

/* lookup */
.lookup { position: relative; }
.lookup-list { position: absolute; z-index: 50; inset-inline: 0; top: calc(100% + 0.25rem); background: var(--bg-3); border: 1px solid var(--border-2); border-radius: var(--r-sm); box-shadow: var(--shadow); padding: 0.3rem; display: grid; gap: 0.1rem; }
.lookup-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 0.05rem; padding: 0.45rem 0.6rem; border: 0; border-radius: 0.4rem; background: none; text-align: start; }
.lookup-list button:hover, .lookup-list button.on { background: var(--surface-2); }
.lookup-list small { color: var(--muted); font-size: 0.72rem; }
.lookup-chosen { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.6rem; border-radius: var(--r-sm); background: rgba(47, 217, 139, 0.1); border: 1px solid rgba(47, 217, 139, 0.35); font-size: 0.88rem; font-weight: 700; }
.lookup-chosen button { margin-inline-start: auto; }

/* ---------- vista pública del perfil ---------- */
.pv { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); gap: var(--gap); }
.pv-card { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.pv-cover { height: clamp(5rem, 16vh, 9rem); background: var(--grad-fire); background-size: cover; background-position: center; flex: none; position: relative; }
.pv-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--bg-2)); }
.pv-id { padding: 0 1rem 0.8rem; margin-top: -2.6rem; position: relative; z-index: 1; display: grid; gap: 0.45rem; justify-items: start; }
.pv-id .avatar { --s: clamp(4rem, 11vh, 5.6rem); box-shadow: 0 0 0 4px var(--bg-2), 0 0 30px -4px var(--tc); }
.pv-id h1 { font-family: var(--font-display); font-size: clamp(1.3rem, min(2.4vw, 3.8vh), 1.9rem); }
.pv-id .head { color: var(--text-2); font-size: 0.9rem; }
.pv-facts { padding: 0 1rem; display: grid; gap: 0.4rem; font-size: 0.85rem; color: var(--text-2); }
.pv-facts div { display: flex; gap: 0.5rem; align-items: center; }
.pv-facts .ico { color: var(--muted); }
.pv-score { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 0.8rem 1rem; }
.pv-score div { padding: 0.55rem; border-radius: var(--r-sm); background: var(--surface); text-align: center; display: grid; justify-items: center; gap: 0.2rem; }
.pv-score b { font-size: 1.25rem; display: block; }
.pv-score span { font-size: 0.66rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.pv-actions { display: flex; gap: 0.4rem; padding: 0 1rem 1rem; margin-top: auto; flex-wrap: wrap; }
.pv-main { display: flex; flex-direction: column; min-height: 0; padding: 0.9rem 1rem; gap: 0.8rem; }
.tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; flex: none; }
.tabs a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.85rem; border-radius: 999px; font-size: 0.86rem; font-weight: 700; color: var(--text-2); border: 1px solid transparent; }
.tabs a:hover { background: var(--surface); }
.tabs a.on { background: var(--surface-2); border-color: var(--border-2); color: var(--text); }
.tabs a.on .ico { color: var(--gold); }
.contact-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.timeline-item { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; }
.timeline-item .dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--gold); margin-top: 0.3rem; box-shadow: 0 0 12px var(--gold); }
.lock-note { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--muted); }

/* ---------- secciones próximas ---------- */
.soon-hero { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 4vw, 3rem); align-items: center; padding: clamp(0.5rem, 3vh, 2rem) clamp(0.5rem, 3vw, 2rem); }
.soon-hero h2 { font-family: var(--font-display); font-size: clamp(1.8rem, min(4vw, 6vh), 3.6rem); }
.soon-list { display: grid; gap: 0.6rem; }
.soon-list li { list-style: none; display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.7rem 0.9rem; }
.soon-list { margin: 0; padding: 0; }
.soon-visual { display: grid; place-items: center; }
.soon-visual .big-ico { width: min(18rem, 60%); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%); position: relative; }
.soon-visual .big-ico .ico { width: 40%; height: 40%; color: var(--c); stroke-width: 1.2; filter: drop-shadow(0 0 20px var(--c)); }
.soon-visual .big-ico::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px dashed var(--border-2); animation: spin 40s linear infinite; }

/* ---------- errores ---------- */
.err { flex: 1; display: grid; place-items: center; text-align: center; gap: 1rem; align-content: center; padding: 1rem; }
.err .code { font-family: var(--font-display); font-size: clamp(5rem, 22vh, 12rem); line-height: 1; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1180px) {
  .types, .pick-types { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 1.2rem; }
  .steps::before { display: none; }
  .eco { grid-template-columns: repeat(2, 1fr); }
  .dash { grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); }
  .editor { grid-template-columns: 13rem minmax(0, 1fr); }
}

/* Tablet vertical y móvil */
@media (max-width: 860px) {
  :root { --rail-w: 0px; --bottom-h: 4rem; --top-h: 3.4rem; }
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr var(--bottom-h); }
  .rail { display: none; }
  .main { grid-row: 1; }
  .topbar .mobile-brand { display: block; }
  .topbar .mobile-brand img { width: 2.2rem; }
  .topbar .title h1 { font-size: 1rem; }
  .bottombar { display: flex; grid-row: 2; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); padding-bottom: env(safe-area-inset-bottom); z-index: 4; }
  .bottombar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; font-size: 0.64rem; font-weight: 700; color: var(--muted); position: relative; }
  .bottombar a .ico { width: 1.4rem; height: 1.4rem; }
  .bottombar a.on { color: var(--text); }
  .bottombar a.on .ico { color: var(--gold); }
  .bottombar a.on::before { content: ""; position: absolute; top: 0; width: 2rem; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad-fire); }
  .switcher-btn .ellipsis { max-width: 7rem; }
  .hide-m { display: none !important; }

  .hero, .concept, .join, .auth, .soon-hero { grid-template-columns: minmax(0, 1fr); }
  .pub-top { gap: 0.4rem; padding: 0 0.7rem; }
  .top-actions { gap: 0.25rem; }
  .hero-visual { position: absolute; inset: 0; z-index: -1; opacity: 0.22; max-height: none; aspect-ratio: auto; }
  .hero-visual .orbit-chip { display: none; }
  .flow, .auth-aside, .soon-visual { display: none; }
  .types, .pick-types { grid-template-columns: 1fr 1fr; }
  .type-card ul, .type-card p { display: none; }
  .type-card { flex-direction: row; align-items: center; padding: 0.7rem 0.8rem; }
  .type-card h3 { font-size: 1rem; }
  .type-card .go { margin: 0 0 0 auto; }
  .eco { grid-template-columns: 1fr 1fr; }
  .eco-card p { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step p { display: none; }
  .deck-nav { display: none; }
  .wgrid { grid-template-columns: 1fr; }
  .wsteps li span { display: none; }

  .dash { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1.25fr) minmax(0, 1fr); }
  .editor { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .ed-side { padding: 0.6rem; flex-direction: row; align-items: center; }
  .ed-side .ed-tabs, .ed-side .ed-extra { display: none; }
  .ed-tabs-select { display: block; flex: 1; min-width: 0; }
  .ed-id h2, .ed-id .muted { display: none; }
  .pv { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .pv-card { flex-direction: row; align-items: center; }
  .pv-cover, .pv-facts, .pv-score, .pv-card .hide-pv { display: none; }
  .pv-id { margin: 0; padding: 0.7rem; grid-template-columns: auto 1fr; align-items: center; }
  .pv-id .avatar { grid-row: span 3; --s: 3.4rem; }
  .pv-actions { padding: 0.7rem; margin: 0; }
}

@media (max-width: 520px) {
  .types, .pick-types { grid-template-columns: 1fr; }
  .join-types { grid-template-columns: 1fr; }
  .eco { grid-template-columns: 1fr; }
  .pub-top .btn-label { display: none; }
  .pub-top [data-theme-toggle] { display: none; }
  .brand .mark { width: 2rem; }
  .brand .word { font-size: 1.1rem; }
  .brand .dot { display: none; }
  .stats { gap: 1rem; }
  .pcard .metrics span { font-size: 0.6rem; }
}

/* pantallas bajas (móvil en horizontal, portátiles pequeños) */
@media (max-height: 640px) {
  .hide-short { display: none !important; }
  .type-card ul { display: none; }
  .steps p, .eco-card p { display: none; }
  :root { --top-h: 3rem; }
}
@media (max-height: 480px) {
  .hide-xshort { display: none !important; }
  .type-card p { display: none; }
}

/* TV y pantallas muy grandes: más aire */
@media (min-width: 1900px) and (min-height: 1000px) {
  .slide-inner { max-width: 92rem; }
  :root { --rail-w: 6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* impresión (currículo descargable) */
@media print {
  html, body { height: auto; overflow: visible; background: #fff; color: #111; }
}

/* ---------- zona de pruebas ---------- */
.test-stripe { position: fixed; z-index: 95; inset-inline: 0; top: 0; height: 4px; pointer-events: none; background: repeating-linear-gradient(-45deg, #ffc43d 0 12px, #1d1203 12px 24px); }
.test-pill { position: fixed; z-index: 95; inset-inline-end: 0.6rem; bottom: calc(var(--bottom-h) + 0.6rem); display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.8rem; border-radius: 999px; background: #1d1203; color: #ffe29a; border: 1px solid #ffc43d; box-shadow: 0 8px 30px -8px rgba(255, 196, 61, 0.6); font-size: 0.78rem; }
.test-pill .dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #ffc43d; animation: pulse 1.6s ease-in-out infinite; }
.test-pill a { display: inline-flex; align-items: center; gap: 0.3rem; color: #fff; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 999px; background: rgba(255, 196, 61, 0.18); }
.test-pill a:hover { background: rgba(255, 196, 61, 0.35); }
.test-pill .muted { color: #c9b27a; }
@keyframes pulse { 50% { opacity: 0.3; } }
.test-pill a.hot { background: #ffc43d; color: #1d1203; }
