/* ==========================================================================
   Leaf API demo kit: shared styles
   ========================================================================== */

:root {
  --bg: #faf8f6;
  --fg: #1a4d2e;
  --fg-soft: rgba(26, 77, 46, 0.72);
  --fg-mute: rgba(26, 77, 46, 0.5);
  --card: #ffffff;
  --primary: #2d7a4f;
  --primary-hover: #256842;
  --primary-fg: #ffffff;
  --secondary: #f0ebe3;
  --muted: #e8ddf5;
  --border: #e0d5ca;
  --input: #ffffff;
  --danger: #c41e3a;
  --dark: #0f2818;
  --dark-2: #1a3a2a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(26, 77, 46, 0.06), 0 1px 3px rgba(26, 77, 46, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 40, 24, 0.12);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--fg);
  background: linear-gradient(180deg, var(--secondary) 0%, var(--bg) 280px);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--primary); }

/* ---------- Shell ---------- */
.leaf-shell { max-width: 1240px; margin: 0 auto; padding: 16px; }
.leaf-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 14px; flex-wrap: wrap; }
.leaf-brand { display: flex; align-items: center; gap: 10px; }
.leaf-logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--primary); color: var(--primary-fg);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.leaf-brand-title { font-weight: 700; font-size: 16px; }
.leaf-brand-sub { font-size: 12px; color: var(--fg-mute); display: flex; align-items: center; gap: 6px; }
.leaf-status { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--card);
  border-radius: 999px; padding: 5px 10px; color: var(--fg-soft);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.status-dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }

.leaf-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.leaf-app {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
  padding: 22px; min-height: 520px; min-width: 0;
}
.leaf-stage { min-width: 0; }
/* The demo's own layouts respond to the space the demo really has (page, tablet or phone), not the window. */
.leaf-screen { container: site / inline-size; }
@media (max-width: 960px) { .leaf-layout { grid-template-columns: minmax(0, 1fr); } }
@container site (max-width: 960px) { .leaf-app { padding: 16px; } }

.leaf-boot { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--fg-mute); font-size: 14px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--secondary); border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- API call log ---------- */
.leaf-log {
  background: var(--dark); color: #f0ebe3; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  height: 640px; position: sticky; top: 16px;
}
@media (max-width: 960px) { .leaf-log { position: static; height: 360px; } }
.log-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-size: 14px; font-weight: 600; }
.log-head .count { color: rgba(255, 255, 255, 0.5); font-weight: 500; font-size: 12px; }
.log-head .spacer { flex: 1; }
.log-head button { background: none; border: 0; color: rgba(255, 255, 255, 0.55); padding: 4px; display: inline-flex; }
.log-head button:hover { color: #fff; }
.pulse { position: relative; width: 8px; height: 8px; }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #4ade80; }
.pulse::before { animation: ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite; opacity: 0.6; }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
.log-body { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.log-empty { text-align: center; color: rgba(255, 255, 255, 0.5); font-size: 13px; padding: 40px 16px; line-height: 1.5; }
.log-item { background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 10px; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.log-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.log-copy {
  margin-left: auto; flex-shrink: 0; width: 24px; height: 24px; border: 0; border-radius: 6px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.75); opacity: 0; transition: opacity 0.15s, background 0.15s;
}
.log-copy svg { width: 13px; height: 13px; }
.log-item:hover .log-copy, .log-copy:focus-visible, .log-copy.done { opacity: 1; }
.log-copy:hover { background: #22c55e; color: #052e16; }
.log-copy.done { background: #22c55e; color: #052e16; }
@media (hover: none) { .log-copy { opacity: 1; } }
.log-path { font-family: var(--mono); font-size: 11.5px; color: rgba(255, 255, 255, 0.92); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-body pre { margin: 8px 0 0; max-height: 110px; overflow: auto; background: rgba(0, 0, 0, 0.3); border-radius: 6px; padding: 8px; font-family: var(--mono); font-size: 11px; line-height: 1.5; color: rgba(255, 255, 255, 0.72); }
.log-result { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; }
.log-result.ok { color: #86efac; }
.log-result.err { color: #fca5a5; }
.log-result .ms { margin-left: auto; color: rgba(255, 255, 255, 0.4); }
.log-result svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ---------- Methods ---------- */
.method { flex-shrink: 0; font-size: 10px; font-weight: 700; border-radius: 4px; padding: 2px 6px; letter-spacing: 0.02em; }
.m-GET { background: #dbeafe; color: #1e40af; }
.m-POST { background: #dcfce7; color: #166534; }
.m-PATCH { background: #f3e8ff; color: #6b21a8; }
.m-PUT { background: #fef9c3; color: #854d0e; }
.m-DELETE { background: #fee2e2; color: #991b1b; }

/* ---------- Primitives ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; border: 1px solid transparent;
  padding: 8px 14px; font-size: 14px; font-weight: 600; background: var(--primary); color: var(--primary-fg); white-space: nowrap; text-decoration: none;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
}
.btn:hover:not(:disabled) { background: var(--primary-hover); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn-outline { background: var(--card); color: var(--fg); border-color: var(--border); }
.btn-outline:hover:not(:disabled) { background: var(--secondary); border-color: rgba(45, 122, 79, 0.35); }
.btn-ghost { background: transparent; color: var(--fg-soft); }
.btn-ghost:hover:not(:disabled) { background: var(--secondary); color: var(--fg); }
.btn-danger, .btn.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a3182f; border-color: #a3182f; color: #fff; }
.btn-warn, .btn.btn-warn { background: #f59e0b; border-color: #f59e0b; color: #422006; }
.btn-warn:hover:not(:disabled) { background: #d97706; border-color: #d97706; color: #422006; }
/* Armed "click again to confirm" state for destructive buttons. */
.btn.armed { background: var(--danger); border-color: var(--danger); color: #fff; animation: armPulse 1s ease-in-out infinite; }
.btn.armed:hover:not(:disabled) { background: #a3182f; border-color: #a3182f; color: #fff; }
@keyframes armPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.35); } 50% { box-shadow: 0 0 0 5px rgba(196, 30, 58, 0); } }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; padding: 4px; color: var(--fg-mute); display: inline-flex; border-radius: 6px; }
.icon-btn { transition: color .15s, background .15s; }
.icon-btn:hover { color: var(--fg); background: var(--secondary); }
.icon-btn.danger:hover { color: var(--danger); background: #fee2e2; }
.icon-btn.armed, .icon-btn.armed:hover { background: var(--danger); color: #fff; padding: 4px 8px; font-size: 12px; font-weight: 600; gap: 4px; align-items: center; }
.icon-btn svg { width: 15px; height: 15px; }

.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border); background: var(--input); border-radius: 9px; padding: 8px 11px; font-size: 14px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.15); }
.textarea { resize: vertical; min-height: 90px; }

.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.badge-low { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.badge-medium { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.badge-hard { background: #ffe4e6; color: #9f1239; border-color: #fecdd3; }
.badge-expert { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.badge-mobile { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.chip { border: 0; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 500; background: var(--secondary); color: var(--fg-soft); transition: background .15s, color .15s; }
.chip:hover:not(.active) { background: #e7dfd3; color: var(--fg); }
.chip.active { background: var(--primary); color: var(--primary-fg); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.muted { color: var(--fg-mute); }
.soft { color: var(--fg-soft); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 8px; }
.grid { display: grid; gap: 12px; }
.title { font-size: 20px; font-weight: 700; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-mute); }
.skeleton { background: var(--secondary); border-radius: 10px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }
.error-banner { margin-bottom: 14px; border: 1px solid rgba(196, 30, 58, 0.3); background: rgba(196, 30, 58, 0.08); color: var(--danger); padding: 9px 12px; border-radius: 10px; font-size: 13px; }
.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none !important; } }

/* ---------- Modal ---------- */
.leaf-overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(15, 40, 24, 0.45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.leaf-modal {
  width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card); border-radius: 20px;
  box-shadow: 0 25px 60px rgba(15, 40, 24, 0.3); animation: popIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.modal-hero { padding: 22px 22px 0; display: flex; gap: 14px; align-items: flex-start; }
.modal-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #dcfce7; color: var(--primary); }
.modal-icon.warn { background: #fef3c7; color: #b45309; }
.modal-icon.err { background: #ffe4e6; color: #be123c; }
.modal-icon svg { width: 22px; height: 22px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-sub { font-size: 13.5px; color: var(--fg-soft); margin-top: 4px; line-height: 1.5; }
.modal-body { padding: 18px 22px 22px; }
.modal-close { margin-left: auto; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--fg-soft); margin-bottom: 6px; }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 8px; }
.key-input { font-family: var(--mono); letter-spacing: 0.02em; }
.hint { font-size: 12px; color: var(--fg-mute); margin-top: 8px; line-height: 1.5; }
.account-note { display: flex; align-items: center; gap: 6px; color: var(--primary); }
.account-note svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-google { width: 100%; gap: 10px; padding: 10px 14px; color: var(--primary); border-color: var(--primary); }
.btn-google svg { width: 18px; height: 18px; }
.or-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 14px; font-size: 12px; color: var(--fg-mute); }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--secondary); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 19px; }
.stat span { font-size: 11px; color: var(--fg-soft); }
.meter { height: 6px; background: var(--secondary); border-radius: 999px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width 0.5s ease; }
.meter.warn > i { background: #f59e0b; }
.meter.full > i { background: var(--danger); }
.res-list { display: flex; flex-direction: column; gap: 6px; }
.res-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 11px; padding: 9px 10px; }
.res-item.current { border-color: var(--primary); background: rgba(45, 122, 79, 0.05); }
.res-item .grow { flex: 1; min-width: 0; }
.res-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-meta { font-size: 11.5px; color: var(--fg-mute); }
.tag { font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 5px; background: var(--secondary); color: var(--fg-soft); }
.tag.green { background: #dcfce7; color: #166534; }
.tag.red { background: #ffe4e6; color: #9f1239; }
.need-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px dashed #c4b5fd; background: #f5f3ff; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.need-box p { flex-basis: 100%; margin: 0; }
.need-facts { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--fg-soft); }
.need-facts b { color: #6d28d9; }
.need-count { display: flex; align-items: baseline; gap: 6px; }
.need-count b { font-size: 30px; font-weight: 800; color: #6d28d9; line-height: 1; transition: transform .2s; }
.need-count span { font-size: 12px; color: var(--fg-soft); }
.need-slots { display: flex; gap: 5px; }
.need-slots i { width: 22px; height: 22px; border-radius: 6px; background: #ddd6fe; border: 2px solid #c4b5fd; }
.need-slots i.used { background: #7c3aed; border-color: #7c3aed; }
.need-slots i.just-freed { animation: popIn .35s ease; background: #dcfce7; border-color: #22c55e; }
.res-item.freed { opacity: .55; border-style: dashed; }
/* Project choice rows: info on the left, the two choices (each with an optional Recommended badge) on the right. */
.res-item.res-choice { flex-wrap: wrap; row-gap: 10px; }
.res-choice-info { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; }
.res-choice-actions { display: flex; align-items: flex-end; gap: 8px; margin-left: auto; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.choice.recommended .btn-warn { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3); }
.choice.recommended .btn-danger { box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.22); }
.rec-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.rec-badge svg { width: 10px; height: 10px; fill: currentColor; }
.rec-badge.use { background: #fef3c7; color: #92400e; }
.rec-badge.delete { background: #ffe4e6; color: #9f1239; }
.res-meta.fit-ok { color: #166534; }
.res-meta.fit-short { color: #9f1239; }
.res-meta.fit-tight { color: #92400e; }
.res-item.suggested { border-color: rgba(196, 30, 58, 0.45); background: rgba(196, 30, 58, 0.04); }
.ok-box { border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.warn-box { border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.progress-line { height: 4px; background: var(--secondary); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress-line > i { display: block; height: 100%; background: var(--primary); transition: width 0.25s; }

/* ---------- Toast ---------- */
.leaf-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; background: var(--dark); color: #fff;
  padding: 10px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: popIn 0.25s ease;
}

/* ==========================================================================
   Device preview (website / tablet / mobile): only the demo goes in the frame
   ========================================================================== */
.leaf-statusbar, .leaf-homebar { display: none; }
.leaf-device { position: relative; }
html:not([data-device="desktop"]) .leaf-layout { align-items: stretch; }
html:not([data-device="desktop"]) .leaf-stage {
  display: flex; justify-content: center; align-items: flex-start; padding: 18px 12px; border-radius: 18px; border: 1px solid var(--border);
  background: radial-gradient(circle at 30% 20%, rgba(45,122,79,.12), transparent 50%), radial-gradient(circle at 80% 80%, rgba(139,92,246,.10), transparent 45%), #ece7df;
}
html:not([data-device="desktop"]) .leaf-device {
  display: flex; flex-direction: column; overflow: hidden; background: var(--card); flex-shrink: 0;
  border: 12px solid #121212; box-shadow: 0 0 0 2px #3a3a3a, 0 30px 70px rgba(0,0,0,.28);
}
/* Real device proportions (390×844 phone, 820×1180 tablet). leaf-api.js zooms the whole frame down to fit the
   window instead of squashing its height, so the preview always has the shape of a real device. */
html[data-device="mobile"] .leaf-device { width: 390px; height: 844px; border-radius: 56px; --leaf-screen-r: 44px; }
html[data-device="tablet"] .leaf-device { width: 820px; height: 1180px; border-radius: 38px; border-width: 16px; --leaf-screen-r: 22px; }
html:not([data-device="desktop"]) .leaf-screen { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
/* Chrome (GPU compositing) ignores the frame's rounded overflow clip for backdrop-filter, so a blurred bottom nav or
   sheet backdrop paints square corners over the frame. A solid mask forces a real mask layer that clips to the
   element's own rounded corners (radius = frame radius - border). clip-path: inset() is not enough for sticky navs. */
html:not([data-device="desktop"]) .leaf-screen,
html:not([data-device="desktop"]) .leaf-device > .in-device { -webkit-mask-image: linear-gradient(#000, #000); mask-image: linear-gradient(#000, #000); }
html:not([data-device="desktop"]) .leaf-screen { border-radius: 0 0 var(--leaf-screen-r) var(--leaf-screen-r); }
html:not([data-device="desktop"]) .leaf-device > .in-device { border-radius: var(--leaf-screen-r); overflow: hidden; }
html:not([data-device="desktop"]) .leaf-screen::-webkit-scrollbar { width: 0; }
html:not([data-device="desktop"]) .leaf-app { border: 0; border-radius: 0; box-shadow: none; min-height: 100%; padding: 16px 16px 28px; }
/* Apps drawn edge to edge (chat, full-screen tools): a root with .leaf-bleed fills the whole device screen with no
   white gutter around it, the way a native app does. */
html:not([data-device="desktop"]) .leaf-app:has(> .leaf-bleed) { padding: 0; display: flex; flex-direction: column; }
html:not([data-device="desktop"]) .leaf-app > .leaf-bleed { flex: 1; min-height: 0; border: 0; border-radius: 0; }
/* The API calls panel stays beside the device and matches its height. */
html:not([data-device="desktop"]) .leaf-log { height: auto; contain: size; position: static; }
@media (max-width: 960px) { html:not([data-device="desktop"]) .leaf-log { contain: none; height: 360px; } }
html:not([data-device="desktop"]) .leaf-statusbar {
  display: flex; align-items: center; justify-content: space-between; position: relative; flex-shrink: 0;
  padding: 0 26px; height: 48px; font-size: 15px; font-weight: 600; color: #111; background: var(--card);
}
html[data-device="tablet"] .leaf-statusbar { height: 30px; font-size: 12px; padding: 0 20px; }
.sb-island { position: absolute; left: 50%; top: 11px; width: 122px; height: 34px; transform: translateX(-50%); background: #000; border-radius: 999px; }
html[data-device="tablet"] .sb-island { width: 8px; height: 8px; top: 11px; background: #2a2a2a; }
.sb-icons { display: inline-flex; align-items: center; gap: 6px; }
.sb-icons svg { fill: #111; }
.sb-battery { position: relative; width: 25px; height: 12px; border: 1.5px solid rgba(0,0,0,.45); border-radius: 4px; padding: 1.5px; }
.sb-battery::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; background: rgba(0,0,0,.45); border-radius: 0 2px 2px 0; }
.sb-level { display: block; height: 100%; width: 100%; background: #111; border-radius: 1.5px; }
.sb-level.low { background: #ef4444; }
html:not([data-device="desktop"]) .leaf-homebar {
  display: block; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 999px; background: #111; opacity: .85; z-index: 5; pointer-events: none;
}
html[data-device="tablet"] .leaf-homebar { width: 180px; }
/* The demo's own toasts appear on the device screen. */
.leaf-device > .leaf-toast { position: absolute; }

/* ---------- Top bar controls: preview size + settings ---------- */
.tb-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); background: var(--card); border-radius: 999px; }
.tb-seg-btn, .tb-btn {
  width: 30px; height: 28px; border: 0; border-radius: 999px; background: transparent; color: var(--fg-mute);
  display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background .15s, color .15s;
}
.tb-seg-btn svg, .tb-btn svg { width: 16px; height: 16px; }
.tb-seg-btn:hover, .tb-btn:hover { color: var(--fg); background: var(--secondary); }
.tb-seg-btn.on { background: var(--primary); color: var(--primary-fg); }
.tb-btn { width: 36px; height: 36px; border: 1px solid var(--border); background: var(--card); }
.tb-btn:hover svg { animation: spin 2s linear infinite; }
@media (max-width: 600px) { .tb-seg { display: none; } }

/* ---------- Narrow demo widths (mobile preview, small screens) ---------- */
@media (max-width: 480px) {
  .leaf-shell { padding: 12px; }
  .leaf-status .status-chip { font-size: 11px; }
  .stat-grid { gap: 6px; }
}
@container site (max-width: 480px) {
  .leaf-app { padding: 14px; border-radius: 14px; min-height: 0; }
  .title { font-size: 18px; }
}

/* ---------- LeafTube ----------
   Palette: night canopy (green-black surfaces #0b100e → #1a2420), leaf-lime accent #c4f24a with ink #0d1a05,
   moss-white text #eef6ea. Radius scale 8 / 12 / 16 / 24 (pills 999), 4-8px spacing rhythm, 16px phone gutters.
   Display: Geist 800 with tight tracking; time codes and counts in Geist Mono. Signature: the leaf play mark,
   leaf-shaped scrub knob and Create button, subscribe "leaf burst". */
.leaf-app:has(> .lt) { padding: 0; background: #0b100e; overflow: clip; display: flex; flex-direction: column; }
html[data-device="desktop"] .leaf-app:has(> .lt) { border-color: #1d2925; box-shadow: 0 20px 60px rgba(8, 14, 11, 0.25); }
.leaf-device:has(.lt) { background: #0b100e; }
.leaf-device:has(.lt) .leaf-statusbar { background: #0b100e; color: #eef6ea; transition: background 0.3s; }
.leaf-device:has(.lt-watching) .leaf-statusbar { background: #000; }
.leaf-device:has(.lt) .sb-icons svg { fill: #eef6ea; }
.leaf-device:has(.lt) .sb-battery { border-color: rgba(238, 246, 234, 0.5); }
.leaf-device:has(.lt) .sb-battery::after { background: rgba(238, 246, 234, 0.5); }
.leaf-device:has(.lt) .sb-level { background: #eef6ea; }
.leaf-device:has(.lt) .leaf-homebar { background: #eef6ea; opacity: 0.5; }
.leaf-device:has(.lt) > .leaf-toast, body:has(.lt) > .leaf-toast { background: #eef6ea; color: #0b100e; font-weight: 600; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
html[data-device="mobile"] .leaf-device:has(.lt) > .leaf-toast { bottom: 100px; }
html[data-device="mobile"] .leaf-device:has(.lt-has-mini) > .leaf-toast { bottom: 166px; }
html[data-device="mobile"] .leaf-device:has(.lt-watching) > .leaf-toast { bottom: 36px; }

.lt, .lt-sheet-host {
  --lt-bg: #0b100e;
  --lt-bg-2: #0f1613;
  --lt-card: #131b18;
  --lt-card-2: #1a2420;
  --lt-hover: #22302a;
  --lt-line: rgba(214, 255, 196, 0.08);
  --lt-line-2: rgba(214, 255, 196, 0.15);
  --lt-text: #eef6ea;
  --lt-soft: rgba(238, 246, 234, 0.76);
  --lt-mute: rgba(238, 246, 234, 0.54);
  --lt-faint: rgba(238, 246, 234, 0.36);
  --lt-lime: #c4f24a;
  --lt-lime-2: #a6e02e;
  --lt-lime-soft: rgba(196, 242, 74, 0.13);
  --lt-ink: #0d1a05;
  --lt-danger: #ff5d6c;
  --lt-r-xs: 8px;
  --lt-r-sm: 12px;
  --lt-r: 16px;
  --lt-r-lg: 24px;
  --lt-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --lt-spring: cubic-bezier(0.3, 1.4, 0.5, 1);
  --lt-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.28);
  --lt-shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.55);
  --lt-display: "Geist", var(--font);
  --lt-mono: "Geist Mono", var(--mono);
  color: var(--lt-text);
  font-family: var(--font);
}
.lt { flex: 1; display: flex; flex-direction: column; min-height: 100%; background: var(--lt-bg); position: relative; }
html[data-device="desktop"] .lt { min-height: 680px; }
.lt button, .lt-sheet-host button { font-family: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.lt :focus-visible, .lt-sheet-host :focus-visible { outline: 2px solid var(--lt-lime); outline-offset: 2px; }
:where(.lt, .lt-sheet-host) :where(h1, h2, h3, p) { margin: 0; }
.lt-display { font-family: var(--lt-display); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.lt-grow { flex: 1; min-width: 0; }
.lt-ico { flex-shrink: 0; }

/* ---------- top bar ---------- */
.lt-top { position: sticky; top: 0; z-index: 30; background: rgba(11, 16, 14, 0.84); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); }
.lt-top-in { position: relative; display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 8px 0 14px; }
.lt-brand { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0 6px 0 2px; min-height: 44px; border-radius: 12px; margin-right: auto; }
.lt-mark { width: 30px; height: 30px; flex-shrink: 0; filter: drop-shadow(0 4px 10px rgba(168, 234, 60, 0.28)); transition: transform 0.4s var(--lt-spring); }
.lt-word { font-family: var(--lt-display); font-weight: 800; font-size: 20px; letter-spacing: -0.045em; }
.lt-word span { color: var(--lt-lime); }
.lt-search { display: none; }
.lt-search.on { display: flex; position: absolute; inset: 0; z-index: 2; align-items: center; gap: 4px; padding: 0 12px 0 4px; background: var(--lt-bg); animation: ltFade 0.2s var(--lt-ease); }
.lt-search-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 4px 0 14px; border-radius: 999px; background: var(--lt-card-2); border: 1px solid var(--lt-line-2); transition: border-color 0.2s, box-shadow 0.2s; }
.lt-search-field:focus-within { border-color: rgba(196, 242, 74, 0.6); box-shadow: 0 0 0 4px rgba(196, 242, 74, 0.12); }
.lt-search-field > svg { width: 17px; height: 17px; color: var(--lt-mute); flex-shrink: 0; }
.lt-search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; height: 40px; color: var(--lt-text); }
.lt-search-field input::placeholder { color: var(--lt-faint); }
.lt-search-field input::-webkit-search-cancel-button { display: none; }
.lt .lt-search-field input:focus-visible { outline: none; }
.lt-search-x { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); display: inline-flex; align-items: center; justify-content: center; color: var(--lt-soft); padding: 0; }
.lt-search-x svg { width: 15px; height: 15px; }
.lt-top-create { display: none !important; }
.lt-me { width: 44px; height: 44px; border: 0; background: none; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; transition: transform 0.15s var(--lt-ease); }
.lt-me .lt-av { width: 32px; height: 32px; font-size: 16px; }
.lt-me:active { transform: scale(0.92); }

/* ---------- buttons ---------- */
.lt-icon-btn { width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: var(--lt-soft); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0; transition: background 0.15s, color 0.15s, transform 0.15s var(--lt-ease); }
.lt-icon-btn svg { width: 20px; height: 20px; }
.lt-icon-btn:active { transform: scale(0.9); }
.lt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--lt-lime); color: var(--lt-ink) !important; font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 18px rgba(166, 224, 46, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.4); transition: transform 0.15s var(--lt-ease), filter 0.2s, box-shadow 0.2s, background 0.2s; }
.lt-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.lt-btn:active:not(:disabled) { transform: scale(0.97); }
.lt-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.lt-btn-soft { background: var(--lt-card-2); color: var(--lt-text) !important; box-shadow: inset 0 0 0 1px var(--lt-line-2); }
.lt-btn-ghost { background: rgba(255, 255, 255, 0.14); color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.lt-btn-lg { min-height: 50px; padding: 0 24px; font-size: 15px; }
.lt-link { border: 0; background: none; color: var(--lt-lime); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 2px 0 8px; }
.lt-link svg { width: 15px; height: 15px; }

/* ---------- avatars ---------- */
.lt-av { --h: 90; width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; background: radial-gradient(circle at 30% 25%, hsl(var(--h) 80% 70%), hsl(var(--h) 55% 34%) 72%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); user-select: none; }
.lt-av-xs { width: 22px; height: 22px; font-size: 11px; }
.lt-av-sm { width: 30px; height: 30px; font-size: 15px; }
.lt-av-md { width: 40px; height: 40px; font-size: 20px; }
.lt-av-lg { width: 58px; height: 58px; font-size: 28px; }
.lt-av-xl { width: 76px; height: 76px; font-size: 36px; }
.lt-av-init { font-size: 10.5px; font-weight: 800; color: #0b100e; letter-spacing: 0.02em; font-family: var(--font); }
.lt-av-xs.lt-av-init { font-size: 8.5px; }
.lt-av-all { background: var(--lt-card-2); color: var(--lt-soft); }
.lt-av-all svg { width: 24px; height: 24px; }
.lt-verified { display: inline-flex; color: var(--lt-mute); }
.lt-verified svg { width: 13px; height: 13px; }
.lt-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lt-lime); box-shadow: 0 0 0 2px var(--lt-bg); flex-shrink: 0; }

/* ---------- layout ---------- */
.lt-body { flex: 1; display: flex; min-height: 0; }
.lt-rail { display: none; }
.lt-main { flex: 1; min-width: 0; padding-bottom: 28px; }
.lt-page { padding: 0 16px; }

/* ---------- chips + headings ---------- */
.lt-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 12px; position: sticky; top: 56px; z-index: 20; background: rgba(11, 16, 14, 0.84); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); }
.lt-chips::-webkit-scrollbar, .lt-hrow::-webkit-scrollbar, .lt-subrow::-webkit-scrollbar, .lt-actions::-webkit-scrollbar, .lt-seg::-webkit-scrollbar { display: none; }
.lt-chip { position: relative; flex-shrink: 0; min-height: 40px; padding: 0 15px; border-radius: 11px; border: 0; background: var(--lt-card-2); color: var(--lt-soft); font-size: 13.5px; font-weight: 650; transition: background 0.2s var(--lt-ease), color 0.2s, transform 0.15s var(--lt-ease); }
.lt-chip::after { content: ""; position: absolute; inset: -3px 0; }
.lt-chip.on { background: var(--lt-text); color: var(--lt-bg); }
.lt-chip:active { transform: scale(0.95); }
.lt-chip-sm { min-height: 36px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.lt-chip-sm::after { inset: -4px 0; }
.lt-chips-wrap { position: static; flex-wrap: wrap; margin: 0; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; overflow: visible; }
.lt-sec { margin-top: 6px; }
.lt-sec + .lt-sec { margin-top: 24px; }
.lt-sec-head { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 6px; }
.lt-h2 { font-family: var(--lt-display); font-size: 18px; font-weight: 800; letter-spacing: -0.03em; display: flex; align-items: center; gap: 8px; margin-right: auto; min-width: 0; }
.lt-count { font-family: var(--lt-mono); font-size: 11.5px; font-weight: 600; color: var(--lt-mute); padding: 2px 7px; border-radius: 6px; background: var(--lt-card-2); letter-spacing: 0; }
.lt-page-head { display: flex; align-items: flex-end; gap: 12px; padding: 14px 0 16px; }
.lt-page-head > div { min-width: 0; }
.lt-page-head h1 { font-size: 28px; overflow-wrap: anywhere; }
.lt-page-head p { font-size: 13.5px; color: var(--lt-mute); margin-top: 6px; }

/* ---------- thumbnails + cards ---------- */
.lt-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--lt-r); overflow: hidden; background: var(--lt-card-2); isolation: isolate; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); }
.lt-thumb canvas { display: block; width: 100%; height: 100%; transition: transform 0.6s var(--lt-ease); }
.lt-dur, .lt-left { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 6px; background: rgba(6, 10, 8, 0.8); color: #fff; font-family: var(--lt-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.45; pointer-events: none; transition: opacity 0.2s; }
.lt-thumb:has(.lt-prog) .lt-dur { bottom: 11px; }
.lt-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.24); pointer-events: none; }
.lt-prog > i { display: block; height: 100%; background: var(--lt-lime); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.lt-previewing .lt-dur { opacity: 0; }
.lt-previewing::after { content: "Preview"; position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(6, 10, 8, 0.7); color: var(--lt-lime); font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none; animation: ltFade 0.2s var(--lt-ease); }
.lt-card-thumb, .lt-row-thumb, .lt-cw-thumb { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: var(--lt-r); position: relative; cursor: pointer; transition: transform 0.2s var(--lt-ease); }
.lt-card-thumb:active, .lt-row-thumb:active, .lt-cw-thumb:active { transform: scale(0.98); }
.lt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.lt-card { position: relative; min-width: 0; cursor: pointer; border-radius: var(--lt-r); }
.lt-card-meta { display: flex; align-items: flex-start; gap: 10px; padding-top: 12px; }
.lt-av-btn { border: 0; background: none; padding: 0; border-radius: 50%; flex-shrink: 0; width: 40px; height: 40px; margin: -2px 0 0 -2px; display: inline-flex; align-items: center; justify-content: center; transition: transform 0.15s var(--lt-ease); }
.lt-av-btn:active { transform: scale(0.92); }
.lt-card-text { flex: 1; min-width: 0; }
.lt-card-title, .lt-row-title, .lt-cw-title { font-size: 15px; font-weight: 650; line-height: 1.32; letter-spacing: -0.012em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; transition: color 0.2s; }
.lt-card-sub { margin-top: 4px; font-size: 12.5px; color: var(--lt-mute); line-height: 1.45; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lt-card-sub > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-chname { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; vertical-align: bottom; }
.lt-card-sub .lt-chname { display: flex; }
.lt-save { margin: -6px -10px 0 -4px; color: var(--lt-mute); }
.lt-save svg { width: 19px; height: 19px; }
.lt-save.on { color: var(--lt-lime); }
.lt-flash { animation: ltFlash 0.9s ease-out 2; }

/* continue watching */
.lt-hrow { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; }
.lt-cw { flex: 0 0 214px; min-width: 0; cursor: pointer; scroll-snap-align: start; }
.lt-cw .lt-thumb { border-radius: 14px; }
.lt-cw .lt-dur { display: none; }
.lt-left { bottom: 11px; color: var(--lt-lime); }
.lt-cw-title { font-size: 13.5px; margin-top: 9px; }
.lt-cw-sub { display: block; font-size: 12px; color: var(--lt-mute); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* rows */
.lt-rows { display: flex; flex-direction: column; gap: 14px; }
.lt-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0; cursor: pointer; border-radius: 14px; padding: 4px; margin: -4px; transition: background 0.2s; }
.lt-row-thumb { width: min(44%, 168px); flex-shrink: 0; }
.lt-row-thumb .lt-thumb { border-radius: 12px; }
.lt-row-thumb .lt-dur { font-size: 10.5px; right: 6px; bottom: 6px; }
.lt-row-thumb .lt-thumb:has(.lt-prog) .lt-dur { bottom: 9px; }
.lt-row-text { flex: 1; min-width: 0; padding-top: 1px; }
.lt-row-title { font-size: 14px; }
.lt-row-sub { margin-top: 5px; font-size: 12px; color: var(--lt-mute); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lt-row-sub > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-row-desc { display: none; }
.lt-hs-btns { display: none; }
.lt-hs-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; padding: 0; background: var(--lt-card-2); color: var(--lt-soft); display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--lt-line-2); transition: background 0.15s, color 0.15s, transform 0.15s var(--lt-ease); }
.lt-hs-btn svg { width: 17px; height: 17px; }
.lt-hs-btn:active { transform: scale(0.9); }
.lt-row-x { width: 40px; height: 40px; margin: -4px -6px 0 -6px; color: var(--lt-mute); }
.lt-row-x svg { width: 17px; height: 17px; }
.lt-row-x.armed { width: auto; padding: 0 12px; border-radius: 999px; background: var(--lt-danger); color: #fff; font-size: 12px; font-weight: 700; animation: armPulse 1s ease-in-out infinite; }
.lt-row-x.armed svg { width: 15px; height: 15px; }

/* trending */
.lt-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.lt-rank-item { display: flex; align-items: center; gap: 2px; min-width: 0; }
.lt-rank-n { flex: 0 0 30px; font-family: var(--lt-display); font-weight: 800; font-size: 30px; letter-spacing: -0.06em; line-height: 1; color: transparent; -webkit-text-stroke: 1.4px var(--lt-faint); text-align: left; }
.lt-rank-item:nth-child(-n + 3) .lt-rank-n { -webkit-text-stroke: 0; color: var(--lt-lime); }
.lt-rank-item .lt-row { flex: 1; margin: -4px -4px -4px 0; }

/* subscriptions */
.lt-subrow { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: -4px -16px 4px; padding: 4px 12px 8px; }
.lt-subchip { position: relative; flex: 0 0 auto; width: 78px; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 8px 2px 6px; border: 0; background: none; border-radius: 16px; transition: background 0.2s, transform 0.15s var(--lt-ease); }
.lt-subchip:active { transform: scale(0.95); }
.lt-subchip .lt-av { transition: box-shadow 0.25s var(--lt-ease), transform 0.35s var(--lt-spring); }
.lt-subchip.on .lt-av { box-shadow: 0 0 0 2px var(--lt-bg), 0 0 0 4.5px var(--lt-lime); transform: scale(0.94); }
.lt-subchip-name { font-size: 11.5px; font-weight: 600; color: var(--lt-mute); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.lt-subchip.on .lt-subchip-name { color: var(--lt-text); }
.lt-subchip .lt-dot { position: absolute; top: 8px; right: 10px; }
.lt-subsel { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; margin: 4px 0 8px; border-radius: var(--lt-r); background: var(--lt-card); box-shadow: inset 0 0 0 1px var(--lt-line); animation: ltFade 0.3s var(--lt-ease); }
.lt-subsel-main, .lt-chanrow-main, .lt-w-chbtn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; text-align: left; min-height: 44px; border-radius: 12px; }
.lt-subsel-main > span, .lt-chanrow-main > span, .lt-w-chbtn > span { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lt-subsel-main b, .lt-chanrow-main b, .lt-w-chbtn b { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-subsel-main small, .lt-chanrow-main small, .lt-w-chbtn small { font-size: 12px; color: var(--lt-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.lt-chanrows { display: flex; flex-direction: column; gap: 8px; }
.lt-chanrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: var(--lt-r); background: var(--lt-card); box-shadow: inset 0 0 0 1px var(--lt-line); transition: box-shadow 0.2s; }
.lt-chan-results { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }

/* subscribe */
.lt-sub { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--lt-text); color: var(--lt-bg) !important; font-size: 13.5px; font-weight: 700; white-space: nowrap; flex-shrink: 0; transition: background 0.3s var(--lt-ease), color 0.3s, box-shadow 0.3s, transform 0.15s var(--lt-ease); }
.lt-sub::after { content: ""; position: absolute; inset: -2px; }
.lt-sub.on { background: var(--lt-card-2); color: var(--lt-text) !important; box-shadow: inset 0 0 0 1px var(--lt-line-2); }
.lt-sub svg { width: 16px; height: 16px; transform-origin: 50% 10%; }
.lt-sub:active { transform: scale(0.95); }
.lt-sub-sm { min-height: 36px; padding: 0 14px; font-size: 12.5px; }
.lt-sub-sm::after { inset: -4px; }
.lt-yours { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--lt-lime); padding: 6px 12px; border-radius: 999px; background: var(--lt-lime-soft); white-space: nowrap; }
.lt-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 2; }
.lt-burst i { position: absolute; left: -5px; top: -3px; width: 10px; height: 6px; border-radius: 50% 0; background: var(--lt-lime); opacity: 0; animation: ltBurst 0.8s var(--lt-ease) forwards; }
.lt-burst i:nth-child(3n) { background: #e6ff8a; }
.lt-burst i:nth-child(4n) { background: #5fbf1f; }

/* ---------- watch page ---------- */
.lt-watching .lt-top { display: none; }
.lt-watching .lt-dock { display: none; }
.lt-watching .lt-main { padding-bottom: 36px; }
.lt-watch { display: flex; flex-direction: column; min-width: 0; }
.lt-w-main { min-width: 0; }
.lt-w-player { position: sticky; top: 0; z-index: 25; background: #000; }
.lt-w-below { position: relative; padding: 0 16px; }
.lt-info { padding-top: 14px; }
.lt-w-title { font-family: var(--lt-display); font-size: 19px; font-weight: 750; letter-spacing: -0.028em; line-height: 1.25; overflow-wrap: anywhere; }
.lt-w-row { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.lt-w-ch { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lt-actions { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.lt-pill { position: relative; flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 15px; border: 0; border-radius: 999px; background: var(--lt-card-2); color: var(--lt-text); font-size: 13.5px; font-weight: 650; white-space: nowrap; transition: background 0.2s, color 0.2s, transform 0.15s var(--lt-ease); }
.lt-pill svg { width: 18px; height: 18px; }
.lt-pill:active:not(.lt-react) { transform: scale(0.96); }
.lt-pill.on { color: var(--lt-lime); background: var(--lt-lime-soft); }
.lt-react { padding: 0; gap: 0; overflow: hidden; }
.lt-react button { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px 0 15px; border: 0; background: none; font-size: 13.5px; font-weight: 650; color: var(--lt-text); transition: color 0.2s, background 0.2s; }
.lt-react button + i + button { padding: 0 15px 0 12px; }
.lt-react button.on { color: var(--lt-lime); }
.lt-react button.on svg, .lt-cm-like.on svg { fill: currentColor; fill-opacity: 0.22; }
.lt-react button:active svg { transform: scale(0.86); }
.lt-react svg { transition: transform 0.15s var(--lt-ease); }
.lt-react > i { width: 1px; height: 22px; background: var(--lt-line-2); flex-shrink: 0; }
.lt-del.armed { background: var(--lt-danger); color: #fff; animation: armPulse 1s ease-in-out infinite; }
.lt-desc { display: block; width: 100%; text-align: left; margin-top: 14px; padding: 12px 14px; border: 0; border-radius: var(--lt-r-sm); background: var(--lt-card); box-shadow: inset 0 0 0 1px var(--lt-line); color: var(--lt-soft); font-size: 13.5px; line-height: 1.5; cursor: pointer; transition: background 0.2s; }
.lt-desc-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--lt-text); font-size: 13px; }
.lt-desc-meta b { font-weight: 700; }
.lt-tag { color: var(--lt-lime); font-weight: 650; }
.lt-desc-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; overflow-wrap: anywhere; }
.lt-desc.open .lt-desc-text { display: block; -webkit-line-clamp: unset; }
.lt-desc-more { display: inline-block; margin-top: 2px; font-weight: 700; color: var(--lt-text); font-size: 13px; }
.lt-cteaser { display: block; width: 100%; text-align: left; margin-top: 12px; padding: 12px 14px; border: 0; border-radius: var(--lt-r-sm); background: var(--lt-card); box-shadow: inset 0 0 0 1px var(--lt-line); cursor: pointer; transition: background 0.2s, transform 0.15s var(--lt-ease); }
.lt-cteaser:active { transform: scale(0.99); }
.lt-cteaser-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.lt-cteaser-head svg { margin-left: auto; width: 18px; height: 18px; color: var(--lt-mute); }
.lt-cteaser-top { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--lt-soft); line-height: 1.4; }
.lt-cteaser-top > span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.lt-cteaser-empty > span:last-child { flex: 1; color: var(--lt-faint); background: var(--lt-card-2); padding: 7px 12px; border-radius: 999px; }
.lt-w-side { padding: 0 16px; margin-top: 24px; min-width: 0; }
.lt-next-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lt-switch { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; min-height: 44px; padding: 0 2px; font-size: 12.5px; font-weight: 650; color: var(--lt-soft); }
.lt-switch i { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--lt-card-2); box-shadow: inset 0 0 0 1px var(--lt-line-2); transition: background 0.25s var(--lt-ease), box-shadow 0.25s; }
.lt-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--lt-soft); transition: transform 0.35s var(--lt-spring), background 0.2s; }
.lt-switch.on i { background: var(--lt-lime); box-shadow: none; }
.lt-switch.on i::after { transform: translateX(16px); background: var(--lt-ink); }

/* comments */
.lt-comments { margin-top: 26px; }
.lt-c-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.lt-c-sort { display: flex; gap: 6px; }
.lt-composer { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.lt-input { width: 100%; min-height: 44px; border: 1px solid var(--lt-line-2); background: var(--lt-card); border-radius: 12px; padding: 0 14px; font-size: 15px; color: var(--lt-text); outline: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.lt-input::placeholder { color: var(--lt-faint); }
.lt-input:focus { border-color: rgba(196, 242, 74, 0.55); box-shadow: 0 0 0 4px rgba(196, 242, 74, 0.12); background: var(--lt-card-2); }
.lt .lt-input:focus-visible, .lt-sheet-host .lt-input:focus-visible { outline: none; }
.lt-composer .lt-input { border-radius: 999px; flex: 1; min-width: 0; }
.lt-send { width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--lt-lime); color: var(--lt-ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: transform 0.25s var(--lt-spring), background 0.2s, color 0.2s; }
.lt-send:disabled { background: var(--lt-card-2); color: var(--lt-faint); opacity: 1; cursor: not-allowed; }
.lt-send:active:not(:disabled) { transform: scale(0.9) rotate(-10deg); }
.lt-send svg { width: 18px; height: 18px; }
.lt-cms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.lt-cm { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.lt-cm.lt-flash { animation: ltCmIn 0.55s var(--lt-spring) both; }
.lt-cm-body { flex: 1; min-width: 0; }
.lt-cm-pin { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--lt-mute); margin-bottom: 3px; }
.lt-cm-pin svg { width: 12px; height: 12px; }
.lt-cm-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--lt-mute); flex-wrap: wrap; }
.lt-cm-head b { color: var(--lt-text); font-weight: 650; font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-creator { padding: 1px 8px; border-radius: 999px; background: var(--lt-lime-soft); color: var(--lt-lime) !important; }
.lt-you { font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; background: var(--lt-card-2); color: var(--lt-soft); }
.lt-cm-text { margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--lt-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.lt-cm-actions { display: flex; align-items: center; gap: 2px; margin: 2px 0 0 -10px; }
.lt-cm-like, .lt-cm-del { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; min-width: 40px; justify-content: center; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--lt-mute); font-size: 12.5px; font-weight: 650; transition: background 0.2s, color 0.2s, transform 0.15s var(--lt-ease); }
.lt-cm-like svg, .lt-cm-del svg { width: 16px; height: 16px; }
.lt-cm-like:active, .lt-cm-del:active { transform: scale(0.92); }
.lt-cm-like.on { color: var(--lt-lime); }
.lt-cm-del.armed { background: var(--lt-danger); color: #fff; animation: armPulse 1s ease-in-out infinite; }
.lt-c-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 28px 12px; color: var(--lt-mute); font-size: 13px; }
.lt-c-empty span { font-size: 30px; }
.lt-c-empty b { color: var(--lt-text); font-size: 14.5px; }

/* ---------- player ---------- */
.lt-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; isolation: isolate; color: #fff; }
.lt-player.lt-playing:not(.lt-show) { cursor: none; }
.lt-dragging { border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); }
.lt-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lt-ctrls { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; pointer-events: none; transition: opacity 0.25s var(--lt-ease); background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 56%, rgba(0, 0, 0, 0.66)); }
.lt-player.lt-show .lt-ctrls { opacity: 1; pointer-events: auto; }
.lt-player.lt-ended .lt-ctrls { opacity: 0; pointer-events: none; }
.lt-c-top { display: flex; align-items: center; gap: 6px; padding: 4px 6px; }
.lt-c-title { display: none; flex: 1; min-width: 0; font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.lt-c-btn { width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: #fff !important; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background 0.15s, transform 0.15s var(--lt-ease); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55)); }
.lt-c-btn svg { width: 24px; height: 24px; }
.lt-c-btn:active { transform: scale(0.88); }
.lt-c-mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 30px; }
.lt-c-seek svg { width: 30px; height: 30px; }
.lt-c-play { width: 62px; height: 62px; border: 0; border-radius: 50%; padding: 0; background: rgba(8, 12, 10, 0.48); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff !important; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); transition: transform 0.25s var(--lt-spring), background 0.2s; }
.lt-c-play:active { transform: scale(0.9); }
.lt-c-play svg { width: 28px; height: 28px; }
.lt-c-play .lt-i-play { transform: translateX(2px); }
.lt-i-pause { display: none; }
.lt-playing .lt-i-pause { display: block; }
.lt-playing .lt-i-play { display: none; }
.lt-c-bot { padding: 0 12px 2px; }
.lt-c-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lt-time { font-family: var(--lt-mono); font-size: 12px; color: rgba(255, 255, 255, 0.75); letter-spacing: 0.02em; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); font-variant-numeric: tabular-nums; }
.lt-time b { color: #fff; font-weight: 600; }
.lt-c-speed { position: relative; min-width: 44px; height: 30px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, 0.16); color: #fff !important; font-family: var(--lt-mono); font-size: 12px; font-weight: 600; padding: 0 10px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background 0.2s, color 0.2s, transform 0.15s var(--lt-ease); }
.lt-c-speed::after { content: ""; position: absolute; inset: -7px -2px; }
.lt-c-speed:active { transform: scale(0.92); }
.lt-fast .lt-c-speed { background: var(--lt-lime); color: var(--lt-ink) !important; }
.lt-scrub { position: relative; height: 28px; margin: 0 -2px; cursor: pointer; touch-action: none; outline: none; border-radius: 6px; }
.lt-scrub:focus-visible { box-shadow: 0 0 0 2px var(--lt-lime); }
.lt-s-track, .lt-s-fill { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px; pointer-events: none; transition: height 0.15s var(--lt-ease), margin 0.15s var(--lt-ease); }
.lt-s-track { background: rgba(255, 255, 255, 0.3); }
.lt-s-fill { background: var(--lt-lime); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); box-shadow: 0 0 12px rgba(196, 242, 74, 0.45); }
.lt-s-rail { position: absolute; inset: 0; transform: translateX(calc(var(--p, 0) * 100%)); pointer-events: none; }
.lt-s-knob { position: absolute; left: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50% 0; background: var(--lt-lime); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); transform: scale(0.8); transition: transform 0.25s var(--lt-spring); }
.lt-scrubbing .lt-s-knob { transform: scale(1.35); }
.lt-scrubbing .lt-s-track, .lt-scrubbing .lt-s-fill { height: 5px; margin-top: -2.5px; }
.lt-s-bubble { position: absolute; left: 0; bottom: 30px; width: 128px; display: flex; flex-direction: column; align-items: center; gap: 5px; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.lt-s-bubble canvas { width: 128px; height: 72px; border-radius: 10px; background: #000; box-shadow: 0 0 0 2px #fff, 0 12px 26px rgba(0, 0, 0, 0.55); }
.lt-s-bubble b { font-family: var(--lt-mono); font-size: 12px; font-weight: 600; color: #fff; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.72); }
.lt-peek .lt-s-bubble, .lt-scrubbing .lt-s-bubble { opacity: 1; }
.lt-speedmenu { position: absolute; right: 10px; bottom: 64px; z-index: 4; width: 214px; padding: 8px; border-radius: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: rgba(14, 20, 17, 0.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--lt-shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.09); animation: ltPopIn 0.2s var(--lt-ease); }
.lt-speedmenu[hidden] { display: none; }
.lt-speedmenu p { grid-column: 1 / -1; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); padding: 2px 6px 4px; }
.lt-speedmenu button { min-height: 36px; padding: 0 4px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.06); color: #fff !important; font-family: var(--lt-mono); font-size: 12.5px; font-weight: 600; transition: background 0.15s, color 0.15s, transform 0.15s var(--lt-ease); }
.lt-speedmenu button:active { transform: scale(0.94); }
.lt-speedmenu button.on { background: var(--lt-lime); color: var(--lt-ink) !important; }
.lt-ripples { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.lt-c-mid { transition: opacity 0.2s var(--lt-ease); }
.lt-seeking .lt-c-mid, .lt-scrubbing .lt-c-mid { opacity: 0; pointer-events: none; }
.lt-ripple { position: absolute; top: -12%; bottom: -12%; width: 42%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, 0.12); opacity: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.lt-rip-l { left: 0; border-radius: 0 50% 50% 0 / 0 50% 50% 0; }
.lt-rip-r { right: 0; border-radius: 50% 0 0 50% / 50% 0 0 50%; }
.lt-ripple.go { animation: ltWash 0.8s var(--lt-ease) forwards; }
.lt-rip-arrows { display: flex; gap: 3px; }
.lt-rip-l .lt-rip-arrows { transform: scaleX(-1); }
.lt-rip-arrows i { width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 10px solid #fff; opacity: 0.3; }
.lt-ripple.go .lt-rip-arrows i { animation: ltArrow 0.6s ease-out both; }
.lt-ripple.go .lt-rip-arrows i:nth-child(2) { animation-delay: 0.1s; }
.lt-ripple.go .lt-rip-arrows i:nth-child(3) { animation-delay: 0.2s; }
.lt-rip-dot { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255, 255, 255, 0.32); animation: ltDot 0.6s ease-out forwards; }
.lt-endcard { position: absolute; inset: 0; z-index: 3; display: none; align-items: center; justify-content: center; padding: 12px 16px; background: rgba(4, 7, 5, 0.66); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.lt-ended .lt-endcard { display: flex; animation: ltFade 0.35s var(--lt-ease); }
.lt-end-in { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 420px; }
.lt-end-eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.lt-end-eyebrow b { color: var(--lt-lime); font-family: var(--lt-mono); font-size: 13px; }
.lt-end-next { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; border: 0; background: none; text-align: left; color: #fff !important; cursor: pointer; }
.lt-end-thumb { position: relative; width: 132px; flex-shrink: 0; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55); transition: box-shadow 0.2s, transform 0.2s var(--lt-ease); }
.lt-end-thumb canvas { width: 100%; height: 100%; display: block; }
.lt-ring { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; transform: rotate(-90deg); }
.lt-ring circle { fill: none; stroke: rgba(255, 255, 255, 0.3); stroke-width: 3.5; }
.lt-ring .lt-ring-fg { stroke: var(--lt-lime); stroke-dasharray: 1; stroke-dashoffset: 1; stroke-linecap: round; animation: ltRing 6s linear forwards; }
.lt-end-play { position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0, 0, 0, 0.5); }
.lt-end-play svg { width: 14px; height: 14px; margin-left: 2px; }
.lt-end-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lt-end-text b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.lt-end-text small { color: rgba(255, 255, 255, 0.62); font-size: 12px; }
.lt-end-actions { display: flex; gap: 8px; }
.lt-end-actions .lt-btn { min-height: 40px; padding: 0 16px; font-size: 13.5px; box-shadow: none; }
.lt-resume { position: absolute; left: 56px; top: 8px; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border-radius: 999px; background: rgba(8, 12, 10, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 12.5px; font-weight: 600; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity 0.3s var(--lt-ease), transform 0.3s var(--lt-ease); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.lt-resume.on { opacity: 1; transform: none; pointer-events: auto; }
.lt-resume span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lt-resume svg { width: 15px; height: 15px; color: var(--lt-lime); }
.lt-resume button { position: relative; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff !important; font-size: 12px; font-weight: 700; white-space: nowrap; }
.lt-resume button::after { content: ""; position: absolute; inset: -6px -2px; }

/* ---------- dock: mini-player + bottom nav ---------- */
.lt-dock { position: sticky; bottom: 0; z-index: 40; }
.lt-mini { display: none; position: relative; align-items: center; gap: 2px; height: 64px; padding: 0 4px 0 8px; background: rgba(22, 31, 27, 0.97); border-top: 1px solid var(--lt-line); touch-action: none; user-select: none; -webkit-user-select: none; }
.lt-has-mini .lt-mini { display: flex; }
.lt-mini-art { width: 96px; flex-shrink: 0; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
.lt-mini-cv { display: block; width: 100%; height: 100%; }
.lt-mini-meta { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 0 6px 0 10px; border: 0; background: none; text-align: left; cursor: pointer; }
.lt-mini-meta b { font-size: 13.5px; font-weight: 650; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-mini-meta span { font-size: 12px; color: var(--lt-mute); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-mini-btn { width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 50%; background: none; color: var(--lt-text); display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background 0.15s, transform 0.15s var(--lt-ease); }
.lt-mini-btn svg { width: 22px; height: 22px; }
.lt-mini-btn:active { transform: scale(0.88); }
.lt-mini-prog { position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: rgba(255, 255, 255, 0.12); pointer-events: none; }
.lt-mini-prog > i { display: block; height: 100%; background: var(--lt-lime); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.lt-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; padding: 4px 6px 6px; background: rgba(11, 16, 14, 0.9); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); border-top: 1px solid var(--lt-line); }
.lt-has-mini .lt-nav { border-top-color: transparent; }
html[data-device="mobile"] .lt-nav { padding-bottom: 20px; }
.lt-nav-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; border: 0; background: none; color: var(--lt-mute); font-size: 10.5px; font-weight: 650; border-radius: 14px; transition: color 0.2s, transform 0.15s var(--lt-ease); }
.lt-nav-item::before { content: ""; position: absolute; top: 5px; left: 50%; width: 54px; height: 30px; margin-left: -27px; border-radius: 999px; background: var(--lt-lime-soft); opacity: 0; transform: scaleX(0.5); transition: opacity 0.25s, transform 0.35s var(--lt-spring); }
.lt-nav-item svg { position: relative; width: 23px; height: 23px; transition: transform 0.3s var(--lt-spring), color 0.2s; }
.lt-nav-item span { position: relative; }
.lt-nav-item.on { color: var(--lt-text); }
.lt-nav-item.on::before { opacity: 1; transform: none; }
.lt-nav-item.on svg { color: var(--lt-lime); }
.lt-nav-item:active { transform: scale(0.94); }
.lt-nav-item .lt-dot { position: absolute; top: 7px; left: calc(50% + 9px); }
.lt-nav-create { display: flex; align-items: center; justify-content: center; min-height: 54px; border: 0; background: none; padding: 0; }
.lt-nav-create span { width: 54px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 20px 7px 20px 7px; background: linear-gradient(135deg, #e2ff86, var(--lt-lime) 45%, var(--lt-lime-2)); color: var(--lt-ink); box-shadow: 0 8px 20px rgba(166, 224, 46, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.55); transition: transform 0.3s var(--lt-spring), border-radius 0.35s var(--lt-ease); }
.lt-nav-create svg { width: 22px; height: 22px; stroke-width: 2.6; }
.lt-nav-create:active span { transform: scale(0.9) rotate(-8deg); }

/* ---------- library ---------- */
.lt-lib-head { display: flex; align-items: center; gap: 14px; padding: 14px 0 14px; }
.lt-lib-head h1 { font-size: 24px; overflow-wrap: anywhere; }
.lt-lib-head p { font-size: 12.5px; color: var(--lt-mute); margin-top: 5px; line-height: 1.5; }
.lt-lib-head p > span { white-space: nowrap; }
.lt-lib-head .lt-grow { display: flex; flex-direction: column; }
.lt-lib-head .lt-grow .lt-sk-line { margin-bottom: 8px; }
.lt-lib-create { min-height: 40px; padding: 0 14px; }
.lt-lib-create span { display: none; }
.lt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.lt-stats span { padding: 10px 12px; border-radius: var(--lt-r-sm); background: var(--lt-card); box-shadow: inset 0 0 0 1px var(--lt-line); font-size: 11.5px; color: var(--lt-mute); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lt-stats b { font-family: var(--lt-display); font-size: 21px; font-weight: 800; letter-spacing: -0.03em; color: var(--lt-text); }
.lt-seg { display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--lt-card); box-shadow: inset 0 0 0 1px var(--lt-line); overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
.lt-seg button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--lt-mute); font-size: 12.5px; font-weight: 650; white-space: nowrap; transition: background 0.2s var(--lt-ease), color 0.2s, box-shadow 0.2s, transform 0.15s var(--lt-ease); }
.lt-seg button span { font-family: var(--lt-mono); font-size: 10.5px; color: var(--lt-faint); }
.lt-seg button.on { background: var(--lt-card-2); color: var(--lt-text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 0 0 1px var(--lt-line-2); }
.lt-seg button.on span { color: var(--lt-lime); }
.lt-seg button:active { transform: scale(0.96); }
.lt-seg-tight button { min-height: 42px; font-family: var(--lt-mono); font-size: 12.5px; }
.lt-newtile { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; margin-top: 18px; padding: 18px; border-radius: var(--lt-r); border: 1.5px dashed var(--lt-line-2); background: none; color: var(--lt-soft); text-align: center; transition: border-color 0.2s, background 0.2s, transform 0.15s var(--lt-ease); }
.lt-newtile:active { transform: scale(0.99); }
.lt-newtile > span { width: 46px; height: 46px; margin-bottom: 4px; border-radius: 18px 6px 18px 6px; background: var(--lt-lime-soft); color: var(--lt-lime); display: inline-flex; align-items: center; justify-content: center; transition: transform 0.35s var(--lt-spring); }
.lt-newtile > span svg { width: 22px; height: 22px; }
.lt-newtile b { font-size: 14px; color: var(--lt-text); }
.lt-newtile small { font-size: 12px; color: var(--lt-mute); }

/* ---------- channel page ---------- */
.lt-chan { margin: 0 -16px; }
.lt-banner { position: relative; height: 128px; overflow: hidden; background: radial-gradient(circle at 82% 20%, hsl(var(--h) 90% 70% / 0.55), transparent 55%), radial-gradient(circle at 10% 120%, hsl(calc(var(--h) - 30) 80% 55% / 0.35), transparent 50%), linear-gradient(135deg, hsl(var(--h) 50% 30%), hsl(calc(var(--h) + 40) 45% 12%)); }
.lt-banner::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-35deg, rgba(255, 255, 255, 0.045) 0 2px, transparent 2px 18px); }
.lt-banner-leaf .lt-mark { position: absolute; right: -24px; bottom: -42px; width: 170px; height: 170px; opacity: 0.22; transform: rotate(-14deg); filter: none; }
.lt-back { position: absolute; top: 10px; left: 10px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.38); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff !important; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background 0.15s, transform 0.15s var(--lt-ease); }
.lt-back svg { width: 20px; height: 20px; }
.lt-back:active { transform: scale(0.9); }
.lt-chan-head { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: end; padding: 0 16px; }
.lt-chan-head > .lt-av { margin-top: -30px; box-shadow: 0 0 0 4px var(--lt-bg), 0 10px 24px rgba(0, 0, 0, 0.4); }
.lt-chan-head h1 { font-size: 23px; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.lt-chan-head h1 .lt-verified svg { width: 17px; height: 17px; }
.lt-chan-head p { font-size: 12.5px; color: var(--lt-mute); margin-top: 4px; }
.lt-chan-head > .lt-sub, .lt-chan-head > .lt-chan-create { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
.lt-bio { padding: 12px 16px 0; font-size: 13.5px; color: var(--lt-soft); line-height: 1.5; overflow-wrap: anywhere; }
.lt-chan .lt-sec { padding: 0 16px; margin-top: 18px; }

/* ---------- skeletons + empty states ---------- */
.lt-sk { display: block; background: linear-gradient(100deg, #141d19 30%, #1f2b26 50%, #141d19 70%); background-size: 300% 100%; animation: ltShimmer 1.4s linear infinite; border-radius: 8px; }
.lt-sk-thumb { aspect-ratio: 16 / 9; border-radius: var(--lt-r); }
.lt-skel-meta { display: flex; gap: 10px; padding-top: 12px; }
.lt-skel-meta > span, .lt-skel-row > span { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 3px; }
.lt-sk-av { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.lt-av.lt-sk { border-radius: 50%; box-shadow: none; }
.lt-sk-line { height: 12px; }
.lt-sk-short { width: 58%; }
.lt-sk-title { height: 18px; width: 170px; margin: 12px 0 14px; }
.lt-skel-row { display: flex; gap: 12px; }
.lt-skel-row .lt-sk-thumb { width: min(44%, 168px); flex-shrink: 0; border-radius: 12px; }
.lt-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 20px 28px; border-radius: var(--lt-r-lg); background: radial-gradient(circle at 50% 0%, rgba(196, 242, 74, 0.09), transparent 62%), var(--lt-card); box-shadow: inset 0 0 0 1px var(--lt-line); }
.lt-empty-art { position: relative; display: block; width: 120px; height: 100px; margin-bottom: 4px; }
.lt-empty-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.lt-empty-art svg path:nth-child(1) { transform-origin: 58px 28px; }
.lt-empty-art svg path:nth-child(2) { transform-origin: 62px 28px; }
.lt-empty-art b { position: absolute; left: 50%; top: 63px; transform: translate(-50%, -50%); font-size: 26px; line-height: 1; }
.lt-empty-title { font-family: var(--lt-display); font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.lt-empty p { font-size: 13px; color: var(--lt-mute); max-width: 290px; line-height: 1.5; margin-bottom: 8px; }

/* ---------- sheets ---------- */
.lt-sheet-host { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.lt-sheet-host.in-device { position: absolute; }
.lt-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.58); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.3s; }
.lt-sheet-host.open .lt-backdrop { opacity: 1; pointer-events: auto; }
.lt-mode-comments .lt-backdrop { display: none; }
.lt-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 600px; margin: 0 auto; max-height: 92%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; background: var(--lt-bg-2); border-radius: 26px 26px 0 0; transform: translateY(105%); transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.25, 1); box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 var(--lt-line-2); color: var(--lt-text); }
.lt-sheet::-webkit-scrollbar { width: 0; }
.lt-sheet-host.open .lt-sheet { transform: none; pointer-events: auto; }
.lt-grab { position: sticky; top: 0; z-index: 3; display: flex; justify-content: center; padding: 9px 0 4px; touch-action: none; cursor: grab; background: linear-gradient(var(--lt-bg-2) 60%, rgba(15, 22, 19, 0)); }
.lt-grab i { width: 40px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.24); }
.lt-sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 4px 12px 12px 18px; touch-action: none; }
.lt-sheet-head > div { flex: 1; min-width: 0; }
.lt-sheet-head h2 { font-size: 23px; }
.lt-sheet-head p { font-size: 12.5px; color: var(--lt-mute); margin-top: 4px; }
.lt-mode-comments .lt-sheet { max-height: none; overflow: hidden; display: flex; flex-direction: column; border-radius: 20px 20px 0 0; max-width: none; }
.lt-mode-comments .lt-sheet-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lt-csheet { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lt-csheet .lt-c-head { padding: 0 8px 8px 16px; margin: 0; border-bottom: 1px solid var(--lt-line); touch-action: none; }
.lt-csheet .lt-c-head .lt-icon-btn { margin-left: auto; }
.lt-csheet-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 18px; scrollbar-width: none; }
.lt-csheet-list::-webkit-scrollbar { width: 0; }
.lt-csheet .lt-composer { margin: 0; padding: 10px 12px 12px 16px; border-top: 1px solid var(--lt-line); background: var(--lt-bg-2); }
.lt-sheet-host.in-device .lt-csheet .lt-composer { padding-bottom: 28px; }
.lt-create { padding: 0 18px; }
.lt-cr-feed { display: none; }
.lt-cr-card { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border-radius: var(--lt-r); background: var(--lt-card); box-shadow: inset 0 0 0 1px var(--lt-line); }
.lt-cr-card .lt-thumb { width: 168px; flex-shrink: 0; border-radius: 12px; }
.lt-cr-card .lt-card-meta { flex: 1; min-width: 0; padding-top: 2px; }
.lt-cr-card .lt-card-title { font-size: 14px; }
.lt-cr-note { display: flex; gap: 8px; margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: var(--lt-mute); }
.lt-cr-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--lt-lime); }
.lt-cr-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--lt-line-2), 0 18px 40px rgba(0, 0, 0, 0.45); }
.lt-cr-preview canvas { width: 100%; height: 100%; display: block; }
.lt-live { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.lt-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--lt-lime); animation: ltLive 1.6s infinite; }
.lt-cr-preview .lt-dur { top: 10px; right: 10px; bottom: auto; }
.lt-cr-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72)); color: #fff; font-family: var(--lt-display); font-weight: 750; font-size: 16px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--lt-mute); margin: 20px 2px 9px; }
.lt-hint { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--lt-faint); }
.lt-field-row { display: flex; gap: 8px; }
.lt-dice { border-radius: 12px; background: var(--lt-card-2); color: var(--lt-text); box-shadow: inset 0 0 0 1px var(--lt-line-2); }
.lt-dice:active svg { transform: rotate(90deg); }
.lt-dice svg { transition: transform 0.35s var(--lt-spring); }
.lt-scenes { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 132px; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px 6px; scroll-snap-type: x proximity; scroll-padding: 0 18px; }
.lt-scenes::-webkit-scrollbar { display: none; }
.lt-scene { scroll-snap-align: start; }
.lt-scene { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 4px 4px 8px; border: 0; border-radius: 14px; background: var(--lt-card); box-shadow: inset 0 0 0 1px var(--lt-line); text-align: left; transition: box-shadow 0.2s, background 0.2s, transform 0.15s var(--lt-ease); }
.lt-scene canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 10px; }
.lt-scene span { font-size: 11.5px; font-weight: 650; color: var(--lt-mute); padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-scene.on { background: var(--lt-card-2); box-shadow: inset 0 0 0 2px var(--lt-lime); }
.lt-scene.on span { color: var(--lt-text); }
.lt-scene:active { transform: scale(0.96); }
.lt-swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 44px)); justify-content: space-between; gap: 6px; }
.lt-swatch { position: relative; width: 100%; height: auto; aspect-ratio: 1; border: 0; border-radius: 50%; padding: 0; background: radial-gradient(circle at 30% 28%, hsl(var(--h) 95% 78%), hsl(var(--h) 72% 44%) 72%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); transition: transform 0.3s var(--lt-spring), box-shadow 0.2s; }
.lt-swatch.on { box-shadow: 0 0 0 3px var(--lt-bg-2), 0 0 0 5px var(--lt-text); transform: scale(1.04); }
.lt-swatch:active { transform: scale(0.9); }
.lt-textarea { min-height: 78px; padding: 12px 14px; resize: vertical; font-size: 14px; line-height: 1.45; font-family: inherit; display: block; }
.lt-sheet-foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 14px 18px 18px; background: linear-gradient(rgba(15, 22, 19, 0), var(--lt-bg-2) 30%); }
.lt-sheet-host.in-device .lt-sheet-foot { padding-bottom: 30px; }
.lt-as { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--lt-mute); }
.lt-as > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-as b { color: var(--lt-text); }
@media (min-width: 700px) {
  .lt-sheet-host:not(.in-device).lt-mode-create .lt-sheet { top: 50%; bottom: auto; left: 50%; right: auto; width: min(920px, calc(100vw - 48px)); max-width: none; max-height: min(88vh, 760px); border-radius: 26px; transform: translate(-50%, -46%) scale(0.97); opacity: 0; transition: transform 0.32s var(--lt-ease), opacity 0.22s; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px var(--lt-line-2); }
  .lt-sheet-host.open:not(.in-device).lt-mode-create .lt-sheet { transform: translate(-50%, -50%); opacity: 1; }
  .lt-sheet-host:not(.in-device) .lt-grab { display: none; }
  .lt-sheet-host:not(.in-device) .lt-sheet-head { padding: 22px 16px 14px 24px; }
  .lt-sheet-host:not(.in-device) .lt-create { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; padding: 0 24px; }
  .lt-sheet-host:not(.in-device) .lt-cr-side { position: sticky; top: 0; }
  .lt-sheet-host:not(.in-device) .lt-cr-feed { display: block; }
  .lt-sheet-host:not(.in-device) .lt-cr-form > .lt-label:first-child { margin-top: 0; }
  .lt-sheet-host:not(.in-device) .lt-sheet-foot { padding: 16px 24px 22px; }
}

/* ---------- hover (pointer devices only) ---------- */
@media (hover: hover) {
  .lt-card:hover .lt-thumb canvas, .lt-cw:hover .lt-thumb canvas { transform: scale(1.045); }
  .lt-card:hover .lt-card-title, .lt-cw:hover .lt-cw-title, .lt-row:hover .lt-row-title { color: #fff; }
  .lt-row:hover { background: var(--lt-card); }
  .lt-rank-item:hover .lt-rank-n { -webkit-text-stroke-color: var(--lt-soft); }
  .lt-icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--lt-text); }
  .lt-save:hover { color: var(--lt-lime); }
  .lt-row-x:hover:not(.armed) { color: var(--lt-text); }
  .lt-btn:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 10px 26px rgba(166, 224, 46, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
  .lt-btn-soft:hover:not(:disabled) { background: var(--lt-hover); box-shadow: inset 0 0 0 1px var(--lt-line-2); }
  .lt-btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.22); box-shadow: none; }
  .lt-chip:hover:not(.on) { background: var(--lt-hover); color: var(--lt-text); }
  .lt-pill:not(.lt-react):not(.armed):hover, .lt-react button:hover { background: var(--lt-hover); }
  .lt-pill.on:hover { background: rgba(196, 242, 74, 0.2); }
  .lt-sub:not(.on):hover { background: #fff; box-shadow: 0 6px 16px rgba(238, 246, 234, 0.18); }
  .lt-sub.on:hover { background: var(--lt-hover); }
  .lt-c-btn:hover { background: rgba(255, 255, 255, 0.16); }
  .lt-c-play:hover { transform: scale(1.07); background: rgba(8, 12, 10, 0.62); }
  .lt-c-speed:hover { background: rgba(255, 255, 255, 0.26); }
  .lt-fast .lt-c-speed:hover { background: var(--lt-lime); filter: brightness(1.06); }
  .lt-scrub:hover .lt-s-knob { transform: scale(1.2); }
  .lt-scrub:hover .lt-s-track, .lt-scrub:hover .lt-s-fill { height: 5px; margin-top: -2.5px; }
  .lt-speedmenu button:not(.on):hover { background: rgba(255, 255, 255, 0.14); }
  .lt-end-next:hover .lt-end-thumb { box-shadow: 0 0 0 2px var(--lt-lime), 0 10px 24px rgba(0, 0, 0, 0.55); transform: translateY(-2px); }
  .lt-resume button:hover { background: rgba(255, 255, 255, 0.24); }
  .lt-nav-item:hover:not(.on) { color: var(--lt-soft); }
  .lt-nav-create:hover span, .lt-newtile:hover > span { border-radius: 7px 20px 7px 20px; transform: rotate(-4deg); }
  .lt-brand:hover .lt-mark { transform: rotate(-10deg) scale(1.06); }
  .lt-me:hover { transform: scale(1.06); }
  .lt-mini-btn:hover { background: rgba(255, 255, 255, 0.1); }
  .lt-mini-meta:hover b { color: #fff; }
  .lt-desc:hover, .lt-cteaser:hover { background: var(--lt-card-2); }
  .lt-subchip:hover { background: var(--lt-card); }
  .lt-subchip:hover .lt-subchip-name { color: var(--lt-text); }
  .lt-chanrow:hover { box-shadow: inset 0 0 0 1px var(--lt-line-2); }
  .lt-chanrow-main:hover b, .lt-w-chbtn:hover b, .lt-subsel-main:hover b { color: #fff; text-decoration: underline; text-decoration-color: var(--lt-faint); text-underline-offset: 3px; }
  .lt-link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .lt-newtile:hover { border-color: rgba(196, 242, 74, 0.5); background: rgba(196, 242, 74, 0.04); color: var(--lt-text); }
  .lt-cm-like:hover, .lt-cm-del:not(.armed):hover { background: rgba(255, 255, 255, 0.07); color: var(--lt-text); }
  .lt-cm-like.on:hover { color: var(--lt-lime); }
  .lt-seg button:not(.on):hover { color: var(--lt-text); background: rgba(255, 255, 255, 0.04); }
  .lt-scene:not(.on):hover { background: var(--lt-card-2); box-shadow: inset 0 0 0 1px var(--lt-line-2); }
  .lt-swatch:not(.on):hover { transform: scale(1.1); }
  .lt-switch:hover i { box-shadow: inset 0 0 0 1px rgba(196, 242, 74, 0.4); }
  .lt-back:hover { background: rgba(0, 0, 0, 0.55); }
  .lt-search-x:hover { background: rgba(255, 255, 255, 0.16); color: var(--lt-text); }
  .lt-hs-btn:hover { background: var(--lt-hover); color: var(--lt-text); }
}

/* ---------- motion ---------- */
@keyframes ltFade { from { opacity: 0; transform: translateY(8px); } }
@keyframes ltPop { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
@keyframes ltPopIn { from { opacity: 0; transform: translateY(6px) scale(0.96); } }
@keyframes ltCmIn { from { opacity: 0; transform: translateY(-10px) scale(0.97); } }
@keyframes ltShimmer { to { background-position: -150% 0; } }
@keyframes ltLive { 0% { box-shadow: 0 0 0 0 rgba(196, 242, 74, 0.65); } 100% { box-shadow: 0 0 0 8px rgba(196, 242, 74, 0); } }
@keyframes ltFlash { 0% { box-shadow: 0 0 0 0 rgba(196, 242, 74, 0.6); } 100% { box-shadow: 0 0 0 14px rgba(196, 242, 74, 0); } }
@keyframes ltWash { 0% { opacity: 0; } 14% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ltArrow { 0%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@keyframes ltDot { from { transform: scale(0.2); opacity: 0.9; } to { transform: scale(3.6); opacity: 0; } }
@keyframes ltRing { to { stroke-dashoffset: 0; } }
@keyframes ltBurst {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(-10px) scale(0.4); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d) - 14px)) rotate(120deg) scale(1); }
}
@keyframes ltSway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-8deg); } }
@keyframes ltSway2 { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(7deg); } }
@media (prefers-reduced-motion: no-preference) {
  .lt-enter .lt-page-head, .lt-enter .lt-chips, .lt-enter .lt-sec-head, .lt-enter .lt-lib-head, .lt-enter .lt-stats, .lt-enter .lt-seg, .lt-enter .lt-subrow, .lt-enter .lt-banner, .lt-enter .lt-chan-head, .lt-enter .lt-bio, .lt-enter .lt-empty, .lt-enter .lt-newtile { animation: ltFade 0.42s var(--lt-ease) both; }
  .lt-enter .lt-stats, .lt-enter .lt-chan-head { animation-delay: 50ms; }
  .lt-enter .lt-seg, .lt-enter .lt-bio { animation-delay: 90ms; }
  .lt-enter .lt-card, .lt-enter .lt-row, .lt-enter .lt-cw, .lt-enter .lt-chanrow, .lt-enter .lt-rank-item, .lt-enter .lt-skel,
  .lt-enter-feed .lt-card, .lt-enter-feed .lt-row, .lt-enter-feed .lt-cw, .lt-enter-feed .lt-empty { animation: ltPop 0.5s var(--lt-ease) both; animation-delay: calc(70ms + min(var(--i, 0), 10) * 45ms); }
  .lt-enter .lt-rank-item .lt-row { animation: none; }
  .lt-enter .lt-w-below { animation: ltFade 0.45s var(--lt-ease) 0.06s both; }
  .lt-enter .lt-w-side { animation: ltFade 0.45s var(--lt-ease) 0.14s both; }
  .lt-enter .lt-w-side .lt-row { animation-delay: calc(160ms + min(var(--i, 0), 8) * 40ms); }
  .lt-empty-art svg path:nth-child(1) { animation: ltSway 4s ease-in-out infinite; }
  .lt-empty-art svg path:nth-child(2) { animation: ltSway2 4.6s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .lt *, .lt-sheet-host * { transition-duration: 0.01ms !important; animation: none !important; }
}

/* ---------- tablet + desktop ---------- */
@container site (min-width: 640px) {
  .lt-top { border-bottom: 1px solid var(--lt-line); }
  .lt-top-in { height: 64px; padding: 0 16px 0 20px; gap: 12px; }
  .lt-brand { margin-right: 0; flex-shrink: 0; }
  .lt-search { display: flex; flex: 1; max-width: 540px; margin: 0 auto; }
  .lt-search.on { position: static; padding: 0; background: none; animation: none; }
  .lt-search-back, .lt-search-open { display: none; }
  .lt-search-field { height: 44px; }
  .lt-top-create { display: inline-flex !important; min-height: 40px; padding: 0 16px 0 12px; flex-shrink: 0; }
  .lt-rail { display: block; flex: 0 0 80px; position: sticky; top: 65px; align-self: flex-start; max-height: calc(100vh - 65px); overflow-y: auto; scrollbar-width: none; padding: 8px 6px 16px; }
  .lt-rail::-webkit-scrollbar { width: 0; }
  .lt-rail-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 100%; min-height: 66px; margin-bottom: 2px; border: 0; border-radius: 14px; background: none; color: var(--lt-mute); font-size: 10.5px; font-weight: 650; transition: background 0.2s, color 0.2s, transform 0.15s var(--lt-ease); }
  .lt-rail-item svg { width: 22px; height: 22px; transition: color 0.2s, transform 0.3s var(--lt-spring); }
  .lt-rail-item.on { color: var(--lt-text); background: var(--lt-card-2); }
  .lt-rail-item.on svg { color: var(--lt-lime); }
  .lt-rail-item:active { transform: scale(0.95); }
  .lt-rail-item:hover:not(.on) { background: var(--lt-card); color: var(--lt-text); }
  .lt-rail-subs, .lt-rail-foot { display: none; }
  .lt-main { padding: 8px 24px 48px 12px; }
  .lt-watching .lt-rail { display: none; }
  .lt-watching .lt-top { display: block; }
  .lt-watching .lt-main { padding: 20px 24px 48px; }
  .lt-hs-btns { display: inline-flex; gap: 6px; margin-right: 4px; }
  .lt-card .lt-save { position: absolute; top: 8px; right: 8px; z-index: 2; width: 38px; height: 38px; margin: 0; background: rgba(6, 10, 8, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; transition: opacity 0.2s var(--lt-ease), transform 0.25s var(--lt-spring), background 0.15s, color 0.15s; }
  .lt-card .lt-save.on { color: var(--lt-lime); }
  @media (hover: hover) {
    .lt-card:not(:hover) .lt-save:not(.on):not(:focus-visible) { opacity: 0; transform: scale(0.85); }
    .lt-card .lt-save:hover { background: rgba(6, 10, 8, 0.9); color: var(--lt-lime); }
  }
  .lt-row-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; max-width: 560px; font-size: 12.5px; line-height: 1.5; color: var(--lt-mute); overflow-wrap: anywhere; }
  .lt-page { padding: 0; }
  .lt-chips { top: 65px; margin: 0 -24px 0 -12px; padding: 8px 24px 14px 12px; flex-wrap: nowrap; }
  .lt-grid { grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 28px 16px; }
  .lt-card-title { font-size: 14.5px; }
  .lt-hrow { margin: 0; padding: 2px 0 6px; scroll-padding: 0; }
  .lt-cw { flex-basis: 236px; }
  .lt-page-head { padding: 16px 0 18px; }
  .lt-page-head h1 { font-size: 32px; }
  .lt-rows-results .lt-row-thumb, .lt-rank .lt-row-thumb { width: 240px; }
  .lt-rows-results .lt-row-title, .lt-rank .lt-row-title { font-size: 15.5px; }
  .lt-rank-n { flex-basis: 52px; font-size: 44px; text-align: center; }
  .lt-rank { gap: 18px; }
  .lt-subrow { margin: -4px 0 6px -6px; padding: 4px 0 8px; }
  .lt-subsel { max-width: 560px; }
  .lt-chanrows { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
  .lt-lib { max-width: 980px; }
  .lt-lib-head { padding: 18px 0 18px; gap: 18px; }
  .lt-lib-head h1 { font-size: 30px; }
  .lt-lib-create span { display: inline; }
  .lt-stats { max-width: 520px; }
  .lt-seg { display: inline-flex; max-width: 100%; }
  .lt-seg button { flex: 0 0 auto; padding: 0 16px; font-size: 13px; }
  .lt-lib-body .lt-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
  .lt-newtile { max-width: 420px; }
  .lt-chan { margin: -8px -24px 0 -12px; }
  .lt-banner { height: 170px; }
  .lt-chan-head { grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; padding: 0 24px; gap: 16px 18px; }
  .lt-chan-head > .lt-av { width: 96px; height: 96px; font-size: 46px; margin-top: -36px; }
  .lt-chan-head h1 { font-size: 28px; }
  .lt-chan-head > .lt-sub, .lt-chan-head > .lt-chan-create { grid-column: auto; justify-self: end; margin-bottom: 6px; }
  .lt-bio { padding: 12px 24px 0; max-width: 720px; }
  .lt-chan .lt-sec { padding: 0 24px; margin-top: 22px; }
  .lt-nav { display: none; }
  .lt-dock { height: 0; }
  .lt-mini { position: absolute; right: 20px; bottom: 20px; width: 304px; height: auto; flex-wrap: wrap; align-items: center; padding: 0 6px 6px 0; gap: 0; border: 0; border-radius: 18px; background: var(--lt-card-2); box-shadow: var(--lt-shadow-lg), inset 0 0 0 1px var(--lt-line-2); }
  .lt-mini-art { flex: 0 0 100%; width: 100%; border-radius: 18px 18px 0 0; box-shadow: none; }
  .lt-mini-meta { padding: 10px 6px 4px 14px; }
  .lt-mini-btn { margin-top: 6px; }
  .lt-mini-prog { top: 168px; height: 3px; }
  .lt-w-player { position: static; background: none; z-index: auto; }
  .lt-player { border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05); }
  .lt-c-top { padding: 8px 10px; }
  .lt-c-bot { padding: 0 16px 6px; }
  .lt-w-below { padding: 0; }
  .lt-w-side { margin-top: 28px; padding: 0; }
  .lt-w-title { font-size: 21px; }
  .lt-w-row { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
  .lt-w-ch { flex: 1 1 260px; }
  .lt-actions { margin: 0; padding: 0; overflow: visible; flex-wrap: wrap; }
  .lt-pill, .lt-react button { min-height: 40px; }
  .lt-next .lt-row-thumb { width: 168px; }
  .lt-c-mid { gap: 44px; }
  .lt-c-play { width: 70px; height: 70px; }
  .lt-c-play svg { width: 30px; height: 30px; }
  .lt-c-seek { width: 52px; height: 52px; }
  .lt-c-seek svg { width: 34px; height: 34px; }
  .lt-resume { top: 12px; left: 62px; }
}
@container site (min-width: 800px) {
  .lt-watch { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 22px; align-items: start; }
  .lt-w-side { margin-top: 0; }
  .lt-next-head { margin-top: -6px; }
  .lt-next .lt-row-thumb { width: 128px; }
  .lt-next .lt-row-title { font-size: 13px; }
  .lt-next .lt-row-sub { font-size: 11.5px; }
  .lt-next.lt-rows { gap: 12px; }
}
@container site (min-width: 900px) {
  .lt-rail { flex-basis: 236px; padding: 10px 12px 20px; }
  .lt-rail-item { flex-direction: row; justify-content: flex-start; gap: 18px; min-height: 46px; padding: 0 16px; margin-bottom: 2px; font-size: 14px; border-radius: 12px; }
  .lt-rail-subs { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--lt-line); }
  .lt-rail-label { font-size: 11px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--lt-faint); padding: 8px 16px 8px; }
  .lt-rail-note { font-size: 12.5px; color: var(--lt-mute); padding: 0 16px; line-height: 1.5; }
  .lt-rail-ch { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--lt-soft); font-size: 13.5px; font-weight: 600; text-align: left; transition: background 0.2s, color 0.2s; }
  .lt-rail-ch > span:not(.lt-av) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lt-rail-ch.on { background: var(--lt-card-2); color: var(--lt-text); }
  .lt-rail-ch:hover:not(.on) { background: var(--lt-card); color: var(--lt-text); }
  .lt-rail-ch .lt-dot { box-shadow: none; }
  .lt-rail-foot { display: block; font-size: 11px; color: var(--lt-faint); padding: 20px 16px 0; }
  .lt-watching .lt-rail { display: block; flex-basis: 80px; padding: 8px 6px 16px; }
  .lt-watching .lt-rail-item { flex-direction: column; justify-content: center; gap: 5px; min-height: 66px; padding: 0; font-size: 10.5px; border-radius: 14px; }
  .lt-watching .lt-rail-subs, .lt-watching .lt-rail-foot { display: none; }
  .lt-watching .lt-main { padding: 20px 28px 48px 12px; }
  .lt-main { padding: 8px 28px 48px 16px; }
  .lt-chips { margin: 0 -28px 0 -16px; padding: 8px 28px 14px 16px; }
  .lt-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 18px; }
  .lt-watch { grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; }
  .lt-next .lt-row-thumb { width: 160px; }
  .lt-w-title { font-size: 23px; }
  .lt-chan { margin: -8px -28px 0 -16px; }
}
