/* Clip Hero dashboard. Mobile first: bottom tab bar under 900px, sidebar above. */
.app-body { background: var(--bg); }
.app { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.main-col { min-width: 0; display: flex; flex-direction: column; }

/* ---------- sidebar (desktop) ---------- */
.side { display: none; }
@media (min-width: 900px) {
  .app { grid-template-columns: 248px 1fr; }
  .side { display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100dvh; padding: 22px 14px; border-right: 1px solid var(--line); background: var(--bg-2); }
  .side .brand { padding: 0 10px; }
}
.side-nav { display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 11px; color: var(--text-2); font-weight: 550; font-size: 14.5px; transition: background .15s, color .15s; position: relative; }
.nav-item svg { width: 19px; height: 19px; flex: none; }
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); }
.nav-item.active svg { color: var(--accent); }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.plan-box { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.plan-box b { display: block; font-size: 14px; margin-bottom: 2px; }
.meter { height: 6px; border-radius: 9px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 9px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: calc(62px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; background: rgba(9,9,11,.8); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.topbar-brand .brand-name { display: none; }
.page-title { font-size: 17px; font-weight: 700; letter-spacing: -.02em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.auto-toggle { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 5px 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; user-select: none; }
.auto-toggle.on { border-color: rgba(198,255,61,.35); background: rgba(198,255,61,.06); }
.auto-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.auto-toggle.on .auto-label { color: var(--accent); }
.auto-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.auto-toggle.on .auto-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(198,255,61,.18); animation: pulse 2s infinite; }
.auto-toggle .switch { width: 44px; height: 28px; }
.auto-toggle .switch .track::after { width: 20px; height: 20px; }
.auto-toggle .switch input:checked + .track::after { transform: translateX(16px); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2c2c34, #1a1a1f); border: 1px solid var(--line-2); font-weight: 700; font-size: 14px; color: var(--text); flex: none; }
@media (min-width: 900px) {
  .topbar { padding: 0 32px; height: 68px; }
  .topbar-brand { display: none; }
  .page-title { font-size: 20px; }
}
@media (max-width: 899px) { .page-title { display: none; } .auto-text-long { display: none; } }

/* ---------- views ---------- */
.view { flex: 1; padding: 18px 16px calc(100px + env(safe-area-inset-bottom)); width: 100%; max-width: 1180px; margin: 0 auto; outline: none; }
@media (min-width: 900px) { .view { padding: 28px 32px 60px; } }
.view-enter { animation: view-in .28s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.greet { margin: 4px 0 20px; }
.greet h2 { font-size: 26px; letter-spacing: -.03em; margin: 0 0 4px; }
.greet p { margin: 0; color: var(--muted); }
.sec { margin-top: 28px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h3 { font-size: 17px; letter-spacing: -.015em; margin: 0; display: flex; align-items: center; gap: 10px; }
.sec-head a { color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.sec-head a:hover { color: var(--accent); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid-2 > *, .sec { min-width: 0; }
@media (min-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; } }

/* hero autopilot card */
.auto-card { position: relative; overflow: hidden; padding: 20px; display: flex; align-items: center; gap: 16px; }
.auto-card.on { border-color: rgba(198,255,61,.25); background: radial-gradient(420px 200px at 100% 0%, rgba(198,255,61,.12), transparent 70%), var(--surface); }
.auto-card .ac-body { flex: 1; min-width: 0; }
.auto-card h3 { margin: 0 0 3px; font-size: 18px; letter-spacing: -.02em; }
.auto-card p { margin: 0; color: var(--text-2); font-size: 14px; }
.ac-icon { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.auto-card.on .ac-icon { background: var(--accent); color: var(--accent-ink); }
.ac-icon svg { width: 24px; height: 24px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.stat { padding: 16px; }
.stat span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat b { display: block; font-size: 26px; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--accent); font-weight: 600; font-size: 12px; }

/* approval rail */
.approve-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.approve-rail::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .approve-rail { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin: 0; padding: 0; overflow: visible; } }
.acard { scroll-snap-align: start; padding: 10px; display: grid; gap: 10px; }
.acard .poster { border-radius: 14px; }
.acard h4 { margin: 0; font-size: 14px; line-height: 1.35; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.acard-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.acard-actions .btn { height: 42px; }

/* poster (9:16 thumbnail) */
.poster { position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: var(--surface-2); cursor: pointer; isolation: isolate; }
.poster img, .poster video { width: 100%; height: 100%; object-fit: cover; }
.poster-art { position: absolute; inset: 0; background: radial-gradient(90% 60% at 30% 25%, hsl(var(--h) 70% 45% / .75), transparent 70%), radial-gradient(80% 60% at 80% 85%, hsl(calc(var(--h) + 60) 60% 35% / .6), transparent 70%), linear-gradient(170deg, hsl(var(--h) 25% 14%), #09090b); }
.poster-art::after { content: ""; position: absolute; left: 50%; bottom: -8%; width: 70%; height: 55%; transform: translateX(-50%); border-radius: 50% 50% 12% 12%; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.65)); filter: blur(2px); }
.poster-cap { position: absolute; left: 8px; right: 8px; top: 64%; text-align: center; font-weight: 800; font-size: clamp(13px, 1.6vw, 16px); line-height: 1.1; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.6), 0 0 12px rgba(0,0,0,.5); z-index: 1; letter-spacing: -.01em; }
.poster-cap em { font-style: normal; color: var(--accent); }
.poster-top { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; z-index: 2; gap: 6px; }
.poster-top .badge { background: rgba(0,0,0,.55); backdrop-filter: blur(8px); color: #fff; }
.poster-top .badge.accent { background: var(--accent); color: var(--accent-ink); }
.poster-play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; opacity: 0; transition: opacity .2s; background: rgba(0,0,0,.25); }
.poster-play span { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); backdrop-filter: blur(10px); }
.poster-play svg { width: 22px; height: 22px; margin-left: 3px; color: #fff; }
.poster:hover .poster-play, .poster:focus-visible .poster-play { opacity: 1; }
@media (hover: none) { .poster-play { opacity: 1; background: transparent; } .poster-play span { width: 44px; height: 44px; } }
.poster-dur { position: absolute; right: 8px; bottom: 8px; z-index: 2; font-family: var(--mono); font-size: 11.5px; background: rgba(0,0,0,.6); color: #fff; padding: 2px 7px; border-radius: 6px; }

/* timeline */
.timeline { display: grid; gap: 2px; grid-template-columns: minmax(0, 1fr); }
.tl-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; transition: background .15s; cursor: pointer; }
.tl-row:hover { background: var(--surface-2); }
.tl-time { width: 50px; flex: none; font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.tl-thumb { width: 38px; height: 56px; flex: none; border-radius: 8px; overflow: hidden; position: relative; }
.tl-thumb .poster { border-radius: 8px; aspect-ratio: auto; height: 100%; }
.tl-thumb .poster-cap, .tl-thumb .poster-top, .tl-thumb .poster-play, .tl-thumb .poster-dur { display: none; }
.tl-body { flex: 1; min-width: 0; }
.tl-body b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-body span { font-size: 12.5px; color: var(--muted); }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 18px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }
.working { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.working .spinner { color: var(--accent); width: 18px; height: 18px; }
.progress { height: 4px; border-radius: 9px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 9px; transition: width .6s var(--ease); }

/* library */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .chips { margin: 0; padding: 0; } }
.fchip { height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.fchip:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.fchip.on { background: var(--text); color: var(--bg); border-color: transparent; }
.fchip .n { font-size: 11.5px; opacity: .7; }
.lib-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .lib-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .lib-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; } }
.lcard { display: grid; gap: 8px; }
.lcard h4 { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

/* modal / player */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.7); backdrop-filter: blur(8px); animation: fade .2s; }
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 860px; max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 24px; display: grid; grid-template-columns: minmax(0, 340px) 1fr; animation: sheet-in .3s var(--ease); position: relative; }
@keyframes sheet-in { from { transform: translateY(16px) scale(.98); opacity: 0; } }
.sheet-video { background: #000; display: grid; place-items: center; border-radius: 24px 0 0 24px; overflow: hidden; }
.sheet-video video, .sheet-video .poster { width: 100%; aspect-ratio: 9/16; border-radius: 0; background: #000; }
.sheet-body { padding: 26px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sheet-body h2 { font-size: 21px; letter-spacing: -.02em; line-height: 1.25; margin: 0; padding-right: 36px; }
.sheet-close { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); display: grid; place-items: center; z-index: 3; }
.sheet-close svg { width: 18px; height: 18px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.desc { font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; max-height: 140px; overflow: auto; }
.sheet-actions { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-actions .wide { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .modal { padding: 0; place-items: end stretch; }
  .sheet { grid-template-columns: 1fr; border-radius: 24px 24px 0 0; max-height: 100dvh; }
  .sheet-video { border-radius: 24px 24px 0 0; }
  .sheet-video video, .sheet-video .poster { height: 56dvh; width: auto; aspect-ratio: 9 / 16; margin: 0 auto; }
  .sheet-body { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
}

/* create (chat) */
.chat { display: flex; flex-direction: column; min-height: calc(100dvh - 62px - 120px); max-width: 780px; margin: 0 auto; }
@media (min-width: 900px) { .chat { min-height: calc(100dvh - 68px - 90px); } }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; }
.chat-hello { text-align: center; padding: 30px 8px 10px; }
.chat-hello .orb { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; background: var(--accent); display: grid; place-items: center; box-shadow: 0 0 60px -10px var(--accent-glow); }
.chat-hello .orb img { width: 40px; height: 40px; filter: invert(1) brightness(.1); }
.chat-hello h2 { font-size: 26px; letter-spacing: -.03em; margin: 0 0 8px; }
.chat-hello p { color: var(--text-2); margin: 0 auto; max-width: 440px; }
.suggest { display: grid; gap: 10px; margin-top: 26px; }
@media (min-width: 640px) { .suggest { grid-template-columns: 1fr 1fr; } }
.sug { text-align: left; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; color: var(--text-2); line-height: 1.4; transition: border-color .15s, color .15s, background .15s; }
.sug b { display: block; color: var(--text); font-size: 13px; margin-bottom: 3px; }
.sug:hover { border-color: rgba(198,255,61,.35); color: var(--text); background: var(--surface-2); }
.bubble { max-width: 86%; padding: 12px 15px; border-radius: 18px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); font-weight: 500; border-bottom-right-radius: 6px; }
.bubble.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.ai .who { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.bubble.ai .who img { width: 16px; height: 16px; }
.bubble.ai.pending { color: var(--text-2); display: flex; gap: 10px; align-items: center; }
.bubble.ai.pending .spinner { color: var(--accent); flex: none; }
.bubble.ai.failed { border-color: rgba(255,92,92,.3); }
.bubble-time { font-size: 11px; color: var(--muted); align-self: flex-end; margin-top: -8px; }
.composer { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--bg) 30%); padding-top: 14px; }
@media (min-width: 900px) { .composer { bottom: 0; padding-bottom: 20px; } }
.composer-box { display: flex; align-items: flex-end; gap: 8px; padding: 8px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 20px 50px -20px rgba(0,0,0,.8); transition: border-color .15s, box-shadow .15s; }
.composer-box:focus-within { border-color: rgba(198,255,61,.45); box-shadow: 0 0 0 4px rgba(198,255,61,.08), 0 20px 50px -20px rgba(0,0,0,.8); }
.composer textarea { flex: 1; border: 0; background: transparent; resize: none; outline: none; padding: 10px 10px; font-size: 16px; line-height: 1.45; max-height: 180px; min-height: 44px; }
.send { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; transition: transform .15s, opacity .15s; }
.send:disabled { opacity: .35; }
.send svg { width: 20px; height: 20px; }
.composer-hint { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 8px 6px 0; }

/* forms / settings */
.set-card { padding: 20px; }
.set-card + .set-card { margin-top: 14px; }
.set-card h3 { margin: 0 0 4px; font-size: 16.5px; letter-spacing: -.015em; }
.set-card > p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }
.set-row { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.set-row + .set-row { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.set-row .t b { display: block; font-size: 14.5px; }
.set-row .t span { font-size: 13px; color: var(--muted); }
.fmt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 900px) { .fmt-grid { grid-template-columns: repeat(4, 1fr); } }
.fmt { position: relative; padding: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; transition: border-color .15s, background .15s; display: grid; gap: 6px; min-height: 118px; align-content: start; }
.fmt input { position: absolute; opacity: 0; }
.fmt .f-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); }
.fmt .f-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fmt b { font-size: 14px; }
.fmt span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.fmt::after { content: ""; position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.fmt:has(input:checked) { border-color: rgba(198,255,61,.5); background: rgba(198,255,61,.05); }
.fmt:has(input:checked) .f-ic { background: var(--accent); color: var(--accent-ink); }
.fmt:has(input:checked)::after { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%230b0d05' stroke-width='2.2'/%3E%3C/svg%3E") center/100% no-repeat; }
.fmt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.times { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.time-chip { height: 38px; padding: 0 6px 0 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 14px; }
.time-chip button { width: 26px; height: 26px; border: 0; background: transparent; color: var(--muted); border-radius: 7px; display: grid; place-items: center; }
.time-chip button:hover { background: var(--surface-3); color: var(--text); }
.time-chip button svg { width: 14px; height: 14px; }
.time-add { width: 118px; height: 38px; font-family: var(--mono); font-size: 14px; }
.src-list { display: grid; gap: 8px; margin-bottom: 12px; }
.src { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; }
.src .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src .icon-btn { margin-left: auto; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }
.add-row { display: flex; gap: 8px; }
.add-row .input { flex: 1; }
.save-bar { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 18px; border-radius: 16px; background: #1d1d23; border: 1px solid var(--line-2); box-shadow: 0 20px 50px -10px rgba(0,0,0,.8); animation: toast-in .25s var(--ease); z-index: 5; }
@media (min-width: 900px) { .save-bar { bottom: 20px; } }
.save-bar span { font-size: 14px; font-weight: 600; }
.choice-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .choice-grid { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; padding: 18px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; display: grid; gap: 6px; }
.choice input { position: absolute; opacity: 0; }
.choice b { font-size: 15.5px; }
.choice span { color: var(--muted); font-size: 13.5px; }
.choice .rec { justify-self: start; }
.choice:has(input:checked) { border-color: rgba(198,255,61,.5); background: rgba(198,255,61,.05); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* channel */
.chan { display: flex; align-items: center; gap: 16px; padding: 20px; }
.chan-av { width: 60px; height: 60px; border-radius: 50%; flex: none; background: linear-gradient(135deg, #ff3355, #b3002a); display: grid; place-items: center; font-weight: 800; font-size: 22px; overflow: hidden; }
.chan-av img { width: 100%; height: 100%; object-fit: cover; }
.chan-body { flex: 1; min-width: 0; }
.chan-body b { display: block; font-size: 18px; letter-spacing: -.02em; }
.chan-body span { color: var(--muted); font-size: 13.5px; }
.connect-hero { text-align: center; padding: 40px 22px; }
.connect-hero .yt { width: 76px; height: 54px; margin: 0 auto 20px; }
.connect-hero h2 { font-size: 24px; letter-spacing: -.03em; margin: 0 0 8px; }
.connect-hero p { color: var(--text-2); max-width: 420px; margin: 0 auto 22px; }
.safe-list { list-style: none; padding: 0; margin: 22px auto 0; display: grid; gap: 8px; max-width: 360px; text-align: left; font-size: 13.5px; color: var(--text-2); }
.safe-list li { display: flex; gap: 10px; }
.safe-list svg { width: 16px; height: 16px; flex: none; color: var(--accent); margin-top: 3px; }

/* onboarding */
.onb { max-width: 720px; margin: 0 auto; padding-top: 6px; }
.onb-steps { display: flex; gap: 6px; margin-bottom: 26px; }
.onb-steps i { flex: 1; height: 4px; border-radius: 9px; background: var(--surface-3); }
.onb-steps i.done { background: var(--accent); }
.onb-kicker { font-family: var(--mono); font-size: 12.5px; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.onb h2 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -.035em; line-height: 1.1; margin: 8px 0 8px; }
.onb > p { color: var(--text-2); margin: 0 0 24px; }
.onb-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; }
.onb-nav .btn-primary { min-width: 150px; }
body.onboarding .side, body.onboarding .tabbar, body.onboarding .auto-toggle { display: none; }
body.onboarding .app { grid-template-columns: 1fr; }
body.onboarding .topbar-brand { display: inline-flex; }
body.onboarding .topbar-brand .brand-name { display: inline; }
body.onboarding .page-title { display: none; }
.done-mark { width: 84px; height: 84px; border-radius: 26px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin: 20px auto 22px; box-shadow: 0 0 80px -10px var(--accent-glow); animation: pop-in .5s var(--ease); }
.done-mark svg { width: 40px; height: 40px; }
@keyframes pop-in { from { transform: scale(.6); opacity: 0; } }

/* tab bar (phone) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(12,12,15,.9); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .tabbar { display: none; } }
.tab { display: grid; justify-items: center; gap: 3px; padding: 7px 0 5px; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 600; position: relative; -webkit-tap-highlight-color: transparent; }
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--text); }
.tab.active svg { color: var(--accent); }
.tab .dotc { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }
.tab.create-tab span.plus { width: 44px; height: 32px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin-bottom: 1px; }
.tab.create-tab span.plus svg { width: 20px; height: 20px; color: var(--accent-ink); }
.tab.create-tab { color: var(--text-2); }

/* public demo banner */
.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: linear-gradient(90deg, rgba(198,255,61,.16), rgba(198,255,61,.05)); border-bottom: 1px solid rgba(198,255,61,.25); font-size: 13.5px; color: var(--text-2); }
.demo-banner b { color: var(--accent); margin-right: 4px; }
@media (max-width: 640px) { .demo-banner { flex-direction: column; align-items: stretch; text-align: center; padding: 10px 12px; } }

.connect-note { margin: 16px auto 0; max-width: 440px; text-align: left; padding: 14px 16px; border-radius: 14px; background: rgba(255,181,71,.08); border: 1px solid rgba(255,181,71,.3); color: var(--text-2); font-size: 14px; }
.connect-note b { display: block; color: var(--warn); margin-bottom: 4px; }

/* own-Zernio (BYO) guide */
.link-btn { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 14px; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.byo-steps { list-style: none; padding: 0; margin: 4px 0 18px; display: grid; gap: 12px; }
.byo-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.byo-steps li > span { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.byo-steps li b { display: block; color: var(--text); }
.byo-steps a { color: var(--accent); text-decoration: underline; }
.connect-note .btn { display: inline-flex; }
