/* IBI Infotainment Media — app styles. Theme via data-theme on <html> (theme.js). Brand cyan #35C0ED. */
:root {
  --ts: 1;
  --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f1f4f8; --hover: #e8edf4; --sel: #dbeefb; --chip: #e9eef4; --chip-on: #0f172a; --chip-on-ink: #fff;
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0; --line-2: #cbd5e1;
  --brand: #0369a1; --brand-2: #0284c7; --brand-soft: #e0f2fe; --brand-ink: #ffffff; --accent: #35c0ed;
  --danger: #c0262d; --danger-soft: #fde8e8; --ok: #15803d; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.08); --shadow-lg: 0 24px 60px rgba(2,12,32,.22);
  --radius: 12px; --top-h: 56px; --side-w: 240px; --mini-w: 72px; --player-bg: #000;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #0f1829; --surface-2: #142036; --hover: #1a2a44; --sel: #0d3550; --chip: #1a2740; --chip-on: #f1f5f9; --chip-on-ink: #0b1220;
  --ink: #e6edf7; --ink-2: #c3d0e0; --muted: #8fa3bd; --line: #1e2d47; --line-2: #2b3e5e;
  --brand: #35c0ed; --brand-2: #5fd0f3; --brand-soft: #0b3247; --brand-ink: #03131f; --accent: #35c0ed;
  --danger: #ff8a8a; --danger-soft: #3b1418; --ok: #6ee7a0; --ok-soft: #0f2e1d; --warn: #fcd34d; --warn-soft: #332508;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-size: calc(16px * var(--ts)); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Tamil", Arial, sans-serif; line-height: 1.45; min-height: 100vh; }
[hidden] { display: none !important; }
small, .small { font-size: .8125rem; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a.lnk, .lnk { color: var(--brand); }
img { max-width: 100%; }
.ic { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 18px; height: 18px; }
.logo-d { display: none; }
:root[data-theme="dark"] .logo-l { display: none; } :root[data-theme="dark"] .logo-d { display: inline-block; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── header ── */
.top { position: fixed; inset: 0 0 auto 0; height: var(--top-h); display: flex; align-items: center; gap: 8px; padding: 0 12px 0 8px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 40; }
.ver-badge { flex: 0 0 auto; font: 800 .75rem/1 system-ui, sans-serif; letter-spacing: .02em; padding: 5px 8px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); cursor: default; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); flex: 0 0 auto; min-width: 0; }
.brand .logo { height: 34px; width: auto; }
.brand-name { font-size: 1.02rem; white-space: nowrap; padding-left: 8px; border-left: 1px solid var(--line-2); color: var(--ink-2); line-height: 1.1; }
.brand-name b { color: var(--ink); }
.search { flex: 1 1 auto; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 6px; position: relative; }
.search-box { flex: 1; position: relative; display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line-2); border-radius: 999px 0 0 999px; height: 40px; padding: 0 8px 0 16px; }
.search-box:focus-within { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 1rem; color: var(--ink); height: 100%; }
.search-box input::-webkit-search-cancel-button { display: none; }
.clear-btn { border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; }
.search-go { height: 40px; width: 62px; border: 1px solid var(--line-2); border-left: 0; background: var(--surface-2); color: var(--ink-2); border-radius: 0 999px 999px 0; display: grid; place-items: center; margin-left: -6px; }
.search-go:hover { background: var(--hover); }
.suggest { position: absolute; top: 44px; left: 0; right: -56px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px 0; z-index: 50; max-height: 60vh; overflow: auto; }
.suggest .sg { display: flex; align-items: center; gap: 12px; padding: 8px 16px; cursor: pointer; }
.suggest .sg:hover, .suggest .sg.on { background: var(--hover); }
.suggest .sg .ic { color: var(--muted); }
.suggest .sg .rm { margin-left: auto; color: var(--brand); font-size: .8rem; }
.top-right { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; margin-left: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); flex: 0 0 auto; position: relative; }
.icon-btn:hover { background: var(--hover); }
.icon-btn.on { color: var(--brand); }
.install-btn, .create-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 7px 14px 7px 10px; font-weight: 600; font-size: .9rem; }
.install-btn { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.install-btn:hover, .create-btn:hover { filter: brightness(1.05); background: var(--hover); }
.bell .badge { position: absolute; top: 4px; right: 4px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 800; min-width: 17px; height: 17px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; line-height: 1; }
.avatar { width: 36px; height: 36px; border-radius: 999px; border: 0; background: linear-gradient(135deg, #0369a1, #35c0ed); color: #fff; font-weight: 800; font-size: .9rem; overflow: hidden; display: grid; place-items: center; padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.btn.signin { gap: 6px; border: 1px solid var(--line-2); color: var(--brand); background: transparent; padding: 6px 14px 6px 10px; }
/* light/dark toggle switch */
.switch { position: relative; display: inline-flex; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 52px; height: 28px; border-radius: 999px; background: #dbe7f3; border: 1px solid var(--line-2); position: relative; transition: background .2s; }
.switch .thumb { position: absolute; top: 1px; left: 1px; width: 24px; height: 24px; border-radius: 999px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); display: grid; place-items: center; transition: transform .22s cubic-bezier(.3,.7,.4,1); color: #f59e0b; }
.switch .thumb .ic { width: 15px; height: 15px; }
.switch .moon { display: none; }
.switch input:checked + .track { background: #0b3247; border-color: #1f5d7d; }
.switch input:checked + .track .thumb { transform: translateX(24px); background: #0e1829; color: var(--accent); }
.switch input:checked + .track .sun { display: none; } .switch input:checked + .track .moon { display: block; }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── layout ── */
.shell { display: flex; padding-top: var(--top-h); min-height: 100vh; }
.side { width: var(--side-w); flex: 0 0 auto; position: fixed; top: var(--top-h); bottom: 0; left: 0; overflow-y: auto; padding: 10px 12px 20px; background: var(--bg); z-index: 35; scrollbar-width: thin; }
.main { flex: 1 1 auto; min-width: 0; margin-left: var(--side-w); }
.view { padding: 16px 24px 48px; }
.side-scrim { display: none; }
.nav { display: flex; align-items: center; gap: 18px; padding: 9px 12px; border-radius: 10px; color: var(--ink); font-size: .92rem; min-height: 40px; width: 100%; border: 0; background: transparent; text-align: left; }
.nav:hover { background: var(--hover); }
.nav.on { background: var(--sel); font-weight: 600; }
.nav .ic { color: var(--ink-2); } .nav.on .ic { color: var(--brand); }
.nav .av { width: 24px; height: 24px; border-radius: 999px; object-fit: cover; background: var(--surface-2); flex: 0 0 auto; }
.nav .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--brand); margin-left: auto; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 4px; }
.nav-h { padding: 8px 12px 4px; font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: 6px; }
.nav-foot { padding: 12px 12px 0; color: var(--muted); font-size: .76rem; line-height: 1.7; }
.nav-foot a { margin-right: 8px; }
/* mini sidebar (tablet) */
body.side-mini .side { width: var(--mini-w); padding: 6px 4px; }
body.side-mini .main { margin-left: var(--mini-w); }
body.side-mini .nav { flex-direction: column; gap: 4px; font-size: .62rem; padding: 10px 2px 8px; text-align: center; }
body.side-mini .nav span { white-space: nowrap; overflow: hidden; max-width: 100%; text-overflow: ellipsis; }
body.side-mini .nav .dot, body.side-mini .nav-h, body.side-mini .nav-foot, body.side-mini .side .hide-mini { display: none; }
body.side-hidden .side { display: none; } body.side-hidden .main { margin-left: 0; }

/* ── buttons & forms ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: .92rem; background: var(--chip); color: var(--ink); white-space: nowrap; min-height: 38px; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--brand); color: var(--brand-ink); } .btn.primary:hover { background: var(--brand-2); }
.btn.dark { background: var(--chip-on); color: var(--chip-on-ink); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.sm { padding: 6px 12px; font-size: .84rem; min-height: 32px; }
.btn.xs { padding: 3px 10px; font-size: .78rem; min-height: 26px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .ic { width: 20px; height: 20px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: .85rem; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea, .inp { width: 100%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 1rem; min-height: 44px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.field .hint { display: block; color: var(--muted); font-size: .78rem; margin-top: 4px; }
.field.err input, .field.err textarea { border-color: var(--danger); }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.radio { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; cursor: pointer; border-bottom: 1px solid var(--line); }
.radio:last-child { border-bottom: 0; }
.radio input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.radio b { display: block; }
.radio small { color: var(--muted); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .74rem; font-weight: 700; background: var(--chip); color: var(--ink-2); }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.warn { background: var(--warn-soft); color: var(--warn); } .tag.bad { background: var(--danger-soft); color: var(--danger); } .tag.brand { background: var(--brand-soft); color: var(--brand); }
.note { color: var(--muted); font-size: .85rem; }
.note.warn { color: var(--warn); }
.chips { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; position: sticky; top: var(--top-h); background: var(--bg); z-index: 5; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 0; background: var(--chip); color: var(--ink); border-radius: 8px; padding: 7px 12px; font-weight: 600; font-size: .88rem; }
.chip:hover { background: var(--hover); } .chip.on { background: var(--chip-on); color: var(--chip-on-ink); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 7px 14px; font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.seg button.on { background: var(--chip-on); color: var(--chip-on-ink); }
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 6px 16px; margin: 0; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--surface-2); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 10px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.panel h3 .ic { color: var(--brand); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ic { width: 56px; height: 56px; color: var(--line-2); margin-bottom: 10px; }
.empty h3 { margin: 6px 0; color: var(--ink); }
.page-h { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; flex-wrap: wrap; }
.page-h h1 { font-size: 1.5rem; margin: 0; flex: 1 1 auto; }
h2.sec { font-size: 1.15rem; margin: 22px 0 10px; }
.loading { display: flex; justify-content: center; padding: 40px; }
.spin { width: 28px; height: 28px; border: 3px solid var(--line-2); border-top-color: var(--brand); border-radius: 999px; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--surface-2), var(--hover), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── video cards ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px 16px; }
.grid.dense { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px 12px; }
.card { display: flex; flex-direction: column; gap: 10px; position: relative; cursor: pointer; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; background: #000; }
.thumb .dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.8); color: #fff; font-size: .74rem; font-weight: 600; padding: 2px 5px; border-radius: 4px; }
.thumb .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.35); }
.thumb .prog span { display: block; height: 100%; background: var(--accent); }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line-2); background: linear-gradient(135deg, var(--surface-2), var(--hover)); }
.thumb .ph .ic { width: 48px; height: 48px; }
.thumb .vis { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: .7rem; padding: 2px 6px; border-radius: 4px; display: flex; gap: 4px; align-items: center; }
.thumb .vis .ic { width: 12px; height: 12px; }
.card .meta { display: flex; gap: 10px; align-items: flex-start; }
.card .av { width: 36px; height: 36px; border-radius: 999px; object-fit: cover; background: var(--surface-2); flex: 0 0 auto; }
.card .txt { flex: 1 1 auto; min-width: 0; }
.card .ttl { font-weight: 600; font-size: .95rem; line-height: 1.35; margin: 0 0 4px; color: var(--ink); }
.card .sub { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.card .sub .ch { display: inline-flex; align-items: center; gap: 3px; }
.card .sub .ch:hover { color: var(--ink); }
.card .more { position: absolute; right: -6px; top: calc(100% - 44px); opacity: 0; }
.card:hover .more, .card:focus-within .more { opacity: 1; }
.card.list { flex-direction: row; gap: 14px; }
.card.list .thumb { width: 42%; max-width: 360px; flex: 0 0 auto; }
.card.list .more { position: static; opacity: 1; }
.card.list .ttl { font-size: 1.1rem; }
.card.list .desc { color: var(--muted); font-size: .84rem; margin-top: 8px; }
.card.row-sm { flex-direction: row; gap: 8px; } .card.row-sm .thumb { width: 168px; flex: 0 0 auto; } .card.row-sm .ttl { font-size: .9rem; }
.card.short .thumb { aspect-ratio: 9 / 16; }
.verified { width: 14px; height: 14px; color: var(--muted); }
.av-fallback { display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0369a1, #35c0ed); }
.pl-thumb { position: relative; }
.pl-thumb::after { content: ''; position: absolute; inset: -6px 6px auto 6px; height: 6px; border-radius: 6px 6px 0 0; background: var(--line-2); }
.pl-thumb .cnt { position: absolute; right: 0; top: 0; bottom: 0; width: 38%; background: rgba(0,0,0,.72); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; text-align: center; line-height: 1.3; }
.ch-card { display: flex; gap: 20px; align-items: center; padding: 14px; cursor: pointer; }
.ch-card .av-l { width: 120px; height: 120px; border-radius: 999px; object-fit: cover; flex: 0 0 auto; }
.ch-card h3 { margin: 0 0 4px; }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.shelf .card { scroll-snap-align: start; }

/* ── watch page ── */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.watch.theatre { grid-template-columns: 1fr; }
.watch.theatre .player-wrap { max-height: calc(100vh - var(--top-h) - 80px); aspect-ratio: auto; height: calc(100vh - var(--top-h) - 120px); }
.watch.theatre .side-col { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px 16px; }
.player-wrap { position: relative; aspect-ratio: 16 / 9; background: var(--player-bg); border-radius: 12px; overflow: hidden; max-height: calc(100vh - var(--top-h) - 160px); width: 100%; }
.player-wrap.vertical video { object-fit: contain; }
.player-wrap.ambient { box-shadow: 0 0 120px 20px var(--amb, transparent); }
.w-title { font-size: 1.25rem; font-weight: 700; margin: 12px 0 8px; line-height: 1.3; }
.w-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.w-ch { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.w-ch .av { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; }
.w-ch .nm { font-weight: 600; display: flex; align-items: center; gap: 4px; }
.w-ch small { color: var(--muted); display: block; }
.w-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.likebar { display: inline-flex; border-radius: 999px; background: var(--chip); overflow: hidden; }
.likebar button { border: 0; background: transparent; padding: 8px 14px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.likebar button:hover { background: var(--hover); }
.likebar button.on .ic { fill: currentColor; }
.likebar .sep { width: 1px; background: var(--line-2); margin: 8px 0; }
.sub-btn { background: var(--chip-on); color: var(--chip-on-ink); }
.sub-btn.on { background: var(--chip); color: var(--ink); }
.desc-box { background: var(--chip); border-radius: 12px; padding: 12px 14px; margin-top: 12px; cursor: pointer; font-size: .92rem; white-space: pre-wrap; word-wrap: break-word; }
.desc-box:hover { background: var(--hover); }
.desc-box.open { cursor: default; } .desc-box.open:hover { background: var(--chip); }
.desc-box b.stats { display: block; margin-bottom: 6px; }
.desc-box .tags a { color: var(--brand); margin-right: 6px; }
.desc-box .ts { color: var(--brand); cursor: pointer; }
.desc-box .mo { font-weight: 700; display: inline-block; margin-top: 6px; }
.side-col .card.row-sm .thumb { width: 168px; }
.autoplay { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 10px; font-size: .9rem; }
.pl-panel { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 14px; background: var(--surface); }
.pl-panel .pl-h { padding: 12px 14px; background: var(--surface-2); display: flex; align-items: center; gap: 10px; }
.pl-panel .pl-h b { display: block; } .pl-panel .pl-h small { color: var(--muted); }
.pl-panel .pl-list { max-height: 400px; overflow: auto; }
.pl-panel .pl-item { display: flex; gap: 8px; padding: 6px 8px; align-items: center; cursor: pointer; }
.pl-panel .pl-item:hover { background: var(--hover); } .pl-panel .pl-item.on { background: var(--sel); }
.pl-panel .pl-item .n { width: 20px; color: var(--muted); font-size: .8rem; text-align: center; flex: 0 0 auto; }
.pl-panel .pl-item .thumb { width: 100px; flex: 0 0 auto; border-radius: 6px; }
.pl-panel .pl-item .ttl { font-size: .86rem; font-weight: 600; }
.end-screen { position: absolute; inset: 0; background: rgba(0,0,0,.85); display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 40px 30px; align-content: center; z-index: 6; }
.end-screen .card .ttl { color: #fff; font-size: .85rem; } .end-screen .card .sub { color: #bbb; }
.end-screen .replay { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); }

/* ── player ── */
.plyr { position: absolute; inset: 0; color: #fff; user-select: none; }
.plyr video { width: 100%; height: 100%; display: block; background: #000; }
.plyr .ctr { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 12px 6px; background: linear-gradient(transparent, rgba(0,0,0,.75)); opacity: 0; transition: opacity .2s; z-index: 4; }
.plyr.show .ctr, .plyr.paused .ctr { opacity: 1; }
.plyr .bar { position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; }
.plyr .bar .trk { position: relative; height: 3px; width: 100%; background: rgba(255,255,255,.3); border-radius: 2px; transition: height .1s; }
.plyr .bar:hover .trk, .plyr .bar.drag .trk { height: 5px; }
.plyr .bar .buf, .plyr .bar .cur, .plyr .bar .hov { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }
.plyr .bar .buf { background: rgba(255,255,255,.4); } .plyr .bar .hov { background: rgba(255,255,255,.55); } .plyr .bar .cur { background: var(--accent); }
.plyr .bar .knob { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 999px; background: var(--accent); transform: translate(-50%, -50%) scale(0); transition: transform .1s; }
.plyr .bar:hover .knob, .plyr .bar.drag .knob { transform: translate(-50%, -50%) scale(1); }
.plyr .bar .chap { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(0,0,0,.6); }
.plyr .tip { position: absolute; bottom: 24px; transform: translateX(-50%); background: rgba(0,0,0,.85); padding: 3px 7px; border-radius: 4px; font-size: .78rem; white-space: nowrap; pointer-events: none; }
.plyr .btns { display: flex; align-items: center; gap: 2px; }
.plyr .btns button { border: 0; background: transparent; color: #fff; width: 40px; height: 40px; border-radius: 6px; display: grid; place-items: center; opacity: .92; }
.plyr .btns button:hover { opacity: 1; background: rgba(255,255,255,.12); }
.plyr .btns .ic { width: 24px; height: 24px; }
.plyr .time { font-size: .82rem; margin: 0 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plyr .vol { display: flex; align-items: center; }
.plyr .vol input { width: 0; opacity: 0; transition: width .2s, opacity .2s; accent-color: #fff; margin: 0; }
.plyr .vol:hover input, .plyr .vol:focus-within input { width: 72px; opacity: 1; margin-left: 4px; }
.plyr .sp { margin-left: auto; }
.plyr .big { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.plyr .big .ic { width: 72px; height: 72px; color: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); opacity: 0; transform: scale(.8); transition: all .2s; }
.plyr.paused .big .ic, .plyr.loading .big .spin { opacity: 1; transform: scale(1); }
.plyr .flash { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.6); padding: 12px 18px; border-radius: 999px; font-size: 1.1rem; font-weight: 700; opacity: 0; pointer-events: none; z-index: 5; }
.plyr .flash.go { animation: flash .7s ease-out; }
@keyframes flash { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.9); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); } }
.plyr .tapzone { position: absolute; top: 0; bottom: 60px; width: 30%; z-index: 3; }
.plyr .tapzone.l { left: 0; } .plyr .tapzone.r { right: 0; }
.plyr .menu { position: absolute; right: 12px; bottom: 60px; background: rgba(20,20,20,.95); border-radius: 12px; min-width: 240px; padding: 8px 0; z-index: 7; font-size: .9rem; color: #fff; max-height: 60%; overflow: auto; }
.plyr .menu .mi { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; }
.plyr .menu .mi:hover { background: rgba(255,255,255,.1); }
.plyr .menu .mi .val { margin-left: auto; color: #bbb; font-size: .85rem; }
.plyr .menu .mi.on .val { color: var(--accent); }
.plyr .menu .mh { padding: 8px 16px; border-bottom: 1px solid rgba(255,255,255,.15); font-weight: 700; display: flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 4px; }
.plyr .cc { position: absolute; left: 0; right: 0; bottom: 60px; text-align: center; pointer-events: none; z-index: 3; padding: 0 20px; }
.plyr .cc span { display: inline-block; background: rgba(0,0,0,.75); color: #fff; padding: 4px 8px; border-radius: 4px; font-size: clamp(14px, 2.4vw, 22px); line-height: 1.35; white-space: pre-wrap; }
.plyr video::-webkit-media-text-track-display { display: none; }
.plyr .spin.big-spin { position: absolute; left: 50%; top: 50%; margin: -22px; width: 44px; height: 44px; border-width: 4px; z-index: 2; display: none; }
.plyr.loading .spin.big-spin { display: block; }
.plyr .chap-name { font-size: .8rem; opacity: .85; margin-left: 4px; }
.plyr .err { position: absolute; inset: 0; display: grid; place-items: center; background: #111; color: #fff; text-align: center; padding: 20px; z-index: 8; }
:fullscreen .plyr video { object-fit: contain; }
.player-wrap:fullscreen { border-radius: 0; max-height: none; aspect-ratio: auto; }

/* ── mini player ── */
.mini { position: fixed; right: 16px; bottom: 16px; width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 45; display: grid; grid-template-columns: 1fr; overflow: hidden; }
.mini-video { aspect-ratio: 16 / 9; background: #000; position: relative; cursor: pointer; }
.mini-video .plyr .ctr, .mini-video .plyr .tapzone { display: none; }
.mini .mini-info { padding: 8px 10px; grid-column: 1; display: flex; flex-direction: column; min-width: 0; }
.mini .mini-info b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .mini-info small { color: var(--muted); }
.mini > .icon-btn { position: absolute; top: 4px; }
.mini > .icon-btn:first-of-type { right: 44px; } .mini > .icon-btn:last-of-type { right: 4px; }
.mini > .icon-btn { color: #fff; background: rgba(0,0,0,.4); }

/* ── shorts ── */
.shorts { height: calc(100vh - var(--top-h)); overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; margin: -16px -24px -48px; background: #000; }
.shorts::-webkit-scrollbar { display: none; }
.short-item { height: calc(100vh - var(--top-h)); scroll-snap-align: start; display: flex; justify-content: center; align-items: center; gap: 16px; position: relative; }
.short-frame { position: relative; height: 92%; aspect-ratio: 9 / 16; max-width: 100%; background: #111; border-radius: 14px; overflow: hidden; }
.short-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.short-frame .s-over { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; background: linear-gradient(transparent, rgba(0,0,0,.8)); color: #fff; }
.short-frame .s-over .nm { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 6px; }
.short-frame .s-over .av { width: 32px; height: 32px; border-radius: 999px; }
.short-frame .s-over .btn { padding: 4px 12px; min-height: 30px; font-size: .8rem; background: #fff; color: #000; }
.short-frame .s-over .ttl { font-size: .92rem; }
.short-frame .s-mute { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.5); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; z-index: 2; }
.short-frame .s-pause { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; pointer-events: none; opacity: 0; transition: opacity .2s; }
.short-frame.paused .s-pause { opacity: 1; }
.short-frame .s-pause .ic { width: 70px; height: 70px; }
.short-frame .s-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.3); }
.short-frame .s-prog span { display: block; height: 100%; background: #fff; }
.s-side { display: flex; flex-direction: column; gap: 14px; align-self: flex-end; padding-bottom: 20px; color: #fff; }
.s-side button { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; }
.s-side button.on .ic { fill: #fff; }
.s-side .s-act { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .75rem; }
.s-side .ic { width: 26px; height: 26px; }
.shorts-nav { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 5; }
.shorts-nav button { width: 48px; height: 48px; border-radius: 999px; border: 0; background: var(--chip); color: var(--ink); display: grid; place-items: center; }
.s-comments { position: absolute; right: 0; top: 0; bottom: 0; width: 400px; max-width: 100%; background: var(--surface); color: var(--ink); z-index: 6; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.s-comments .sc-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.s-comments .sc-b { flex: 1; overflow: auto; padding: 10px 14px; }

/* ── comments ── */
.comments { margin-top: 20px; }
.comments .c-h { display: flex; align-items: center; gap: 24px; margin-bottom: 18px; }
.comments .c-h b { font-size: 1.1rem; }
.c-sort { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.c-new { display: flex; gap: 12px; margin-bottom: 24px; align-items: flex-start; }
.c-new .av, .cm .av { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; flex: 0 0 auto; }
.cm.reply .av { width: 26px; height: 26px; }
.c-new textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; padding: 6px 0; resize: none; min-height: 32px; overflow: hidden; font-size: .95rem; }
.c-new textarea:focus { outline: none; border-bottom: 2px solid var(--ink); }
.c-new .c-tools { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.cm { display: flex; gap: 12px; margin-bottom: 16px; }
.cm .body { flex: 1 1 auto; min-width: 0; }
.cm .who { display: flex; align-items: center; gap: 6px; font-size: .84rem; }
.cm .who b { font-weight: 600; }
.cm .who .own { background: var(--chip-on); color: var(--chip-on-ink); border-radius: 999px; padding: 1px 8px; font-size: .78rem; }
.cm .who small { color: var(--muted); }
.cm .text { margin: 2px 0 4px; white-space: pre-wrap; word-wrap: break-word; font-size: .93rem; }
.cm .text.deleted { color: var(--muted); font-style: italic; }
.cm .acts { display: flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); }
.cm .acts button { border: 0; background: transparent; color: var(--muted); padding: 4px 6px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; }
.cm .acts button:hover { background: var(--hover); color: var(--ink); }
.cm .acts button.on { color: var(--ink); } .cm .acts button.on .ic { fill: currentColor; }
.cm .acts .ic { width: 16px; height: 16px; }
.cm .acts .heart { color: var(--danger); } .cm .acts .heart .ic { fill: var(--danger); }
.cm .replies { margin-top: 6px; }
.cm .replies .toggle { color: var(--brand); font-weight: 600; font-size: .86rem; display: inline-flex; align-items: center; gap: 6px; }
.cm .pinned { font-size: .76rem; color: var(--muted); display: flex; gap: 4px; align-items: center; margin-bottom: 2px; }
.cm .pinned .ic { width: 12px; height: 12px; }

/* ── channel page ── */
.banner { width: 100%; aspect-ratio: 6.2 / 1; border-radius: 12px; object-fit: cover; background: linear-gradient(135deg, #0369a1, #35c0ed); display: block; }
.ch-head { display: flex; gap: 20px; align-items: center; margin: 16px 0; }
.ch-head .av-xl { width: 160px; height: 160px; border-radius: 999px; object-fit: cover; flex: 0 0 auto; }
.ch-head h1 { margin: 0 0 4px; font-size: 1.6rem; display: flex; align-items: center; gap: 8px; }
.ch-head .hd { color: var(--muted); font-size: .9rem; }
.ch-head .ab { color: var(--muted); font-size: .9rem; margin: 6px 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 10px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: transparent; padding: 12px 16px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }

/* ── playlist page ── */
.pl-page { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
.pl-hero { position: sticky; top: calc(var(--top-h) + 16px); border-radius: 16px; padding: 20px; background: linear-gradient(160deg, var(--brand-soft), var(--surface)); border: 1px solid var(--line); }
.pl-hero .thumb { margin-bottom: 14px; }
.pl-hero h1 { font-size: 1.4rem; margin: 0 0 8px; }
.pl-hero .meta { color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.pl-items .card.row-sm { padding: 6px 8px; border-radius: 10px; }
.pl-items .card.row-sm:hover { background: var(--hover); }
.pl-items .card.row-sm .n { width: 22px; color: var(--muted); font-size: .85rem; text-align: center; align-self: center; cursor: grab; }
.pl-items .card.row-sm .thumb { width: 160px; }

/* ── lists (history / library) ── */
.hist-day { font-weight: 700; margin: 20px 0 10px; }
.lib-row { display: flex; align-items: center; gap: 10px; margin: 24px 0 10px; }
.lib-row h2 { margin: 0; font-size: 1.15rem; flex: 1; display: flex; align-items: center; gap: 8px; }

/* ── popovers, menus, dialogs, toasts ── */
.pop { position: fixed; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 220px; max-width: min(420px, 96vw); padding: 6px 0; z-index: 60; max-height: 80vh; overflow: auto; }
.pop .mi { display: flex; align-items: center; gap: 14px; padding: 10px 16px; cursor: pointer; font-size: .93rem; width: 100%; border: 0; background: transparent; text-align: left; color: var(--ink); }
.pop .mi:hover { background: var(--hover); }
.pop .mi.bad { color: var(--danger); }
.pop .mi .ic { color: var(--ink-2); } .pop .mi.bad .ic { color: var(--danger); }
.pop .msep { height: 1px; background: var(--line); margin: 6px 0; }
.pop .mhead { padding: 12px 16px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pop .mhead .avatar { width: 40px; height: 40px; }
.pop.wide { min-width: 360px; }
.notif { display: flex; gap: 12px; padding: 10px 16px; cursor: pointer; align-items: flex-start; }
.notif:hover { background: var(--hover); }
.notif.unread { background: var(--sel); }
.notif .av { width: 40px; height: 40px; border-radius: 999px; flex: 0 0 auto; object-fit: cover; }
.notif .nt { flex: 1 1 auto; font-size: .88rem; }
.notif .nt small { display: block; color: var(--muted); }
.notif .nth { width: 86px; aspect-ratio: 16/9; border-radius: 6px; object-fit: cover; flex: 0 0 auto; background: var(--surface-2); }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 70; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal.wide { max-width: 760px; } .modal.xl { max-width: 1040px; }
.modal .mhd { display: flex; align-items: center; gap: 10px; padding: 16px 20px 10px; }
.modal .mhd h2 { margin: 0; font-size: 1.15rem; flex: 1; }
.modal .mbody { padding: 6px 20px 16px; overflow: auto; flex: 1 1 auto; }
.modal .mfoot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 20px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal .mfoot .left { margin-right: auto; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 90; align-items: center; pointer-events: none; }
.toast { background: var(--chip-on); color: var(--chip-on-ink); padding: 12px 18px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow-lg); display: flex; gap: 14px; align-items: center; pointer-events: auto; max-width: min(92vw, 520px); font-size: .92rem; }
.toast button { border: 0; background: transparent; color: var(--accent); font-weight: 700; }
.toast.bad { background: var(--danger); color: #fff; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.share-grid a, .share-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .78rem; border: 0; background: transparent; color: var(--ink); }
.share-grid .circ { width: 56px; height: 56px; border-radius: 999px; display: grid; place-items: center; color: #fff; }
.share-grid .circ .ic { width: 26px; height: 26px; }
.copyrow { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; }
.copyrow input { flex: 1; border: 0; background: transparent; font-size: .9rem; min-width: 0; }
.plist .check { border-bottom: 1px solid var(--line); }
.plist .check .ic { margin-left: auto; color: var(--muted); }
.install-banner { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-lg); z-index: 50; width: min(96vw, 520px); }
.install-banner img { border-radius: 10px; }
.install-banner div { flex: 1; min-width: 0; } .install-banner b { display: block; font-size: .95rem; } .install-banner small { color: var(--muted); display: block; }

/* ── results ── */
.results { max-width: 1100px; }
.results .card.list { margin-bottom: 18px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; padding: 14px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.filters h4 { margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.filters button { display: block; border: 0; background: transparent; padding: 5px 0; color: var(--muted); font-size: .9rem; text-align: left; }
.filters button.on { color: var(--ink); font-weight: 700; }

/* ── auth / setup / legal ── */
.auth { max-width: 440px; margin: 40px auto; }
.auth .panel { padding: 28px; }
.auth h1 { font-size: 1.5rem; margin: 0 0 6px; }
.auth .lead { color: var(--muted); margin: 0 0 20px; }
.legal { max-width: 820px; } .legal h1 { font-size: 1.7rem; } .legal h2 { font-size: 1.15rem; margin-top: 26px; } .legal p, .legal li { color: var(--ink-2); line-height: 1.65; }
.settings { max-width: 900px; }
.settings .srow { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.settings .srow:last-child { border-bottom: 0; }
.settings .srow .t { flex: 1 1 auto; } .settings .srow .t b { display: block; } .settings .srow .t small { color: var(--muted); }

/* ── studio & admin ── */
.studio { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; margin: -16px -24px; min-height: calc(100vh - var(--top-h)); }
.studio .snav { position: sticky; top: var(--top-h); padding: 16px 10px; background: var(--surface); border-right: 1px solid var(--line); height: calc(100vh - var(--top-h)); overflow: auto; }
.studio .snav .nav { font-size: .9rem; }
.studio .scontent { padding: 20px 24px 60px; min-width: 0; }
.studio .sprofile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 16px; text-align: center; }
.studio .sprofile .av { width: 96px; height: 96px; border-radius: 999px; object-fit: cover; }
.studio .sprofile small { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat b { display: block; font-size: 1.5rem; } .stat small { color: var(--muted); }
.stat.on { outline: 2px solid var(--brand); }
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 18px; }
.chart svg { width: 100%; height: 220px; display: block; }
.chart .ax { fill: var(--muted); font-size: 11px; }
.chart .ln { fill: none; stroke: var(--brand); stroke-width: 2.5; }
.chart .ar { fill: var(--brand); opacity: .12; }
.chart .gd { stroke: var(--line); stroke-dasharray: 3 3; }
.chart .pt { fill: var(--brand); }
.vrow { display: flex; gap: 12px; align-items: center; }
.vrow .thumb { width: 120px; flex: 0 0 auto; border-radius: 6px; }
.vrow .t { min-width: 0; } .vrow .t b { display: block; font-size: .9rem; } .vrow .t small { color: var(--muted); }
.vrow .acts { display: flex; gap: 2px; opacity: 0; } tr:hover .vrow .acts { opacity: 1; }
.up-drop { border: 2px dashed var(--line-2); border-radius: 16px; padding: 50px 20px; text-align: center; color: var(--muted); }
.up-drop.over { border-color: var(--brand); background: var(--brand-soft); }
.up-drop .big-ic { width: 120px; height: 120px; border-radius: 999px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 16px; }
.up-drop .big-ic .ic { width: 56px; height: 56px; color: var(--muted); }
.steps { display: flex; justify-content: space-between; margin: 0 0 20px; position: relative; }
.steps::before { content: ''; position: absolute; left: 12%; right: 12%; top: 14px; height: 2px; background: var(--line-2); }
.steps div { position: relative; flex: 1; text-align: center; font-size: .8rem; color: var(--muted); }
.steps div::before { content: ''; display: block; width: 28px; height: 28px; margin: 0 auto 6px; border-radius: 999px; background: var(--line-2); border: 4px solid var(--surface); }
.steps div.on { color: var(--ink); font-weight: 700; } .steps div.on::before, .steps div.done::before { background: var(--brand); }
.up-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
.up-prev { background: var(--surface-2); border-radius: 12px; overflow: hidden; }
.up-prev video, .up-prev img { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #000; display: block; }
.up-prev .up-meta { padding: 10px 12px; font-size: .84rem; } .up-prev .up-meta small { color: var(--muted); display: block; }
.thumbs-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumbs-pick button, .thumbs-pick label { border: 2px solid transparent; border-radius: 8px; overflow: hidden; padding: 0; background: var(--surface-2); aspect-ratio: 16/9; display: grid; place-items: center; cursor: pointer; color: var(--muted); font-size: .75rem; }
.thumbs-pick button.on { border-color: var(--brand); }
.thumbs-pick img { width: 100%; height: 100%; object-fit: cover; }
.prog-wrap { background: var(--line); border-radius: 999px; height: 8px; overflow: hidden; margin: 8px 0; }
.prog-wrap span { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.upl { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.upl .t { flex: 1; min-width: 0; } .upl .t b { display: block; font-size: .9rem; } .upl .t small { color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 99px; transition: width .4s; }
.event { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.event small { color: var(--muted); white-space: nowrap; }
.embed-page { position: fixed; inset: 0; background: #000; }
.embed-page .player-wrap { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; max-height: none; }
.embed-page .e-title { position: absolute; left: 0; right: 0; top: 0; padding: 12px 16px; background: linear-gradient(rgba(0,0,0,.7), transparent); color: #fff; font-weight: 600; z-index: 5; display: flex; gap: 10px; align-items: center; transition: opacity .3s; }
.embed-page .e-title img { height: 24px; }
html[data-embed] .top, html[data-embed] .side, html[data-embed] .bottom-nav, html[data-embed] .install-banner { display: none !important; }
html[data-embed] .shell { padding: 0; } html[data-embed] .main { margin: 0; } html[data-embed] .view { padding: 0; }

/* ── bottom nav (phone) ── */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: space-around; align-items: center; z-index: 40; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .64rem; color: var(--ink-2); flex: 1; padding: 4px 0; }
.bottom-nav a.on { color: var(--brand); } .bottom-nav a.on .ic { stroke-width: 2.4; }
.bottom-nav .plus { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); display: grid; place-items: center; }
.only-phone { display: none !important; }

/* ── responsive ── */
@media (max-width: 1312px) { body:not(.side-hidden) .side { width: var(--mini-w); padding: 6px 4px; } body:not(.side-hidden) .main { margin-left: var(--mini-w); }
  body:not(.side-hidden) .nav { flex-direction: column; gap: 4px; font-size: .62rem; padding: 10px 2px 8px; text-align: center; }
  body:not(.side-hidden) .nav .dot, body:not(.side-hidden) .nav-h, body:not(.side-hidden) .nav-foot, body:not(.side-hidden) .side .hide-mini { display: none; }
  body.side-open .side { width: var(--side-w); padding: 10px 12px 20px; box-shadow: var(--shadow-lg); } body.side-open .nav { flex-direction: row; gap: 18px; font-size: .92rem; padding: 9px 12px; text-align: left; }
  body.side-open .nav .dot, body.side-open .nav-h, body.side-open .nav-foot, body.side-open .side .hide-mini { display: flex; } body.side-open .nav-foot { display: block; }
  .watch { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 1000px) { .watch { grid-template-columns: minmax(0, 1fr); } .watch > * { min-width: 0; } .watch .side-col { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 16px; } .pl-page { grid-template-columns: 1fr; } .pl-hero { position: static; } .up-grid { grid-template-columns: 1fr; } .studio { grid-template-columns: 64px 1fr; } .studio .snav .nav span, .studio .sprofile, .studio .snav .nav-h { display: none; } .studio .snav .nav { justify-content: center; padding: 10px 0; } }
@media (max-width: 791px) {
  :root { --top-h: 52px; }
  .only-phone { display: inline-flex !important; }
  .side { transform: translateX(-100%); transition: transform .22s; width: min(300px, 86vw) !important; padding: 0 12px 20px !important; background: var(--surface); top: 0; z-index: 60; }
  body.side-open .side { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; }
  .side .nav { flex-direction: row !important; gap: 18px !important; font-size: .95rem !important; padding: 10px 12px !important; text-align: left !important; }
  .side .nav .dot, .side .nav-h, .side .side .hide-mini { display: flex !important; } .side .nav-foot { display: block !important; }
  .side-head { display: flex !important; align-items: center; gap: 6px; height: var(--top-h); margin: 0 -12px 8px; padding: 0 8px; border-bottom: 1px solid var(--line); }
  .main { margin-left: 0 !important; }
  .view { padding: 8px 0 calc(72px + env(safe-area-inset-bottom)); }
  .top { padding: 0 6px; gap: 4px; }
  .top .brand-name, .top .install-btn, .top .create-btn, .top .signin span { display: none; }   /* Install lives in the banner + menu, Create in the bottom bar */
  .top .signin { padding: 7px 8px; } .top .switch { display: none; } .top .brand .logo { height: 28px; } .top .icon-btn { width: 36px; }
  .top .search { display: none; }
  body.search-open .top .search { display: flex; position: absolute; inset: 0; background: var(--surface); padding: 0 6px; max-width: none; z-index: 2; }
  body.search-open .top .search .search-box { border-radius: 999px; } body.search-open .search-go { display: none; } body.search-open .suggest { right: 0; }
  .ver-badge { font-size: .66rem; padding: 4px 6px; }
  .grid, .grid.dense { grid-template-columns: 1fr; gap: 18px; }
  .card .thumb { border-radius: 0; }
  .card .meta { padding: 0 12px; }
  .card .more { right: 4px; }
  .card.list { flex-direction: column; gap: 8px; } .card.list .thumb { width: 100%; max-width: none; } .card.list .desc { display: none; }
  .card.row-sm .thumb { width: 140px; border-radius: 8px; } .card.row-sm { padding: 0 8px; }
  .chips { padding: 6px 12px 10px; top: var(--top-h); }
  .page-h, .lib-row, .hist-day, .filters, .tabs, .ch-head, .results .card.list .meta, .settings, .legal, .auth, .comments, .w-title, .w-row, .desc-box, .autoplay, .pl-panel, .stats, .chart, .panel { margin-left: 12px; margin-right: 12px; }
  .pl-page, .studio .scontent { padding-left: 0; padding-right: 0; }
  .watch { gap: 12px; } .player-wrap { border-radius: 0; position: sticky; top: var(--top-h); z-index: 20; max-height: 56vw; }
  .player-wrap.vertical { max-height: 70vh; }
  .w-title { font-size: 1.05rem; } .w-actions { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 4px; } .w-actions .btn { flex: 0 0 auto; }
  .w-ch { width: 100%; }
  .side-col .card.row-sm { padding: 0 12px; }
  .mini { right: 0; left: 0; bottom: calc(56px + env(safe-area-inset-bottom)); width: auto; border-radius: 0; grid-template-columns: 120px 1fr auto auto; align-items: center; }
  .mini .mini-video { aspect-ratio: 16/9; } .mini > .icon-btn { position: static; color: var(--ink); background: transparent; }
  .shorts { margin: -8px 0 calc(-72px - env(safe-area-inset-bottom)); height: calc(100vh - var(--top-h) - 56px); }
  .short-item { height: calc(100vh - var(--top-h) - 56px); gap: 0; } .short-frame { height: 100%; border-radius: 0; width: 100%; aspect-ratio: auto; }
  .s-side { position: absolute; right: 8px; bottom: 90px; padding: 0; } .shorts-nav { display: none; }
  .s-comments { width: 100%; top: 30%; border-radius: 16px 16px 0 0; }
  .banner { border-radius: 0; aspect-ratio: 3 / 1; } .ch-head { flex-direction: column; text-align: center; } .ch-head .av-xl { width: 90px; height: 90px; } .ch-head h1 { justify-content: center; }
  .modal { max-width: none; border-radius: 16px 16px 0 0; align-self: end; max-height: 92vh; } .scrim { padding: 0; align-items: end; }
  .studio { grid-template-columns: 1fr; margin: -8px 0; } .studio .snav { position: static; height: auto; display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px; gap: 4px; }
  .studio .snav .nav { flex-direction: column; gap: 2px; font-size: .62rem; padding: 6px 8px; width: auto; min-width: 64px; } .studio .snav .nav span { display: block; } .studio .snav .nav-sep { display: none; }
  .studio .scontent { padding: 12px 12px 80px; }
  .tbl th, .tbl td { padding: 8px; } .vrow .acts { opacity: 1; }
  .thumbs-pick { grid-template-columns: repeat(2, 1fr); }
  .end-screen { grid-template-columns: repeat(2, 1fr); padding: 16px; gap: 6px; } .end-screen .card .sub { display: none; }
  .install-banner { width: 100%; left: 0; transform: none; bottom: calc(56px + env(safe-area-inset-bottom)); border-radius: 0; }
  .toasts { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .plyr .btns button { width: 36px; height: 36px; } .plyr .time { font-size: .74rem; margin: 0 4px; } .plyr .vol { display: none; }
  .filters { grid-template-columns: repeat(2, 1fr); }
}
@media (hover: none) { .card .more, .vrow .acts { opacity: 1; } }
@media print { .top, .side, .bottom-nav, .mini { display: none !important; } .main { margin: 0 !important; } }
