/* ---------- tokens ---------- */
/* Dark is the default look; light is chosen in Settings (data-theme="light"). */
:root {
  --chart: #00D8F0;
  --bg: #0B0B0C; --surface: #141416; --sunk: #1C1C1F; --sunk-2: #27272B; --line: #26262B;
  --line-strong: #3A3A41; --ink: #F6F6F4; --muted: #A1A1A6; --accent: #00E5FF; --accent-hover: #5CF0FF; --accent-ink: #0B0B0C;
  --accent-text: #5CEFFF; --accent-soft: rgba(0,229,255,.13); --danger: #FF6B5B; --ok: #5FD38A;
  --grad: linear-gradient(135deg, #7DFBFF 0%, #00E5FF 55%, #00B4D8 100%);
  --glow: 0 8px 28px rgba(0,229,255,.35);
  --topbar: rgba(11,11,12,.78);
  --shadow: 0 16px 40px rgba(0,0,0,.6);
  --is-dark: 1;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --side-w: 236px; --top-h: 64px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --chart: #0091A8;
  --bg: #FAFAF8; --surface: #FFFFFF; --sunk: #F1F0EE; --sunk-2: #E7E5E2; --line: #E6E4E0;
  --line-strong: #CFCCC7; --ink: #0B0B0C; --muted: #5E5E63; --accent: #00C8E0; --accent-hover: #00B4CC; --accent-ink: #0B0B0C;
  --accent-text: #007A8F; --accent-soft: #DDF9FC; --danger: #C21807; --ok: #1F7A3A;
  --glow: 0 8px 24px rgba(0,180,210,.30);
  --topbar: rgba(250,250,248,.82);
  --shadow: 0 16px 36px rgba(0,0,0,.12);
  --is-dark: 0;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
html { min-height: 100%; }
body { min-height: 100vh; min-height: 100dvh; font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #000; padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.status { color: var(--muted); padding: 60px 0; text-align: center; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 30; height: calc(var(--top-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0; display: flex; align-items: center; gap: 12px;
  background: var(--bg); border-bottom: 3px solid var(--accent);
}
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font: 800 24px/1 var(--display); letter-spacing: -.03em; }
.mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--sunk); }
.search { flex: 1 1 auto; max-width: 620px; margin-inline: auto; display: flex; min-width: 0; }
.search input { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--line); border-right: 0; background: var(--surface); border-radius: 999px 0 0 999px; padding: 0 18px; }
.search input:focus { outline: none; border-color: var(--accent); }
.search-btn { width: 60px; height: 42px; border: 1px solid var(--line); background: var(--sunk); border-radius: 0 999px 999px 0; cursor: pointer; display: grid; place-items: center; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: grid; gap: 2px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; text-decoration: none; background: none; border: 0; text-align: left; cursor: pointer; width: 100%; }
.menu a:hover, .menu button:hover { background: var(--sunk); }
.menu .who { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu .who b { display: block; }

/* ---------- buttons & fields ---------- */
.btn { border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none; line-height: 1.3; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-ghost { background: var(--sunk); color: var(--ink); }
.btn-ghost:hover { background: var(--sunk-2); }
.btn-ghost[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 13.5px; }
.field { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.field { resize: vertical; }
label.lbl { display: grid; gap: 6px; font-weight: 600; font-size: 13.5px; }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.err { color: var(--danger); font-size: 14px; margin: 0; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
.side { position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); height: calc(100dvh - var(--top-h) - env(safe-area-inset-top, 0px)); overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.side a { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 10px; text-decoration: none; font-weight: 500; }
.side a:hover, .side .navlink:hover { background: var(--sunk); }
.side .navlink { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 10px; font-weight: 500; background: none; border: 0; cursor: pointer; width: 100%; text-align: left; }
.side a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.side svg { flex: none; }
.side h4 { margin: 16px 12px 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 4px; width: auto; }
.side .foot { margin-top: auto; padding: 14px 12px 4px; font-size: 12px; color: var(--muted); }
.side .subs a { padding: 6px 12px; }
.side .side-note { margin: 0; padding: 4px 12px 8px; }
.plain { text-decoration: none; }
@media (min-width: 901px) {
  .shell.collapsed { grid-template-columns: 76px minmax(0, 1fr); }
  .shell.collapsed .side { padding: 12px 0; overflow-x: hidden; gap: 4px; }
  .shell.collapsed .side a, .shell.collapsed .side .navlink { flex-direction: column; justify-content: center; gap: 5px; font-size: 10px; line-height: 1.2; padding: 14px 2px; text-align: center; width: 100%; min-width: 0; }
  .shell.collapsed .side a span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shell.collapsed .side .mh, .shell.collapsed .side h4, .shell.collapsed .side hr, .shell.collapsed .side .subs, .shell.collapsed .side .foot, .shell.collapsed .side .side-note { display: none; }
}
main { padding: 16px 24px 64px; min-width: 0; outline: none; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: 270px; z-index: 40; background: var(--bg); transform: translateX(-100%); transition: transform .2s; padding-top: calc(16px + env(safe-area-inset-top, 0px)); border-right: 1px solid var(--line); }
  .side.open { transform: none; }
  main { padding: 12px 16px 64px; }
}
@media (min-width: 901px) { body:not(.watch-mode) .scrim { display: none !important; } }
/* Watch page: like YouTube, the menu becomes a slide-out drawer so the video gets the full width */
body.watch-mode .shell, body.watch-mode .shell.collapsed { grid-template-columns: minmax(0, 1fr); }
body.watch-mode .side { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: 270px; z-index: 40; background: var(--bg); transform: translateX(-100%); transition: transform .2s; padding: calc(16px + env(safe-area-inset-top, 0px)) 12px 12px; border-right: 1px solid var(--line); visibility: hidden; transition: transform .2s, visibility .2s; }
body.watch-mode .side.open { transform: none; visibility: visible; box-shadow: var(--shadow); }
body.watch-mode .shell.collapsed .side a, body.watch-mode .shell.collapsed .side .navlink { flex-direction: row; gap: 14px; font-size: inherit; padding: 9px 12px; text-align: left; }
body.watch-mode .shell.collapsed .side h4, body.watch-mode .shell.collapsed .side hr, body.watch-mode .shell.collapsed .side .subs, body.watch-mode .shell.collapsed .side .foot, body.watch-mode .shell.collapsed .side .side-note { display: revert; }
body.watch-mode .shell.collapsed .side .mh { display: flex; }
body.watch-mode .shell.collapsed .side a .lf { display: block; }
body.watch-mode main { padding: 20px 24px 64px; }
@media (max-width: 600px) { body.watch-mode main { padding: 0 0 64px; } body.watch-mode .watch > div > :not(.player) , body.watch-mode .up-next { margin-inline: 12px; } body.watch-mode .player { border-radius: 0; } }
@media (max-width: 600px) {
  .logo span:last-child { display: none; }
  .search-btn { width: 46px; }
  .top-actions .btn-label { display: none; }
}

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px; scrollbar-width: none; position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); background: var(--bg); z-index: 5; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 0; background: var(--sunk); border-radius: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap; font-weight: 600; font-size: 14px; }
.chip:hover { background: var(--sunk-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- video grid ---------- */
.page-title { font: 800 clamp(24px, 3vw, 32px)/1.1 var(--display); letter-spacing: -.02em; margin: 8px 0 18px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 16px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; min-width: 0; }
.thumb { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 12px; overflow: hidden; background: var(--sunk); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #000 30%, var(--accent)); }
.card:hover .thumb img { transform: scale(1.04); }
.dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.82); color: #fff; font: 500 12px/1 var(--mono); padding: 4px 6px; border-radius: 5px; }
.badge { position: absolute; left: 8px; top: 8px; background: var(--ink); color: var(--bg); font-size: 11.5px; font-weight: 700; padding: 3px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .04em; }
.card-meta { display: flex; gap: 12px; min-width: 0; }
.card-meta > div { min-width: 0; }
.card h3 { margin: 0 0 4px; font: 600 16px/1.35 var(--body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sub { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.sub a { text-decoration: none; }
.sub a:hover { color: var(--ink); }
.more { display: flex; justify-content: center; padding: 28px 0; }

/* ---------- avatar ---------- */
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 15px/1 var(--display); color: #fff; overflow: hidden; background: var(--ink); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.h0 { background: #00E5FF; color: #000; }
.avatar.h1 { background: #111; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.avatar.h2 { background: #C24100; color: #fff; }
.avatar.h3 { background: #3D3D3D; color: #fff; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.md { width: 40px; height: 40px; }
.avatar.xl { width: 120px; height: 120px; font-size: 48px; }
@media (max-width: 600px) { .avatar.xl { width: 80px; height: 80px; font-size: 32px; } }
.avatar-btn { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }

/* ---------- watch ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 402px; gap: 24px; max-width: 1754px; margin-inline: auto; align-items: start; }
@media (max-width: 1016px) { .watch { grid-template-columns: minmax(0, 1fr); } }
.player { width: 100%; aspect-ratio: 16 / 9; max-height: calc(100dvh - 150px); min-height: 200px; background: #000; border-radius: 12px; display: block; object-fit: contain; }
@media (max-width: 1016px) { .player { max-height: 70dvh; } }
.watch h1 { font: 700 clamp(19px, 2.2vw, 24px)/1.3 var(--display); margin: 14px 0 12px; overflow-wrap: anywhere; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row .grow { flex: 1 1 auto; min-width: 0; }
.chan-line { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.chan-line b { display: block; }
.desc { background: var(--sunk); border-radius: 12px; padding: 12px 14px; margin-top: 14px; }
.desc .text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
.desc .text.clamp { max-height: 4.5em; overflow: hidden; }
.linkish { background: none; border: 0; padding: 0; font-weight: 700; cursor: pointer; margin-top: 6px; }
.comments h2 { font: 700 20px/1.2 var(--display); margin: 26px 0 16px; }
.c-form { display: flex; gap: 12px; margin-bottom: 26px; }
.c-form .col { flex: 1; display: grid; gap: 8px; }
.c-form .actions { display: flex; justify-content: flex-end; gap: 8px; }
.c-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.c-list li { display: flex; gap: 12px; }
.c-list .body { flex: 1; min-width: 0; }
.c-list p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-list .who { font-weight: 700; font-size: 13.5px; text-decoration: none; }
.up-next { min-width: 0; }
@media (max-width: 1016px) {
  .up-next { margin-top: 8px; }
  /* phones/tablets: suggestions right after the video details, comments last (like YouTube) */
  .watch { grid-template-columns: minmax(0, 1fr); }
  .watch { row-gap: 0; }
  .watch > div:first-child { display: contents; }
  .watch .up-next { margin-top: 20px; }
  .watch .up-next { order: 2; }
  .watch .comments { order: 3; }
}
.up-next h2 { font: 700 13px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.up-next .list { display: grid; gap: 10px; }
.mini { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 10px; text-decoration: none; border-radius: 10px; }
.mini:hover h3 { color: var(--accent-text); }
.mini .dur { font-size: 11px; right: 4px; bottom: 4px; }
.mini .thumb { border-radius: 8px; }
.mini h3 { margin: 0 0 4px; font: 600 14.5px/1.3 var(--body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 480px) { .mini { grid-template-columns: 140px minmax(0, 1fr); } }

/* ---------- channel ---------- */
.banner { height: clamp(90px, 16vw, 200px); border-radius: 16px; background:
  repeating-linear-gradient(-45deg, rgba(0,0,0,.14) 0 14px, transparent 14px 28px), linear-gradient(110deg, #000 0%, #000 38%, var(--accent) 100%); }
.chan-head { display: flex; gap: 24px; align-items: center; padding: 20px 0; flex-wrap: wrap; }
.chan-head h1 { font: 800 clamp(26px, 4vw, 38px)/1.05 var(--display); letter-spacing: -.02em; margin: 0 0 6px; }
.chan-head .grow { flex: 1 1 260px; min-width: 0; }
.bio { color: var(--muted); max-width: 70ch; margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { background: none; border: 0; padding: 10px 16px; font-weight: 700; cursor: pointer; border-bottom: 3px solid transparent; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }

/* ---------- forms / pages ---------- */
.narrow { max-width: 440px; margin: 40px auto; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: grid; gap: 16px; }
@media (max-width: 480px) { .panel { padding: 20px; } }
.panel h1 { font: 800 30px/1.05 var(--display); letter-spacing: -.02em; margin: 0; }
.panel .alt { text-align: center; color: var(--muted); margin: 0; }
.panel .alt a { color: var(--accent-text); font-weight: 700; }
.studio { max-width: 1000px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 820px) { .studio-grid { grid-template-columns: minmax(0, 1fr); } }
.stack { display: grid; gap: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .two { grid-template-columns: 1fr; } }
.drop { border: 2px dashed var(--line); border-radius: 16px; padding: 48px 20px; text-align: center; cursor: pointer; display: grid; gap: 8px; justify-items: center; background: var(--surface); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop b { font: 700 20px/1.2 var(--display); }
.drop .ring { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.preview { position: sticky; top: calc(var(--top-h) + 16px); display: grid; gap: 12px; }
.preview video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; }
.thumb-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb-pick button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--sunk); aspect-ratio: 16/9; }
.thumb-pick button[aria-pressed="true"] { border-color: var(--accent); }
.thumb-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.progress { height: 8px; background: var(--sunk); border-radius: 8px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.seg { display: inline-flex; background: var(--sunk); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.settings { max-width: 720px; display: grid; gap: 20px; }
.settings .panel h2 { font: 700 20px/1.2 var(--display); margin: 0; }
.settings .lead { margin: -8px 0 0; }
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .themes { grid-template-columns: 1fr; } }
.theme-card { border: 2px solid var(--line); border-radius: 14px; padding: 10px; background: var(--surface); cursor: pointer; display: grid; gap: 8px; text-align: left; }
.theme-card[aria-pressed="true"] { border-color: var(--accent); }
.theme-card b { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.theme-card .tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); }
.theme-card[aria-pressed="true"] .tick { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.5l4.5-5' stroke='%23000' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: var(--accent); }
.swatch { display: grid; grid-template-rows: 18% 1fr; aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; border: 1px solid rgba(128,128,128,.25); }
.swatch i { display: block; }
.swatch .sbar { display: flex; align-items: center; gap: 5px; padding: 0 8px; border-bottom: 2px solid #00E5FF; }
.swatch .sdot { width: 9px; height: 9px; border-radius: 3px; background: #00E5FF; }
.swatch .sline { height: 5px; border-radius: 3px; width: 40%; }
.swatch .sbody { display: grid; grid-template-columns: 26% 1fr; gap: 6px; padding: 7px; }
.swatch .sside { display: grid; gap: 4px; align-content: start; }
.swatch .sside i { height: 5px; border-radius: 3px; }
.swatch .sside i:first-child { background: #00E5FF !important; }
.swatch .sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; align-content: start; }
.swatch .sgrid i { aspect-ratio: 16 / 9; border-radius: 4px; }
.sw-light { background: #fff; } .sw-light .sline, .sw-light .sside i { background: #000; } .sw-light .sgrid i { background: #E6E6E6; }
.sw-dark { background: #000; } .sw-dark .sline, .sw-dark .sside i { background: #fff; } .sw-dark .sgrid i { background: #262626; }
.sw-system { background: linear-gradient(135deg, #fff 50%, #000 50%); } .sw-system .sline, .sw-system .sside i { background: #888; } .sw-system .sgrid i { background: rgba(136,136,136,.35); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.set-row > div { flex: 1 1 240px; min-width: 0; }
.set-row b { display: block; }
.switch { position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--line); border: 0; cursor: pointer; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.av-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- table (studio list) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--sunk); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.t-video { display: flex; gap: 12px; align-items: center; min-width: 260px; }
.t-video .thumb { width: 120px; flex: none; border-radius: 6px; }
.t-video a { font-weight: 600; text-decoration: none; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--sunk); }
.pill.pub { background: var(--accent-soft); color: var(--accent-text); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.stat b { display: block; font: 800 28px/1.1 var(--display); font-variant-numeric: tabular-nums; }

/* ---------- empty ---------- */
.empty { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px 0; max-width: 1200px; }
.empty h1 { font: 800 clamp(36px, 5.5vw, 68px)/1 var(--display); letter-spacing: -.035em; margin: 0 0 16px; }
.empty h1 em { font-style: normal; color: var(--accent); }
.empty p { color: var(--muted); max-width: 52ch; font-size: 17px; margin: 0 0 22px; }
.screen { aspect-ratio: 16/10; border-radius: 18px; background: var(--sunk); padding: 16px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 2fr 1fr; gap: 10px; }
.screen div { border-radius: 10px; background: var(--sunk-2); }
.screen div:first-child { grid-column: span 3; background: linear-gradient(110deg, #000 35%, var(--accent)); position: relative; }
.screen div:first-child::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-left: 30px solid #fff; border-top: 18px solid transparent; border-bottom: 18px solid transparent; }
@media (max-width: 760px) { .empty { grid-template-columns: 1fr; padding: 20px 0; } }

/* ---------- modal ---------- */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog .panel { border: 0; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow); }
.toast.bad { background: var(--danger); color: #fff; }

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

/* ---------- storage / danger zone ---------- */
.danger-zone { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:disabled { opacity: .45; }
.storage-total { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.storage-total b { font: 800 30px/1 var(--display); }
.storage-table { min-width: 0; }
.storage-table td { padding: 8px 12px; }
.clear-form { border-top: 1px solid var(--line); padding-top: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- social sign-in ---------- */
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.social { display: grid; gap: 10px; }
.social-btn { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 11px 18px; }
.social-btn:hover { background: var(--sunk); }
.social-apple { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.social-apple:hover { background: var(--ink); opacity: .88; }
.social-facebook { background: #1877F2; color: #fff; border-color: #1877F2; }
.social-facebook:hover { background: #166FE5; }
main:focus, main:focus-visible { outline: none; }

/* ---------- hover preview ---------- */
.thumb video.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; opacity: 0; transition: opacity .25s; pointer-events: none; }
.thumb.previewing video.preview { opacity: 1; }
.thumb.previewing { border-radius: 0; }
.card .thumb { transition: border-radius .2s; }
.thumb.previewing .dur { opacity: 0; }
.pv-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.3); opacity: 0; z-index: 2; }
.pv-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.thumb.previewing .pv-bar { opacity: 1; }
.card:hover .thumb.previewing img { transform: none; }
.unmute { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700; background: var(--accent); color: #000; cursor: pointer; }

/* ---------- recommendations UI ---------- */
.card { position: relative; }
.dismissed { border: 1px dashed var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; min-height: 160px; }
.dismissed p { margin: 0; }
.survey { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 55; width: min(320px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 14px; box-shadow: var(--shadow); padding: 16px 18px; display: grid; gap: 8px; }
.survey .stars { display: flex; gap: 4px; }
.survey .stars button { border: 0; background: none; font-size: 30px; line-height: 1; color: var(--line); cursor: pointer; padding: 2px; }
.survey .stars button.on { color: var(--accent); }
.survey-ends { display: flex; justify-content: space-between; }
.survey-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; }

/* ---------- channel analytics ---------- */
.studio-tabs a { text-decoration: none; background: none; border: 0; padding: 10px 16px; font-weight: 700; border-bottom: 3px solid transparent; color: var(--muted); }
.studio-tabs a[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
.an-body { display: grid; gap: 20px; }
.an-body[aria-busy="true"] { opacity: .55; transition: opacity .2s; }
.an-body .panel { gap: 12px; }
.an-body .panel h2 { font: 700 18px/1.2 var(--display); margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kpi { text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface); cursor: pointer; display: grid; gap: 4px; align-content: start; }
.kpi:hover { border-color: var(--muted); }
.kpi[aria-selected="true"] { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi b { font: 800 26px/1.1 var(--display); }
.delta { font-size: 12px; font-weight: 600; color: var(--muted); }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }
.chart-wrap { position: relative; }
.chart { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11.5px; font-family: var(--body); font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--chart); fill-opacity: .1; stroke: none; }
.chart .dot { fill: var(--chart); stroke: var(--surface); stroke-width: 2; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: crosshair; outline: none; }
.chart .hit:focus-visible { stroke: var(--accent); stroke-width: 2; }
.tip { position: absolute; transform: translate(-50%, -100%); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 12px; pointer-events: none; display: grid; gap: 2px; text-align: center; white-space: nowrap; }
.tip-v { font: 700 16px/1.2 var(--body); font-variant-numeric: tabular-nums; }
.tip-d { font-size: 12px; color: var(--muted); }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 56px; gap: 10px; align-items: center; }
.bar-label { font-size: 13.5px; overflow-wrap: anywhere; }
.bar-track { height: 12px; }
.bar-track i { display: block; height: 100%; min-width: 2px; background: var(--chart); border-radius: 0 4px 4px 0; }
.bar-val { text-align: right; font-size: 13.5px; font-weight: 600; }
.mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mini-stats b { display: block; font: 800 22px/1.15 var(--display); }
.t-video > a:last-child { font-weight: 600; text-decoration: none; }

/* ---------- disk ---------- */
.storage-total b.path, .path { font: 500 13px/1.4 var(--mono); overflow-wrap: anywhere; }
.disk { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 4px 0 12px; }
.disk-bar { height: 10px; }
.disk-bar.low i { background: var(--danger); }
.storage-total .sub b:not(.path) { font: 700 13.5px/1.4 var(--body); }

/* ---------- notifications ---------- */
.bell { position: relative; }
.bell-dot { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #000; font: 700 11px/18px var(--body); text-align: center; border: 2px solid var(--bg); box-sizing: content-box; }
.notif-menu { width: min(420px, calc(100vw - 24px)); padding: 0; gap: 0; max-height: min(560px, calc(100dvh - 90px)); overflow: auto; right: -52px; }
.notif-head { padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.notif-empty { padding: 20px 16px; margin: 0; }
.notif-list { display: grid; padding: 6px; }
.menu .notif { align-items: flex-start; gap: 12px; padding: 10px; }
.notif.unread { background: var(--accent-soft); }
.notif-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; display: grid; gap: 2px; }
.notif-thumb { width: 86px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; flex: none; }

/* ---------- save dialog ---------- */
.dlg { border: 1px solid var(--line); border-radius: 16px; padding: 0; background: var(--surface); color: var(--ink); width: min(420px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.dlg::backdrop { background: rgba(0,0,0,.55); }
.dlg-body { padding: 22px; display: grid; gap: 14px; }
.dlg-body h2 { font: 700 20px/1.2 var(--display); margin: 0; }
.dlg-body label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.save-list { display: grid; gap: 2px; max-height: 320px; overflow: auto; }
.dlg-body .check { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 8px; cursor: pointer; font-weight: 500; }
.save-list .check:hover { background: var(--sunk); }
.save-list .check input { margin: 0; }
.save-list .check span:first-of-type { flex: 1; overflow-wrap: anywhere; }
.new-pl { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- cards & rating ---------- */
.seg { display: inline-flex; }
.seg .btn:first-child { border-radius: 999px 0 0 999px; position: relative; }
.seg .btn:first-child::after { content: ""; position: absolute; right: 0; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.seg .btn:last-child { border-radius: 0 999px 999px 0; }

/* ---------- playlists ---------- */
.page-row { margin-bottom: 18px; }
.page-row .page-title { margin: 0; }
.pl-card h3 { margin: 12px 0 4px; }
.linky { display: inline-block; margin-top: 4px; font-weight: 600; text-decoration: none; }
.linky:hover { color: var(--accent-text); }
.pl-thumb .ph { color: #fff; }
.pl-count { position: absolute; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 6px 10px; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; font-size: 12.5px; font-weight: 600; }
.pl-page { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .pl-page { grid-template-columns: minmax(0, 1fr); } }
.pl-hero { position: sticky; top: calc(var(--top-h) + 16px); display: grid; gap: 12px; padding: 20px; border-radius: 18px; background: linear-gradient(180deg, var(--accent-soft), var(--sunk) 70%); }
@media (max-width: 900px) { .pl-hero { position: static; } }
.pl-hero h1 { font: 800 26px/1.15 var(--display); margin: 0; overflow-wrap: anywhere; }
.pl-desc { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pl-items, .pl-panel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pl-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px; border-radius: 12px; }
.pl-item:hover { background: var(--sunk); }
.pl-n { color: var(--muted); font-size: 13px; text-align: center; }
.pl-tools { display: flex; }
.pl-tools .icon-btn:disabled { opacity: .3; cursor: default; }
.pl-item .mini { grid-template-columns: 160px minmax(0, 1fr); }
@media (max-width: 600px) { .pl-item .mini { grid-template-columns: 120px minmax(0, 1fr); } }
.pl-panel { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 18px; }
.pl-panel header { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 12px 12px 10px 16px; background: var(--sunk); }
.pl-panel h2 { font: 700 17px/1.25 var(--display); margin: 0; text-transform: none; letter-spacing: 0; color: var(--ink); }
.pl-panel .icon-btn[aria-pressed="true"] { color: var(--accent-text); background: var(--accent-soft); }
.pl-panel-list { max-height: 380px; overflow: auto; padding: 6px 0; gap: 0; }
.pl-panel-list .mini { grid-template-columns: 22px 100px minmax(0, 1fr); align-items: center; padding: 5px 10px 5px 4px; border-radius: 0; }
.pl-panel-list .mini h3 { font-size: 13.5px; }
.pl-panel-list li[aria-current="true"] .mini { background: var(--accent-soft); }

/* ---------- comments ---------- */
.c-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 26px 0 16px; }
.c-head h2 { margin: 0; }
.c-sort { display: flex; gap: 6px; }
.c-sort .chip { padding: 5px 12px; font-size: 13px; }
.c-actions { display: flex; align-items: center; gap: 4px; margin-top: 4px; margin-left: -8px; flex-wrap: wrap; }
.c-act { border: 0; background: none; border-radius: 999px; padding: 6px 10px; font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.c-act:hover { background: var(--sunk); }
.c-act[aria-pressed="true"] { color: var(--accent-text); }
.c-list .who.creator { background: var(--ink); color: var(--bg); padding: 1px 8px; border-radius: 999px; }
.pin-note { display: flex; align-items: center; gap: 4px; font-size: 12.5px; margin-bottom: 2px; }
.replies-toggle { border: 0; background: none; color: var(--accent-text); font-weight: 700; cursor: pointer; padding: 6px 10px; margin-left: -10px; border-radius: 999px; }
.replies-toggle:hover { background: var(--accent-soft); }
.c-list.replies { margin-top: 8px; gap: 14px; }
.reply-form { margin: 10px 0 6px; }
.c-list li.flash > .body { animation: flash 2.4s ease-out; border-radius: 8px; }
@keyframes flash { 0%, 40% { background: var(--accent-soft); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .c-list li.flash > .body { animation: none; background: var(--accent-soft); } }

/* ---------- community ---------- */
.community, #postList { display: grid; gap: 16px; max-width: 760px; }
.post-form, .post { gap: 12px; padding: 18px 20px; }
.post-form select { margin-top: 6px; }
.post-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.post .mini { grid-template-columns: 200px minmax(0, 1fr); background: var(--sunk); padding: 8px; }
@media (max-width: 600px) { .post .mini { grid-template-columns: 120px minmax(0, 1fr); } }

/* ---------- list rows, search filters, channel home, shelves ---------- */
.page-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lrows { display: grid; gap: 16px; max-width: 1100px; }
.card.lrow { display: grid; grid-template-columns: minmax(200px, 360px) minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.lrow-thumb { position: relative; display: block; }
.lrow .rank { position: absolute; left: -4px; top: -4px; z-index: 4; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; background: var(--accent); color: #000; font: 800 14px/28px var(--display); text-align: center; }
.lrow-meta { min-width: 0; display: grid; gap: 4px; align-content: start; }
.lrow h3 { font-size: 18px; margin: 0; }
.lrow-ch { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; width: fit-content; }
.lrow-desc { margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
@media (max-width: 700px) {
  .card.lrow { grid-template-columns: 150px minmax(0, 1fr); gap: 10px; }
  .lrow h3 { font-size: 15px; }
  .lrow-desc, .lrow-ch { display: none; }
}
.view-toggle .btn { padding: 8px 12px; }
.vid-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.vid-bar .chips { flex: 1; padding: 0; position: static; }
.pill-n { background: var(--accent); color: #000; border-radius: 999px; padding: 0 7px; font-size: 12px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin-bottom: 20px; }
.filters h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.flt { display: block; border: 0; background: none; padding: 5px 0; cursor: pointer; color: var(--muted); font-size: 14px; text-align: left; }
.flt:hover { color: var(--ink); }
.flt[aria-pressed="true"] { color: var(--ink); font-weight: 700; }
.ch-result { display: grid; grid-template-columns: minmax(200px, 360px) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 8px 0 20px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.ch-result-av { justify-self: center; }
.ch-result h3 { margin: 0 0 4px; font: 700 20px/1.2 var(--display); }
@media (max-width: 700px) {
  .ch-result { grid-template-columns: 72px minmax(0, 1fr); }
  .ch-result .avatar.xl { width: 72px; height: 72px; font-size: 28px; }
  .ch-result > .btn { grid-column: 2; justify-self: start; }
  .page-row .page-title { flex-basis: 100%; }
}
.card.featured { display: grid; grid-template-columns: minmax(260px, 440px) minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 24px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.featured-meta { display: grid; gap: 6px; }
.featured h2 { margin: 0; font: 700 22px/1.25 var(--display); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
@media (max-width: 700px) { .card.featured { grid-template-columns: 1fr; } }
.shelf { padding: 20px 0; border-bottom: 1px solid var(--line); }
.shelf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.shelf-head h2 { margin: 0; font: 700 20px/1.2 var(--display); }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, calc((100% - 48px) / 4)); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.shelf-row > * { scroll-snap-align: start; }
@media (max-width: 700px) { .shelf-row { grid-auto-columns: 72%; } }

/* ---------- subscribe button with bell ---------- */
.subctl { display: inline-flex; }
.sub-on { gap: 6px; padding-inline: 14px 12px; }
.bell-menu { left: 0; right: auto; min-width: 290px; z-index: 40; }
.bell-menu button { align-items: flex-start; }
.bell-menu button > span { display: grid; gap: 1px; }
.bell-menu button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent-text); }
.bell-menu button[aria-checked="true"] .sub { color: var(--accent-text); }
.bell-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
@media (max-width: 600px) { .bell-menu { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; min-width: 0; } }
.chan-head .bell-menu, .ch-result .bell-menu { left: auto; right: 0; }

/* ---------- watch layout with the Havoc player (default + theater) ---------- */
.watch { grid-template-areas: "player aside" "main aside"; grid-template-rows: auto 1fr; row-gap: 0; }
.w-player { grid-area: player; min-width: 0; }
.w-main { grid-area: main; min-width: 0; }
.w-aside { grid-area: aside; }
@media (max-width: 1016px) { .watch { grid-template-areas: "player" "main" "aside"; } }
body.hp-theater .watch { grid-template-areas: "player player" "main aside"; max-width: none; }
body.hp-theater .w-player { margin: -20px -24px 0; background: #000; }
body.hp-theater .w-player .hp { border-radius: 0; max-height: calc(100dvh - 140px); }
body.hp-theater .w-player .hp .hp-video, body.hp-theater .w-player .hp-bottom { border-radius: 0; }
body.hp-theater .w-player .hp-ambient { display: none; }
@media (max-width: 1016px) { body.hp-theater .watch { grid-template-areas: "player" "main" "aside"; } body.hp-theater .w-player { margin: 0; } }
.w-player .hp-holder { margin-bottom: 4px; }
.share-row { display: flex; gap: 8px; }
.share-row .field { flex: 1; min-width: 0; font: 500 13.5px/1.3 var(--mono); }
.dlg-body .share-at { display: flex; align-items: center; gap: 8px; font-weight: 500; }
@media (max-width: 600px) { body.watch-mode .watch > .w-player > .hp-holder { margin-inline: 0; } }
.proc-note { margin: 6px 0 0; }
.proc-tag { display: block; margin-top: 4px; }

/* ---------- reporting & moderation ---------- */
.rep-reasons { border: 0; padding: 0; margin: 0; display: grid; gap: 2px; }
.rep-reasons legend { margin-bottom: 6px; }
.rep-reasons .check { padding: 7px 6px; border-radius: 8px; font-weight: 500; }
.rep-reasons .check:hover { background: var(--sunk); }
.mod-list { display: grid; gap: 14px; max-width: 860px; }
.mod-item { gap: 10px; padding: 18px 20px; }
.mod-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mod-target { display: flex; align-items: center; gap: 12px; font-weight: 600; overflow-wrap: anywhere; }
.mod-target img { width: 140px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; }
.mod-reasons { margin: 0; padding-left: 18px; }
.mod-details { margin: 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--sunk); border-radius: 0 8px 8px 0; font-size: 14px; overflow-wrap: anywhere; }

/* ---------- legal pages, footer, auth extras ---------- */
.legal { max-width: 760px; line-height: 1.65; }
.legal h1 { font: 800 clamp(26px, 3vw, 36px)/1.1 var(--display); margin: 8px 0 6px; }
.legal h2 { font: 700 20px/1.25 var(--display); margin: 28px 0 8px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent-text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.forgot { margin: -6px 0 0; text-align: right; font-size: 13.5px; }
.forgot a, .consent a { color: var(--accent-text); font-weight: 600; }
.consent { margin: 0; text-align: center; }
.side .foot-links a { display: inline; padding: 0; font-size: 12.5px; min-height: 0; border-radius: 0; background: none; }

/* ---------- Havoc Ads ---------- */
.ads-page { display: grid; gap: 22px; max-width: 1200px; }
.ads-page .page-row, .ads-page .page-title { margin-bottom: 0; }
.ads-page h2 { font: 700 20px/1.25 var(--display); margin: 0; }
.ads-sec { display: grid; gap: 12px; }
.kpi.static { cursor: default; }
.kpi.static:hover { border-color: var(--line); }
.note { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--sunk); font-size: 14px; }
.warn-note { background: var(--accent-soft); color: var(--ink); border-left: 3px solid var(--accent); }
.pill.warn { background: var(--accent-soft); color: var(--accent-text); }
.pill.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.ads-table { min-width: 860px; }
.ads-table td { vertical-align: top; }
.ads-table td .sub { display: block; }
.ad-cell { display: flex; gap: 12px; align-items: flex-start; min-width: 260px; }
.ad-cell video, .ad-novid { width: 112px; aspect-ratio: 16 / 9; border-radius: 8px; background: #000; object-fit: cover; flex: none; display: block; }
.ad-novid { background: linear-gradient(135deg, var(--sunk-2), var(--sunk)); }
.ad-cell b { display: block; }
.ad-note { margin-top: 6px; font-size: 13px; }
.ad-actions { gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.progress.mini { height: 5px; margin: 6px 0 2px auto; width: 120px; }
.ads-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.ads-two .panel { padding: 22px; gap: 12px; }
.ads-empty { justify-items: start; gap: 8px; padding: 22px; }
.ads-empty p { margin: 0; max-width: 60ch; }
.ads-how ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.ads-funds form { align-items: end; }
.ads-funds form .lbl { flex: 1 1 160px; }
.fund-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.fund-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fund-list li:last-child { border-bottom: 0; }
.fund-list.big li { padding: 12px 0; }
.fund-list .grow { flex: 1 1 200px; min-width: 0; }
.fund-list .grow .sub { display: block; }
details summary { cursor: pointer; padding: 4px 0; }
.cat-pick { position: static; flex-wrap: wrap; padding: 0; overflow: visible; background: none; }
.cat-pick .chip { font-size: 13px; padding: 6px 12px; }
.place-pick { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.place-pick legend { font-weight: 600; font-size: 13.5px; padding: 0; margin-bottom: 4px; }
.place-pick .check { font-weight: 500; }
.studio .lbl > span:first-child { font-weight: 600; font-size: 13.5px; }
.ad-preview .hp { border-radius: 12px; overflow: hidden; }
.ad-preview .hp-ad-video { border-radius: 0; }
.ad-preview .hp-ad-card, .ad-preview .hp-ad-skip { pointer-events: none; }
.ad-preview .hp-ad-skip { bottom: 56px; }
.ad-preview .hp-ad-tag { bottom: 54px; }
.ad-review-in { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ad-review-in video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; }
.ad-review .stack-s { display: grid; gap: 6px; }
.ad-review p { margin: 0; overflow-wrap: anywhere; }
.ad-head-line { font: 700 17px/1.3 var(--display); }
@media (max-width: 700px) { .ad-review-in { grid-template-columns: 1fr; } }
.page-row .grow { flex: 1 1 auto; min-width: 0; }
.ads-table .pill, .ads-table td:nth-child(2) { white-space: nowrap; }

/* Google display ads */
.gad { position: relative; display: grid; gap: 4px; min-width: 0; }
.gad-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gad .adsbygoogle { display: block; min-height: 90px; }
.gad-side { margin-bottom: 16px; }
.gad-side .adsbygoogle { min-height: 250px; }
.gad-feed .adsbygoogle { aspect-ratio: 16 / 9; min-height: 0; }
.mono { font-family: var(--mono, ui-monospace, monospace); font-size: 13px; }
#gSet hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.ads-set { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.mono { font-weight: 400; }
@media (max-width: 480px) { .ads-set { grid-template-columns: 1fr; } }
.key-scope { width: auto; }
.key-copy code { overflow-wrap: anywhere; background: var(--surface); padding: 8px 10px; border-radius: 8px; }


/* ================= Piggier premium look ================= */
body { background: radial-gradient(1200px 500px at 85% -10%, rgba(0,229,255,.09), transparent 60%), var(--bg); background-attachment: fixed; }
:root[data-theme="light"] body { background: radial-gradient(1200px 500px at 85% -10%, rgba(0,200,224,.07), transparent 60%), var(--bg); }
.top { background: var(--topbar); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad); opacity: .9; }
.logo { gap: 10px; font: 800 25px/1 var(--display); letter-spacing: -.04em; }
.logo .mark { width: 40px; height: 40px; display: block; background: none; border-radius: 0; filter: drop-shadow(0 0 10px rgba(0,229,255,.45)); }
.logo .mark img { width: 100%; height: 100%; display: block; }
.logo .mark svg { width: 100%; height: 100%; display: block; }
.logo .wm i { font-style: normal; color: var(--accent); }
.search input { height: 44px; background: var(--sunk); border-color: transparent; padding-left: 20px; transition: border-color .15s, background .15s; }
.search input:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-btn { height: 44px; background: var(--sunk-2); border-color: transparent; }
.search-btn:hover { background: var(--grad); color: #0B0B0C; }
.btn { transition: transform .12s, box-shadow .2s, background .2s; }
.btn-primary { background: var(--grad); color: #0B0B0C; }
.btn-primary:hover { background: var(--grad); box-shadow: var(--glow); transform: translateY(-1px); }
.btn-primary:active { transform: none; }
.side a, .side .navlink { border-radius: 12px; transition: background .15s, color .15s; }
.side a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); position: relative; }
.side a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); }
.side a[aria-current="page"] svg { color: var(--accent); }
.chip { border-radius: 999px; background: var(--sunk); padding: 8px 16px; transition: background .15s, color .15s, box-shadow .2s; }
.chip[aria-pressed="true"] { background: var(--grad); color: #0B0B0C; box-shadow: var(--glow); }
.chips { background: transparent; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.thumb { border-radius: 16px; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .25s, transform .25s; }
.card:hover .thumb, .card:focus-visible .thumb { box-shadow: 0 0 0 2px var(--accent), var(--glow); transform: translateY(-3px); }
.card h3 { font-weight: 700; letter-spacing: -.01em; }
.page-title { letter-spacing: -.035em; }
.panel, .kpi, .stat, .menu, dialog { border-color: var(--line); }
.panel { background: linear-gradient(180deg, var(--surface), var(--surface)); border-radius: 20px; }
.menu { background: var(--surface); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-radius: 16px; }
.avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line); }
.hp { border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.hp .hp-video, .hp-bottom { border-radius: inherit; }
.toast { border-radius: 14px; }
::selection { background: rgba(0,229,255,.35); }
* { scrollbar-color: var(--sunk-2) transparent; }
@media (prefers-reduced-motion: reduce) { .btn, .thumb, .chip { transition: none; } .card:hover .thumb { transform: none; } }



/* Invites admin */
.wide-panel { max-width: 760px; }
.switch-row { align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 12px; margin: 8px 0 20px; cursor: pointer; }
.switch-row input { margin-top: 4px; accent-color: #00E5FF; width: 18px; height: 18px; }
.inv-form { display: grid; gap: 10px; margin-bottom: 24px; }
.inv-form .row { gap: 12px; flex-wrap: wrap; }
.fund-list .mono { word-break: break-all; }

/* ---------- Light theme: pink Piggier brand ---------- */
:root[data-theme="light"] {
  --chart: #E0206F;
  --bg: #FFFFFF; --surface: #FFFFFF; --sunk: #F5F4F5; --sunk-2: #EAE8EA; --line: #ECE9EC;
  --accent: #FC3487; --accent-hover: #E61F72; --accent-ink: #FFFFFF;
  --accent-text: #C8105E; --accent-soft: #FFE4EF;
  --grad: linear-gradient(135deg, #FF6FAE 0%, #FC3487 55%, #E0186A 100%);
  --glow: 0 8px 24px rgba(252,52,135,.30);
  --topbar: rgba(255,255,255,.85);
}
.logo .mark .logo-light{ display: none; }
:root[data-theme="light"] .logo .mark .logo-dark{ display: none; }
:root[data-theme="light"] .logo .mark .logo-light { display: block; }

:root[data-theme="light"] .logo .mark { filter: none; }
:root[data-theme="light"] body { background: radial-gradient(1200px 500px at 85% -10%, rgba(252,52,135,.06), transparent 60%), var(--bg); background-attachment: fixed; }
:root[data-theme="light"] ::selection { background: rgba(252,52,135,.25); }
:root[data-theme="light"] .avatar.h0 { background: #FC3487; color: #fff; }
:root[data-theme="light"] .switch-row input { accent-color: #FC3487; }

:root[data-theme="light"] .btn-primary, :root[data-theme="light"] .chip[aria-pressed="true"], :root[data-theme="light"] .chip.on { color: #FFFFFF; }
.share-row { gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* Tidy sidebar footer: two even columns, one-line tagline */
.side .foot { border-top: 1px solid var(--line); margin-left: 12px; margin-right: 12px; padding: 14px 0 6px; }
.side .foot-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-bottom: 14px; }
.side .foot-links a { font-size: 12.5px; line-height: 1.3; white-space: nowrap; }

 

/* ----- admin mailbox ----- */
.mail-wrap { max-width: 1040px; }
.mail-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.mail-search { gap: 8px; margin: 10px 0; }
.mail-cols { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.mail-list { display: flex; flex-direction: column; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 12px; overflow: hidden; max-height: 70vh; overflow-y: auto; }
.mail-row { display: grid; gap: 2px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line, rgba(127,127,127,.25)); padding: 10px 12px; cursor: pointer; color: inherit; font: inherit; }
.mail-row:hover, .mail-row.on { background: rgba(127,127,127,.12); }
.mail-row.unread .mr-from, .mail-row.unread .mr-subj { font-weight: 700; }
.mr-top { display: flex; justify-content: space-between; gap: 8px; }
.mr-from, .mr-subj, .mr-snip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-when { color: var(--muted, #8aa); font-size: 12px; white-space: nowrap; }
.mr-snip { color: var(--muted, #8aa); font-size: 13px; }
.mail-read { min-width: 0; }
.mail-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 12px; max-height: 60vh; overflow: auto; }
.mail-body-in { min-height: 160px; resize: vertical; }
@media (max-width: 820px) { .mail-cols { grid-template-columns: minmax(0, 1fr); } .mail-list { max-height: 40vh; } }

/* Watch page: bigger "Up next" thumbnails, like YouTube */
@media (min-width: 1017px) {
  .up-next .list { gap: 12px; }
  .up-next .mini { grid-template-columns: minmax(0, 58%) minmax(0, 1fr); gap: 12px; }
  .up-next .mini .thumb { border-radius: 12px; }
  .up-next .mini h3 { font-size: 15px; }
  .up-next .mini .dur { font-size: 12px; right: 6px; bottom: 6px; }
}

/* ---------- phones & tablets: roomier header, no sideways scroll ---------- */
@media (max-width: 600px) {
  .top { gap: 6px; }
  #backBtn { display: none; }               /* the phone's own back gesture does this */
  .top-actions [data-theme-toggle] { display: none; } /* theme is in the profile menu */
  .search { margin-inline: 0; }
  .search input { padding-left: 14px; font-size: 16px; } /* 16px stops iPhone zooming in when you tap search */
  .logo .mark { width: 36px; height: 36px; }
  .watch .actions, .watch .w-main [class*="action"] { flex-wrap: wrap; }
}
@media (max-width: 1016px) and (min-width: 601px) {
  .up-next .list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; } /* iPad / tablet: two columns */
}
html, body { overflow-x: clip; }
input, select, textarea { font-size: max(16px, 1em); } /* iOS Safari: no zoom-on-focus */
button, .btn, .chip, .icon-btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (pointer: coarse) { .icon-btn, .btn, .chip { min-height: 40px; } }


/* ---------- hashtags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft, rgba(0,229,255,.14)); color: var(--accent-text, var(--accent)); font: 600 13px/1.2 var(--body); text-decoration: none; }
.tag:hover { text-decoration: underline; }

/* ---------- trim tool ---------- */
.trim { margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--sunk); display: grid; gap: 10px; }
.trim h3 { margin: 0; font: 800 16px/1.2 var(--display); }
.trim .hint { margin: 0; }
.trim-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 52px; align-items: center; gap: 10px; font-size: 14px; }
.trim-row input[type="range"] { width: 100%; accent-color: var(--accent); height: 32px; }
.trim-row b { text-align: right; font-size: 13px; }
.trim .row.wrap { flex-wrap: wrap; gap: 8px; }
.trim-len, .trim-status { margin: 0; min-height: 1.2em; }

/* ---------- studio dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.dash-card { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--sunk); display: grid; gap: 10px; align-content: start; min-width: 0; }
.dash-card h2 { margin: 0; font: 800 16px/1.2 var(--display); }
.dash-t { margin: 0; font: 700 16px/1.3 var(--body); overflow-wrap: anywhere; }
.dash-top, .dash-tips { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.dash-top li { display: flex; justify-content: space-between; gap: 12px; }
.dash-top a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dash-tips { font-size: 14px; color: var(--muted); }

/* ---------- admin traffic ---------- */
.tr-range { margin: 4px 0 16px; flex-wrap: wrap; }
.tr-live { font-size: 13px; }
.tr-wide { margin: 16px 0; }
.tr-chart { width: 100%; height: auto; display: block; }
.tr-grid { stroke: var(--line); stroke-width: 1; }
.tr-ax { fill: var(--muted); font: 11px var(--body); }
.tr-bar { fill: var(--accent); opacity: .85; }
.tr-bar:hover { opacity: 1; }
.tr-line { stroke: var(--text, #fff); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: .75; }
.tr-legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.tr-legend i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.k-bar { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); }
.k-line { width: 14px; height: 0; border-top: 2px solid var(--text, #fff); opacity: .75; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(80px, 38%) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.bars-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bars-t { height: 10px; border-radius: 6px; background: var(--sunk-2, rgba(255,255,255,.08)); overflow: hidden; }
.bars-t i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--accent); transition: width .5s ease; }
.bars b { min-width: 2ch; text-align: right; font-size: 13px; }
.delta { font-size: 12px; font-weight: 700; }
.delta.up { color: #3ecf8e; } .delta.down { color: #ff6b6b; }
code { font-family: var(--mono, ui-monospace, monospace); background: var(--sunk); padding: 1px 6px; border-radius: 6px; }
.tr-live { display: inline-flex; align-items: center; gap: 6px; font: 700 13px/1 var(--body); color: var(--accent-text, var(--accent)); }
.tr-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: tr-pulse 1.6s infinite; }
@keyframes tr-pulse { 0% { box-shadow: 0 0 0 0 var(--accent-soft, rgba(0,229,255,.4)); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .tr-live i, .bars-t i { animation: none; transition: none; } }
.stat .delta { display: block; margin-top: 2px; }
#trTabs { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
@media (max-width: 600px) { #trTabs a { padding-inline: 12px; } .bars li { grid-template-columns: minmax(70px, 40%) minmax(0, 1fr) auto; } }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 18px; }
.admin-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line, rgba(128,128,128,.25)); border-radius: 14px; text-decoration: none; color: inherit; background: var(--surface, transparent); }
.admin-card:hover { border-color: var(--accent); }
.admin-card svg { color: var(--accent-text, var(--accent)); }
@media (max-width: 700px) { .admin-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .admin-card { padding: 14px; } }

.adprev { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,.8); display: grid; place-items: center; padding: 16px; }
.adprev-box { width: min(760px, 100%); background: var(--surface, #111); border: 1px solid rgba(128,128,128,.3); border-radius: 14px; padding: 12px; display: grid; gap: 10px; }
.adprev-top, .adprev-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.adprev-v { width: 100%; max-height: 60vh; background: #000; border-radius: 10px; }
.adprev-act { display: flex; gap: 8px; }

/* Phones: easier-to-tap sidebar/footer links */
@media (max-width: 900px) {
  .side .foot-links a { display: block; padding: 8px 0; }
}
@media (max-width: 700px) { .watch [data-report="video"] { margin-left: auto; } }

/* ---------- World top ---------- */
.world { max-width: 1100px; margin: 0 auto; }



.w-hint { position: absolute; left: 0; right: 0; top: 10px; margin: 0; text-align: center; font-size: 12px; color: #9a9aa3; pointer-events: none; }



 .w-rh i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }


 
.w-title { font: 800 22px/1.15 var(--display); margin: 18px 0 14px; padding-left: 10px; border-left: 4px solid var(--c); }
.w-title span { display: block; font-weight: 500; font-size: 15px; color: var(--muted); }
.w-list { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.w-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: start; color: inherit; text-decoration: none; border-radius: 12px; }
.w-card:first-child { grid-template-columns: minmax(0, 1fr); }
.w-th { position: relative; }
.w-th .thumb { border-radius: 12px; }
.w-rk { position: absolute; left: 8px; top: 8px; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--c); color: #04141a; font: 800 14px/28px system-ui, sans-serif; text-align: center; z-index: 3; }
.w-mt h3 { font-size: 15px; line-height: 1.25; margin: 0 0 4px; }
.w-card:first-child .w-mt h3 { font-size: 17px; }
.w-by { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 2px; }
.w-pl { display: flex; align-items: center; gap: 5px; color: var(--accent); font-size: 13px; margin-top: 3px; }
.w-card.on .w-th .thumb, .w-card:focus-visible .w-th .thumb { outline: 3px solid var(--accent); outline-offset: 2px; }
.w-card.flash .w-th .thumb { animation: wflash 1.4s ease; }
@keyframes wflash { 0%, 60% { box-shadow: 0 0 0 3px var(--accent), 0 0 24px rgba(0,229,255,.5); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .w-card.flash .w-th .thumb { animation: none; box-shadow: 0 0 0 3px var(--accent); } }
.w-row { margin-top: 26px; }
.w-rh { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; background: none; border: 0; color: var(--ink); font: inherit; padding: 6px 0; cursor: pointer; text-align: left; }
.w-rh b { font-size: 17px; } .w-rh em { margin-left: auto; font-style: normal; color: var(--c); font-size: 13px; }
.w-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.w-strip::-webkit-scrollbar { display: none; }
.w-card.sm { flex: none; width: 230px; grid-template-columns: minmax(0, 1fr); }
.w-none { margin-top: 22px; }
.w-empty { text-align: center; padding: 28px 18px; display: grid; gap: 10px; justify-items: center; }
@media (min-width: 760px) {
  .w-list { grid-template-columns: 1.4fr 1fr; grid-auto-flow: row; }
  .w-list .w-card:first-child { grid-row: span 4; }
  .w-card.sm { width: 260px; }
}

/* Studio dashboard (polished) */
.dash-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: stretch; }
.dash-latest { grid-column: 1 / -1; }
.dl-body { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; align-items: center; }
.dl-thumb { display: block; border-radius: 12px; overflow: hidden; }
.dl-info { display: grid; gap: 12px; align-content: center; min-width: 0; }
.dl-info .dash-t { font: 800 20px/1.25 var(--display); }
.dl-info .row { margin-top: 4px; }
.dl-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; }
.dl-stats b { color: var(--ink); font-weight: 700; }
.dash-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dash-rank a { display: grid; grid-template-columns: 22px 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 10px; text-decoration: none; color: inherit; }
.dash-rank a:hover { background: var(--accent-soft); }
.dr-n { font: 800 14px/1 var(--display); color: var(--muted); text-align: center; }
.dr-img { aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--line); display: block; }
.dr-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dr-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dr-v { color: var(--muted); font-size: 13px; white-space: nowrap; }
.dash-topc .row { margin-top: 6px; }
@media (max-width: 700px) { .dl-body { grid-template-columns: 1fr; } .dash-grid { grid-template-columns: 1fr; } }
/* Adjust thumbnail dialog */
.adj-back { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.72); display: grid; place-items: center; padding: 16px; }
.adj-box { width: min(560px, 100%); background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 12px; }
.adj-box h2 { margin: 0; font: 800 18px/1.2 var(--display); }
.adj-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #000; touch-action: none; cursor: grab; }
.adj-frame img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; }
.adj-zoom { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; font-weight: 600; }
.adj-actions { justify-content: flex-end; gap: 8px; }

/* Edit / upload form (polished) */
.studio-grid { gap: 20px 28px; }
.studio-grid .stack { gap: 16px; }
.ed-card { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; }
.ed-h { margin: 0; font: 800 16px/1.2 var(--display); letter-spacing: .01em; }
.studio .lbl > .hint { display: block; margin-top: -2px; }
.studio .two { gap: 16px; align-items: start; }
.studio div.lbl { display: grid; gap: 6px; font-weight: 600; font-size: 13.5px; }
.seg-full { display: grid; grid-template-columns: 1fr 1fr; }
.seg-full button { text-align: center; padding: 9px 12px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.studio select.field { height: 42px; }
.thumb-pick { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.thumb-pick button { border-radius: 10px; }
.ed-thumb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.preview .ed-card.trim { margin: 0; background: var(--surface); }
.trim .row.wrap .btn { flex: 1 1 auto; justify-content: center; }
.preview .row:last-child { padding-top: 4px; }

/* Buttons: consistent, visible edges in every theme */
.btn { border: 1px solid transparent; }
.btn-ghost { background: var(--sunk); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--sunk-2); border-color: var(--accent); }
.btn-ghost[aria-pressed="true"] { border-color: var(--accent); }
.btn:focus-visible, .field:focus-visible, .seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn svg { flex: none; }
.ed-thumb-actions .btn { padding: 8px 14px; }
.btn-outline, .btn-danger { border-color: var(--line-strong); }
.btn-danger:hover { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.field { border-color: var(--line-strong); background: var(--bg); }
:root[data-theme="light"] .field { background: var(--surface); }
.seg { border: 1px solid var(--line-strong); }

.us-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 0 0 14px; }
.us-tile { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); min-width: 0; }
.us-tile b { font: 800 22px/1.15 var(--display); }
.us-tile .hint { overflow-wrap: anywhere; }
.seo { padding: 40px 0; color: var(--muted); display: grid; gap: 10px; }
.seo h1 { margin: 0; font: 800 26px/1.2 var(--display); color: var(--ink); }
.seo h2 { margin: 12px 0 0; font: 700 16px/1.2 var(--display); color: var(--ink); }
.seo ul { margin: 0; padding-left: 20px; }

/* ===== World top: space hero ===== */
.world { max-width: 1240px; }
.wh { position: relative; display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.4fr); align-items: center; gap: 8px; margin: 0 -4px; padding: 28px 28px 18px; border-radius: 22px; overflow: hidden; color: #F6F6F4; border: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 60%, transparent 62%), radial-gradient(1px 1px at 28% 72%, #cfe8ff 60%, transparent 62%), radial-gradient(1.4px 1.4px at 47% 9%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 63% 88%, #fff 60%, transparent 62%), radial-gradient(1.2px 1.2px at 78% 24%, #cfe8ff 60%, transparent 62%), radial-gradient(1px 1px at 91% 64%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 6% 52%, #cfe8ff 60%, transparent 62%), radial-gradient(1.2px 1.2px at 36% 38%, #fff 60%, transparent 62%), radial-gradient(1px 1px at 84% 90%, #fff 60%, transparent 62%),
    radial-gradient(900px 520px at 70% 45%, rgba(20,70,160,.35), transparent 70%), #04070f; }



.wh h1 { margin: 0; font: 600 clamp(36px, 5.2vw, 64px)/1.02 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; letter-spacing: -.01em; text-wrap: balance; }











.wh-globe { position: relative; height: clamp(420px, 52vw, 620px); min-width: 0; }
.wh-globe canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.wh-globe canvas:active { cursor: grabbing; }






.wh .w-hint { top: auto; bottom: 6px; color: #9fb4cc; }
.wh-quote { position: absolute; right: 26px; bottom: 16px; margin: 0; max-width: 220px; text-align: right; font: italic 15px/1.4 "Iowan Old Style", Georgia, serif; color: #dfe8f3; z-index: 3; }
.wh-quote span { display: block; margin-top: 6px; font: 600 11px/1 var(--body); letter-spacing: .3em; color: #9fb4cc; }
.wh-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.wh-tile { display: grid; gap: 0; padding: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; font: inherit; transition: transform .12s, border-color .2s; }
.wh-tile:hover { transform: translateY(-2px); border-color: var(--c); }
.wh-tth { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 40%, #0b0b0c), #0b0b0c); overflow: hidden; }
.wh-tth img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wh-tl { display: grid; grid-template-columns: 10px 1fr; align-items: center; column-gap: 8px; padding: 9px 11px 10px; }
.wh-tl i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.wh-tl b { font-size: 14px; } .wh-tl em { grid-column: 2; font-style: normal; font-size: 12px; color: var(--muted); }
.wh-tile[aria-pressed="true"] { border-color: var(--c); box-shadow: 0 0 0 2px var(--c); }
@media (max-width: 900px) {
  .wh { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 12px; border-radius: 18px; }
  .wh-globe { height: min(118vw, 520px); }
  .wh-quote { display: none; }
   
  .wh-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
   
    
}

/* ===== World top: night-earth look ===== */
.wh { grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); grid-template-rows: auto auto; padding: 30px 30px 20px;
  background:
    radial-gradient(1.4px 1.4px at 8% 14%, #fff 60%, transparent 62%), radial-gradient(1px 1px at 17% 64%, #bcd8ff 60%, transparent 62%), radial-gradient(1.6px 1.6px at 31% 22%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 44% 80%, #fff 60%, transparent 62%), radial-gradient(1.2px 1.2px at 52% 8%, #bcd8ff 60%, transparent 62%), radial-gradient(1px 1px at 66% 92%, #fff 60%, transparent 62%),
    radial-gradient(1.4px 1.4px at 74% 16%, #fff 60%, transparent 62%), radial-gradient(1px 1px at 88% 40%, #bcd8ff 60%, transparent 62%), radial-gradient(1.2px 1.2px at 95% 78%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 4% 90%, #fff 60%, transparent 62%), radial-gradient(1px 1px at 58% 50%, #fff 60%, transparent 62%), radial-gradient(1.2px 1.2px at 24% 46%, #bcd8ff 60%, transparent 62%),
    radial-gradient(700px 520px at 66% 40%, rgba(24,80,200,.28), transparent 70%), radial-gradient(500px 360px at 8% 100%, rgba(120,40,200,.16), transparent 70%), #02040a; }
.wh h1 { font-size: clamp(38px, 5.6vw, 72px); line-height: 1; }

.wh-side { position: absolute; right: 26px; top: 26px; margin: 0; text-align: right; font: 500 10.5px/1.9 var(--body); letter-spacing: .3em; text-transform: uppercase; color: #8aa0bd; z-index: 3; }
.wh-quote { bottom: auto; top: 54%; right: 26px; }
.wh-strip { grid-column: 1 / -1; display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 18px; margin-top: 10px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); position: relative; z-index: 3; }
.wh-lab { margin: 0; font: 600 10.5px/1.8 var(--body); letter-spacing: .3em; text-transform: uppercase; color: #8aa0bd; }
.wh-tiles { margin-top: 0; gap: 10px; }
.wh-tile { background: rgba(8,14,28,.6); border: 1px solid rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(6px); border-radius: 12px; }
.wh-tile:hover { border-color: var(--c); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); }
.wh-tile[aria-pressed="true"] { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 22px color-mix(in srgb, var(--c) 55%, transparent); }
.wh-tl { padding: 7px 10px 8px; } .wh-tl b { font-size: 13px; } .wh-tl em { color: #9fb4cc; font-size: 11.5px; }
.wh-tth { aspect-ratio: 16 / 7; }
/* cards: bright framed thumbnail with a caption, joined to a glowing node */









/* neon pins + glowing arcs */










@keyframes wlPulse { 0% { transform: scale(.55); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }


/* selected continent: same neon treatment as the pins */
.wh-tile { position: relative; transition: transform .15s, border-color .15s, box-shadow .2s; }
.wh-tile[aria-pressed="true"] { border-color: color-mix(in srgb, var(--c) 85%, #fff); transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--c), 0 0 14px var(--c), 0 0 34px color-mix(in srgb, var(--c) 60%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 18%, transparent); animation: tileGlow 2.8s ease-in-out infinite; }
.wh-tile[aria-pressed="true"] .wh-tth { filter: saturate(1.15) brightness(1.08); }
.wh-tile[aria-pressed="true"] .wh-tl i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent), 0 0 12px var(--c); animation: tileDot 2.8s ease-in-out infinite; }
.wh-tile[aria-pressed="true"] .wh-tl b { text-shadow: 0 0 10px var(--c); }
@keyframes tileGlow { 50% { box-shadow: 0 0 0 1px var(--c), 0 0 20px var(--c), 0 0 46px color-mix(in srgb, var(--c) 70%, transparent), inset 0 0 22px color-mix(in srgb, var(--c) 24%, transparent); } }
@keyframes tileDot { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 12%, transparent), 0 0 16px var(--c); } }
@media (prefers-reduced-motion: reduce) { .wh-tile[aria-pressed="true"], .wh-tile[aria-pressed="true"] .wh-tl i { animation: none; } }

/* ===== Ambient glass finish ===== */
.wh { border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 70px -18px rgba(120,90,255,.35), 0 0 90px -30px rgba(0,229,255,.35), inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 0 1px rgba(255,255,255,.03), inset 0 -40px 80px -40px rgba(120,90,255,.22); }
.wh::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(520px 280px at 8% 0%, rgba(255,61,240,.16), transparent 70%), radial-gradient(520px 320px at 100% 8%, rgba(56,189,248,.18), transparent 70%), radial-gradient(600px 300px at 55% 108%, rgba(178,102,255,.2), transparent 70%); animation: ambDrift 14s ease-in-out infinite alternate; }
.wh::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46%; z-index: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 70%); }
.wh > * { position: relative; z-index: 1; }
@keyframes ambDrift { from { opacity: .75; transform: translate3d(-1.5%, 0, 0) scale(1); } to { opacity: 1; transform: translate3d(1.5%, 1%, 0) scale(1.04); } }
.wh-strip { border-top: 1px solid rgba(255,255,255,.12); }
.wh-tile { background: linear-gradient(160deg, rgba(255,255,255,.13), rgba(255,255,255,.04) 55%, rgba(8,14,28,.55)); border: 1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 26px -10px rgba(0,0,0,.7); }
.wh-tile:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 0 22px color-mix(in srgb, var(--c) 45%, transparent), 0 12px 28px -10px rgba(0,0,0,.7); }


.wh .btn{ -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
@media (prefers-reduced-motion: reduce) { .wh::before { animation: none; } }
@media (max-width: 900px) {
  .wh { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 14px; }
  .wh-globe { height: min(118vw, 520px); }
  .wh-side, .wh-quote { display: none; }
  
  .wh-strip { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .wh-lab { display: none; }   
  .wh-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


.wh-side { display: none; }
.wh-quote { top: auto; bottom: 104px; right: 24px; max-width: 200px; font-size: 13.5px; opacity: .85; }
@media (max-width: 1100px) { .wh-quote { display: none; } }

.wh-quote { display: none; }

/* ---------- Watch page on phones: same layout as YouTube mobile ---------- */
.w-back, .mini-av { display: none; }
.w-acts { display: contents; }
@media (max-width: 820px) {
  body.watch-mode .top { display: none; }
  body.watch-mode main { padding: 0 0 72px; }
  .watch { display: block; }
  body .watch > div.w-player:first-child { display: block; }
  .w-player { position: sticky; top: 0; z-index: 30; background: #000; }
  .w-player .hp, .w-player .hp .hp-video, .w-player video { border-radius: 0; }
  .w-back { display: grid; place-items: center; position: absolute; left: 4px; top: 4px; z-index: 40; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; filter: drop-shadow(0 1px 3px rgba(0,0,0,.8)); }
  .w-back svg { stroke-width: 2.4; }
  .w-main { display: flex; flex-direction: column; margin-inline: 0; }
  body.watch-mode .watch > div > .w-main > *, body.watch-mode .w-main > * { margin-inline: 12px; }
  .w-main h1 { order: 1; font: 600 18px/1.3 var(--body); margin: 12px 12px 6px; }
  .w-main .desc { order: 2; background: none; padding: 0; margin: 0 12px 4px; color: var(--muted); font-size: 13px; cursor: pointer; }
  .w-main .desc > b { font-weight: 500; color: var(--muted); }
  .w-main .desc:not(.open) > :not(b):not(.muted) { display: none; }
  .w-main .desc:not(.open)::after { content: "…more"; color: var(--ink); font-weight: 600; }
  .w-main .desc.open { background: var(--sunk); padding: 12px; border-radius: 12px; color: var(--ink); }
  .w-main > .row { order: 3; gap: 10px; margin-top: 8px; }
  .w-main > .row > .grow { flex: 1 1 100%; flex-wrap: nowrap; justify-content: space-between; }
  .w-main > .row > .grow .chan-line { flex: 1 1 auto; }
  .w-acts { display: flex; gap: 8px; width: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px 12px 4px; margin-inline: -12px; width: calc(100% + 24px); }
  .w-acts::-webkit-scrollbar { display: none; }
  .w-acts > * { flex: 0 0 auto; }
  .w-acts .btn, .w-acts .seg { border-radius: 999px; }
  .w-main .comments { order: 4; margin-top: 12px; background: var(--sunk); border-radius: 12px; padding: 12px; cursor: pointer; }
  .w-main .comments h2 { font: 600 15px/1.2 var(--body); margin: 0; }
  .comments .c-head { margin: 0; }
  .comments:not(.open) .c-sort, .comments:not(.open) .c-form, .comments:not(.open) > p { display: none; }
  .comments:not(.open) .c-list { margin-top: 10px; }
  .comments:not(.open) .c-list > li:nth-child(n+2) { display: none; }
   .comments:not(.open) .c-list [class*="reply"], .comments:not(.open) .c-list button { display: none; }
  .comments.open { cursor: default; }
  .comments.open .c-head { cursor: pointer; }
  /* suggested videos as a feed of big cards */
  body.watch-mode .up-next { margin-inline: 0; margin-top: 14px; }
  .up-next h2 { display: none; }
  .up-next .list { gap: 18px; grid-template-columns: minmax(0, 1fr); }
  .up-next .mini { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "t t" "a x"; gap: 10px 12px; padding: 0; }
  .up-next .mini > .thumb, .up-next .mini > :first-child { grid-area: t; margin: 0; border-radius: 0; }
  .up-next .mini .thumb { border-radius: 0; }
  .up-next .mini .mini-av { display: block; grid-area: a; padding-left: 12px; }
  .up-next .mini .mini-av .avatar { width: 36px; height: 36px; }
  .up-next .mini > div:not(.thumb) { grid-area: x; min-width: 0; padding-right: 12px; }
  .up-next .mini h3 { font-size: 15px; font-weight: 500; }
  .up-next .mini .dur { font-size: 12px; right: 8px; bottom: 8px; }
}

@media (max-width: 820px) {
  /* phones: no comments section, tidy themed blocks */
  .w-main .comments { display: block; }
  .w-main h1 { font: 700 19px/1.3 var(--display); margin: 14px 12px 4px; }
  .w-main .desc { margin-bottom: 10px; }
  .w-main .desc:not(.open)::after { color: var(--accent-text); }
  .w-main > .row { padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-top: 6px; }
  .w-main > .row > .grow { align-items: center; }
  .w-main .chan-line b { font: 700 15px/1.2 var(--body); }
  .w-main .chan-line .sub { font-size: 12.5px; }
  .w-acts .btn, .w-acts .seg { background: var(--surface); border: 1px solid var(--line-strong); height: 38px; }
  .w-acts .seg .btn { border: 0; background: none; height: 36px; }
  .w-acts .btn[aria-pressed="true"] { color: var(--accent-text); }
  .w-acts .icon-btn { border-radius: 50%; width: 38px; height: 38px; background: var(--surface); border: 1px solid var(--line-strong); }
  .up-next { border-top: 0; }
}
@media (max-width: 820px) and (max-height: 520px) { .w-player { position: static; } }

/* phones: icon-only controls in one straight line */
 .btn-dark > svg { display: none; }
@media (max-width: 820px) {
  .lbl { display: none; }
  .btn-dark > svg { display: block; }
  .w-main > .row > .grow { flex-wrap: nowrap; gap: 8px; }
  .w-main .subctl .btn { width: 42px; height: 42px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; gap: 0; }
  .w-main .subctl .btn-dark { background: var(--accent); color: var(--on-accent, #001318); border: 0; box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent); }
  .w-main .subctl .sub-on { background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent); }
  .w-main .subctl .sub-on > svg:last-child { display: none; }
  .w-acts { justify-content: space-between; gap: 6px; overflow: visible; padding-inline: 12px; }
  .w-acts > .btn, .w-acts > .icon-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; gap: 0; }
  .w-acts .seg { display: inline-flex; height: 44px; border-radius: 999px; }
  .w-acts .seg .btn { height: 42px; padding: 0 14px; gap: 6px; }
  .w-acts svg { width: 21px; height: 21px; }
}
@media (max-width: 820px) { .w-acts { justify-content: space-between; } .w-acts > * { margin: 0 !important; } .w-acts > .seg, .w-acts > .btn, .w-acts > .icon-btn { flex: 0 0 auto; } }

@media (max-width: 820px) {
  /* like / dislike: plain round icons in the same line, no pill, no counts */
  .w-acts .seg { display: contents; border: 0; background: none; }
  .w-acts .seg .btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; gap: 0; background: var(--surface); border: 1px solid var(--line-strong); }
  .w-acts .seg .btn .num { display: none; }
  .w-acts .seg .btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 40%, transparent); }
  /* channel row: bell first, then avatar and name */
  .w-main > .row > .grow { justify-content: flex-start; gap: 12px; }
  .w-main > .row > .grow .subctl { order: -1; flex: 0 0 auto; }
  .w-main > .row > .grow .chan-line { order: 0; flex: 1 1 auto; }
  /* glass + ambient edge under the pinned player, so the video and the feed are clearly separate */
  .w-player { box-shadow: 0 1px 0 rgba(255,255,255,.08), 0 10px 30px -6px rgba(0,229,255,.22), 0 18px 40px -10px rgba(0,0,0,.85); }
  .w-player::before { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; z-index: 5; background: linear-gradient(90deg, transparent, var(--accent) 20%, var(--accent) 80%, transparent); opacity: .85; box-shadow: 0 0 10px var(--accent); pointer-events: none; }
  .w-player::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 22px; z-index: 5; pointer-events: none;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 62%, transparent), transparent);
    -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
    -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent); }
}
@media (max-width: 820px) { .w-acts .seg .btn::before, .w-acts .seg .btn::after, .w-acts .seg::before, .w-acts .seg::after { display: none !important; } .w-acts .seg .btn + .btn { border-left: 1px solid var(--line-strong); } .w-acts .seg > * { box-shadow: none; } }

/* ================= Ambient glass finish — whole platform ================= */
:root {
  --glass-bg: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.025) 55%, rgba(10,16,30,.35));
  --glass-line: rgba(255,255,255,.13);
  --glass-hi: inset 0 1px 0 rgba(255,255,255,.2);
  --glass-shadow: 0 14px 34px -14px rgba(0,0,0,.75);
}
:root[data-theme="light"] {
  --glass-bg: linear-gradient(160deg, rgba(255,255,255,.85), rgba(255,255,255,.6));
  --glass-line: rgba(15,25,40,.1);
  --glass-hi: inset 0 1px 0 rgba(255,255,255,.9);
  --glass-shadow: 0 14px 34px -16px rgba(30,50,90,.28);
}
/* soft colour glow behind everything */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(640px 420px at 6% 0%, rgba(255,61,240,.13), transparent 70%), radial-gradient(700px 460px at 100% 4%, rgba(56,189,248,.14), transparent 70%), radial-gradient(760px 480px at 50% 112%, rgba(178,102,255,.14), transparent 70%); }
:root[data-theme="light"] body::before { background: radial-gradient(640px 420px at 6% 0%, rgba(252,52,135,.06), transparent 70%), radial-gradient(700px 460px at 100% 4%, rgba(0,200,224,.07), transparent 70%); }
.chip, .btn-ghost { background: var(--glass-bg); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.chip[aria-pressed="true"] { border-color: transparent; }
/* video thumbnails: a gentle lift and coloured glow on hover/touch */
.thumb { transition: box-shadow .25s, transform .25s; }
.card:hover .thumb, .mini:hover .thumb { box-shadow: 0 12px 30px -10px rgba(0,229,255,.35), 0 0 0 1px rgba(255,255,255,.12); }
@media (prefers-reduced-motion: reduce) { .thumb { transition: none; } }

/* ================= Shorts ================= */
.sh-shelf { margin: 4px 0 22px; }
.sh-shelf-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sh-shelf-h h2 { display: flex; align-items: center; gap: 8px; margin: 0; font: 800 20px/1.2 var(--display); }
.sh-shelf-h h2 svg { color: var(--accent); }
.sh-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.sh-row::-webkit-scrollbar { display: none; }
.sh-row .sh-card { flex: 0 0 152px; scroll-snap-align: start; }
.sh-card { display: grid; gap: 7px; text-decoration: none; color: inherit; min-width: 0; align-content: start; }
.sh-card-th { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: var(--sunk); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.sh-card-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-card:hover .sh-card-th { transform: translateY(-2px); box-shadow: 0 12px 28px -10px rgba(0,229,255,.4); }
.sh-card-views { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; }
.sh-card-t { font: 600 14px/1.3 var(--body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 14px; }

body.shorts-mode main { padding: 0; }
.sh { position: relative; height: calc(100dvh - var(--top-h, 64px) - env(safe-area-inset-top, 0px)); background: var(--bg); }
.sh-feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; outline: 0; }
.sh-feed::-webkit-scrollbar { display: none; }
.sh-item { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 0; box-sizing: border-box; }
.sh-stage { position: relative; height: 100%; max-height: 900px; aspect-ratio: 9 / 16; max-width: 100%; background: #000; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px -24px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08); }
.sh-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.sh-video.cover { object-fit: cover; }
.sh-flash { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: #fff; opacity: 0; }
.sh-flash svg { filter: drop-shadow(0 2px 10px rgba(0,0,0,.6)); }
.sh-flash.go { animation: shFlash .6s ease-out; }
@keyframes shFlash { 0% { opacity: .95; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.25); } }
.sh-sound { position: absolute; top: 12px; right: 12px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sh-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 16px 18px; z-index: 2; color: #fff; display: grid; gap: 8px; justify-items: start;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.72)); text-shadow: 0 1px 6px rgba(0,0,0,.6); pointer-events: none; }
.sh-meta > * { pointer-events: auto; }
.sh-meta .sh-ch { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.sh-title { margin: 0; font: 600 15px/1.35 var(--body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-right: 54px; }
.sh-sub2 { margin: 0; font-size: 12.5px; opacity: .85; }
.sh-sub { border: 0; border-radius: 999px; padding: 7px 14px; font: 700 13px/1 var(--body); cursor: pointer; background: #fff; color: #000; }
.sh-sub.on { background: rgba(255,255,255,.2); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sh-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.22); z-index: 4; }
.sh-bar i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.sh-rail { display: flex; flex-direction: column; gap: 14px; align-self: flex-end; padding-bottom: 28px; }
.sh-btn { display: grid; justify-items: center; gap: 5px; border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; }
.sh-btn .sh-ic { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); border: 1px solid var(--line-strong, var(--line)); transition: transform .15s, background .15s, box-shadow .2s; }
.sh-btn:active .sh-ic { transform: scale(.9); }
.sh-btn b { font: 600 12px/1 var(--body); }
.sh-btn.on .sh-ic { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent); }
.sh-back { display: none; }
.sh-arrows { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); display: grid; gap: 12px; z-index: 5; }
.sh-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong, var(--line)); background: var(--sunk); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.sh-arrow:hover { border-color: var(--accent); color: var(--accent-text); }
.sh-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; }
.sh-sheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.5); }
.sh-sheet[hidden] { display: none; }
.sh-sheet-in { width: min(520px, 100%); max-height: 72dvh; min-height: 40dvh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; }
.sh-sheet-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sh-clist { list-style: none; margin: 0; padding: 12px 0; overflow-y: auto; flex: 1; display: grid; gap: 16px; align-content: start; }
.sh-clist li { display: flex; gap: 10px; min-width: 0; }
.sh-clist p { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.sh-cform { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.sh-cform .field { flex: 1; min-width: 0; }
.sh-signin { padding-top: 10px; border-top: 1px solid var(--line); margin: 0; }
@media (prefers-reduced-motion: reduce) { .sh-flash.go { animation: none; } }
@media (max-width: 820px) {
  body.shorts-mode .top { display: none; }
  body.shorts-mode main { padding: 0; }
  .sh { height: 100dvh; background: #000; }
  .sh-item { padding: 0; gap: 0; }
  .sh-stage { max-height: none; max-width: none; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .sh-rail { position: absolute; right: 8px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 6; padding: 0; gap: 12px; }
  .sh-btn { color: #fff; text-shadow: 0 1px 5px rgba(0,0,0,.7); }
  .sh-btn .sh-ic { background: rgba(0,0,0,.4); border-color: rgba(255,255,255,.22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .sh-meta { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); padding-right: 76px; }
  .sh-back { display: grid; place-items: center; position: absolute; left: 6px; top: calc(8px + env(safe-area-inset-top, 0px)); z-index: 8; width: 42px; height: 42px; border: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer; }
  .sh-arrows { display: none; }
  .sh-sound { top: calc(10px + env(safe-area-inset-top, 0px)); }
}

/* Shorts on phones: lock the page so only the feed moves, no text selection or zoom while tapping */
.sh-stage, .sh-rail, .sh-sound, .sh-back { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.sh-feed { touch-action: pan-y; overscroll-behavior-y: contain; }
.sh-clist { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@media (max-width: 820px) {
  html:has(body.shorts-mode), body.shorts-mode { overflow: hidden; overscroll-behavior: none; height: 100%; }
  body.shorts-mode { position: fixed; inset: 0; width: 100%; }
  .sh { height: 100vh; height: 100dvh; }
  .sh-sound, .sh-back { width: 44px; height: 44px; }
  .sh-sub { padding: 10px 16px; }
}
@media (max-width: 820px) and (orientation: landscape) and (max-height: 520px) {
  .sh-rail { bottom: 14px; flex-direction: row; right: 12px; }
  .sh-btn b { display: none; }
  .sh-btn .sh-ic { width: 44px; height: 44px; }
  .sh-meta { padding-right: 190px; }
}

/* smooth globe: while it is moving, drop the costly blur / glow effects and idle animations */




.wh-globe canvas { will-change: transform; transform: translateZ(0); }

/* =====================================================================
   NEW LOOK (Home, side menu, top bar)
   ===================================================================== */
:root { --script: "Mrs Saint Delafield", "Brush Script MT", cursive; --nv: #070d15; --card: rgba(255,255,255,.045); --edge: rgba(255,255,255,.09); }
.side-logo, .side-create, .side-motto { display: none; }
@media (min-width: 901px) {
  :root { --side-w: 232px; }
  body:not(.watch-mode):not(.shorts-mode) .shell, body:not(.watch-mode):not(.shorts-mode) .shell.collapsed { display: block; padding-left: var(--side-w); }
  body:not(.watch-mode):not(.shorts-mode) .side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w); height: 100dvh; z-index: 32; background: var(--nv); border-right: 1px solid var(--edge); padding: 18px 12px 14px; gap: 3px; }
  body:not(.watch-mode):not(.shorts-mode) .top { padding-left: calc(var(--side-w) + 24px); background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; }
  body:not(.watch-mode):not(.shorts-mode) .top::after { display: none; }
  body:not(.watch-mode):not(.shorts-mode) .top .logo, body:not(.watch-mode):not(.shorts-mode) #menuBtn { display: none; }
  body:not(.watch-mode):not(.shorts-mode) .search { max-width: 640px; }
  .side-logo, .side-create, .side-motto { display: revert; }
}
body:not(.watch-mode):not(.shorts-mode) .side-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 10px 16px; text-decoration: none; }


.side .side-create { display: flex; justify-content: center; gap: 10px; margin: 10px 4px 6px; padding: 12px; border: 1px solid rgba(0,229,255,.55); background: rgba(0,229,255,.07); color: var(--accent); border-radius: 14px; font-weight: 700; }
.side .side-create:hover { background: rgba(0,229,255,.16); }
.side a[aria-current="page"] { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }



.side .side-motto { margin: 8px 2px 12px; font: 400 21px/1.25 Georgia, "Times New Roman", serif; color: #d9dfe8; }
.side .foot { padding-top: 4px; }
:root[data-theme="light"] .side-motto{ color: #0B0B0C; }


/* top bar: one dark search pill */
@media (min-width: 901px) {
  body:not(.watch-mode):not(.shorts-mode) .search { position: relative; }
  body:not(.watch-mode):not(.shorts-mode) .search input { width: 100%; height: 46px; border-radius: 999px; border: 1px solid var(--edge); background: rgba(255,255,255,.07); padding: 0 52px 0 22px; }
  body:not(.watch-mode):not(.shorts-mode) .search-btn { position: absolute; right: 4px; top: 3px; width: 44px; height: 40px; border: 0; background: transparent; border-radius: 999px; color: var(--muted); }
  body:not(.watch-mode):not(.shorts-mode) .search-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
}

/* ---- Home ---- */
.hm { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.hm-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.hm-hero { position: relative; min-height: 330px; border-radius: 22px; overflow: hidden; background-size: cover; background-position: center; border: 1px solid var(--edge); display: flex; align-items: flex-end; }
.hm-hero.noimg { background: radial-gradient(700px 320px at 78% 30%, rgba(255,150,60,.35), transparent 65%), radial-gradient(600px 400px at 10% 0%, rgba(0,229,255,.22), transparent 65%), linear-gradient(135deg, #0a1626, #07101c 60%, #160d22); }
.hm-hero-in { position: relative; padding: 28px 32px 30px; max-width: 640px; display: grid; gap: 12px; justify-items: start; }
.hm-eyebrow { font: 700 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; background: rgba(140,95,30,.55); border: 1px solid rgba(255,190,100,.5); color: #ffe3b8; }
.hm-script { margin: 0; font: 400 clamp(54px, 7vw, 92px)/.82 var(--script); color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.hm-head { margin: 0; font: 800 clamp(28px, 3.4vw, 44px)/1.05 var(--display); color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.5); }
.hm-sub { margin: 0; font-size: 17px; color: #f1f4f8; text-shadow: 0 1px 10px rgba(0,0,0,.7); }
.hm-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hm-b1, .hm-b2 { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 24px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.hm-b1 { background: #fff; color: #0B0B0C; }
.hm-b2 { border: 1px solid rgba(255,255,255,.55); color: #fff; background: rgba(0,0,0,.25); }
.hm-place { position: absolute; right: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(5,10,16,.6); border: 1px solid var(--edge); font-size: 13px; color: #fff; }
.hm-edit { position: absolute; right: 16px; top: 16px; display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(5,10,16,.65); border: 1px solid var(--edge); font-size: 12.5px; text-decoration: none; color: #fff; }
.hm-hero > .hm-hero-in { width: 100%; max-width: none; }
.hm-hero > .hm-hero-in > * { max-width: 640px; }
.hm-hero > .hm-hero-in > .hm-place, .hm-hero > .hm-hero-in > .hm-edit { max-width: none; position: absolute; }
.hm-h { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.hm-h h2 { margin: 0; font: 700 26px/1.1 var(--display); letter-spacing: -.02em; }



.hm-all { margin-left: auto; font-size: 13.5px; color: var(--accent-text); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.hm-row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; scrollbar-width: thin; }
.hm-row > .card { flex: 0 0 clamp(190px, 17vw, 232px); scroll-snap-align: start; }
.hm-row > .status, .hm-row > .empty{ flex: 1 1 100%; }
.hm-soon { display: inline-block; font: 700 10.5px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; background: rgba(0,229,255,.12); color: var(--accent-text); border: 1px solid rgba(0,229,255,.3); }

.hm-mc { position: relative; min-height: 168px; border-radius: 18px; padding: 16px; display: grid; align-content: end; gap: 6px; border: 1px solid var(--edge); overflow: hidden; }
.hm-mc.m1 { background: linear-gradient(0deg, rgba(5,8,14,.88), rgba(5,8,14,.2)), linear-gradient(135deg, #6a2d14, #1b0e1c); }
.hm-mc.m2 { background: linear-gradient(0deg, rgba(5,8,14,.88), rgba(5,8,14,.2)), linear-gradient(135deg, #14507a, #0a1f35); }
.hm-mc.m3 { background: linear-gradient(0deg, rgba(5,8,14,.88), rgba(5,8,14,.2)), linear-gradient(135deg, #0f5a63, #0a1a2a); }
.hm-mc .hm-soon { justify-self: start; margin-bottom: 18px; }
.hm-mc h3 { margin: 0; font: 700 19px/1.2 var(--display); color: #fff; }
.hm-mc p { margin: 0; font-size: 13.5px; color: #d3dae4; }
.hm-creators { display: flex; gap: 18px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.hm-creators.big { flex-wrap: wrap; overflow: visible; }
.hm-cr { flex: none; width: 82px; display: grid; justify-items: center; gap: 4px; text-decoration: none; text-align: center; }
.hm-cr .avatar { width: 64px; height: 64px; font-size: 24px; box-shadow: 0 0 0 2px var(--nv), 0 0 0 3.5px rgba(255,255,255,.75); }
.hm-cr b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-cr span { font-size: 11.5px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }














.soon { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 70px 16px; max-width: 560px; margin: 0 auto; }
.soon h1 { margin: 0; font: 800 36px/1.1 var(--display); }
.soon p { margin: 0; color: var(--muted); }
.soon-ic { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; background: rgba(0,229,255,.1); border: 1px solid rgba(0,229,255,.3); color: var(--accent); }
.hero-form { display: grid; gap: 14px; max-width: 720px; }
.hero-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-prev.hm-hero { min-height: 220px; }
.hero-prev .hm-script { font-size: 54px; }

@media (max-width: 1180px) { .hm { grid-template-columns: minmax(0, 1fr); }  }
@media (max-width: 760px) {
  .hm-hero { min-height: 280px; border-radius: 18px; }
  .hm-hero-in { padding: 18px 18px 22px; }
  .hm-script { font-size: 56px; }
  .hm-sub { font-size: 15px; }
  .hm-b1, .hm-b2 { height: 42px; padding: 0 18px; }
  .hm-place { position: static !important; }
  
  .hm-mc { min-height: 120px; }
  .hm-row > .card { flex-basis: 70vw; }
  .hero-form .two { grid-template-columns: 1fr; }
}

/* For You: grid, 5 videos per row */
.hm-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 14px; overflow: visible; scroll-snap-type: none; padding-bottom: 0; }
.hm-row > .card { flex: none; min-width: 0; }
.hm-row > .status, .hm-row > .empty{ grid-column: 1 / -1; }
@media (max-width: 1400px) { .hm-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .hm-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .hm-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .hm-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; } .hm-row > .card { flex-basis: auto; } }
@media (max-width: 460px) { .hm-row { grid-template-columns: minmax(0, 1fr); } }

/* ---- Home: cinematic full-width hero, no side column ---- */
.hm { display: block; }

.hm-mc.m4 { background: linear-gradient(0deg, rgba(5,8,14,.88), rgba(5,8,14,.2)), linear-gradient(135deg, #6b4a12, #1a1208); }
.hm-head { font: 500 clamp(34px, 4vw, 56px)/1.08 "Playfair Display", Georgia, serif; letter-spacing: -.01em; }
.hm-script { position: absolute; right: 36px; bottom: 34px; text-align: left; font-size: clamp(40px, 4.4vw, 64px); line-height: .9; max-width: none !important; transform: rotate(-4deg); }
@media (min-width: 901px) {
  body:not(.watch-mode):not(.shorts-mode) .hm-hero { margin: calc(-16px - var(--top-h)) -24px 0; min-height: 470px; border-radius: 0 0 24px 24px; border-width: 0 0 1px; align-items: center; }
  body:not(.watch-mode):not(.shorts-mode) .hm-hero-in { padding: 110px 40px 40px; }
  body:not(.watch-mode):not(.shorts-mode) .search input { background: rgba(10,16,24,.62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
}

@media (max-width: 760px) { .hm-script { position: static; transform: none; font-size: 44px; }  }
#hmBody { margin-top: 30px; } .world #hmBody .hm-sec { margin: 0; }

/* performance: no endless animations or screen-blur filters (they made scrolling choppy) */
.wh::before, .wh-tile[aria-pressed="true"], .wh-tile[aria-pressed="true"] .wh-tl i, .tr-live i { animation: none !important; }
.wh-tile, .wh .btn, .chip, .btn-ghost, .chips, .search input, .hm-hero, .hm-place, .hm-edit { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

body::before { animation: none !important; }

/* admin maintenance */
.mt-disk { display: grid; gap: 8px; margin-bottom: 14px; }
.mt-bar { height: 10px; border-radius: 99px; background: var(--sunk-2); overflow: hidden; }
.mt-bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
#mtBox .panel { margin-bottom: 14px; }
.mt-list { display: grid; margin: 10px 0 14px; }
.mt-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.mt-row:first-child { border-top: 0; }
div.mt-row { grid-template-columns: minmax(0, 1fr) auto; }
.mt-t { display: grid; gap: 2px; min-width: 0; }
.mt-n { text-align: right; display: grid; font-weight: 600; }
.mt-n .sub { font-weight: 400; }
.mt-note { border-color: var(--accent); }

/* smooth scrolling: let the browser skip drawing sections that are far off-screen */
.hm-sec, .shelf, .w-row { content-visibility: auto; contain-intrinsic-size: auto 560px; }
.card, .lrow, .mini { contain: layout style; }
body.shorts-mode .hm-sec { content-visibility: visible; }

/* top bar: solid, so page titles never show through it while scrolling */
@media (min-width: 901px) {
  body:not(.watch-mode):not(.shorts-mode) .top { background: var(--bg); border-bottom: 1px solid var(--line); }
}
.top .menu { z-index: 60; }
.hm-mark { height: 1px; }

/* ---- light theme for the new look (side menu, top bar, search) ---- */
:root[data-theme="light"] { --nv: #FFFFFF; --card: rgba(15,25,40,.035); --edge: rgba(15,25,40,.11); }
:root[data-theme="light"] .side { color: var(--ink); box-shadow: 1px 0 0 var(--line); }
:root[data-theme="light"] .side a { color: var(--ink); }
:root[data-theme="light"] .side a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 2px 0 0 var(--accent); }
:root[data-theme="light"] .side a:hover, :root[data-theme="light"] .side .navlink:hover { background: var(--sunk); color: var(--ink); }
:root[data-theme="light"] .side .side-create { color: var(--accent-text); background: var(--accent-soft); border-color: var(--accent); }
:root[data-theme="light"] .side .side-create:hover { background: color-mix(in srgb, var(--accent) 22%, #fff); }
:root[data-theme="light"] .side .side-motto { color: var(--ink); }
:root[data-theme="light"] .side hr { border-top-color: var(--line); }
@media (min-width: 901px) {
  :root[data-theme="light"] body:not(.watch-mode):not(.shorts-mode) .search input { background: var(--sunk); border-color: var(--line); color: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
  :root[data-theme="light"] body:not(.watch-mode):not(.shorts-mode) .search-btn:hover { background: var(--sunk-2); color: var(--ink); }
  :root[data-theme="light"] body:not(.watch-mode):not(.shorts-mode) .top { background: var(--topbar); border-bottom: 1px solid var(--line); }
}
:root[data-theme="light"] .search input::placeholder { color: var(--muted); opacity: 1; }
:root[data-theme="light"] .hm-cr .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--line-strong, #ccc); }

/* Home: 3 videos per row (fewer, bigger cards = smoother scrolling) */
@media (min-width: 761px) { .hm-row { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 22px 18px; } }

/* ---- Explore: flat world map (replaces the spinning globe; nothing animates, so it stays smooth) ---- */
.wh-globe.wm { height: auto !important; display: grid; align-content: center; padding: 8px 0 26px; }
.wm-box { position: relative; width: 100%; aspect-ratio: 1000 / 394; }
.wm-map, .wm-pins { position: absolute; inset: 0; }
.wm-map svg { width: 100%; height: 100%; display: block; overflow: visible; }
.wm-c { cursor: pointer; outline: none; }
.wm-c path { fill: #1b3d5c; stroke: rgba(140,190,255,.4); stroke-width: .6; stroke-linejoin: round; transition: fill .18s, stroke .18s; }
.wm-c:hover path, .wm-c:focus-visible path { fill: color-mix(in srgb, var(--c) 38%, #16324a); stroke: color-mix(in srgb, var(--c) 70%, #fff); }
.wm-c.sel path { fill: color-mix(in srgb, var(--c) 52%, #16324a); stroke: #eaf8ff; stroke-width: 1; }
.wm-pins { pointer-events: none; }
.wm-pin { position: absolute; width: 0; height: 0; pointer-events: auto; text-decoration: none; color: #fff; --c: #00E5FF; }
.wm-pin i { position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 12px/1 var(--body); font-style: normal; color: #041018; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 35%, transparent), 0 0 16px var(--c); }
.wm-pin.on i, .wm-pin:hover i, .wm-pin:focus-visible i { transform: scale(1.18); }
.wm-tip { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: 190px; display: none; gap: 3px; padding: 6px 6px 8px; border-radius: 12px; background: rgba(8,14,26,.94); border: 1px solid var(--c); box-shadow: 0 12px 30px rgba(0,0,0,.55); z-index: 6; text-align: left; }
.wm-tip img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; display: block; background: #0b1624; }
.wm-tip b { font-size: 12.5px; line-height: 1.25; padding: 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wm-tip em { font: 400 11.5px/1.2 var(--body); font-style: normal; color: #b9c6d6; padding: 0 4px; }
.wm-pin:hover { z-index: 7; } .wm-pin:hover .wm-tip, .wm-pin:focus-visible .wm-tip, .wm-pin.on .wm-tip { display: grid; }
.wh .w-hint { position: static; margin-top: 10px; }
@media (max-width: 760px) { .wm-pin i { left: -11px; top: -11px; width: 22px; height: 22px; font-size: 11px; } .wm-tip { width: 160px; } }

/* Explore: plain background (no glass / glow), map + continent tiles only */
.wh { display: block !important; background: none !important; border: 0 !important; box-shadow: none !important; padding: 8px 0 0 !important; margin: 0 !important; overflow: visible; }
.wh::before, .wh::after { display: none !important; }
.wh .wh-side, .wh .wh-quote { display: none !important; }
.wh-globe.wm { max-width: 1100px; margin: 0 auto; }
.wm-c path { fill: #1d2c3d; stroke: rgba(255,255,255,.22); }
.wh-tile { background: var(--card, rgba(255,255,255,.045)) !important; border-color: var(--edge, rgba(255,255,255,.1)) !important; box-shadow: none !important; }
.wh-tile[aria-pressed="true"] { box-shadow: none !important; }
.wm-pin i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
:root[data-theme="light"] .wm-c path { fill: #cfd8e3; stroke: rgba(15,25,40,.3); }
:root[data-theme="light"] .wm-c.sel path { stroke: #0B0B0C; }
:root[data-theme="light"] .wh .w-hint { color: var(--muted); }
:root[data-theme="light"] .wh-tl, :root[data-theme="light"] .wh-tl b { color: var(--ink); }
:root[data-theme="light"] .wh-lab { color: var(--muted); }

/* ---- YouTube-style smoothness: a flat page. Nothing fixed-behind-content, no blur, no glow while scrolling ---- */
html, body, :root[data-theme="light"] body { background: var(--bg) !important; background-attachment: scroll !important; }
body::before { display: none !important; }
*, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.top { background: var(--bg) !important; }
main .card, main .card *, main .hm-sec *, main .shelf *, main .w-card, main .w-card *, main .sh-card, main .sh-card *, main .lrow, main .lrow * { box-shadow: none !important; text-shadow: none !important; filter: none !important; }
.card, .w-card, .sh-card, .hm-mc { transition: none !important; }
.card:hover, .w-card:hover, .sh-card:hover { transform: none !important; }
.card:hover .thumb img, .card .thumb img { transform: none !important; transition: none !important; }

/* old logo (headset + controller) in the side menu */
.sl-img { display: block; width: 190px; max-width: 100%; height: auto; margin: 0 0 0 10px; }
.sl-light { display: none; }
:root[data-theme="light"] .sl-dark { display: none; }
:root[data-theme="light"] .sl-light { display: block; }
body:not(.watch-mode):not(.shorts-mode) .side-logo { padding: 2px 10px 10px; }
.sl-img { width: 190px !important; margin-left: 4px !important; }
.sl-img, :root[data-theme="light"] .sl-light { width: 200px !important; margin: 4px 0 6px 6px !important; }
/* light theme map: continents keep their colour */
:root[data-theme="light"] .wm-c:hover path, :root[data-theme="light"] .wm-c:focus-visible path { fill: color-mix(in srgb, var(--c) 35%, #fff); stroke: color-mix(in srgb, var(--c) 80%, #000); }
:root[data-theme="light"] .wm-c.sel path { fill: color-mix(in srgb, var(--c) 62%, #fff); stroke: color-mix(in srgb, var(--c) 75%, #000); stroke-width: 1; }
:root[data-theme="light"] .wm-pin i { color: #fff; border-color: #fff; }

/* mini player that follows you across pages: a rounded card with pause + close, a thin progress line */
.hp.hp-floating.hp-mini { position: fixed; left: auto; top: auto; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(400px, 36vw); max-height: none; border-radius: 16px; overflow: hidden; z-index: 70; background: #000; touch-action: none; box-shadow: 0 18px 44px -10px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.16); animation: mnIn .3s cubic-bezier(.2,.8,.2,1); }
.hp.hp-floating.hp-mini.mn-still { animation: none; }
@keyframes mnIn { from { opacity: 0; } }
.hp.hp-floating.hp-mini .hp-video { border-radius: 0; object-fit: contain; }
.hp.hp-floating.hp-mini .hp-bottom, .hp.hp-floating.hp-mini .hp-click, .hp.hp-floating.hp-mini .hp-chip, .hp.hp-floating.hp-mini .hp-float-bar, .hp.hp-floating.hp-mini .hp-ambient, .hp.hp-floating.hp-mini .hp-flash, .hp.hp-floating.hp-mini .hp-seekflash, .hp.hp-floating.hp-mini .hp-toast, .hp.hp-floating.hp-mini .hp-stats, .hp.hp-floating.hp-mini .hp-menu, .hp.hp-floating.hp-mini .hp-help, .hp.hp-floating.hp-mini .hp-end { display: none !important; }
.mn-ui { position: absolute; inset: 0; z-index: 8; background: linear-gradient(rgba(0,0,0,.4), transparent 38%, transparent 62%, rgba(0,0,0,.4)); }
.mn-hit { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: none; padding: 0; cursor: pointer; }
.mn-pp, .mn-x { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(18,18,20,.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer; transition: background .15s, transform .15s; }
.mn-pp { left: 12px; } .mn-x { right: 12px; }
.mn-pp:hover, .mn-x:hover { background: rgba(18,18,20,.85); }
.mn-pp:active, .mn-x:active { transform: translateY(-50%) scale(.92); }
.mn-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.3); }
.mn-prog b { display: block; height: 100%; width: 0; background: var(--accent, #00E5FF); }
@media (max-width: 820px) {
  .hp.hp-floating.hp-mini { width: min(56vw, 280px); right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); border-radius: 14px; }
  .hp.hp-floating.hp-mini { box-shadow: 0 8px 22px -8px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.16); }
  .mn-pp, .mn-x { width: 40px; height: 40px; }
  .mn-pp { left: 8px; } .mn-x { right: 8px; }
  .w-player, .lv-stage { touch-action: none; }
  .wd-scrim { position: fixed; inset: 0; z-index: 29; background: var(--bg); opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) { .hp.hp-floating.hp-mini { animation: none; } }
@media (min-width: 821px) { #backBtn { display: none !important; } }

/* Tails */
.tl-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 18px; }
.tl-hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.05; margin: 0 0 8px; letter-spacing: -.02em; }
.tl-sub { margin: 0; color: var(--muted, #9aa); max-width: 46ch; }
.tl-tabs { display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--edge, rgba(255,255,255,.1)); margin-bottom: 20px; }
.tl-tabs a { padding: 10px 2px; color: var(--muted, #9aa); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tl-tabs a[aria-selected="true"] { color: var(--fg, #fff); border-color: var(--accent, #19d3f0); }
.tl-tabs .tl-mine { margin-left: auto; font-size: 14px; font-weight: 500; }
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.tl-card { display: grid; gap: 8px; align-content: start; }
.tl-th { position: relative; display: block; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--card, #111); }
.tl-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-ph { display: block; width: 100%; height: 100%; }
.tl-badge { position: absolute; top: 8px; right: 8px; background: var(--accent, #19d3f0); color: #001316; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.tl-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tl-row h3 { margin: 0; font-size: 17px; }
.tl-sec { color: var(--muted, #9aa); font-size: 14px; white-space: nowrap; }
.tl-bar { height: 6px; border-radius: 6px; background: var(--edge, rgba(255,255,255,.12)); overflow: hidden; }
.tl-bar i { display: block; height: 100%; width: 0; background: var(--accent, #19d3f0); border-radius: 6px; }
.tl-who { display: flex; align-items: center; gap: 8px; }
.tl-stack { display: inline-flex; }
.tl-av { display: inline-flex; margin-left: -8px; border: 2px solid var(--bg, #0b0b0c); border-radius: 50%; }
.tl-av:first-child { margin-left: 0; }
.tl-foot { text-align: center; margin: 28px 0 8px; }
.tl-watch, .tl-flow { max-width: 900px; margin: 0 auto; display: grid; gap: 14px; }
.tl-flow.wide { max-width: 1100px; }
.tl-flow h1 { margin: 0; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.01em; }
.tl-flow h2 { margin: 8px 0 0; font-size: 18px; }
.tl-stage { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 16/9; }
.tl-stage video { width: 100%; height: 100%; display: block; background: #000; }
.tl-credit { position: absolute; left: 14px; top: 12px; background: rgba(0,0,0,.6); color: #fff; padding: 5px 11px; border-radius: 999px; font-size: 13px; pointer-events: none; }
.tl-wait { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; background: rgba(0,0,0,.55); color: #fff; }
.tl-title { margin: 0; font-size: clamp(22px, 3.4vw, 32px); }
.tl-by { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tl-prog { margin-left: auto; display: grid; gap: 4px; min-width: min(280px, 100%); }
.tl-note { margin: 0; }
.tl-cta { display: grid; gap: 6px; justify-items: center; text-align: center; margin: 6px 0; }
.tl-big { min-height: 52px; padding-inline: 32px; font-size: 17px; border-radius: 999px; }
.tl-contrib summary, .tl-more summary { cursor: pointer; color: var(--accent, #19d3f0); }
.tl-contrib ol { list-style: none; padding: 8px 0 0; margin: 0; display: grid; gap: 8px; }
.tl-contrib li { display: flex; align-items: center; gap: 8px; }
.tl-pick { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.tl-allow { margin: 0; }
.tl-prev, .tl-live video { width: 100%; max-height: 62vh; border-radius: 14px; background: #000; display: block; }
.tl-live { position: relative; }
.tl-rec { position: absolute; left: 12px; top: 12px; background: rgba(0,0,0,.6); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-variant-numeric: tabular-nums; }
.tl-trim { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.tl-trim label { display: flex; align-items: center; gap: 8px; }
.tl-sum { display: flex; gap: 28px; flex-wrap: wrap; }
.tl-sum div { display: grid; }
.tl-sum b { font-size: 22px; }
.tl-after b { color: var(--accent, #19d3f0); }
.tl-cont { display: flex; gap: 14px; align-items: center; }
.tl-cthumb { width: 150px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--card, #111); flex: none; }
.tl-cthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-cont h2 { margin: 2px 0 4px; }
.tl-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent, #19d3f0); cursor: pointer; font: inherit; }
.tl-notice { margin: 0; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--accent, #19d3f0); }
.tl-done { text-align: center; justify-items: center; }
.tl-subs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tl-subs li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tl-subs li .pill { margin-left: auto; }
.tl-rule { margin: 0; }
@media (max-width: 600px) { .tl-start { width: 100%; justify-content: center; } .tl-cthumb { width: 110px; } .tl-prog { margin-left: 0; width: 100%; } }
.tl-rep { margin-left: auto; font-size: 13px; color: var(--muted, #9aa); }

/* Tails are reels: vertical 9:16 */
.tl-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.tl-th { aspect-ratio: 9/16; }
.tl-row { flex-wrap: wrap; row-gap: 2px; }
.tl-watch { max-width: 480px; }
.tl-stage { aspect-ratio: 9/16; max-height: 78vh; width: auto; margin-inline: auto; }
.tl-flow { max-width: 480px; }
.tl-flow.wide { max-width: 1100px; }
.tl-prev { aspect-ratio: 9/16; max-height: 70vh; width: auto; max-width: 100%; margin-inline: auto; object-fit: contain; }
.tl-live { width: min(100%, 340px); aspect-ratio: 9/16; margin-inline: auto; }
.tl-live video { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.tl-cthumb { width: 64px; aspect-ratio: 9/16; }
.tl-by { justify-content: flex-start; }
.tl-prog { margin-left: 0; width: 100%; }
@media (max-width: 600px) { .tl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .tl-stage { max-height: 74vh; } .tl-cthumb { width: 56px; } }
.tl-stage { width: min(100%, calc(78vh * 9 / 16)); max-height: none; }
.tl-prev { width: min(100%, calc(70vh * 9 / 16)); max-height: none; }
@media (max-width: 600px) { .tl-stage { width: min(100%, calc(74vh * 9 / 16)); } }

/* ---------- Live ---------- */
.lv-hero { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.lv-hero h1 { margin: 0 0 4px; font-family: var(--display); }
.lv-hero .sub { margin: 0; }
.lv-h { font: 700 18px var(--display); margin: 22px 0 12px; }
.lv-none { padding: 22px 0; }
.lv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.lv-card { display: grid; gap: 10px; align-content: start; text-decoration: none; min-width: 0; }
.lv-th { position: relative; display: block; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--sunk); }
.lv-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lv-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.lv-badge { position: absolute; left: 8px; top: 8px; background: #E5322D; color: #fff; font: 700 11px/1 var(--body); letter-spacing: .08em; padding: 5px 7px; border-radius: 5px; display: inline-flex; align-items: center; gap: 5px; }
.lv-badge.lv-inline { position: static; margin-left: 8px; vertical-align: middle; text-decoration: none; font-size: 11px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #E5322D; flex: none; animation: livePulse 1.6s ease-in-out infinite; }
.lv-badge .live-dot { background: #fff; }
.side-live, .subs .live-dot { margin-left: auto; }
.side-live[hidden] { display: none; }
.wm-pin.wm-live i { background: #E5322D; border-color: #fff; width: 22px; height: 22px; left: -11px; top: -11px; box-shadow: 0 0 0 4px rgba(229,50,45,.35), 0 0 16px #E5322D; }
.wm-pin.wm-live .live-dot { background: #fff; animation: none; }
.wm-pin.wm-live { --c: #E5322D; z-index: 3; }
.wm-livepins { pointer-events: none; }
@keyframes livePulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.lv-statusbar .lv-badge { position: static; }
.lv-rep { background: var(--sunk-2); color: var(--ink); }
.lv-count { position: absolute; right: 8px; bottom: 8px; display: inline-flex; gap: 5px; align-items: center; background: rgba(0,0,0,.72); color: #fff; font-size: 12px; padding: 3px 7px; border-radius: 5px; }
.lv-row { display: flex; gap: 10px; min-width: 0; align-items: flex-start; }
.lv-meta { display: grid; min-width: 0; gap: 2px; }
.lv-meta b { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lv-watch { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.lv-stage, .lv-prevbox { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; }
.lv-stage video, .lv-prevbox video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.lv-over { position: absolute; inset: 0; margin: 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 16px; color: #fff; background: rgba(0,0,0,.55); pointer-events: none; }
.lv-over a { pointer-events: auto; }
.lv-title { font: 700 20px/1.3 var(--display); margin: 12px 0 8px; }
.lv-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.lv-by { display: flex; gap: 12px; align-items: center; min-width: 0; }
.lv-by .lv-meta { min-width: 0; }
.lv-chat { padding: 0; display: flex; flex-direction: column; height: min(640px, 78vh); overflow: hidden; }
.lv-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.lv-chat-head > div { display: grid; gap: 2px; }
.lv-chat-h { font: 700 16px var(--display); margin: 0; padding: 0 0 0; }
.lv-chat > .lv-chat-h { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.lv-rchat .lv-chat-h { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.lv-close, .lv-chatcard { display: none; }
.lv-chatbox { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.lv-msgs { flex: 1; overflow-y: auto; padding: 10px 14px; display: grid; gap: 6px; align-content: start; }
.lv-msg { font-size: 14px; overflow-wrap: anywhere; }
.lv-who { font-weight: 600; color: var(--muted); text-decoration: none; }
.lv-form { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); }
.lv-form .field { flex: 1; border-radius: 999px; }
.lv-send { color: var(--accent-text); }
.lv-form .field { min-width: 0; }
.lv-cnote { padding: 12px 14px; margin: 0; border-top: 1px solid var(--line); }
.lv-go { max-width: 760px; display: grid; gap: 14px; }
.lv-go h1 { margin: 0; font-family: var(--display); }
.lv-go .sub { margin: 0; }
.lv-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.lv-statusbar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 12px; }
.lv-statusbar .btn { margin-left: auto; }
.lv-done { padding: 18px; display: grid; gap: 10px; }
.lv-done h2 { margin: 0; font-family: var(--display); }
@media (max-width: 900px) {
  .lv-watch { grid-template-columns: minmax(0, 1fr); }
  .lv-chat { height: 420px; }
  .lv-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
}
.lv-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.lv-tabs button { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; }
.lv-tabs button[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.lv-copy { display: flex; gap: 8px; margin-top: 6px; }
.lv-copy .field { min-width: 0; }
#lgCam { display: grid; gap: 14px; }

.lv-go.is-live .lv-prevbox { max-width: 360px; }

.lv-shelf { margin-bottom: 22px; }
.lv-shelf .hm-h h2 { display: flex; align-items: center; gap: 8px; }

/* Live: moderation, polls, pins, schedule, stats */
.lv-msg { position: relative; display: flex; gap: 10px; align-items: flex-start; }
.avatar.xs { width: 24px; height: 24px; font-size: 11px; margin-top: 1px; }
.lv-line { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lv-more { border: 0; background: none; color: var(--muted, inherit); cursor: pointer; padding: 2px 4px; border-radius: 6px; line-height: 0; opacity: .7; }
.lv-more:hover { opacity: 1; background: var(--sunk); }
.lv-menu { position: absolute; right: 0; top: 100%; z-index: 5; display: grid; background: var(--surface, var(--sunk)); border: 1px solid var(--line); border-radius: 10px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.lv-menu button { border: 0; background: none; color: inherit; font: inherit; text-align: left; padding: 8px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.lv-menu button:hover { background: var(--sunk); }
.lv-tag { margin-left: 5px; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent-text); }
.lv-pin { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; }
.lv-pin[hidden], .lv-poll[hidden] { display: none; }
.lv-pin-ic { margin-top: 2px; color: var(--accent-text); line-height: 0; }
.lv-poll { display: grid; gap: 6px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; }
.lv-poll-q { display: grid; gap: 2px; }
.lv-opt { position: relative; display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; overflow: hidden; }
.lv-opt > * { position: relative; }
.lv-opt i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-soft); transition: width .4s; }
.lv-opt.mine { border-color: var(--accent); }
.lv-vote { cursor: pointer; }
.lv-vote:hover { border-color: var(--accent); }
.lv-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.lv-acts .grow { flex: 1; }
.lv-desc { margin-top: 12px; }
.lv-sched { background: rgba(0,0,0,.7); pointer-events: none; }
.lv-count-d { font: 700 22px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.lv-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.lv-stats h2 { margin: 0 0 10px; font-size: 16px; }
.lv-statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 12px; }
.lv-statgrid div { display: grid; gap: 2px; }
.lv-statgrid b { font: 700 22px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.lv-spark { width: 100%; height: 60px; display: block; margin-top: 4px; }
.lv-rchat { margin-bottom: 16px; }
.lv-rchat .lv-msgs { max-height: 260px; overflow-y: auto; }
.lv-sched-form { display: grid; gap: 12px; max-width: 520px; }

/* Live watch page: laid out like YouTube (desktop: video + chat column; phone: pinned video, chat opens as a sheet) */
.lv-info { min-width: 0; }
.lv-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lv-acts .btn { border-radius: 999px; }
.lv-descbox { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--sunk); cursor: pointer; font-size: 14px; }
.lv-dtext { margin-top: 6px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lv-descbox.open .lv-dtext { display: block; }
.lv-more-l { font-weight: 600; }
.lv-descbox.open .lv-more-l { display: none; }
.lv-nolive .lv-chat { height: auto; max-height: 520px; }
@media (min-width: 901px) {
  .lv-chat { position: sticky; top: calc(var(--top-h) + 16px); height: calc(100dvh - var(--top-h) - 40px); max-height: 800px; border-radius: 12px; }
  .lv-chat .lv-close { display: none; }
}
@media (max-width: 820px) {
  .lv-watch { display: block; }
  .lv-stage { position: sticky; top: 0; z-index: 30; border-radius: 0; }
  .lv-info { margin-inline: 12px; display: flex; flex-direction: column; }
  .lv-title { order: 1; font: 600 18px/1.3 var(--body); margin: 12px 0 6px; }
  .lv-descbox { order: 2; margin: 0 0 4px; padding: 0; background: none; color: var(--muted); font-size: 13px; }
  .lv-descbox b { font-weight: 500; }
  .lv-bar { order: 3; flex-direction: column; align-items: stretch; margin: 10px 0 12px; }
  .lv-acts { justify-content: space-between; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .lv-acts .lbl { display: none; }
  .lv-acts .btn { flex: none; padding-inline: 14px; }
  .lv-chatcard { order: 4; display: grid; gap: 10px; text-align: left; width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--sunk); color: inherit; font: inherit; cursor: pointer; }
  .lv-cc-row { display: flex; align-items: center; gap: 10px; }
  .lv-cc-in { flex: 1; min-width: 0; padding: 9px 14px; border-radius: 999px; background: var(--sunk-2, var(--bg)); color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  #lvStats { order: 5; }
  .lv-nolive .lv-chat { display: none; }
  .lv-chat { display: none; border-radius: 16px 16px 0 0; }
  .lv-chat.open { display: flex; position: fixed; left: 0; right: 0; bottom: 0; top: var(--lv-top, 220px); height: auto; max-height: none; z-index: 45; background: var(--bg); border-width: 1px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .lv-chat .lv-close { display: grid; }
  .lv-chat .lv-msgs { padding-inline: 12px; }
}
.lv-chat .lv-pin, .lv-chat .lv-poll { margin: 8px 10px 0; }
.lv-thumbfield { display: grid; gap: 6px; }
.lv-thumbrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lv-thumbprev { display: grid; place-items: center; width: 160px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--sunk); color: var(--muted); flex: none; }
.lv-thumbprev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lv-loc { display: inline-flex; gap: 4px; align-items: center; margin-left: 10px; color: var(--muted); }
#lgForm, #scForm { display: grid; gap: 12px; margin-top: 12px; }

/* The text for search engines is in the page but never flashes on screen while the app loads */
.seo { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Loading placeholders and a soft fade-in, so pages never "pop" */
.sk { background: var(--sunk-2, var(--sunk)); animation: skPulse 1.3s ease-in-out infinite; }
@keyframes skPulse { 50% { opacity: .5; } }
.sk-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sk-th { aspect-ratio: 16 / 9; border-radius: 12px; }
.sk-ln { height: 14px; border-radius: 7px; width: 85%; }
.sk-ln.s { width: 55%; }
.hm-row > .sk-card { flex: 0 0 min(70vw, 260px); }
@media (min-width: 761px) { .hm-row > .sk-card { flex: none; } }
.sk-watch { display: flex; flex-direction: column; gap: 12px; }
.sk-player { aspect-ratio: 16 / 9; width: 100%; border-radius: 0; background: #000; animation: none; }
.sk-watch .sk-ln { margin-inline: 12px; }
.fadein > * { animation: fadeIn .2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sk, .fadein > * { animation: none; } }

/* ================= Phone chrome (YouTube-style): header with search icon, bottom tab bar ================= */
.st, .sc, .tabbar { display: none; }
@media (max-width: 820px) {
  #menuBtn { display: none; }
  .top { padding-inline: 14px; gap: 6px; }
  .top::after { display: none; }
  .logo { margin-right: auto; }
  .st { display: grid; }
  .search { display: none; }
  .top.searching .search { display: flex; flex: 1 1 auto; max-width: none; margin: 0; align-items: center; gap: 4px; }
  .top.searching .sc { display: grid; }
  .top.searching .logo, .top.searching .st, .top.searching .top-actions { display: none; }
  .top.searching .search input { border-right: 1px solid var(--line); border-radius: 999px 0 0 999px; }

  body.has-tabbar .tabbar { display: flex; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; align-items: flex-end; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgba(14,14,16,.74); border-top: 1px solid rgba(255,255,255,.08); transition: transform .28s cubic-bezier(.2,.8,.2,1); -webkit-backdrop-filter: blur(22px) saturate(1.5) !important; backdrop-filter: blur(22px) saturate(1.5) !important; will-change: transform; }
  :root[data-theme="light"] .tabbar { background: rgba(255,255,255,.78); border-top-color: rgba(0,0,0,.08); }
  .tabbar.tb-hide { transform: translate3d(0, 105%, 0); }
  .tb { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 1px; color: var(--muted); font: 600 10.5px/1.1 var(--body); text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .tb svg { display: block; }
  .tb.on { color: var(--accent); }
  .tb-av { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 2px transparent; }
  .tb.on .tb-av { box-shadow: 0 0 0 2px var(--accent); }
  .tb-av .avatar { width: 26px; height: 26px; font-size: 12px; }
  .tb-plus { display: grid; place-items: center; width: 42px; height: 42px; margin-top: -4px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-style: normal; }
  .tb-create { color: var(--ink); }
  body.has-tabbar main { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  body.has-tabbar .toasts { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  body.has-tabbar .hp.hp-floating.hp-mini { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- You screen ---- */
.you { max-width: 720px; margin: 0 auto; }
.you-head { display: flex; align-items: center; gap: 16px; padding: 4px 0 14px; }
.you-av .avatar { width: 84px; height: 84px; font-size: 34px; }
.you-id { min-width: 0; flex: 1; }
.you-id h1 { margin: 0; font: 700 24px/1.15 var(--display); overflow-wrap: anywhere; }
.you-edit { flex: none; }
.you-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px 0 18px; text-align: center; }
.you-stats div { display: grid; gap: 2px; border-left: 1px solid var(--line); }
.you-stats div:first-child { border-left: 0; }
.you-stats b { font: 700 22px/1.1 var(--display); }
.you-stats span { color: var(--muted); font-size: 14px; }
.you-h { margin: 8px 0 12px; font: 700 26px/1.1 var(--display); }
.you-h a { display: inline-flex; align-items: center; gap: 6px; }
.you-h2 { margin: 26px 0 10px; font: 700 20px/1.2 var(--display); }
.you-sec { margin-bottom: 18px; }
.you-sh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.you-sh h3 { margin: 0; font: 700 19px/1.2 var(--display); }
.you-sh a { display: inline-flex; align-items: center; gap: 2px; }
.you-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: none; margin-inline: -14px; padding-inline: 14px; }
.you-row::-webkit-scrollbar { display: none; }
.you-mc { flex: 0 0 min(44vw, 200px); min-width: 0; display: flex; flex-direction: column; gap: 5px; text-decoration: none; scroll-snap-align: start; }
.you-mc .thumb { border-radius: 12px; }
.you-mc b { font: 600 14px/1.3 var(--body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.you-mc small { color: var(--muted); font-size: 12.5px; }
.you-list { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 16px; }
.you-li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; border-top: 1px solid var(--line); }
.you-li:first-child { border-top: 0; }
.you-ic { display: grid; place-items: center; width: 34px; }
.you-tx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.you-tx b { font: 600 17px/1.2 var(--body); }
.you-tx small { color: var(--muted); font-size: 14px; }
.you-li > svg:last-child { color: var(--muted); flex: none; }
.you-foot { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 20px; }

/* ---- Subscriptions screen ---- */
.subs-head { margin-bottom: 6px; }
.subs-h { margin: 0 0 12px; font: 700 20px/1.2 var(--display); }
.subs-row { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 14px; margin-inline: -14px; padding-inline: 14px; }
.subs-row::-webkit-scrollbar { display: none; }
.subs-ch { position: relative; flex: 0 0 74px; display: grid; justify-items: center; gap: 6px; text-decoration: none; min-width: 0; }
.subs-ch .avatar { width: 66px; height: 66px; font-size: 26px; }
.subs-ch.live .avatar { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px #E5322D; }
.subs-ch span { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--muted); }
.subs-live { position: absolute; top: 50px; left: 50%; transform: translateX(-50%); background: #E5322D; color: #fff; font: 800 9px/1 var(--body); font-style: normal; letter-spacing: .06em; padding: 3px 5px; border-radius: 4px; }
.subs-chips { position: static; padding: 0 0 12px; }
.sh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sh-grid .sh-card { width: auto; }
@media (min-width: 821px) { .sh-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.lg-full { display: none; }
.logo .mark, .logo .wm { display: none; }
.lg-dark { display: block; height: 36px; width: auto; }
:root[data-theme="light"] .lg-dark { display: none; }
:root[data-theme="light"] .lg-light { display: block; height: 36px; width: auto; }

/* ================= Watch page on phones: header + rounded video, Subscribe pill, comments card + sheet, Related list ================= */
.c-x { display: none; }
@media (max-width: 820px) {
  body.watch-mode .top { display: flex; position: static; }
  .w-player { margin: 0; padding: 6px 12px 8px; background: var(--bg); box-shadow: none; }
  .w-player::before, .w-player::after { display: none; }
  .w-player .hp, .w-player .hp .hp-video, .w-player video { border-radius: 14px; }
  .w-player .hp-bottom { border-radius: 0 0 14px 14px; }
  .w-back { left: 18px; top: 12px; }
  .w-main > .row > .grow .subctl { order: 2; }
  .w-main > .row > .grow .chan-line { order: 0; }
  .w-main .chan-line .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
  .w-main .subctl .lbl, .w-acts .lbl { display: inline; }
  .w-main .subctl .btn-dark { background: var(--accent); color: #041018; height: 40px; padding-inline: 22px; font-weight: 700; }
  .w-main .subctl .btn-dark svg { display: none; }
  .w-acts { overflow-x: auto; }
  .w-acts .btn, .w-acts .seg { height: 40px; }
  /* comments: a card with the count and the top comment; opens as a bottom sheet */
  .w-main .comments { display: block; order: 4; margin: 14px 12px 6px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; position: relative; }
  .w-main .comments:not(.open)::after { content: ""; position: absolute; right: 16px; top: 18px; width: 10px; height: 10px; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); }
  .w-main .comments h2 { font: 700 17px/1.2 var(--display); }
  .comments.open { position: fixed; left: 0; right: 0; bottom: 0; top: 14dvh; z-index: 80; margin: 0 !important; border-radius: 20px 20px 0 0; overflow-y: auto; background: var(--bg); padding: 10px 14px calc(20px + env(safe-area-inset-bottom, 0px)); cursor: default; border-width: 1px 0 0; overscroll-behavior: contain; }
  .comments.open .c-head { position: sticky; top: -10px; z-index: 2; background: var(--bg); padding: 8px 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .comments.open .c-x { display: grid; order: 3; margin-left: auto; }
  body.c-open { overflow: hidden; }
  body.c-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 79; }
  .comments.open .c-form .field { font-size: 16px; }
  /* related videos: small thumbnail on the left, title on the right */
  body.watch-mode .up-next { margin-top: 10px; }
  .up-next h2 { display: block; margin: 16px 12px 12px; font: 700 20px/1.2 var(--display); }
  body.watch-mode .up-next .list { gap: 12px; }
  .up-next .mini { grid-template-columns: minmax(0, 44%) minmax(0, 1fr); grid-template-areas: none; gap: 12px; padding: 0 12px; align-items: start; }
  .up-next .mini > .thumb, .up-next .mini > :first-child { grid-area: auto; margin: 0; border-radius: 12px; }
  .up-next .mini .thumb { border-radius: 12px; }
  .up-next .mini .mini-av { display: none; }
  .up-next .mini > div:not(.thumb) { grid-area: auto; padding: 0; }
  .up-next .mini h3 { font: 600 14.5px/1.3 var(--body); }
}
@media (max-width: 820px) {
  .w-main .subctl .btn { width: auto; min-width: 42px; height: 40px; padding-inline: 18px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  .w-main .subctl .sub-on > svg { display: none; }
  .w-main > .row > .grow { min-width: 0; }
  .w-acts { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .w-acts::-webkit-scrollbar { display: none; }
  .w-acts > .btn:has(.lbl) { width: auto; height: 40px; padding-inline: 14px; display: inline-flex; flex: 0 0 auto; gap: 6px; flex-direction: row; }
  .w-acts > .btn .lbl { font-size: 14px; position: static; }
  .w-acts > * { flex: 0 0 auto; }
}
.up-x, .m-only, .up-sub { display: none; }
@media (max-width: 820px) {
  .up-create { padding: 8px 16px 90px; }
  .up-x { display: grid; place-items: center; margin-left: -8px; }
  .up-create .page-title { font-size: 30px; margin: 4px 0 2px; }
  .up-sub { display: block; color: var(--muted, #9aa3ad); margin: 0 0 18px; }
  .d-only { display: none; } .m-only { display: inline; }
  .up-create .drop { border: 2px dashed var(--accent); border-radius: 18px; background: var(--accent-soft); min-height: 220px; }
  .up-create .studio-grid { grid-template-columns: 1fr; }
  .up-create .preview .row { position: sticky; bottom: 76px; }
  .up-create .preview .row .btn { flex: 1; height: 48px; border-radius: 999px; }
}

/* ===== Mesh: claim (pink) beside its fact-check (blue) ===== */
:root { --mesh-pink: #FC3487; --mesh-blue: #00B8D9; --mesh-pink-soft: rgba(252,52,135,.14); --mesh-blue-soft: rgba(0,184,217,.14); }
:root:not([data-theme="light"]) { --mesh-blue: #00E5FF; --mesh-blue-soft: rgba(0,229,255,.13); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --mesh-blue: #00A9C7; --mesh-blue-soft: rgba(0,169,199,.13); } }
:root[data-theme="light"] { --mesh-blue: #00A9C7; --mesh-blue-soft: rgba(0,169,199,.13); }
:root[data-theme="dark"] { --mesh-blue: #00E5FF; --mesh-blue-soft: rgba(0,229,255,.13); }
.pk { color: var(--mesh-pink); } .bl { color: var(--mesh-blue); }
.mesh-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 20px; }
.mesh-hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.05; margin: 0 0 8px; letter-spacing: -.02em; }
.mesh-sub { margin: 0; max-width: 56ch; color: var(--muted); }
.mesh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.mesh-card { display: grid; gap: 8px; color: inherit; text-decoration: none; padding: 10px; border-radius: 16px; background: var(--surface, rgba(128,128,128,.07)); border: 1px solid var(--line); }
.mesh-card h3 { margin: 2px 0 0; font-size: 16px; line-height: 1.3; }
.mesh-duo-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mesh-duo-mini .mp { position: relative; aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; background: #000; border: 2px solid var(--mesh-pink); }
.mesh-duo-mini .mp.blue { border-color: var(--mesh-blue); }
.mesh-duo-mini img, .mesh-nothumb { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.mesh-nothumb { background: #111; color: #888; font-size: 12px; text-align: center; padding: 6px; }
.mesh-tag { position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--mesh-pink); color: #fff; }
.mesh-duo-mini .blue .mesh-tag { background: var(--mesh-blue); color: #04141a; }
.mesh-badge { justify-self: start; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--mesh-blue-soft); color: var(--ink); border: 1px solid var(--mesh-blue); }
.mesh-badge.disputed { background: var(--mesh-pink-soft); border-color: var(--mesh-pink); }
.mesh-badge.mixed { background: rgba(128,128,128,.14); border-color: var(--line-strong); }
.mesh-new, .mesh-view { max-width: 1100px; margin: 0 auto; display: grid; gap: 14px; }
.mesh-title { margin: 0; font-size: clamp(22px, 4vw, 32px); line-height: 1.2; }
.mesh-note { font-style: italic; }
.mesh-form { display: grid; gap: 12px; max-width: 560px; }
.mesh-form label { display: grid; gap: 6px; font-weight: 600; }
.mesh-form input[type=text], .mesh-form input:not([type]), .mesh-form input[type=url] { font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); }
.mesh-drop { min-height: 150px; }
.mesh-duo { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 821px) { .mesh-duo { grid-template-columns: 1fr 1fr; gap: 18px; } }
.mesh-pane { border-radius: 18px; padding: 8px; border: 2px solid var(--mesh-pink); background: var(--mesh-pink-soft); }
.mesh-pane.blue { border-color: var(--mesh-blue); background: var(--mesh-blue-soft); }
.mesh-lab { display: flex; align-items: center; gap: 8px; padding: 4px 6px 8px; font-weight: 800; letter-spacing: .08em; font-size: 12px; color: var(--mesh-pink); }
.mesh-pane.blue .mesh-lab { color: var(--mesh-blue); }
.mesh-lab span { flex: 1; }
.mesh-screen { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; }
.mesh-screen video { width: 100%; height: 100%; object-fit: contain; display: block; }
.mesh-snd { position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.mesh-snd[aria-pressed="true"] { background: var(--mesh-pink); }
.mesh-pane.blue .mesh-snd[aria-pressed="true"] { background: var(--mesh-blue); color: #04141a; }
.mesh-empty { position: absolute; inset: 0; display: grid; place-content: center; gap: 4px; text-align: center; padding: 16px; color: #ddd; }
.mesh-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mesh-info { display: grid; gap: 10px; }
.mesh-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mesh-who span { flex: 1; min-width: 0; }
.mesh-src { display: inline-flex; align-items: center; gap: 6px; color: var(--mesh-blue); font-weight: 600; word-break: break-all; }
.mesh-vote { display: flex; gap: 10px; flex-wrap: wrap; }
.mesh-vote .btn b { margin-left: 4px; }
.mesh-list { display: grid; gap: 8px; }
.mesh-item { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; text-align: left; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; font: inherit; }
.mesh-item.on { border-color: var(--mesh-blue); background: var(--mesh-blue-soft); }
.mesh-item .mt { aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; background: #000; display: block; }
.mesh-item .mt img { width: 100%; height: 100%; object-fit: cover; }
.mesh-item .sub { display: block; }
.mesh-add { display: grid; gap: 10px; padding-bottom: 80px; }
.mesh-add h2, #mvOthers h2 { font-size: 18px; margin: 4px 0; }
.mesh-who > span:not(.avatar) { flex: 1; min-width: 0; }
.mesh-who .avatar { flex: 0 0 auto; }
.mesh-lab { min-height: 40px; }
.mesh-add .btn, .mesh-bar .btn { justify-self: start; width: auto; }
.mesh-add #mvAddBtn { justify-self: start; }

/* ---------- watch page: like / dislike pill (desktop) ---------- */
@media (min-width: 821px) {
  .w-acts .seg { display: inline-flex; align-items: stretch; height: 40px; padding: 0; gap: 0; overflow: hidden; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); }
  .w-acts .seg .btn { height: 100%; min-width: 0; padding: 0 16px; gap: 8px; border: 0; border-radius: 0; background: none; color: var(--ink); font-weight: 600; font-size: 14px; box-shadow: none; transition: background .15s ease, color .15s ease; }
  .w-acts .seg .btn:first-child { padding-left: 18px; }
  .w-acts .seg .btn:last-child { padding-right: 18px; }
  .w-acts .seg .btn:first-child::after { content: ""; position: absolute; right: 0; top: 10px; bottom: 10px; width: 1px; background: var(--line-strong); }
  .w-acts .seg .btn:hover { background: var(--accent-soft); }
  .w-acts .seg .btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); box-shadow: none; }
  .w-acts .seg .btn[aria-pressed="true"] svg { color: var(--accent-text); }
  .w-acts .seg .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
  .w-acts .seg .num { font-variant-numeric: tabular-nums; }
}
