:root {
    --bg: #070a14;
    --bg2: #0c1122;
    --panel: #111830;
    --line: #22305a;
    --text: #eef2ff;
    --muted: #97a3c4;
    --violet: #8b5cf6;
    --cyan: #22d3ee;
    --yellow: #facc15;
    --grad: linear-gradient(100deg, #8b5cf6 0%, #22d3ee 100%);
    --radius: 16px;
    --max: 1120px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); }
h1, h2, h3 { font-family: "Space Grotesk", "Inter", system-ui, sans-serif; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(7, 10, 20, .78); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(34, 48, 90, .6); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1.2rem "Space Grotesk", sans-serif; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav nav a:hover { color: var(--text); }
.nav nav a.btn { color: #050816; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: 1rem; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-main { background: var(--grad); color: #050816; box-shadow: 0 8px 30px rgba(139, 92, 246, .35); }
.btn-main:hover { box-shadow: 0 10px 38px rgba(34, 211, 238, .4); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-small { padding: 9px 16px; font-size: .92rem; }
.nav .btn { white-space: nowrap; }

/* hero */
.hero { position: relative; overflow: hidden; min-height: 640px; display: flex; align-items: center; }
.hero-art { position: absolute; inset: 0; background: url("assets/hero.jpg") right center / cover no-repeat; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(7, 10, 20, .94) 38%, rgba(7, 10, 20, .55) 55%, rgba(7, 10, 20, .12) 78%, rgba(7, 10, 20, .05) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 30%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 70px; padding-bottom: 90px; }
/* the moving background (hero-fx.js draws the clips and the hype meter; the glow drifts on its own) */
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-glow { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; mix-blend-mode: screen; }
.hero-glow i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(60px); opacity: .32; }
.hero-glow i:nth-child(1) { right: -8vmax; top: -14vmax; background: radial-gradient(circle, #8b5cf6, transparent 65%); animation: hero-drift-a 18s ease-in-out infinite alternate; }
.hero-glow i:nth-child(2) { right: 14vmax; bottom: -22vmax; background: radial-gradient(circle, #22d3ee, transparent 65%); animation: hero-drift-b 22s ease-in-out infinite alternate; }
.hero-glow i:nth-child(3) { left: -18vmax; top: 10%; width: 30vmax; height: 30vmax; opacity: .18; background: radial-gradient(circle, #f472b6, transparent 65%); animation: hero-drift-c 26s ease-in-out infinite alternate; }
@keyframes hero-drift-a { to { transform: translate(-9vmax, 7vmax) scale(1.15); } }
@keyframes hero-drift-b { to { transform: translate(-12vmax, -6vmax) scale(.9); } }
@keyframes hero-drift-c { to { transform: translate(8vmax, 6vmax) scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .hero-glow i { animation: none; } }
.hero-copy { max-width: 560px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(17, 24, 48, .7); color: var(--muted); font-size: .85rem; font-weight: 600; margin-bottom: 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 10px #ff3b5c; }
.hero p.lead { font-size: 1.18rem; color: #c9d2ee; margin-bottom: 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--muted); }

/* sections */
section { padding: 90px 0; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.alt { background: var(--bg2); border-top: 1px solid rgba(34, 48, 90, .5); border-bottom: 1px solid rgba(34, 48, 90, .5); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #050816; font: 700 1.05rem "Space Grotesk", sans-serif; margin-bottom: 16px; }
.step p { color: var(--muted); margin: 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(139, 92, 246, .14); border: 1px solid rgba(139, 92, 246, .35); margin-bottom: 14px; }
.feature .icon svg { width: 22px; height: 22px; stroke: var(--cyan); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }

/* showcase: a phone with a clip mock built in CSS */
.showcase { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.phone { width: 300px; max-width: 100%; aspect-ratio: 9 / 19; margin: 0 auto; border-radius: 42px; padding: 12px; background: #05070f; border: 1px solid #2a3766; box-shadow: 0 30px 80px rgba(139, 92, 246, .3), 0 0 0 6px rgba(255, 255, 255, .03); }
.screen { position: relative; height: 100%; border-radius: 32px; overflow: hidden; background: url("assets/hero.jpg") 62% center / cover; }
.screen::before { content: ""; position: absolute; inset: 0; backdrop-filter: blur(14px) brightness(.55); }
.screen .frame { position: absolute; left: 0; right: 0; top: 34%; height: 30%; background: url("assets/hero.jpg") 64% 40% / 260% auto no-repeat; border-top: 1px solid rgba(255, 255, 255, .08); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.screen .headline { position: absolute; top: 15%; left: 8%; right: 8%; text-align: center; }
.screen .headline small { display: block; color: #7dd3fc; font: 800 .7rem "Space Grotesk", sans-serif; letter-spacing: .08em; }
.screen .headline b { display: block; font: 800 1.02rem/1.2 "Space Grotesk", sans-serif; text-shadow: 0 2px 8px #000; }
.screen .caption { position: absolute; top: 70%; left: 6%; right: 6%; text-align: center; font: 900 1.45rem/1.1 "Space Grotesk", sans-serif; text-transform: uppercase; text-shadow: 0 3px 0 #000, 0 0 12px #000; }
.screen .caption em { font-style: normal; color: var(--yellow); }
.checks { list-style: none; padding: 0; margin: 22px 0 0; }
.checks li { padding-left: 32px; position: relative; margin-bottom: 12px; color: #c9d2ee; }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; background: var(--grad);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* trust */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trust .feature { text-align: left; }

/* pricing */
.price-card { max-width: 460px; margin: 0 auto; background: var(--panel); border-radius: 22px; padding: 34px; position: relative; border: 1px solid transparent; background-image: linear-gradient(var(--panel), var(--panel)), var(--grad); background-origin: border-box; background-clip: padding-box, border-box; box-shadow: 0 30px 80px rgba(34, 211, 238, .12); }
.price { font: 700 3.2rem "Space Grotesk", sans-serif; margin: 6px 0 2px; }
.price span { font-size: 1.05rem; color: var(--muted); font-weight: 500; }
.price b { font-weight: 700; }
.price-card .btn { width: 100%; margin-top: 22px; }

/* faq */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cyan); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* final cta */
.final { text-align: center; padding: 100px 0; background: radial-gradient(60% 80% at 50% 100%, rgba(139, 92, 246, .25), transparent 70%); }

/* plain pages */
.page { padding: 60px 0 90px; }
.page .wrap { max-width: 820px; }
.page h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page h2 { font-size: 1.45rem; margin-top: 2em; }
.page p, .page li { color: #c9d2ee; }
.page .updated { color: var(--muted); font-size: .92rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 18px 0; }
ol.big { counter-reset: n; list-style: none; padding: 0; }
ol.big > li { counter-increment: n; position: relative; padding: 4px 0 18px 56px; }
ol.big > li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #050816; font: 700 1rem "Space Grotesk", sans-serif; }
code, kbd { background: #0a1024; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
table.req { width: 100%; border-collapse: collapse; }
table.req td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.req td:first-child { color: var(--muted); width: 38%; padding-right: 16px; }

/* footer */
footer { border-top: 1px solid rgba(34, 48, 90, .6); padding: 40px 0; color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

@media (max-width: 900px) {
    .steps, .features, .trust { grid-template-columns: 1fr; }
    .showcase { grid-template-columns: 1fr; }
    .nav nav a:not(.btn) { display: none; }
    .nav .btn-small { padding: 8px 13px; font-size: .84rem; }
    .brand { font-size: 1.05rem; }
    .brand img { width: 30px; height: 30px; }
    .hero { min-height: 0; }
    .hero-art { background-position: 70% center; opacity: .55; }
    .hero-art::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(7,10,20,.6) 60%, rgba(7,10,20,.4) 100%); }
    section { padding: 64px 0; }
}

/* ---------------------------------------------------------------- accounts */
.auth { min-height: calc(100vh - 66px - 110px); display: grid; place-items: center; padding: 50px 20px; background: radial-gradient(50% 60% at 50% 0%, rgba(139, 92, 246, .18), transparent 70%); }
.auth-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.auth-card h1 { font-size: 1.8rem; margin-bottom: 6px; }
.auth-card .btn { width: 100%; margin-top: 8px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field input { width: 100%; padding: 12px 14px; font: inherit; color: var(--text); background: #0a1024; border: 1px solid var(--line); border-radius: 10px; }
.field input:focus { outline: 2px solid var(--cyan); border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--muted); margin: 6px 0 14px; }
.check input { margin-top: 4px; }
.form-msg { min-height: 22px; font-size: .92rem; margin-top: 12px; }
.form-msg.bad { color: #ff7a8a; } .form-msg.good { color: #4ade80; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: .94rem; }

.dash { padding: 40px 0 90px; }
.dash-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-head h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0; }
.dash-head .btn { margin-left: auto; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat b { display: block; font: 700 1.8rem "Space Grotesk", sans-serif; }
.stat span { color: var(--muted); font-size: .9rem; }
.dash-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 18px; }
.panel h2 { font-size: 1.15rem; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.panel .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0 0 14px; font-size: .95rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.pill.ok { background: rgba(74, 222, 128, .14); color: #4ade80; }
.pill.warn { background: rgba(250, 204, 21, .14); color: #facc15; }
.pill.bad { background: rgba(255, 107, 129, .14); color: #ff7a8a; }
.pill.off { background: rgba(151, 163, 196, .14); color: var(--muted); }
.keybox { display: flex; gap: 8px; align-items: center; }
.keybox code { flex: 1; padding: 10px 12px; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-form { display: flex; gap: 8px; margin-top: 10px; }
.inline-form input { flex: 1; min-width: 0; padding: 10px 12px; font: inherit; color: var(--text); background: #0a1024; border: 1px solid var(--line); border-radius: 10px; }
.clips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.clip-card { background: #0a1024; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.clip-card .pic { aspect-ratio: 9 / 16; background: linear-gradient(160deg, #1a2350, #0b1024); display: grid; place-items: center; color: var(--muted); font-size: .8rem; position: relative; }
.clip-card .pic img { width: 100%; height: 100%; object-fit: cover; }
.clip-card .pic .len { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .7); padding: 1px 6px; border-radius: 6px; font-size: .75rem; color: #fff; }
.clip-card .meta { padding: 10px; }
.clip-card .meta b { display: block; font-size: .86rem; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
.clip-card .meta span { display: block; color: var(--muted); font-size: .78rem; margin-top: 4px; }
table.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.list td, table.list th { padding: 9px 4px; border-bottom: 1px solid var(--line); text-align: left; }
table.list th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.empty-note { color: var(--muted); font-size: .95rem; }
.nav nav a.account-link { color: var(--text); }

@media (max-width: 900px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .dash-grid { grid-template-columns: 1fr; }
}

/* dashboard (cloud) */
.note-bar { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--panel); }
.note-bar.bad { border-color: #ff7a8a; color: #ffc2ca; } .note-bar.good { border-color: #4ade80; color: #c8f7d8; }
.chan { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chan:last-child { border-bottom: 0; }
.chan .logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font: 700 .8rem "Space Grotesk", sans-serif; color: #fff; }
.chan .logo.twitch { background: #9146ff; } .chan .logo.youtube { background: #ff2e3a; }
.chan .who { flex: 1; min-width: 150px; } .chan .who b { display: block; } .chan .who span { color: var(--muted); font-size: .86rem; }
.connect { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
/* posting clips to YouTube Shorts */
.yt-post { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.moment .yt-post, .clip-card .yt-post { padding: 0 14px 14px; }
.yt-post .yt-privacy { padding: 7px 10px; font: inherit; font-size: .85rem; color: var(--text); background: #0a1024; border: 1px solid var(--line); border-radius: 9px; }
.yt-post .yt-done { color: #ff6b74; border-color: rgba(255, 46, 58, .5); }
.post-yt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.post-yt h3 { margin: 0; font-size: 1.02rem; }
.post-yt p { margin: 0; }
.btn-twitch { background: #9146ff; color: #fff; } .btn-youtube { background: #ff2e3a; color: #fff; } .btn-kick { background: #53fc18; color: #050816; }
.chan .logo.kick, .chan-card .logo.kick { background: #53fc18; color: #050816; }
.clip-card { cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.clip-card:hover { transform: translateY(-2px); border-color: var(--cyan); }
.clip-card .acts { display: flex; gap: 6px; padding: 0 10px 10px; }
.clip-card .acts a, .clip-card .acts button { font-size: .78rem; padding: 5px 9px; }
.settings .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.settings label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.settings select, .settings input { width: 100%; padding: 9px 10px; font: inherit; color: var(--text); background: #0a1024; border: 1px solid var(--line); border-radius: 9px; }
.player { padding: 0; border: 1px solid var(--line); border-radius: 18px; background: #050816; color: var(--text); max-width: min(92vw, 460px); width: 100%; }
.player::backdrop { background: rgba(0, 0, 0, .75); }
.player video { width: 100%; max-height: 75vh; display: block; background: #000; }
.player-bar { padding: 14px; display: grid; gap: 10px; }
@media (max-width: 520px) { .settings .grid2 { grid-template-columns: 1fr; } }

/* two plans */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 900px; margin: 0 auto; align-items: stretch; }
.plans .price-card { max-width: none; margin: 0; display: flex; flex-direction: column; }
.plans .price-card .btn { margin-top: auto; }
.plans .price-card ul { margin-bottom: 22px; }
.plan-free { background: var(--panel); border: 1px solid var(--line); background-image: none; box-shadow: none; }
.plan-tag { position: absolute; top: -12px; right: 22px; background: var(--grad); color: #050816; font-weight: 700; font-size: .78rem; padding: 4px 12px; border-radius: 999px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

/* admin panel */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { background: none; border: 0; color: var(--muted); font: 600 .95rem "Inter", sans-serif; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--cyan); }
.admin .stats { grid-template-columns: repeat(4, 1fr); }
.admin .stat small { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars .bar { width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: var(--grad); min-height: 2px; }
.bars .bar.alt { background: rgba(139, 92, 246, .45); }
.bars .lbl { font-size: .68rem; color: var(--muted); }
.bars .num { font-size: .72rem; color: var(--text); }
.legend { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--grad); }
.legend i.alt { background: rgba(139, 92, 246, .45); }
table.list td small { color: var(--muted); display: block; }
.health { display: flex; align-items: center; gap: 10px; }
.dot-ok, .dot-bad { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-ok { background: #4ade80; box-shadow: 0 0 8px #4ade80; } .dot-bad { background: #ff7a8a; box-shadow: 0 0 8px #ff7a8a; }
.search { width: 100%; max-width: 320px; padding: 9px 12px; font: inherit; color: var(--text); background: #0a1024; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 12px; }
@media (max-width: 900px) { .admin .stats { grid-template-columns: repeat(2, 1fr); } .scroll-x { overflow-x: auto; } }

/* ---------------------------------------------------------------- member dashboard v2 */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 66px); }
.side { border-right: 1px solid var(--line); background: rgba(12, 17, 34, .6); padding: 22px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 66px; height: calc(100vh - 66px); }
.side-user { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.side-user b { display: block; font-size: .95rem; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 42px; height: 42px; border-radius: 12px; background: var(--grad); color: #050816; display: grid; place-items: center; font: 700 1.1rem "Space Grotesk", sans-serif; flex: none; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav button, .side-nav a { display: flex; align-items: center; gap: 12px; background: none; border: 0; color: var(--muted); font: 600 .95rem "Inter", sans-serif; padding: 11px 12px; border-radius: 10px; cursor: pointer; text-decoration: none; text-align: left; }
.side-nav button:hover, .side-nav a:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.side-nav button.on { background: rgba(139, 92, 246, .16); color: var(--text); }
.side-nav svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-nav .count { margin-left: auto; font-size: .75rem; background: rgba(255, 255, 255, .08); padding: 1px 8px; border-radius: 999px; }
.side-out { margin-top: auto; }
.main { padding: 28px 32px 70px; min-width: 0; }
.main h1 { font-size: 1.9rem; margin-bottom: 6px; }
.home-head { margin-bottom: 18px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; margin-bottom: 18px; }
.spot { display: grid; grid-template-columns: 260px 1fr; grid-template-rows: auto 1fr; gap: 6px 22px; margin: 0; }
.spot-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.spot-head h2 { margin: 0; }
.spot-player { aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #000; position: relative; }
.spot-player video, .spot-player img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-player .placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); background: linear-gradient(160deg, #1a2350, #0b1024); font-size: .92rem; }
.spot-meta { display: flex; flex-direction: column; gap: 10px; align-self: center; }
.spot-meta h3 { font-size: 1.35rem; margin: 0; }
.spot-meta .row { display: flex; gap: 8px; flex-wrap: wrap; }
.home-side { display: flex; flex-direction: column; gap: 18px; }
.home-side .panel { margin: 0; }
.live-card .who { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.live-card .who b { display: block; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 700 .75rem "Inter", sans-serif; letter-spacing: .04em; }
.live-badge.on { background: rgba(255, 59, 92, .16); color: #ff5c79; }
.live-badge.on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff3b5c; animation: pulse 1.4s infinite; }
.live-badge.off { background: rgba(151, 163, 196, .14); color: var(--muted); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 92, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 59, 92, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); } }
.big-clip { width: 100%; padding: 15px; font-size: 1.05rem; }
.meter { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: 10px 0 6px; }
.meter > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-stats .stat { padding: 14px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.row-head h2, .row-head h1 { margin: 0; }
.link-btn { background: none; border: 0; color: var(--cyan); font: 600 .92rem "Inter", sans-serif; cursor: pointer; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.chip { border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 7px 14px; font: 600 .86rem "Inter", sans-serif; cursor: pointer; }
.chip.on { background: rgba(34, 211, 238, .12); border-color: var(--cyan); color: var(--text); }
.moment { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s ease, transform .15s ease; }
.moment:hover { border-color: rgba(34, 211, 238, .6); transform: translateY(-2px); }
.moment .media { position: relative; aspect-ratio: 9 / 16; background: linear-gradient(160deg, #1a2350, #0b1024); cursor: pointer; }
.moment .media img, .moment .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.moment .media video { opacity: 0; transition: opacity .2s ease; }
.moment .media.previewing video, .moment .media.playing video { opacity: 1; }
.moment .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; background: rgba(5, 8, 22, .65); display: grid; place-items: center; backdrop-filter: blur(4px); transition: opacity .2s ease; }
.moment .play::after { content: ""; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.moment .media.playing .play, .moment .media.previewing .play { opacity: 0; }
.moment .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .7); color: #fff; font-size: .74rem; padding: 2px 7px; border-radius: 6px; }
.moment .tag { position: absolute; left: 8px; top: 8px; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font: 700 .72rem "Inter", sans-serif; letter-spacing: .02em; color: #050816; background: #94a3b8; }
.tag.loud { background: #fbbf24; } .tag.chat { background: #22d3ee; } .tag.funny { background: #f472b6; } .tag.manual { background: #a78bfa; }
.moment .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.moment .body b { font-size: .88rem; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
.moment .body span { color: var(--muted); font-size: .78rem; }
.moment .acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.moment .acts a, .moment .acts button { font-size: .76rem; padding: 6px 10px; }
.strip .moment .body, .strip .moment .acts { display: none; }
.settings2 .group { padding: 4px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.settings2 .group:last-of-type { border-bottom: 0; }
.settings2 h3 { font-size: 1rem; margin-bottom: 12px; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; }
.setrow label { font-weight: 600; } .setrow small { display: block; color: var(--muted); font-weight: 400; font-size: .83rem; }
.setrow input[type=number], .setrow select { width: 170px; padding: 8px 10px; font: inherit; color: var(--text); background: #0a1024; border: 1px solid var(--line); border-radius: 9px; }
.setrow input[type=range] { width: 200px; accent-color: #22d3ee; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: rgba(255, 255, 255, .12); border-radius: 999px; transition: background .15s ease; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.switch input:checked + span { background: #22d3ee; }
.switch input:checked + span::after { transform: translateX(20px); }
.bill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.bill-grid .panel { margin: 0; }
.chan-card { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chan-card:last-child { border-bottom: 0; }
.chan-card .logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font: 700 .85rem "Space Grotesk", sans-serif; color: #fff; }
.chan-card .logo.twitch { background: #9146ff; } .chan-card .logo.youtube { background: #ff2e3a; }
.chan-card .who { flex: 1; min-width: 160px; } .chan-card .who b { display: block; } .chan-card .who span { color: var(--muted); font-size: .86rem; }
@media (max-width: 1100px) { .home-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; gap: 10px; }
    .side-user, .side-out { display: none; }
    .side-nav { flex-direction: row; overflow-x: auto; }
    .side-nav button, .side-nav a { white-space: nowrap; padding: 9px 12px; }
    .main { padding: 20px 16px 60px; }
    .spot { grid-template-columns: 1fr; }
    .spot-player { max-width: 320px; width: 100%; margin: 0 auto; }
    .bill-grid { grid-template-columns: minmax(0, 1fr); }
    .kv { grid-template-columns: 104px minmax(0, 1fr); }
    .kv dd { overflow-wrap: anywhere; }
    .setrow { flex-wrap: wrap; }
}

/* rename a clip */
.edit-form { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.edit-form label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.edit-form input, .edit-form textarea { width: 100%; padding: 8px 10px; font: inherit; font-size: .88rem; color: var(--text); background: #0a1024; border: 1px solid var(--line); border-radius: 9px; resize: vertical; }
.edit-form input:focus, .edit-form textarea:focus { outline: 2px solid var(--cyan); border-color: transparent; }
.edit-form .row { display: flex; gap: 8px; margin-top: 4px; }
.spot-meta .edit-form { padding: 0; }

/* ---------------------------------------------------------------- clip editor */
.remaking { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(5, 8, 22, .82); color: var(--cyan); font: 700 .78rem "Inter", sans-serif; padding: 5px 12px; border-radius: 999px; z-index: 3; white-space: nowrap; }
.warn-text { color: #fbbf24 !important; }
.studio-shade { position: fixed; inset: 0; z-index: 100; background: rgba(3, 6, 18, .78); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; }
/* clip editor: a fixed-height window; preview + trim on the left, tabbed choices on the right, a footer bar for Save */
.studio { width: min(1120px, 100%); height: min(860px, calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden; background: #0c1226; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 40px 120px rgba(0, 0, 0, .55); }
.studio-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); flex: none; }
.studio-head h2 { margin: 0; font-size: 1.2rem; }
.studio-x { background: none; border: 1px solid var(--line); color: var(--text); width: 36px; height: 36px; border-radius: 10px; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.studio-x:hover { border-color: var(--cyan); }
.studio-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.studio-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); }
.studio-left { min-width: 0; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px 22px; background: #080d1e; }
.studio-right { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.studio-tabs { display: flex; padding: 0 12px; border-bottom: 1px solid var(--line); flex: none; }
.studio-tab { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font: 600 .9rem "Inter", sans-serif; padding: 13px 4px 11px; cursor: pointer; white-space: nowrap; }
.studio-tab:hover { color: var(--text); }
.studio-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--cyan); }
.studio-tab:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: 6px; }
.studio-panes { flex: 1; min-height: 0; overflow: auto; padding: 16px 18px 22px; }
.studio-pane { display: flex; flex-direction: column; gap: 10px; }
.pane-h { margin: 12px 0 -2px; font: 700 .74rem "Inter", sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.studio-pane > .pane-h:first-child, .pane-group > .pane-h:first-child, .cam-wrap > .pane-h:first-child { margin-top: 0; }
.pane-group { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.inline-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inline-field > span { font-size: .85rem; color: var(--muted); min-width: 58px; }
.inline-field .chips-row, .inline-field .swatches { margin: 0; }
.note-box { margin: 0 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0a1024; color: var(--muted); font-size: .85rem; }
.studio-foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); background: #0c1226; }
.studio-foot .form-msg { flex: 1; margin: 0; min-width: 0; }
.studio-foot .btn { min-width: 130px; }
.stage { position: relative; background: #000; overflow: hidden; border-radius: 14px; margin: 0 auto; container-type: inline-size; cursor: pointer; flex: none; }
.stage.vertical { aspect-ratio: 9 / 16; height: min(50vh, 470px); max-width: 100%; }
.stage.original { aspect-ratio: 16 / 9; width: 100%; }
.stage-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stage.vertical.fill .stage-video { object-fit: cover; }
.stage-bg { position: absolute; inset: -6%; width: 112%; height: 112%; display: none; filter: blur(10px) brightness(.88); }
.stage.vertical.fit .stage-bg { display: block; }
.stage-headline { position: absolute; left: 4%; right: 4%; text-align: center; pointer-events: none; display: flex; flex-direction: column; gap: .4cqw; }
.stage-headline small { color: #fde68a; font: 700 3.4cqw "Inter", sans-serif; text-shadow: 0 0 .6cqw #000, 0 0 .6cqw #000; }
.stage-headline b { color: #fff; font: 700 6.2cqw/1.12 "Space Grotesk", sans-serif; text-shadow: 0 0 .8cqw #000, 0 0 .8cqw #000, 0 0 .8cqw #000; overflow-wrap: anywhere; }
.stage.original .stage-headline small { font-size: 2cqw; }
.stage.original .stage-headline b { font-size: 3.6cqw; }
.stage-captions { position: absolute; left: 6%; right: 6%; text-align: center; pointer-events: none; color: #fff; font: 700 6.4cqw/1.15 "Space Grotesk", sans-serif; text-shadow: 0 0 .8cqw #000, 0 0 .8cqw #000, 0 0 .8cqw #000; text-transform: uppercase; }
.stage.original .stage-captions { font-size: 3.6cqw; }
.stage-captions span.now { color: #facc15; }
/* clip editor: captions you can drag anywhere, and a Fill picture you can slide */
.stage-captions.movable { pointer-events: auto; cursor: move; touch-action: none; }
.stage-captions.movable:hover, .stage.moving-caps .stage-captions { outline: 2px dashed rgba(34, 211, 238, .85); outline-offset: 1.2cqw; border-radius: 1cqw; }
.stage-captions.placed { right: auto; transform: translateX(-50%); width: max-content; max-width: 88%; }
.stage-captions .sample-cap { opacity: .8; }
/* caption animations, like the clip server's: the line grows in (pop) or jumps up (bounce); the spoken word pops or hops */
.stage-captions.anim-pop.enter { animation: cap-line-pop .14s ease-out; }
.stage-captions.anim-bounce.enter { animation: cap-line-bounce .15s ease-out; }
.stage-captions.anim-pop span.now, .stage-captions.anim-bounce span.now { display: inline-block; }
.stage-captions.anim-pop span.now { animation: cap-word-pop .18s ease-out; }
.stage-captions.anim-bounce span.now { animation: cap-word-hop .2s ease-out; transform-origin: 50% 100%; }
@keyframes cap-line-pop { from { scale: .55; } to { scale: 1; } }
@keyframes cap-line-bounce { from { translate: 0 60%; } to { translate: 0 0; } }
@keyframes cap-word-pop { 0% { scale: 1; } 50% { scale: 1.22; } 100% { scale: 1; } }
@keyframes cap-word-hop { 0% { scale: 1 1; } 40% { scale: .92 1.3; } 100% { scale: 1 1; } }
/* the timeline under the preview, laid out like a video editor's: labels on the left, a ruler, a row per track */
.tl2 { gap: 8px; padding: 10px 12px 12px; }
.tl2-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tl2-sel { font-size: .78rem; flex: 1; min-width: 160px; }
.tl2-zoom { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tl2-zoom input { width: 110px; }
.tl2-zbtn { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: #0a1024; color: inherit; font: inherit; cursor: pointer; line-height: 1; }
.tl2-scroll { position: relative; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: 10px; background: #070b18; user-select: none; }
/* clip, not hidden: hidden would make this the scrolling box and the row names would scroll away instead of staying put */
.tl2-inner { position: relative; min-width: 100%; padding-bottom: 6px; overflow: hidden; overflow: clip; }
.tl2-row { display: flex; align-items: stretch; }
.tl2-label { position: sticky; left: 0; z-index: 3; flex: none; width: 78px; box-sizing: border-box; padding: 0 8px; display: flex; align-items: center;
             font-size: .72rem; color: var(--muted); background: #0c1226; border-right: 1px solid var(--line); }
.tl2-lane { position: relative; flex: none; height: 30px; box-sizing: border-box; border-bottom: 1px solid rgba(255, 255, 255, .04); cursor: pointer; touch-action: pan-x; }
.tl2-ruler-row .tl2-lane { height: 24px; border-bottom: 1px solid var(--line); cursor: ew-resize; touch-action: none; }
.tl2-ruler-row .tl2-label { background: #0c1226; }
.tl2-tick { position: absolute; top: 0; bottom: 0; padding-left: 4px; border-left: 1px solid rgba(255, 255, 255, .28); font-size: .66rem; color: var(--muted);
            font-variant-numeric: tabular-nums; line-height: 22px; pointer-events: none; white-space: nowrap; }
.tl2-minor { position: absolute; bottom: 0; height: 5px; border-left: 1px solid rgba(255, 255, 255, .16); pointer-events: none; }
.tl2-video .tl2-lane { height: 50px; padding: 3px 0; }
.tl2-film { display: block; width: 100%; height: 44px; border-radius: 6px; background: #0a1024; pointer-events: none; }
.tl2-head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; z-index: 2; left: 78px;
            box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.tl2-head::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: #fff; }
.tbar { position: absolute; top: 3px; height: 23px; min-width: 6px; box-sizing: border-box; border-radius: 6px; padding: 0 8px; display: flex; align-items: center;
        font-size: .7rem; font-weight: 600; color: #04121a; white-space: nowrap; overflow: hidden; background: #64748b; touch-action: none; }
.tbar span { position: relative; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.tbar.movable { cursor: grab; }
.tbar.movable:active { cursor: grabbing; }
.tbar.whole { opacity: .75; }
.tbar.selected { box-shadow: 0 0 0 2px #fff; z-index: 1; }
.tbar.has-thumb { background-size: auto 100%; background-repeat: repeat-x; background-color: #a78bfa; }
.tbar.has-thumb span { background: rgba(12, 18, 38, .75); color: #fff; padding: 1px 5px; border-radius: 4px; }
.tbar-wave { position: absolute; left: 0; top: 0; height: 100%; pointer-events: none; }
/* the volume line on a sound (and on the video for the stream's own sound): drag it up or down */
.tbar-vol { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.tl2-snds .tbar span { z-index: 2; padding: 0 4px; border-radius: 3px; background: rgba(4, 18, 26, .45); color: #ecfdf5; }
.tl2-video .tbar.vseg span { z-index: 2; align-self: flex-end; margin: 0 4px 3px auto; padding: 1px 5px; border-radius: 4px; font-size: .68rem; color: #fff; background: rgba(12, 18, 38, .82); }
.tl2-video .tbar.vseg span:empty { display: none; }
.tbar-vol polyline { fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .8)); }
.tbar-end { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; background: rgba(255, 255, 255, .35); z-index: 1; }
.tbar-end.start { left: 0; border-radius: 6px 0 0 6px; }
.tbar-end.end { right: 0; border-radius: 0 6px 6px 0; }
.kf { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: #fff; border: 1px solid #04121a; transform: rotate(45deg);
      z-index: 2; cursor: ew-resize; }
.kf.on { background: #facc15; }
.tl2-caps .tbar { background: #e2e8f0; }
.tl2-text .tbar { background: #facc15; }
.tl2-snds .tbar { background: #34d399; }
.tl2-fx .tbar { background: #f472b6; }
.tl2-fx .tbar.ramp { background: #22d3ee; }
/* the video's parts (between splits) over its frames, and the parts cut out */
.tl2-video .tbar.vseg { height: 44px; padding: 0; background: transparent; border: 1px solid rgba(255, 255, 255, .3); cursor: pointer; }
.tl2-video .tbar.vseg.selected { border-color: #fff; box-shadow: 0 0 0 2px #fff, inset 0 0 0 2px rgba(34, 211, 238, .7); }
/* where a part was cut out: the parts either side are joined up, with a small ✂ marker on the join */
.tl2-video .tbar.vcut { width: 16px; min-width: 16px; height: 44px; z-index: 2; justify-content: center; padding: 0; color: #fff; font-size: .7rem;
    cursor: pointer; background: #ef4444; border: 1px solid #0a1024; border-radius: 4px; }
.tl2-video .tbar.vcut.selected { box-shadow: 0 0 0 2px #fff; }
/* a split: a slim white marker on the join; tap it for a transition */
.tl2-video .tbar.vjoin { width: 16px; min-width: 16px; height: 44px; z-index: 2; justify-content: center; padding: 0; cursor: pointer;
    background: linear-gradient(90deg, transparent 6px, #fff 6px, #fff 9px, transparent 9px); border: 0; border-radius: 0; color: #fff; font-size: .7rem; }
.tl2-video .tbar.vjoin.selected { background: linear-gradient(90deg, transparent 5px, #22d3ee 5px, #22d3ee 10px, transparent 10px); }
/* a join with a transition: a purple tile with the transition's mark */
.tl2-video .tbar.has-trans { width: 20px; min-width: 20px; height: 26px; top: 12px !important; background: #8b5cf6; border: 1px solid #0a1024; border-radius: 6px; font-size: .8rem; }
.tl2-video .tbar.has-trans.selected { box-shadow: 0 0 0 2px #fff; background: #8b5cf6; }
.tl2-trans { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #0a1024; font-size: .85rem; }
.tl2-trans[hidden] { display: none; }
.tl2-trans .chips-row { gap: 6px; }
.tl2-sel.bad { color: #fca5a5; }
/* computers: the trim bar and the timeline across the whole editor, under the preview and the settings */
.studio-bottom { flex: none; display: flex; flex-direction: column; gap: 10px; max-height: 50%; overflow-y: auto; padding: 12px 22px 14px;
    border-top: 1px solid var(--line); background: #080d1e; }
.studio-bottom[hidden] { display: none; }
@media (min-width: 901px) {
    .studio-shade { padding: 12px; }
    .studio { width: min(1440px, 100%); height: min(1100px, calc(100vh - 24px)); }
    .studio-cols { min-height: 260px; }
    .studio-left { padding: 12px 18px; }
    .tl2-bar .studio-transport { gap: 8px; margin-right: 4px; }
    .tl2-bar .studio-play { padding: 6px 14px; font-size: .82rem; }
    .tl2-bar .studio-clock { font-size: .82rem; min-width: 112px; }
}
.studio-bottom .trim-card:not(.tl2) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "head head head" "a bar b"; align-items: center; gap: 8px 12px; padding: 10px 14px; }
.studio-bottom .trim-head { grid-area: head; }
.studio-bottom .timeline { grid-area: bar; height: 36px; }
.studio-bottom .trim-row { display: contents; }
.studio-bottom .trim-row > :first-child { grid-area: a; }
.studio-bottom .trim-row > :last-child { grid-area: b; }
.studio-bottom .studio-tip { display: none; }
.studio-bottom .tl2 { padding: 10px 14px; gap: 8px; }
.tl2-keys { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a compact toolbar, so the preview gets more of the height */
.tl2-bar { gap: 6px; }
.tl2-bar .btn-small { padding: 6px 11px; font-size: .82rem; }
.tl2-bar .tl2-sel { order: 10; flex-basis: 100%; font-size: .76rem; }
.tl2-undo { width: 32px; height: 32px; font-size: 1.05rem; }
.tl2-undo:disabled { opacity: .35; cursor: default; }
.tl2-keys { display: block; margin-top: 6px; font-size: .7rem; line-height: 1.4; }
.tpl-note { display: block; font-size: .8rem; margin-bottom: 8px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tpl-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
            background: #0a1024; color: inherit; font: inherit; cursor: pointer; }
.tpl-card small { color: var(--muted, #9aa3b8); font-size: .78rem; line-height: 1.3; }
.tpl-card:hover { border-color: rgba(34, 211, 238, .6); }
.tpl-card[aria-pressed="true"] { border-color: #22d3ee; box-shadow: 0 0 0 1px #22d3ee inset; }
.tpl-mine { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.tpl-mine > small { font-size: .8rem; }
.tpl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #0a1024; }
.tpl-row.on { border-color: #22d3ee; }
.tpl-row b { margin-right: auto; }
.tpl-save { display: flex; gap: 8px; }
.tpl-save input { flex: 1; min-width: 0; }
.fix-words { display: flex; flex-direction: column; gap: 6px; }
.fix-words > small { font-size: .8rem; }
.fix-row { display: flex; gap: 8px; align-items: center; }
.fix-row input { flex: 1; min-width: 0; }
.fix-at { font-variant-numeric: tabular-nums; min-width: 3.4em; text-align: left; }
.stage.vertical.fill { cursor: grab; touch-action: none; }
.stage.vertical.fill:active { cursor: grabbing; }
.drag-hint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.drag-hint span { flex: 1; min-width: 0; }
/* clip editor: the member's own picture and sound */
.stage-image { position: absolute; transform: translate(-50%, -50%); height: auto; max-width: none; cursor: move; touch-action: none; user-select: none; -webkit-user-drag: none; }
.stage-image:hover { outline: 2px dashed rgba(34, 211, 238, .85); outline-offset: 3px; }
.media-box { display: flex; flex-direction: column; gap: 8px; }
.studio-pane > .form-msg:empty { display: none; }
.media-box > small { font-size: .8rem; }
.media-box > .btn { align-self: flex-start; }
.media-top { display: flex; align-items: center; gap: 10px; }
.media-top > span:not(.media-icon) { flex: 1; min-width: 0; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-thumb { width: 44px; height: 44px; flex: none; object-fit: contain; border-radius: 8px; border: 1px solid var(--line);
               background: repeating-conic-gradient(#1b2340 0 25%, #121a33 0 50%) 0 0 / 12px 12px; }
.media-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: #0a1024; font-size: 1.3rem; color: var(--cyan); }
.slider-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 46px; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); }
.slider-row input[type=range] { width: 100%; accent-color: #22d3ee; }
.slider-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.stage-mark { position: absolute; right: 4%; bottom: 3%; color: rgba(255, 255, 255, .55); font: 700 3.4cqw "Inter", sans-serif; pointer-events: none; }
.studio-transport { display: flex; align-items: center; gap: 12px; justify-content: center; }
.studio-clock { font: 600 .92rem "Inter", sans-serif; color: var(--muted); font-variant-numeric: tabular-nums; }
.trim-card { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 14px; background: #0c1226; }
.trim-head { display: flex; align-items: center; gap: 12px; }
.trim-head b { font-size: .95rem; }
.trim-head .trim-readout { flex: 1; text-align: left; color: var(--muted); }
.timeline { position: relative; height: 46px; border-radius: 10px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 14px), #0a1024; border: 1px solid var(--line); cursor: pointer; touch-action: none; margin: 0 9px; }
.tl-sel { position: absolute; top: 0; bottom: 0; background: rgba(34, 211, 238, .16); border-top: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); }
.tl-head { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.tl-handle { position: absolute; top: -3px; bottom: -3px; width: 18px; margin-left: -9px; border-radius: 6px; background: var(--cyan); cursor: ew-resize; touch-action: none; box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.tl-handle::after { content: ""; position: absolute; left: 7px; top: 30%; bottom: 30%; width: 4px; border-left: 2px solid rgba(5, 8, 22, .55); border-right: 2px solid rgba(5, 8, 22, .55); }
.tl-handle:focus-visible, .tl-handle.drag { outline: 3px solid #fff; outline-offset: 1px; }
.trim-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.trim-readout { font: 600 .9rem "Inter", sans-serif; font-variant-numeric: tabular-nums; text-align: center; }
.studio-tip { flex: 1; margin: 0; font-size: .8rem; text-align: center; }
.studio-right input[type=text], .studio-right textarea { width: 100%; padding: 10px 12px; font: inherit; color: var(--text); background: #0a1024; border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
.studio-right input[type=text]:focus, .studio-right textarea:focus { outline: none; border-color: var(--cyan); }
.studio-right input:disabled { opacity: .45; }
.studio-right .setrow { padding: 6px 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { cursor: pointer; min-width: 0; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span { display: block; height: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0a1024; }
.seg span b { display: block; font-size: .92rem; white-space: nowrap; }
.seg span small { display: block; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg label:hover span { border-color: rgba(34, 211, 238, .5); }
.seg input:checked + span { border-color: var(--cyan); background: rgba(34, 211, 238, .1); }
.seg input:focus-visible + span { outline: 2px solid #fff; }
.small-note { font-size: .85rem; margin: 4px 0 0; }
.studio-loading { padding: 40px 0; text-align: center; }
@media (max-width: 900px) {
    /* phones: full screen, one scrolling column, the footer bar stays at the bottom */
    .studio-shade { padding: 0; align-items: stretch; }
    .studio { width: 100%; height: 100%; border-radius: 0; border: 0; }
    .studio-head { padding: 10px 14px; }
    .studio-cols { display: block; overflow: auto; }
    .studio-left { overflow: visible; padding: 14px 14px 16px; }
    .studio-right { border-left: 0; border-top: 1px solid var(--line); }
    .studio-tabs { position: sticky; top: 0; z-index: 2; background: #0c1226; padding: 0 4px; }
    .studio-tab { font-size: .85rem; }
    .studio-panes { overflow: visible; padding: 14px 14px 18px; }
    .studio-foot { padding: 10px 14px; }
    .studio-foot .btn { min-width: 0; flex: 1; }
    .studio-foot .form-msg { display: none; }
    .studio-foot .form-msg:not(:empty) { display: block; flex-basis: 100%; order: -1; }
    .studio-foot { flex-wrap: wrap; }
    .trim-row .btn { padding: 8px 10px; white-space: nowrap; font-size: .8rem; }
    .studio-tip { display: none; }
    .stage.vertical { height: min(46vh, 520px); }   /* (leaves room to see the trim bar under it) */
}
.main .view { padding: 0; }
/* clip editor: cam + game */
.stage-cam, .stage-game { position: absolute; left: 0; width: 100%; display: none; }
.stage-cam { top: 0; height: 35%; }
.stage-game { top: 35%; height: 65%; }
.stage.vertical.split .stage-cam, .stage.vertical.split .stage-game { display: block; }
.stage.vertical.split .stage-video { opacity: 0; }
.seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cam-wrap { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 6px; }
.cam-wrap > label { font-weight: 600; font-size: .88rem; }
.cam-wrap > small { font-size: .8rem; }
.cam-pick { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; touch-action: none; }
.cam-pick canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .75; }
.cam-box { position: absolute; border: 2px solid var(--cyan); background: rgba(34, 211, 238, .14); box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); cursor: move; touch-action: none; }
.cam-grip { position: absolute; right: -8px; bottom: -8px; width: 18px; height: 18px; border-radius: 50%; background: var(--cyan); border: 2px solid #0c1226; cursor: nwse-resize; }
.cam-corners { display: flex; gap: 6px; flex-wrap: wrap; }
.cam-corners .chip { padding: 5px 10px; font-size: .78rem; }
/* Discord link in the header: icon + word on desktop, icon only (still visible) on phones */
.nav nav a.nav-discord { display: inline-flex; align-items: center; gap: 6px; }
.nav-discord svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .nav nav a.nav-discord { display: inline-flex; } .nav nav a.nav-discord span { display: none; } .nav nav a.nav-discord svg { width: 22px; height: 22px; } }
/* phones keep Log in / Dashboard in the menu; the narrowest ones show just the logo so the menu fits beside it */
@media (max-width: 900px) { .nav nav a.account-link { display: inline; } }
@media (max-width: 480px) { .brand { font-size: 0; gap: 0; } .nav .wrap { gap: 10px; } .nav nav { gap: 14px; } }
.cta-center { justify-content: center; }
.final-note { margin-top: 18px; font-size: .92rem; }
/* profile pictures */
button.avatar { border: 0; padding: 0; cursor: pointer; position: relative; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
button.avatar:hover::after, button.avatar:focus-visible::after { content: "Edit"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 8, 22, .6); color: #fff; font: 700 .7rem "Inter", sans-serif; }
.avatar-small { width: 34px; height: 34px; border-radius: 10px; font-size: .9rem; overflow: hidden; }
.pic-row { display: flex; align-items: center; gap: 12px; }
.who-row { display: flex; align-items: center; gap: 10px; }
.who-row b, .who-row small { display: block; }
/* caption styles: the editor's live preview (matches the engine's CAPTION_STYLES) and the picker */
.stage-captions.cap-pop { font-size: 7.2cqw; text-shadow: 0 0 1.1cqw #000, 0 0 1.1cqw #000, 0 0 1.1cqw #000, 0 0 1.1cqw #000; }
.stage-captions.cap-pop span.now { color: #22ff55; display: inline-block; transform: scale(1.18); }
.stage-captions.cap-boxed { font-size: 5.8cqw; text-shadow: none; }
.stage-captions.cap-boxed span { background: rgba(0, 0, 0, .75); padding: .4cqw 1cqw; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.stage-captions.cap-boxed span.now { color: #22d3ee; }
.stage-captions.cap-neon { text-shadow: 0 0 .5cqw #8b5cf6, 0 0 1.2cqw #8b5cf6, 0 0 2cqw #8b5cf6; }
.stage-captions.cap-neon span.now { color: #22d3ee; }
.stage-captions.cap-clean { font-size: 5.6cqw; text-transform: none; color: rgba(255, 255, 255, .67); text-shadow: 0 .4cqw .9cqw rgba(0, 0, 0, .7); }
.stage-captions.cap-clean span.now { color: #fff; }
.stage.original .stage-captions.cap-pop { font-size: 4cqw; }
.stage.original .stage-captions.cap-boxed, .stage.original .stage-captions.cap-clean { font-size: 3.2cqw; }
.capstyle-wrap { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: -2px 0 6px; }
.capstyle { background: #0a1024; border: 1px solid var(--line); border-radius: 10px; padding: 9px 4px 7px; cursor: pointer; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.capstyle[aria-pressed="true"] { border-color: var(--cyan); background: rgba(34, 211, 238, .1); color: var(--text); }
.capstyle small { font: 600 .72rem "Inter", sans-serif; }
.capstyle .sample { font: 700 .74rem "Space Grotesk", sans-serif; color: #fff; white-space: nowrap; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.capstyle .sample i { font-style: normal; }
.cap-classic .sample i { color: #ffe600; }
.cap-pop .sample { font-size: .8rem; } .cap-pop .sample i { color: #22ff55; }
.cap-boxed .sample { background: rgba(0, 0, 0, .85); padding: 1px 4px; text-shadow: none; } .cap-boxed .sample i { color: #22d3ee; }
.cap-neon .sample { text-shadow: 0 0 3px #8b5cf6, 0 0 6px #8b5cf6; } .cap-neon .sample i { color: #22d3ee; }
.cap-clean .sample { color: rgba(255, 255, 255, .6); text-shadow: 0 1px 3px #000; } .cap-clean .sample i { color: #fff; }
.stage-headline small { display: none; }   /* the small channel line is no longer drawn on clips */
/* clip editor extras: preview layers and controls */
.stage-media { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform .25s ease; }
.stage-dim, .stage-fade, .stage-flash { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.stage-flash { background: #fff; }
.stage-dim { transition: opacity .25s ease; }
.stage-prog { position: absolute; left: 0; bottom: 0; height: .8%; min-height: 3px; width: 0; background: #22d3ee; pointer-events: none; }
.stage-overs { position: absolute; inset: 0; pointer-events: none; }
.stage-over { position: absolute; left: 6%; right: 6%; transform: translateY(-50%); text-align: center; font: 700 5.6cqw/1.15 "Space Grotesk", sans-serif; text-transform: uppercase; text-shadow: 0 0 .8cqw #000, 0 0 .8cqw #000, 0 0 .8cqw #000; overflow-wrap: anywhere; }
.stage-card { position: absolute; left: 8%; right: 8%; top: 50%; transform: translateY(-50%); text-align: center; color: #fff; font: 700 6.8cqw/1.15 "Space Grotesk", sans-serif; text-transform: uppercase; text-shadow: 0 0 1cqw #000, 0 0 1cqw #000; pointer-events: none; overflow-wrap: anywhere; }
.stage-card:first-of-type { top: 45%; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.chips-row .chip, .over-when .chip { padding: 6px 11px; font-size: .8rem; }
.chip[aria-pressed="true"] { background: rgba(34, 211, 238, .12); border-color: var(--cyan); color: var(--text); }
.swatches { display: flex; gap: 8px; margin: 2px 0 4px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { border-color: #050816; box-shadow: 0 0 0 2px var(--cyan); }
.hl-more { display: flex; flex-direction: column; gap: 4px; }
.hl-more > label, .studio-right > label { font-weight: 600; font-size: .85rem; }
.punch-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.punch-row small { flex-basis: 100%; font-size: .8rem; }
.fx-add { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-hint { display: block; font-size: .8rem; margin: 6px 0 8px; }
.fx-row .over-top { flex-wrap: wrap; }
.fx-row .over-top b { margin-right: auto; }
.overs-ui { display: flex; flex-direction: column; gap: 8px; }
.over-row { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #0a1024; }
.over-top { display: flex; gap: 8px; align-items: center; }
.over-top input { flex: 1; min-width: 0; }
.over-when { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .8rem; }

/* Language picker: a globe and the language code, with the browser's own list over it */
html.i18n-wait body { visibility: hidden; }
.lang-pick { position: relative; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-weight: 600; font-size: .85rem; cursor: pointer; padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; }
.lang-pick:hover, .lang-pick:focus-within { color: var(--text); border-color: #3a4f8f; }
.lang-pick svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lang-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
/* Dashboard background (account/dash-fx.js): drifting glows and a canvas with specks and a sound wave, behind
   everything (z-index -1), so the panels go slightly see-through to let it show */
.dash-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.dash-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dash-bg i { position: absolute; width: 50vmax; height: 50vmax; border-radius: 50%; filter: blur(70px); opacity: .34; }
.dash-bg i:nth-child(1) { right: -14vmax; top: -18vmax; background: radial-gradient(circle, #8b5cf6, transparent 65%); animation: hero-drift-a 24s ease-in-out infinite alternate; }
.dash-bg i:nth-child(2) { left: 10vmax; bottom: -26vmax; background: radial-gradient(circle, #22d3ee, transparent 65%); animation: hero-drift-b 30s ease-in-out infinite alternate; }
.dash-bg i:nth-child(3) { left: -16vmax; top: 18%; width: 34vmax; height: 34vmax; opacity: .16; background: radial-gradient(circle, #f472b6, transparent 65%); animation: hero-drift-c 34s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .dash-bg i { animation: none; } }
.app .panel, .app .stat { background: rgba(17, 24, 48, .76); }
.lang-legal { margin: 0 0 18px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--muted); font-size: .9rem; }


/* Landing pages (twitch-clips-to-tiktok, youtube-live-to-shorts, auto-clipper) */
.landing .lead { font-size: 1.15rem; color: #c9d2ee; }
.landing ul.big { padding-left: 1.2em; }
.landing ul.big > li { margin-bottom: 10px; }
.landing .faq { margin-top: 14px; }

/* Sign up / sign in with Twitch or Google, and the line under them */
.oauth { display: grid; gap: 10px; margin: 18px 0 6px; }
.oauth .btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 0; }
.oauth svg { width: 20px; height: 20px; flex: none; }
.btn-google { background: #fff; color: #1f1f1f; }
.btn-google:hover { background: #f1f3f4; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 16px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth-note { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 10px; }

/* Dashboard: inviting other streamers */
.invite { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.invite h3 { font-size: 1rem; margin: 0 0 4px; }
.invite-row { display: flex; gap: 8px; margin-top: 10px; }
.invite-row input { flex: 1; min-width: 0; background: #0a1024; border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 8px 10px; font-size: .88rem; }

/* A shared clip's public page (functions/c/[slug].js) */
.shared-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 32px; align-items: start; }
.shared-player video { width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 18px; border: 1px solid var(--line); object-fit: contain; }
.shared-info h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 6px; }
.shared-made { margin-top: 22px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.shared-made p { margin: 0 0 8px; }
.shared-gone { text-align: center; max-width: 620px; margin: 0 auto; }
.shared-gone .cta { justify-content: center; }
@media (max-width: 760px) { .shared-grid { grid-template-columns: 1fr; } .shared-player { max-width: 360px; margin: 0 auto; width: 100%; } }

/* Home page: recent clips members chose to share and feature */
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.showcase-grid a { display: block; text-decoration: none; color: var(--text); }
.showcase-grid .sc-thumb { position: relative; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #0a1024; border: 1px solid var(--line); }
.showcase-grid .sc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.showcase-grid a:hover .sc-thumb img { transform: scale(1.04); }
.showcase-grid .sc-thumb::after { content: "▶"; position: absolute; inset: auto auto 10px 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(5, 8, 22, .7); font-size: .8rem; }
.showcase-grid b { display: block; margin-top: 8px; font-size: .92rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.showcase-grid span { color: var(--muted); font-size: .82rem; }

/* The hero picture as WebP (2400px: 186 KB instead of the 320 KB JPEG; 1200px on phones: 72 KB). Browsers without
   image-set() keep the JPEG from the rules above. */
.hero-art, .screen, .screen .frame { background-image: image-set(url("assets/hero-2400.webp") type("image/webp"), url("assets/hero.jpg") type("image/jpeg")); }
@media (max-width: 900px) {
    .hero-art, .screen, .screen .frame { background-image: image-set(url("assets/hero-1200.webp") type("image/webp"), url("assets/hero.jpg") type("image/jpeg")); }
}

/* /compare */
.compare-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 16px 0; }
.compare-cards .card { margin: 0; padding: 20px; }
.compare-cards h3 { margin: 0 0 2px; }
.compare-table td, .compare-table th { vertical-align: top; font-size: .92rem; }
.compare-table td:first-child { color: var(--muted); }
