/* ================================================================
   Tek Shoter — "desktop" UI
   Black frame · icon rail · wallpaper desk · frosted glass · liquid buttons
   ================================================================ */

:root {
  --font: 'Geist', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
  --ease: cubic-bezier(.22, .9, .24, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  /* set from JS per wallpaper */
  --accent: #2a86ff;      /* liquid core */
  --accent2: #cfe3ff;     /* liquid edge */
  --lq-ink: #0b2a55;      /* text on liquid */
  --tint: rgba(62, 78, 84, .42);
  --wall: #8aa1a6;

  --frame: #000;
  --ink: #fff;
  --ink2: rgba(255, 255, 255, .74);
  --ink3: rgba(255, 255, 255, .5);
  --ink4: rgba(255, 255, 255, .28);
  --line: rgba(255, 255, 255, .14);
  --line2: rgba(255, 255, 255, .24);
  --well: rgba(0, 0, 0, .32);
  --dark: rgba(14, 15, 18, .86);
  --ok: #4ade80; --warn: #fbbf24; --danger: #ff5a6a;
  --yt: #ff2d55; --tw: #9b6bff; --kc: #53fc18;
  --g1: #ff3d8b; --g2: #8b5cff; --g3: #3d7bff;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--frame); }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.5; letter-spacing: -.011em;
  color: var(--ink); background: var(--frame); min-height: 100dvh; overflow: hidden;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; flex: none; }
img { display: block; max-width: 100%; }
::selection { background: color-mix(in srgb, var(--accent) 50%, transparent); }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.bg { display: none; }

/* ================================================================
   Frame / rail / desk
   ================================================================ */
.frame { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0; height: 100dvh; padding: 10px 10px 10px 0; }
.frame.solo { grid-template-columns: minmax(0, 1fr); padding: 10px; }

.rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0 4px; z-index: 30; }
.rail-logo { margin-bottom: 22px; display: grid; place-items: center; }
.rail-nav { display: flex; flex-direction: column; gap: 6px; }
.ri { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: rgba(255,255,255,.62); transition: color .2s, background .25s var(--ease), transform .3s var(--spring); }
.ri svg { width: 20px; height: 20px; }
.ri > span { display: none; }
.ri:hover { color: #fff; background: rgba(255,255,255,.07); }
.ri:active { transform: scale(.9); }
.ri.on { color: #fff; background: rgba(255,255,255,.13); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.ri .badge { position: absolute; top: 2px; right: 0; }
.ri[data-tip]:hover::after, .ri-me[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  padding: 6px 10px; border-radius: 9px; background: #111; border: 1px solid var(--line); white-space: nowrap;
  font: 500 12px var(--mono); color: #fff; pointer-events: none; animation: tipIn .2s var(--ease);
}
@keyframes tipIn { from { opacity: 0; transform: translate(-4px, -50%); } }
.rail .spacer { flex: 1; }
.ri-ai { color: #fff; }
.ri-ai svg { color: var(--accent2); }
.ri-me { position: relative; margin-top: 8px; border-radius: 50%; transition: transform .3s var(--spring); }
.ri-me:active { transform: scale(.9); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; font: 700 10.5px var(--mono); color: var(--lq-ink); background: var(--accent2); box-shadow: 0 0 0 2px var(--frame); }
.badge:empty { display: none; }

.desk {
  position: relative; height: calc(100dvh - 20px); border-radius: 26px; overflow: hidden; isolation: isolate;
  background: var(--wall);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
}
.desk::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 0 120px rgba(0,0,0,.18); pointer-events: none; z-index: 5; }
.wall { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; z-index: -1; animation: wallIn 1s var(--ease); }
.wall-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
@keyframes wallIn { from { opacity: 0; transform: scale(1.03); } }
.desk-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; padding: 0 34px 60px; }
.desk-scroll.center { display: grid; place-items: center; padding: 24px 16px; }

.top { position: sticky; top: 0; z-index: 20; height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -34px 6px; padding: 0 34px; pointer-events: none; }
.top > * { pointer-events: auto; }
.crumb { font: 500 12.5px var(--mono); color: rgba(255,255,255,.82); display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.1); }
.crumb b { color: #fff; font-weight: 500; }
.top-r { display: flex; align-items: center; gap: 10px; }
.top .me-m { display: none; }

/* ================================================================
   Glass & cards
   ================================================================ */
.glass, .card {
  position: relative;
  background: var(--tint);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 20px 50px -24px rgba(0,0,0,.45);
}
.card { padding: 22px; }
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), rgba(255,255,255,.09), transparent 45%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.card:hover::before { opacity: 1; }
.dark { background: var(--dark) !important; }

/* gradient-edge "hero" card */
.card.glow, .glow-edge { background: rgba(10, 10, 14, .82); border-color: transparent; box-shadow: -14px 0 40px -22px var(--g1), 14px 14px 44px -22px var(--g3), 0 20px 50px -24px rgba(0,0,0,.6); }
.card.glow::after, .glow-edge::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(150deg, var(--g1), var(--g2) 45%, var(--g3) 80%, rgba(61,123,255,.2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}

.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-h h3 { font-size: 15px; font-weight: 600; letter-spacing: -.015em; display: flex; align-items: center; gap: 9px; }
.card-h h3 svg { width: 17px; height: 17px; color: var(--ink2); }
.card-h p, .sub { color: var(--ink2); font-size: 13.5px; }
.label, .eyebrow { font: 500 11.5px var(--mono); letter-spacing: .02em; color: var(--ink3); text-transform: none; }
.label { display: block; margin: 0 0 8px 2px; }
.muted { color: var(--ink2); } .faint { color: var(--ink3); } .tiny { font-size: 12px; }
.grad { font-style: normal; color: var(--ink2); }
kbd { font: 500 11px var(--mono); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink3); }

/* ---------- mega title behind glass ---------- */
.hero { position: relative; z-index: 0; margin-top: 6px; }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; min-height: 42px; margin-bottom: 4px; }
.hero-act { display: flex; gap: 8px; flex-wrap: wrap; }
.hero .eyebrow { color: #fff; padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.1); }
.mega {
  font-size: clamp(72px, 13vw, 196px); font-weight: 700; letter-spacing: -.065em; line-height: .8;
  color: #fff; white-space: nowrap; margin: 0 0 -.27em -.04em; padding-bottom: .1em;
  text-shadow: 0 6px 60px rgba(0,0,0,.12); user-select: none; pointer-events: none;
}
.hero ~ * { position: relative; z-index: 1; }
.mega-c { text-align: center; margin: 0 0 -.38em; }

/* ================================================================
   Buttons
   ================================================================ */
.btn {
  --h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: 999px; white-space: nowrap;
  font-size: 14px; font-weight: 550; letter-spacing: -.01em; color: #fff;
  background: rgba(0, 0, 0, .42); border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform .35s var(--spring), background .25s, border-color .25s, box-shadow .3s, filter .2s;
  user-select: none; -webkit-user-select: none; position: relative;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { background: rgba(0, 0, 0, .58); border-color: rgba(255,255,255,.22); }
.btn:active { transform: scale(.95); transition-duration: .1s; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* liquid glass */
.btn.primary {
  color: var(--lq-ink); font-weight: 600; border: 0;
  background:
    radial-gradient(60% 75% at 50% 18%, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, transparent) 30%, transparent 72%),
    radial-gradient(55% 50% at 50% 108%, rgba(255,255,255,.95), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent2) 85%, var(--accent)), var(--accent2));
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,.88),
    inset 0 2px 1.5px rgba(255,255,255,.95),
    inset 0 -3px 8px rgba(255,255,255,.55),
    0 10px 28px -10px var(--accent),
    0 2px 6px -2px rgba(0,0,0,.35);
}
.btn.primary:hover { filter: brightness(1.05) saturate(1.1); box-shadow: inset 0 0 0 1.5px #fff, inset 0 2px 1.5px #fff, inset 0 -3px 8px rgba(255,255,255,.6), 0 14px 36px -10px var(--accent), 0 2px 6px -2px rgba(0,0,0,.35); }
.btn.white { color: #000; background: #fff; border-color: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn.white:hover { background: #e9e9e9; }
.btn.ghost { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn.ghost:hover { background: rgba(255,255,255,.1); }
.btn.danger { color: #ff8a95; }
.btn.danger:hover { background: rgba(255, 90, 106, .16); border-color: rgba(255, 90, 106, .35); }
.btn.sm { --h: 34px; padding: 0 14px; font-size: 13px; }
.btn.icon { width: var(--h); padding: 0; }
.btn.block { width: 100%; }
.btn .spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- status pill + dot-matrix loader ---------- */
.spill { display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 15px 0 12px; border-radius: 999px; background: rgba(17,17,17,.9); border: 1px solid rgba(255,255,255,.06); font: 500 12.5px var(--mono); color: #fff; letter-spacing: 0; white-space: nowrap; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.spill.sm { height: 28px; padding: 0 11px 0 9px; gap: 8px; font-size: 11.5px; }
.spill.ok .mx i { background: var(--ok); }
.mx { display: inline-grid; grid-template-columns: repeat(3, 4px); grid-auto-rows: 4px; gap: 2px; flex: none; }
.spill.sm .mx { grid-template-columns: repeat(3, 3px); grid-auto-rows: 3px; gap: 2px; }
.mx i { border-radius: 50%; background: #fff; opacity: .14; animation: mxp var(--dur, 1.3s) ease-in-out infinite; animation-delay: calc(var(--d) * var(--step, .13s)); }
.mx i.off { animation: none; opacity: .08; }
.mx.still i { animation: none; opacity: .3; }
.mx.still i.on { opacity: 1; }
.mx-scan { --dur: 1.6s; --step: .16s; }
.mx-send { --dur: 1.1s; --step: .12s; }
.mx-search { --dur: 1.4s; --step: .15s; }
@keyframes mxp { 0%, 100% { opacity: .14; } 35% { opacity: 1; } }

/* ---------- fields ---------- */
.field, .textarea, select.field {
  width: 100%; height: 46px; padding: 0 16px; border-radius: 14px;
  background: var(--well); border: 1px solid rgba(255,255,255,.1); color: #fff;
  font-size: 15px; outline: none;
  transition: border-color .2s, box-shadow .25s, background .2s;
}
.textarea { height: auto; min-height: 96px; padding: 13px 16px; resize: vertical; line-height: 1.5; }
.field::placeholder, .textarea::placeholder { color: var(--ink4); }
.field:focus, .textarea:focus { border-color: rgba(255,255,255,.35); background: rgba(0,0,0,.42); box-shadow: 0 0 0 4px rgba(255,255,255,.07); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }
.spacer { flex: 1; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--well); border: 1px solid rgba(255,255,255,.08); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 550; color: var(--ink2); white-space: nowrap; transition: color .2s, background .3s var(--ease), box-shadow .3s; }
.seg button:hover { color: #fff; }
.seg button.on { color: #000; background: #fff; box-shadow: 0 4px 14px -6px rgba(0,0,0,.5); }
.seg.full { display: flex; } .seg.full button { flex: 1; }

.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.14); transition: background .3s var(--ease), box-shadow .3s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .4s var(--spring); }
.switch input:checked + span { background: radial-gradient(70% 90% at 40% 30%, var(--accent), color-mix(in srgb, var(--accent2) 70%, var(--accent))); border-color: rgba(255,255,255,.6); box-shadow: inset 0 1px 1px rgba(255,255,255,.7); }
.switch input:checked + span::after { transform: translateX(18px); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, #fff var(--p, 50%), rgba(0,0,0,.4) var(--p, 50%)); border: 1px solid rgba(255,255,255,.12); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: rgba(0,0,0,.4); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 99px; background: #fff; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.45); transition: transform .2s var(--spring); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.2); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; }
.ctrl { display: grid; gap: 4px; }
.ctrl-h { display: flex; justify-content: space-between; align-items: baseline; }
.ctrl-h .label { margin: 0; }
.ctrl-h output { font: 500 12.5px var(--mono); }

input[type=color] { -webkit-appearance: none; appearance: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: none; cursor: pointer; padding: 3px; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: 99px;
  font-size: 13px; font-weight: 550; color: rgba(255,255,255,.85); white-space: nowrap;
  background: rgba(0,0,0,.36); border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: all .3s var(--ease);
}
.chip svg { width: 15px; height: 15px; }
.chip:hover { color: #fff; background: rgba(0,0,0,.5); }
.chip.on { color: #000; background: #fff; border-color: #fff; }
.chip .n { font: 500 11px var(--mono); opacity: .55; }
.chip.dash { border-style: dashed; border-color: rgba(255,255,255,.3); }
.chip .x { display: grid; place-items: center; width: 18px; height: 18px; margin-right: -6px; border-radius: 50%; opacity: .6; }
.chip .x:hover { opacity: 1; background: rgba(0,0,0,.1); }
.chip .x svg { width: 12px; height: 12px; }

.pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 99px; font: 500 11.5px var(--mono); background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.1); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); } .pill.warn { color: var(--warn); } .pill.off { color: var(--ink3); }
.pill.live .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }

/* ---------- logo mark ---------- */
.mark { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; background: #fff; color: #000; box-shadow: 0 6px 20px -8px rgba(255,255,255,.4); }
.mark svg { width: 22px; height: 22px; }
.mark.xl { width: 64px; height: 64px; border-radius: 20px; }
.mark.xl svg { width: 38px; height: 38px; }

.boot { height: 100dvh; display: grid; place-items: center; }
.boot-mark { width: 40px; height: 40px; border-radius: 12px; background: #fff; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.85); opacity: .5; } }

/* ================================================================
   Lock & accounts
   ================================================================ */
.lock-wrap { width: min(560px, 100%); display: grid; justify-items: center; }
.lock-card { width: min(420px, 100%); padding: 34px 30px 26px; text-align: center; border-radius: 28px; animation: rise .8s var(--ease) both; }
.lock-card .mark { margin: 0 auto 20px; }
.lock-card h2 { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.lock-card p.sub { margin: 6px 0 24px; }
.lock-card form { display: grid; gap: 12px; }
.lock-card .field { height: 54px; border-radius: 999px; padding: 0 22px; font-size: 16px; letter-spacing: .14em; text-align: center; }
.lock-card .field::placeholder { letter-spacing: 0; }
.lock-card .btn.primary { --h: 52px; font-size: 15.5px; }
.lock-card .err { min-height: 20px; font: 500 12.5px var(--mono); color: #ff9aa4; }
.lock-card .foot { margin-top: 8px; display: flex; justify-content: center; }
.shake { animation: shake .5s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
.lock-card.unlock { animation: unlock .6s var(--ease) forwards; }
@keyframes unlock { to { opacity: 0; transform: scale(1.05) translateY(-6px); filter: blur(10px); } }

.who { width: min(900px, 100%); display: grid; justify-items: center; text-align: center; }
.who-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.who-tile { width: 156px; padding: 22px 12px 18px; border-radius: 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; transition: transform .45s var(--spring); animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 80ms); }
.who-tile:hover { transform: translateY(-6px); }
.who-tile:active { transform: scale(.96); }
.who-tile b { font-size: 15px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-tile small { font: 500 11px var(--mono); color: var(--ink3); margin-top: -8px; }
.who-tile.add { background: rgba(0,0,0,.28); border-style: dashed; border-color: rgba(255,255,255,.3); }
.who-tile.add .av { background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.who-foot { margin-top: 28px; }

.av { --s: 44px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: grid; place-items: center; position: relative; overflow: hidden;
  font-weight: 650; font-size: calc(var(--s) * .4); color: #fff; letter-spacing: -.02em;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.5), transparent 45%), conic-gradient(from 210deg, var(--c1, #ff3d8b), var(--c2, #3d7bff), var(--c1, #ff3d8b));
  box-shadow: inset 0 1px 1px rgba(255,255,255,.5), 0 4px 14px -4px rgba(0,0,0,.4); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.xl { --s: 80px; } .av.lg { --s: 50px; } .av.sm { --s: 32px; } .av.xs { --s: 24px; font-size: 10px; }
.av svg { width: 42%; height: 42%; }

/* ================================================================
   Views
   ================================================================ */
.view { max-width: 1240px; margin: 0 auto; }
.view.enter > * { animation: rise .6s var(--ease) both; }
.view.enter > *:nth-child(2) { animation-delay: 70ms; }
.view.enter > *:nth-child(3) { animation-delay: 130ms; }
.view.enter > *:nth-child(n+4) { animation-delay: 180ms; }
.view.enter .mega { animation: megaIn .9s var(--ease) both; }
@keyframes megaIn { from { opacity: 0; transform: translateY(30px); letter-spacing: -.02em; } }
.stagger > * { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- home ---------- */
.home-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.stat { grid-column: span 4; display: flex; flex-direction: column; cursor: pointer; transition: transform .45s var(--spring); min-height: 168px; }
.stat:hover { transform: translateY(-3px); }
.stat .top-l { display: flex; justify-content: space-between; align-items: center; margin-bottom: auto; }
.stat .ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1); }
.stat .ico svg { width: 16px; height: 16px; }
.stat .num { font-size: 56px; font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; margin-top: 18px; }
.stat .lbl { font: 500 12px var(--mono); color: var(--ink2); margin-top: 6px; }
.steps { grid-column: span 7; }
.engine { grid-column: span 5; }
.teaser { grid-column: span 12; }

.ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.12) 0); transition: --p 1s var(--ease); position: relative; }
.ring::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #0c0c10; }
.ring b { position: relative; font: 500 12.5px var(--mono); }
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
.step-list { display: grid; gap: 2px; }
.step { display: flex; align-items: center; gap: 13px; padding: 11px 10px; border-radius: 14px; text-align: left; width: 100%; transition: background .2s; }
.step:hover { background: rgba(255,255,255,.06); }
.step .ck { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); transition: all .4s var(--spring); }
.step .ck svg { width: 14px; height: 14px; opacity: .25; transition: all .4s var(--spring); }
.step.done .ck { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); }
.step.done .ck svg { opacity: 1; }
.step.next .ck { background: #fff; color: #000; border-color: #fff; }
.step.next .ck svg { opacity: 1; }
.step .t { flex: 1; font-weight: 500; font-size: 14.5px; }
.step.done .t { color: var(--ink3); }
.step > svg { color: var(--ink4); transition: transform .3s var(--spring); }
.step:hover > svg { transform: translateX(3px); color: #fff; }

.engine ol { list-style: none; display: grid; gap: 4px; counter-reset: s; margin-top: 4px; }
.engine li { display: flex; gap: 12px; align-items: center; padding: 8px 0; font-size: 13.5px; color: var(--ink2); counter-increment: s; border-bottom: 1px dashed rgba(255,255,255,.1); }
.engine li:last-child { border-bottom: 0; }
.engine li::before { content: '0' counter(s); font: 500 11px var(--mono); color: var(--ink3); width: 20px; }
.code { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.08); font: 400 12px/1.7 var(--mono); color: var(--ink2); overflow-x: auto; white-space: pre; }
.code .k { color: #c792ff; } .code .s { color: #8fe3a5; } .code .n { color: var(--ink4); user-select: none; margin-right: 12px; }

.teaser { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.teaser .orb { width: 50px; height: 50px; border-radius: 50%; flex: none; display: grid; place-items: center; color: var(--lq-ink);
  background: radial-gradient(60% 70% at 50% 25%, var(--accent), transparent 75%), radial-gradient(60% 50% at 50% 110%, #fff, transparent 70%), var(--accent2);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.85), 0 10px 30px -10px var(--accent); }
.teaser .orb svg { width: 24px; height: 24px; }
.teaser > div:nth-child(2) { flex: 1; min-width: 220px; }
.teaser h3 { font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
.teaser .chips { flex-wrap: wrap; overflow: visible; }

/* ---------- channels ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .chips { flex: 1; min-width: 0; }
.search { position: relative; width: 260px; max-width: 100%; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink3); }
.search .field { height: 38px; padding-left: 40px; font-size: 14px; border-radius: 99px; }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.creator { padding: 18px; cursor: pointer; transition: transform .45s var(--spring), border-color .3s; display: grid; gap: 14px; }
.creator:hover { transform: translateY(-3px); border-color: var(--line2); }
.creator:active { transform: scale(.985); }
.cr-top { display: flex; align-items: center; gap: 13px; min-width: 0; }
.cr-name { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.cr-name b { font-size: 16px; font-weight: 600; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-name span { font: 500 11.5px var(--mono); color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.pfs { display: flex; gap: 6px; flex-wrap: wrap; }
.pf { --c: var(--yt); display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px 0 6px; border-radius: 99px; font-size: 12.5px; font-weight: 550; max-width: 100%;
  background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.1); }
.pf.tw { --c: var(--tw); } .pf.kc { --c: var(--kc); }
.pf .lg { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; flex: none; }
.pf.kc .lg { color: #000; }
.pf .lg svg { width: 10px; height: 10px; }
.pf .h { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.pf .st { font: 500 11px var(--mono); opacity: .7; }
.pf.guess, .pf.match { border-style: dashed; border-color: rgba(255,255,255,.22); }
.pf.none { background: transparent; border: 1px dashed rgba(255,255,255,.2); color: var(--ink3); }
.pf.none .lg { background: rgba(255,255,255,.1); color: var(--ink3); }
.cr-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.1); font: 500 11.5px var(--mono); color: var(--ink3); }
.cr-foot label.tg { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--ink2); }
.cr-foot .switch { width: 40px; height: 24px; } .cr-foot .switch span::after { width: 16px; height: 16px; } .cr-foot .switch input:checked + span::after { transform: translateX(16px); }

.empty { text-align: center; padding: 56px 24px; display: grid; justify-items: center; gap: 10px; }
.empty .art { position: relative; width: 150px; height: 116px; margin-bottom: 14px; }
.empty .art i { position: absolute; width: 60px; height: 102px; border-radius: 14px; top: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: float 5s ease-in-out infinite; }
.empty .art i:nth-child(1) { left: 8px; transform: rotate(-12deg); animation-delay: -1s; }
.empty .art i:nth-child(2) { left: 45px; z-index: 1; top: 0; background: radial-gradient(70% 60% at 50% 25%, var(--accent), transparent 80%), var(--accent2); border: 1.5px solid #fff; }
.empty .art i:nth-child(3) { left: 82px; transform: rotate(12deg); animation-delay: -2.5s; }
@keyframes float { 50% { translate: 0 -8px; } }
.empty h3 { font-size: 24px; font-weight: 600; letter-spacing: -.035em; }
.empty p { color: var(--ink2); max-width: 380px; }
.empty .row { margin-top: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- studio ---------- */
.studio { display: grid; grid-template-columns: 210px minmax(260px, 330px) minmax(0, 1fr); gap: 14px; align-items: start; }
.presets { position: sticky; top: 74px; padding: 10px; display: grid; gap: 3px; }
.presets .t { font: 500 11.5px var(--mono); color: var(--ink3); padding: 6px 10px 8px; }
.pr { display: grid; gap: 1px; padding: 10px 12px; border-radius: 14px; text-align: left; transition: background .2s; width: 100%; }
.pr:hover { background: rgba(255,255,255,.07); }
.pr.on { background: #fff; color: #000; }
.pr.on small { color: rgba(0,0,0,.55); }
.pr b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr small { font: 500 11px var(--mono); color: var(--ink3); }
.pr-chips { display: none; }

.prev-col { position: sticky; top: 74px; display: grid; gap: 12px; justify-items: center; }
.phone { width: 100%; max-width: 300px; padding: 8px; border-radius: 40px; background: #050505; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 70px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.1); }
.screen { --ar: 9/16; position: relative; width: 100%; aspect-ratio: var(--ar); border-radius: 32px; overflow: hidden; container-type: inline-size; transition: aspect-ratio .5s var(--ease); background: #0b1020; touch-action: none; user-select: none; -webkit-user-select: none; }
.scene { position: absolute; inset: 0; transition: inset .5s var(--ease); }
.scene .sky { position: absolute; inset: 0; background: linear-gradient(180deg, #3a2a6b 0%, #c2557a 45%, #f2a65a 62%, #2a1f3d 62.2%, #1b1528 100%); }
.scene .sun { position: absolute; left: 50%; top: 44%; width: 38%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: linear-gradient(#ffe29a, #ff8a5c); box-shadow: 0 0 60px #ff9a6a; }
.scene .hill { position: absolute; bottom: 0; left: -10%; right: -10%; height: 42%; background: linear-gradient(#2d2146, #120d1d); clip-path: polygon(0 40%, 18% 22%, 34% 36%, 52% 12%, 70% 30%, 86% 18%, 100% 34%, 100% 100%, 0 100%); }
.scene .cross { position: absolute; left: 50%; top: 50%; width: 9%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.scene .cross::before, .scene .cross::after { content: ''; position: absolute; background: #7dffb2; border-radius: 2px; box-shadow: 0 0 6px #7dffb2; }
.scene .cross::before { left: 45%; width: 10%; top: 0; bottom: 0; } .scene .cross::after { top: 45%; height: 10%; left: 0; right: 0; }
.scene .hud { position: absolute; left: 6%; bottom: 5%; display: flex; gap: 6%; width: 50%; }
.scene .hud i { flex: 1; height: 1.6cqw; min-height: 3px; border-radius: 9px; background: rgba(255,255,255,.75); }
.scene .hud i:first-child { background: #ff5a6a; flex: 2; }
.cam { position: absolute; left: 0; right: 0; top: 0; height: 0; overflow: hidden; background: radial-gradient(circle at 50% 120%, #4b3a7a, #1a1530); transition: height .5s var(--ease); }
.cam::before { content: ''; position: absolute; left: 50%; bottom: -6%; width: 46%; height: 52%; transform: translateX(-50%); border-radius: 50% 50% 0 0; background: #6b5aa8; }
.cam::after { content: ''; position: absolute; left: 50%; bottom: 40%; width: 22%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: #8a79c9; }
.screen[data-layout="facecam-top"] .cam { height: 34%; }
.screen[data-layout="facecam-top"] .scene { inset: 34% 0 0 0; }
.screen[data-layout="split"] .cam { height: 50%; }
.screen[data-layout="split"] .scene { inset: 50% 0 0 0; }

.cap { position: absolute; transform: translate(-50%, -50%); width: 88%; text-align: center; cursor: grab; z-index: 3; touch-action: none; font-family: 'Inter', var(--font);
  font-weight: 900; line-height: 1.06; letter-spacing: -.01em; font-size: calc(var(--s, 30) / 360 * 100cqw); color: var(--c, #fff); transition: font-size .3s var(--ease); }
.cap.dragging, .logo-el.dragging { cursor: grabbing; transition: none; }
.cap.dragging::after, .logo-el.dragging::after { content: ''; position: absolute; inset: -6px; border: 1.5px dashed rgba(255,255,255,.7); border-radius: 10px; }
.cap.up { text-transform: uppercase; }
.cap .hl { color: var(--hl, #ffd84d); margin: 0 .1em; }
.cap .emo { display: inline-block; }
.cap.pop { -webkit-text-stroke: .14em #000; paint-order: stroke fill; text-shadow: 0 .08em 0 #000; }
.cap.pop .hl { display: inline-block; animation: popw 1.4s var(--spring) infinite; }
@keyframes popw { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.14) rotate(-2deg); } 30% { transform: scale(1); } }
.cap.karaoke { -webkit-text-stroke: .1em #000; paint-order: stroke fill; }
.cap.karaoke span:not(.emo) { display: inline-block; padding: 0 .12em; border-radius: .18em; animation: kara 3.2s infinite; animation-delay: calc(var(--w) * .4s); }
.cap.karaoke .hl { color: inherit; }
@keyframes kara { 0%, 12% { background: var(--hl); color: #000; -webkit-text-stroke: 0; } 13%, 100% { background: transparent; } }
.cap.minimal { font-weight: 650; letter-spacing: 0; text-shadow: 0 2px 12px rgba(0,0,0,.65), 0 1px 2px rgba(0,0,0,.6); }
.cap.minimal .hl { color: inherit; text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: .12em; text-underline-offset: .14em; }
.cap.box .in { display: inline; padding: .14em .36em; border-radius: .3em; background: rgba(10,10,14,.82); -webkit-box-decoration-break: clone; box-decoration-break: clone; line-height: 1.5; font-weight: 750; }
.cap.neon { color: var(--hl); font-weight: 800; text-shadow: 0 0 .1em #fff, 0 0 .3em var(--hl), 0 0 .8em var(--hl), 0 0 1.6em var(--hl); }
.cap.neon .hl { color: #fff; }
.cap.komiks { color: #ffe14d; font-style: italic; -webkit-text-stroke: .16em #000; paint-order: stroke fill; text-shadow: .08em .1em 0 #000; transform: translate(-50%, -50%) rotate(-3deg); }
.cap.komiks .hl { color: #ff5a6a; }

.logo-el { position: absolute; transform: translate(-50%, -50%); z-index: 4; cursor: grab; touch-action: none; transition: width .3s var(--ease), opacity .3s; }
.logo-el img { width: 100%; height: auto; pointer-events: none; border-radius: 6px; }
.logo-el .ph-logo { aspect-ratio: 1; display: grid; place-items: center; border-radius: 22%; border: 1.5px dashed rgba(255,255,255,.65); color: rgba(255,255,255,.85); font: 700 max(8px, 2.4cqw) var(--mono); background: rgba(0,0,0,.25); }
.guide { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: #ff3df0; box-shadow: 0 0 8px #ff3df0; opacity: 0; z-index: 5; pointer-events: none; transition: opacity .15s; }
.screen.guide-x .guide { opacity: 1; }
.tag { position: absolute; left: 10px; top: 10px; z-index: 6; padding: 4px 9px; border-radius: 99px; font: 500 10px var(--mono); color: #fff; background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); pointer-events: none; }
.ovl { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .25s; display: grid; place-items: center; }
.ovl.on { opacity: 1; }
.ovl > * { animation: popIn .45s var(--spring); }
.ovl img, .ovl video { max-width: 100%; max-height: 100%; object-fit: contain; }
.ovl.full { background: #000; }
.ovl.full img, .ovl.full video { width: 100%; height: 100%; object-fit: cover; }
.ovl.overlay > * { width: 80%; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.ovl.corner { place-items: start end; padding: 14% 5% 0 0; }
.ovl.corner > * { width: 40%; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 24px rgba(0,0,0,.5); }
.ovl-ph { display: grid; place-items: center; gap: 6px; padding: 14% 8%; text-align: center; color: var(--lq-ink); font-size: 3.4cqw; font-weight: 700; background: radial-gradient(70% 70% at 50% 20%, var(--accent), transparent 80%), var(--accent2); }
.ovl-ph svg { width: 9cqw; height: 9cqw; }
@keyframes popIn { from { transform: scale(.85); opacity: 0; } }

.player { width: 100%; max-width: 300px; padding: 10px 12px; display: grid; gap: 10px; border-radius: 22px; }
.player .row { justify-content: space-between; }
.tcode { font: 500 12px var(--mono); color: var(--ink2); }
.tl { position: relative; height: 32px; border-radius: 10px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.1); cursor: pointer; overflow: hidden; }
.tl .tk { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.08); }
.tl .rb { position: absolute; top: 5px; bottom: 5px; min-width: 6px; border-radius: 6px; background: radial-gradient(80% 100% at 50% 0%, var(--accent), var(--accent2)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.tl .head { position: absolute; top: 0; bottom: 0; width: 2px; left: 0; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.8); border-radius: 2px; }

.ctrl-col { display: grid; gap: 12px; min-width: 0; }
.sec { padding: 20px; }
.sec .card-h { margin-bottom: 16px; }
.sec .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pname { font-size: 26px; font-weight: 650; letter-spacing: -.04em; background: transparent; border: 0; outline: 0; width: 100%; padding: 0; color: #fff; border-bottom: 1px dashed transparent; }
.pname:focus, .pname:hover { border-bottom-color: rgba(255,255,255,.3); }
.tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tpl { text-align: left; padding: 13px 14px; border-radius: 16px; background: rgba(0,0,0,.32); border: 1px solid rgba(255,255,255,.09); transition: transform .4s var(--spring), background .2s, border-color .2s; display: grid; gap: 3px; }
.tpl:hover { transform: translateY(-2px); background: rgba(0,0,0,.45); border-color: rgba(255,255,255,.2); }
.tpl:active { transform: scale(.97); }
.tpl b { font-size: 14px; font-weight: 600; } .tpl small { font-size: 12px; color: var(--ink3); line-height: 1.35; }
.tpl .sw { display: block; height: 4px; width: 34px; border-radius: 99px; margin-bottom: 9px; background: linear-gradient(90deg, var(--a1), var(--a2)); }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sty { height: 72px; border-radius: 16px; display: grid; place-items: center; position: relative; overflow: hidden; background: linear-gradient(160deg, #2a2340, #0f0c18); border: 1px solid rgba(255,255,255,.1); transition: transform .4s var(--spring), border-color .2s, box-shadow .3s; container-type: inline-size; }
.sty:hover { transform: translateY(-2px); }
.sty.on { border-color: #fff; box-shadow: 0 0 0 2px #fff; }
.sty .cap { position: static; transform: none; width: auto; cursor: pointer; font-size: 17px; --c: #fff; --hl: #ffd84d; }
.sty.komiks-s .cap { transform: rotate(-3deg); }
.sty small { position: absolute; left: 0; right: 0; bottom: 5px; font: 500 10px var(--mono); color: rgba(255,255,255,.6); }
.rules { display: grid; gap: 8px; }
.rule { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.09); animation: rise .5s var(--ease) both; }
.rule .thumb { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.1); color: var(--ink3); cursor: pointer; }
.rule .thumb img, .rule .thumb video { width: 100%; height: 100%; object-fit: cover; }
.rule-b { display: grid; gap: 8px; min-width: 0; }
.rule-b .row { flex-wrap: wrap; gap: 8px; }
.mini { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 12px; border-radius: 99px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.1); font: 500 11.5px var(--mono); color: var(--ink3); }
.mini input { width: 44px; height: 28px; background: transparent; border: 0; outline: 0; font: 500 13px var(--mono); color: #fff; }
.rule .seg button { height: 26px; padding: 0 10px; font-size: 12px; }
.media-lib { display: flex; gap: 8px; flex-wrap: wrap; }
.mchip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; border-radius: 99px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1); font-size: 12.5px; font-weight: 550; max-width: 220px; }
.mchip .th { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: rgba(0,0,0,.4); display: grid; place-items: center; flex: none; }
.mchip .th img, .mchip .th video { width: 100%; height: 100%; object-fit: cover; }
.mchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart { display: grid; }
.smart label { display: flex; align-items: center; gap: 14px; padding: 11px 2px; border-bottom: 1px solid rgba(255,255,255,.08); cursor: pointer; }
.smart label:last-child { border-bottom: 0; }
.smart label > span:first-child { flex: 1; display: grid; line-height: 1.3; }
.smart b { font-size: 14px; font-weight: 550; } .smart small { font-size: 12.5px; color: var(--ink3); }
.ai-res { display: grid; gap: 6px; margin-top: 12px; }
.ai-res div { display: flex; gap: 9px; align-items: center; font-size: 13px; color: var(--ink2); animation: rise .4s var(--ease) both; }
.ai-res svg { color: var(--ok); width: 15px; height: 15px; }

/* ---------- clips ---------- */
.notice { display: flex; gap: 14px; align-items: center; padding: 16px 18px; margin-bottom: 16px; flex-wrap: wrap; }
.notice > div { flex: 1; min-width: 220px; }
.notice b { display: block; font-weight: 600; margin-bottom: 1px; }
.notice p { color: var(--ink2); font-size: 13.5px; }
.jobs { display: grid; gap: 10px; }
.job { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; }
.job .fr { width: 42px; height: 64px; border-radius: 11px; position: relative; overflow: hidden; background: radial-gradient(80% 60% at 50% 25%, var(--accent), transparent 80%), var(--accent2); border: 1.5px solid #fff; }
.job .fr::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-100%); animation: shim 2.2s infinite; }
@keyframes shim { to { transform: translateX(100%); } }
.job-b { min-width: 0; display: grid; gap: 6px; }
.job-b b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-b .row { gap: 8px; flex-wrap: wrap; font: 500 11.5px var(--mono); color: var(--ink3); }
.avs { display: flex; } .avs .av { margin-left: -7px; box-shadow: 0 0 0 2px rgba(0,0,0,.6); } .avs .av:first-child { margin-left: 0; }

/* ---------- clip cards ---------- */
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.clip { padding: 8px; display: grid; gap: 10px; align-content: start; }
.clip-v { position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #000; cursor: pointer; }
.clip-v img, .clip-v video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip-v video { z-index: 2; background: #000; }
.clip-v::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55)); pointer-events: none; }
.clip-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.9); width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; z-index: 1; color: #fff;
  background: rgba(255,255,255,.18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.4); opacity: 0; transition: all .35s var(--spring); }
.clip-play svg { width: 20px; height: 20px; margin-left: 3px; }
.clip-v:hover .clip-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.clip-dur, .clip-score { position: absolute; z-index: 1; bottom: 10px; padding: 3px 8px; border-radius: 99px; font-size: 11px; color: #fff; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.clip-dur { right: 10px; } .clip-score { left: 10px; }
.clip-v.playing .clip-dur, .clip-v.playing .clip-score, .clip-v.playing .clip-play { display: none; }
.clip-b { display: grid; gap: 4px; padding: 0 6px 6px; min-width: 0; }
.clip-b b { font-size: 14.5px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clip-act { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.clip-act .btn.sm { padding: 0 11px; }
.post-tt { background: #000; } .post-tt svg { width: 15px; height: 15px; }
.post-yt svg { width: 15px; height: 15px; color: #fff; background: var(--yt); border-radius: 5px; padding: 3px; }
.btn.done { color: var(--ok); border-color: rgba(74,222,128,.35); }
.btn.done svg { background: none; color: var(--ok); }
.post { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; }
.post-v { width: 100%; aspect-ratio: 9 / 16; border-radius: 16px; background: #000; object-fit: cover; }
@media (max-width: 560px) { .post { grid-template-columns: 1fr; } .post-v { max-height: 46vh; } }

/* ---------- settings ---------- */
.set-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.set-grid > .themes-card { grid-column: span 12; }
.set-grid > .half { grid-column: span 6; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.th-card { text-align: left; border-radius: 20px; padding: 6px 6px 10px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.1); transition: transform .4s var(--spring), border-color .2s, box-shadow .3s; }
.th-card:hover { transform: translateY(-3px); }
.th-card.on { border-color: #fff; box-shadow: 0 0 0 2px #fff; }
.th-prev { display: block; position: relative; aspect-ratio: 16 / 10; border-radius: 15px; overflow: hidden; margin-bottom: 9px; background: #222; }
.th-prev canvas, .th-prev img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.th-prev .up { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 8px, transparent 8px 16px); }
.th-prev .liq { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 14px; border-radius: 99px; background: radial-gradient(70% 90% at 50% 20%, var(--la), transparent 80%), var(--lb); box-shadow: inset 0 0 0 1px #fff; }
.th-card b { padding: 0 6px; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.th-card b svg { width: 15px; height: 15px; opacity: 0; transform: scale(.5); transition: all .35s var(--spring); }
.th-card.on b svg { opacity: 1; transform: none; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.5), transparent 45%), conic-gradient(from 210deg, var(--c1), var(--c2), var(--c1)); transition: transform .35s var(--spring), box-shadow .2s; }
.swatch:hover { transform: scale(1.1); }
.swatch.on { box-shadow: 0 0 0 3px rgba(0,0,0,.6), 0 0 0 5px #fff; }
.conn { display: grid; }
.conn > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 14px; }
.conn > div:last-child { border-bottom: 0; }
.conn > div > span:first-child { display: grid; line-height: 1.3; } .conn small { color: var(--ink3); font-size: 12.5px; }

/* ================================================================
   AI panel (inside the desk)
   ================================================================ */
.ai-scrim { position: absolute; inset: 0; z-index: 40; background: rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); }
.ai-panel { position: absolute; z-index: 41; top: 10px; right: 10px; bottom: 10px; width: min(430px, calc(100% - 20px)); display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: rgba(10, 11, 14, .78); -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
  transform: translateX(calc(100% + 30px)); opacity: 0; transition: transform .6s var(--ease), opacity .4s var(--ease); }
.ai-open .ai-scrim { opacity: 1; pointer-events: auto; }
.ai-open .ai-panel { transform: none; opacity: 1; }
.ai-head { display: flex; align-items: center; gap: 12px; padding: 14px 12px 12px 16px; }
.ai-head > div { flex: 1; display: grid; line-height: 1.25; }
.ai-head b { font-size: 15px; font-weight: 600; }
.ai-head small { font: 500 11px var(--mono); color: var(--ink3); display: flex; align-items: center; gap: 6px; }
.ai-head small i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.ai-head small i.off { background: var(--danger); box-shadow: none; }
.ai-head .orb, .welcome .orb { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--lq-ink); flex: none;
  background: radial-gradient(60% 70% at 50% 25%, var(--accent), transparent 75%), radial-gradient(60% 50% at 50% 110%, #fff, transparent 70%), var(--accent2);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.85), 0 8px 24px -8px var(--accent); }
.ai-msgs { flex: 1; overflow-y: auto; padding: 8px 14px 18px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; scrollbar-width: thin; }
.msg { max-width: 88%; padding: 10px 15px; border-radius: 20px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; animation: msgIn .45s var(--spring) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.msg.u { align-self: flex-end; color: #000; background: #fff; border-bottom-right-radius: 6px; }
.msg.a { align-self: flex-start; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); border-bottom-left-radius: 6px; }
.msg.a.err { color: #ff9aa4; }
.typing-row { align-self: flex-start; animation: msgIn .45s var(--spring) both; }
.acts { align-self: stretch; display: grid; gap: 8px; margin: -2px 0 4px; }
.act { display: flex; align-items: center; gap: 12px; padding: 11px 11px 11px 12px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); animation: msgIn .45s var(--spring) both; animation-delay: .1s; }
.act .ai-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.08); }
.act .ai-ic svg { width: 15px; height: 15px; }
.act > div:nth-child(2) { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.act b { font-size: 13.5px; font-weight: 600; } .act small { font-size: 12px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.act .btns { display: flex; gap: 6px; }
.act .done { display: flex; align-items: center; gap: 5px; font: 500 11.5px var(--mono); color: var(--ok); }
.act .done svg { width: 14px; height: 14px; }
.act.skipped { opacity: .5; } .act.skipped .done { color: var(--ink3); }
.act.searching { background: rgba(0,0,0,.35); }
.welcome { margin: auto 0; text-align: center; display: grid; justify-items: center; gap: 8px; padding: 18px 6px; }
.welcome .orb { width: 58px; height: 58px; margin-bottom: 8px; animation: float 4s ease-in-out infinite; }
.welcome .orb svg { width: 26px; height: 26px; }
.welcome h3 { font-size: 24px; font-weight: 600; letter-spacing: -.04em; }
.welcome p { color: var(--ink2); font-size: 14px; max-width: 300px; }
.sugs { display: grid; gap: 6px; width: 100%; margin-top: 12px; }
.sug { text-align: left; padding: 11px 14px; border-radius: 16px; font-size: 13.5px; font-weight: 500; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; transition: background .2s, transform .35s var(--spring); }
.sug:hover { background: rgba(255,255,255,.1); transform: translateX(3px); }
.sug svg { width: 15px; height: 15px; color: var(--accent2); }
.ai-comp { display: flex; gap: 8px; align-items: flex-end; padding: 10px; margin: 0 10px 10px; border-radius: 26px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.1); }
.ai-comp textarea { flex: 1; min-height: 40px; max-height: 160px; padding: 9px 8px 9px 10px; resize: none; background: transparent; border: 0; outline: none; font-size: 15px; line-height: 1.45; color: #fff; }
.ai-comp textarea::placeholder { color: var(--ink4); }
.ai-comp .btn { --h: 40px; }

/* ================================================================
   Modal, toast, sparks
   ================================================================ */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade .3s var(--ease); }
.modal-wrap.out { animation: fade .25s var(--ease) reverse forwards; }
.modal { width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 26px; border-radius: 28px; background: rgba(14, 15, 18, .9) !important; animation: modalIn .5s var(--spring); }
.modal.wide { width: min(560px, 100%); }
.modal-wrap.out .modal { animation: modalIn .25s var(--ease) reverse forwards; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.96); } }
.modal h2 { font-size: 24px; font-weight: 650; letter-spacing: -.04em; line-height: 1.1; margin-bottom: 6px; padding-right: 40px; }
.modal .sub { margin-bottom: 22px; }
.modal-x { position: absolute; top: 16px; right: 16px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.pf-edit { display: grid; gap: 8px; }
.pf-edit .rowx { display: flex; align-items: center; gap: 8px; }
.pf-edit .rowx .pf { width: 108px; flex: none; justify-content: flex-start; }
.pf-edit .rowx .field { height: 40px; font-size: 14px; border-radius: 99px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.opt { text-align: left; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); display: grid; gap: 2px; transition: all .25s var(--ease); }
.opt b { font-size: 13.5px; font-weight: 600; } .opt small { font: 500 11px var(--mono); color: var(--ink3); }
.opt.on { background: #fff; color: #000; border-color: #fff; } .opt.on small { color: rgba(0,0,0,.55); }

#toasts { position: fixed; z-index: 100; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(460px, calc(100vw - 32px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; min-height: 42px; border-radius: 999px; font-size: 13.5px; font-weight: 500; max-width: 100%; background: rgba(17,17,17,.94) !important; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 16px 40px -12px rgba(0,0,0,.7); animation: toastIn .5s var(--spring); }
.toast > span:not(.mx) { padding-right: 6px; }
.toast.out { animation: toastIn .3s var(--ease) reverse forwards; }
.toast > svg { width: 16px; height: 16px; color: var(--ok); } .toast.err > svg { color: var(--danger); }
.toast .btn { --h: 28px; padding: 0 12px; font-size: 12.5px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.95); } }
.spark { position: fixed; z-index: 200; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; background: var(--c); animation: spark .8s var(--ease) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 1280px) {
  .studio { grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); }
  .presets { display: none; }
  .pr-chips { display: flex; grid-column: 1 / -1; }
}
@media (max-width: 1040px) {
  .steps, .engine { grid-column: span 12; }
  .set-grid > .half { grid-column: span 12; }
}
@media (max-width: 860px) {
  body { overflow: hidden; }
  .frame { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; padding: 6px 6px 0; height: 100dvh; }
  .desk { height: auto; border-radius: 24px; grid-row: 1; }
  .desk-scroll { padding: 0 16px 40px; }
  .top { margin: 0 -16px 4px; padding: 0 16px; height: 58px; }
  .top .me-m { display: block; }
  .rail { grid-row: 2; flex-direction: row; justify-content: space-around; padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); gap: 0; height: auto; }
  .rail-logo, .ri-me, .rail .spacer, .ri-settings { display: none; }
  .rail-nav { display: contents; }
  .ri { width: auto; flex: 1; height: 54px; border-radius: 18px; gap: 3px; align-content: center; }
  .ri > span { display: block; font: 500 10px var(--mono); }
  .ri.on { background: transparent; box-shadow: none; }
  .ri.on svg { filter: drop-shadow(0 0 8px rgba(255,255,255,.5)); }
  .ri[data-tip]:hover::after { display: none; }
  .ri-home { order: 1; } .ri-channels { order: 2; } .ri-ai { order: 3; } .ri-studio { order: 4; } .ri-clips { order: 5; }
  .ri-ai { flex: none; width: 54px; height: 54px; border-radius: 50%; margin: -2px 6px 0; color: var(--lq-ink);
    background: radial-gradient(60% 70% at 50% 25%, var(--accent), transparent 75%), radial-gradient(60% 50% at 50% 110%, #fff, transparent 70%), var(--accent2);
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.9), 0 8px 24px -8px var(--accent); }
  .ri-ai svg { color: var(--lq-ink); width: 24px; height: 24px; }
  .ri-ai > span { display: none; }
  .ri .badge { top: 4px; right: calc(50% - 22px); }
  .mega { font-size: clamp(60px, 19vw, 120px); }
  .home-grid { gap: 10px; }
  .stat { grid-column: span 4; padding: 14px; min-height: 130px; }
  .stat .num { font-size: 38px; margin-top: 12px; }
  .stat .lbl { font-size: 10.5px; }
  .stat .ico { width: 28px; height: 28px; } .stat .ico svg { width: 14px; height: 14px; }
  .studio { grid-template-columns: 1fr; }
  .prev-col { position: relative; top: 0; }
  .search { width: 100%; }
  .cr-grid { grid-template-columns: 1fr; }
  .ai-panel { top: auto; left: 6px; right: 6px; bottom: 6px; width: auto; height: 86%; border-radius: 22px; transform: translateY(105%); }
  .modal-wrap { place-items: end center; padding: 0; }
  .modal { width: 100%; border-radius: 28px 28px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); max-height: 92dvh; animation: sheetIn .5s var(--ease); }
  .modal-wrap.out .modal { animation: sheetIn .3s var(--ease) reverse forwards; }
  #toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .job { grid-template-columns: auto 1fr; }
  .job > .btn { grid-column: 2; justify-self: start; }
  .top-r .btn.primary .lbl { display: none; }
}
@keyframes sheetIn { from { transform: translateY(100%); } }
@media (max-width: 520px) {
  .sec .grid2 { grid-template-columns: 1fr; }
  .styles { grid-template-columns: repeat(2, 1fr); }
  .who-tile { width: calc(50% - 7px); }
  .hero-act .btn { flex: 1; }
  .hero-act { width: 100%; }
  .lock-card { padding: 28px 20px 22px; }
}

[data-motion="soft"] .cap .hl, [data-motion="soft"] .cap span { animation: none !important; }
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .view.enter > *, .stagger > *, .view.enter .mega { animation-duration: .01s; }
}
