/* ---------- tokens ---------- */
/* Dark is the default look; light is chosen in Settings (data-theme="light"). */
:root {
  --chart: #FF3B47;
  --bg: #0B0B0C; --surface: #141416; --sunk: #1C1C1F; --sunk-2: #27272B; --line: #26262B;
  --line-strong: #3A3A41; --ink: #F6F6F4; --muted: #A1A1A6; --accent: #FF1F2D; --accent-hover: #FF4752; --accent-ink: #FFFFFF;
  --accent-text: #FF6B73; --accent-soft: rgba(255,31,45,.16); --danger: #FF6B5B; --ok: #5FD38A;
  --grad: linear-gradient(135deg, #FF4B55 0%, #FF1F2D 55%, #D40F1B 100%);
  --glow: 0 8px 26px rgba(255,31,45,.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: #D6101B;
  --bg: #FAFAF8; --surface: #FFFFFF; --sunk: #F1F0EE; --sunk-2: #E7E5E2; --line: #E6E4E0;
  --line-strong: #CFCCC7; --ink: #0B0B0C; --muted: #5E5E63; --accent: #E5101C; --accent-hover: #C40D17; --accent-ink: #FFFFFF;
  --accent-text: #B5000C; --accent-soft: #FFE5E7; --danger: #C21807; --ok: #1F7A3A;
  --glow: 0 8px 24px rgba(229,16,28,.28);
  --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: #FF1F2D; color: #fff; }
.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 #FF1F2D; }
.swatch .sdot { width: 9px; height: 9px; border-radius: 3px; background: #FF1F2D; }
.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: #FF1F2D !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(255,31,45,.09), transparent 60%), var(--bg); background-attachment: fixed; }
:root[data-theme="light"] body { background: radial-gradient(1200px 500px at 85% -10%, rgba(229,16,28,.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(255,31,45,.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: #fff; }
.btn { transition: transform .12s, box-shadow .2s, background .2s; }
.btn-primary { background: var(--grad); color: #fff; }
.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: #fff; 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(255,31,45,.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: #FF1F2D; 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: #D6101B;
  --bg: #FFFFFF; --surface: #FFFFFF; --sunk: #F5F4F5; --sunk-2: #EAE8EA; --line: #ECE9EC;
  --accent: #E5101C; --accent-hover: #C40D17; --accent-ink: #FFFFFF;
  --accent-text: #B5000C; --accent-soft: #FFE5E7;
  --grad: linear-gradient(135deg, #FF5560 0%, #E5101C 55%, #B80C16 100%);
  --glow: 0 8px 24px rgba(229,16,28,.28);
  --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(229,16,28,.06), transparent 60%), var(--bg); background-attachment: fixed; }
:root[data-theme="light"] ::selection { background: rgba(229,16,28,.25); }
:root[data-theme="light"] .avatar.h0 { background: #E5101C; color: #fff; }
:root[data-theme="light"] .switch-row input { accent-color: #E5101C; }

: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(255,31,45,.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(255,31,45,.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(255,31,45,.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(255,31,45,.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(255,31,45,.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(229,16,28,.06), transparent 70%), radial-gradient(700px 460px at 100% 4%, rgba(229,16,28,.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(255,31,45,.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(255,31,45,.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(255,31,45,.55); background: rgba(255,31,45,.07); color: var(--accent); border-radius: 14px; font-weight: 700; }
.side .side-create:hover { background: rgba(255,31,45,.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(255,31,45,.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(255,31,45,.12); color: var(--accent-text); border: 1px solid rgba(255,31,45,.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(255,31,45,.1); border: 1px solid rgba(255,31,45,.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: #FF1F2D; }
.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, #FF1F2D); }
@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: #E5101C; --mesh-blue: #00B8D9; --mesh-pink-soft: rgba(229,16,28,.14); --mesh-blue-soft: rgba(0,184,217,.14); }
:root:not([data-theme="light"]) { --mesh-blue: #FF1F2D; --mesh-blue-soft: rgba(255,31,45,.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: #FF1F2D; --mesh-blue-soft: rgba(255,31,45,.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; }
}

/* ----- admin mailbox, Gmail-style ----- */
.gmx { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 16px; max-width: 1280px; margin: 0 auto; padding: 8px 0 40px; align-items: start; }
.gmx-side { position: sticky; top: calc(var(--top-h) + 12px); }
.gmx-compose { width: 100%; justify-content: flex-start; padding: 14px 18px; border-radius: 16px; margin-bottom: 14px; font-size: 15px; }
.gmx-nav { display: flex; flex-direction: column; }
.gmx-nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 0 999px 999px 0; color: var(--muted); text-decoration: none; font-size: 14px; }
.gmx-nav a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmx-nav a:hover { background: var(--sunk); color: var(--ink); }
.gmx-nav a.on { background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.gmx-nav b { font-size: 12px; color: var(--ink); }
.gmx-h { font-size: 12px; color: var(--muted); margin: 18px 14px 6px; text-transform: uppercase; letter-spacing: .08em; }
.gmx-st { font-size: 12px; color: var(--muted); margin: 18px 14px 0; }
.gmx-main { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-height: 60vh; min-width: 0; }
.gmx-tb { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.gmx-title { white-space: nowrap; }
.gmx-search { flex: 1; min-width: 0; }
.gmx-search .field { border-radius: 999px; }
.gmx-pad { padding: 20px 16px; }
.gmx-row { display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: center; font-size: 14px; color: var(--muted); }
.gmx-row:hover, .gmx-row:focus-visible { background: var(--sunk); }
.gmx-row.unread { background: var(--sunk); color: var(--ink); }
.gmx-row.unread .gmx-who, .gmx-row.unread .gmx-sub b { font-weight: 700; color: var(--ink); }
.gmx-who, .gmx-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gmx-sub i { font-style: normal; color: var(--muted); }
.gmx-date { font-size: 12px; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.gmx-x { display: none; border: 0; background: transparent; cursor: pointer; padding: 2px 6px; }
.gmx-row:hover .gmx-x { display: inline-block; }
.gmx-more { padding: 14px; text-align: center; }
.gmx-read { padding: 18px 22px; }
.gmx-subj { font-size: 22px; margin: 0 0 14px; overflow-wrap: anywhere; }
.gmx-hd { display: flex; gap: 12px; align-items: center; }
.gmx-hm { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.gmx-av { width: 40px; height: 40px; border-radius: 50%; background: #E5101C; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.gmx-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 18px; line-height: 1.6; }
.gmx-acts { margin-top: 22px; gap: 10px; }
.gmx-cw { position: fixed; right: 24px; bottom: 0; width: 540px; max-width: 100vw; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px 12px 0 0; box-shadow: var(--shadow); z-index: 200; }
.gmx-cwh { background: var(--sunk-2); padding: 10px 14px; border-radius: 12px 12px 0 0; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; }
.gmx-cwx { border: 0; background: transparent; cursor: pointer; padding: 2px 8px; }
.gmx-cw.min .gmx-cwb { display: none; }
.gmx-f { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 0 14px; }
.gmx-f > span { color: var(--muted); font-size: 14px; width: 36px; flex: none; }
.gmx-f a { font-size: 13px; color: var(--accent-text); }
.gmx-f input, .gmx-f select { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 0; outline: none; }
.gmx-cwb textarea { display: block; width: 100%; border: 0; background: transparent; min-height: 280px; max-height: 50vh; padding: 12px 14px; resize: none; outline: none; }
.gmx-cwf { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; }
@media (max-width: 820px) { .gmx { grid-template-columns: minmax(0, 1fr); } .gmx-side { position: static; } .gmx-row { grid-template-columns: minmax(0, 1fr) auto; } .gmx-who { grid-column: 1 / -1; } .gmx-cw { right: 0; width: 100vw; } }

/* ----- piggier.com front door (always dark, "cosmic minimal") ----- */
body.landing-mode .top, body.landing-mode .side, body.landing-mode .tabbar, body.landing-mode .scrim { display: none !important; }
body.landing-mode .shell { display: block; }
body.landing-mode main { padding: 0; }
body.landing-mode { background: #03070f; }
.ld { --ld-ink: #fff; --ld-mute: #a6b0c3; position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; color: var(--ld-ink); background: #03070f; display: flex; flex-direction: column; font-family: var(--body); }
.ld-sky { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55), transparent 60%), radial-gradient(1px 1px at 33% 9%, rgba(255,255,255,.4), transparent 60%), radial-gradient(1.5px 1.5px at 71% 22%, rgba(255,255,255,.5), transparent 60%),
  radial-gradient(1px 1px at 88% 41%, rgba(255,255,255,.35), transparent 60%), radial-gradient(1px 1px at 22% 55%, rgba(255,255,255,.3), transparent 60%), radial-gradient(1px 1px at 55% 12%, rgba(255,255,255,.45), transparent 60%),
  radial-gradient(900px 420px at 50% 42%, rgba(20,60,140,.28), transparent 70%), #03070f; }
.ld-planet { position: absolute; left: 50%; top: 46%; width: 190vw; height: 190vw; max-width: 2600px; max-height: 2600px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 50% 0%, #07101f 0%, #03070f 55%); border-top: 1px solid rgba(110,165,255,.45); box-shadow: 0 -2px 60px rgba(60,120,255,.28), inset 0 30px 90px rgba(40,90,200,.14); }
.ld-moon { position: absolute; right: -9vw; top: 5vh; width: 22vw; height: 22vw; min-width: 120px; min-height: 120px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #17233a, #060b16 70%); box-shadow: inset -8px -8px 30px rgba(0,0,0,.6), 0 0 40px rgba(50,90,180,.15); }
.ld-orb { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #151d2e, #04070e 70%); }
.ld-orb.o1 { left: 7%; top: 24%; width: 5vw; height: 5vw; min-width: 44px; min-height: 44px; }
.ld-orb.o2 { right: 14%; top: 34%; width: 28px; height: 28px; }
.ld > :not(.ld-sky) { position: relative; z-index: 1; }
.ld-nav { display: flex; justify-content: space-between; align-items: center; padding: 22px clamp(18px, 5.5vw, 96px); }
.ld-logo img { display: block; height: 52px; width: auto; }
.ld-links { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); font-size: 16px; }
.ld-links a { color: var(--ld-mute); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.ld-links a:hover { color: #fff; }
.ld-links a.on { color: #fff; border-bottom-color: #00E5FF; }
.ld-links a.ld-sign { color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 12px 28px; }
.ld-links a.ld-sign:hover { border-color: #00E5FF; }
.ld-hero { text-align: center; padding: clamp(28px, 6vh, 70px) 18px 0; }
.ld-hero h1 { margin: 0; font: 500 clamp(48px, 9.5vw, 128px)/.98 var(--body); letter-spacing: -.035em; }
.ld-dot { color: #00E5FF; }
.ld-hero p { margin: 22px 0 28px; font-size: clamp(18px, 2.2vw, 28px); color: var(--ld-mute); font-weight: 300; }
.ld-cta { display: inline-flex; align-items: center; gap: 12px; background: #00E5FF; color: #031018; border: 0; border-radius: 999px; padding: 15px 36px; font: 600 18px/1 var(--body); cursor: pointer; }
.ld-cta:hover { background: #5CF0FF; }
.ld-apps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; padding: clamp(28px, 6vh, 64px) clamp(18px, 3.5vw, 64px) 24px; margin-top: auto; }
.ld-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 18px 22px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); border: 1px solid rgba(255,255,255,.12); border-radius: 26px; color: #fff; cursor: pointer; backdrop-filter: blur(6px); transition: transform .18s, border-color .18s, background .18s; }
.ld-card:hover, .ld-card:focus-visible { transform: translateY(-4px); border-color: rgba(0,229,255,.55); background: rgba(255,255,255,.06); }
.ld-card img { width: clamp(84px, 9vw, 144px); height: auto; aspect-ratio: 1; object-fit: contain; }
.ld-card h2 { margin: 0; font: 600 clamp(22px, 2.2vw, 32px)/1.1 var(--body); }
.ld-open { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 4px 4px 4px 22px; font-size: 16px; }
.ld-open i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #00E5FF; color: #fff; }
.ld-foot { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; padding: 14px 18px 26px; font-size: 13px; color: var(--ld-mute); }
.ld-foot a { color: var(--ld-mute); text-decoration: none; }
.ld-foot a:hover { color: #fff; }
.ld-dlg { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(2,5,12,.72); backdrop-filter: blur(6px); padding: 18px; }
.ld-dlg-box { width: min(380px, 100%); text-align: center; background: #0a1220; border: 1px solid rgba(255,255,255,.16); border-radius: 24px; padding: 30px 26px 26px; color: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.ld-dlg-box img { width: 96px; height: 96px; object-fit: contain; }
.ld-dlg-box h3 { margin: 12px 0 6px; font: 600 24px/1.2 var(--body); }
.ld-dlg-box p { margin: 0 0 20px; color: #a6b0c3; }
@media (max-width: 1000px) { .ld-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .ld-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .ld-nav { padding-top: 16px; } .ld-logo img { height: 40px; } .ld-links a:not(.ld-sign) { display: none; } .ld-links a.ld-sign { padding: 9px 18px; font-size: 14px; } .ld-card { padding: 22px 12px 16px; border-radius: 22px; } .ld-open { font-size: 14px; padding-left: 14px; } .ld-open i { width: 34px; height: 34px; } }
body.landing-mode.landing-mode .shell, body.landing-mode.landing-mode .shell.collapsed { display: block; padding-left: 0 !important; }
body.landing-mode.has-tabbar { padding-bottom: 0 !important; }
.ld-about-hero { padding-top: clamp(20px, 5vh, 56px); }
.ld-about-hero h1 { font-size: clamp(40px, 7vw, 88px); }
.ld-about-hero p { max-width: 640px; margin-left: auto; margin-right: auto; }
.ld-about { width: min(860px, 100%); margin: 36px auto 24px; padding: 0 18px; display: grid; gap: 16px; }
.ld-about article { background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 24px 28px; backdrop-filter: blur(6px); }
.ld-about h2 { margin: 0 0 8px; font: 600 22px/1.25 var(--body); }
.ld-about p, .ld-about li { margin: 0; color: #c3cbdb; line-height: 1.65; font-size: 16px; }
.ld-about a { color: #5CF0FF; }
.ld-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.ld-list b { color: #fff; }

.ld-earth { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ld-sky.gl .ld-planet { display: none; }
.ld-stars { position: absolute; inset: 0; background-image: radial-gradient(1.2px 1.2px at 8% 14%, #fff, transparent), radial-gradient(1.4px 1.4px at 24% 32%, #cfe3ff, transparent), radial-gradient(1px 1px at 41% 8%, #fff, transparent), radial-gradient(1.3px 1.3px at 63% 28%, #fff, transparent), radial-gradient(1px 1px at 79% 12%, #cfe3ff, transparent), radial-gradient(1.2px 1.2px at 91% 33%, #fff, transparent), radial-gradient(1px 1px at 15% 46%, #fff, transparent), radial-gradient(1px 1px at 52% 40%, #cfe3ff, transparent), radial-gradient(1.2px 1.2px at 70% 6%, #fff, transparent), radial-gradient(1px 1px at 35% 20%, #fff, transparent); animation: ld-twinkle 4s ease-in-out infinite alternate; }
.ld-stars::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 5% 30%, #fff, transparent), radial-gradient(1.3px 1.3px at 30% 12%, #fff, transparent), radial-gradient(1px 1px at 58% 22%, #cfe3ff, transparent), radial-gradient(1.2px 1.2px at 84% 24%, #fff, transparent), radial-gradient(1px 1px at 96% 8%, #fff, transparent), radial-gradient(1px 1px at 47% 34%, #fff, transparent); animation: ld-twinkle 3s ease-in-out 1.2s infinite alternate-reverse; }
.ld-shoot { position: absolute; width: 140px; height: 2px; background: linear-gradient(90deg, rgba(255,255,255,0), #fff); border-radius: 2px; opacity: 0; transform: rotate(-24deg); }
.ld-shoot.s1 { left: 62%; top: 10%; animation: ld-shoot 9s 2s infinite; }
.ld-shoot.s2 { left: 18%; top: 22%; animation: ld-shoot 13s 7s infinite; }
.ld-moon { animation: ld-drift 18s ease-in-out infinite alternate; }
.ld-orb.o1 { animation: ld-drift 14s ease-in-out infinite alternate; }
.ld-orb.o2 { animation: ld-drift 11s ease-in-out -4s infinite alternate; }
.ld-card { animation: ld-float 6s ease-in-out infinite; }
.ld-card:nth-child(2) { animation-delay: -1.2s; } .ld-card:nth-child(3) { animation-delay: -2.4s; } .ld-card:nth-child(4) { animation-delay: -3.6s; } .ld-card:nth-child(5) { animation-delay: -4.8s; }
.ld-card:hover { animation-play-state: paused; }
.ld-card img { transition: transform .4s; } .ld-card:hover img { transform: scale(1.08) rotate(6deg); }
.ld-dot { animation: ld-pulse 2.4s ease-in-out infinite; display: inline-block; }
.ld-cta { box-shadow: 0 0 0 0 rgba(0,229,255,.5); animation: ld-ping 2.6s ease-out infinite; }
@keyframes ld-twinkle { from { opacity: .35; } to { opacity: 1; } }
@keyframes ld-drift { from { transform: translate(0, 0); } to { transform: translate(-14px, 18px); } }
@keyframes ld-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes ld-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .7; } }
@keyframes ld-ping { 0% { box-shadow: 0 0 0 0 rgba(0,229,255,.5); } 70%, 100% { box-shadow: 0 0 0 16px rgba(0,229,255,0); } }
@keyframes ld-shoot { 0%, 92% { opacity: 0; transform: translate(0, 0) rotate(-24deg); } 94% { opacity: 1; } 100% { opacity: 0; transform: translate(-320px, 140px) rotate(-24deg); } }
@media (prefers-reduced-motion: reduce) { .ld-stars, .ld-stars::after, .ld-moon, .ld-orb, .ld-card, .ld-dot, .ld-cta, .ld-shoot { animation: none !important; } }
.ld-sky::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 38% at 50% 30%, rgba(3,7,15,.55), transparent 75%); pointer-events: none; }
.side a img.ring { width: 22px; height: 22px; object-fit: contain; flex: none; }
.tb img.ring { width: 24px; height: 24px; object-fit: contain; display: block; margin: 0 auto; }
.ld-circle-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 22px 8px 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; color: #fff !important; text-decoration: none; font-weight: 600; }
.ld-circle-btn:hover { border-color: #00E5FF; }
.ld-circle-btn img { display: block; }
.ld-logo img { height: 56px; }
.side .side-circle { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px 6px; padding: 4px 6px; }
.side-circle img { width: 46px; height: 46px; object-fit: contain; }
.sc-name { font: 700 28px/1 var(--display); letter-spacing: -.01em; color: var(--ink); }
.logo.logo-circle { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-circle img { width: 34px; height: 34px; object-fit: contain; }
.logo-circle .sc-name { font-size: 22px; }
body:not(.watch-mode):not(.shorts-mode) .side .side-circle { flex-direction: row; align-items: center; gap: 12px; padding: 8px 10px 16px 14px; }
.logo.logo-circle .sc-name { display: inline !important; }
.cl-light { display: none; }
:root[data-theme="light"] .cl-dark { display: none; }
:root[data-theme="light"] .cl-light { display: block; }
.side-circle img.cl-dark, .side-circle img.cl-light { width: 128px; height: auto; object-fit: contain; }
.logo-circle img.cl-dark, .logo-circle img.cl-light { width: auto; height: 34px; object-fit: contain; }

/* ----- Circle look: red accent, 4-column grid, calmer Create button ----- */
body:not(.landing-mode) .side .side-create { border: 1px solid var(--line-strong); background: var(--sunk); color: var(--ink); }
body:not(.landing-mode) .side .side-create:hover { background: var(--sunk-2); }
body:not(.landing-mode) .side a[aria-current="page"] { background: var(--accent-soft); }
@media (min-width: 1400px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 18px; } }
@media (min-width: 1300px) { .hm-row { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 28px 20px; } }
.hm-chips { margin: 0 0 16px; }

/* ----- Front door: Earth picture + live layer ----- */
.ld-sky.bg { background: #02050c url(/earth-bg.jpg?v=166) center top / cover no-repeat; }
.ld-sky.bg::after { background: radial-gradient(55% 38% at 50% 36%, rgba(2,6,16,.5), transparent 78%); }
.ld-live { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* one logo at a time: the top bar shows it on phones/tablets, the side menu only on wide screens */
@media (max-width: 900px) { body .side .side-logo, body .side .side-circle { display: none !important; } body .top .logo-circle { display: flex !important; } }
@media (max-aspect-ratio: 1/1) { .ld-sky.bg { background-size: 240% auto; background-position: 50% 0; } }
/* watch + shorts pages: the top bar already shows the logo, so the side menu must not repeat it */
body.watch-mode .side .side-logo, body.watch-mode .side .side-circle, body.shorts-mode .side .side-logo, body.shorts-mode .side .side-circle { display: none !important; }

/* matte frosted glass app cards: the picture behind is blurred and tinted so the cards stand out */
.ld-card { background: linear-gradient(180deg, rgba(26,34,54,.68), rgba(10,15,28,.74)); -webkit-backdrop-filter: blur(26px) saturate(1.15); backdrop-filter: blur(26px) saturate(1.15); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px rgba(255,255,255,.03), 0 18px 40px rgba(0,0,0,.45); }
.ld-card:hover, .ld-card:focus-visible { background: linear-gradient(180deg, rgba(34,44,68,.72), rgba(14,20,36,.78)); border-color: rgba(0,229,255,.5); }

/* ================= Havoc Mesh ================= */
body.havoc-mode .top, body.havoc-mode .side, body.havoc-mode .tabbar, body.havoc-mode .scrim { display: none !important; }
body.havoc-mode .shell { padding: 0 !important; display: block; }
body.havoc-mode #main { margin: 0 !important; padding: 0 !important; max-width: none; }
.hv-app { --hv-bg: #050a14; --hv-card: #0d1626; --hv-line: rgba(255,255,255,.12); --hv-mute: #8fa0b8; --hv-c: #00D9FF; --hv-p: #FF0A7A;
  min-height: 100vh; background: var(--hv-bg); color: #fff; display: flex; font-family: "Sora", system-ui, sans-serif; }
.hv-app a { color: inherit; }
.hv-rail { display: none; }
.hv-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hv-top { display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px; }
.hv-brand { font-weight: 800; font-size: 1.35rem; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.hv-bk { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; margin-left: -10px; }
.hv-gap { flex: 1; } .hv-acct { min-height: 44px; display: flex; align-items: center; text-decoration: none; font-weight: 600; }
.hv-body { padding: 4px 16px 110px; max-width: 1100px; width: 100%; box-sizing: border-box; margin: 0 auto; }
.hv-tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: rgba(5,10,20,.96); border-top: 1px solid var(--hv-line); padding: 8px 0 max(10px, env(safe-area-inset-bottom)); z-index: 30; backdrop-filter: blur(10px); }
.hv-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--hv-mute); text-decoration: none; min-height: 48px; justify-content: center; }
.hv-tabbar a.on { color: var(--hv-c); }
.hv-h1 { font-size: clamp(2.4rem, 9vw, 4rem); line-height: 1.02; letter-spacing: -.025em; margin: 6px 0 10px; font-weight: 800; }
.hv-h1.s { font-size: clamp(1.9rem, 7vw, 2.6rem); } .hv-h1 .c { color: var(--hv-c); } .hv-h1 .p { color: var(--hv-p); }
.hv-h2 { font-size: 1.4rem; margin: 10px 0 4px; font-weight: 800; } .c { text-align: center; }
.hv-lead { color: var(--hv-mute); max-width: 560px; margin: 0 0 14px; line-height: 1.5; } .hv-lead.c { margin-inline: auto; }
.hv-title { font-size: clamp(1.5rem, 5vw, 2.1rem); line-height: 1.12; margin: 6px 0 4px; font-weight: 800; letter-spacing: -.01em; }
.hv-meta { color: var(--hv-mute); font-size: .85rem; } .hv-meta.c { text-align: center; }
.hv-chip { background: rgba(120,140,170,.2); border-radius: 12px; padding: 4px 10px; font-size: .8rem; white-space: nowrap; }
.hv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 26px; border: 0; font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; color: #fff; background: var(--hv-card); }
.hv-btn.c { background: var(--hv-c); color: #021018; } .hv-btn.p { background: var(--hv-p); color: #fff; }
.hv-btn.ghost { background: transparent; border: 1px solid var(--hv-line); } .hv-btn.wide { width: 100%; box-sizing: border-box; } .hv-btn.big { min-height: 56px; font-size: 1.05rem; }
.hv-link { display: block; text-align: center; background: none; border: 0; font: inherit; font-weight: 600; padding: 14px; color: #fff; text-decoration: none; cursor: pointer; } .hv-link.c { color: #fff; } .hv-link.p { color: var(--hv-p); }
.hv-pill { display: inline-block; width: fit-content; border-radius: 14px; padding: 5px 12px; font-size: .78rem; font-weight: 700; background: var(--hv-p); color: #fff; } .hv-pill.against { background: var(--hv-c); color: #021018; }
.hv-time { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 8px; }
.hv-nothumb { display: block; width: 100%; height: 100%; background: linear-gradient(160deg, #1b2a46, #0b1424); }
.hv-app img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hv-av { width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--hv-p); background: linear-gradient(160deg, #5a1240, #2a0a22); display: inline-block; flex-shrink: 0; } .hv-av.against { border-color: var(--hv-c); background: linear-gradient(160deg, #124a66, #0a1f33); }
.hv-ring { width: 22px; height: 22px; border-radius: 50%; border: 5px solid var(--hv-p); border-bottom-color: transparent; display: inline-block; }
/* Discover */
.hv-feature { display: flex; flex-direction: column; gap: 16px; }
.hv-fcard { position: relative; border-radius: 24px; overflow: hidden; background: var(--hv-card); min-height: 400px; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; gap: 10px; }
.hv-split-img { position: absolute; inset: 0; } .hv-split-img span { position: absolute; inset: 0; }
.hv-split-img .l { clip-path: polygon(0 0, 56% 0, 40% 100%, 0 100%); } .hv-split-img .r { clip-path: polygon(56% 0, 100% 0, 100% 100%, 40% 100%); }
.hv-slash { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 47.6%, var(--hv-c) 47.9%, var(--hv-p) 48.5%, transparent 48.8%); }
.hv-fcard::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,10,20,0) 35%, rgba(5,10,20,.92)); z-index: 1; }
.hv-fmeta, .hv-fbtns { position: relative; z-index: 2; } .hv-fmeta h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); margin: 8px 0 0; line-height: 1.1; font-weight: 800; }
.hv-fbtns { display: flex; gap: 10px; } .hv-fbtns .hv-btn { flex: 1; }
.hv-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hv-tile { position: relative; border-radius: 18px; overflow: hidden; min-height: 112px; background: var(--hv-card); text-decoration: none; display: flex; align-items: flex-end; }
.hv-tile-img { position: absolute; inset: 0; opacity: .55; } .hv-tile::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 20%, rgba(5,10,20,.9)); }
.hv-tile-t { position: relative; z-index: 2; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; } .hv-tile-t b { font-size: 1rem; line-height: 1.15; } .hv-tile-t small { color: var(--hv-mute); font-size: .75rem; }
.hv-tile-go { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: rgba(60,70,90,.8); display: flex; align-items: center; justify-content: center; }
/* Topic pool */
.hv-thead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; } .hv-thead .hv-btn { min-height: 44px; flex-shrink: 0; }
.hv-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; } .hv-pills button { border: 0; border-radius: 22px; padding: 0 18px; min-height: 44px; background: #121c2e; color: #fff; font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--hv-line); }
.hv-pills button.on { background: var(--hv-p); border-color: var(--hv-p); } .hv-pills button.on.c { background: var(--hv-c); color: #021018; border-color: var(--hv-c); }
.hv-twocol { display: flex; flex-direction: column; gap: 16px; }
.hv-pair { background: var(--hv-card); border: 1px solid var(--hv-line); border-radius: 22px; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.hv-duo { display: flex; gap: 6px; position: relative; } .hv-half { flex: 1; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; position: relative; background: #101a2c; }
.hv-half.for { box-shadow: inset 0 0 0 3px var(--hv-p); } .hv-half.against { box-shadow: inset 0 0 0 3px var(--hv-c); }
.hv-vs { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: var(--hv-bg); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.hv-links { display: flex; justify-content: center; gap: 22px; } .hv-links a { color: var(--hv-c); text-decoration: none; font-weight: 600; padding: 8px 0; }
.hv-list { display: flex; flex-direction: column; gap: 14px; } .hv-row { display: flex; gap: 12px; text-decoration: none; }
.hv-th { width: 40%; max-width: 190px; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; position: relative; flex-shrink: 0; background: #101a2c; }
.hv-rt { display: flex; flex-direction: column; gap: 5px; min-width: 0; } .hv-rt b { line-height: 1.2; } .hv-rt small { color: var(--hv-mute); }
/* Flip perspective */
.hv-flip { display: flex; flex-direction: column; align-items: center; max-width: 520px; margin: 0 auto; }
.hv-dots { display: flex; gap: 8px; margin: 12px 0 4px; } .hv-dots i { width: 9px; height: 9px; border-radius: 50%; background: #3a4558; } .hv-dots i.on { background: var(--hv-p); }
.hv-stack { position: relative; width: min(78vw, 340px); aspect-ratio: 3 / 4; margin: 26px 0 28px; }
.hv-card { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; background: #101a2c; text-decoration: none; }
.hv-card.front { transform: rotate(-6deg) translateX(-8%); border: 3px solid var(--hv-p); box-shadow: 0 0 28px rgba(255,10,122,.5); z-index: 2; }
.hv-card.front.against { border-color: var(--hv-c); box-shadow: 0 0 28px rgba(0,217,255,.5); } .hv-card.back { transform: rotate(4deg) translateX(16%); border: 3px solid var(--hv-c); box-shadow: 0 0 24px rgba(0,217,255,.35); }
.hv-card.back.against { border-color: var(--hv-c); } .hv-card.back.for { border-color: var(--hv-p); box-shadow: 0 0 24px rgba(255,10,122,.35); }
.hv-card .hv-pill { position: absolute; left: 12px; top: 12px; z-index: 3; } .hv-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 14px; background: linear-gradient(transparent, rgba(0,0,0,.85)); display: flex; flex-direction: column; gap: 2px; font-size: 1.05rem; } .hv-cap small { color: #cfd8e6; }
/* Chapters */
.hv-chap { max-width: 760px; margin: 0 auto; } .hv-ctop { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .hv-ctop .c small { color: var(--hv-mute); letter-spacing: .08em; } .hv-ctop .hv-title { margin: 0; }
.hv-chlist { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.hv-ch { border-radius: 18px; background: var(--hv-card); border: 1px solid var(--hv-line); overflow: hidden; }
.hv-chh { width: 100%; display: flex; align-items: center; gap: 14px; background: none; border: 0; color: #fff; font: inherit; min-height: 56px; padding: 0 16px; cursor: pointer; text-align: left; } .hv-chh .n { color: var(--hv-p); font-weight: 800; font-size: 1.3rem; } .hv-chh b { flex: 1; font-size: 1.05rem; }
.hv-chb { display: none; padding: 0 12px 12px; } .hv-ch.open .hv-chb { display: block; }
.hv-chpair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; } .hv-chpair p { margin: 2px 0 0; color: #cfd8e6; font-size: .9rem; line-height: 1.3; } .hv-chpair b.p { color: var(--hv-p); } .hv-chpair b.c { color: var(--hv-c); }
.hv-cth { aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; position: relative; background: #101a2c; margin-bottom: 6px; }
/* Other pairs */
.hv-pairs { max-width: 760px; margin: 0 auto; } .hv-opgrid { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; } .hv-op h3 { margin: 12px 0 8px; font-size: 1.25rem; }
.hv-oprow { display: flex; align-items: center; text-decoration: none; } .hv-oth { flex: 1; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; position: relative; background: #101a2c; } .hv-oth.for { box-shadow: inset 0 0 0 3px var(--hv-p); } .hv-oth.against { box-shadow: inset 0 0 0 3px var(--hv-c); }
.hv-opplay { width: 46px; height: 46px; margin: 0 -10px; z-index: 2; border-radius: 50%; background: var(--hv-bg); border: 3px solid var(--hv-c); border-left-color: var(--hv-p); border-bottom-color: var(--hv-p); display: flex; align-items: center; justify-content: center; }
/* Split view */
.hv-watch { max-width: 1000px; margin: 0 auto; } .hv-whead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hv-posbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; font-size: .85rem; color: var(--hv-mute); }
.hv-pos { border: 1px solid var(--hv-line); border-radius: 18px; padding: 0 14px; min-height: 40px; background: transparent; color: #fff; font: inherit; cursor: pointer; } .hv-pos.on { background: var(--hv-c); color: #021018; border-color: var(--hv-c); }
.hv-split { display: flex; flex-direction: column; gap: 8px; }
.hv-pane { border-radius: 20px; padding: 3px; display: flex; flex-direction: column; background: var(--hv-card); } .hv-pane.for { border: 3px solid var(--hv-p); } .hv-pane.against { border: 3px solid var(--hv-c); }
.hv-screen { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #000; } .hv-screen .hv-pill { position: absolute; left: 10px; top: 10px; z-index: 2; } .hv-screen video { width: 100%; height: 100%; object-fit: contain; display: block; }
.hv-pinfo { padding: 10px 10px 8px; display: flex; flex-direction: column; gap: 6px; } .hv-pinfo small { color: var(--hv-mute); }
.hv-vote { display: flex; gap: 8px; flex-wrap: wrap; } .hv-vb { flex: 1; min-height: 44px; border-radius: 22px; border: 1px solid var(--hv-line); background: transparent; color: #fff; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; } .hv-vb.on { background: var(--hv-c); color: #021018; border-color: var(--hv-c); }
.hv-srcb { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--hv-line); background: transparent; color: #fff; font: inherit; cursor: pointer; text-align: left; }
.hv-audio { display: flex; gap: 10px; align-items: center; } .hv-aud { width: 54px; height: 46px; border-radius: 24px; border: 1px solid; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; } .hv-aud.for { color: var(--hv-p); border-color: var(--hv-p); background: rgba(255,10,122,.12); } .hv-aud.against { color: var(--hv-c); border-color: var(--hv-c); background: rgba(0,217,255,.1); } .hv-aud[aria-pressed="true"] { box-shadow: 0 0 0 2px currentColor; }
.hv-sw { flex: 1; min-height: 46px; border-radius: 24px; border: 1px solid var(--hv-line); background: var(--hv-card); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.hv-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px; } .hv-bar .hv-btn { min-height: 44px; }
.hv-tabs2 { display: flex; border-top: 1px solid var(--hv-line); margin-top: 8px; } .hv-tabs2 button { flex: 1; min-height: 52px; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--hv-mute); font: inherit; font-weight: 600; cursor: pointer; } .hv-tabs2 button.on { color: #fff; border-bottom-color: var(--hv-p); }
/* Sheets */
.hv-sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; }
.hv-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 88vh; overflow: auto; background: #131c2d; border-radius: 26px 26px 0 0; padding: 12px 20px max(24px, env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
.hv-grab { display: block; width: 44px; height: 5px; border-radius: 3px; background: #4a566b; margin: 0 auto 14px; }
.hv-rings { display: flex; justify-content: center; } .hv-rings .hv-av { width: 96px; height: 96px; } .hv-rings .hv-av + .hv-av { margin-left: -22px; }
.hv-why { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 16px; } .hv-why li { display: flex; gap: 14px; } .hv-why li:nth-child(odd) { color: var(--hv-c); } .hv-why li:nth-child(2) { color: var(--hv-p); } .hv-why b { color: #fff; } .hv-why p { margin: 2px 0 0; color: var(--hv-mute); font-size: .92rem; line-height: 1.35; }
.hv-srccard { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; border: 1px solid var(--hv-line); text-decoration: none; } .hv-srccard b { flex: 1; font-size: 1.1rem; word-break: break-all; }
.hv-sheet h4 { color: var(--hv-mute); margin: 16px 0 4px; font-size: .9rem; } .hv-sheet p { margin: 0; } .hv-sbtns { display: flex; margin-top: 16px; } .hv-sbtns .hv-btn { flex: 1; }
/* Saved */
.hv-seg { display: flex; background: #121c2e; border-radius: 22px; padding: 3px; margin: 8px 0 14px; } .hv-seg span { flex: 1; text-align: center; padding: 11px 0; border-radius: 20px; font-weight: 700; } .hv-seg .on { background: var(--hv-c); color: #021018; }
.hv-follow { display: flex; flex-direction: column; gap: 10px; max-width: 760px; } .hv-fc { background: var(--hv-card); border: 1px solid var(--hv-line); border-radius: 20px; padding: 12px; }
.hv-fch { width: 100%; display: flex; align-items: center; gap: 12px; background: none; border: 0; color: #fff; font: inherit; cursor: pointer; text-align: left; padding: 0; min-height: 56px; }
.hv-fth { display: flex; gap: 3px; width: 96px; height: 64px; flex-shrink: 0; } .hv-fth img, .hv-fth .hv-nothumb { flex: 1; border-radius: 8px; } .hv-ft { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; } .hv-ft small { color: var(--hv-mute); } .hv-ft b { font-size: 1.15rem; line-height: 1.1; } .hv-ft em { font-style: normal; color: var(--hv-mute); } .hv-ft .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--hv-p); margin-left: 4px; }
.hv-tl { list-style: none; margin: 14px 0 14px 6px; padding: 0 0 0 22px; border-left: 2px solid #234; display: flex; flex-direction: column; gap: 16px; } .hv-tl li { position: relative; display: flex; flex-direction: column; } .hv-tl li::before { content: ""; position: absolute; left: -31px; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--hv-c); background: var(--hv-bg); } .hv-tl li.fresh::before { background: var(--hv-p); border-color: var(--hv-p); } .hv-tl small { color: var(--hv-mute); }
/* Post */
.hv-postw { max-width: 560px; margin: 0 auto; } .hv-form { display: flex; flex-direction: column; gap: 14px; } .hv-form label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--hv-mute); }
.hv-form input, .hv-form select { min-height: 48px; border-radius: 14px; border: 1px solid var(--hv-line); background: var(--hv-card); color: #fff; font: inherit; padding: 0 14px; }
/* Desktop: left rail, bigger layouts, side-by-side split */
@media (min-width: 900px) {
  .hv-rail { display: flex; flex-direction: column; gap: 4px; width: 232px; flex-shrink: 0; padding: 22px 14px; border-right: 1px solid var(--hv-line); position: sticky; top: 0; height: 100vh; box-sizing: border-box; }
  .hv-rail .hv-brand { font-size: 1.6rem; padding: 0 12px 22px; } .hv-rl { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px; border-radius: 14px; text-decoration: none; color: #cfd8e6; font-weight: 600; } .hv-rl:hover { background: rgba(255,255,255,.06); } .hv-rl.on { background: rgba(0,217,255,.12); color: var(--hv-c); } .hv-rl.hv-out { margin-top: auto; color: var(--hv-mute); }
  .hv-brand-m, .hv-tabbar { display: none; } .hv-top { padding: 18px 32px 0; } .hv-body { padding: 8px 32px 60px; }
  .hv-hero { display: flex; flex-direction: column; } .hv-h1 { font-size: 4.4rem; }
  .hv-feature { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; } .hv-fcard { min-height: 520px; padding: 24px; }
  .hv-tiles { grid-template-columns: 1fr; } .hv-tile { min-height: 120px; }
  .hv-twocol { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .hv-split { flex-direction: row; align-items: flex-start; gap: 14px; } .hv-pane { flex: 1; min-width: 0; } .hv-audio { flex-direction: column; justify-content: center; align-self: center; width: 78px; } .hv-sw { flex: none; width: 76px; min-height: 60px; font-size: .78rem; } .hv-screen { aspect-ratio: 9 / 12; max-height: 62vh; }
  .hv-chlist { display: grid; grid-template-columns: 1fr 1fr; align-items: start; } .hv-chap, .hv-pairs { max-width: 980px; } .hv-opgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .hv-sheet { bottom: 50%; transform: translateY(50%); border-radius: 26px; } .hv-fcard .hv-fbtns { max-width: 520px; }
}
@media (min-width: 1200px) { .hv-tiles { grid-template-columns: 1fr 1fr; } .hv-feature { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr); } }
.hv-form label[hidden] { display: none; }

/* Havoc home */
.hv-home { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.hv-hh { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 10px; } .hv-h1.big { font-size: clamp(2.6rem, 11vw, 4.8rem); margin: 10px 0; }
.hv-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.hv-demo { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .hv-dside { border-radius: 20px; padding: 16px; min-height: 190px; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; position: relative; overflow: hidden; }
.hv-dside.for { background: linear-gradient(160deg, #6b1648, #2a0a22); border: 3px solid var(--hv-p); } .hv-dside.against { background: linear-gradient(160deg, #124a66, #0a1f33); border: 3px solid var(--hv-c); } .hv-dside b { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; } .hv-dside span { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.hv-vs.big { width: 52px; height: 52px; margin: -26px 0 0 -26px; font-size: 14px; }
.hv-h2.hh { margin-top: 18px; font-size: 1.7rem; }
.hv-chips { display: flex; flex-wrap: wrap; gap: 10px; } .hv-tchip { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 16px; background: var(--hv-card); border: 1px solid var(--hv-line); text-decoration: none; min-height: 48px; justify-content: center; } .hv-tchip small { color: var(--hv-mute); }
.hv-steps { display: grid; grid-template-columns: 1fr; gap: 12px; } .hv-step { background: var(--hv-card); border: 1px solid var(--hv-line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 6px; } .hv-step .n { width: 34px; height: 34px; border-radius: 50%; background: var(--hv-p); display: flex; align-items: center; justify-content: center; font-weight: 800; } .hv-step:nth-child(even) .n { background: var(--hv-c); color: #021018; } .hv-step p, .hv-fair p { margin: 0; color: var(--hv-mute); line-height: 1.45; }
.hv-fair { display: grid; grid-template-columns: 1fr; gap: 12px; } .hv-fair > div { padding: 16px 18px; border-left: 3px solid var(--hv-c); background: rgba(255,255,255,.03); border-radius: 0 16px 16px 0; } .hv-fair > div:nth-child(2) { border-color: var(--hv-p); }
.hv-endcta { text-align: center; padding: 30px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
@media (min-width: 900px) { .hv-home { gap: 30px; } .hv-hh { flex-direction: column; } .hv-steps { grid-template-columns: repeat(4, 1fr); } .hv-fair { grid-template-columns: repeat(3, 1fr); } .hv-fair > div { border-radius: 0 16px 16px 0; } .hv-dside { min-height: 260px; } .hv-hvis { max-width: 760px; } }

/* Havoc home feed */
.hv-feedhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; } .hv-h1.feed { font-size: clamp(1.6rem, 6vw, 2.4rem); margin: 0; }
.hv-feed { display: grid; grid-template-columns: 1fr; gap: 22px 16px; } .hv-more { text-align: center; }
.hv-gc { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.hv-gimg { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; aspect-ratio: 16 / 10; }
.hv-gh { position: relative; border-radius: 16px; overflow: hidden; background: #101a2c; min-width: 0; } .hv-gh img, .hv-gh .hv-nothumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hv-gh.for { box-shadow: inset 0 0 0 3px var(--hv-p); background: linear-gradient(160deg, #6b1648, #2a0a22); } .hv-gh.against { box-shadow: inset 0 0 0 3px var(--hv-c); background: linear-gradient(160deg, #124a66, #0a1f33); }
.hv-gh::after { content: ""; position: absolute; inset: 0; border-radius: 16px; box-shadow: inset 0 0 0 3px var(--hv-p); pointer-events: none; } .hv-gh.against::after { box-shadow: inset 0 0 0 3px var(--hv-c); }
.hv-gh .hv-nothumb { background: none; }
.hv-gl { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 10px; display: flex; flex-direction: column; gap: 2px; background: linear-gradient(transparent, rgba(0,0,0,.72)); } .hv-gl b { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; } .hv-gl em { font-style: normal; font-weight: 700; font-size: .85rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hv-gimg .hv-time { position: absolute; right: 8px; top: 8px; }
.hv-gm { display: flex; gap: 10px; align-items: flex-start; } .hv-gav { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--hv-p), var(--hv-c)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.hv-gtx { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .hv-gtx b { line-height: 1.25; } .hv-gtx small { color: var(--hv-mute); }
.hv-how { margin-top: 18px; background: var(--hv-card); border: 1px solid var(--hv-line); border-radius: 16px; padding: 14px 18px; } .hv-how summary { cursor: pointer; font-weight: 700; min-height: 32px; } .hv-how .hv-steps { margin-top: 12px; }
@media (min-width: 640px) { .hv-feed { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .hv-feed { grid-template-columns: repeat(3, 1fr); } .hv-how .hv-steps { grid-template-columns: repeat(4, 1fr); } }

/* Havoc watch: tap a card for sound, more pairs below */
.hv-pairs { display: flex; flex-direction: column; gap: 34px; }
.hv-split { flex-direction: column; } .hv-screen[data-card] { cursor: pointer; }
.hv-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; } .hv-screen.ready .hv-poster { display: none; } .hv-screen video { position: relative; }
.hv-pbtn { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; color: #fff; pointer-events: none; z-index: 2; } .hv-screen.playing .hv-pbtn { display: none; }
.hv-sndb { position: absolute; right: 10px; top: 10px; display: none; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 14px; background: rgba(0,0,0,.65); font-size: 12px; font-weight: 700; z-index: 2; } .hv-screen.snd .hv-sndb { display: inline-flex; }
@media (min-width: 900px) { .hv-split { flex-direction: row; } }

/* Havoc: hover preview on feed cards, no play icon on the watch page */
.hv-pbtn, .hv-sndb { display: none !important; }
.hv-gh .hv-pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; z-index: 1; } .hv-gh .hv-pv.on { opacity: 1; }
.hv-gh .hv-gl { z-index: 2; } .hv-gimg.previewing .hv-gl { opacity: .0; transition: opacity .2s; }
.hv-prog { position: absolute; left: 8px; right: 8px; bottom: 6px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); z-index: 3; overflow: hidden; pointer-events: none; } .hv-prog b { display: block; height: 100%; width: 0; background: #ff2d2d; }
.hv-gimg.previewing .hv-time { opacity: 0; }

/* Reel ratio (9:16) everywhere, video fills the card, YouTube-style lift on hover */
.hv-screen, .hv-screen[data-card] { aspect-ratio: 9 / 16; max-height: none; }
.hv-screen video, .hv-poster { object-fit: cover; width: 100%; height: 100%; }
.hv-pane { width: 100%; max-width: 360px; margin: 0 auto; }
.hv-split { align-items: center; } @media (min-width: 900px) { .hv-split { flex-direction: row; justify-content: center; align-items: flex-start; gap: 22px; } }
.hv-gimg { aspect-ratio: auto; transition: transform .22s ease, box-shadow .22s ease; transform-origin: center; }
.hv-gh { aspect-ratio: 9 / 16; }
.hv-gc { position: relative; } .hv-gc:hover, .hv-gc:focus-visible { z-index: 4; }
@media (hover: hover) { .hv-gc:hover .hv-gimg { transform: scale(1.045); box-shadow: 0 14px 34px rgba(0,0,0,.55); } }

/* Home search */
.hv-feedhead { flex-wrap: nowrap; gap: 12px; } .hv-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 24px; background: var(--hv-card); border: 1px solid var(--hv-line); color: var(--hv-mute); } .hv-search:focus-within { border-color: var(--hv-c); }
.hv-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font: inherit; font-size: 1rem; } .hv-search input::placeholder { color: var(--hv-mute); } .hv-search input::-webkit-search-cancel-button { filter: invert(1); }
@media (max-width: 520px) { .hv-feedhead .hv-btn { padding: 0 14px; } }

/* Havoc home, glass look */
.hv-app:has(.hv-home) { background: radial-gradient(900px 500px at 4% 55%, rgba(255,10,122,.13), transparent 60%), radial-gradient(900px 520px at 96% 8%, rgba(0,217,255,.10), transparent 60%), #040812; }
.hv-ptop { display: flex; align-items: center; gap: 12px; padding-top: 6px; } .hv-ptop .hv-brand-m { margin-right: 4px; } .hv-sep { width: 1px; height: 30px; background: var(--hv-line); } .hv-ptop .hv-acct { min-width: 44px; justify-content: center; }
.hv-search { height: 54px; border-radius: 28px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); } .hv-search svg { flex-shrink: 0; }
.hv-btn.glass { background: rgba(0,217,255,.08); border: 1px solid rgba(0,217,255,.55); box-shadow: 0 0 18px rgba(0,217,255,.18); color: #fff; padding: 0 22px; min-height: 54px; border-radius: 28px; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.hv-cats { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 2px; scrollbar-width: none; } .hv-cats::-webkit-scrollbar { display: none; }
.hv-cats button { flex-shrink: 0; min-height: 44px; padding: 0 22px; border-radius: 24px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #dce6f5; font: inherit; font-weight: 600; cursor: pointer; } .hv-cats button.on { background: rgba(0,217,255,.14); border-color: rgba(0,217,255,.6); color: #fff; box-shadow: 0 0 16px rgba(0,217,255,.16); }
.hv-home { gap: 16px; }
.hv-gimg { padding: 3px; gap: 3px; background: linear-gradient(90deg, var(--hv-p) 0 50%, var(--hv-c) 50% 100%); border-radius: 24px; }
.hv-gh { aspect-ratio: 7 / 10; border-radius: 21px; box-shadow: none; } .hv-gh::after { display: none; } .hv-gh.for, .hv-gh.against { box-shadow: none; }
.hv-gl { padding: 40px 12px 14px; gap: 6px; background: linear-gradient(transparent, rgba(0,0,0,.78)); } .hv-gl em { font-size: .95rem; line-height: 1.22; -webkit-line-clamp: 4; }
.hv-tag { align-self: flex-start; padding: 3px 9px; border-radius: 7px; font-size: .66rem; letter-spacing: .06em; background: var(--hv-p); color: #fff; } .hv-gh.against .hv-tag { background: var(--hv-c); color: #021018; }
.hv-gimg .hv-vs { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: #070b16; box-shadow: 0 0 0 3px rgba(5,10,20,.6); }
.hv-gm { padding: 12px 14px; border-radius: 20px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); align-items: center; }
.hv-gav { width: 50px; height: 50px; background: linear-gradient(135deg, #ff2d8a, #c0126c); box-shadow: 0 0 18px rgba(255,10,122,.35); }
.hv-gtx b { font-size: 1.05rem; } .hv-gc { gap: 8px; }
@media (min-width: 900px) { .hv-rail { margin: 14px 0 14px 14px; height: calc(100vh - 28px); top: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 26px; background: rgba(255,255,255,.035); backdrop-filter: blur(10px); } .hv-rl.on { background: rgba(0,217,255,.1); border: 1px solid rgba(0,217,255,.28); } .hv-body { max-width: 1400px; } .hv-feed { gap: 26px 22px; } }
@media (max-width: 640px) { .hv-pl { display: none; } .hv-btn.glass { padding: 0 14px; min-height: 48px; } .hv-search { height: 48px; } .hv-sep { display: none; } .hv-ptop { gap: 8px; } .hv-ptop .hv-brand-m { display: none; } }
/* YouTube-style caption under the video: no banner box */
.hv-gm { background: none; border: 0; border-radius: 0; padding: 2px 2px 0; align-items: flex-start; gap: 12px; }
.hv-gav { width: 38px; height: 38px; box-shadow: none; margin-top: 2px; } .hv-gav svg { width: 15px; height: 15px; }
.hv-gtx b { font-size: 1rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .hv-gtx small { font-size: .85rem; }
.hv-gc { gap: 10px; }

/* Desktop: 3 columns x 2 rows, landscape-style tiles like the mockup */
@media (min-width: 900px) { .hv-gh { aspect-ratio: 1 / 1.05; } .hv-feed { gap: 22px 20px; } .hv-gl em { font-size: .9rem; -webkit-line-clamp: 3; } .hv-gl { padding: 30px 10px 12px; } }
/* Desktop home: fill the whole screen, 3 x 2 tiles stretch to the window */
@media (min-width: 900px) {
  .hv-app:has(.hv-home) .hv-body { max-width: none; padding: 14px 28px 20px; }
  .hv-home { --rowh: max(270px, calc((100vh - 196px) / 2)); }
  .hv-feed { grid-auto-rows: var(--rowh); gap: 18px 22px; }
  .hv-gc { height: 100%; min-height: 0; }
  .hv-gimg { flex: 1; min-height: 0; }
  .hv-gh { aspect-ratio: auto; height: 100%; }
  .hv-gl em { font-size: 1.05rem; } .hv-gl { padding: 40px 14px 16px; }
  .hv-gtx b { font-size: 1.05rem; }
}
@media (min-width: 900px) { .hv-home { max-width: none; width: 100%; } .hv-gm { height: 56px; overflow: hidden; } }
/* Neutral card borders (no pink / cyan frame) */
.hv-gimg { padding: 0; gap: 4px; background: none; border-radius: 20px; box-shadow: none; }
.hv-gh, .hv-gh.for, .hv-gh.against { border-radius: 20px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
@media (hover: hover) { .hv-gc:hover .hv-gimg { box-shadow: 0 14px 34px rgba(0,0,0,.55); } }

/* Home like X: one column, posts stacked, scroll for more */
.hv-home { max-width: 640px; width: 100%; margin: 0 auto; gap: 0; }
.hv-stick { position: sticky; top: 0; z-index: 20; background: rgba(4,8,18,.86); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.1); padding: 8px 14px 0; display: flex; flex-direction: column; gap: 8px; }
.hv-cats { gap: 0; padding: 0; } .hv-cats button { flex: 1 0 auto; border: 0; border-radius: 0; background: none; box-shadow: none; min-height: 50px; padding: 0 16px; color: #8fa0b8; font-weight: 600; position: relative; } .hv-cats button:hover { background: rgba(255,255,255,.05); }
.hv-cats button.on { background: none; box-shadow: none; color: #fff; font-weight: 800; } .hv-cats button.on::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 56px; height: 4px; margin-left: -28px; border-radius: 2px; background: var(--hv-c); }
.hv-feed { display: flex; flex-direction: column; gap: 0; grid-auto-rows: auto; }
.hv-gc { height: auto; padding: 14px 14px 16px; border-bottom: 1px solid rgba(255,255,255,.1); gap: 10px; }
.hv-gimg { flex: none; } .hv-gh { aspect-ratio: 5 / 6; height: auto; }
.hv-gm { height: auto; min-height: 48px; overflow: visible; }
.hv-more { padding: 18px 0 60px; text-align: center; }
@media (hover: hover) { .hv-gc:hover .hv-gimg { transform: scale(1.015); } }
@media (min-width: 900px) {
  .hv-app:has(.hv-home) .hv-body { padding: 0 20px 0; }
  .hv-home { max-width: 640px; --rowh: auto; border-left: 1px solid rgba(255,255,255,.1); border-right: 1px solid rgba(255,255,255,.1); min-height: 100vh; }
  .hv-feed { grid-auto-rows: auto; gap: 0; } .hv-gh { aspect-ratio: 5 / 6; height: auto; } .hv-gc { height: auto; } .hv-gm { height: auto; } .hv-gl em { font-size: .95rem; } .hv-gtx b { font-size: 1.05rem; }
}
@media (max-width: 639px) { .hv-stick { padding: 8px 10px 0; } .hv-gc { padding: 12px 10px 14px; } }

/* Pair fit: flag row + reply tag */
.hv-flagrow{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:6px 0 18px;font-size:13px;color:var(--muted,#8b949e)}
.hv-flag{border:1px solid var(--line,#30363d);background:transparent;color:inherit;border-radius:999px;padding:5px 12px;font:inherit;cursor:pointer}
.hv-flag:hover{border-color:#00e5ff;color:#00e5ff}
.hv-reply{background:#00e5ff22;color:#00e5ff;border-radius:999px;padding:3px 10px;font-weight:600}

/* Piggier home: clear sign in / signed-in state */
.ld-links { display: flex; align-items: center; gap: 22px; }
.ld-links a.ld-sign, .ld-sign { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; background: #00E5FF; color: #031018 !important; font: 700 15px/1 var(--body); text-decoration: none; border: 0; cursor: pointer; }
.ld-links a.ld-sign:hover, .ld-sign:hover { background: #5CF0FF; }
.ld-out { background: rgba(255,255,255,.1); color: #fff !important; border: 1px solid rgba(255,255,255,.25); } .ld-out:hover { background: rgba(255,255,255,.18); }
.ld-who { display: inline-flex; align-items: center; gap: 10px; color: #fff; max-width: 200px; } .ld-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 620px) { .ld-who b { display: none; } }

.ld-me { position: relative; } button.ld-who { background: none; border: 0; cursor: pointer; font: inherit; padding: 4px 6px; border-radius: 999px; } button.ld-who:hover { background: rgba(255,255,255,.1); }
.ld-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 250px; padding: 8px; border-radius: 18px; background: rgba(14,16,22,.96); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 14px 44px rgba(0,0,0,.6); backdrop-filter: blur(14px); z-index: 50; display: flex; flex-direction: column; }
.ld-menu[hidden] { display: none; }
.ld-menu a, .ld-menu button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: #fff; text-decoration: none; background: none; border: 0; font: 500 15px/1 var(--body); cursor: pointer; text-align: left; width: 100%; box-sizing: border-box; }
.ld-menu a:hover, .ld-menu button:hover { background: rgba(255,255,255,.09); }
.ld-mwho { display: flex; flex-direction: column; gap: 3px; padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.12); } .ld-mwho span { color: #9fb0c8; font-size: 13px; }

/* Piggier login popup */
.ld-authbox { position: relative; width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; text-align: left; align-items: stretch; gap: 12px; padding: 28px 24px 24px; }
.ld-authbox h3 { margin: 0; font-size: 1.35rem; padding-right: 28px; } .ld-sub { margin: 0; color: #9fb0c8; font-size: .92rem; }
.ld-x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: #cfd8e6; cursor: pointer; border-radius: 50%; } .ld-x:hover { background: rgba(255,255,255,.1); }
.ld-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.08); } .ld-tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: none; color: #cfd8e6; font: 600 15px/1 var(--body); cursor: pointer; } .ld-tabs button[aria-selected="true"] { background: #00E5FF; color: #031018; }
.ld-in { width: 100%; box-sizing: border-box; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: #fff; font: 16px/1 var(--body); } .ld-in:focus { outline: 2px solid #00E5FF; outline-offset: 1px; } .ld-in[hidden] { display: none; }
.ld-err { margin: 0; min-height: 1em; color: #ff7a8c; font-size: .9rem; } .ld-go { width: 100%; justify-content: center; animation: none; padding: 14px 20px; font-size: 16px; } .ld-go:disabled { opacity: .6; }
.ld-forgot { color: #8fd8ff; font-size: .88rem; text-decoration: none; align-self: flex-end; } .ld-fine { margin: 0; color: #9fb0c8; font-size: .8rem; line-height: 1.4; } .ld-fine a { color: #cfeaff; }
.ld-or { display: flex; align-items: center; gap: 10px; color: #9fb0c8; font-size: .85rem; } .ld-or::before, .ld-or::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.15); }
.ld-social { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); color: #fff; text-decoration: none; font: 600 15px/1 var(--body); } .ld-social:hover { background: rgba(255,255,255,.1); }

/* Piggier account pages (Settings, Advertise, Admin): Piggier header, no Circle sidebar */
body.acct-mode .top, body.acct-mode .side, body.acct-mode .tabbar, body.acct-mode .scrim { display: none !important; }
body.acct-mode .shell, body.acct-mode .shell.collapsed { display: block; padding-left: 0 !important; }
body.acct-mode.has-tabbar { padding-bottom: 0 !important; }
#acctBar { background: #03070f; border-bottom: 1px solid rgba(255,255,255,.1); }
#acctBar .ld-nav { max-width: 1400px; margin: 0 auto; padding-top: 12px; padding-bottom: 12px; }
#acctBar .ld-logo img { height: 40px; width: auto; }
body.acct-mode main { max-width: 1200px; margin: 0 auto; }

/* Home & grids: a card lifts and the preview plays, smoothly (mouse only) */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  main .hm-row, main .grid { padding: 14px 10px; margin: -14px -10px; }
  main .card { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
  main .hm-row > .card:hover, main .grid > .card:hover { transform: translateY(-4px) scale(1.06) !important; z-index: 6; }
  main .card .thumb { transition: border-radius .25s, box-shadow .3s ease, transform .3s ease; }
  main .card:hover .thumb { border-radius: 14px; box-shadow: 0 22px 44px -14px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .14) !important; }
  main .card:hover .card-meta { opacity: 1; }
}

/* ===== Phone-only fixes (desktop layout is not touched) ===== */
@media (max-width: 760px) {
  .ld-links a.ld-sign, .ld-sign { white-space: nowrap; padding: 0 14px; min-height: 40px; font-size: 14px; }
  .ld-links { gap: 8px; } .ld-logo img { height: 36px; width: auto; }
  .ld-apps > .ld-card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 6px); }
  .ld-foot { gap: 6px 4px; } .ld-foot a { padding: 12px 10px; display: inline-block; }
  .foot-links a { padding: 8px 6px; display: inline-block; }
  .card .sub a { display: inline-block; padding: 6px 0; margin: -6px 0; }
  .hm-chips { margin: 0 0 4px; } .hm-sec { padding-top: 0; } .hm-h { margin-bottom: 8px; }
  .you-list a, .you-list li > * { min-height: 48px; }
  .ld-dlg-box { max-height: 92dvh; overflow-y: auto; }
}
@media (max-width: 380px) { .ld-links a.ld-sign, .ld-sign { padding: 0 11px; font-size: 13px; } .ld-logo img { height: 32px; } }

/* The account menu always sits above the app cards (it was hiding behind them on phones) */
.ld-nav { position: relative; z-index: 60; }
.ld-menu { background: #0e1016; -webkit-backdrop-filter: none; backdrop-filter: none; z-index: 70; max-height: calc(100dvh - 90px); overflow-y: auto; }
@media (max-width: 760px) {
  .ld-menu { position: fixed; right: 12px; left: auto; top: 64px; width: min(280px, calc(100vw - 24px)); }
  .ld-apps { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
.ld > .ld-nav { z-index: 60; }
.ld-links .ld-menu a { display: flex !important; }

/* ===== Sign in / Sign up popup: refined layout ===== */
.ld-dlg { background: rgba(2, 5, 12, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: ld-fade .18s ease; }
@keyframes ld-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ld-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.ld-authbox { width: min(420px, calc(100vw - 28px)); padding: 30px 28px 22px; gap: 14px; border-radius: 24px; background: linear-gradient(180deg, #121826, #0b0f19); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 80px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .08); animation: ld-rise .24s cubic-bezier(.2, .8, .2, 1); }
.ld-ahead { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-bottom: 4px; }
.ld-ahead img { width: 44px; height: 44px; object-fit: contain; margin-bottom: 4px; }
.ld-authbox h3 { font-size: 1.5rem; letter-spacing: -.02em; padding: 0; margin: 0; }
.ld-sub { max-width: 30ch; line-height: 1.4; text-wrap: balance; }
.ld-social { gap: 10px; min-height: 50px; border-radius: 14px; background: #fff; color: #1f2430; border: 0; font-weight: 600; transition: transform .12s ease, box-shadow .12s ease; }
.ld-social:hover { background: #f3f5f9; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.ld-or { margin: 2px 0; font-size: .8rem; letter-spacing: .02em; }
.ld-fields { display: flex; flex-direction: column; gap: 12px; }
.ld-fld { display: flex; flex-direction: column; gap: 6px; }
.ld-fld > span:first-child { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; font-weight: 600; color: #c9d4e6; }
.ld-in { min-height: 50px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); transition: border-color .15s, box-shadow .15s, background .15s; }
.ld-in::placeholder { color: #7d8aa0; }
.ld-in:hover { border-color: rgba(255, 255, 255, .26); }
.ld-in:focus { outline: 0; border-color: #00E5FF; background: rgba(0, 229, 255, .05); box-shadow: 0 0 0 4px rgba(0, 229, 255, .16); }
.ld-pw { position: relative; display: block; } .ld-pw .ld-in { padding-right: 48px; }
.ld-eye { position: absolute; right: 4px; top: 4px; width: 42px; height: 42px; border: 0; background: none; color: #8a97ad; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ld-eye:hover, .ld-eye.on { color: #00E5FF; }
.ld-forgot { align-self: auto; font-size: .82rem; font-weight: 600; }
.ld-meter { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; } .ld-meter b { display: block; height: 100%; width: 0; border-radius: 4px; background: #ff5d6c; transition: width .2s, background .2s; }
.ld-meter[data-s="1"] b { width: 25%; } .ld-meter[data-s="2"] b { width: 50%; background: #ffb020; } .ld-meter[data-s="3"] b { width: 75%; background: #6ee7a8; } .ld-meter[data-s="4"] b { width: 100%; background: #19d27c; }
.ld-hint { color: #8a97ad; font-size: .78rem; font-weight: 400; }
.ld-err { min-height: 0; } .ld-err:empty { display: none; } .ld-err:not(:empty) { padding: 10px 12px; border-radius: 10px; background: rgba(255, 93, 108, .12); border: 1px solid rgba(255, 93, 108, .3); }
.ld-go { min-height: 52px; border-radius: 14px; font-weight: 700; box-shadow: 0 10px 26px rgba(0, 229, 255, .25); transition: transform .12s ease, box-shadow .12s ease, opacity .12s; } .ld-go:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(0, 229, 255, .34); }
.ld-fine { text-align: center; }
.ld-switch { margin: 2px 0 0; text-align: center; color: #aab6ca; font-size: .92rem; } .ld-switch button { background: none; border: 0; padding: 4px 2px; color: #00E5FF; font: 700 .92rem var(--body); cursor: pointer; } .ld-switch button:hover { text-decoration: underline; }
.ld-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; color: #6f7c92; font-size: .76rem; }
.ld-secure svg { stroke: currentColor; fill: none; stroke-width: 2; }
@media (max-width: 480px) { .ld-authbox { padding: 26px 20px 18px; border-radius: 22px; } .ld-dlg { align-items: end; padding: 12px; } }
@media (prefers-reduced-motion: reduce) { .ld-dlg, .ld-authbox { animation: none; } }
.ld-authbox > * + * { margin-top: 0; }
.ld-authbox .ld-in { min-height: 46px; }
.ld-authbox .ld-or { margin: 4px 0 2px; }
.ld-authbox .ld-fields { margin-top: 2px; }
.ld-authbox .ld-go { margin-top: 6px; min-height: 50px; }
.ld-authbox .ld-fine { margin-top: 2px; }
.ld-authbox .ld-switch { margin-top: 6px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.ld-authbox .ld-hint { margin-top: 2px; }

/* Circle home: tighter gap between the category chips and "For You" */
.hm-main { gap: 18px; }
.hm-main > #lvShelf:empty { display: none; }
.hm-main > .hm-chips { margin: 0; padding-bottom: 2px; }
