/* ---- /css/elabs-help.css ---- */
/* L11 Support & Help R1-lite. Tokens follow css/el-unified.css (with fallbacks for pages that don't load it). */
.elh-launch,.elh-panel,.elh-scrim{--elh-bg:var(--el-bg2,#111118);--elh-bg3:var(--el-bg3,#16161f);--elh-border:var(--el-border2,#2a2a3e);--elh-text:var(--el-text,#e8e8f0);--elh-muted:#a9a9c4;--elh-accent:var(--el-accent,#6c63ff);--elh-cyan:var(--el-cyan,#38bdf8);font-family:inherit}
.elh-launch[hidden],.elh-panel[hidden],.elh-scrim[hidden],.elh-panel [hidden]{display:none!important}
.elh-launch{position:fixed;right:20px;bottom:calc(20px + env(safe-area-inset-bottom,0px) + var(--elh-extra,0px));z-index:8990;display:inline-flex;align-items:center;gap:8px;height:44px;min-width:44px;padding:0 16px 0 6px;border-radius:22px;border:1px solid var(--elh-border);background:var(--elh-bg3);color:var(--elh-text);font-size:15px;font-weight:600;cursor:pointer;box-shadow:0 6px 24px rgba(0,0,0,.45)}
.elh-launch:hover{background:#1d1d2a}
.elh-q{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--elh-accent);color:#fff;font-weight:700}
.elh-launch:focus-visible,.elh-panel :focus-visible,.elh-copilot-help:focus-visible{outline:2px solid var(--elh-cyan);outline-offset:2px}
.elh-scrim{position:fixed;inset:0;z-index:8991;background:rgba(0,0,0,.35)}
.elh-panel{position:fixed;right:20px;bottom:76px;z-index:8992;width:380px;max-width:calc(100vw - 24px);max-height:min(640px,calc(100vh - 120px));display:flex;flex-direction:column;background:var(--elh-bg);color:var(--elh-text);border:1px solid var(--elh-border);border-radius:16px;box-shadow:0 18px 60px rgba(0,0,0,.6);font-size:14px;line-height:1.45}
.elh-head{display:flex;align-items:center;gap:8px;padding:12px 12px 10px 16px;border-bottom:1px solid var(--elh-border)}
.elh-title{flex:1;margin:0;font-size:16px;font-weight:700;outline:none}
.elh-panel .elh-title:focus,.elh-panel .elh-title:focus-visible{outline:none}
.elh-back,.elh-close{min-width:44px;min-height:44px;border:0;background:transparent;color:var(--elh-text);cursor:pointer;border-radius:10px;font-size:15px}
.elh-close{font-size:24px;line-height:1}
.elh-back{color:var(--elh-cyan);min-width:auto;padding:0 8px}
.elh-back:hover,.elh-close:hover{background:rgba(255,255,255,.07)}
.elh-body{overflow-y:auto;padding:14px 16px 16px;overscroll-behavior:contain}
.elh-entries{display:flex;flex-direction:column;gap:8px}
.elh-entry{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 12px;text-align:left;border:1px solid var(--elh-border);border-radius:12px;background:var(--elh-bg3);color:var(--elh-text);cursor:pointer;font:inherit}
.elh-entry:hover{border-color:var(--elh-accent)}
.elh-ico{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:10px;background:rgba(108,99,255,.18);color:#c8c4ff;font-weight:700}
.elh-entry-text{flex:1;display:flex;flex-direction:column}
.elh-entry-text small,.elh-article small{color:var(--elh-muted);font-size:13px}
.elh-chev{color:var(--elh-muted);font-size:20px}
.elh-note{margin:0 0 12px;padding:10px 12px;border-radius:10px;background:rgba(56,189,248,.1);color:var(--elh-text)}
.elh-intro{margin:0 0 12px;color:var(--elh-text)}
.elh-foot{margin:14px 0 0;color:var(--elh-muted);font-size:13px}
.elh-panel a{color:var(--elh-cyan)}
.elh-link-btn{border:0;background:none;padding:0;color:var(--elh-cyan);text-decoration:underline;cursor:pointer;font:inherit}
.elh-articles{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.elh-article{display:flex;flex-direction:column;padding:10px 12px;border-radius:10px;border:1px solid var(--elh-border);text-decoration:none;color:var(--elh-text)!important}
.elh-article:hover{border-color:var(--elh-accent)}
.elh-field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}
.elh-field>label{font-weight:600}
.elh-input{width:100%;box-sizing:border-box;min-height:44px;padding:10px 12px;border-radius:10px;border:1px solid var(--elh-border);background:#0c0c13;color:var(--elh-text);font:inherit}
.elh-textarea{min-height:110px;resize:vertical}
.elh-input[aria-invalid="true"]{border-color:#ff7a7a}
.elh-hint{margin:0;color:var(--elh-muted);font-size:12.5px}
.elh-err{margin:0;color:#ff9c9c;font-size:13px}
.elh-err-summary,.elh-alert{margin:0 0 12px;padding:10px 12px;border-radius:10px;background:rgba(255,90,90,.12);border:1px solid rgba(255,120,120,.35);color:#ffd2d2;outline:none}
.elh-chk{display:flex;gap:10px;align-items:flex-start;font-weight:400!important;cursor:pointer}
.elh-chk input{width:20px;height:20px;margin-top:1px;flex:none;accent-color:var(--elh-accent)}
.elh-consent{display:flex;flex-direction:column;gap:8px;margin:-4px 0 12px}
.elh-sends{margin:0 0 12px;padding:8px 10px;border-radius:8px;background:var(--elh-bg3);color:var(--elh-muted);font-size:13px}
.elh-turnstile{min-height:66px;margin-bottom:12px}
.elh-primary,.elh-secondary{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin-top:8px;border-radius:10px;font:inherit;font-weight:700;cursor:pointer;text-decoration:none;box-sizing:border-box}
.elh-primary{border:0;background:var(--elh-accent);color:#fff}
.elh-primary:disabled{opacity:.6;cursor:progress}
.elh-secondary{border:1px solid var(--elh-border);background:transparent;color:var(--elh-text)!important}
.elh-ok{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:rgba(56,189,248,.15);color:var(--elh-cyan);font-size:24px;margin:4px 0 10px}
.elh-ref-label{margin:0;color:var(--elh-muted);font-size:13px}
.elh-ref{margin:2px 0 10px;font:700 22px ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--elh-cyan);letter-spacing:.04em}
.elh-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.elh-copilot-help{margin-left:auto;min-height:36px;padding:0 12px;border-radius:9px;border:1px solid var(--el-border2,#2a2a3e);background:transparent;color:inherit;font:inherit;font-weight:600;cursor:pointer}
@media (max-width:640px){
  .elh-launch{right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px) + var(--elh-extra,0px));padding:0;width:48px;height:48px;justify-content:center}
  .elh-launch .elh-launch-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .elh-launch.elh-studio{bottom:calc(76px + env(safe-area-inset-bottom,0px))}
  .elh-scrim{background:rgba(0,0,0,.55)}
  .elh-panel{left:0;right:0;bottom:0;width:auto;max-width:none;max-height:88dvh;border-radius:18px 18px 0 0;border-bottom:0;padding-bottom:env(safe-area-inset-bottom,0px)}
  .elh-panel:before{content:"";display:block;width:40px;height:4px;border-radius:2px;background:var(--elh-border);margin:8px auto 0}
}
@media (prefers-reduced-motion:no-preference){.elh-panel:not([hidden]){animation:elh-in .16s ease-out}@keyframes elh-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}}

/* ---- /css/model-promotion.css ---- */
/* E-Labs model promotion pills (elabs-model-promotion/1). Shared by header, Studio and Copilot.
   Markup comes only from ELabsModelPromotion.pillHtml()/pillElement(): icon + visible text label + aria-label,
   so colour is never the only signal. Contrast (WCAG 2.x, recorded in
   cloudflare/production-cutover/evidence/pu-shared-model-promotion-contract/contrast.json):
   label on fill >= 4.5:1 at every gradient stop; fill >= 3:1 against every dark E-Labs panel. */
:root {
  --elabs-promo-new-bg: #a3e635;            /* bright lime */
  --elabs-promo-new-bg-2: #a3e635;
  --elabs-promo-new-fg: #0f1a00;
  --elabs-promo-new-ring: #d9f99d;
  --elabs-promo-top-bg: #fb923c;            /* copilot-top-r1: orange (owner 2026-11-11), was yellow->orange */
  --elabs-promo-top-bg-2: #f97316;          /* deeper orange; #1f1200 label = 8.11:1 / 6.54:1 */
  --elabs-promo-top-fg: #1f1200;
  --elabs-promo-top-ring: #fdba74;
  --elabs-promo-recommended-bg: #c4b5fd;    /* E-Labs violet */
  --elabs-promo-recommended-bg-2: #67e8f9;  /* to cyan */
  --elabs-promo-recommended-fg: #140a33;
  --elabs-promo-recommended-ring: #ddd6fe;
}

.elabs-promo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px 2px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;            /* badge-pro-r93: design-system floor (--ds-fs-xs); was .66rem (~9.9-10.6px) */
  font-weight: 800;
  line-height: 16px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  vertical-align: middle;
  -webkit-user-select: none;
  user-select: none;
}
.elabs-promo__icon { flex: none; width: 12px; height: 12px; }
.elabs-promo__label { display: inline; }

.elabs-promo--new {
  color: var(--elabs-promo-new-fg);
  background: linear-gradient(90deg, var(--elabs-promo-new-bg), var(--elabs-promo-new-bg-2));
  border-color: var(--elabs-promo-new-ring);
}
.elabs-promo--top {
  color: var(--elabs-promo-top-fg);
  background: linear-gradient(90deg, var(--elabs-promo-top-bg), var(--elabs-promo-top-bg-2));
  border-color: var(--elabs-promo-top-ring);
}
.elabs-promo--recommended {
  color: var(--elabs-promo-recommended-fg);
  background: linear-gradient(90deg, var(--elabs-promo-recommended-bg), var(--elabs-promo-recommended-bg-2));
  border-color: var(--elabs-promo-recommended-ring);
}

/* Windows High Contrast / forced colours: keep a visible outline; text + icon carry the meaning. */
@media (forced-colors: active) {
  .elabs-promo { background: Canvas; color: CanvasText; border-color: CanvasText; }
}
@media print {
  .elabs-promo { background: none; color: #000; border-color: #000; }
}

/* ---- /css/model-icon.css ---- */
/* E-Labs shared model icon (elabs-model-icon/1) — paired with /js/elabs-model-icon.js.
   Tile = Studio model chooser mark (#16151b, no border, radius 10, white mono artwork, object-fit contain).
   Letter fallback = deterministic tint from the identity hash (never row position). */
.elabs-model-icon{
  --elabs-model-icon-size:38px;--elabs-model-icon-glyph:24px;--elabs-model-icon-radius:10px;--elabs-model-icon-font:16px;
  --elabs-model-icon-bg:#16151b;--elabs-model-icon-fg:#fff;
  box-sizing:border-box;position:relative;flex:0 0 var(--elabs-model-icon-size);
  width:var(--elabs-model-icon-size);height:var(--elabs-model-icon-size);min-width:var(--elabs-model-icon-size);
  display:grid;place-items:center;margin:0;padding:0;border:0;border-radius:var(--elabs-model-icon-radius);
  background:var(--elabs-model-icon-bg);color:var(--elabs-model-icon-fg);overflow:hidden;
  font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;font-size:var(--elabs-model-icon-font);
  font-style:normal;font-weight:800;line-height:1;letter-spacing:0;text-transform:none;text-align:center;
  vertical-align:middle;-webkit-user-select:none;user-select:none
}
.elabs-model-icon--sm{--elabs-model-icon-size:34px;--elabs-model-icon-glyph:24px;--elabs-model-icon-radius:9px;--elabs-model-icon-font:15px}
/* md = menu rows on Header + Studio sidebar. Own layer => snapped to whole device pixels, so the same artwork rasterises
   identically in both menus whatever their fractional row offsets (measured: up to 205-level glyph deltas without it).
   sm/lg keep Studio's exact previous chip/chooser raster (pixel-identical before/after). */
.elabs-model-icon--md{--elabs-model-icon-size:38px;--elabs-model-icon-glyph:24px;--elabs-model-icon-radius:10px;--elabs-model-icon-font:16px;will-change:transform}
.elabs-model-icon--lg{--elabs-model-icon-size:42px;--elabs-model-icon-glyph:26px;--elabs-model-icon-radius:10px;--elabs-model-icon-font:17px}
.elabs-model-icon[hidden]{display:none}
.elabs-model-icon>.elabs-model-icon__img{display:block;width:var(--elabs-model-icon-glyph);height:var(--elabs-model-icon-glyph);
  max-width:none;margin:0;padding:0;border:0;border-radius:0;object-fit:contain;filter:none;background:none}
.elabs-model-icon[data-icon-kind="letter"]{color:var(--elabs-model-icon-tint,#6c63ff)}
/* Letter-tile tint palette (= ELabsModelIcon.TINTS, same order). Classes, never style attributes: CSP-safe on /chat. */
.elabs-model-icon.elabs-mi-t0{--elabs-model-icon-tint:#6c63ff}.elabs-model-icon.elabs-mi-t1{--elabs-model-icon-tint:#f472b6}
.elabs-model-icon.elabs-mi-t2{--elabs-model-icon-tint:#38bdf8}.elabs-model-icon.elabs-mi-t3{--elabs-model-icon-tint:#34d399}
.elabs-model-icon.elabs-mi-t4{--elabs-model-icon-tint:#fb923c}.elabs-model-icon.elabs-mi-t5{--elabs-model-icon-tint:#a78bfa}
.elabs-model-icon.elabs-mi-t6{--elabs-model-icon-tint:#facc15}
.elabs-model-icon[data-icon-kind="letter"]::before{content:attr(data-letter)}

/* ---- /css/studio-attachment-chips.css ---- */
/* Studio prompt-area attachments: tiny rounded thumbnail, remove X on hover/focus. */
.att-chips{list-style:none;margin:8px 0;padding:0;display:flex;flex-wrap:wrap;gap:8px;max-width:100%}
.att-chips:empty{display:none}
.att-chip{position:relative;width:44px;height:44px;flex:0 0 44px;border-radius:10px;overflow:visible;background:#201b28;border:1px solid rgba(255,255,255,.14)}
.att-chip__thumb{display:block;width:100%;height:100%;border-radius:9px;object-fit:cover;background:#14111b;pointer-events:none}
.att-chip__icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:9px;color:var(--muted,#b9b2c6);background:#14111b}
.att-chip__icon svg{width:22px;height:22px}
.att-chip__x{position:absolute;top:-6px;right:-6px;width:24px;height:24px;min-width:24px;padding:0;border-radius:50%;border:1px solid rgba(255,255,255,.55);background:rgba(10,8,16,.92);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .12s}
.att-chip__x svg{width:12px;height:12px;pointer-events:none}
.att-chip:hover .att-chip__x,.att-chip:focus-within .att-chip__x,.att-chip__x:focus-visible{opacity:1}
.att-chip__x:focus-visible{outline:2px solid #ec83ff;outline-offset:2px}
@media (hover:none),(pointer:coarse),(max-width:640px){.att-chip__x{opacity:1}}
.att-tip{position:fixed;z-index:100000;max-width:260px;padding:5px 9px;border-radius:7px;background:#0b0911;color:#f3eefc;border:1px solid rgba(255,255,255,.25);font-size:.76rem;line-height:1.3;overflow-wrap:anywhere;pointer-events:none;box-shadow:0 4px 14px rgba(0,0,0,.45)}
.att-tip[hidden]{display:none}
/* Original large project-asset preview stays in the DOM (handoff logic owns it) but is no longer shown. */
#studioProjectAssetPreview.att-compact{padding:0;margin:0;background:none;border:0;box-shadow:none}
#studioProjectAssetPreview.att-compact>.wcard-title,
#studioProjectAssetPreview.att-compact>#studioProjectAssetPreviewState,
#studioProjectAssetPreview.att-compact>#studioProjectAssetPreviewImage,
#studioProjectAssetPreview.att-compact>#studioProjectAssetPreviewVideo,
#studioProjectAssetPreview.att-compact>#studioProjectAssetPreviewAudio{position:absolute!important;width:1px!important;height:1px!important;max-height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;margin:-1px!important;padding:0!important;border:0!important;white-space:nowrap}
#studioProjectAssetPreview.att-compact>#studioProjectAssetPreviewError:empty{display:none}
/* Upload file-name text is replaced by the chip. */
#dzImgF,#dzVoiceF{display:none!important}

/* ---- /css/studio-signedout-draft.css ---- */
/* signedout-studio-r1 (r2): while signed out, account-only controls inside the (now visible) Studio form are replaced by a
   plain sign-in hint. Each card keeps its own tool-specific visibility (inline display:none stays hidden). */
html.studio-signed-out #studioProjectPickerRow, html.studio-signed-out .soa-refnote { display: none !important; }
html.studio-signed-out #fImage, html.studio-signed-out #fVoice, html.studio-signed-out #fAvatar { display: none !important; }
.studio-so-hint { display: none; color: var(--muted, #9a9aa8); font-size: .86rem; line-height: 1.45; }
html.studio-signed-out #fImage:not([style*="none"]) + .studio-so-hint,
html.studio-signed-out #fVoice:not([style*="none"]) + .studio-so-hint,
html.studio-signed-out #fAvatar:not([style*="none"]) + .studio-so-hint { display: block; }
.studio-signedout-reassure { margin: 6px 2px 0; color: var(--muted, #9a9aa8); font-size: .78rem; line-height: 1.4; text-align: center; flex-basis: 100%; }
.studio-draft-restored { position: relative; border-left: 3px solid var(--accent, #6c63ff); font-size: .84rem; line-height: 1.45; padding-right: 52px; margin-bottom: 10px; }
.studio-draft-restored button { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; background: none; border: 0; color: inherit; cursor: pointer; border-radius: 8px; font-size: 1.2rem; }

/* ---- /css/el-unified.css ---- */
/**
 * el-unified.css — Unified E-Labs Header & Footer
 * ================================================
 * Include on every www page:
 *   <link rel="stylesheet" href="/css/el-unified.css">
 *
 * Then paste the canonical header/footer HTML blocks and call:
 *   ELabsAuth.bindNav({ loginBtnId:'elHeaderSignIn', acctDropId:'elHeaderAcctDrop',
 *                        acctNameId:'elHeaderAcctName', logoutBtnId:'elHeaderLogout',
 *                        onLogin: <fn> })
 */

/* ── Shared token fallbacks (safe to re-declare — same values as all pages) ── */
:root {
  --el-bg:      #0a0a0f;
  --el-bg2:     #111118;
  --el-bg3:     #16161f;
  --el-border:  #1e1e2e;
  --el-border2: #2a2a3e;
  --el-text:    #e8e8f0;
  --el-muted:   #8888a8;
  --el-accent:  #6c63ff;
  --el-cyan:    #38bdf8;
}

/* ══════════════════════════════════════════════════
   UNIFIED HEADER
   ══════════════════════════════════════════════════ */
.el-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9000;
  background: rgba(5,5,16,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(108,99,255,0.13);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 65px;
  min-height: 65px;
  gap: 1rem;
  box-sizing: border-box;
}

/* Brand / logo */
.el-brand {
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
  color: var(--el-text, #e8e8f0);
}

.el-brand-logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: min(38vw, 240px);
  object-fit: contain;
  filter: drop-shadow(0 1px 10px rgba(56, 189, 248, 0.14));
}

.el-brand-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.el-brand-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.el-brand-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6c63ff, #38bdf8);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 900; color: #fff;
  box-shadow: 0 0 16px rgba(108,99,255,0.4);
  flex-shrink: 0;
}
.el-brand-name span:first-child { color: var(--el-text, #e8e8f0); }
.el-brand-ai { color: var(--el-accent, #6c63ff); }

/* ── Preview Brand (E-Labs AI with particles & tagline) ── */
.el-header { overflow: hidden !important; }
.el-brand.preview-brand {
  gap: 10px !important; min-width: 0 !important; align-items: center !important;
  flex-direction: row !important; display: flex !important; font-size: auto !important;
}
.preview-brand-mark {
  display: inline-flex !important; align-items: center !important; gap: 12px !important;
  width: min(36vw, 410px) !important; min-width: 0 !important;
  flex: 0 0 auto !important;
}
.preview-brand-e-wrap { position: relative; width: 34px; height: 54px; flex: 0 0 auto; }
.preview-brand-e {
  position: absolute; right: 0; top: 50%; transform: translateY(-54%);
  font-size: 70px; line-height: 0.82; font-weight: 900;
  letter-spacing: -0.08em;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  background: linear-gradient(180deg, #55dfff 0%, #279fff 44%, #244cf2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 18px rgba(46, 162, 255, 0.18);
}
.preview-brand-particles {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; pointer-events: none;
}
.preview-brand-particles::before, .preview-brand-particles::after {
  content: ""; position: absolute; inset: 0; background-repeat: no-repeat;
}
.preview-brand-particles::before {
  background-image:
    radial-gradient(circle, rgba(80,211,255,0.98) 0 2px, transparent 2.5px),
    radial-gradient(circle, rgba(57,166,255,0.98) 0 2px, transparent 2.5px),
    radial-gradient(circle, rgba(57,166,255,0.92) 0 1.7px, transparent 2.2px),
    radial-gradient(circle, rgba(112,224,255,0.9) 0 1.6px, transparent 2px),
    radial-gradient(circle, rgba(46,162,255,0.85) 0 1.4px, transparent 1.8px),
    radial-gradient(circle, rgba(46,162,255,0.82) 0 1.4px, transparent 1.8px),
    radial-gradient(circle, rgba(46,162,255,0.74) 0 1.3px, transparent 1.8px);
  background-size: 6px 6px, 6px 6px, 5px 5px, 5px 5px, 4px 4px, 4px 4px, 4px 4px;
  background-position: 2px 15px, 8px 7px, 12px 21px, 17px 12px, 21px 4px, 23px 18px, 26px 28px;
}
.preview-brand-particles::after {
  background-image:
    linear-gradient(90deg, rgba(62,183,255,0.95), rgba(62,183,255,0.95)),
    linear-gradient(90deg, rgba(62,183,255,0.86), rgba(62,183,255,0.86)),
    linear-gradient(90deg, rgba(62,183,255,0.78), rgba(62,183,255,0.78)),
    linear-gradient(90deg, rgba(62,183,255,0.72), rgba(62,183,255,0.72)),
    linear-gradient(90deg, rgba(62,183,255,0.65), rgba(62,183,255,0.65));
  background-size: 14px 2px, 10px 2px, 9px 2px, 8px 2px, 7px 2px;
  background-position: 6px 17px, 13px 9px, 13px 22px, 19px 13px, 22px 27px;
}
.preview-brand-copy { display: grid !important; gap: 2px !important; min-width: 0 !important; }
.preview-brand-line {
  display: flex !important; align-items: center !important; gap: 7px !important; flex-wrap: nowrap !important; white-space: nowrap !important;
  color: #dfe4ee !important; font-family: Impact, Haettenschweiler, "Arial Black", sans-serif !important;
  font-weight: 900 !important; letter-spacing: 0.18em !important; text-transform: uppercase !important;
  line-height: 0.92 !important; font-size: 36px !important; text-shadow: 0 1px 0 rgba(255,255,255,0.08) !important;
}
.preview-brand-letter.blue { color: #2c9dff; text-shadow: 0 0 14px rgba(46,162,255,0.16); }
.preview-brand-dash { color: #aeb6c6; margin: 0 -2px; }
.preview-brand-a-letter {
  position: relative; display: inline-block; width: 22px; height: 29px;
  margin: 0 1px 0 -2px; transform: translateY(2px);
}
.preview-brand-a-letter::before, .preview-brand-a-letter::after {
  content: ""; position: absolute; bottom: 0; width: 8px; height: 100%;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #3fc7ff 0%, #2494ff 54%, #1f6fff 100%);
}
.preview-brand-a-letter::before { left: 2px; transform: skewX(-26deg); }
.preview-brand-a-letter::after { right: 2px; transform: skewX(26deg); }
.preview-brand-a-letter .crossbar {
  position: absolute; left: 5px; right: 5px; top: 15px; height: 4px;
  border-radius: 3px; background: #08101e;
  box-shadow: 0 0 0 1px rgba(32,93,170,0.15);
}
.preview-brand-tagline {
  display: flex; align-items: center; gap: 10px; padding-left: 2px;
  color: rgba(222,231,244,0.82); font-size: 7px; font-weight: 700;
  letter-spacing: 0.38em; text-transform: uppercase; white-space: nowrap;
}
.preview-brand-dot { width: 4px; height: 4px; border-radius: 999px; background: #2ea2ff; box-shadow: 0 0 8px rgba(46,162,255,0.38); }
@media (max-width: 860px) {
  .preview-brand-mark { width: min(50vw, 312px); gap: 8px; }
  .preview-brand-e-wrap { width: 28px; height: 44px; }
  .preview-brand-e { font-size: 56px; }
  .preview-brand-line { font-size: 28px; gap: 5px; }
  .preview-brand-a-letter { width: 18px; height: 23px; }
  .preview-brand-tagline { font-size: 6px; letter-spacing: 0.22em; gap: 7px; }
}
@media (max-width: 700px) {
  .preview-brand-mark { width: min(58vw, 246px); }
  .preview-brand-e-wrap { width: 20px; height: 32px; }
  .preview-brand-e { font-size: 40px; }
  .preview-brand-line { font-size: 20px; gap: 3px; }
  .preview-brand-a-letter { width: 13px; height: 17px; }
  .preview-brand-tagline { font-size: 5px; letter-spacing: 0.16em; gap: 5px; }
}
@media (max-width: 520px) {
  .el-brand.preview-brand { flex: 0 0 42px !important; }
  .preview-brand-mark { width: 42px !important; overflow: visible !important; }
  .preview-brand-copy { display: none !important; }
  .preview-brand-e-wrap { width: 38px !important; height: 44px !important; }
  .preview-brand-e-wrap::after {
    content: "EL";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dfe4ee;
    font: 900 15px/1 Impact, Haettenschweiler, "Arial Black", sans-serif;
    letter-spacing: -0.03em;
    text-shadow: 0 0 12px rgba(46,162,255,0.35);
  }
}

/* Nav links */
.el-nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex: 1;
  justify-content: center;
}
.el-nav a {
  font-size: 0.88rem;
  color: var(--el-muted, #8888a8);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  transition: color .18s, background .18s;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.el-nav a:hover {
  color: var(--el-text, #e8e8f0);
  background: rgba(255,255,255,0.05);
}
.el-nav a.active {
  color: var(--el-text, #e8e8f0);
}

/* Right side — sign in + dropdown */
.el-nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  flex-shrink: 0;
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.el-sign-in-btn {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--el-muted, #8888a8);
  padding: 0.42rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--el-border2, #2a2a3e);
  background: transparent;
  transition: color .18s, border-color .18s, background .18s;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}
.el-sign-in-btn:hover {
  color: var(--el-text, #e8e8f0);
  border-color: rgba(108,99,255,0.4);
  background: rgba(108,99,255,0.06);
}

.el-balance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--el-text, #e8e8f0);
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.1);
  border-radius: 999px;
  padding: 0.34rem 0.64rem;
  line-height: 1;
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Account dropdown */
.el-acct-drop {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  min-width: 190px;
  background: var(--el-bg3, #16161f);
  border: 1px solid var(--el-border2, #2a2a3e);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,.75), 0 0 0 1px rgba(108,99,255,.08);
  z-index: 9100;
}
.el-acct-drop.open { display: block !important; }
.el-acct-name {
  padding: 8px 12px 6px;
  font-size: .73rem;
  font-weight: 600;
  color: var(--el-muted, #8888a8);
  border-bottom: 1px solid var(--el-border, #1e1e2e);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.el-drop-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  font-size: .83rem;
  color: var(--el-text, #e8e8f0);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 7px;
  text-decoration: none;
  font-family: inherit;
  font-weight: 500;
  transition: background .12s, color .12s;
  box-sizing: border-box;
}
.el-drop-item:hover {
  background: rgba(108,99,255,.1);
  color: var(--el-accent, #6c63ff);
}
.el-drop-logout { color: var(--el-muted, #8888a8); }

/* Mobile — hide nav links below 700px */
@media (max-width: 700px) {
  .el-nav { display: none; }
  .el-header { padding: 0 1.25rem; }
  .el-brand-logo {
    height: 28px;
    max-width: min(52vw, 190px);
  }
  .el-balance-pill {
    max-width: 140px;
    font-size: 0.7rem;
    padding: 0.3rem 0.52rem;
  }
}

/* ══════════════════════════════════════════════════
   UNIFIED FOOTER
   ══════════════════════════════════════════════════ */
.el-footer-bar {
  background: rgba(5,5,16,0.97);
  border-top: 1px solid var(--el-border, #1e1e2e);
  padding: 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.el-footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.el-footer-links a {
  font-size: 0.83rem;
  color: var(--el-muted, #8888a8);
  text-decoration: none;
  transition: color .18s;
}
.el-footer-links a:hover { color: var(--el-text, #e8e8f0); }
.el-footer-copy {
  font-size: 0.75rem;
  color: var(--el-muted, #8888a8);
  margin: 0;
}


/* ══════════════════════════════════════════════════
   r92 COPILOT DESIGN SYSTEM (app-facelift-r92, STAGED)
   The /chat shell (separate worker) loads this file between its app.css and workspace-polish.css. Every rule below is
   scoped to body.ws-polish:has(#composer) — only the Copilot page has #composer — so no other page is affected.
   Tokens = css/elabs-ds.css v1 values (that file is not loaded by the shell). CSS only: app.js / workspace-polish.js
   are unchanged. Not touched (owner-approved visuals): model chooser (.ws-mp-*), its centred Close, lime New badges,
   workflow picker (.ws-wf-*), attachment-chip top-right X (.ws-chip-x).
   ══════════════════════════════════════════════════ */
body.ws-polish:has(#composer) {
  --ds-bg: #0a0a0f; --ds-surface-1: #111118; --ds-surface-2: #16161f; --ds-surface-3: #1e1e2b;
  --ds-border: #23232f; --ds-border-strong: #3a3a4e; --ds-border-focus: #a5a0ff;
  --ds-text: #f2f2f7; --ds-text-2: #c4c4d4; --ds-text-3: #9a9ab8; --ds-text-disabled: #8a8aa3;
  --ds-violet-600: #5b4ff5; --ds-violet-700: #4c41e0; --ds-violet-300: #a5a0ff;
  --ds-glow: 0 10px 28px rgba(108,99,255,.22); --ds-shadow-2: 0 8px 24px rgba(0,0,0,.45);
  --ds-ease: cubic-bezier(.2,.7,.2,1);
  /* shell tokens re-pointed at the design system (token-level change; layout untouched) */
  --bg: var(--ds-bg); --panel: var(--ds-surface-1); --panel2: var(--ds-surface-2); --line: var(--ds-border-strong);
  --muted: var(--ds-text-3);
  --ws-accent: var(--ds-violet-300); --ws-accent-fill: var(--ds-violet-600);
  --ws-line: var(--ds-border-strong); --ws-line2: #4a4a62; --ws-card: var(--ds-surface-1); --ws-card2: var(--ds-surface-2);
  --ws-muted: var(--ds-text-2);
}
/* Brand mark: white "E" on violet -> deep cyan (was 1.59:1 on the #4bd7e8 end; now >= 5.4:1 everywhere). */
body.ws-polish:has(#composer) .brand .mark { background: linear-gradient(135deg, var(--ds-violet-600), #0e7490); color: #fff; }

/* ---- Buttons: one system. Primary (violet-600 fill), secondary (surface-2 + strong border), ghost (transparent). ---- */
body.ws-polish:has(#composer) :is(.ws-btn, .new-chat, #temporaryChatButton, .sidebar-link, .side-actions > :is(button, a),
  .ws-auto, .header-actions > button, main > header > button.icon, .elh-copilot-help, .composer-bar .send, #confirmTranscription) {
  border-radius: 12px; font-weight: 600; letter-spacing: 0;
  transition: background-color 120ms var(--ds-ease), border-color 120ms, transform 120ms, box-shadow 200ms;
}
body.ws-polish:has(#composer) :is(.ws-btn:not(.is-primary):not(.ws-btn-ghost), .new-chat, #temporaryChatButton, .sidebar-link,
  .side-actions > :is(button, a), .ws-auto, .header-actions > button, main > header > button.icon, .elh-copilot-help) {
  background: var(--ds-surface-2); color: var(--ds-text); border: 1px solid var(--ds-border-strong);
}
body.ws-polish:has(#composer) :is(.ws-btn:not(.is-primary):not(.ws-btn-ghost), .new-chat, #temporaryChatButton, .sidebar-link,
  .side-actions > :is(button, a), .ws-auto, .header-actions > button, main > header > button.icon):hover:not(:disabled) {
  background: var(--ds-surface-3); border-color: #4a4a62;
}
body.ws-polish:has(#composer) #temporaryChatButton { color: var(--ds-text-2); }
body.ws-polish:has(#composer) #temporaryChatButton[aria-pressed="true"] { color: var(--ds-text); border-color: var(--ds-violet-300); background: rgba(108,99,255,.14); }
body.ws-polish:has(#composer) :is(.ws-btn.is-primary, .composer-bar .send:not(:disabled), #confirmTranscription:not(:disabled)) {
  background: var(--ds-violet-600); color: #fff; border: 1px solid transparent;
}
body.ws-polish:has(#composer) :is(.ws-btn.is-primary, .composer-bar .send:not(:disabled), #confirmTranscription:not(:disabled)):hover {
  background: var(--ds-violet-700); box-shadow: var(--ds-glow);
}
body.ws-polish:has(#composer) .ws-btn.ws-btn-ghost { background: transparent; border: 1px solid transparent; color: var(--ds-text-2); }
body.ws-polish:has(#composer) .ws-btn.ws-btn-ghost:hover { background: rgba(255,255,255,.07); color: var(--ds-text); }
body.ws-polish:has(#composer) :is(.ws-btn, .new-chat, #temporaryChatButton, .sidebar-link, .side-actions > :is(button, a), .ws-auto,
  .header-actions > button, main > header > button.icon, .composer-bar .send, .ws-tab, .ws-quick-btn, #addMenu > summary):active:not(:disabled) {
  transform: translateY(1px) scale(.98);
}
/* Disabled: legible but clearly inactive (audit: 2.48:1 on "Add saved media" / "Use reference"). */
body.ws-polish:has(#composer) :is(button, summary):disabled,
body.ws-polish:has(#composer) :is(button, a)[aria-disabled="true"] { color: var(--ds-text-disabled); opacity: 1; cursor: not-allowed; box-shadow: none; transform: none; }
body.ws-polish:has(#composer) .composer-bar .send:disabled { background: var(--ds-surface-2); border: 1px solid var(--ds-border-strong); color: var(--ds-text-disabled); }

/* Composer "+" menu items: ghost rows. */
body.ws-polish:has(#composer) #addMenu > summary { background: var(--ds-surface-2); border: 1px solid var(--ds-border-strong); color: var(--ds-text); }
body.ws-polish:has(#composer) #addMenu > summary:hover { background: var(--ds-surface-3); }
body.ws-polish:has(#composer) #addMenu :is(button, a):not(.ws-chip-x) { border-radius: 8px; color: var(--ds-text); }
body.ws-polish:has(#composer) #addMenu :is(button, a):not(:disabled):hover { background: var(--ds-surface-3); }
body.ws-polish:has(#composer) #addMenu button:disabled { color: var(--ds-text-disabled); }

/* Chips: category tabs and composer quick modes use the ds-chip pattern (selected = inverted). */
body.ws-polish:has(#composer) :is(.ws-tab, .ws-quick-btn) {
  border-radius: 999px; background: var(--ds-surface-2); color: var(--ds-text-2); border: 1px solid var(--ds-border-strong); font-weight: 600;
}
body.ws-polish:has(#composer) :is(.ws-tab, .ws-quick-btn):hover:not(:disabled) { background: var(--ds-surface-3); color: var(--ds-text); }
body.ws-polish:has(#composer) :is(.ws-tab, .ws-quick-btn)[aria-pressed="true"] { background: var(--ds-text); color: var(--ds-bg); border-color: var(--ds-text); }
body.ws-polish:has(#composer) .ws-quick-btn:disabled { background: var(--ds-surface-1); border-color: var(--ds-border); color: var(--ds-text-disabled); }

/* Focus: one ring on every surface. */
body.ws-polish:has(#composer) :is(button, a, summary, select, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--ds-border-focus); outline-offset: 2px;
}

/* Creation cards: Studio tool-card treatment (radius 16, surface gradient, hover lift + violet glow). Layout unchanged. */
body.ws-polish:has(#composer) .ws-card {
  border-radius: 16px; border: 1px solid var(--ds-border); background: linear-gradient(180deg, var(--ds-surface-2), var(--ds-surface-1));
  transition: border-color 200ms, transform 200ms var(--ds-ease), box-shadow 200ms;
}
body.ws-polish:has(#composer) .ws-card:is(:hover, :focus-within) {
  border-color: rgba(165,160,255,.6); transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(108,99,255,.3), 0 14px 36px rgba(108,99,255,.26), var(--ds-shadow-2);
}
body.ws-polish:has(#composer) .ws-card .ws-media { border-radius: 16px 16px 0 0; }
body.ws-polish:has(#composer) .ws-card-body h3 { font-size: 16px; font-weight: 700; color: var(--ds-text); }
body.ws-polish:has(#composer) .ws-card-type { font-size: 12px; font-weight: 600; }
body.ws-polish:has(#composer) .ws-rail-item { border-radius: 16px; border: 1px solid var(--ds-border); background: var(--ds-surface-1); }
body.ws-polish:has(#composer) .ws-rail-item:hover { border-color: rgba(165,160,255,.6); box-shadow: var(--ds-shadow-2); }
body.ws-polish:has(#composer) .composer { border-radius: 16px; background: var(--ds-surface-1); border-color: var(--ds-border-strong); }
body.ws-polish:has(#composer) .composer:focus-within { border-color: var(--ds-violet-300); }
@media (prefers-reduced-motion: reduce) {
  body.ws-polish:has(#composer) :is(.ws-card, .ws-btn, .ws-tab, .ws-quick-btn) { transition: none; }
  body.ws-polish:has(#composer) .ws-card:is(:hover, :focus-within) { transform: none; }
}

/* 12px floor (shell app.css has four 11px runs). */
body.ws-polish:has(#composer) :is(.side-actions > strong, .disclaimer, .creation-tray label, .attachment-tray span) { font-size: 12px; }
/* Muted meta text -> ds-text-3 (7.4:1). */
body.ws-polish:has(#composer) :is(.muted, .ws-muted, #privacyLabel, .ws-h-sub, .ws-welcome-note) { color: var(--ds-text-3); }

/* visual-hooks patch-r1 (fix 8): Copilot "Get inspired" rail. On narrow panes the 168px/140px cards ran past the pane edge
   (row scrollWidth > width at 820 and 390). Below 900px wrap them into a grid that always fits the pane. */
@media (max-width: 900px) {
  body.ws-polish .ws-rail-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); overflow-x: visible; scroll-snap-type: none; }
  body.ws-polish .ws-rail-row li { flex: none; min-width: 0; }
  body.ws-polish .ws-rail-media { aspect-ratio: 1 / 1; }
}
@media (max-width: 480px) {
  body.ws-polish .ws-rail-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
/* site-perf-r2: reserve the shared fixed header (elabs-header.js injects the same rule later) so the page does not shift 65 px when it mounts */
:where(body:has(> #header-mount)){padding-top:65px}

/* ---- /css/elabs-modal.css ---- */
/* ── Auth Modal ── */
.el-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.7);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);z-index:2147483647;align-items:center;justify-content:center;padding:20px}
.el-overlay.open{display:flex}
.el-modal{background:#111118;border:1px solid rgba(108,99,255,.28);border-radius:20px;padding:36px 32px;width:100%;max-width:400px;box-shadow:0 8px 60px rgba(0,0,0,.6),0 0 80px rgba(108,99,255,.12);position:relative;animation:el-in .2s ease}
@keyframes el-in{from{opacity:0;transform:translateY(-12px) scale(.97)}to{opacity:1;transform:none}}
.el-close{position:absolute;top:14px;right:14px;background:none;border:none;color:var(--muted);cursor:pointer;padding:6px;border-radius:8px;display:flex;align-items:center;transition:all .15s}
.el-close:hover{color:var(--text);background:var(--bg3,#16161f)}
.el-logo{display:flex;align-items:center;gap:10px;margin-bottom:22px}
.el-logo-icon{width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,var(--accent),#38bdf8);display:flex;align-items:center;justify-content:center;font-size:.78rem;font-weight:900;color:#fff;box-shadow:0 0 20px rgba(108,99,255,.4)}
.el-logo-name{font-size:1rem;font-weight:800;color:var(--text)}
.el-logo-sub{font-size:.7rem;color:var(--muted);margin-top:1px}
.el-h{font-size:1.2rem;font-weight:900;margin-bottom:5px;color:var(--text)}
.el-sub{font-size:.82rem;color:var(--muted);margin-bottom:20px;line-height:1.55}
.el-err{background:rgba(239,68,68,.08);border:1px solid rgba(239,68,68,.22);color:#fca5a5;font-size:.81rem;padding:9px 13px;border-radius:9px;margin-bottom:14px;display:none}
.el-err.show{display:block}
.el-gh-btn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 16px;background:#24292e;color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:11px;font-size:.88rem;font-weight:600;cursor:pointer;font-family:inherit;text-decoration:none;transition:background .15s;margin-bottom:14px}
.el-gh-btn:hover{background:#2d333b}

/* ---- /css/elabs-ds.css ---- */
/* elabs-ds.css — E-Labs shared design system v1 (design-system-r1, STAGED 2026-11-08).
   One stylesheet for every page. Tokens are --ds-*; components are .ds-* so loading this file never restyles an
   existing page by itself. The only un-prefixed rules are in the clearly marked "PILOT" blocks at the bottom (shared
   header + Studio home), which r83 opts into.
   Calibration (structure only, no brand copying): Higgsfield home measured 2026-11-08 (reference-landing-20261108/
   LAYOUT-SPEC-hf-home.md): 16/24 nav, 14/20 body copy, 12-20px card gaps, 8-12px button radii, 40/48px button heights,
   uppercase display headings. E-Labs keeps its own violet primary and the approved lime "New" pill.
   Contrast ratios below are WCAG 2.x, computed against --ds-bg (#0a0a0f) unless stated. */

:root {
  /* ---- surfaces (dark only; the site ships color-scheme: dark) */
  --ds-bg: #0a0a0f;            /* page */
  --ds-surface-1: #111118;     /* cards, sidebar */
  --ds-surface-2: #16161f;     /* raised card, input */
  --ds-surface-3: #1e1e2b;     /* hover / pressed surface */
  --ds-overlay: rgba(10, 10, 15, .72);   /* chip/caption over media */
  --ds-scrim: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.78) 100%);

  /* ---- borders */
  --ds-border: #23232f;        /* hairline, decorative */
  --ds-border-strong: #3a3a4e; /* control boundary: 1.9:1 alone, paired with fill */
  --ds-border-focus: #a5a0ff;

  /* ---- text (all >= 4.5:1 on bg AND surface-2) */
  --ds-text: #f2f2f7;          /* 17.9:1 */
  --ds-text-2: #c4c4d4;        /* 11.6:1 secondary */
  --ds-text-3: #9a9ab8;        /* 7.4:1 on bg, 6.6:1 on surface-2: captions/meta (replaces #717171, #504d4d, #3b3787) */
  --ds-text-disabled: #6b6b80; /* 3.6:1 — disabled only (WCAG exempt), never body text */

  /* ---- brand */
  --ds-violet-500: #6c63ff;    /* brand accent: rings, borders, icons, large text (4.58:1 on bg) */
  --ds-violet-600: #5b4ff5;    /* PRIMARY FILL: white label 5.41:1 (was #6c63ff at 4.32:1, an AA failure) */
  --ds-violet-700: #4c41e0;    /* primary hover/pressed: white 6.5:1 */
  --ds-violet-300: #a5a0ff;    /* link / accent text: 8.53:1 */
  --ds-violet-tint: rgba(108, 99, 255, .14);
  --ds-cyan-400: #38bdf8;
  --ds-lime-400: #a3e635;      /* owner-approved "New" pill fill; label #0f1a00 (unchanged) */
  --ds-lime-fg: #0f1a00;
  --ds-success: #22c55e; --ds-warning: #eab308; --ds-danger: #f87171; /* danger text 6.9:1 (was #ef4444 4.9) */

  /* ---- type: Inter for UI, uppercase display for section titles (reference uses a display face; we keep Inter 800) */
  --ds-font: 'Inter', 'Inter-fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ds-fs-display: clamp(2rem, 1.4rem + 2.2vw, 3rem);   /* 32 -> 48 */
  --ds-fs-h1: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);  /* 28 -> 36 */
  --ds-fs-h2: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);    /* 20 -> 24, section titles */
  --ds-fs-h3: 1rem;            /* 16 card title */
  --ds-fs-body: .9375rem;      /* 15 */
  --ds-fs-sm: .875rem;         /* 14 descriptions (reference p 14/20) */
  --ds-fs-xs: .75rem;          /* 12 meta, chips — the FLOOR. Nothing renders below 12px (audit found 7, 9.6, 9.9px) */
  --ds-lh-tight: 1.15; --ds-lh: 1.5; --ds-lh-ui: 1.25;
  --ds-fw-regular: 400; --ds-fw-medium: 500; --ds-fw-semibold: 600; --ds-fw-bold: 700; --ds-fw-black: 800;
  --ds-tracking-display: -0.02em; --ds-tracking-caps: .06em;

  /* ---- spacing: 4px grid only (audit found 4.8, 5.6, 6.4, 7, 9px gaps) */
  --ds-sp-1: 4px; --ds-sp-2: 8px; --ds-sp-3: 12px; --ds-sp-4: 16px; --ds-sp-5: 20px; --ds-sp-6: 24px;
  --ds-sp-8: 32px; --ds-sp-10: 40px; --ds-sp-12: 48px; --ds-sp-16: 64px;
  --ds-gutter: clamp(16px, 2.2vw, 32px);
  --ds-section-gap: clamp(32px, 4vw, 56px);
  --ds-grid-gap: clamp(10px, 1.2vw, 16px);

  /* ---- radii: 5 steps (audit found 11 values: 3,4,5,6,8,9,10,12,14,18,20,22) */
  --ds-r-xs: 6px;   /* chips inside cards, tags */
  --ds-r-sm: 8px;   /* buttons sm, inputs */
  --ds-r-md: 12px;  /* buttons md/lg, menus */
  --ds-r-lg: 16px;  /* cards, media tiles */
  --ds-r-pill: 999px;

  /* ---- elevation */
  --ds-shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --ds-shadow-2: 0 8px 24px rgba(0,0,0,.45);
  --ds-shadow-3: 0 18px 48px rgba(0,0,0,.55);
  --ds-glow: 0 10px 28px rgba(108,99,255,.22);

  /* ---- motion */
  --ds-ease: cubic-bezier(.2,.7,.2,1);
  --ds-dur-1: 120ms; --ds-dur-2: 200ms; --ds-dur-3: 320ms;

  /* ---- focus: one ring everywhere, visible on every surface (violet-300 on bg 8.5:1) */
  --ds-focus-ring: 0 0 0 2px var(--ds-bg), 0 0 0 4px var(--ds-border-focus);

  /* ---- controls */
  --ds-h-sm: 32px; --ds-h-md: 40px; --ds-h-lg: 48px;   /* reference: 32 chips, 40 buttons, 48 mobile CTA */
  --ds-header-h: 64px;
}

/* ============ BUTTONS ============ */
.ds-btn {
  --_bg: var(--ds-surface-2); --_fg: var(--ds-text); --_bd: var(--ds-border-strong); --_bg-h: var(--ds-surface-3);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ds-sp-2);
  height: var(--ds-h-md); padding: 0 var(--ds-sp-4); border-radius: var(--ds-r-md);
  font: var(--ds-fw-semibold) var(--ds-fs-sm)/1 var(--ds-font); letter-spacing: 0; white-space: nowrap;
  color: var(--_fg); background: var(--_bg); border: 1px solid var(--_bd); text-decoration: none; cursor: pointer;
  transition: background var(--ds-dur-1) var(--ds-ease), border-color var(--ds-dur-1), transform var(--ds-dur-1), box-shadow var(--ds-dur-2);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.ds-btn:hover { background: var(--_bg-h); }
.ds-btn:active { transform: translateY(1px) scale(.98); }
.ds-btn:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.ds-btn:disabled, .ds-btn[aria-disabled="true"] { --_fg: var(--ds-text-disabled); --_bg: var(--ds-surface-1); --_bd: var(--ds-border); cursor: not-allowed; transform: none; }
.ds-btn[aria-busy="true"] { cursor: progress; }
.ds-btn[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ds-spin .7s linear infinite; }
.ds-btn svg { width: 16px; height: 16px; flex: none; }

.ds-btn--primary { --_bg: var(--ds-violet-600); --_fg: #fff; --_bd: transparent; --_bg-h: var(--ds-violet-700); }
.ds-btn--primary:hover { box-shadow: var(--ds-glow); }
.ds-btn--secondary { /* default token set above */ }
.ds-btn--ghost { --_bg: transparent; --_bd: transparent; --_fg: var(--ds-text-2); --_bg-h: rgba(255,255,255,.07); }
.ds-btn--ghost:hover { color: var(--ds-text); }
.ds-btn--link { --_bg: transparent; --_bd: transparent; --_fg: var(--ds-violet-300); --_bg-h: transparent; padding: 0 var(--ds-sp-1); height: auto; min-height: 32px; }
.ds-btn--link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ds-btn--danger { --_bg: rgba(248,113,113,.12); --_fg: var(--ds-danger); --_bd: rgba(248,113,113,.35); --_bg-h: rgba(248,113,113,.2); }
.ds-btn--pill { border-radius: var(--ds-r-pill); }
.ds-btn--icon { width: var(--ds-h-md); padding: 0; }
.ds-btn--sm { height: var(--ds-h-sm); padding: 0 var(--ds-sp-3); font-size: var(--ds-fs-xs); border-radius: var(--ds-r-sm); }
.ds-btn--sm.ds-btn--icon { width: var(--ds-h-sm); }
.ds-btn--lg { height: var(--ds-h-lg); padding: 0 var(--ds-sp-6); font-size: var(--ds-fs-body); }
.ds-btn--lg.ds-btn--icon { width: var(--ds-h-lg); }
.ds-btn--block { width: 100%; }
@media (pointer: coarse) { .ds-btn--sm { min-height: 40px; } .ds-btn--icon.ds-btn--sm { min-width: 40px; } }

/* ============ CHIPS / TAGS / BADGES ============ */
.ds-chip[hidden], .ds-btn[hidden], .ds-tag[hidden], .ds-badge[hidden], .ds-model-badge[hidden] { display: none !important; }
.ds-chip {
  display: inline-flex; align-items: center; gap: 6px; height: var(--ds-h-sm); padding: 0 var(--ds-sp-3);
  border-radius: var(--ds-r-pill); border: 1px solid var(--ds-border-strong); background: var(--ds-surface-2);
  color: var(--ds-text-2); font: var(--ds-fw-medium) var(--ds-fs-sm)/1 var(--ds-font); cursor: pointer; white-space: nowrap;
  transition: background var(--ds-dur-1), color var(--ds-dur-1), border-color var(--ds-dur-1); text-decoration: none;
}
.ds-chip:hover { background: var(--ds-surface-3); color: var(--ds-text); }
.ds-chip:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.ds-chip[aria-pressed="true"], .ds-chip[aria-selected="true"], .ds-chip.is-active { background: var(--ds-text); color: var(--ds-bg); border-color: var(--ds-text); }
.ds-chip-row { display: flex; gap: var(--ds-sp-2); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ds-chip-row::-webkit-scrollbar { display: none; }

.ds-tag { /* small label on a media tile */
  display: inline-flex; align-items: center; height: 22px; padding: 0 var(--ds-sp-2); border-radius: var(--ds-r-xs);
  background: var(--ds-overlay); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; font: var(--ds-fw-semibold) var(--ds-fs-xs)/1 var(--ds-font); letter-spacing: .01em;
}
.ds-badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: var(--ds-r-pill); font: var(--ds-fw-black) .6875rem/1 var(--ds-font); letter-spacing: .03em; }
.ds-badge--new { background: var(--ds-lime-400); color: var(--ds-lime-fg); }              /* 11.9:1 */
.ds-badge--muted { background: rgba(255,255,255,.08); color: var(--ds-text-2); }

/* ============ SECTION HEADER: "Title + More →" ============ */
.ds-section { margin-top: var(--ds-section-gap); }
.ds-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--ds-sp-4); margin-bottom: var(--ds-sp-4); }
.ds-section-title { margin: 0; font: var(--ds-fw-black) var(--ds-fs-h2)/var(--ds-lh-tight) var(--ds-font); letter-spacing: var(--ds-tracking-display); color: var(--ds-text); text-transform: uppercase; }
.ds-section-sub { margin: 4px 0 0; font: var(--ds-fw-regular) var(--ds-fs-sm)/1.43 var(--ds-font); color: var(--ds-text-3); }
.ds-section-more { /* a ds-btn--ghost ds-btn--sm with trailing arrow; 32px target, 8.5:1 */
  display: inline-flex; align-items: center; gap: 6px; height: var(--ds-h-sm); padding: 0 var(--ds-sp-3); border-radius: var(--ds-r-pill);
  background: rgba(255,255,255,.06); border: 1px solid transparent; color: var(--ds-text); text-decoration: none; cursor: pointer;
  font: var(--ds-fw-semibold) var(--ds-fs-xs)/1 var(--ds-font); white-space: nowrap; transition: background var(--ds-dur-1);
}
.ds-section-more::after { content: "→"; transition: transform var(--ds-dur-2) var(--ds-ease); }
.ds-section-more:hover { background: rgba(255,255,255,.12); }
.ds-section-more:hover::after { transform: translateX(3px); }
.ds-section-more:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }

/* ============ CARD + MEDIA TILE (with motion) ============ */
.ds-card { background: var(--ds-surface-1); border: 1px solid var(--ds-border); border-radius: var(--ds-r-lg); overflow: hidden; transition: border-color var(--ds-dur-2), transform var(--ds-dur-2) var(--ds-ease), box-shadow var(--ds-dur-2); }
.ds-card.is-interactive { cursor: pointer; }
.ds-card.is-interactive:hover { border-color: rgba(108,99,255,.5); transform: translateY(-2px); box-shadow: var(--ds-shadow-2); }
.ds-card.is-interactive:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.ds-card.is-interactive:active { transform: translateY(0) scale(.99); }

.ds-tile { position: relative; display: block; border-radius: var(--ds-r-lg); overflow: hidden; background: var(--ds-surface-2); isolation: isolate; color: #fff; text-decoration: none; }
.ds-tile__media { position: relative; aspect-ratio: var(--ds-tile-ar, 16 / 10); overflow: hidden; background: var(--ds-surface-2); }
.ds-tile--portrait { --ds-tile-ar: 9 / 16; } .ds-tile--square { --ds-tile-ar: 1; } .ds-tile--wide { --ds-tile-ar: 1.47; } /* reference feature strip */
.ds-tile__media > img, .ds-tile__media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--ds-dur-3) var(--ds-ease), opacity var(--ds-dur-2); }
.ds-tile__media > video { opacity: 0; }                       /* poster/img shows until the r82 controller reports playing */
.ds-tile__media.is-playing > video { opacity: 1; }
.ds-tile:hover .ds-tile__media > img, .ds-tile:hover .ds-tile__media > video { transform: scale(1.04); }
.ds-tile__media::after { content: ""; position: absolute; inset: 0; background: var(--ds-scrim); pointer-events: none; }
.ds-tile__tags { position: absolute; z-index: 2; top: var(--ds-sp-2); left: var(--ds-sp-2); display: flex; gap: 6px; }
.ds-tile__caption { position: absolute; z-index: 2; left: var(--ds-sp-3); right: var(--ds-sp-3); bottom: var(--ds-sp-3); }
.ds-tile__title { font: var(--ds-fw-bold) var(--ds-fs-h3)/1.25 var(--ds-font); color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.ds-tile__meta { font: var(--ds-fw-medium) var(--ds-fs-xs)/1.35 var(--ds-font); color: rgba(255,255,255,.86); }
.ds-tile__actions { position: absolute; z-index: 3; right: var(--ds-sp-2); top: var(--ds-sp-2); display: flex; gap: 6px; opacity: 0; transform: translateY(-4px); transition: opacity var(--ds-dur-2), transform var(--ds-dur-2) var(--ds-ease); }
.ds-tile:hover .ds-tile__actions, .ds-tile:focus-within .ds-tile__actions { opacity: 1; transform: none; }
@media (hover: none) { .ds-tile__actions { opacity: 1; transform: none; } }
.ds-tile:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.ds-tile__body { padding: var(--ds-sp-3) var(--ds-sp-4) var(--ds-sp-4); }
.ds-tile__desc { margin-top: 4px; font: var(--ds-fw-regular) var(--ds-fs-sm)/1.43 var(--ds-font); color: var(--ds-text-3); }

.ds-rail { display: grid; grid-auto-flow: column; grid-auto-columns: var(--ds-rail-col, minmax(240px, 1fr)); gap: var(--ds-grid-gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ds-rail > * { scroll-snap-align: start; }
.ds-rail::-webkit-scrollbar { display: none; }
.ds-grid { display: grid; gap: var(--ds-grid-gap); grid-template-columns: repeat(var(--ds-cols, 4), minmax(0, 1fr)); }
@media (max-width: 1024px) { .ds-grid { --ds-cols: 3; } }
@media (max-width: 720px) { .ds-grid { --ds-cols: 2; } .ds-rail { --ds-rail-col: 72%; } }

/* ============ EMPTY / LOADING ============ */
.ds-skeleton { background: linear-gradient(90deg, var(--ds-surface-2) 0, var(--ds-surface-3) 40%, var(--ds-surface-2) 80%); background-size: 200% 100%; animation: ds-shimmer 1.4s linear infinite; border-radius: var(--ds-r-lg); }
.ds-empty { display: grid; place-items: center; gap: var(--ds-sp-3); padding: var(--ds-sp-12) var(--ds-sp-6); text-align: center; border: 1px dashed var(--ds-border-strong); border-radius: var(--ds-r-lg); color: var(--ds-text-3); font-size: var(--ds-fs-sm); }
.ds-empty__title { color: var(--ds-text); font-weight: var(--ds-fw-semibold); font-size: var(--ds-fs-body); }
@keyframes ds-shimmer { to { background-position: -200% 0; } }
@keyframes ds-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ds-skeleton { animation: none; } .ds-btn[aria-busy="true"]::before { animation-duration: 2s; } .ds-tile:hover .ds-tile__media > img, .ds-tile:hover .ds-tile__media > video { transform: none; } }

/* ============ NAV / MEGA-MENU ============ */
.ds-nav { display: flex; align-items: center; gap: 2px; }
.ds-nav__item { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 var(--ds-sp-3); border-radius: var(--ds-r-sm); color: var(--ds-text-2); background: transparent; border: 0; font: var(--ds-fw-medium) var(--ds-fs-body)/1 var(--ds-font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.ds-nav__item:hover, .ds-nav__item[aria-expanded="true"] { color: var(--ds-text); background: rgba(255,255,255,.07); }
.ds-nav__item[aria-current="page"] { color: var(--ds-text); box-shadow: inset 0 -2px 0 var(--ds-violet-500); border-radius: var(--ds-r-sm) var(--ds-r-sm) 0 0; }
.ds-nav__item:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.ds-mega { position: absolute; top: calc(100% + 8px); left: 0; min-width: 640px; display: grid; grid-template-columns: 220px 1fr; gap: var(--ds-sp-4); padding: var(--ds-sp-4); background: rgba(17,17,24,.98); border: 1px solid var(--ds-border-strong); border-radius: var(--ds-r-md); box-shadow: var(--ds-shadow-3); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.ds-mega__group-title { margin: 0 0 var(--ds-sp-2); color: var(--ds-text-3); font: var(--ds-fw-semibold) var(--ds-fs-xs)/1 var(--ds-font); text-transform: uppercase; letter-spacing: var(--ds-tracking-caps); }
.ds-mega__link { display: flex; align-items: center; gap: var(--ds-sp-2); min-height: 40px; padding: 0 var(--ds-sp-2); border-radius: var(--ds-r-sm); color: var(--ds-text); text-decoration: none; font: var(--ds-fw-medium) var(--ds-fs-sm)/1.2 var(--ds-font); }
.ds-mega__link:hover, .ds-mega__link:focus-visible { background: rgba(255,255,255,.07); outline: none; }
.ds-mega__preview { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--ds-sp-3); } /* tool preview tiles (ds-tile--wide) */

/* ============ UTILITIES ============ */
.ds-focus-ring:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.ds-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =====================================================================================================
   PILOT r83 — SHARED HEADER (elabs-header.js injects its own <style>; these rules load after and win by
   specificity/!important only where the injected string uses the same selector). Destinations unchanged.
   ===================================================================================================== */
header.el-header { border-bottom: 1px solid var(--ds-border); }
header.el-header .el-nav a, header.el-header .el-iva-trigger {
  font-size: .9375rem !important; font-weight: 500; color: var(--ds-text-2); line-height: 1.2;
  padding: 8px 10px !important; border-radius: var(--ds-r-sm);
}
header.el-header .el-nav a:hover, header.el-header .el-iva-trigger:hover, header.el-header .el-iva-trigger[aria-expanded="true"] { color: var(--ds-text); background: rgba(255,255,255,.07); }
header.el-header .el-nav a[aria-current="page"], header.el-header .el-nav a.active { color: var(--ds-text); box-shadow: inset 0 -2px 0 var(--ds-violet-500); }
header.el-header .el-nav a:focus-visible, header.el-header .el-iva-trigger:focus-visible, header.el-header .el-signin-btn:focus-visible,
header.el-header .el-cart-btn:focus-visible, header.el-header .el-hamburger:focus-visible, header.el-header .el-brand:focus-visible { outline: none !important; box-shadow: var(--ds-focus-ring); }
header.el-header .el-signin-btn { /* one primary: solid violet-600 (was a #9333ea→#2563eb gradient, a third accent) */
  background: var(--ds-violet-600) !important; height: 40px; padding: 0 var(--ds-sp-4) !important; border-radius: var(--ds-r-md) !important; font-size: var(--ds-fs-sm) !important; font-weight: 600;
}
header.el-header .el-signin-btn:hover { background: var(--ds-violet-700) !important; box-shadow: var(--ds-glow); }
header.el-header .el-signin-btn:active, header.el-header .el-cart-btn:active { transform: translateY(1px); }
header.el-header .el-cart-btn { height: 40px; border-radius: var(--ds-r-md) !important; background: var(--ds-surface-2) !important; border-color: var(--ds-border-strong) !important; }
header.el-header .el-cart-btn:hover { background: var(--ds-surface-3) !important; }
/* below 1400 the injected CSS drops nav text to .72rem (11.5px); floor it at 14px (13px <=1200). Items the injected CSS hides at a width stay hidden (no display override). */
@media (max-width: 1399px) { header.el-header .el-nav a, header.el-header .el-iva-trigger { font-size: .875rem !important; padding: 8px 7px !important; } }
@media (max-width: 1200px) { header.el-header .el-nav a, header.el-header .el-iva-trigger { font-size: .8125rem !important; padding: 8px 5px !important; } }
@media (max-width: 700px) { header.el-header .el-signin-btn { height: 44px; min-height: 44px; font-size: var(--ds-fs-xs) !important; padding: 0 var(--ds-sp-3) !important; } header.el-header .el-cart-btn, header.el-header .el-hamburger { min-width: 44px; height: 44px; } } /* tap-targets-r1: phone hit areas 44 px (was 40); desktop rule above unchanged */
header.el-header .preview-brand-tagline { font-size: 8px !important; } /* decorative wordmark line; 7px text was below any legible size */

/* =====================================================================================================
   PILOT r83 — STUDIO HOME (studio.html #home view). Markup classes unchanged except section heads/tool cards
   which gain ds-* classes in r83.
   ===================================================================================================== */
.home-inner .home-sect-head { align-items: flex-end; margin-bottom: var(--ds-sp-4); }
.home-inner .home-sect-title { font: var(--ds-fw-black) var(--ds-fs-h2)/var(--ds-lh-tight) var(--ds-font); letter-spacing: var(--ds-tracking-display); text-transform: uppercase; color: var(--ds-text); }
.home-inner .home-sect-more { /* was violet text 12.5px on a 17px-tall hit area; "Create scenes" rendered at 1.95:1 */
  display: inline-flex; align-items: center; gap: 6px; height: var(--ds-h-sm); padding: 0 var(--ds-sp-3) !important; border-radius: var(--ds-r-pill) !important;
  background: rgba(255,255,255,.06) !important; color: var(--ds-text) !important; opacity: 1 !important; font: var(--ds-fw-semibold) var(--ds-fs-xs)/1 var(--ds-font) !important; text-decoration: none;
}
.home-inner .home-sect-more:hover { background: rgba(255,255,255,.12) !important; opacity: 1; }
.home-inner .home-sect-more:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); border-radius: var(--ds-r-pill); }
.home-inner .home-sect-more:disabled, .home-inner .home-sect-more[aria-disabled="true"] { color: var(--ds-text-disabled) !important; background: rgba(255,255,255,.03) !important; }
.home-inner .home-hero-pills > button { height: var(--ds-h-sm); padding: 0 var(--ds-sp-4); font-size: var(--ds-fs-sm); color: var(--ds-text-2); background: var(--ds-surface-2); border-color: var(--ds-border-strong); }
.home-inner .home-hero-pills > button:hover { color: var(--ds-text); background: var(--ds-surface-3); }
.home-inner .home-hero-pills > button:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.home-inner .home-hero-pills > button:active { transform: scale(.97); }
.home-inner .home-tool-card { border-radius: var(--ds-r-lg); border-color: var(--ds-border); }
.home-inner .home-tool-card:active { transform: translateY(0) scale(.99); }
.home-inner .home-tool-card:focus-visible { box-shadow: var(--ds-focus-ring) !important; }
.home-inner .home-tool-tag { font-size: var(--ds-fs-xs) !important; height: 22px; display: inline-flex; align-items: center; border-radius: var(--ds-r-xs) !important; background: var(--ds-overlay) !important; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.home-inner .home-tool-card .home-suite-name { font-size: var(--ds-fs-h3); font-weight: 700; }
.home-inner .home-tool-benefit { font-size: var(--ds-fs-sm); line-height: 1.43; color: var(--ds-text-3); }
.home-inner .home-banner-tag { font-size: var(--ds-fs-xs) !important; border-radius: var(--ds-r-xs) !important; background: var(--ds-overlay) !important; color: #fff !important; }
.home-inner .home-banner-sub { color: rgba(255,255,255,.86) !important; font-size: var(--ds-fs-xs) !important; }
.home-inner .home-banner, .home-inner .home-short-card { border-radius: var(--ds-r-lg); }
.home-inner .home-banner:focus-visible, .home-inner .home-short-card:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.home-inner .home-banner:active, .home-inner .home-short-card:active { transform: scale(.99); }
.sidebar .sidebar-section-lbl { font-size: var(--ds-fs-xs); color: var(--ds-text-3); } /* was .6rem (9.6px) */
#elabsMotionToggle:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
@media (max-width: 720px) { .home-inner .home-tool-benefit { font-size: var(--ds-fs-xs); } }

/* ---- PILOT r83: Studio Suite tool cards (owner priority 11-08). Layout unchanged: 4 equal-width cards per row.
   Model badges sit on the media as icon chips (names in aria-label/title) so the card grows only by one chip row + CTA row. */
.ds-model-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: var(--ds-r-pill); background: rgba(10,10,15,.72); border: 1px solid rgba(255,255,255,.16); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ds-model-badge .elabs-model-icon { flex: none; --elabs-model-icon-size: 20px; --elabs-model-icon-glyph: 14px; --elabs-model-icon-radius: 999px; --elabs-model-icon-font: 10px; width: 20px; height: 20px; background: transparent; border: 0; box-shadow: none; }
.ds-model-badge .elabs-model-icon__img { width: 14px; height: 14px; }
.ds-model-badge > span:not(.elabs-model-icon) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ds-chip--sm { height: 28px; padding: 0 10px; font-size: var(--ds-fs-xs); font-weight: 600; flex: none; }
.home-inner .ds-toolcard { display: flex; flex-direction: column; border: 1px solid var(--ds-border); background: linear-gradient(180deg, var(--ds-surface-2), var(--ds-surface-1)); cursor: pointer; }
.home-inner .ds-toolcard:hover, .home-inner .ds-toolcard:focus-within { border-color: rgba(165,160,255,.6); transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(108,99,255,.3), 0 14px 36px rgba(108,99,255,.26), var(--ds-shadow-2); background: linear-gradient(180deg, #1c1a2e, var(--ds-surface-1)); }
.home-inner .ds-toolcard .home-tool-media::after { inset: 0; height: auto; z-index: 1; background: linear-gradient(180deg, rgba(10,10,15,.45) 0%, rgba(10,10,15,0) 26%, rgba(10,10,15,0) 50%, rgba(17,17,24,.96) 100%); }
.home-inner .ds-toolcard .home-tool-tag { z-index: 2; }
.ds-toolcard__promo { position: absolute; z-index: 3; right: 14px; top: 2px; }
.ds-toolcard__promo .elabs-promo { margin-left: 0; }
.home-inner .ds-toolcard .ds-toolcard__models { position: absolute; z-index: 2; right: 10px; top: 10px; display: flex; gap: 4px; }
.home-inner .ds-toolcard .ds-toolcard__models[hidden] { display: none; }
.home-inner .ds-toolcard .home-tool-info { position: relative; z-index: 2; margin-top: -30px; padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.home-inner .ds-toolcard .home-suite-name { font: var(--ds-fw-black) 1.25rem/1.15 var(--ds-font); letter-spacing: -0.01em; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.7); padding-right: 76px; }
.home-inner .ds-toolcard .home-tool-benefit { color: var(--ds-text-2); font-size: .8125rem; line-height: 1.38; margin-top: -4px; }
.ds-toolcard__modes { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.ds-toolcard__modes::-webkit-scrollbar { display: none; }
.ds-toolcard__modes:not(:has(a:not([hidden]))) { display: none; }
.ds-toolcard__cta { display: flex; align-items: center; gap: 4px; margin-top: auto; }
.ds-toolcard__cta .ds-btn--primary { padding: 0 18px; }
.ds-toolcard__cta .ds-btn--ghost { padding: 0 8px; }
.home-inner .ds-toolcard .home-tool-go { display: none; } /* replaced by the visible Create button */
.home-inner .ds-toolcard .home-tool-status:empty { display: none; }
@media (max-width: 720px) {
  .home-inner .ds-toolcard .home-tool-info { padding: 0 10px 10px; gap: 6px; margin-top: -24px; }
  .home-inner .ds-toolcard .home-suite-name { font-size: 1.0625rem; }
  .home-inner .ds-toolcard .ds-toolcard__models { top: 8px; right: 8px; }
  .home-inner .ds-toolcard .home-tool-tag { display: none; }
  .ds-toolcard__promo { position: static; align-self: flex-start; margin-bottom: -2px; }
  .home-inner .ds-toolcard .home-suite-name { padding-right: 0; }
  .home-inner .ds-toolcard .ds-toolcard__models .ds-model-badge:nth-child(n+3) { display: none; }
  .ds-toolcard__cta .ds-btn--primary { flex: 1 1 auto; min-height: 36px; }
  .ds-toolcard__models-btn { display: none; }
}

/* r83 lead fix: tool-card mode chips wrap instead of being cut off at the card edge */
.ds-toolcard__modes{display:flex;flex-wrap:wrap;overflow:visible;row-gap:6px;mask-image:none;-webkit-mask-image:none}

/* ---- /css/studio-lipsync-mv.css ---- */
.lmv{margin:14px 0;padding:18px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(255,255,255,.03);display:grid;gap:12px;color:inherit}
.lmv h3{margin:0;font-size:1.15rem}.lmv-top{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.lmv-exit{background:none;border:0;color:#a9a6ff;text-decoration:underline;cursor:pointer;font:inherit;font-size:.9rem;padding:4px}
.lmv-step{margin:6px 0 0;font-weight:600}.lmv-note{margin:0;font-size:.9rem;opacity:.8}
.lmv select{width:100%;max-width:520px;box-sizing:border-box}
.lmv select,.lmv input[type=number],.lmv input[type=text]{background:#14141f;color:inherit;border:1px solid rgba(255,255,255,.18);border-radius:10px;padding:10px 12px;font:inherit;max-width:100%}
.lmv-seg,.lmv-seg .sseg-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.lmv-seg audio{width:100%;max-width:520px}
.lmv-photos{display:grid;grid-auto-rows:min-content;align-items:start;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px;max-height:330px;overflow:auto;padding:2px}
.lmv-photo{position:relative;aspect-ratio:1;height:auto;min-height:0;display:block;width:100%;border-radius:10px;border:2px solid transparent;background:#1c1c2a;overflow:hidden;padding:0;cursor:pointer;color:inherit}
.lmv-photo__img{position:absolute;inset:0;background:#1c1c2a center/cover no-repeat}.lmv-photo__name{font-size:.7rem;padding:6px;word-break:break-all;opacity:.7}
.lmv-photo.is-on{border-color:#7c6cff;box-shadow:0 0 0 3px rgba(124,108,255,.35)}.lmv-photo.is-on::after{content:'\2713';position:absolute;top:6px;right:6px;width:22px;height:22px;border-radius:50%;background:#7c6cff;color:#fff;font-size:13px;display:grid;place-items:center}
.lmv .btn{justify-self:start;padding:11px 18px;border-radius:10px;border:1px solid rgba(255,255,255,.2);background:#1d1d2b;color:inherit;font:inherit;font-weight:600;cursor:pointer}
.lmv .btn-primary{background:#6d5cff;border-color:#6d5cff;color:#fff}.lmv .btn[disabled]{opacity:.5;cursor:not-allowed}
.lmv-steps,.lmv-progress{margin:0;padding-left:20px;display:grid;gap:4px}
#studioDirectorRoot.lmv-mode .sdir-wrap>:not(.sdir-head):not(.lmv):not(.sdir-gate):not(.sdw-pane){display:none!important}
/* presets-in-workspace-r1: no Director hero card in a preset (all widths); only its buttons (mode, close) stay, in one row */
#studioDirectorRoot.lmv-mode .sdir-head--media{aspect-ratio:auto;min-height:0;max-height:none;padding:0;background:none;border:0;border-radius:0;overflow:visible;isolation:auto;display:flex;justify-content:flex-end;align-items:center;gap:8px}
#studioDirectorRoot.lmv-mode .sdir-head--media>:not(button):not(.sdir-mode):not(.sdir-icon){display:none}
#studioDirectorRoot.lmv-mode .sdir-head--media .sdir-mode,#studioDirectorRoot.lmv-mode .sdir-head--media .sdir-close{position:static}
.lmv-exit{background:none;border:1px solid rgba(255,255,255,.2);border-radius:10px;color:inherit;text-decoration:none;padding:8px 12px;font-weight:600}
@media (max-width:600px){.lmv{padding:14px}.lmv-photos{grid-template-columns:repeat(3,1fr)}}
.lmv{min-width:0;box-sizing:border-box}.lmv *{box-sizing:border-box}
/* parody-presets-r2 duet: passage assignment strip */
.pas-strip{position:relative;height:56px;border-radius:10px;background:#14141f;overflow:hidden;border:1px solid rgba(255,255,255,.12)}
.pas-env{position:absolute;inset:0;display:flex;align-items:flex-end;gap:1px;opacity:.45}.pas-env span{flex:1;background:#8b8ba8;min-width:1px}
.pas-run{position:absolute;top:4px;bottom:4px;border-radius:6px;display:grid;place-items:center;font-size:.75rem;font-weight:700;color:#fff;border:2px dashed rgba(255,255,255,.6);background:rgba(120,120,140,.35)}
.pas-run--p1{background:rgba(249,115,22,.6);border-style:solid;border-color:#f97316}.pas-run--p2{background:rgba(56,189,248,.55);border-style:solid;border-color:#38bdf8}
.pas-run--both{background:linear-gradient(90deg,rgba(249,115,22,.6),rgba(56,189,248,.55));border-style:solid}.pas-run--instrumental{background:rgba(255,255,255,.1);border-style:dotted}.pas-run--uncertain{background:rgba(250,204,21,.35);border-color:#facc15}
.pas-list{margin:0;padding-left:20px;display:grid;gap:8px}.pas-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.pas-row:focus{outline:2px solid #7c6cff;outline-offset:2px;border-radius:8px}
.pas-time{font-variant-numeric:tabular-nums;min-width:96px}.pas-who{min-width:96px;opacity:.85}.lmv .pas-row .btn{padding:6px 10px;font-weight:500}.lmv .pas-row .btn[aria-pressed=true]{background:#6d5cff;border-color:#6d5cff;color:#fff}
.pas-edge input{width:80px}.pas-problems{color:#fca5a5;font-size:.9rem;display:grid;gap:2px}.pas-summary{margin:0;color:#bef264}

/* ---- /css/elabs-presets.css ---- */
/* elabs-presets.css — Viral Presets cards (viral-presets-build-20261114). Layout per landing-openart-align-20261114/ALIGN.md §4.
   E-Labs tokens: body #0A0A0F, card #16161F, violet #5B4FF5 -> #B44CF5 "Use" (not OpenArt's pink). */
.ep-host{--ep-gap:8px;--ep-radius:16px;--ep-card:#16161F;--ep-text:#fff;--ep-sub:#9A9AB8}
.ep-grid{display:flex;align-items:flex-start;gap:var(--ep-gap)}
.ep-col{flex:1 1 0;min-width:0;display:flex;flex-direction:column}

.ep-card{position:relative;display:block;margin:0 0 var(--ep-gap);border-radius:var(--ep-radius);overflow:hidden;background:var(--ep-card);isolation:isolate}
.ep-card[hidden]{display:none}
.ep-link{display:block;position:relative;color:var(--ep-text);text-decoration:none;border-radius:inherit}
.ep-link:focus-visible{outline:2px solid #B44CF5;outline-offset:-2px}
.ep-media{position:relative;display:block;width:100%;aspect-ratio:9/16;background:#101018}
.ep-card--wide .ep-media{aspect-ratio:16/9}
.ep-poster,.ep-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.ep-video{opacity:0;transition:opacity .2s ease}
.ep-card.is-playing .ep-video{opacity:1}
.ep-scrim{position:absolute;left:0;right:0;bottom:0;height:56px;background:linear-gradient(to top,rgba(10,10,15,.85),rgba(10,10,15,0));pointer-events:none}
.ep-title{position:absolute;left:10px;right:10px;bottom:9px;font:600 13px/1.3 Inter,system-ui,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px rgba(0,0,0,.6)}
.ep-badge{position:absolute;left:8px;bottom:30px;max-width:calc(100% - 60px);padding:3px 8px;border-radius:10px;background:rgba(10,10,15,.6);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);font:600 11px/1.25 Inter,system-ui,sans-serif;color:#fff;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
/* polish-r1: badge sits bottom-left above the title (clear of the top-right Use pill and bottom-right Share); wraps instead of ellipsizing. */
.ep-badge[hidden]{display:none}
.ep-use{position:absolute;top:8px;right:8px;display:inline-flex;align-items:center;gap:5px;height:32px;padding:0 12px;border-radius:999px;background:linear-gradient(90deg,#5B4FF5,#B44CF5);color:#fff;font:700 13px/1 Inter,system-ui,sans-serif;box-shadow:0 4px 14px rgba(91,79,245,.45)}
.ep-share{position:absolute;right:8px;bottom:34px;width:36px;height:36px;display:flex;align-items:center;justify-content:center;border:0;border-radius:999px;background:rgba(10,10,15,.6);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:#fff;cursor:pointer;z-index:2}
.ep-share:focus-visible{outline:2px solid #B44CF5;outline-offset:2px}
/* Desktop (>=1024 + real hover): badge, Use and Share fade in on hover / keyboard focus; title always visible. */
@media (min-width:1024px) and (hover:hover) and (pointer:fine){
  .ep-badge,.ep-use,.ep-share{opacity:0;transition:opacity .15s ease}
  .ep-card:hover .ep-badge,.ep-card:hover .ep-use,.ep-card:hover .ep-share,
  .ep-card:focus-within .ep-badge,.ep-card:focus-within .ep-use,.ep-card:focus-within .ep-share{opacity:1}
}
/* Mobile / tablet: everything always visible, Use a little smaller. */
@media (max-width:599px){.ep-use{height:28px;padding:0 10px;font-size:12px}.ep-title{font-size:12px}.ep-share{width:32px;height:32px}}

/* Studio Video strip: 9:16 cards 140 wide, scroll-snap. */
.ep-strip{display:flex;gap:var(--ep-gap);overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:6px;scrollbar-width:thin}
.ep-strip .ep-card{flex:0 0 140px;margin:0;scroll-snap-align:start}
.ep-strip .ep-card .ep-media{aspect-ratio:9/16}
.ep-strip .ep-use{height:26px;padding:0 9px;font-size:12px}
.ep-strip .ep-badge{display:none}
.ep-strip-more{flex:0 0 120px;display:flex;align-items:center;justify-content:center;border-radius:var(--ep-radius);background:#16161F;color:#cfcfe6;font:600 13px Inter,system-ui,sans-serif;text-decoration:none;scroll-snap-align:start}
.ep-strip-wrap{margin:0 0 16px}
.ep-strip-wrap[hidden]{display:none}
.ep-strip-head{display:flex;align-items:baseline;justify-content:space-between;margin:0 0 8px;font:700 14px Inter,system-ui,sans-serif;color:#fff}

.ep-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.ep-chip[aria-pressed="true"]{background:#5B4FF5;color:#fff;border-color:#5B4FF5}

.ep-note{position:relative;border-left:3px solid #6c63ff;font-size:.84rem;line-height:1.45;padding-right:44px;margin-bottom:10px;overflow-wrap:anywhere}
.ep-note__d{opacity:.85;margin-top:3px}
.ep-note__x{position:absolute;top:6px;right:6px;width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:none;border:0;color:inherit;cursor:pointer;border-radius:8px}
.ep-toast{position:fixed;left:50%;top:76px;transform:translate(-50%,-12px);opacity:0;pointer-events:none;z-index:9999;background:#16161F;color:#fff;border:1px solid #2a2a3a;border-radius:10px;padding:10px 14px;font:500 13px Inter,system-ui,sans-serif;transition:opacity .2s,transform .2s;max-width:calc(100vw - 32px)}
.ep-toast.is-on{opacity:1;transform:translate(-50%,0)}

/* viral-presets-r2: home category rows — horizontal scrollers, fixed card height, width from aspect. */
#viral-preset-rows,section:has(>.ep-host--rows){width:100%;box-sizing:border-box;min-width:0;max-width:100%;overflow-x:clip}
.ep-host--rows{display:flex;flex-direction:column;gap:28px;min-width:0;max-width:100%}
.ep-row{width:100%;min-width:0;max-width:100%}
.ep-host--rows{width:100%}
.ep-row-scroller{width:100%;box-sizing:border-box}
.ep-row-nav.is-static .ep-row-btn{display:none}
.ep-row-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:0 0 10px}
.ep-row-title{margin:0;font:700 18px/1.25 Inter,system-ui,sans-serif;color:#fff}
.ep-row-sub{margin:2px 0 0;font:400 13px/1.4 Inter,system-ui,sans-serif;color:var(--ep-sub)}
.ep-row-nav{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.ep-row-more{color:#cfcfe6;font:600 13px Inter,system-ui,sans-serif;text-decoration:none;padding:8px 10px;border-radius:10px}
.ep-row-more:hover,.ep-row-more:focus-visible{color:#fff;background:#16161F}
.ep-row-btn{width:36px;height:36px;border-radius:999px;border:1px solid #2a2a3a;background:#16161F;color:#fff;font:600 20px/1 Inter,system-ui,sans-serif;cursor:pointer;display:flex;align-items:center;justify-content:center}
.ep-row-btn:disabled{opacity:.35;cursor:default}
.ep-row-btn:focus-visible{outline:2px solid #B44CF5;outline-offset:2px}
.ep-row-scroller{--ep-row-h:320px;min-width:0;max-width:100%;display:flex;gap:var(--ep-gap);overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scrollbar-width:none;padding-bottom:2px;overscroll-behavior-x:contain}
.ep-row-scroller::-webkit-scrollbar{display:none}
.ep-row-scroller .ep-card{flex:0 0 auto;margin:0;height:var(--ep-row-h);width:calc(var(--ep-row-h) * 9 / 16);scroll-snap-align:start}
.ep-row-scroller .ep-card--wide{width:calc(var(--ep-row-h) * 16 / 9)}
.ep-row-scroller .ep-link{height:100%}
.ep-row-scroller .ep-media,.ep-row-scroller .ep-card--wide .ep-media{aspect-ratio:auto;height:100%}
.ep-rows-cta{display:flex;justify-content:center;margin-top:4px}
.ep-rows-cta__btn{display:inline-flex;align-items:center;height:44px;padding:0 22px;border-radius:999px;background:linear-gradient(90deg,#5B4FF5,#B44CF5);color:#fff;font:700 14px/1 Inter,system-ui,sans-serif;text-decoration:none;box-shadow:0 4px 14px rgba(91,79,245,.35)}
.ep-rows-cta__btn:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media (max-width:1023px){.ep-row-scroller{--ep-row-h:280px}}
@media (max-width:599px){.ep-row-scroller{--ep-row-h:240px}.ep-row-btn{display:none}.ep-row-title{font-size:16px}.ep-row-sub{display:none}.ep-row-scroller .ep-card--wide{width:min(calc(var(--ep-row-h) * 16 / 9),calc(100vw - 56px))}}

/* Reduced motion: posters only (the JS never attaches a source either). */
@media (prefers-reduced-motion:reduce){.ep-video{display:none}.ep-badge,.ep-use,.ep-share,.ep-video,.ep-toast{transition:none}}

/* trend-presets-r1: honest "Coming soon" cards (no Studio link) and Studio note extras */
.ep-soon{position:absolute;top:8px;right:8px;display:inline-flex;align-items:center;height:28px;padding:0 11px;border-radius:999px;background:rgba(10,10,15,.72);border:1px solid rgba(255,255,255,.28);color:#fff;font:700 12px/1 Inter,system-ui,sans-serif}
.ep-link--soon{cursor:default}
.ep-card--soon .ep-poster{filter:saturate(.75)}
.ep-note__step{color:#B9B2FF;text-decoration:underline}
.ep-note__g{opacity:.78;font-size:12px}

/* preset-intent-r1: bottom info stack (capability line, input-mode + slot chips, title) in normal flow; Start from my photo */
.ep-info{position:absolute;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:24px 52px 9px 8px;background:linear-gradient(to top,rgba(10,10,15,.9),rgba(10,10,15,.55) 70%,rgba(10,10,15,0));pointer-events:none}
.ep-info .ep-title{position:static;align-self:stretch;padding-left:2px}
.ep-chips{display:flex;flex-wrap:wrap;gap:4px}
.ep-chip{display:inline-flex;align-items:center;height:20px;padding:0 7px;border-radius:999px;background:rgba(10,10,15,.66);border:1px solid rgba(255,255,255,.18);color:#fff;font:600 11px/1 Inter,system-ui,sans-serif;white-space:nowrap}
.ep-chip--mode{background:rgba(91,79,245,.82);border-color:rgba(199,210,254,.45)}
.ep-chip--opt{color:#d9f99d;border-color:rgba(217,249,157,.45)}
.ep-cap{font:500 11px/1.25 Inter,system-ui,sans-serif;color:#e4e2f5;text-shadow:0 1px 2px rgba(0,0,0,.8)}
.ep-card .ep-scrim{display:none}
.ep-card .ep-badge{bottom:auto;top:44px}
.ep-photostart{position:absolute;left:8px;top:8px;z-index:2;height:28px;padding:0 10px;border-radius:999px;border:1px solid rgba(255,255,255,.35);background:rgba(10,10,15,.66);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);color:#fff;font:600 11.5px/1 Inter,system-ui,sans-serif;cursor:pointer}
.ep-photostart[aria-pressed="true"]{background:#fff;color:#0b0b12;border-color:#fff}
.ep-photostart:focus-visible{outline:2px solid #B44CF5;outline-offset:2px}
.ep-strip .ep-cap{display:none}.ep-strip .ep-info{padding-right:8px}
@media (max-width:599px){.ep-chip{height:18px;padding:0 6px;font-size:10px}.ep-photostart{height:26px;font-size:11px}.ep-info{padding-right:44px}}

/* ---- /css/hooks-ui.css ---- */
/* hooks-ui r106 (LOCAL-STAGED). Attention hooks for Home, Studio home and Gallery.
   Rules: owner-approved lime New pill (--ds-lime-400 / --ds-lime-fg) and violet primary are reused, not replaced.
   Motion uses transform/opacity/background-position only; every animation is removed under prefers-reduced-motion
   and while the page-level "Pause motion" control sets html.el-motion-paused (if present). No counts are rendered here;
   counts come only from js/hooks-ui.js reading real catalog data. Original E-Labs styling, no reference brand assets. */

:root {
  --hk-violet: var(--ds-violet-500, #6c63ff);
  --hk-violet-hi: var(--ds-violet-300, #a5a0ff);
  --hk-cyan: #38bdf8;
  --hk-lime: var(--ds-lime-400, #a3e635);
  --hk-lime-fg: var(--ds-lime-fg, #0f1a00);
  --hk-ring: 0 0 0 1px rgba(165,160,255,.55), 0 10px 32px -8px rgba(108,99,255,.55), 0 0 22px -6px rgba(56,189,248,.35);
  --hk-ease: cubic-bezier(.2,.7,.2,1);
}

/* 1. Gradient / highlight headline word ------------------------------------------------------------ */
.hk-grad, .hk-on .hk-grad.hk-grad, .home-hero h1 .grad.hk-grad {
  background: linear-gradient(100deg, var(--hk-lime) 0%, #d9f99d 22%, var(--hk-cyan) 48%, var(--hk-violet-hi) 74%, var(--hk-lime) 100%);
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: hk-grad-pan 9s ease-in-out infinite alternate;
}
@keyframes hk-grad-pan { to { background-position: 100% 50%; } }

/* 2. Glow-on-hover card borders (box-shadow ring: no pseudo-element, no layout change) ------------------- */
.hk-on .ds-tile, .hk-on .hs-remix__tile, .hk-on .hs-band a, .hk-on .el-hc, .hk-on .home-banner,
.hk-on .home-tool-card, .hk-on .gallery-card, .hk-on .hs-star {
  transition: box-shadow .25s var(--hk-ease), border-color .25s var(--hk-ease), transform .25s var(--hk-ease);
}
.hk-on .ds-tile:hover, .hk-on .hs-remix__tile:hover, .hk-on .hs-band a:hover, .hk-on .el-hc:hover, .hk-on .home-banner:hover,
.hk-on .home-tool-card:hover, .hk-on .gallery-card:hover, .hk-on .hs-star:hover,
.hk-on .ds-tile:focus-visible, .hk-on .hs-remix__tile:focus-visible, .hk-on .el-hc:focus-visible, .hk-on .home-banner:focus-visible {
  box-shadow: var(--hk-ring);
  border-color: rgba(165,160,255,.6);
}

/* 3. Hover zoom on media tiles (transform only, parents already overflow:hidden) ------------------------- */
.hk-on .hs-remix__tile img, .hk-on .hs-band a img, .hk-on .el-hc img, .hk-on .home-banner > img,
.hk-on .home-tool-media > img, .hk-on .home-tool-media > video, .hk-on .gallery-card img, .hk-on .gallery-card video {
  transition: transform .6s var(--hk-ease);
  will-change: auto;
}
.hk-on .hs-remix__tile:hover img, .hk-on .hs-band a:hover img, .hk-on .el-hc:hover img, .hk-on .home-banner:hover > img,
.hk-on .home-tool-card:hover .home-tool-media > img, .hk-on .home-tool-card:hover .home-tool-media > video,
.hk-on .gallery-card:hover img, .hk-on .gallery-card:hover video { transform: scale(1.06); }
.hk-on .ds-tile:hover .ds-tile__media > img, .hk-on .ds-tile:hover .ds-tile__media > video { transform: scale(1.06); }

/* 4. CTA shine + glow + arrow ------------------------------------------------------------------------ */
.hk-cta { position: relative; overflow: hidden; isolation: isolate;
  box-shadow: 0 0 0 1px rgba(165,160,255,.35), 0 8px 26px -6px rgba(108,99,255,.65); }
.hk-cta:hover { box-shadow: 0 0 0 1px rgba(165,160,255,.6), 0 10px 34px -4px rgba(108,99,255,.85); }
.hk-cta::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.38) 48%, transparent 66%);
  transform: translateX(-120%); animation: hk-shine 4.8s ease-in-out 1.2s infinite; }
@keyframes hk-shine { 0% { transform: translateX(-120%); } 22%, 100% { transform: translateX(120%); } }
.hk-arrow { display: inline-block; margin-left: .45em; transition: transform .2s var(--hk-ease); vertical-align: -0.12em; }
.hk-cta:hover .hk-arrow, .hk-cta:focus-visible .hk-arrow { transform: translateX(3px); }

/* 5. Truthful NEW pill (lime, owner-approved) ----------------------------------------------------------- */
.hk-new { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--hk-lime); color: var(--hk-lime-fg); font-size: .66rem; font-weight: 800; letter-spacing: .03em;
  line-height: 1.5; text-transform: uppercase; vertical-align: middle; }

/* 6. Model ticker (real catalog names) --------------------------------------------------------------- */
.hk-ticker { position: relative; display: flex; align-items: center; gap: 14px; min-height: 46px; margin: 18px auto 0;
  max-width: 1376px; padding: 0 16px; overflow: hidden; contain: layout paint; }
.home-hero .hk-ticker { margin-top: 22px; max-width: 760px; }
.hk-ticker[data-hk-state="empty"] { visibility: hidden; }
.hk-ticker__lead { flex: none; display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700;
  color: rgba(255,255,255,.78); letter-spacing: .02em; white-space: nowrap; }
.hk-ticker__count { font-variant-numeric: tabular-nums; color: #fff; display: inline-block; min-width: 2.2ch; text-align: right; }
.hk-ticker__viewport { position: relative; flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.hk-ticker__track { display: flex; width: max-content; gap: 10px; animation: hk-marquee var(--hk-dur, 60s) linear infinite; }
.hk-ticker:hover .hk-ticker__track, .hk-ticker:focus-within .hk-ticker__track { animation-play-state: paused; }
.hk-ticker__list { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hk-ticker__item { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); color: rgba(255,255,255,.88);
  font-size: .8rem; font-weight: 600; white-space: nowrap; }
.hk-ticker__item .elabs-model-icon, .hk-ticker__item svg, .hk-ticker__item img { width: 16px; height: 16px; flex: none; }
@keyframes hk-marquee { to { transform: translateX(-50%); } }

/* 7. Pulsing dot: only rendered by JS when a truthful freshness signal exists ---------------------------- */
.hk-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--hk-lime); flex: none; }
.hk-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--hk-lime);
  animation: hk-pulse 1.8s ease-out infinite; }
@keyframes hk-pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(2.6); opacity: 0; } }

/* Reduced motion / user-paused motion ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hk-grad, .hk-cta::after, .hk-ticker__track, .hk-dot::after { animation: none !important; }
  .hk-cta::after { display: none; }
  .hk-ticker__viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .hk-ticker__track > [aria-hidden="true"] { display: none; }
  .hk-on .ds-tile:hover .ds-tile__media > img, .hk-on .ds-tile:hover .ds-tile__media > video,
  .hk-on .hs-remix__tile:hover img, .hk-on .hs-band a:hover img, .hk-on .el-hc:hover img, .hk-on .home-banner:hover > img,
  .hk-on .home-tool-card:hover .home-tool-media > img, .hk-on .home-tool-card:hover .home-tool-media > video,
  .hk-on .gallery-card:hover img, .hk-on .gallery-card:hover video { transform: none; }
  .hk-arrow { transition: none; }
}
html.el-motion-paused .hk-grad, html.el-motion-paused .hk-cta::after,
html.el-motion-paused .hk-ticker__track, html.el-motion-paused .hk-dot::after { animation-play-state: paused; }

@media (max-width: 640px) {
  .hk-ticker { gap: 10px; padding: 0 12px; margin-top: 14px; }
  .hk-ticker__lead { font-size: .72rem; }
  .hk-ticker__item { height: 28px; font-size: .76rem; padding: 0 10px; }
}

/* media-fit-r1: per-item re-centring of a cover crop that hides > 45% (16:9 in a tall stretched card) */
.ep-card[data-preset-id="golden-hour-drop"] :is(.ep-poster,.ep-video){object-position:42% 50%}
.ep-card[data-preset-id="toon-beam"] :is(.ep-poster,.ep-video){object-position:50% 45%}
.ep-card--noresult .ep-media{background:radial-gradient(ellipse at 50% 55%,#2e2766 0,#12101f 85%)}
.ep-card--noresult .ep-media{aspect-ratio:9/16}
