/* ============================================================
   ONE WAY — modern gaming editor
   Theme-driven, Inter-based, card-with-glow aesthetic.
   ============================================================ */

:root {
  /* default cyber — overwritten by themes.js */
  --bg-0: #05060d;  --bg-1: #080b16;  --bg-2: #0e1322;
  --surf-1: rgba(255,255,255,0.025);
  --surf-2: rgba(255,255,255,0.05);
  --surf-3: rgba(255,255,255,0.08);
  --bd-1: rgba(255,255,255,0.07);
  --bd-2: rgba(255,255,255,0.12);
  --bd-3: rgba(255,255,255,0.22);
  --tx-0: #eef3fb;  --tx-1: #a6b3c8;  --tx-2: #6a778e;  --tx-3: #3f4a5e;
  --acc: #22d3ee;   --acc-2: #d946ef; --acc-3: #0891b2; --acc-tx: #02141a;
  --grid-c: rgba(34,211,238,0.06);
  --danger: #ef4444;
  --warn: #f59e0b;
  --ok: #22c55e;
  --shame: #f97316;

  --rail-w: 252px;
  --preview-w: 480px;
  --topbar-h: 60px;
  --status-h: 34px;

  --rad-s: 6px;
  --rad-m: 12px;
  --rad-l: 18px;
  --rad-xl: 22px;

  --ff-body: 'Inter', system-ui, sans-serif;
  --ff-display: 'Inter', system-ui, sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
[hidden] { display: none !important; }

body {
  background: var(--bg-1);
  color: var(--tx-0);
  font-family: var(--ff-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  letter-spacing: -0.005em;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

kbd {
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--surf-3);
  border: 1px solid var(--bd-2);
  border-bottom-width: 1.5px;
  color: var(--tx-0);
  display: inline-flex;
  align-items: center;
  min-width: 16px;
  justify-content: center;
  line-height: 1;
  letter-spacing: 0.04em;
}

/* utility */
.label-mono {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--tx-2);
  text-transform: uppercase;
}

/* ====================================================
   BACKGROUND
   ==================================================== */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(900px 700px at 90% -10%, color-mix(in oklab, var(--acc) 12%, var(--bg-1)) 0%, transparent 60%),
    radial-gradient(800px 600px at -10% 110%, color-mix(in oklab, var(--acc-2) 10%, var(--bg-1)) 0%, transparent 55%),
    var(--bg-0);
}
.bg__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-c) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-c) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
  opacity: 0.6;
}
.bg__scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(255,255,255,0.007) 4px, transparent 5px);
  pointer-events: none;
}
.bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  will-change: transform;
}
.bg__glow--1 { width: 640px; height: 640px; background: var(--acc);   top: -180px; right: -100px; opacity: 0.16; }
.bg__glow--2 { width: 520px; height: 520px; background: var(--acc-2); bottom: -160px; left: -80px; opacity: 0.12; }
.bg__glow--3 { width: 320px; height: 320px; background: var(--acc);   top: 40%; left: 50%; opacity: 0.05; }
.bg__noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' 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 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.45;
  mix-blend-mode: overlay;
}

/* ====================================================
   STATUS STRIP — solid, no glass
   ==================================================== */
.status-strip {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--status-h);
  background: var(--bg-0);
  border-bottom: 1px solid var(--bd-1);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  z-index: 50;
}
.status-strip__spacer { flex: 1; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.1em;
  border: 1px solid var(--bd-2);
  background: var(--surf-2);
  color: var(--tx-1);
  user-select: none;
  white-space: nowrap;
  text-transform: uppercase;
}
.chip b { font-weight: 600; color: var(--tx-0); }
.chip__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--tx-3);
}
.chip__dot--ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* chipPulse: usado por la pip de "cambios sin guardar" (.dirty-pip). */
@keyframes chipPulse { 50% { opacity: 0.35; transform: scale(0.85); } }

.chip--date b, .chip--region b { font-family: var(--ff-mono); }
.chip--ghost { background: transparent; }

/* ====================================================
   TOPBAR — solid, no glass
   ==================================================== */
.topbar {
  position: fixed;
  top: var(--status-h);
  left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--bg-1);
  border-bottom: 1px solid var(--bd-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 40;
}
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 14px; }

.logo {
  display: flex; align-items: center; gap: 12px;
}
.logo__primary {
  font-family: var(--ff-body);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--tx-0);
  padding-right: 14px;
  border-right: 1px solid var(--bd-2);
  position: relative;
  line-height: 1;
}
.logo__primary br { display: none; }
.logo__primary::before {
  content: ""; position: absolute; left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--acc);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--acc);
}
.logo__sub {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--acc);
  text-transform: uppercase;
}

.crumb {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--tx-2);
}
.crumb__url, .crumb__slug { color: var(--tx-1); }
.crumb__slug { color: var(--acc); font-weight: 600; }
.crumb__edit {
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 2px 7px;
  border-radius: 4px;
  background: color-mix(in oklab, var(--shame) 18%, transparent);
  color: var(--shame);
  border: 1px solid color-mix(in oklab, var(--shame) 35%, transparent);
}
.dirty-pip {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 8px var(--warn);
  display: none;
}
[data-dirty="true"] .dirty-pip { display: inline-block; animation: chipPulse 1.6s ease-in-out infinite; }

.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--rad-m);
  color: var(--tx-1);
  border: 1px solid transparent;
  transition: background 160ms, color 160ms, border-color 160ms;
}
.icon-btn:hover { background: var(--surf-2); color: var(--tx-0); border-color: var(--bd-2); }

.staff {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 5px 5px 12px;
  border-radius: 999px;
  background: var(--surf-2);
  border: 1px solid var(--bd-2);
  cursor: pointer;
  user-select: none;
}
.staff__chip {
  font-family: var(--ff-mono);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--tx-1);
}
.staff__sw {
  width: 32px; height: 18px;
  background: var(--surf-3);
  border-radius: 999px;
  position: relative;
  transition: background 200ms;
}
.staff__sw i {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--tx-1);
  transition: transform 200ms cubic-bezier(.4,1.6,.5,1), background 200ms;
}
.staff__sw[data-on="true"] { background: color-mix(in oklab, var(--acc) 35%, transparent); }
.staff__sw[data-on="true"] i { transform: translateX(14px); background: var(--acc); box-shadow: 0 0 8px var(--acc); }

.btn-cta {
  position: relative;
  display: inline-flex; align-items: center;
  gap: 0;
  padding: 0;
  border-radius: var(--rad-m);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.005em;
  border: 1px solid color-mix(in oklab, var(--acc) 60%, transparent);
  background: linear-gradient(135deg, var(--acc) 0%, var(--acc-3) 100%);
  color: var(--acc-tx);
  cursor: pointer;
  overflow: hidden;
  transition: transform 180ms, box-shadow 220ms, opacity 160ms;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--acc) 30%, transparent),
              0 6px 24px -6px color-mix(in oklab, var(--acc) 50%, transparent);
}
.btn-cta:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-cta:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--acc), 0 12px 32px -5px color-mix(in oklab, var(--acc) 60%, transparent); }
.btn-cta__inner {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
}
.btn-cta kbd {
  background: rgba(0,0,0,0.22);
  color: rgba(0,0,0,0.65);
  border-color: transparent;
  border-radius: 0;
  padding: 9px 10px;
  margin: 0;
}

/* ====================================================
   SHELL
   ==================================================== */
.shell {
  position: fixed;
  top: calc(var(--status-h) + var(--topbar-h) + 10px);
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--preview-w);
  gap: 10px;
  transition: grid-template-columns 320ms cubic-bezier(.6,.05,.2,1);
}
body[data-rail-hidden="true"] .shell { grid-template-columns: 0 minmax(0,1fr) var(--preview-w); }
body[data-preview-hidden="true"] .shell { grid-template-columns: var(--rail-w) minmax(0,1fr) 0; }
body[data-rail-hidden="true"][data-preview-hidden="true"] .shell { grid-template-columns: 0 minmax(0,1fr) 0; }

/* ====================================================
   RAIL — solid, no glass
   ==================================================== */
.rail {
  background: var(--bg-2);
  border: 1px solid var(--bd-1);
  border-radius: var(--rad-l);
  padding: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: opacity 200ms;
}
body[data-rail-hidden="true"] .rail { opacity: 0; pointer-events: none; }
.rail::before {
  content: ""; position: absolute; top: 0; left: 14px; right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--acc), transparent);
  opacity: 0.6;
}

.rail__head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px;
}
.rail__avatar {
  width: 42px; height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--acc), var(--acc-2));
  color: var(--acc-tx);
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 18px;
  display: grid; place-items: center;
  position: relative;
  box-shadow: 0 6px 20px -6px color-mix(in oklab, var(--acc) 55%, transparent);
  flex-shrink: 0;
}
.rail__avatar::after {
  content: ""; position: absolute; inset: -3px;
  border-radius: 17px;
  border: 1px solid color-mix(in oklab, var(--acc) 35%, transparent);
}
.rail__meta { min-width: 0; flex: 1; }
.rail__name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.rail__tag { margin-top: 4px; display: flex; gap: 4px; }
.rail__tier {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 3px 7px;
  border-radius: 4px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #2a1700;
  text-transform: uppercase;
}

.rail__divider {
  height: 1px;
  margin: 0 -14px 14px;
  background: linear-gradient(90deg, transparent, var(--bd-2), transparent);
}

.rail__group { margin-bottom: 14px; }
.rail__group-label {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--tx-3);
  margin-bottom: 6px;
  padding: 0 4px;
  text-transform: uppercase;
}
.rail__tabs {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.rail__tabs li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  color: var(--tx-1);
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
  position: relative;
  user-select: none;
  transition: background 180ms, color 180ms, padding-left 220ms;
  border: 1px solid transparent;
}
.rail__num {
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--tx-3);
  width: 16px;
  letter-spacing: 0.02em;
}
.rail__label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  text-transform: capitalize;
}
.rail__tabs li:hover { background: var(--surf-2); color: var(--tx-0); }
.rail__tabs li:hover .rail__num { color: var(--tx-1); }
.rail__tabs li.is-active {
  background: linear-gradient(90deg, color-mix(in oklab, var(--acc) 22%, transparent), color-mix(in oklab, var(--acc) 6%, transparent));
  color: var(--tx-0);
  border-color: color-mix(in oklab, var(--acc) 30%, transparent);
  padding-left: 14px;
}
.rail__tabs li.is-active .rail__num { color: var(--acc); }
.rail__tabs li.is-active::before {
  content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px;
  background: var(--acc);
  box-shadow: 0 0 12px var(--acc);
  border-radius: 2px;
}
.rail__tabs li kbd { opacity: 0.5; font-size: 9px; }
.rail__tabs li b.prem,
.rail__tabs li b.staff {
  font-family: var(--ff-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 2px 5px;
  border-radius: 3px;
  background: color-mix(in oklab, var(--acc-2) 22%, transparent);
  color: color-mix(in oklab, var(--acc-2) 80%, white);
  border: 1px solid color-mix(in oklab, var(--acc-2) 40%, transparent);
  text-transform: uppercase;
}
.rail__tabs li b.staff {
  background: color-mix(in oklab, var(--shame) 22%, transparent);
  color: #fdba74;
  border-color: color-mix(in oklab, var(--shame) 40%, transparent);
}

body:not([data-staff="true"]) [data-staff-only] { display: none; }

.rail__foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--bd-1);
  display: flex;
  gap: 12px;
}
.rail__hint {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--tx-2);
  text-transform: uppercase;
}

/* ====================================================
   EDITOR — solid
   ==================================================== */
.editor {
  background: var(--bg-2);
  border: 1px solid var(--bd-1);
  border-radius: var(--rad-l);
  overflow: hidden;
  position: relative;
  min-width: 0;
}
.editor::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--acc-2), transparent);
  opacity: 0.4;
}
.editor__scroll {
  height: 100%;
  overflow-y: auto;
  padding: 32px clamp(20px, 4vw, 48px) 100px;
  scrollbar-width: thin;
  scrollbar-color: var(--bd-2) transparent;
  perspective: 1400px;
}
.editor__scroll::-webkit-scrollbar { width: 8px; }
.editor__scroll::-webkit-scrollbar-thumb { background: var(--bd-2); border-radius: 4px; }

/* ====================================================
   TAB HEAD — big numbered hero
   ==================================================== */
.tab-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--bd-1);
  position: relative;
}
.tab-hero::after {
  content: ""; position: absolute; bottom: -1px; left: 0;
  width: 120px; height: 1px;
  background: linear-gradient(90deg, var(--acc), transparent);
}
.tab-hero__icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--acc), var(--acc-3));
  display: grid; place-items: center;
  color: var(--acc-tx);
  flex-shrink: 0;
  box-shadow:
    0 8px 28px -8px color-mix(in oklab, var(--acc) 55%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.18);
  position: relative;
  overflow: hidden;
}
.tab-hero__icon::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 120% at 18% 18%, rgba(255,255,255,0.32), transparent 50%);
  pointer-events: none;
}
.tab-hero__icon svg { width: 28px; height: 28px; position: relative; z-index: 1; }
.tab-hero__body { min-width: 0; }
.tab-hero__bracket {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--acc);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.tab-hero h2 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--tx-0);
}
.tab-hero p {
  color: var(--tx-2);
  font-size: 14px;
  margin: 6px 0 0;
  max-width: 60ch;
  line-height: 1.55;
}
.tab-hero__side {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-self: flex-end;
}

/* ====================================================
   CARDS — solid base, restrained glow
   ==================================================== */
.card {
  background: var(--bg-1);
  border: 1px solid var(--bd-2);
  border-radius: var(--rad-l);
  padding: 22px;
  margin-bottom: 16px;
  transition: border-color 220ms, transform 320ms cubic-bezier(.2,.8,.2,1), box-shadow 320ms;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}
.card::before, .card::after {
  content: ""; position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.16;
  pointer-events: none;
  transition: opacity 320ms;
  z-index: 0;
}
.card::before {
  background: var(--acc);
  top: -150px; left: -100px;
}
.card::after {
  background: var(--acc-2);
  bottom: -180px; right: -120px;
  opacity: 0.1;
}
.card:hover { border-color: var(--bd-3); }
.card:hover::before { opacity: 0.24; }
.card > * { position: relative; z-index: 1; }

.card__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
  gap: 14px;
  flex-wrap: wrap;
}
.card__title {
  font-family: var(--ff-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--tx-0);
  margin: 0;
  display: inline-flex; align-items: center; gap: 10px;
}
.card__title-num {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--acc);
  text-transform: uppercase;
}
.card__title-sep {
  width: 14px; height: 1px;
  background: var(--bd-3);
}
.card__hint {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  color: var(--tx-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* grid */
.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1100px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* ====================================================
   FORM PRIMITIVES
   ==================================================== */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--tx-2);
  text-transform: uppercase;
}
.field > label .count {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--tx-3);
  letter-spacing: 0.04em;
}
.field > label .count.warn { color: var(--warn); }

.input, .textarea, .select {
  width: 100%;
  background: var(--bg-0);
  border: 1px solid var(--bd-2);
  color: var(--tx-0);
  border-radius: var(--rad-m);
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--ff-body);
  outline: none;
  transition: border-color 160ms, background 160ms, box-shadow 200ms;
  letter-spacing: -0.005em;
}
.textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8aa3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; padding-right: 32px; cursor: pointer; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--bd-3); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--acc);
  background: var(--bg-0);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--acc) 20%, transparent);
}
.input--mono { font-family: var(--ff-mono); font-size: 13px; letter-spacing: 0.02em; }
.input--display { font-family: var(--ff-display); font-weight: 700; font-size: 18px; letter-spacing: -0.015em; }

.input-affix {
  display: flex; align-items: stretch;
  border: 1px solid var(--bd-2);
  border-radius: var(--rad-m);
  background: var(--bg-0);
  overflow: hidden;
  transition: border-color 160ms, box-shadow 200ms;
}
.input-affix:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in oklab, var(--acc) 20%, transparent); }
.input-affix__pre, .input-affix__suf {
  display: inline-flex; align-items: center;
  padding: 0 10px;
  font-family: var(--ff-mono); font-size: 10.5px;
  color: var(--tx-2);
  background: var(--surf-2);
  border-right: 1px solid var(--bd-1);
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.input-affix__suf { border-right: 0; border-left: 1px solid var(--bd-1); color: var(--ok); }
.input-affix input { flex: 1; min-width: 0; background: transparent; border: 0; padding: 11px 14px; font-size: 13px; outline: none; color: var(--tx-0); font-family: var(--ff-mono); }

/* toggle */
.toggle {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--surf-2);
  border: 1px solid var(--bd-1);
  border-radius: var(--rad-m);
  cursor: pointer;
  transition: border-color 180ms, background 180ms;
  user-select: none;
}
.toggle:hover { border-color: var(--bd-2); }
.toggle__body { flex: 1; min-width: 0; }
.toggle__title { font-family: var(--ff-body); font-weight: 600; font-size: 14px; color: var(--tx-0); letter-spacing: -0.005em; }
.toggle__sub { font-size: 12.5px; color: var(--tx-2); margin-top: 3px; }
.toggle__sw {
  width: 40px; height: 22px;
  background: var(--surf-3);
  border-radius: 999px; position: relative;
  flex-shrink: 0;
  transition: background 200ms;
}
.toggle__sw::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--tx-1);
  transition: transform 200ms cubic-bezier(.4,1.6,.5,1), background 200ms;
}
.toggle[data-on="true"] .toggle__sw { background: color-mix(in oklab, var(--acc) 35%, transparent); }
.toggle[data-on="true"] .toggle__sw::after { transform: translateX(18px); background: var(--acc); box-shadow: 0 0 8px var(--acc); }

/* range */
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row .range-val {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--tx-0);
  width: 50px;
  text-align: right;
}
input[type="range"].range-input {
  -webkit-appearance: none; appearance: none;
  flex: 1;
  height: 4px;
  background: var(--surf-3);
  border-radius: 999px;
  outline: none;
}
input[type="range"].range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--acc);
  border: 3px solid var(--bg-1);
  box-shadow: 0 0 0 1px var(--acc), 0 4px 12px -2px color-mix(in oklab, var(--acc) 55%, transparent);
  cursor: grab;
}
input[type="range"].range-input::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--acc);
  border: 3px solid var(--bg-1);
}

/* segmented */
.seg {
  display: inline-flex;
  background: var(--surf-2);
  border: 1px solid var(--bd-1);
  border-radius: var(--rad-m);
  padding: 3px;
  gap: 2px;
  flex-wrap: wrap;
}
.seg button {
  padding: 7px 14px;
  border-radius: 8px;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: -0.005em;
  color: var(--tx-2);
  transition: background 220ms, color 160ms;
}
.seg button.is-on {
  background: color-mix(in oklab, var(--acc) 22%, var(--surf-3));
  color: var(--tx-0);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--acc) 40%, transparent);
}
.seg button:hover:not(.is-on) { color: var(--tx-0); }

/* ============================================================
   bg-ctrls — sliders de DIFUMINADO / OSCURECER del fondo,
   debajo del slot de IMAGEN DE FONDO.
   ============================================================ */
.bg-ctrls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--bd-1);
}
@media (max-width: 560px) { .bg-ctrls { grid-template-columns: 1fr; } }

/* ============================================================
   swatchChoice — pickers visuales (forma / anillo / frame /
   fondo animado). Cada opción es una MINI-PREVIEW del efecto.
   CSS puro, sin imágenes externas. Setea el mismo path que segChoice.
   ============================================================ */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 10px;
}
.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px 9px;
  border-radius: var(--rad-m);
  background: var(--surf-1);
  border: 1px solid var(--bd-1);
  cursor: pointer;
  transition: background 200ms, border-color 200ms, transform 140ms, box-shadow 200ms;
}
.swatch:hover { background: var(--surf-2); border-color: var(--bd-2); transform: translateY(-1px); }
.swatch.is-on {
  background: color-mix(in oklab, var(--acc) 12%, var(--surf-2));
  border-color: color-mix(in oklab, var(--acc) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--acc) 45%, transparent),
              0 6px 18px -8px color-mix(in oklab, var(--acc) 60%, transparent);
}
.swatch__label {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--tx-2);
  text-transform: uppercase;
  transition: color 160ms;
}
.swatch.is-on .swatch__label { color: var(--tx-0); }

/* preview box base */
.swatch__preview {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  --sw-acc: var(--acc);
  --sw-acc2: var(--acc-2);
}
.swatch__inner { display: block; }

/* ---------- kind: SHAPE (clip-path del avatar) ---------- */
.swatch__preview--shape .swatch__inner {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--sw-acc), var(--sw-acc2));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}
.swatch__preview--shape.is-circle   .swatch__inner { border-radius: 50%; }
.swatch__preview--shape.is-squircle .swatch__inner { border-radius: 30%; }
.swatch__preview--shape.is-hex .swatch__inner {
  border-radius: 0;
  clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
}
.swatch__preview--shape.is-shield .swatch__inner {
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 12%, 100% 55%, 50% 100%, 0% 55%, 0% 12%);
}

/* ---------- kind: RING (anillo alrededor de un avatar circular) ---------- */
.swatch__preview--ring .swatch__inner {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, color-mix(in oklab, var(--sw-acc) 30%, var(--bg-2)), var(--bg-2));
  position: relative;
  z-index: 1;
}
.swatch__preview--ring::before {
  content: "";
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  box-sizing: border-box;
}
.swatch__preview--ring.is-none::before   { border: 1.5px dashed var(--bd-2); }
.swatch__preview--ring.is-solid::before  { border: 3px solid var(--sw-acc); }
.swatch__preview--ring.is-duotone::before {
  border: 3px solid transparent;
  background: linear-gradient(135deg, var(--sw-acc), var(--sw-acc2)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.swatch__preview--ring.is-animated::before {
  border: 3px solid transparent;
  background: conic-gradient(from 0deg, var(--sw-acc), var(--sw-acc2), var(--sw-acc)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: sw-ring-spin 3.5s linear infinite;
}
.swatch__preview--ring.is-pulse::before {
  border: 3px solid var(--sw-acc);
  animation: sw-ring-pulse 1.8s ease-in-out infinite;
}
@keyframes sw-ring-spin  { to { transform: rotate(360deg); } }
@keyframes sw-ring-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--sw-acc) 55%, transparent); opacity: 1; }
  50%      { box-shadow: 0 0 0 5px color-mix(in oklab, var(--sw-acc) 0%, transparent); opacity: 0.7; }
}

/* ---------- kind: FRAME (curvatura / corte del rectángulo) ---------- */
.swatch__preview--frame .swatch__inner {
  width: 36px; height: 28px;
  background: linear-gradient(135deg, color-mix(in oklab, var(--sw-acc) 22%, var(--bg-2)), var(--bg-2));
  border: 1.5px solid var(--sw-acc);
  box-sizing: border-box;
}
.swatch__preview--frame.is-rounded  .swatch__inner { border-radius: 7px; }
.swatch__preview--frame.is-sharp    .swatch__inner { border-radius: 0; }
.swatch__preview--frame.is-soft     .swatch__inner { border-radius: 13px; }
.swatch__preview--frame.is-tactical .swatch__inner {
  border-radius: 0;
  clip-path: polygon(0 7px, 7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
}

/* ---------- kind: BG (thumb del patrón de fondo animado) ---------- */
.swatch__preview--bg {
  width: 48px; height: 38px;
}
.swatch__preview--bg .swatch__inner {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--bd-1);
}
.swatch__preview--bg .swatch__inner::after {
  content: "";
  position: absolute;
  inset: 0;
}
.swatch__preview--bg.is-none .swatch__inner::after {
  background:
    repeating-linear-gradient(45deg, transparent 0 5px, rgba(255,255,255,0.05) 5px 6px);
}
.swatch__preview--bg.is-aurora .swatch__inner::after {
  background:
    radial-gradient(ellipse 70% 60% at 30% 0%, color-mix(in oklab, var(--sw-acc) 70%, transparent), transparent 70%),
    radial-gradient(ellipse 60% 60% at 80% 100%, color-mix(in oklab, var(--sw-acc2) 65%, transparent), transparent 70%);
  filter: blur(4px);
  animation: sw-aurora 6s ease-in-out infinite alternate;
}
.swatch__preview--bg.is-grid .swatch__inner::after {
  background-image:
    linear-gradient(color-mix(in oklab, var(--sw-acc) 55%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--sw-acc) 55%, transparent) 1px, transparent 1px);
  background-size: 8px 8px;
  opacity: 0.7;
}
.swatch__preview--bg.is-particles .swatch__inner::after {
  background:
    radial-gradient(1.4px 1.4px at 22% 30%, var(--sw-acc), transparent),
    radial-gradient(1.4px 1.4px at 64% 70%, var(--sw-acc), transparent),
    radial-gradient(1.4px 1.4px at 82% 18%, var(--sw-acc2), transparent),
    radial-gradient(1.4px 1.4px at 34% 82%, var(--sw-acc2), transparent),
    radial-gradient(1px 1px at 50% 48%, var(--sw-acc), transparent),
    radial-gradient(1px 1px at 12% 60%, var(--sw-acc), transparent);
  animation: sw-particles 8s ease-in-out infinite alternate;
}
.swatch__preview--bg.is-waves .swatch__inner::after {
  background:
    radial-gradient(120% 60% at 50% 120%, color-mix(in oklab, var(--sw-acc) 60%, transparent), transparent 60%),
    radial-gradient(120% 60% at 50% -20%, color-mix(in oklab, var(--sw-acc2) 50%, transparent), transparent 60%);
  animation: sw-waves 5s ease-in-out infinite alternate;
}
@keyframes sw-aurora    { from { transform: translateY(2px) scale(1); } to { transform: translateY(-2px) scale(1.08); } }
@keyframes sw-particles { from { transform: translate(0,0); } to { transform: translate(-8%,-8%); } }
@keyframes sw-waves     { from { transform: translateY(2px); } to { transform: translateY(-2px); } }

@media (prefers-reduced-motion: reduce) {
  .swatch__preview--ring.is-animated::before,
  .swatch__preview--ring.is-pulse::before,
  .swatch__preview--bg .swatch__inner::after { animation: none !important; }
}

/* color picker */
.color-pick { display: flex; flex-direction: column; gap: 14px; }
.color-pick__row { display: flex; gap: 12px; align-items: center; }
.color-pick__chip {
  position: relative;
  width: 64px; height: 64px;
  border-radius: var(--rad-m);
  background: var(--acc);
  border: 1px solid var(--bd-2);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow:
    0 0 0 3px color-mix(in oklab, var(--acc) 20%, transparent),
    0 12px 32px -6px color-mix(in oklab, var(--acc) 55%, transparent);
}
.color-pick__chip::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 120% at 20% 20%, rgba(255,255,255,0.4), transparent 50%);
  pointer-events: none;
}
.color-pick__chip input[type="color"] {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer;
}
.color-pick__hex { flex: 1; font-family: var(--ff-mono); font-size: 13px; }
.color-pick__palette { display: flex; flex-wrap: wrap; gap: 6px; }
.color-pick__sw {
  width: 32px; height: 32px;
  border-radius: 9px;
  cursor: pointer;
  border: 1.5px solid var(--bd-1);
  position: relative;
  transition: transform 220ms cubic-bezier(.4,1.6,.5,1);
}
.color-pick__sw:hover { transform: translateY(-3px) scale(1.06); }
.color-pick__sw.is-on { box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 4px var(--tx-0); }

/* theme grid */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.theme-card {
  position: relative;
  border-radius: var(--rad-m);
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid var(--bd-1);
  aspect-ratio: 4 / 3;
  background: var(--surf-1);
  transition: transform 280ms cubic-bezier(.2,.8,.2,1), border-color 220ms, box-shadow 220ms;
}
.theme-card:hover { transform: translateY(-4px); }
.theme-card.is-on { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in oklab, var(--acc) 25%, transparent); }
.theme-card__viz {
  position: absolute; inset: 0;
  padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.theme-card__bar { height: 5px; border-radius: 2px; background: var(--theme-acc); box-shadow: 0 0 8px var(--theme-acc); }
.theme-card__bar:nth-child(2) { width: 65%; opacity: 0.65; }
.theme-card__bar:nth-child(3) { width: 40%; opacity: 0.45; background: var(--theme-acc2); box-shadow: 0 0 8px var(--theme-acc2); }
.theme-card__label {
  position: absolute; left: 12px; bottom: 10px; right: 12px;
  display: flex; justify-content: space-between; align-items: center;
}
.theme-card__name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.005em;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.theme-card__check {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--acc);
  display: none;
  align-items: center; justify-content: center;
  color: var(--acc-tx);
  font-size: 10px;
  font-weight: bold;
}
.theme-card.is-on .theme-card__check { display: flex; }

/* font cards */
.font-card {
  position: relative;
  padding: 16px;
  border: 1.5px solid var(--bd-1);
  border-radius: var(--rad-m);
  cursor: pointer;
  background: var(--surf-2);
  overflow: hidden;
  transition: border-color 200ms, transform 240ms cubic-bezier(.2,.8,.2,1);
}
.font-card:hover { border-color: var(--bd-2); transform: translateY(-3px); }
.font-card.is-on { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in oklab, var(--acc) 22%, transparent); }
.font-card__prem {
  position: absolute; top: 7px; right: 7px;
  font-family: var(--ff-mono); font-size: 8px; font-weight: 700; letter-spacing: 0.12em;
  padding: 2px 5px; border-radius: 5px;
  background: linear-gradient(90deg, #ffd36b, #ff9d4d); color: #3a2400;
}
.font-card__sample {
  font-size: 24px;
  line-height: 1.05;
  color: var(--tx-0);
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.font-card__name {
  margin-top: 10px;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--tx-2);
  text-transform: uppercase;
}

/* drag rows */
.drag-list { display: flex; flex-direction: column; gap: 6px; }
.drag-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surf-2);
  border: 1px solid var(--bd-1);
  border-radius: var(--rad-m);
  padding: 10px 12px;
  transition: border-color 160ms, background 160ms;
}
.drag-row:hover { border-color: var(--bd-2); }
.drag-row.is-dragging {
  border-color: var(--acc);
  background: color-mix(in oklab, var(--acc) 10%, var(--surf-2));
  box-shadow: 0 16px 40px -12px color-mix(in oklab, var(--acc) 35%, transparent);
}
.drag-handle {
  width: 18px; flex-shrink: 0;
  cursor: grab; text-align: center;
  color: var(--tx-3);
  line-height: 0;
  font-size: 14px;
}
.drag-handle::before { content: "⋮⋮"; letter-spacing: -2px; }
.drag-handle:active { cursor: grabbing; }
.drag-row__num {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--tx-3);
  width: 18px;
  text-align: center;
}
.drag-row__body { flex: 1; min-width: 0; }
.drag-row__del {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: grid; place-items: center;
  color: var(--tx-2);
  flex-shrink: 0;
  font-size: 15px;
  transition: background 160ms, color 160ms;
}
.drag-row__del:hover { background: color-mix(in oklab, var(--danger) 20%, transparent); color: var(--danger); }

.add-row {
  border: 1.5px dashed var(--bd-2);
  border-radius: var(--rad-m);
  padding: 13px;
  text-align: center;
  color: var(--tx-1);
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  transition: border-color 180ms, color 180ms, background 180ms;
  width: 100%;
}
.add-row:hover {
  border-color: var(--acc);
  color: var(--acc);
  background: color-mix(in oklab, var(--acc) 8%, transparent);
}

/* image slot */
.img-slot {
  position: relative;
  border-radius: var(--rad-m);
  border: 1.5px dashed var(--bd-2);
  background: var(--surf-1);
  aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  color: var(--tx-2);
  font-size: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 180ms, background 180ms;
}
.img-slot:hover { border-color: var(--bd-3); background: var(--surf-2); }
.img-slot.is-filled { border-style: solid; border-color: var(--bd-2); }
.img-slot.is-dragover { border-color: var(--acc); background: color-mix(in oklab, var(--acc) 12%, transparent); color: var(--acc); }
.img-slot__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-slot__del {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 7px;
  background: rgba(0,0,0,0.55);
  color: white;
  display: none;
  align-items: center; justify-content: center;
  font-size: 14px;
}
.img-slot.is-filled .img-slot__del { display: flex; }
.img-slot__hint {
  text-align: center;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 12.5px;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.img-slot__hint b { font-weight: 600; color: var(--tx-1); }
.img-slot__hint span { font-family: var(--ff-mono); font-size: 10.5px; color: var(--tx-3); letter-spacing: 0.04em; }

/* platform grid */
.plat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}
.plat-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 8px;
  background: var(--surf-2);
  border: 1.5px solid var(--bd-1);
  border-radius: var(--rad-m);
  cursor: pointer;
  position: relative;
  transition: transform 240ms cubic-bezier(.2,.8,.2,1), border-color 200ms;
}
.plat-tile:hover { transform: translateY(-3px); border-color: var(--bd-2); }
.plat-tile.is-on {
  border-color: color-mix(in oklab, var(--tile-c, var(--acc)) 60%, transparent);
  background: color-mix(in oklab, var(--tile-c, var(--acc)) 10%, var(--surf-2));
}
.plat-tile.is-on::after {
  content: ""; position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--tile-c, var(--acc));
  box-shadow: 0 0 8px var(--tile-c, var(--acc));
}
.plat-tile__icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--tile-c, var(--surf-3));
  display: grid; place-items: center;
  color: white;
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 12px;
}
.plat-tile__name {
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 11.5px;
  color: var(--tx-1);
  letter-spacing: -0.005em;
}

/* kpi grid */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  padding: 16px;
  background: var(--surf-2);
  border: 1px solid var(--bd-1);
  border-radius: var(--rad-m);
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: ""; position: absolute; top: 0; left: 16px;
  width: 36px; height: 2px;
  background: var(--acc);
  border-radius: 2px;
}
.kpi__label {
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--tx-2);
  text-transform: uppercase;
}
.kpi__value {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 30px;
  margin-top: 8px;
  letter-spacing: -0.02em;
  color: var(--tx-0);
}
.kpi__delta {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ok);
  margin-top: 4px;
  letter-spacing: 0.02em;
}
.kpi__delta.down { color: var(--danger); }

/* chart */
.chart {
  display: flex; align-items: flex-end;
  gap: 10px;
  height: 180px;
  padding: 18px 14px;
  background: var(--surf-2);
  border: 1px solid var(--bd-1);
  border-radius: var(--rad-m);
  position: relative;
}
.chart::before {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 18px;
  height: 1px;
  background: var(--bd-1);
}
.chart__bar {
  flex: 1;
  background: linear-gradient(180deg, var(--acc) 0%, color-mix(in oklab, var(--acc) 30%, transparent) 100%);
  border-radius: 4px 4px 1px 1px;
  position: relative;
  transition: transform 240ms cubic-bezier(.2,.8,.2,1);
  min-height: 6px;
  box-shadow: 0 0 14px -2px color-mix(in oklab, var(--acc) 35%, transparent);
}
.chart__bar:hover { transform: translateY(-4px); }
.chart__bar span {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font-family: var(--ff-mono); font-size: 10px; color: var(--tx-1);
}
.chart-labels {
  display: flex; gap: 10px; margin-top: 6px; padding: 0 14px;
}
.chart-labels div {
  flex: 1; text-align: center;
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--tx-3);
  text-transform: uppercase;
}

/* music waveform */
.wave {
  height: 96px;
  display: flex; align-items: center; gap: 2px;
  padding: 16px;
  background: var(--surf-2);
  border: 1px solid var(--bd-1);
  border-radius: var(--rad-m);
}
.wave i {
  flex: 1;
  background: linear-gradient(180deg, var(--acc), color-mix(in oklab, var(--acc) 30%, transparent));
  border-radius: 2px;
  min-height: 4px;
}
.wave i.played { background: var(--tx-3); }

/* friend avatar */
.friend-row { display: flex; align-items: center; gap: 12px; }
.friend-row__avatar {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--acc), var(--acc-2));
  color: var(--acc-tx);
  display: grid; place-items: center;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

/* shame card */
.shame-card {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, color-mix(in oklab, var(--shame) 10%, var(--surf-2)), var(--surf-1));
  border: 1px solid color-mix(in oklab, var(--shame) 30%, transparent);
  border-radius: var(--rad-m);
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.shame-card::before {
  content: ""; position: absolute; top: 0; left: 16px;
  width: 60px; height: 2px;
  background: var(--shame);
  box-shadow: 0 0 12px var(--shame);
  border-radius: 2px;
}
.shame-card__emoji {
  width: 70px; height: 70px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--shame), #9a3412);
  display: grid; place-items: center;
  font-size: 32px;
}
.shame-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.shame-card__target {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--shame);
  letter-spacing: -0.01em;
}
.shame-card__reason { font-size: 13.5px; color: var(--tx-1); }
.shame-card__date { font-family: var(--ff-mono); font-size: 10.5px; color: var(--tx-3); letter-spacing: 0.04em; }

/* ====================================================
   PREVIEW PANE — solid
   ==================================================== */
.preview {
  background: var(--bg-2);
  border: 1px solid var(--bd-1);
  border-radius: var(--rad-l);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  transition: opacity 220ms;
}
body[data-preview-hidden="true"] .preview { opacity: 0; pointer-events: none; }
.preview::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--acc), transparent);
  opacity: 0.4;
}

.preview__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--bd-1);
  background: var(--surf-2);
}
.preview__bar-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.preview__bar-right { display: flex; align-items: center; gap: 8px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; }
.dots i:nth-child(1) { background: #ef4444; }
.dots i:nth-child(2) { background: #f59e0b; }
.dots i:nth-child(3) { background: #22c55e; }
.preview__url {
  flex: 1;
  padding: 6px 12px;
  background: var(--bg-0);
  border-radius: 7px;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--tx-2);
  border: 1px solid var(--bd-1);
  letter-spacing: 0.02em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview__url b { color: var(--tx-0); }

.preview-mode {
  display: inline-flex;
  background: var(--bg-0);
  border: 1px solid var(--bd-1);
  border-radius: 7px;
  padding: 2px;
}
.preview-mode button {
  padding: 5px 10px;
  border-radius: 5px;
  font-family: var(--ff-mono);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--tx-2);
  text-transform: uppercase;
}
.preview-mode button.is-on { background: var(--acc); color: var(--acc-tx); }
.zoom {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  color: var(--tx-2);
  letter-spacing: 0.04em;
}

.preview__frame {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: flex; align-items: flex-start; justify-content: center;
  scrollbar-width: thin;
  scrollbar-color: var(--bd-2) transparent;
}
.preview__scale {
  width: 1080px;
  transform-origin: top center;
  will-change: transform;
}
.preview__scale[data-mode="mobile"] { width: 390px; }

/* ====================================================
   PROFILE MOCK — matches their actual product
   ==================================================== */
.profile {
  font-family: var(--ff-body);
  background: var(--bg-1);
  color: var(--tx-0);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--bd-1);
  isolation: isolate;
}
.profile__bg {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--grid-c) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-c) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 30%, transparent 80%);
}
.profile__glow {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(50% 40% at 50% 10%, color-mix(in oklab, var(--acc) 30%, transparent) 0%, transparent 60%),
    radial-gradient(40% 30% at 90% 60%, color-mix(in oklab, var(--acc-2) 22%, transparent) 0%, transparent 60%);
  pointer-events: none;
}

/* pills row */
.profile__pills {
  position: relative; z-index: 1;
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 22px 24px 8px;
  justify-content: center;
}

/* avatar — single solid ring, big & elegant */
.profile__avatar-wrap {
  display: grid; place-items: center;
  padding: 24px 24px 0;
  position: relative;
  z-index: 1;
}
.profile__avatar {
  position: relative;
  width: 192px; height: 192px;
}
.profile__avatar-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px solid var(--acc);
  box-shadow:
    0 0 24px color-mix(in oklab, var(--acc) 55%, transparent),
    inset 0 0 24px color-mix(in oklab, var(--acc) 25%, transparent);
}
[data-prof-ring="duotone"]  .profile__avatar-ring { border: 0; background: conic-gradient(from 0deg, var(--acc), var(--acc-2), var(--acc)); padding: 3px; }
[data-prof-ring="animated"] .profile__avatar-ring { border: 0; background: conic-gradient(from 0deg, var(--acc), var(--acc-2), var(--acc)); padding: 3px; animation: ringSpin 8s linear infinite; }
[data-prof-ring="pulse"]    .profile__avatar-ring { animation: ringPulse 2.4s ease-in-out infinite; }
[data-prof-ring="none"]     .profile__avatar-ring { display: none; }
@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 24px color-mix(in oklab, var(--acc) 55%, transparent), inset 0 0 24px color-mix(in oklab, var(--acc) 25%, transparent); }
  50% { box-shadow: 0 0 48px color-mix(in oklab, var(--acc) 75%, transparent), inset 0 0 24px color-mix(in oklab, var(--acc) 25%, transparent); }
}
.profile__avatar-inner {
  position: absolute; inset: 8px;
  border-radius: 50%;
  background: var(--bg-0);
  display: grid; place-items: center;
  overflow: hidden;
}
[data-prof-shape="hex"]      .profile__avatar-ring,
[data-prof-shape="hex"]      .profile__avatar-inner {
  border-radius: 0;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}
[data-prof-shape="squircle"] .profile__avatar-ring,
[data-prof-shape="squircle"] .profile__avatar-inner { border-radius: 32% / 32%; }
[data-prof-shape="shield"]   .profile__avatar-ring,
[data-prof-shape="shield"]   .profile__avatar-inner {
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.profile__avatar-letter {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 96px;
  color: var(--tx-0);
  letter-spacing: -0.04em;
  line-height: 1;
}
.profile__avatar-img { width: 100%; height: 100%; object-fit: cover; }
.profile__avatar-status {
  position: absolute;
  right: 12px; bottom: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ok);
  border: 4px solid var(--bg-1);
  box-shadow: 0 0 12px var(--ok);
}

/* big name centered */
.profile__name-row {
  padding: 24px 24px 0;
  text-align: center;
  position: relative; z-index: 1;
}
.profile__name {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--acc);
}
[data-prof-neon="true"] .profile__name {
  text-shadow:
    0 0 24px color-mix(in oklab, var(--acc) 55%, transparent),
    0 0 48px color-mix(in oklab, var(--acc) 28%, transparent);
}

.profile__sub-row {
  padding: 14px 24px 0;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--tx-1);
  justify-content: center;
  position: relative; z-index: 1;
}
.profile__slug { color: var(--acc); font-family: var(--ff-mono); font-weight: 500; }
.profile__mood-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--ok) 18%, transparent);
  border: 1px solid color-mix(in oklab, var(--ok) 32%, transparent);
  color: #86efac;
  font-weight: 500;
  font-size: 12.5px;
}
.profile__sep { color: var(--tx-3); }
.profile__since { font-family: var(--ff-mono); font-size: 12px; color: var(--tx-2); }
.profile__region-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--tx-1);
  letter-spacing: 0.04em;
}

/* tier pill — gradient purple → pink */
.profile__tier-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  margin-top: 22px;
  background: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
  color: white;
  border-radius: 999px;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  box-shadow: 0 10px 30px -6px rgba(167, 139, 250, 0.55);
  text-transform: uppercase;
}

.profile__tier-wrap {
  display: flex; justify-content: center;
  position: relative; z-index: 1;
}

/* quote */
.profile__quote {
  margin: 18px 24px 0;
  text-align: center;
  font-style: italic;
  font-size: 16px;
  color: var(--tx-1);
  position: relative; z-index: 1;
}
.profile__quote::before {
  content: ""; display: inline-block;
  width: 3px; height: 16px;
  background: var(--acc);
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 10px;
  box-shadow: 0 0 8px var(--acc);
}

/* spaced text — like "t a l e n t o 🍑🍑🍑" */
.profile__bio {
  margin: 14px 24px 0;
  font-size: 14.5px;
  color: var(--tx-1);
  text-align: center;
  letter-spacing: 0.12em;
  position: relative; z-index: 1;
}

/* stats card row matching screenshot — KILLS, PHASE, TIER, SUBTIER, CLANES */
.profile__hero-stats {
  margin: 24px 24px 0;
  position: relative; z-index: 1;
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.profile__hero-stat-card {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  padding: 14px 18px;
  background: linear-gradient(180deg, var(--surf-3), var(--surf-2));
  border: 1px solid var(--bd-2);
  border-radius: 16px;
  display: flex; gap: 12px; align-items: center;
}
.profile__hero-stat-card__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: color-mix(in oklab, var(--acc) 24%, transparent);
  display: grid; place-items: center;
  color: var(--acc);
  flex-shrink: 0;
}
.profile__hero-stat-card__body { flex: 1; min-width: 0; }
.profile__hero-stat-card__value-row {
  display: flex; align-items: baseline; gap: 8px;
}
.profile__hero-stat-card__value {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.025em;
  line-height: 1;
}
.profile__hero-stat-card__label {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--tx-2);
  text-transform: uppercase;
}
.profile__hero-stat-card__delta {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--acc-2);
  margin-top: 3px;
  letter-spacing: 0.02em;
}
.profile__hero-stat-card__chart {
  display: flex; align-items: flex-end; gap: 3px; margin-top: 6px; height: 14px;
}
.profile__hero-stat-card__chart i {
  width: 4px;
  background: var(--bd-3);
  border-radius: 1.5px;
}
.profile__hero-stat-card__chart i.on { background: var(--acc); }

/* compact like button */
.profile__like {
  padding: 14px 18px;
  background: var(--surf-2);
  border: 1px solid var(--bd-2);
  border-radius: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  transition: border-color 180ms, background 180ms;
}
.profile__like:hover { border-color: color-mix(in oklab, var(--danger) 50%, transparent); background: color-mix(in oklab, var(--danger) 8%, var(--surf-2)); }
.profile__like svg { color: var(--tx-1); }
.profile__like:hover svg { color: var(--danger); }
.profile__like b { font-family: var(--ff-display); font-weight: 700; font-size: 16px; }

/* === gaming stat tiles (KILLS / PHASE / TIER / SUBTIER / CLANES) === */
.profile__game-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 18px 24px 0;
  position: relative; z-index: 1;
}
.profile__scale[data-mode="mobile"] .profile__game-stats,
.profile__scale-mobile .profile__game-stats { grid-template-columns: repeat(2, 1fr); }
.gstat {
  padding: 14px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--gstat-tint), var(--surf-2));
  border: 1px solid color-mix(in oklab, var(--gstat-c, var(--acc)) 28%, var(--bd-2));
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 240ms cubic-bezier(.2,.8,.2,1), border-color 220ms;
}
.gstat:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--gstat-c, var(--acc)) 60%, transparent); }
.gstat::before {
  content: ""; position: absolute;
  width: 110px; height: 110px;
  border-radius: 50%;
  filter: blur(40px);
  background: var(--gstat-c, var(--acc));
  opacity: 0.18;
  top: -50px; left: -10px;
}
.gstat__icon {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  font-size: 18px;
  position: relative; z-index: 1;
}
.gstat__label {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--tx-2);
  text-transform: uppercase;
  position: relative; z-index: 1;
}
.gstat__value {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--tx-0);
  line-height: 1;
  position: relative; z-index: 1;
}
.gstat--kills  { --gstat-c: #ef4444; --gstat-tint: color-mix(in oklab, #ef4444 14%, var(--surf-2)); }
.gstat--phase  { --gstat-c: #a78bfa; --gstat-tint: color-mix(in oklab, #a78bfa 14%, var(--surf-2)); }
.gstat--tier   { --gstat-c: #fbbf24; --gstat-tint: color-mix(in oklab, #fbbf24 14%, var(--surf-2)); }
.gstat--subt   { --gstat-c: #22d3ee; --gstat-tint: color-mix(in oklab, #22d3ee 14%, var(--surf-2)); }
.gstat--clanes { --gstat-c: #f97316; --gstat-tint: color-mix(in oklab, #f97316 14%, var(--surf-2)); }

/* announcement card (rich left-border) */
.profile__announce {
  margin: 18px 24px 0;
  padding: 14px 18px;
  background: linear-gradient(135deg, color-mix(in oklab, var(--warn) 10%, var(--surf-2)), var(--surf-1));
  border: 1px solid color-mix(in oklab, var(--warn) 30%, transparent);
  border-radius: 14px;
  position: relative; z-index: 1;
  overflow: hidden;
}
.profile__announce::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--warn); box-shadow: 0 0 12px var(--warn);
}
.profile__announce-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--warn);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.profile__announce-text { color: var(--tx-0); font-size: 14px; }

/* state widget (estado / hasta...) */
.profile__estado {
  margin: 14px 24px 0;
  padding: 16px 18px;
  background: var(--surf-2);
  border: 1px solid var(--bd-2);
  border-radius: 14px;
  position: relative; z-index: 1;
}
.profile__estado-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.profile__estado-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--acc);
  text-transform: uppercase;
}
.profile__estado-meta { font-family: var(--ff-mono); font-size: 11px; color: var(--tx-3); }
.profile__estado-text { font-size: 14px; color: var(--tx-0); }

/* sections grid for links, friends, conns */
.profile__sections {
  margin: 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  position: relative; z-index: 1;
}
.profile__sec {
  padding: 16px;
  background: var(--surf-2);
  border: 1px solid var(--bd-1);
  border-radius: 14px;
}
.profile__sec h5 {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--tx-2);
  margin: 0 0 12px;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.profile__sec h5 span.count {
  background: var(--surf-3);
  color: var(--tx-0);
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.profile__links { display: flex; flex-direction: column; gap: 4px; }
.profile__link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--surf-2);
  border: 1px solid var(--bd-1);
  border-radius: 10px;
  font-size: 13.5px;
  transition: background 180ms, transform 180ms, border-color 180ms;
  color: var(--tx-0);
}
.profile__link:hover {
  background: color-mix(in oklab, var(--acc) 14%, var(--surf-2));
  border-color: var(--acc);
  transform: translateX(2px);
}
.profile__link__ico {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--acc), var(--acc-3));
  display: grid; place-items: center;
  color: var(--acc-tx);
  font-size: 13px;
  flex-shrink: 0;
}
.profile__link b { flex: 1; font-weight: 500; }
.profile__link span {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surf-3);
  color: var(--tx-1);
  font-size: 14px;
}

.profile__friends { display: flex; flex-wrap: wrap; gap: 4px; }
.profile__friend {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--acc), var(--acc-2));
  color: var(--acc-tx);
  display: grid; place-items: center;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 13px;
  border: 2px solid var(--bg-1);
  margin-left: -4px;
}
.profile__friend:first-child { margin-left: 0; }

.profile__conns { display: flex; flex-wrap: wrap; gap: 6px; }
.profile__conn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px;
  background: var(--surf-2);
  border-radius: 9px;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  border: 1px solid var(--bd-1);
}
.profile__conn i {
  width: 14px; height: 14px; border-radius: 4px;
  background: var(--conn-c, var(--acc));
}

/* music widget (bottom of profile) */
.profile__music {
  margin: 0 24px 24px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--surf-3), var(--surf-2));
  border: 1px solid var(--bd-2);
  border-radius: 14px;
  display: flex; align-items: center; gap: 14px;
  position: relative; z-index: 1;
}
.profile__music-cover {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc), var(--acc-2));
  position: relative;
  flex-shrink: 0;
  animation: coverSpin 10s linear infinite;
  overflow: hidden;
}
.profile__music-cover::after {
  content: ""; position: absolute; inset: 38%;
  border-radius: 50%;
  background: var(--bg-0);
}
@keyframes coverSpin { to { transform: rotate(360deg); } }
.profile__music-info { flex: 1; min-width: 0; }
.profile__music-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--tx-0);
  display: inline-flex; align-items: center; gap: 8px;
}
.profile__music-artist {
  font-size: 12px;
  color: var(--tx-2);
  margin-top: 2px;
}
.profile__music-vis {
  display: inline-flex; align-items: center; gap: 2px; height: 14px;
}
.profile__music-vis i {
  width: 2px; background: var(--acc); border-radius: 1px;
  animation: visBar 1.2s ease-in-out infinite;
}
.profile__music-vis i:nth-child(1) { height: 60%; animation-delay: 0s; }
.profile__music-vis i:nth-child(2) { height: 100%; animation-delay: 0.2s; }
.profile__music-vis i:nth-child(3) { height: 40%; animation-delay: 0.4s; }
.profile__music-vis i:nth-child(4) { height: 80%; animation-delay: 0.6s; }
@keyframes visBar { 50% { transform: scaleY(0.4); } }

.profile__music-volume { display: flex; align-items: center; gap: 8px; }
.profile__music-volume svg { color: var(--tx-2); }
.profile__music-volume input { width: 80px; accent-color: var(--acc); }

.profile__share {
  margin: 0 24px 24px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px;
  background: var(--surf-2);
  border: 1px solid var(--bd-2);
  border-radius: 14px;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--tx-0);
  cursor: pointer;
  transition: border-color 180ms, background 180ms;
  position: relative; z-index: 1;
}
.profile__share:hover { border-color: var(--acc); background: color-mix(in oklab, var(--acc) 10%, var(--surf-2)); color: var(--acc); }

/* ====================================================
   TOAST
   ==================================================== */
.toast-stack {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex; flex-direction: column-reverse; gap: 8px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--surf-3), var(--surf-2));
  border: 1px solid var(--bd-2);
  border-radius: var(--rad-m);
  backdrop-filter: blur(20px);
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 13px;
  display: flex; align-items: center; gap: 10px;
  pointer-events: auto;
  max-width: 320px;
  box-shadow: 0 16px 40px -10px rgba(0,0,0,0.5);
}
.toast--ok { border-color: color-mix(in oklab, var(--ok) 45%, transparent); }
.toast--ok .toast__icon { background: var(--ok); color: #000; }
.toast--err { border-color: color-mix(in oklab, var(--danger) 45%, transparent); }
.toast--err .toast__icon { background: var(--danger); color: #fff; }
.toast__icon {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: grid; place-items: center;
  font-weight: bold;
  font-size: 12px;
  flex-shrink: 0;
}

/* ====================================================
   MOBILE DOCK
   ==================================================== */
.dock {
  display: none;
  position: fixed;
  bottom: 12px; left: 12px; right: 12px;
  height: 58px;
  background: linear-gradient(180deg, var(--surf-3), var(--surf-2));
  border: 1px solid var(--bd-2);
  border-radius: var(--rad-l);
  z-index: 60;
  padding: 8px;
  gap: 6px;
  backdrop-filter: blur(28px);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,0.5);
}
.dock button {
  flex: 1;
  display: grid; place-items: center;
  border-radius: var(--rad-m);
  background: var(--surf-2);
  color: var(--tx-1);
  border: 1px solid var(--bd-1);
}
.dock__save {
  background: linear-gradient(135deg, var(--acc), var(--acc-3)) !important;
  color: var(--acc-tx) !important;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 13px;
  border: 0 !important;
}

/* ====================================================
   DISCORD LINKED CARD
   ==================================================== */
.discord-card::before { background: #5865f2; opacity: 0.22; }
.discord-link {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  background: var(--surf-2);
  border: 1px solid var(--bd-1);
  border-radius: var(--rad-m);
}
.discord-link__logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #5865f2;
  display: grid; place-items: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 8px 24px -8px rgba(88, 101, 242, 0.55);
}
.discord-link__body { flex: 1; min-width: 0; }
.discord-link__name {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--tx-0);
  letter-spacing: -0.01em;
  flex-wrap: wrap;
}
.discord-link__pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  background: color-mix(in oklab, var(--ok) 18%, transparent);
  color: #86efac;
  border: 1px solid color-mix(in oklab, var(--ok) 35%, transparent);
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.discord-link__pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok);
}
.discord-link__sub { font-family: var(--ff-mono); font-size: 11.5px; color: var(--tx-2); margin-top: 4px; letter-spacing: 0.02em; }
.discord-link__btn {
  padding: 9px 14px;
  background: transparent;
  border: 1px solid var(--bd-2);
  border-radius: 9px;
  color: var(--tx-1);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 180ms, color 180ms, background 180ms;
  flex-shrink: 0;
}
.discord-link__btn:hover { border-color: color-mix(in oklab, var(--danger) 50%, transparent); color: var(--danger); background: color-mix(in oklab, var(--danger) 8%, transparent); }

/* rail discord pill */
.rail__discord {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(88, 101, 242, 0.18);
  border: 1px solid rgba(88, 101, 242, 0.4);
  font-family: var(--ff-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #c7d2fe;
  text-transform: uppercase;
}
.rail__discord svg { width: 10px; height: 10px; }
.rail__tag { flex-wrap: wrap; }

/* ====================================================
   SHAME FAB
   ==================================================== */
.shame-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--shame), #b91c1c);
  color: white;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
  z-index: 55;
  box-shadow: 0 14px 36px -8px color-mix(in oklab, var(--shame) 55%, transparent);
  transition: transform 240ms cubic-bezier(.4,1.6,.5,1), opacity 200ms;
  border: 0;
}
.shame-fab:hover { transform: translateY(-3px); }
.shame-fab i {
  position: absolute; inset: 0; border-radius: 999px;
  border: 2px solid var(--shame);
  animation: shamePulse 2s ease-out infinite;
}
@keyframes shamePulse { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.5); opacity: 0; } }

/* ====================================================
   MODAL
   ==================================================== */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
}
.modal__scrim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
}
.modal__card {
  position: relative;
  padding: 22px;
  border-radius: var(--rad-l);
  min-width: 380px;
  max-width: 520px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--bd-2);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
}
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.modal__head h3 {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  margin: 0;
  color: var(--acc);
  text-transform: uppercase;
}
.kbds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kbds > div {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--surf-2);
  border: 1px solid var(--bd-1);
  border-radius: var(--rad-m);
}
.kbds > div span { font-family: var(--ff-body); font-size: 13px; color: var(--tx-1); }

/* loader */
.loader { display: grid; place-items: center; height: 200px; }
.loader > div {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bd-2);
  border-top-color: var(--acc);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 1340px) {
  :root { --preview-w: 400px; --rail-w: 232px; }
}
@media (max-width: 1200px) {
  :root { --preview-w: 360px; --rail-w: 216px; }
  .crumb { display: none; }
}
@media (max-width: 1080px) {
  /* below this: stack everything vertically, rail becomes drawer, preview becomes drawer */
  body { overflow: auto; }
  .shell {
    position: relative;
    top: 0; left: 0; right: 0; bottom: auto;
    display: block;
    margin: calc(var(--status-h) + var(--topbar-h) + 10px) 10px 90px;
    padding-bottom: 0;
  }
  .rail {
    position: fixed;
    top: calc(var(--status-h) + var(--topbar-h) + 10px);
    bottom: 80px;
    left: 10px;
    width: 280px;
    max-width: calc(100vw - 20px);
    z-index: 30;
    transform: translateX(calc(-100% - 20px));
    transition: transform 280ms cubic-bezier(.6,.05,.2,1);
    box-shadow: 0 24px 60px -12px rgba(0,0,0,0.6);
  }
  body[data-rail-open="true"] .rail { transform: translateX(0); }
  .editor {
    min-height: 60vh;
    margin-bottom: 12px;
  }
  .preview {
    position: fixed;
    top: calc(var(--status-h) + var(--topbar-h) + 10px);
    bottom: 80px;
    right: 10px;
    width: min(440px, calc(100vw - 20px));
    z-index: 30;
    transform: translateX(calc(100% + 20px));
    transition: transform 280ms cubic-bezier(.6,.05,.2,1);
    box-shadow: 0 24px 60px -12px rgba(0,0,0,0.6);
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  body[data-preview-open="true"] .preview { transform: translateX(0); }
  body[data-preview-hidden="true"] .preview { display: flex; }
  .dock { display: flex; }
  .topbar .icon-btn[data-rail-toggle],
  .topbar .icon-btn[data-toggle-preview] { display: none; }
  .topbar .staff { display: none; }
  .status-strip { gap: 6px; padding: 0 8px; overflow-x: auto; }
  .status-strip::-webkit-scrollbar { display: none; }
  .status-strip { scrollbar-width: none; }
  .chip { flex-shrink: 0; }
  /* dim main content when a drawer is open */
  body[data-rail-open="true"]::after,
  body[data-preview-open="true"]::after {
    content: ""; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 25;
    backdrop-filter: blur(2px);
  }
}
@media (max-width: 720px) {
  .editor__scroll { padding: 22px 16px 80px; }
  .tab-hero { grid-template-columns: 48px 1fr; gap: 14px; padding-bottom: 18px; }
  .tab-hero__side { grid-column: 1 / -1; }
  .tab-hero__icon { width: 48px; height: 48px; border-radius: 14px; }
  .tab-hero__icon svg { width: 24px; height: 24px; }
  .tab-hero h2 { font-size: 26px; }
  .card { padding: 16px; }
  .card__head { margin-bottom: 12px; }
  .profile__name { font-size: 38px !important; }
  .profile__avatar { width: 132px !important; height: 132px !important; }
  .profile__avatar-letter { font-size: 68px !important; }
  .profile__sections { grid-template-columns: 1fr !important; margin: 18px 16px 0; }
  .profile__game-stats { grid-template-columns: repeat(2, 1fr) !important; margin: 16px 16px 0 !important; }
  .profile__hero-stats { margin: 18px 16px 0 !important; gap: 8px !important; }
  .profile__hero-stat-card { min-width: 0 !important; }
  .profile__pills { padding: 16px 14px 4px !important; }
  .profile__avatar-wrap { padding: 16px 16px 0 !important; }
  .profile__name-row { padding: 18px 16px 0 !important; }
  .profile__sub-row { padding: 12px 16px 0 !important; font-size: 12px !important; }
  .profile__quote { margin: 14px 16px 0 !important; font-size: 14px !important; }
  .profile__bio { margin: 12px 16px 0 !important; font-size: 13px !important; }
  .profile__music, .profile__share, .profile__estado, .profile__announce { margin-left: 16px !important; margin-right: 16px !important; }
}
@media (max-width: 1080px) {
  .btn-cta kbd { display: none; }
  .btn-cta__inner { padding: 9px 14px; }
}

@media (max-width: 1080px) {
  /* hide SHAME fab on mobile — already accessible from the tabs drawer */
  .shame-fab { display: none; }
}

@media (max-width: 480px) {
  .logo__sub { display: none; }
  .logo__primary { padding-right: 10px; font-size: 14px; }
  .topbar { padding: 0 12px; }
  .btn-cta kbd { display: none; }
  .btn-cta__inner { padding: 8px 12px; }
  .btn-cta { font-size: 12px; }
  .dock__save { font-size: 12px; }
}

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

/* ====================================================
   LIGHT MODE OVERRIDES (editor chrome only — preview keeps its theme)
   Applied when html[data-editor-mode="light"]
   ==================================================== */
html[data-editor-mode="light"] {
  --bg-0: #f3f5fa;
  --bg-1: #ffffff;
  --bg-2: #e9edf5;
  --surf-1: rgba(15,23,42,0.025);
  --surf-2: rgba(15,23,42,0.045);
  --surf-3: rgba(15,23,42,0.075);
  --bd-1: rgba(15,23,42,0.08);
  --bd-2: rgba(15,23,42,0.14);
  --bd-3: rgba(15,23,42,0.22);
  --tx-0: #0b1220;
  --tx-1: #344054;
  --tx-2: #5a677a;
  --tx-3: #94a3b8;
  --grid-c: rgba(15,23,42,0.04);
}
html[data-editor-mode="light"] body {
  background: var(--bg-1);
  color: var(--tx-0);
}
html[data-editor-mode="light"] .bg__noise { opacity: 0.18; mix-blend-mode: multiply; }
html[data-editor-mode="light"] .bg__glow { opacity: 0.22; }
html[data-editor-mode="light"] .status-strip,
html[data-editor-mode="light"] .topbar {
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html[data-editor-mode="light"] .input,
html[data-editor-mode="light"] .textarea,
html[data-editor-mode="light"] .select {
  background: #fff;
  border-color: var(--bd-2);
  color: var(--tx-0);
}
html[data-editor-mode="light"] kbd {
  background: #fff;
  border-color: var(--bd-2);
  color: var(--tx-0);
}
html[data-editor-mode="light"] .preview {
  background: #fff;
  border-color: var(--bd-2);
}
html[data-editor-mode="light"] .toast {
  background: #fff;
  color: var(--tx-0);
}

/* ====================================================
   EXTRA MOBILE REFINEMENTS (<720px)
   ==================================================== */
@media (max-width: 720px) {
  .topbar__right { gap: 4px; }
  .topbar .icon-btn { padding: 6px; }
  .crumb { display: none; }
  .rail { width: 88vw !important; max-width: 320px !important; }
  .editor__scroll { padding: 18px 12px 100px; }
  .card { padding: 14px; border-radius: 14px; }
  .field label { font-size: 10px; }
  .input, .textarea, .select { font-size: 16px; padding: 11px 12px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr !important; gap: 10px !important; }
  .tab-hero h2 { font-size: 24px; line-height: 1.15; }
  .tab-hero p { font-size: 12.5px; }
  .drag-row { padding: 9px; gap: 6px; }
  .drag-row__del, .add-row { min-height: 40px; }
  .modal__card { width: calc(100vw - 24px); max-width: 480px; padding: 20px; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .plat-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .kbds { grid-template-columns: 1fr; }
  .dock { padding: 8px 10px; }
  .dock button { font-size: 12px; }
}

/* lang switcher in topbar */
.lang-switch {
  display: inline-flex;
  background: var(--surf-2);
  border: 1px solid var(--bd-2);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--ff-mono);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.lang-switch button {
  padding: 6px 8px;
  color: var(--tx-2);
  text-transform: uppercase;
  transition: color 140ms, background 140ms;
}
.lang-switch button.is-on {
  background: var(--acc);
  color: var(--acc-tx);
}
.lang-switch button:hover:not(.is-on) {
  color: var(--tx-0);
  background: var(--surf-3);
}

/* mode switch (light/dark) */
.mode-switch {
  display: inline-flex;
  align-items: center;
  background: var(--surf-2);
  border: 1px solid var(--bd-2);
  border-radius: 999px;
  padding: 2px;
  cursor: pointer;
}
.mode-switch i {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 999px;
  font-style: normal; font-size: 12px;
  color: var(--tx-2);
  transition: background 140ms, color 140ms;
}
.mode-switch i.is-on {
  background: var(--acc);
  color: var(--acc-tx);
}

/* iframe preview frame */
.preview__iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

/* ============================================================
   V76 — Topbar coherente con inicio + menos desorden visual
   ============================================================ */
/* Quitar el status-strip (EN VIVO / REC / fecha / región / CONECTADO)
   que el user marcó como desorden visual. */
.status-strip { display: none !important; }

/* Topbar como barra glass limpia tipo inicio */
.topbar {
  height: 60px !important;
  padding: 0 22px !important;
  background: linear-gradient(180deg, rgba(8,10,18,.92), rgba(8,10,18,.65)) !important;
  backdrop-filter: blur(22px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
  border-bottom: 1px solid var(--bd-1, rgba(255,255,255,.07)) !important;
  top: 0 !important;
}
/* Logo wordmark horizontal tipo inicio (ONE WAY en una línea) */
.topbar .logo { display: flex !important; align-items: center !important; gap: 8px !important; }
.topbar .logo__primary {
  font: 800 15px/1 'Inter', sans-serif !important;
  letter-spacing: .22em !important;
  color: var(--acc, #22d3ee) !important;
  white-space: nowrap !important;
}
.topbar .logo__primary br { display: none !important; }
.topbar .logo__sub {
  font: 500 10px/1 'JetBrains Mono', monospace !important;
  letter-spacing: .14em !important;
  color: var(--tx-2, #6a778e) !important;
}
/* Breadcrumb más sutil */
.crumb { opacity: .85; }
.crumb__edit {
  background: var(--acc-soft, rgba(34,211,238,.12));
  color: var(--acc, #22d3ee);
  padding: 2px 7px; border-radius: 6px;
  font-weight: 700; font-size: 10px; letter-spacing: .14em;
}
/* Controles de la derecha: agrupados, menos ruido */
.topbar__right { gap: 8px !important; align-items: center !important; }
.icon-btn {
  width: 36px !important; height: 36px !important;
  border-radius: 10px !important;
  border: 1px solid var(--bd-1, rgba(255,255,255,.07)) !important;
  background: var(--surf-1, rgba(255,255,255,.025)) !important;
  color: var(--tx-1, #a6b3c8) !important;
  transition: .15s !important;
}
.icon-btn:hover { color: #fff !important; border-color: var(--bd-3, rgba(255,255,255,.22)) !important; background: var(--surf-2, rgba(255,255,255,.05)) !important; }
.btn-cta {
  border-radius: 10px !important;
  background: linear-gradient(135deg, var(--acc, #22d3ee), var(--acc-3, #0891b2)) !important;
  color: var(--acc-tx, #02141a) !important;
  font-weight: 800 !important;
}
.btn-cta[disabled] { opacity: .45 !important; }
@media (max-width: 720px) {
  .topbar .logo__sub { display: none !important; }
  .crumb { display: none !important; }
}

/* ============================================================
   V76g — FIX DEFINITIVO contaminación visual del editor.
   Hidden la status-strip dejó --status-h con valor fantasma; y a <=1080
   los drawers se mostraban superpuestos. Forzamos layout limpio.
   ============================================================ */
:root { --status-h: 0px !important; }
.shell { top: calc(var(--topbar-h) + 12px) !important; }

@media (max-width: 1080px) {
  /* Shell pasa a una sola columna: SOLO el editor central ocupa el ancho */
  html body .shell {
    position: fixed !important;
    top: calc(var(--topbar-h) + 12px) !important;
    left: 0 !important; right: 0 !important; bottom: 0 !important;
    display: block !important;
    grid-template-columns: none !important;
    margin: 0 !important;
    padding: 0 10px 86px !important;
    overflow: auto !important;
  }
  html body .editor {
    width: 100% !important;
    margin: 0 !important;
  }
  /* Rail = drawer izquierda, OFF-SCREEN salvo data-rail-open */
  html body .rail {
    position: fixed !important;
    top: calc(var(--topbar-h) + 12px) !important;
    bottom: 78px !important;
    left: 10px !important;
    width: min(300px, calc(100vw - 20px)) !important;
    z-index: 70 !important;
    transform: translateX(calc(-100% - 24px)) !important;
    opacity: 1 !important;
    transition: transform 280ms cubic-bezier(.6,.05,.2,1) !important;
    box-shadow: 0 24px 60px -12px rgba(0,0,0,0.65) !important;
  }
  html body[data-rail-open="true"] .rail { transform: translateX(0) !important; }
  /* Preview = drawer derecha, OFF-SCREEN salvo data-preview-open */
  html body .preview {
    position: fixed !important;
    top: calc(var(--topbar-h) + 12px) !important;
    bottom: 78px !important;
    right: 10px !important;
    left: auto !important;
    width: min(440px, calc(100vw - 20px)) !important;
    z-index: 70 !important;
    transform: translateX(calc(100% + 24px)) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: transform 280ms cubic-bezier(.6,.05,.2,1) !important;
    box-shadow: 0 24px 60px -12px rgba(0,0,0,0.65) !important;
    display: flex !important;
  }
  html body[data-preview-open="true"] .preview { transform: translateX(0) !important; }
  /* Dock visible */
  html body .dock { display: flex !important; }
  /* Scrim cuando hay un drawer abierto */
  html body[data-rail-open="true"]::after,
  html body[data-preview-open="true"]::after {
    content: ""; position: fixed; inset: 0;
    background: rgba(0,0,0,0.55); z-index: 65;
    backdrop-filter: blur(2px);
  }
}

/* Desktop (>1080): dock SIEMPRE oculto, grid de 3 columnas normal */
@media (min-width: 1081px) {
  html body .dock { display: none !important; }
  html body .rail { transform: none !important; position: relative !important; }
  html body .preview { transform: none !important; position: relative !important; }
  html body .shell { display: grid !important; }
}

/* V76g — icono OneWay en el logo del topbar del editor */
.topbar .logo { position: relative; }
.topbar .logo::before {
  content: "";
  width: 30px; height: 30px; border-radius: 9px;
  background: url('https://cdn.discordapp.com/icons/1417173139778965692/5cf54bab9936a51f79915c777915865f.webp?size=128') center/cover no-repeat;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,.10), 0 4px 12px -4px rgba(0,0,0,.6);
}

/* ============================================================
   V76h — Topbar = navbar compartida (igual que /u/:slug)
   ============================================================ */
/* Ocultar la topbar custom y la status-strip: ahora usamos oneway-navbar */
html body .topbar { display: none !important; }
html body .status-strip { display: none !important; }
#ow-nav-root { position: sticky; top: 0; z-index: 100; }

/* El shell + drawers arrancan debajo de la navbar (72px) */
:root { --topbar-h: 72px !important; }
html body .shell { top: calc(var(--ow-nav-height, 72px) + 10px) !important; }
@media (max-width: 1080px){
  html body .shell { top: calc(var(--ow-nav-height, 72px) + 10px) !important; }
  html body .rail   { top: calc(var(--ow-nav-height, 72px) + 10px) !important; }
  html body .preview{ top: calc(var(--ow-nav-height, 72px) + 10px) !important; }
}

/* Dock visible en TODOS los tamaños (tiene GUARDAR + toggles, ya wired).
   En desktop lo centramos como pill. */
html body .dock { display: flex !important; }
@media (min-width: 1081px){
  html body .dock {
    left: 50% !important; right: auto !important;
    transform: translateX(-50%);
    width: min(540px, calc(100vw - 40px)) !important;
  }
}

/* Scrim del drawer SIN blur — el user: "se difumina todo" */
html body[data-rail-open="true"]::after,
html body[data-preview-open="true"]::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(0,0,0,0.45) !important;
}

/* ============================================================
   V76k — SIN scrim al abrir drawers. El user no quiere que se oscurezca/
   difumine el resto. El drawer entra con su sombra; cerrar-al-click-afuera
   sigue funcionando (lo maneja el JS). Matamos el ::after por completo.
   ============================================================ */
html body[data-rail-open="true"]::after,
html body[data-preview-open="true"]::after {
  display: none !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  content: none !important;
}

/* ============================================================
   V76q — Preview simétrico + el dock/botones no tapan la UI
   ============================================================ */
/* El preview escalado se centra (flex + origin top-center). Damos respiro
   abajo para que el music player del preview no quede tapado por el dock. */
html body .preview__frame {
  padding: 16px 16px 96px !important;
  align-items: flex-start !important;
  justify-content: center !important;
}
/* El editor central también deja espacio abajo para el dock flotante */
html body .editor__scroll { padding-bottom: 110px !important; }

/* SHAME fab por ENCIMA del dock, sin pisar el preview ni el botón guardar */
html body .shame-fab {
  bottom: 84px !important;
  right: 18px !important;
  z-index: 58 !important;
}

/* Dock: que no toque los bordes y quede claramente separado del contenido */
@media (min-width: 1081px){
  html body .dock {
    bottom: 14px !important;
    box-shadow: 0 -8px 30px -10px rgba(0,0,0,0.6), 0 16px 40px -12px rgba(0,0,0,0.55) !important;
  }
}

/* V76r — más respiro abajo para que el dock GUARDAR nunca tape la última card */
html body .editor__scroll { padding-bottom: 140px !important; }
html body .preview__frame { padding-bottom: 110px !important; }

/* ============================================================
   V76v — TV / ultrawide: centrar y capar el ancho del editor para que
   los campos no se estiren feo en pantallas muy anchas (>1700px).
   ============================================================ */
@media (min-width: 1700px) {
  html body .editor__scroll > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
  :root { --preview-w: 560px; }
}
@media (min-width: 2200px) {
  html body .editor__scroll > * { max-width: 1180px; }
  :root { --preview-w: 640px; --rail-w: 300px; }
}
/* Phones chicos (<400px): el dock 3-botones no se aprieta */
@media (max-width: 400px) {
  html body .dock { gap: 4px !important; padding: 6px !important; }
  html body .dock__save { font-size: 11px !important; }
}

/* ============================================================
   V76w — FIX REAL del overlap del dock (verificado con browser headless).
   A <=1080 la SHELL es el contenedor que scrollea (display:block; overflow:auto)
   pero el padding-bottom estaba en .editor__scroll → no servía (scroll anidado).
   Hacemos UN solo scroll (la shell) con padding-bottom suficiente, y
   desactivamos el scroll/padding interno del editor.
   ============================================================ */
@media (max-width: 1080px) {
  html body .shell {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 120px !important;  /* dock ~58 + 12 + aire */
  }
  html body .editor {
    height: auto !important;
    min-height: 0 !important;
  }
  html body .editor__scroll {
    height: auto !important;
    overflow: visible !important;
    padding: 16px 14px 24px !important;  /* sin scroll anidado; la shell scrollea */
  }
}

/* SHAME fab: que NUNCA tape el dock ni el preview. Lo anclamos arriba-derecha
   del área del editor, no abajo-derecha (donde está el preview + dock). */
html body .shame-fab {
  bottom: auto !important;
  top: calc(var(--ow-nav-height, 72px) + 18px) !important;
  right: 18px !important;
  z-index: 56 !important;
}
@media (min-width: 1081px) {
  /* en desktop el preview ocupa la derecha → mandamos el SHAME al borde derecho
     del editor central (a la izquierda del preview) para no taparlo */
  html body .shame-fab {
    top: auto !important;
    bottom: 84px !important;
    right: calc(var(--preview-w, 480px) + 28px) !important;
  }
}

/* ============================================================
   V76x — Dock OPACO (antes era surf-3/surf-2 ~5-8% alpha → el contenido se
   veía a través y parecía que se solapaba) + quitar el SHAME fab flotante
   (redundante: ya hay tab "HALL OF SHAME" en el rail, y flotando tapaba todo).
   ============================================================ */
html body .dock {
  background: #0c0f17 !important;           /* sólido, tapa el contenido que pasa por debajo */
  border: 1px solid var(--bd-2, rgba(255,255,255,0.12)) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 -2px 0 rgba(0,0,0,0.4), 0 18px 50px -12px rgba(0,0,0,0.75) !important;
}
html[data-editor-mode="light"] body .dock,
html[data-theme="light"] body .dock { background: #ffffff !important; border-color: rgba(0,0,0,0.12) !important; }

/* SHAME fab fuera — el acceso a Hall of Shame está en el rail (tab staff) */
html body .shame-fab { display: none !important; }

/* ============================================================
   V76y — Dock alineado a la COLUMNA del editor (no pill centrado).
   El pill centrado dejaba ver chips a sus costados → parecía solaparse.
   Ahora el dock cubre exactamente el ancho de la columna central (entre rail
   y preview), sólido, así el contenido pasa por debajo totalmente tapado.
   Shell: position:fixed; left:10 right:10; grid gap:10; rail-w | 1fr | preview-w.
   ============================================================ */
@media (min-width: 1081px) {
  html body .dock {
    left: calc(10px + var(--rail-w, 252px) + 12px) !important;
    right: calc(10px + var(--preview-w, 480px) + 12px) !important;
    width: auto !important;
    transform: none !important;
    bottom: 14px !important;
    justify-content: center !important;
  }
  /* cuando el rail está oculto, el editor ocupa su lugar */
  html body[data-rail-hidden="true"] .dock { left: 12px !important; }
  html body[data-preview-hidden="true"] .dock { right: 12px !important; }
}

/* ============================================================
   V76z — Dock como FOOTER in-flow del editor (desktop). El JS lo mueve dentro
   de .editor; acá lo sacamos de fixed y lo hacemos parte del flujo, así el
   contenido scrollea SOLO arriba y NUNCA pasa por debajo del dock.
   ============================================================ */
@media (min-width: 1081px) {
  html body .editor { display: flex !important; flex-direction: column !important; overflow: hidden !important; }
  html body .editor__scroll { flex: 1 1 auto !important; min-height: 0 !important; height: auto !important; padding-bottom: 24px !important; }
  html body .dock[data-docked="footer"] {
    position: relative !important;
    left: auto !important; right: auto !important; bottom: auto !important;
    width: auto !important; transform: none !important; margin: 0 !important;
    flex: 0 0 auto !important;
    border-radius: 0 0 var(--rad-l) var(--rad-l) !important;
    border-left: 0 !important; border-right: 0 !important; border-bottom: 0 !important;
    box-shadow: 0 -1px 0 var(--bd-2, rgba(255,255,255,0.12)) !important;
    z-index: 5 !important;
  }
}
