/* Clip Desk — a light-table editing desk. Grey sheet, ink type, yellow splice tape. */
:root {
  color-scheme: dark;
  --paper: #0e0e18;
  --sheet: #171726;
  --raise: #20203a;
  --ink: #f4f2f8;
  --muted: #9b99b0;
  --rule: #2c2c44;
  --grad: linear-gradient(120deg, #ff7a55 0%, #ff5468 48%, #c24fd6 100%);
  --coral: #ff5c6a;
  --violet: #c24fd6;
  --cut: #ff8a7a;
  --film: #08080f;

  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --body: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;

  --r: 10px;
  --gutter: clamp(16px, 4vw, 48px);
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-feature-settings: 'tnum'; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 20px/1 var(--display); letter-spacing: -0.02em; text-decoration: none;
}
.brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
  text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 8px; color: var(--muted);
}
.topbar nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.topbar nav a[aria-current='page'] { color: var(--ink); background: var(--raise); }

main { padding: 0 var(--gutter) 80px; max-width: 1320px; margin: 0 auto; outline: none; }

/* ---------- type ---------- */
.display {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.95;
  font-size: clamp(44px, 8.2vw, 112px); margin: 0;
  font-variation-settings: 'opsz' 96;
}
.display .taped {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.04em;
}
h2 { font: 700 clamp(24px, 3vw, 32px)/1.1 var(--display); letter-spacing: -0.02em; margin: 0 0 16px; }
h3 { font: 700 18px/1.25 var(--display); letter-spacing: -0.01em; margin: 0; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 46ch; margin: 22px 0 0; }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- buttons & controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px; cursor: pointer; text-decoration: none;
  font-weight: 600; background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule);
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { background: var(--raise); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgba(255, 84, 104, 0.6); }
.btn.primary:hover { background: var(--grad); filter: brightness(1.08); }
.btn.ink { background: var(--ink); color: var(--paper); box-shadow: none; }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.danger { color: var(--cut); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.big { padding: 16px 30px; font-size: 18px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--paper); border-radius: 12px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
  display: block; padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--muted);
  cursor: pointer; white-space: nowrap;
}
.seg input:checked + span { background: var(--raise); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 1px; }

.field { display: grid; gap: 8px; }
.field > .label { font-size: 13px; font-weight: 600; }
.input {
  width: 100%; border: 1px solid var(--rule); background: var(--paper); border-radius: 10px; padding: 10px 12px;
}
.input:focus { outline: 3px solid var(--violet); outline-offset: 0; border-color: transparent; }

/* ---------- the reel (signature) ---------- */
.reel {
  --h: 64px;
  position: relative; height: var(--h); border-radius: 8px; background: var(--film);
  overflow: hidden;
}
.reel::before, .reel::after {
  content: ''; position: absolute; left: 0; right: 0; height: 10px; z-index: 2; pointer-events: none;
  background: radial-gradient(circle at 7px 5px, var(--paper) 2.2px, transparent 2.6px) 0 0 / 14px 10px repeat-x;
  opacity: 0.55;
}
.reel::before { top: 3px; }
.reel::after { bottom: 3px; }
.reel-frames {
  position: absolute; inset: 14px 0; display: flex; gap: 2px; padding: 0 2px;
}
.reel-frames i { flex: 1; background: #1a1a2c; border-radius: 2px; }
.reel .tape {
  position: absolute; top: 9px; bottom: 9px; z-index: 3; min-width: 6px;
  background: var(--grad); color: #fff; border-radius: 3px; text-decoration: none;
  font: 500 11px/1 var(--mono); display: flex; align-items: flex-start; padding: 5px 4px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,0.25); transform: rotate(-0.6deg); transition: transform 0.15s ease, filter 0.15s;
}
.reel .tape:nth-child(even) { transform: rotate(0.7deg); }
.reel .tape:hover, .reel .tape.hot { transform: translateY(-2px) rotate(0deg); filter: brightness(1.05); }
.reel .tape.pending { background: repeating-linear-gradient(-45deg, rgba(255,92,106,0.75) 0 6px, rgba(194,79,214,0.55) 6px 12px); }
.reel-scale { display: flex; justify-content: space-between; margin-top: 6px; font: 400 11px/1 var(--mono); color: var(--muted); }
.reel .playhead {
  position: absolute; top: 0; bottom: 0; width: 2px; background: var(--coral); z-index: 4; left: 0;
  box-shadow: 0 0 12px var(--coral);
}

/* ---------- home / desk ---------- */
.hero { padding: clamp(24px, 6vw, 72px) 0 32px; display: grid; gap: 40px; position: relative; isolation: isolate; }
.hero::before {
  content: ''; position: absolute; z-index: -1; right: -10%; top: -120px; width: 70%; height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 84, 104, 0.2), transparent), radial-gradient(closest-side at 70% 60%, rgba(194, 79, 214, 0.18), transparent);
  filter: blur(20px);
}
body { overflow-x: hidden; }
.hero-head { max-width: 980px; }

.desk {
  background: var(--sheet); border-radius: 18px; box-shadow: var(--shadow); padding: clamp(16px, 3vw, 28px); border: 1px solid var(--rule);
  display: grid; gap: 22px;
}
.drop {
  position: relative; border-radius: 12px; cursor: pointer; display: grid; gap: 14px;
}
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop .reel { --h: 128px; transition: box-shadow 0.15s; }
.drop.over .reel, .drop:hover .reel { box-shadow: 0 0 0 2px var(--coral), 0 0 40px -6px rgba(255, 84, 104, 0.55); }
.drop:focus-within .reel { box-shadow: 0 0 0 3px var(--violet); }
.drop-msg {
  position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 12px;
  color: #fff; font: 700 clamp(17px, 2.2vw, 22px)/1.2 var(--display); text-align: center; padding: 0 16px;
  pointer-events: none;
}
.drop-msg small { display: block; font: 400 13px/1.4 var(--body); color: #aab1bf; margin-top: 4px; }
.drop-msg .chip {
  background: var(--grad); color: #fff; font: 500 12px/1 var(--mono); padding: 6px 8px; border-radius: 4px;
}
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 24px; }
.desk-foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: 18px; }
.desk-foot p { margin: 0; color: var(--muted); font-size: 14px; }
.bar { height: 6px; background: var(--paper); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--grad); transition: width 0.3s ease; }

.notice {
  border-radius: 12px; padding: 14px 16px; background: rgba(255, 122, 85, 0.1); border: 1px solid rgba(255, 122, 85, 0.35); color: #ffd2c4; font-size: 14px;
}
.notice code { font-family: var(--mono); font-size: 13px; background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 4px; }
.notice.error { background: rgba(255, 92, 106, 0.12); border-color: rgba(255, 92, 106, 0.45); color: #ffc4c4; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 56px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; border-top: 2px solid; border-image: var(--grad) 1; padding-top: 14px; }
.steps li::before { content: counter(s, decimal-leading-zero); font: 500 12px/1 var(--mono); color: var(--muted); display: block; margin-bottom: 10px; }
.steps p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- project list ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 56px 0 18px; }
.section-head h2 { margin: 0; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pcard {
  display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; text-decoration: none;
  background: var(--sheet); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); transition: transform 0.15s;
}
.pcard:hover { transform: translateY(-2px); }
.pcard .cover { width: 72px; aspect-ratio: 9/16; border-radius: 8px; background: var(--film); object-fit: cover; }
.pcard h3 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pcard .meta { font: 400 12px/1.5 var(--mono); color: var(--muted); margin-top: 6px; }
.empty { background: var(--sheet); border-radius: 14px; padding: 32px; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 14px; }

/* ---------- status pill ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--mono); padding: 6px 9px; border-radius: 99px;
  background: var(--raise); color: var(--muted); white-space: nowrap;
}
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.working { color: #ff9a8a; background: rgba(255, 92, 106, 0.14); }
.pill.working::before { animation: blink 1s ease-in-out infinite; }
.pill.done { color: #7ee2a8; background: rgba(46, 204, 113, 0.13); }
.pill.error { color: var(--cut); background: rgba(255, 92, 106, 0.14); }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- project view ---------- */
.phead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 24px 0 22px; }
.phead h1 { font: 800 clamp(28px, 4.4vw, 52px)/1 var(--display); letter-spacing: -0.03em; margin: 8px 0 0; overflow-wrap: anywhere; }
.phead .facts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 12px; font: 400 13px/1 var(--mono); color: var(--muted); }
.phead .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tracker {
  background: var(--sheet); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 22px;
  display: grid; gap: 16px;
}
.stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; list-style: none; margin: 0; padding: 0; }
.stages li { font-size: 14px; font-weight: 500; color: var(--muted); display: grid; gap: 8px; }
.stages li .bar { background: var(--raise); }
.stages li.now { color: var(--ink); }
.stages li.now .bar > i { background: var(--grad); }
.stages li.past { color: var(--ink); }
.stages li.past .bar > i { width: 100% !important; background: var(--violet); }
.tracker .hint { margin: 0; color: var(--muted); font-size: 14px; }

.reel-wrap { margin-bottom: 28px; }
.reel-wrap .eyebrow { margin-bottom: 10px; display: block; }

.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.clip { display: grid; gap: 12px; align-content: start; }
.clip.hot .frame { box-shadow: 0 0 0 3px var(--coral), 0 0 40px -8px rgba(255, 84, 104, 0.6); }
.frame {
  position: relative; aspect-ratio: 9/16; border-radius: 14px; overflow: hidden; background: var(--film); box-shadow: var(--shadow);
  transition: box-shadow 0.15s;
}
.frame video, .frame img { width: 100%; height: 100%; object-fit: cover; }
.frame .score {
  position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--grad); color: #fff;
  font: 500 13px/1 var(--mono); padding: 6px 8px; border-radius: 6px;
}
.frame .rank { position: absolute; top: 12px; right: 12px; z-index: 2; font: 500 12px/1 var(--mono); color: rgba(255,255,255,0.75); }
.frame .state {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; color: #c9ced6;
  padding: 20px; font-size: 14px;
}
.frame .state .bar { width: 140px; background: var(--raise); margin: 0 auto; }
.frame .state.err { color: #ffb4a8; }
.frame .play {
  position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; z-index: 1;
}
.frame .play::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: rgba(14,14,24,0.6) url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8 5v14l11-7z' fill='white'/></svg>") center / 28px no-repeat;
  backdrop-filter: blur(4px); transition: transform 0.15s;
}
.frame .play:hover::after { transform: scale(1.08); }
.clip .when { font: 400 12px/1 var(--mono); color: var(--muted); }
.clip h3 { margin-top: 6px; }
.clip .why { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.clip .row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- editor dialog ---------- */
dialog#editor {
  width: min(1040px, calc(100vw - 24px)); max-height: calc(100vh - 24px); border: 0; padding: 0; border-radius: 18px;
  background: var(--sheet); color: var(--ink); box-shadow: 0 0 0 1px var(--rule), 0 30px 80px -20px rgba(0,0,0,0.8);
}
dialog#editor::backdrop { background: rgba(4, 4, 10, 0.7); backdrop-filter: blur(3px); }
.ed { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.ed-stage { background: var(--film); padding: 20px; display: grid; gap: 14px; align-content: start; }
.ed-stage .eyebrow { color: #8e96a6; }
.src { position: relative; border-radius: 8px; overflow: hidden; background: #000; }
.src canvas { display: block; width: 100%; height: auto; }
.src .src-video { position: absolute; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.src-controls { display: flex; gap: 8px; align-items: center; color: #c9ced6; font: 400 12px/1 var(--mono); }
.src-controls .btn { background: var(--raise); color: #fff; box-shadow: none; }
.ed-panel { padding: 22px; display: grid; gap: 18px; align-content: start; overflow-y: auto; max-height: calc(100vh - 24px); }
.ed-panel header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.trim { display: grid; grid-template-columns: 1fr; gap: 14px; }
.trim .field { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; }
.trim .field > .label { grid-column: 1 / -1; }
.stepper { display: flex; align-items: center; gap: 4px; min-width: 0; }
.stepper .input { text-align: center; font-family: var(--mono); padding: 9px 4px; min-width: 0; }
.stepper button { flex: none; width: 38px; height: 40px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper); cursor: pointer; font-family: var(--mono); }
.stepper button:hover { background: var(--raise); }
input[type=range] { width: 100%; accent-color: var(--coral); }
.ed-foot { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--rule); padding-top: 16px; }
.excerpt { font-size: 14px; color: var(--muted); background: var(--paper); border-radius: 10px; padding: 12px; max-height: 120px; overflow: auto; margin: 0; }
.icon-btn { border: 0; background: var(--raise); color: var(--ink); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; flex: none; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--ink); color: var(--paper);
  padding: 12px 18px; border-radius: 12px; font-size: 14px; transition: transform 0.25s ease, opacity 0.25s; z-index: 50; max-width: calc(100vw - 32px);
  opacity: 0; visibility: hidden;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- motion ---------- */
.rise { animation: rise 0.5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.hero-head .display .line { display: block; }
.hero-head .display .line:nth-child(2) { animation-delay: 0.06s; }

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

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .ed { grid-template-columns: 1fr; }
  .ed-panel { max-height: none; }
  dialog#editor { overflow-y: auto; }
  .stages { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .topbar nav a { padding: 8px 8px; font-size: 14px; }
  .clips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .clip .why { display: none; }
  .clip h3 { font-size: 15px; }
  .drop .reel { --h: 150px; }
  .trim { grid-template-columns: 1fr; }
}

/* ---------- nav: accounts ---------- */
.topbar nav { align-items: center; }
.topbar nav a.nav-cta { background: var(--grad); color: #fff; }
.topbar nav a.nav-cta:hover { filter: brightness(1.08); background: var(--grad); }
.nav-usage { display: inline-flex; align-items: center; gap: 8px; }
.plan-tag {
  font: 600 11px/1 var(--body); letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 7px; border-radius: 6px;
  background: var(--grad); color: #fff;
}
.nav-usage .mono { font-size: 12px; }

.row { display: flex; flex-wrap: wrap; gap: 8px; }
.muted { color: var(--muted); margin: 0; font-size: 15px; }
.fine { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.demo { display: grid; gap: 10px; }
.demo .tape { pointer-events: none; }

/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 28px; align-items: stretch; }
.plan {
  position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 18px; padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.plan.featured { border-color: transparent; background: linear-gradient(var(--sheet), var(--sheet)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.plan.current { box-shadow: 0 0 0 1px var(--violet) inset; }
.plan-flag {
  position: absolute; top: -12px; left: 24px; background: var(--grad); color: #fff; font: 600 12px/1 var(--body);
  padding: 7px 10px; border-radius: 99px;
}
.plan h3 { font-size: 22px; }
.plan-tagline { margin: -6px 0 0; color: var(--muted); font-size: 15px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price .amount { font: 800 44px/1 var(--display); letter-spacing: -0.03em; }
.plan-price .per { color: var(--muted); font-size: 14px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; }
.plan li { position: relative; padding-left: 24px; font-size: 15px; }
.plan li::before {
  content: ''; position: absolute; left: 0; top: 0.35em; width: 14px; height: 14px; border-radius: 50%; background: var(--grad);
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3 3 7-7' stroke='black' stroke-width='2.4' fill='none' stroke-linecap='round'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3 3 7-7' stroke='black' stroke-width='2.4' fill='none' stroke-linecap='round'/></svg>") center / contain no-repeat;
}
.soon {
  font: 600 10px/1 var(--body); text-transform: uppercase; letter-spacing: 0.05em; color: #ffb3a6;
  background: rgba(255, 92, 106, 0.14); padding: 4px 6px; border-radius: 5px; margin-left: 4px; white-space: nowrap; vertical-align: 2px;
}
.plan .btn { width: 100%; }
.plan-note { color: var(--muted); font-size: 13px; text-align: center; }
.pricing-page { padding: 32px 0; display: grid; gap: 10px; }
.pricing-page .notice { margin-top: 12px; }

/* ---------- auth ---------- */
.auth { display: grid; place-items: center; padding: 40px 0; }
.auth-card {
  width: min(420px, 100%); background: var(--sheet); border: 1px solid var(--rule); border-radius: 20px; padding: 32px;
  display: grid; gap: 16px; box-shadow: var(--shadow);
}
.auth-card img { border-radius: 10px; }
.auth-card h1 { font: 800 30px/1.05 var(--display); letter-spacing: -0.02em; margin: 6px 0 0; }
.auth-card .btn { width: 100%; }
.hint { font-size: 12px; color: var(--muted); }
.form-error { color: var(--cut); font-size: 14px; margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.switch { text-align: center; color: var(--muted); font-size: 14px; margin: 0; }
.switch a, .desk-foot a, .notice a { color: #ff9a8a; }

/* ---------- account ---------- */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 18px; }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; padding: 22px; }
.meter { height: 10px; }
.stack { display: grid; gap: 10px; }

.brand, .topbar nav a { white-space: nowrap; }
@media (max-width: 560px) {
  .topbar { padding: 14px 16px; gap: 8px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand-mark { width: 26px; height: 26px; }
  .topbar nav { gap: 0; }
  .topbar nav a { padding: 8px 7px; font-size: 14px; }
  .nav-usage .plan-tag { display: none; }
  .cta-row .btn.big { flex: 1; padding: 14px 18px; font-size: 16px; }
}
@media (max-width: 380px) {
  .topbar nav a[href="/pricing"] { display: none; }
}

/* ---------- streams ---------- */
.upsell { background: var(--sheet); border: 1px solid var(--rule); border-radius: 18px; padding: clamp(22px, 4vw, 40px); display: grid; gap: 14px; justify-items: start; max-width: 720px; }
.upsell h2 { margin: 0; }
.simform { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--sheet); border: 1px dashed var(--rule); border-radius: 14px; padding: 14px; margin-bottom: 18px; }
.simform .input { flex: 1; min-width: 200px; }
.channels { display: grid; gap: 16px; }
.channel { background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; padding: 18px; }
.channel header { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.channel .ch-name { flex: 1; min-width: 180px; }
.channel .meta { color: var(--muted); font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.channel .meta a { color: var(--muted); }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font: 800 20px/1 var(--display); color: #fff; object-fit: cover; flex: none; }
.live { display: inline-block; vertical-align: 3px; margin-left: 6px; background: #e5252a; color: #fff; font: 700 11px/1 var(--body); letter-spacing: 0.06em; padding: 4px 6px; border-radius: 4px; animation: blink 1.6s ease-in-out infinite; }
.recs { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; border-top: 1px solid var(--rule); padding-top: 14px; }
.recs li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rec-title { font-weight: 600; }
.rec-meta { font-size: 12px; }
.recs li .btn { margin-left: auto; }
.rec-err { flex-basis: 100%; color: var(--cut); font-size: 13px; }
.src-tag { display: inline-block; background: #9146ff; color: #fff; font: 600 10px/1 var(--body); padding: 3px 5px; border-radius: 4px; vertical-align: 1px; }
.btn.disabled { opacity: 0.5; pointer-events: none; }

/* ---------- top streamers ---------- */
.nav-new { border: 1px solid var(--rule); }
.dir-head { padding: clamp(20px, 4vw, 48px) 0 24px; display: grid; gap: 4px; }
.dir-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }
.dir-tools .input { max-width: 320px; flex: 1 1 220px; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.scard {
  position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 18px; padding: 18px;
  display: flex; flex-direction: column; gap: 6px; transition: transform 0.15s, border-color 0.15s;
}
.scard:hover { transform: translateY(-2px); border-color: #3a3a58; }
.scard.is-live { background: linear-gradient(var(--sheet), var(--sheet)) padding-box, linear-gradient(140deg, rgba(229,37,42,.7), rgba(194,79,214,.5)) border-box; border-color: transparent; }
.scard-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.scard-link:focus-visible { outline-offset: -3px; }
.scard-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.scard h3 { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard-sub { margin: 0; color: var(--muted); font-size: 14px; }
.scard-title { margin: 2px 0 0; font-size: 13px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.scard-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; min-height: 22px; }
.scard-foot { margin-top: auto; padding-top: 10px; position: relative; z-index: 2; }
.scard-foot .btn { width: 100%; }
.tag, .tag-good { display: inline-block; font: 600 11px/1 var(--body); padding: 5px 7px; border-radius: 6px; background: var(--raise); color: var(--muted); vertical-align: 3px; }
.tag-good { background: rgba(46, 204, 113, 0.13); color: #7ee2a8; }
.btn.following { background: rgba(194, 79, 214, 0.16); color: #e9b6f2; box-shadow: inset 0 0 0 1px rgba(194, 79, 214, 0.5); }
.streamer-head { align-items: center; }
.streamer-id { display: flex; gap: 18px; align-items: center; }
.facts a { color: var(--muted); }

/* ---------- admin ---------- */
.atable { width: 100%; border-collapse: collapse; background: var(--sheet); border-radius: 14px; overflow: hidden; font-size: 14px; }
.atable th, .atable td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.atable th { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.atable tr.muted td { opacity: 0.5; }
.atable input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--coral); }
@media (max-width: 700px) { .atable { display: block; overflow-x: auto; } }

/* ---------- footer ---------- */
.site-foot { max-width: 1320px; margin: 0 auto; padding: 28px var(--gutter) 40px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; color: var(--muted); font-size: 13px; border-top: 1px solid var(--rule); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; }
  .topbar nav { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .streamer-id { gap: 12px; }
  .streamer-id .avatar { width: 64px !important; height: 64px !important; }
}

/* ---------- game categories ---------- */
.games-wrap { margin: 8px 0 28px; }
.games { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.game {
  position: relative; flex: 0 0 132px; scroll-snap-align: start; display: grid; gap: 6px; text-align: left; cursor: pointer;
  background: transparent; border: 0; padding: 0; color: var(--ink);
}
.game .art {
  width: 132px; height: 176px; border-radius: 12px; object-fit: cover; background: var(--grad); display: grid; place-items: center;
  font: 800 28px/1 var(--display); color: rgba(255,255,255,.92); box-shadow: 0 0 0 1px var(--rule); transition: transform .15s, box-shadow .15s;
}
.game .art.all { background: var(--raise); font-size: 22px; color: var(--muted); }
.game:hover .art { transform: translateY(-3px); }
.game.on .art { box-shadow: 0 0 0 3px var(--coral), 0 10px 30px -10px rgba(255,84,104,.6); }
.game .gname { font-weight: 600; font-size: 14px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.game .gmeta { font-size: 12px; color: var(--muted); margin-top: -4px; }
.game .glive { position: absolute; top: 8px; left: 8px; background: #e5252a; color: #fff; font: 700 11px/1 var(--body); padding: 4px 6px; border-radius: 4px; }
.grid-h { margin: 0 0 14px; }
.cat-input { min-width: 150px; padding: 7px 10px; font-size: 13px; }
@media (max-width: 560px) { .game { flex-basis: 108px; } .game .art { width: 108px; height: 144px; } }

/* ---------- multi-platform live cards ---------- */
.sgrid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.scard { padding: 0; overflow: hidden; gap: 0; }
.sthumb { position: relative; aspect-ratio: 16 / 9; background: var(--film); overflow: hidden; }
.sthumb-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.scard:hover .sthumb-img { transform: scale(1.04); }
.sthumb-empty { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, rgba(255,92,106,.25), transparent 60%), var(--film); }
.sthumb .live { position: absolute; top: 10px; left: 10px; margin: 0; }
.sviewers { position: absolute; bottom: 10px; left: 10px; background: rgba(0,0,0,.72); color: #fff; font: 600 12px/1 var(--body); padding: 5px 7px; border-radius: 5px; }
.offtag { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.7); color: var(--muted); font: 600 11px/1 var(--body); padding: 4px 6px; border-radius: 4px; }
.sthumb .ptag { position: absolute; top: 10px; right: 10px; }
.sbody { display: flex; gap: 10px; padding: 12px 14px 0; align-items: flex-start; }
.sbody .avatar { flex: none; font-size: 14px; }
.stext { min-width: 0; }
.scard h3 { font-size: 16px; }
.scard-title { -webkit-line-clamp: 1; }
.scard-tags { padding: 8px 14px 0; min-height: 0; }
.scard-foot { padding: 12px 14px 14px; }
.scard.is-off .sthumb { opacity: .7; }
.ptag { display: inline-block; font: 700 10px/1 var(--body); letter-spacing: .04em; text-transform: uppercase; padding: 4px 6px; border-radius: 4px; color: #fff; vertical-align: 2px; }
.ptag-twitch { background: #9146ff; }
.ptag-kick { background: #53fc18; color: #0b1a03; }
.ptag-youtube { background: #ff0033; }
.findbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -8px 0 22px; color: var(--muted); font-size: 14px; }
.findbar .btn { padding: 6px 10px; }

/* ---------- player ---------- */
.player { position: relative; aspect-ratio: 16 / 9; width: 100%; max-height: 72vh; background: #000; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--rule); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-off, .player-sim, .player-lock { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; color: var(--muted); }
.player-off { background: radial-gradient(circle at 50% 40%, rgba(194,79,214,.16), transparent 60%), var(--film); }
.player-sim img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.player-sim p { position: relative; }
.player-lock { background: linear-gradient(rgba(8,8,15,.78), rgba(8,8,15,.9)), var(--bg, none) center / cover; backdrop-filter: blur(6px); color: var(--ink); }
.player-lock h3 { font-size: 26px; margin: 0; }
.player-lock p { max-width: 44ch; color: var(--muted); margin: 0 0 6px; }
.preview-timer { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(0,0,0,.75); color: #fff; font: 600 12px/1 var(--mono); padding: 6px 9px; border-radius: 6px; pointer-events: none; }

/* ---------- profiles & stop auto-clipping ---------- */
.btn.following .when-stop { display: none; }
.btn.following:hover .when-on, .btn.following:focus-visible .when-on { display: none; }
.btn.following:hover .when-stop, .btn.following:focus-visible .when-stop { display: inline; }
.btn.following:hover, .btn.following:focus-visible { background: rgba(255, 92, 106, 0.16); color: #ffb3a6; box-shadow: inset 0 0 0 1px rgba(255, 92, 106, 0.5); }
.sthumb-empty { position: relative; overflow: hidden; }
.sthumb-empty::before { content: ''; position: absolute; inset: -20px; background: var(--pfp, none) center / cover; filter: blur(22px) brightness(.55) saturate(1.2); }
.sthumb-empty .avatar { position: relative; box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.viewtabs { margin-top: 22px; }
.sbanner {
  height: clamp(110px, 16vw, 180px); margin: 0 calc(-1 * var(--gutter)); border-radius: 0 0 24px 24px;
  background: linear-gradient(180deg, rgba(14,14,24,0) 30%, var(--paper)), var(--pfp, var(--grad)) center / cover;
  filter: saturate(1.1); position: relative; overflow: hidden;
}
.sbanner::after { content: ''; position: absolute; inset: 0; backdrop-filter: blur(28px); background: rgba(14,14,24,.35); }
.sbanner + .streamer-head { margin-top: -70px; position: relative; padding-top: 0; }
.streamer-head .avatar { box-shadow: 0 0 0 4px var(--paper); }
.player-off { overflow: hidden; }
.player-off::before { content: ''; position: absolute; inset: -30px; background: var(--pfp, none) center / cover; filter: blur(34px) brightness(.4); }
.player-off > * { position: relative; }
.player-off p { line-height: 1.6; max-width: 44ch; }
.offtag-big { display: inline-block; background: rgba(0,0,0,.6); color: var(--muted); font: 700 12px/1 var(--body); letter-spacing: .08em; padding: 6px 9px; border-radius: 6px; margin-bottom: 4px; }

/* ---------- pfp on live previews, paging ---------- */
.sthumb-pfp { position: absolute; right: 10px; bottom: 10px; }
.sthumb-pfp .avatar { box-shadow: 0 0 0 2px #fff, 0 4px 14px rgba(0,0,0,.5); font-size: 16px; }
.more-row { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 22px; }
.more-row:empty { display: none; }

/* ---------- waitlist ---------- */
.wl { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(24px, 5vw, 64px) 0; }
.wl-copy .lede { margin-top: 18px; }
.wl-count { margin: 18px 0 0; font-weight: 600; color: #ffb3a6; }
.wl-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; color: var(--muted); }
.wl-points li { padding-left: 22px; position: relative; }
.wl-points li::before { content: ''; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--grad); }
.wl-card { width: 100%; justify-self: end; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-done { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 12px 0; }
.wl-num { font: 800 64px/1 var(--display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 860px) { .wl { grid-template-columns: 1fr; } .wl-card { justify-self: stretch; } }

/* admin waitlist tracker */
.adminwait { display: grid; gap: 14px; }
.wl-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.wl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.wl-big { font: 800 40px/1.1 var(--display); margin-top: 8px; }
.wl-chart-panel { grid-column: span 2; }
.wl-chart { display: flex; gap: 4px; align-items: flex-end; height: 64px; margin-top: 12px; }
.wl-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; background: var(--raise); border-radius: 3px; overflow: hidden; }
.wl-bar i { display: block; width: 100%; background: var(--grad); min-height: 2px; }
.wl-break { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 14px; }
.wl-break li { display: flex; justify-content: space-between; gap: 12px; text-transform: capitalize; }
@media (max-width: 560px) { .wl-chart-panel { grid-column: auto; } }
