/* =====================================================================
   iCast — design system & components
   Dark-first, royal-blue accent (from the iCast logo), green Emerald verified badge.
   ===================================================================== */
:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius: 14px; --radius-sm: 10px; --radius-lg: 22px; --pill: 999px;
  --topbar: 60px; --sidebar: 240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --vb-green-1: #7DFFC4; --vb-green-2: #14E08A; --vb-green-3: #009B5E;
}
:root, [data-theme="dark"] {
  --bg: #090b0e; --bg-2: #0e1115; --surface: #13171c; --surface-2: #1a1f26; --surface-3: #232a33;
  --border: #222932; --border-2: #2e3641; --text: #eef2f6; --text-2: #a9b3bf; --text-3: #737d89;
  --shadow: 0 18px 50px rgba(0,0,0,.5); --shadow-sm: 0 4px 14px rgba(0,0,0,.35);
  --scrim: rgba(0,0,0,.62); --glass: rgba(9,11,14,.74); --skeleton: #1a1f26;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f5f7f9; --bg-2: #ffffff; --surface: #ffffff; --surface-2: #f0f3f6; --surface-3: #e5e9ee;
  --border: #e2e6eb; --border-2: #d3d9e0; --text: #0d1116; --text-2: #4a5562; --text-3: #7a8490;
  --shadow: 0 18px 50px rgba(15,23,42,.14); --shadow-sm: 0 4px 14px rgba(15,23,42,.08);
  --scrim: rgba(15,23,42,.42); --glass: rgba(255,255,255,.8); --skeleton: #e9edf1;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  [data-theme="system"] {
    --bg: #f5f7f9; --bg-2: #ffffff; --surface: #ffffff; --surface-2: #f0f3f6; --surface-3: #e5e9ee;
    --border: #e2e6eb; --border-2: #d3d9e0; --text: #0d1116; --text-2: #4a5562; --text-3: #7a8490;
    --shadow: 0 18px 50px rgba(15,23,42,.14); --shadow-sm: 0 4px 14px rgba(15,23,42,.08);
    --scrim: rgba(15,23,42,.42); --glass: rgba(255,255,255,.8); --skeleton: #e9edf1; color-scheme: light;
  }
}
[data-accent="royal"], :root { --accent: #2f9dff; --accent-2: #1550e6; --accent-ink: #fff; }
[data-accent="emerald"] { --accent: #14dd8b; --accent-2: #0bb8cc; --accent-ink: #03140c; }
[data-accent="ocean"]  { --accent: #3b9dff; --accent-2: #6b5cff; --accent-ink: #fff; }
[data-accent="violet"] { --accent: #9d6bff; --accent-2: #ff5cc6; --accent-ink: #fff; }
[data-accent="sunset"] { --accent: #ff8a3d; --accent-2: #ff3d6e; --accent-ink: #1a0800; }
[data-accent="rose"]   { --accent: #ff4d8d; --accent-2: #ff9a5c; --accent-ink: #fff; }
:root {
  --accent-soft: color-mix(in srgb, var(--accent) 15%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
}
[data-reduce-motion] * { transition: none !important; animation: none !important; }

/* ------------------------------------------------------------- base -- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
kbd { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 999; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.center { text-align: center; justify-content: center; }
.block { display: block; }
.pre { white-space: pre-wrap; }
.clamp-2, .clamp-4 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { -webkit-line-clamp: 2; } .clamp-4 { -webkit-line-clamp: 4; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic.fill { fill: currentColor; stroke: none; }

/* -------------------------------------------------- verified badge -- */
.vbadge { display: inline-flex; vertical-align: -0.15em; margin-left: 4px; width: var(--vb, 14px); height: var(--vb, 14px); flex: none;
  filter: drop-shadow(0 0 6px rgba(20, 224, 138, .35)); }
.vbadge svg { width: 100%; height: 100%; }

/* ---------------------------------------------------------- buttons -- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--pill);
  font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform .15s var(--ease), background .2s, box-shadow .2s, color .2s; user-select: none; }
.btn .ic { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--grad); color: var(--accent-ink); box-shadow: 0 6px 20px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.07); box-shadow: 0 10px 28px -8px var(--accent); }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: #e5484d; color: #fff; }
.btn-danger:hover { color: #fff; background: #f2555a; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-sub { background: var(--text); color: var(--bg); }
.btn-sub:hover { color: var(--bg); background: color-mix(in srgb, var(--text) 85%, var(--accent)); }
.btn-sub-on { background: var(--surface-2); border: 1px solid var(--border); }
.btn-sub-on:hover { color: var(--text); background: var(--surface-3); }
.btn-create { background: var(--surface-2); border: 1px solid var(--border); height: 36px; }
.btn-create:hover { color: var(--text); background: var(--surface-3); }
.btn-signin { border: 1px solid var(--accent-line); color: var(--accent); height: 36px; background: var(--accent-soft); }
.btn-signin:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--text); transition: background .15s; position: relative; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link-btn { color: var(--accent); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.link-btn .ic { width: 18px; height: 18px; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: var(--pill); background: var(--surface-2); font-weight: 600; transition: background .15s, color .15s; }
.pill:hover { background: var(--surface-3); color: var(--text); }
.pill .ic { width: 20px; height: 20px; }
.pill.on { color: var(--accent); }
.pill.on .ic { fill: var(--accent-soft); }
.pill-icon { padding: 0 11px; }
.pill-group { display: inline-flex; border-radius: var(--pill); overflow: hidden; background: var(--surface-2); }
.pill-group .pill { border-radius: 0; background: transparent; }
.pill-group .pill + .pill { border-left: 1px solid var(--border-2); }
.pill-group .pill:hover { background: var(--surface-3); }

/* ----------------------------------------------------------- topbar -- */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--topbar); z-index: 50; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 16px; background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.tb-left, .tb-right { display: flex; align-items: center; gap: 8px; min-width: 200px; }
.tb-right { justify-content: flex-end; }
.logo { display: flex; align-items: center; gap: 9px; padding: 4px 6px; border-radius: 10px; }
.logo:hover { color: var(--text); }
.logo-mark { width: 30px; height: 30px; display: block; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(30, 110, 255, .4)); }
.logo-mark.lg { width: 56px; height: 56px; margin: 0 auto 14px; }
.logo-mark.xl { width: 84px; height: 84px; margin-bottom: 18px; }
.logo-word { font-size: 21px; font-weight: 800; letter-spacing: -.04em; }
.logo-word i { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { flex: 1; max-width: 680px; display: flex; gap: 0; }
.search-box { position: relative; flex: 1; display: flex; align-items: center; background: var(--bg-2); border: 1px solid var(--border-2); border-right: 0;
  border-radius: var(--pill) 0 0 var(--pill); padding-left: 14px; transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-box .search-ic { width: 18px; height: 18px; color: var(--text-3); display: none; }
.search-box:focus-within .search-ic { display: block; }
.search-box input { flex: 1; height: 40px; border: 0; outline: 0; background: transparent; padding: 0 10px; font-size: 15px; min-width: 0; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 34px; height: 34px; }
.search-btn { width: 64px; height: 42px; border: 1px solid var(--border-2); background: var(--surface-2); border-radius: 0 var(--pill) var(--pill) 0; display: grid; place-items: center; }
.search-btn:hover { background: var(--surface-3); }
.suggest { position: absolute; left: -1px; right: -64px; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px 0; z-index: 60; max-height: 70vh; overflow: auto; }
.suggest h5 { margin: 6px 16px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.sg { display: flex; align-items: center; gap: 12px; padding: 7px 16px; cursor: pointer; font-weight: 500; }
.sg .ic { width: 18px; height: 18px; color: var(--text-3); }
.sg b { font-weight: 700; }
.sg.active, .sg:hover { background: var(--surface-2); }
.sg .sg-x { margin-left: auto; color: var(--text-3); font-size: 12px; }
.sg .sg-x:hover { color: var(--accent); }
.mobile-search { display: none; }
.bell-btn .bell-count { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3b5c; color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.avatar-btn { border-radius: 50%; padding: 2px; margin-left: 4px; }
.avatar-btn:hover .avatar { box-shadow: 0 0 0 2px var(--accent-line); }
.avatar { border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; }

/* ------------------------------------------------------- dropdowns -- */
.dropdown { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; z-index: 70; animation: pop .16s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu > a, .menu > button, .menu form > button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; font-weight: 500; text-align: left; }
.menu > a:hover, .menu > button:hover, .menu form > button:hover { background: var(--surface-2); color: var(--text); }
.menu .ic { width: 20px; height: 20px; color: var(--text-2); }
.account-menu { width: 300px; }
.acct-head { display: flex; gap: 12px; padding: 10px 12px 14px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.acct-head b { display: block; }
.acct-head span { display: block; color: var(--text-2); font-size: 13px; }
.acct-head a { color: var(--accent); font-size: 13px; font-weight: 600; }
.notif-menu { width: min(440px, 92vw); padding: 0; overflow: hidden; }
.menu-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--border); }
.menu-head > div { display: flex; align-items: center; gap: 4px; }
.notif-list { max-height: 60vh; overflow: auto; }
.menu-foot { display: block; padding: 12px; text-align: center; border-top: 1px solid var(--border); font-weight: 600; color: var(--accent); }
.notif { display: flex; gap: 12px; padding: 12px 16px; align-items: flex-start; position: relative; transition: background .15s; }
.notif:hover { background: var(--surface-2); color: var(--text); }
.notif.unread::before { content: ""; position: absolute; left: 5px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translateY(-50%); }
.notif-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notif-text span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.notif-text small { color: var(--text-3); }
.notif-thumb { width: 88px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; flex: none; }
.notif-sys { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.notif-empty { padding: 40px 20px; text-align: center; color: var(--text-2); }
.popover { position: fixed; z-index: 90; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; min-width: 250px; animation: pop .14s var(--ease); }
.popover button, .popover a { display: flex; width: 100%; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 9px; font-weight: 500; text-align: left; }
.popover button:hover, .popover a:hover { background: var(--surface-2); color: var(--text); }
.popover .ic { width: 20px; height: 20px; color: var(--text-2); }
.popover hr { margin: 6px 0; }

/* ---------------------------------------------------------- sidebar -- */
.sidebar { position: fixed; top: var(--topbar); bottom: 0; left: 0; width: var(--sidebar); overflow-y: auto; padding: 10px 10px 30px; z-index: 40;
  scrollbar-width: thin; scrollbar-color: transparent transparent; transition: transform .25s var(--ease); background: var(--bg); }
.sidebar:hover { scrollbar-color: var(--border-2) transparent; }
.sidebar nav > a { display: flex; align-items: center; gap: 18px; height: 42px; padding: 0 14px; border-radius: 11px; font-weight: 500; color: var(--text); }
.sidebar nav > a:hover { background: var(--surface-2); color: var(--text); }
.sidebar nav > a.on { background: var(--surface-2); font-weight: 700; }
.sidebar nav > a.on .ic { color: var(--accent); }
.sidebar h4 { font-size: 15px; padding: 6px 14px; margin: 0; }
.side-cta { padding: 10px 14px 14px; }
.side-cta p { color: var(--text-2); font-size: 13px; }
.side-foot { padding: 14px; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--text-3); }
.side-foot a:hover { color: var(--text); }
.side-foot p { width: 100%; margin-top: 10px; }
.content { padding: calc(var(--topbar) + 18px) 28px 60px calc(var(--sidebar) + 28px); min-height: 100vh; transition: padding .25s var(--ease); }
body.side-collapsed .sidebar { transform: translateX(-100%); }
body.side-collapsed .content { padding-left: 28px; }
.scrim { display: none; }
.page-watch .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
.page-watch .content { padding-left: 28px; }
body.page-watch.side-open .sidebar { transform: none; }
body.page-watch.side-open .scrim { display: block; position: fixed; inset: var(--topbar) 0 0 0; background: var(--scrim); z-index: 35; }

/* ------------------------------------------------------------ chips -- */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; position: sticky; top: var(--topbar); z-index: 20; background: var(--bg); margin-top: -6px; padding-top: 8px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 10px; background: var(--surface-2); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: background .15s; }
.chip:hover { background: var(--surface-3); color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); }
.chip-tag { color: var(--accent); background: var(--accent-soft); }
.chip-tag.on { background: var(--accent); color: var(--accent-ink); }

/* ------------------------------------------------------- video card -- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 34px 18px; }
[data-density="compact"] .grid { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 22px 14px; }
.vcard { position: relative; min-width: 0; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--skeleton); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease), filter .3s; }
.vcard:hover .thumb img { transform: scale(1.035); }
.vcard-grid .thumb { box-shadow: 0 0 0 1px color-mix(in srgb, var(--border) 50%, transparent); }
.vcard-grid:hover .thumb { border-radius: 10px; }
.dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.78); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 6px; letter-spacing: .02em; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.3); }
.progress i { display: block; height: 100%; background: var(--grad); }
.badge-kids { position: absolute; left: 8px; top: 8px; background: #ffd23f; color: #3b2a00; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }
.vmeta { display: flex; gap: 12px; padding-top: 12px; position: relative; }
.vtext { flex: 1; min-width: 0; }
.vtitle { font-size: 15.5px; font-weight: 700; line-height: 1.35; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-right: 22px; }
.vtitle a:hover { color: var(--text); }
.vchan, .vstats { color: var(--text-2); font-size: 13.5px; }
.vchan { display: flex; align-items: center; }
.ch-name:hover { color: var(--text); }
.vwhy { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 2px 8px 2px 6px; border-radius: var(--pill); font-weight: 600; max-width: 100%; }
.vwhy .ic { width: 13px; height: 13px; }
.vmore { position: absolute; right: -10px; top: 6px; width: 34px; height: 34px; opacity: 0; transition: opacity .15s; }
.vmore .ic { width: 20px; height: 20px; }
.vcard:hover .vmore, .vmore:focus { opacity: 1; }
.vcard-list { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: 16px; }
.vcard-list .vmeta { padding-top: 0; }
.vcard-list .vtitle { font-size: 18px; font-weight: 600; }
.vcard-list .vchan { margin: 6px 0; }
.vdesc { color: var(--text-2); font-size: 13px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard-compact { display: grid; grid-template-columns: 168px 1fr; gap: 10px; }
.vcard-compact .thumb { border-radius: 10px; }
.vcard-compact .vmeta { padding-top: 0; }
.vcard-compact .vtitle { font-size: 14px; }
.vcard-compact .vchan, .vcard-compact .vstats { font-size: 12.5px; }
.vcard-compact .vmore { right: -8px; top: -4px; }
.list { display: flex; flex-direction: column; gap: 18px; }
.rank-row, .hist-row { display: flex; align-items: center; gap: 14px; }
.rank-row > .vcard, .hist-row > .vcard { flex: 1; }
.rank { font-size: 20px; font-weight: 800; color: var(--text-3); width: 34px; text-align: center; flex: none; }
.plcard .pl-count { position: absolute; inset: auto 0 0 0; background: linear-gradient(transparent, rgba(0,0,0,.8)); color: #fff; font-weight: 700; padding: 22px 12px 8px; display: flex; gap: 6px; align-items: center; justify-content: flex-end; font-size: 13px; }
.plcard .pl-count .ic { width: 18px; height: 18px; }
.thumb-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-3); background: var(--surface-2); }

/* ------------------------------------------------------------ shelf -- */
.shelf { margin-bottom: 36px; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.shelf-head h2 { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 10px; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.sentinel { display: grid; place-items: center; padding: 30px; }
.sentinel[hidden] { display: none; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 10px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--skeleton) 0, var(--surface-3) 50%, var(--skeleton) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------ watch -- */
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 402px; gap: 24px; max-width: 1760px; margin: 0 auto; }
.watch-layout.theater { grid-template-columns: minmax(0, 1fr) 402px; }
.watch-layout.theater .player-shell { grid-column: 1 / -1; }
.player-shell { position: relative; }
.ambient { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(70px) saturate(1.6); opacity: .55; transform: scale(1.05); pointer-events: none; z-index: 0; transition: opacity 1s; }
[data-theme="light"] .ambient { opacity: .3; }
.player-wrap { position: relative; z-index: 1; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.player-wrap video { width: 100%; height: 100%; display: block; background: #000; }
.theater .player-wrap { max-height: 78vh; aspect-ratio: auto; height: min(78vh, 56.25vw); border-radius: var(--radius); }
.player-msg { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; color: #ddd; text-align: center; padding: 20px; }
.player-msg.small { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); }
.age-gate { position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, #1d232b, #07090b); display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; color: #fff; padding: 30px; }
.age-gate .ic { width: 44px; height: 44px; color: var(--accent); }
.age-gate p { color: #bbb; max-width: 420px; }
.upnext { position: absolute; inset: 0; background: rgba(0,0,0,.82); backdrop-filter: blur(6px); display: grid; place-items: center; align-content: center; gap: 8px; color: #fff; text-align: center; padding: 20px; z-index: 5; }
.upnext img { width: min(320px, 70%); aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; margin: 6px auto; }
.upnext b { font-size: 18px; max-width: 520px; }
.upnext small { color: #bbb; }
.upnext-actions { display: flex; gap: 10px; margin-top: 10px; }
.upnext .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
.player-hint { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.65); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 18px; z-index: 6; pointer-events: none; animation: fadeout 0.9s forwards; }
@keyframes fadeout { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
.chapter-now { display: inline-flex; gap: 8px; align-items: center; margin-top: 12px; padding: 6px 12px; border-radius: var(--pill); background: var(--surface-2); font-weight: 600; cursor: pointer; }
.chapter-now .ic { width: 18px; height: 18px; }
.watch-tags { display: flex; gap: 10px; margin-top: 14px; font-size: 13px; font-weight: 600; }
.watch-tags a { color: var(--accent); }
.watch-title { font-size: 21px; font-weight: 800; margin: 8px 0 12px; letter-spacing: -.02em; }
.watch-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.owner { display: flex; align-items: center; gap: 12px; }
.owner-text { display: flex; flex-direction: column; margin-right: 10px; }
.owner-name { font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; }
.owner-text .muted { font-size: 12.5px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sub-wrap { position: relative; }
.sub-wrap .btn .ic { width: 18px; height: 18px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid var(--accent-line); margin: 10px 0; }
.notice .ic { width: 20px; height: 20px; color: var(--accent); }
.notice-danger { background: rgba(229,72,77,.12); border-color: rgba(229,72,77,.45); }
.notice-danger .ic { color: #ff6b70; }
.desc { background: var(--surface-2); border-radius: var(--radius); padding: 14px 16px; position: relative; transition: background .15s; }
.desc[data-collapsed] { max-height: 140px; overflow: hidden; cursor: pointer; }
.desc[data-collapsed]:hover { background: var(--surface-3); }
.desc[data-collapsed]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; background: linear-gradient(transparent, var(--surface-2)); pointer-events: none; }
.desc[data-collapsed]:hover::after { background: linear-gradient(transparent, var(--surface-3)); }
.desc-stats { font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.desc-body { white-space: normal; word-wrap: break-word; }
.desc-body a, .comment-body a, .post-body a, .ch-bio a, .chat-body a { color: var(--accent); }
.post-body a:hover, .comment-body a:hover, .desc-body a:hover { text-decoration: underline; }
.desc-toggle { position: absolute; right: 16px; bottom: 10px; font-weight: 700; z-index: 2; }
.desc:not([data-collapsed]) .desc-toggle { position: static; margin-top: 14px; }
.tag-note { background: var(--surface-3); border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; }
.tag-note .ic { width: 14px; height: 14px; }
.tag-kids { background: #ffd23f; color: #3b2a00; }
.chapters, .music-credit { margin-top: 18px; }
.chapters h4, .music-credit h4 { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.chapter-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.chapter { display: flex; flex-direction: column; gap: 6px; width: 170px; flex: none; text-align: left; padding: 6px; border-radius: 12px; }
.chapter:hover, .chapter.on { background: var(--surface-3); }
.chapter img { border-radius: 8px; aspect-ratio: 16/9; object-fit: cover; }
.chapter b { font-size: 13px; display: block; }
.chapter small { color: var(--accent); font-weight: 700; }
.track-row { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; background: var(--surface); }
.track-row b, .track-row small { display: block; }
.track-row small { color: var(--text-2); }
.cover { width: 48px; height: 48px; border-radius: 10px; background: var(--grad); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.desc-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; color: var(--text-2); font-size: 13px; }
.desc-meta span { display: inline-flex; gap: 6px; align-items: center; }
.desc-meta .ic { width: 16px; height: 16px; }
.secondary { min-width: 0; }
.autoplay-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.related { display: flex; flex-direction: column; gap: 12px; }
.pl-panel { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; background: var(--surface); }
.pl-panel header { padding: 12px 16px; background: var(--surface-2); display: flex; flex-direction: column; }
.pl-panel header small { color: var(--text-2); }
.pl-items { max-height: 420px; overflow: auto; }
.pl-item { display: grid; grid-template-columns: 24px 100px 1fr; gap: 10px; align-items: center; padding: 8px 12px; }
.pl-item:hover, .pl-item.on { background: var(--surface-2); color: var(--text); }
.pl-item img { border-radius: 8px; aspect-ratio: 16/9; object-fit: cover; }
.pl-item b { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-item small { color: var(--text-2); font-size: 12px; }
.pl-idx { color: var(--text-3); font-size: 12px; text-align: center; }

/* --------------------------------------------------------- comments -- */
.comments { margin-top: 26px; }
.comments-head { display: flex; align-items: center; gap: 28px; margin-bottom: 18px; }
.comments-head h2 { font-size: 20px; margin: 0; }
.comments-head .menu { left: 0; right: auto; }
.comment-form { display: flex; gap: 14px; margin-bottom: 26px; }
.cf-body { flex: 1; }
.cf-body textarea { width: 100%; border: 0; border-bottom: 1px solid var(--border-2); background: transparent; outline: 0; resize: none; padding: 6px 0; min-height: 30px; overflow: hidden; }
.cf-body textarea:focus { border-bottom: 2px solid var(--accent); }
.cf-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px; }
.cf-actions .muted { margin-right: auto; }
.comment-signin { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-radius: var(--radius); border: 1px dashed var(--border-2); margin-bottom: 24px; color: var(--text-2); font-weight: 600; }
.comment { display: flex; gap: 14px; margin-bottom: 22px; }
.comment.hl { background: var(--accent-soft); border-radius: var(--radius); padding: 12px; margin-left: -12px; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.comment-head a { font-weight: 700; }
.comment-head .creator { background: var(--surface-3); padding: 1px 8px; border-radius: var(--pill); }
.comment-head small { color: var(--text-3); }
.comment-pin { font-size: 12px; color: var(--text-2); display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.comment-pin .ic { width: 14px; height: 14px; }
.comment-body { margin: 4px 0 6px; word-wrap: break-word; white-space: normal; }
.comment-tools { display: flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 12.5px; }
.comment-tools button { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: var(--pill); font-weight: 600; }
.comment-tools button:hover { background: var(--surface-2); color: var(--text); }
.comment-tools .ic { width: 17px; height: 17px; }
.comment-tools .on { color: var(--accent); }
.comment-tools .on .ic { fill: var(--accent-soft); }
.heart-badge { position: relative; display: inline-flex; margin-left: 4px; }
.heart-badge img { width: 20px; height: 20px; border-radius: 50%; }
.heart-badge .ic { position: absolute; right: -6px; bottom: -4px; width: 13px; height: 13px; color: #ff3b5c; fill: #ff3b5c; }
.replies-toggle { color: var(--accent); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: var(--pill); }
.replies-toggle:hover { background: var(--accent-soft); }
.replies { margin-top: 10px; }
.replies .comment { margin-bottom: 14px; }
.reply-form { margin: 10px 0 0; }
.held-tag { font-size: 11px; background: #ffb02033; color: #ffb020; padding: 1px 8px; border-radius: 6px; font-weight: 700; }
.comments-off { padding: 20px; border-radius: var(--radius); background: var(--surface-2); color: var(--text-2); text-align: center; }

/* ----------------------------------------------------------- channel -- */
.channel { max-width: 1320px; margin: 0 auto; }
.banner { height: clamp(110px, 16vw, 220px); border-radius: var(--radius-lg); background: center / cover no-repeat var(--surface-2); overflow: hidden; position: relative; }
.banner-art { position: absolute; inset: 0; background: radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 45%), radial-gradient(circle at 80% 70%, color-mix(in srgb, var(--accent-2) 55%, transparent), transparent 50%), var(--surface-2); }
.ch-head { display: flex; gap: 24px; align-items: center; padding: 22px 0 10px; }
.ch-avatar { width: 128px; height: 128px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--accent-line); }
.ch-info h1 { font-size: 34px; font-weight: 800; letter-spacing: -.03em; display: flex; align-items: center; margin-bottom: 4px; }
.ch-bio { color: var(--text-2); max-width: 700px; margin-bottom: 6px; }
.ch-links { display: flex; gap: 14px; flex-wrap: wrap; font-weight: 600; }
.ch-links a { color: var(--accent); display: inline-flex; gap: 5px; align-items: center; }
.ch-links .ic { width: 16px; height: 16px; }
.ch-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin: 10px 0 22px; overflow-x: auto; }
.tabs a { padding: 12px 16px; font-weight: 700; color: var(--text-2); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs.small a { padding: 8px 12px; }
.featured { display: grid; grid-template-columns: minmax(280px, 520px) 1fr; gap: 24px; margin-bottom: 34px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.featured h2 { font-size: 20px; }
.about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card h3 .ic { width: 20px; height: 20px; color: var(--accent); }
.stat-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 12px; }
.stat-list li { display: flex; gap: 12px; align-items: center; }
.stat-list .ic { width: 20px; height: 20px; color: var(--text-2); }
.link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.link-list a { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 10px; border-radius: 10px; align-items: center; }
.link-list a:hover { background: var(--surface-2); color: var(--text); }
.link-list a > :first-child { grid-row: span 2; }
.link-list small { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; }
.chan-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px; border-radius: var(--radius); text-align: center; }
.chan-card:hover { background: var(--surface-2); color: var(--text); }
.chan-card small { color: var(--text-2); }
.chan-result { display: grid; grid-template-columns: 120px 1fr auto; gap: 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.chan-result .avatar { width: 120px; height: 120px; }
.chan-result .h3 { font-size: 18px; font-weight: 700; display: inline-flex; align-items: center; }
.sub-strip { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.sub-strip a { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 80px; flex: none; }
.sub-strip small { font-size: 12px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.sub-list { display: flex; flex-direction: column; }
.sub-row { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; }
.sub-row:hover { background: var(--surface-2); color: var(--text); }
.sub-row > span { flex: 1; display: flex; flex-direction: column; }
.sub-row small { color: var(--text-2); }

/* ---------------------------------------------------- page headings -- */
.narrow { max-width: 1100px; margin: 0 auto; }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .page-title { margin: 0; }
.page-hero { display: flex; align-items: center; gap: 22px; padding: 26px; border-radius: var(--radius-lg); margin-bottom: 18px; flex-wrap: wrap;
  background: radial-gradient(circle at 0% 0%, var(--accent-soft), transparent 60%), var(--surface); border: 1px solid var(--border); }
.page-hero h1 { font-size: 30px; font-weight: 800; margin: 0; }
.page-hero p { color: var(--text-2); margin: 4px 0 0; }
.page-hero > div:nth-child(2) { flex: 1; }
.hero-ic { width: 64px; height: 64px; border-radius: 18px; background: var(--grad); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.hero-ic .ic { width: 32px; height: 32px; }
.studio-me .hero-ic { width: 72px; height: 72px; }
.hero-trending .hero-ic { background: linear-gradient(135deg, #ff7a3d, #ff3d6e); color: #fff; }
.trend-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.trend-side { position: sticky; top: calc(var(--topbar) + 20px); align-self: start; }
.trend-list { list-style: none; padding: 0; margin: 0; }
.trend-list a { display: flex; gap: 12px; padding: 8px 10px; border-radius: 10px; font-weight: 600; }
.trend-list a:hover { background: var(--surface-2); color: var(--text); }
.trend-list span { color: var(--accent); width: 18px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a, .tag-banner { background: var(--accent-soft); color: var(--accent); font-weight: 700; padding: 5px 12px; border-radius: var(--pill); }
.tag-banner { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.filters .chip { height: 30px; font-size: 12.5px; }
.filter-label { display: inline-flex; gap: 5px; align-items: center; color: var(--text-3); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-left: 10px; }
.filter-label:first-child { margin-left: 0; }
.filter-label .ic { width: 15px; height: 15px; }
.did-you-mean { font-size: 16px; }
.did-you-mean a { color: var(--accent); }
.pager { display: flex; gap: 10px; justify-content: center; margin: 26px 0; }
.empty { text-align: center; padding: 70px 20px; max-width: 460px; margin: 0 auto; }
.empty-ic { width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.empty-ic .ic { width: 42px; height: 42px; }
.empty p { color: var(--text-2); }
.error-page { text-align: center; padding: 80px 20px; }
.error-code { font-size: 120px; font-weight: 900; letter-spacing: -.06em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 12px; }

/* ----------------------------------------------- library / history -- */
.library { display: grid; grid-template-columns: 1fr 280px; gap: 26px; }
.lib-main { min-width: 0; }
.lib-side { align-self: start; position: sticky; top: calc(var(--topbar) + 20px); text-align: center; display: flex; flex-direction: column; align-items: center; }
.lib-side .stat-list { width: 100%; text-align: left; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 10px; }
.history { display: grid; grid-template-columns: 1fr 300px; gap: 30px; max-width: 1200px; }
.hist-side { position: sticky; top: calc(var(--topbar) + 20px); align-self: start; display: flex; flex-direction: column; gap: 4px; }
.side-search { position: relative; display: flex; align-items: center; }
.side-search input { width: 100%; border: 0; border-bottom: 1px solid var(--border-2); background: transparent; padding: 10px 30px 10px 2px; outline: 0; }
.side-search input:focus { border-color: var(--accent); }
.side-search .ic { position: absolute; right: 2px; width: 18px; height: 18px; color: var(--text-3); }
.side-action { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 10px; font-weight: 600; text-align: left; }
.side-action:hover { background: var(--surface-2); color: var(--text); }
.search-hist { list-style: none; padding: 0; }
.search-hist li { display: flex; gap: 14px; align-items: center; padding: 12px; border-bottom: 1px solid var(--border); }
.search-hist li a { flex: 1; font-weight: 600; }
.pl-page { display: grid; grid-template-columns: 360px 1fr; gap: 26px; }
.pl-hero { position: sticky; top: calc(var(--topbar) + 20px); align-self: start; padding: 22px; border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 60%); border: 1px solid var(--border); }
.pl-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; }
.pl-hero h1 { font-size: 26px; font-weight: 800; }
.pl-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.notif-page { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.notif-page .notif { border-bottom: 1px solid var(--border); }

/* ------------------------------------------------------------- music -- */
.track-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.track-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .2s var(--ease); }
.track-card:hover { transform: translateY(-3px); color: var(--text); }
.track-card small { color: var(--text-2); }
.track-art { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; color: #fff; margin-bottom: 6px; }
.track-art .ic { width: 40%; height: 40%; stroke-width: 1.4; }
.art-0 { background: linear-gradient(135deg, #2f9dff, #1550e6); } .art-1 { background: linear-gradient(135deg, #6b5cff, #ff5cc6); }
.art-2 { background: linear-gradient(135deg, #ff8a3d, #ff3d6e); } .art-3 { background: linear-gradient(135deg, #3b9dff, #14dd8b); }
.art-4 { background: linear-gradient(135deg, #ffd23f, #ff8a3d); }
.music-search { display: flex; gap: 10px; margin: 6px 0 18px; flex-wrap: wrap; }
.music-search input, .music-search select { height: 40px; border-radius: var(--pill); border: 1px solid var(--border-2); background: var(--surface); padding: 0 16px; flex: 1; min-width: 200px; }
.music-search select { flex: 0 0 auto; min-width: 160px; }
.track-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.track-line { display: grid; grid-template-columns: 44px 2.2fr 1fr 1fr 70px 130px 44px; gap: 12px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.track-line:last-child { border-bottom: 0; }
.track-line:hover { background: var(--surface-2); }
.track-line b, .track-line small { display: block; }
.track-line small { color: var(--text-2); }
.track-line.playing .play-btn { background: var(--accent); color: var(--accent-ink); }
.lic { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); justify-self: start; }
.track-hero { display: flex; gap: 28px; align-items: center; margin-bottom: 30px; flex-wrap: wrap; }
.track-art.big { width: 220px; margin: 0; box-shadow: var(--shadow); }
.track-hero h1 { font-size: 40px; font-weight: 900; letter-spacing: -.03em; }
.track-hero audio { width: 100%; max-width: 420px; margin: 8px 0 12px; }

/* ------------------------------------------------------------- forms -- */
input[type=text], input[type=email], input[type=search], input[type=date], input[type=datetime-local], input[type=url], input:not([type]), select, textarea {
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 10px 12px; outline: 0; transition: border-color .15s, box-shadow .15s; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea { resize: vertical; line-height: 1.5; }
.form-grid { display: flex; flex-direction: column; gap: 14px; }
.form-grid label, .fl { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.form-page { max-width: 760px; }
.fl-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; font-size: 13.5px; }
.fl-label .ic { width: 18px; height: 18px; }
.fl-label small { font-weight: 500; }
.counter { color: var(--text-3); font-variant-numeric: tabular-nums; }
.counter.warn { color: #ffb020; }
.field-err { color: #ff6b70; font-size: 13px; margin: -6px 0 6px; font-weight: 600; }
.check-row { display: flex !important; flex-direction: row !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.prefix-input { display: flex; align-items: center; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm); }
.prefix-input:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.prefix-input span { padding-left: 12px; color: var(--text-3); font-weight: 700; }
.prefix-input input { border: 0; box-shadow: none !important; padding-left: 4px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.toggle-row:last-child { border-bottom: 0; }
.toggle-text { display: flex; flex-direction: column; gap: 2px; }
.toggle-text b { font-weight: 600; }
.toggle-text small { color: var(--text-2); }
.switch { position: relative; width: 44px; height: 26px; flex: none; display: inline-block; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: var(--surface-3); border-radius: 13px; transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch-label { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 600; font-size: 13px; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 12px 0; }
.radio-cards.three { grid-template-columns: repeat(3, 1fr); }
.radio-cards label { position: relative; cursor: pointer; }
.radio-cards input { position: absolute; opacity: 0; }
.radio-cards span { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius); border: 1.5px solid var(--border-2); background: var(--bg-2); height: 100%; transition: border-color .15s, background .15s; }
.radio-cards span .ic { color: var(--text-2); margin-bottom: 4px; }
.radio-cards small { color: var(--text-2); font-weight: 500; }
.radio-cards input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.radio-cards input:checked + span .ic { color: var(--accent); }
.radio-cards input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.radio-list { display: flex; flex-direction: column; gap: 2px; margin: 12px 0; max-height: 340px; overflow: auto; }
.radio-list label { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.radio-list label:hover { background: var(--surface-2); }
.radio-list input { accent-color: var(--accent); width: 18px; height: 18px; }
details.more { margin-top: 10px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 6px 0; }

/* ------------------------------------------------------------ upload -- */
.upload-page { max-width: 1320px; margin: 0 auto; }
.drop { min-height: calc(100vh - var(--topbar) - 90px); display: grid; place-items: center; border: 2px dashed var(--border-2); border-radius: var(--radius-lg); transition: border-color .2s, background .2s;
  background: radial-gradient(circle at 50% 20%, var(--accent-soft), transparent 55%); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-inner { text-align: center; max-width: 560px; padding: 40px 20px; }
.drop-ic { width: 120px; height: 120px; margin: 0 auto 22px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); box-shadow: 0 0 0 10px var(--accent-soft); }
.drop-ic .ic { width: 50px; height: 50px; }
.drop h1 { font-size: 28px; font-weight: 800; }
.drop-rules { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; margin: 24px 0; color: var(--text-2); }
.drop-rules li { display: flex; gap: 8px; align-items: center; }
.drop-rules .ic { width: 16px; height: 16px; color: var(--accent); }
.upload-editor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; }
.ue-steps { display: flex; gap: 6px; position: sticky; top: var(--topbar); background: var(--bg); padding: 10px 0; z-index: 10; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.ue-steps a { padding: 8px 14px; border-radius: var(--pill); font-weight: 700; background: var(--surface-2); white-space: nowrap; }
.vf-sec { padding: 6px 0 26px; border-bottom: 1px solid var(--border); margin-bottom: 22px; display: flex; flex-direction: column; gap: 16px; scroll-margin-top: calc(var(--topbar) + 70px); }
.vf-sec h2 { font-size: 21px; margin: 0; }
.ue-side { position: sticky; top: calc(var(--topbar) + 16px); align-self: start; display: flex; flex-direction: column; gap: 14px; }
.ue-preview { padding: 0; overflow: hidden; margin: 0; }
.ue-preview video { width: 100%; aspect-ratio: 16/9; background: #000; display: block; }
.ue-info { display: grid; gap: 2px; padding: 14px 16px 0; }
.ue-info a, .ue-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 8px; }
.ue-info a { color: var(--accent); font-weight: 600; }
.up-progress { padding: 0 16px 16px; }
.bar { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 4px; transition: width .3s; }
.up-meta { display: flex; justify-content: space-between; margin-top: 8px; font-weight: 700; font-size: 13px; }
.up-warn { margin: 0 16px 16px; font-size: 13px; }
.ue-actions { display: flex; gap: 10px; justify-content: flex-end; }
.ue-actions #btn-publish { flex: 1; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm); min-height: 46px; }
.tag-input:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.tag-input input[type=text] { border: 0; box-shadow: none !important; flex: 1; min-width: 160px; padding: 6px; background: transparent; }
.tchip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent); font-weight: 700; padding: 3px 4px 3px 10px; border-radius: var(--pill); font-size: 13px; }
.tchip button { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; line-height: 1; }
.tchip button:hover { background: var(--accent); color: var(--accent-ink); }
.thumb-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb-cands { display: contents; }
.thumb-opt { width: 160px; aspect-ratio: 16/9; border-radius: 10px; border: 2px solid var(--border-2); overflow: hidden; display: grid; place-items: center; background: var(--surface-2); position: relative; cursor: pointer; padding: 0; }
.thumb-opt img { width: 100%; height: 100%; object-fit: cover; }
.thumb-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.thumb-opt.on::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 900; display: grid; place-items: center; font-size: 13px; }
.thumb-upload { border-style: dashed; flex-direction: column; gap: 4px; display: flex; justify-content: center; align-items: center; color: var(--text-2); font-weight: 600; font-size: 12.5px; }
.thumb-loading { display: grid; place-items: center; }
.music-pick { gap: 8px; }
.music-results { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; }
.music-results:empty { display: none; }
.mres { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; cursor: pointer; text-align: left; width: 100%; }
.mres:hover { background: var(--surface-2); }
.mres .cover { width: 38px; height: 38px; }
.mres span { flex: 1; display: flex; flex-direction: column; }
.mres small { color: var(--text-2); }
.music-chosen { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--accent-soft); font-weight: 700; }
.music-chosen > span:nth-child(2) { flex: 1; }
.music-chosen[hidden] { display: none; }
.toggles { display: flex; flex-direction: column; }
.schedule-at[hidden] { display: none; }
.done-body { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.done-body img { width: 160px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; }

/* ------------------------------------------------------------ studio -- */
.studio { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; max-width: 1500px; margin: 0 auto; }
.studio-nav { position: sticky; top: calc(var(--topbar) + 16px); align-self: start; display: flex; flex-direction: column; gap: 2px; }
.studio-nav > a { display: flex; gap: 14px; align-items: center; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.studio-nav > a:hover { background: var(--surface-2); color: var(--text); }
.studio-nav > a.on { background: var(--accent-soft); color: var(--accent); }
.studio-nav > a.btn { margin-top: 12px; justify-content: center; }
.studio-nav .vbadge { margin: 0 2px 0 0; }
.studio-me { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 10px 18px; text-align: center; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.stat small { color: var(--text-2); font-weight: 600; }
.stat b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat .up { color: var(--accent); font-weight: 700; font-size: 13px; }
.stat a { color: var(--accent); font-weight: 700; font-size: 13px; }
.chart-card .bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-top: 10px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar-col i { width: 100%; min-height: 2px; background: var(--grad); border-radius: 4px 4px 0 0; opacity: .85; transition: opacity .15s; }
.bar-col:hover i { opacity: 1; }
.bar-col small { font-size: 10.5px; color: var(--text-3); height: 14px; white-space: nowrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two-col > .card { margin-bottom: 0; }
.two-col + .two-col, .two-col + .card { margin-top: 18px; }
.mini-row { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; }
.mini-row:hover { background: var(--surface-2); color: var(--text); }
.mini-row img { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; flex: none; }
.mini-row > span:not(.pill-status):not(.rank) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-comment { display: flex; gap: 10px; margin-bottom: 14px; }
.mini-comment p { margin: 2px 0 0; color: var(--text-2); }
.pill-status { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: var(--pill); background: var(--surface-3); text-transform: capitalize; white-space: nowrap; }
.pill-status .ic { width: 14px; height: 14px; }
.st-public, .st-ready, .st-approved, .st-actioned { background: var(--accent-soft); color: var(--accent); }
.st-processing, .st-uploading, .st-pending, .st-scheduled, .st-open { background: #ffb0201f; color: #ffb020; }
.st-failed, .st-removed, .st-rejected { background: rgba(229,72,77,.15); color: #ff6b70; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .chips { position: static; padding: 0; margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.t-video { display: flex; gap: 14px; min-width: 380px; }
.t-video > a { position: relative; width: 140px; flex: none; }
.t-video > a img { width: 140px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.t-video .dur { right: 4px; bottom: 4px; font-size: 11px; }
.t-title { font-weight: 700; display: block; margin-bottom: 4px; }
.t-actions { display: flex; gap: 4px; margin-top: 6px; opacity: 0; transition: opacity .15s; }
tr:hover .t-actions { opacity: 1; }
.t-actions a, .t-actions button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.t-actions a:hover, .t-actions button:hover { background: var(--surface-3); color: var(--text); }
.t-actions .ic { width: 18px; height: 18px; }
.an-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.an-head img { width: 160px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; }
.an-head > div { display: flex; flex-direction: column; }
.retention { width: 100%; height: 180px; }
.ret-axis { display: flex; justify-content: space-between; color: var(--text-3); font-size: 12px; }
.src-row { display: grid; grid-template-columns: 180px 1fr 60px; gap: 14px; align-items: center; padding: 8px 0; }
.src-row b { text-align: right; }
.mod-list { display: flex; flex-direction: column; gap: 10px; }
.mod-row { display: grid; grid-template-columns: 40px 1fr 140px; gap: 14px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.mod-body p { margin: 4px 0 8px; }
.mod-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mod-video img { border-radius: 8px; aspect-ratio: 16/9; object-fit: cover; }
.mod-video small { color: var(--text-2); font-size: 12px; }
.verify-hero { display: flex; gap: 22px; align-items: center; margin-bottom: 22px; }
.verify-hero h1 { font-size: 30px; font-weight: 800; }
.checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: center; }
.checklist .ic { width: 20px; height: 20px; padding: 2px; border-radius: 50%; }
.checklist .ok .ic { background: var(--accent); color: var(--accent-ink); }
.checklist .no .ic { background: var(--surface-3); color: var(--text-3); }
.report-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.report blockquote { margin: 0 0 6px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.resolve { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.resolve input { flex: 1; min-width: 220px; }
.track-admin audio { width: 100%; margin: 8px 0; }

/* ---------------------------------------------------------- settings -- */
.settings { display: grid; grid-template-columns: 240px minmax(0, 860px); gap: 34px; }
.settings-nav { position: sticky; top: calc(var(--topbar) + 16px); align-self: start; display: flex; flex-direction: column; gap: 2px; }
.settings-nav h1 { font-size: 24px; font-weight: 800; padding: 0 14px; margin-bottom: 14px; }
.settings-nav a { padding: 10px 14px; border-radius: 10px; font-weight: 600; color: var(--text-2); }
.settings-nav a:hover { background: var(--surface-2); color: var(--text); }
.settings-nav a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.settings-main h2 { font-size: 26px; font-weight: 800; }
.settings-main h3 { margin-top: 8px; }
.save-bar { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 40%); display: flex; justify-content: flex-end; z-index: 5; }
.acct-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.acct-card > div { flex: 1; }
.brand-row { display: flex; gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.brand-row:last-child { border-bottom: 0; }
.brand-row input[type=file] { margin-top: 6px; }
.banner-prev { width: 220px; aspect-ratio: 6 / 1; border-radius: 10px; background: center/cover var(--grad); flex: none; }
.accents { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0; }
.accent-dot { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; position: relative; font-size: 12.5px; font-weight: 600; }
.accent-dot input { position: absolute; opacity: 0; }
.accent-dot i { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--border-2); transition: box-shadow .15s; }
.accent-dot input:checked + i { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
.acc-royal i { background: linear-gradient(135deg, #2f9dff, #1550e6); } .acc-emerald i { background: linear-gradient(135deg, #14dd8b, #0bb8cc); } .acc-ocean i { background: linear-gradient(135deg, #3b9dff, #6b5cff); }
.acc-violet i { background: linear-gradient(135deg, #9d6bff, #ff5cc6); } .acc-sunset i { background: linear-gradient(135deg, #ff8a3d, #ff3d6e); }
.acc-rose i { background: linear-gradient(135deg, #ff4d8d, #ff9a5c); }
.kbd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 20px; }
.kbd-grid span { display: flex; gap: 10px; align-items: center; color: var(--text-2); }
.danger-zone { border-color: rgba(229,72,77,.35); }
.danger-zone h3 .ic { color: #ff6b70; }
input[type=range] { accent-color: var(--accent); width: 100%; }

/* -------------------------------------------------------------- auth -- */
.page-auth .content { padding-left: 28px; }
.page-auth .sidebar { transform: translateX(-100%); }
.auth-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; min-height: calc(100vh - var(--topbar) - 80px); max-width: 1180px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.auth-wrap.single { grid-template-columns: 1fr; max-width: 620px; }
.auth-art { position: relative; overflow: hidden; background: #040915; display: grid; place-items: center; padding: 40px; color: #fff; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .75; animation: float 12s ease-in-out infinite alternate; }
.orb-1 { width: 380px; height: 380px; background: #1e9dff; top: -90px; left: -80px; }
.orb-2 { width: 300px; height: 300px; background: #0a3fc0; bottom: -80px; right: -40px; animation-delay: -4s; }
.orb-3 { width: 200px; height: 200px; background: #6b5cff; top: 40%; left: 50%; opacity: .45; animation-delay: -8s; }
@keyframes float { to { transform: translate(40px, 30px) scale(1.1); } }
.auth-quote { position: relative; z-index: 1; max-width: 420px; }
.auth-quote h2 { font-size: 40px; font-weight: 900; letter-spacing: -.04em; line-height: 1.08; margin-bottom: 26px; }
.auth-quote ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; color: #d6e2dc; font-weight: 500; }
.auth-quote li { display: flex; gap: 10px; align-items: center; }
.auth-quote li .ic { width: 20px; height: 20px; color: #5cb8ff; }
.auth-card { padding: 54px 48px; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 6px; }
.auth-card.wide { text-align: left; gap: 10px; }
.auth-card h1 { font-size: 30px; font-weight: 800; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; height: 50px; border-radius: var(--pill); background: #fff; color: #1f1f1f; font-weight: 700; font-size: 15px; border: 1px solid #dadce0; margin: 18px 0 8px; transition: box-shadow .2s, transform .15s; }
.btn-google:hover { color: #1f1f1f; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.btn-google:active { transform: scale(.98); }
.btn-google .ic { color: #1f1f1f; }
.dev-login { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border-2); }
.auth-legal { color: var(--text-3); font-size: 12.5px; margin-top: 22px; }
.auth-legal a { color: var(--text-2); text-decoration: underline; }
.steps { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.steps span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--pill); background: var(--surface-2); color: var(--text-3); }
.steps span.on { background: var(--accent-soft); color: var(--accent); }
.onb-avatar { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--radius); background: var(--surface-2); margin: 8px 0; }
.onb-avatar small { display: flex; gap: 4px; align-items: center; }
.onb-avatar .ic { width: 16px; height: 16px; color: var(--accent); }
.auth-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }

/* ------------------------------------------------------------- legal -- */
.legal { display: grid; grid-template-columns: 250px minmax(0, 780px); gap: 40px; max-width: 1100px; margin: 0 auto; }
.legal-nav { position: sticky; top: calc(var(--topbar) + 16px); align-self: start; display: flex; flex-direction: column; gap: 2px; }
.legal-nav h4 { display: flex; gap: 8px; align-items: center; padding: 0 12px; margin-bottom: 10px; }
.legal-nav h4 .ic { color: var(--accent); width: 20px; height: 20px; }
.legal-nav a { padding: 8px 12px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.legal-nav a:hover { color: var(--text); background: var(--surface-2); }
.legal-nav a.on { color: var(--accent); background: var(--accent-soft); }
.legal-nav p { padding: 16px 12px 0; }
.legal-doc { font-size: 15.5px; line-height: 1.7; }
.legal-doc header { margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.legal-doc h1 { font-size: 38px; font-weight: 900; letter-spacing: -.03em; }
.legal-doc h2 { font-size: 21px; margin-top: 34px; scroll-margin-top: calc(var(--topbar) + 20px); }
.legal-doc h3 { font-size: 16.5px; margin-top: 20px; }
.legal-doc .lead { font-size: 17.5px; color: var(--text-2); }
.legal-doc a { color: var(--accent); }
.legal-doc li { margin-bottom: 6px; }
.legal-table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: 14px; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); vertical-align: top; }
.legal-table th { background: var(--surface-2); }
.legal-foot { margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--border); }
.badge-showcase { display: flex; gap: 24px; align-items: center; padding: 24px; border-radius: var(--radius-lg); background: radial-gradient(circle at 10% 50%, rgba(20,224,138,.18), transparent 60%), var(--surface); border: 1px solid var(--border); margin-bottom: 20px; }
.badge-showcase h2 { margin: 0 0 4px; }
.about { max-width: 1100px; margin: 0 auto; }
.about-hero { text-align: center; padding: 50px 20px 40px; }
.about-hero h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 900; letter-spacing: -.045em; line-height: 1.05; }
.about-hero > p { font-size: 18px; color: var(--text-2); max-width: 720px; margin: 0 auto 26px; }
.about-hero .logo-mark { margin: 0 auto 20px; }
.logo-mark.lg, .logo-mark.xl { filter: drop-shadow(0 12px 30px rgba(30, 110, 255, .45)); }
.embed-brand img { border-radius: 6px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 20px; }
.feature-grid .card > .ic, .feature-grid .card > .vbadge { width: 30px; height: 30px; color: var(--accent); margin: 0 0 12px; }

/* ------------------------------------------------------------- modal -- */
.modal { position: fixed; inset: 0; z-index: 100; background: var(--scrim); display: grid; place-items: center; padding: 20px; animation: fadein .15s; backdrop-filter: blur(4px); }
.modal[hidden] { display: none; }
@keyframes fadein { from { opacity: 0; } }
.modal-card { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); animation: pop .2s var(--ease); }
.modal-sm { width: min(400px, 100%); }
.modal-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-card h2 { font-size: 19px; margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.share-targets { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; }
.share-targets a, .share-targets button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; flex: none; width: 66px; cursor: pointer; }
.st { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 18px; color: #fff; transition: transform .15s; }
.share-targets a:hover .st, .share-targets button:hover .st { transform: scale(1.08); }
.st-x { background: #000; border: 1px solid #333; } .st-wa { background: #1fae54; font-size: 15px; } .st-tg { background: #2a9fd6; font-size: 15px; }
.st-fb { background: #1f6fe5; font-size: 24px; } .st-rd { background: #ff5700; font-size: 16px; } .st-in { background: #0a66c2; }
.st-mail, .st-embed { background: var(--surface-3); color: var(--text); }
.copy-row { display: flex; gap: 8px; margin: 10px 0; }
.copy-row input { flex: 1; }
.embed-box { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.embed-box textarea { font-family: var(--mono); font-size: 12px; }
.pl-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; max-height: 300px; overflow: auto; }
.pl-list label { display: flex; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 9px; cursor: pointer; }
.pl-list label:hover { background: var(--surface-2); }
.pl-list input { width: 18px; height: 18px; accent-color: var(--accent); }
.pl-list .ic { margin-left: auto; width: 16px; height: 16px; color: var(--text-3); }
.pl-new { display: grid; grid-template-columns: 1fr auto; gap: 8px; border-top: 1px solid var(--border); padding-top: 14px; }
.pl-new input { grid-column: 1 / -1; }

/* ------------------------------------------------------------- toasts -- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); animation: toastin .25s var(--ease); pointer-events: auto; max-width: min(560px, 92vw); }
.toast-error { background: #e5484d; color: #fff; }
.toast-success { background: var(--grad); color: var(--accent-ink); }
.toast.out { opacity: 0; transform: translateY(10px); transition: all .3s; }
@keyframes toastin { from { opacity: 0; transform: translateY(14px); } }
.cookie-bar { position: fixed; left: 20px; bottom: 20px; z-index: 110; max-width: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow); animation: toastin .3s var(--ease); }
.cookie-bar p { color: var(--text-2); font-size: 13.5px; }
.cookie-bar b { color: var(--text); }
.cookie-bar a { color: var(--accent); }

/* ------------------------------------------------------------- embed -- */
body.embed { margin: 0; background: #000; overflow: hidden; }
body.embed video { width: 100vw; height: 100vh; display: block; }
.embed-brand { position: fixed; top: 0; left: 0; right: 0; display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: linear-gradient(rgba(0,0,0,.7), transparent); color: #fff; font-weight: 600; opacity: 0; transition: opacity .2s; }
body.embed:hover .embed-brand { opacity: 1; }
.embed-brand span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.embed-brand b { font-size: 12px; background: rgba(255,255,255,.15); padding: 4px 10px; border-radius: 999px; }
.embed-msg { color: #fff; display: grid; place-items: center; height: 100vh; text-align: center; align-content: center; }

/* -------------------------------------------------------- responsive -- */
@media (max-width: 1280px) {
  .watch-layout { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 1100px) {
  .watch-layout, .watch-layout.theater { grid-template-columns: 1fr; }
  .related { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
  .related .vcard-compact { grid-template-columns: 1fr; }
  .upload-editor, .trend-layout, .library, .history, .pl-page, .about-grid { grid-template-columns: 1fr; }
  .ue-side, .trend-side, .lib-side, .hist-side, .pl-hero { position: static; }
  .studio, .settings, .legal { grid-template-columns: 1fr; gap: 16px; }
  .studio-nav, .settings-nav, .legal-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 6px; }
  .studio-me, .settings-nav h1, .legal-nav h4, .legal-nav p { display: none; }
  .studio-nav > a, .settings-nav a, .legal-nav a { white-space: nowrap; flex: none; }
  .studio-nav > a.btn { margin: 0; }
  .two-col { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
  .content { padding-left: 16px !important; padding-right: 16px; }
  body.side-open .sidebar { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: var(--topbar) 0 0 0; background: var(--scrim); z-index: 35; }
  .tb-left, .tb-right { min-width: 0; }
  .btn-create span, .btn-signin span { display: none; }
  .btn-create, .btn-signin { width: 40px; padding: 0; }
  .featured { grid-template-columns: 1fr; }
  .vcard-list { grid-template-columns: 1fr; }
  .chan-result { grid-template-columns: 80px 1fr; }
  .chan-result .avatar { width: 80px; height: 80px; }
  .chan-result .sub-wrap { grid-column: 2; }
  .track-line { grid-template-columns: 44px 1fr 70px 44px; }
  .track-line > :nth-child(3), .track-line > :nth-child(4), .track-line > :nth-child(6) { display: none; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 8px; gap: 6px; }
  .search { display: none; position: absolute; left: 0; right: 0; top: 0; height: var(--topbar); background: var(--bg); padding: 9px 8px; max-width: none; z-index: 2; }
  body.search-open .search { display: flex; }
  .mobile-search { display: inline-grid; }
  .logo-word { font-size: 19px; }
  .grid { grid-template-columns: 1fr; gap: 26px; }
  .ch-head { flex-direction: column; text-align: center; }
  .ch-info h1 { justify-content: center; font-size: 26px; }
  .ch-links, .ch-actions { justify-content: center; }
  .ch-avatar { width: 96px; height: 96px; }
  .player-wrap { border-radius: 0; margin: 0 -16px; }
  .watch-title { font-size: 18px; }
  .actions { overflow-x: auto; flex-wrap: nowrap; width: 100%; padding-bottom: 4px; }
  .pill { flex: none; }
  .two { grid-template-columns: 1fr; }
  .radio-cards.three { grid-template-columns: 1fr; }
  .mod-row { grid-template-columns: 40px 1fr; }
  .mod-video { display: none; }
  .auth-card { padding: 34px 22px; }
  .cookie-bar { left: 10px; right: 10px; bottom: 10px; }
  .src-row { grid-template-columns: 110px 1fr 50px; }
}
.legal-nav p a { padding: 0; font-size: inherit; }
.content { overflow-x: clip; }
.setup-bar { border: 1px solid #ffb02066; background: #ffb02014; color: var(--text); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; font-size: 13.5px; }
.setup-bar b { color: #ffb020; }
.setup-bar ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); }
/* notices hold mixed inline content (text, links, code): keep it flowing as one paragraph */
.notice { display: block; position: relative; padding-left: 46px; line-height: 1.55; }
.notice > .ic:first-child { position: absolute; left: 16px; top: 13px; }
.admin-approve { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border-2); }
.st-withdrawn { background: var(--surface-3); color: var(--text-2); }
.small .ic, p.small > .ic { width: 15px; height: 15px; vertical-align: -3px; margin-right: 2px; }
.side-foot .ver { margin-top: 2px; opacity: .7; }
/* search field: the inner input must not draw its own focus ring over the magnifier */
.search-box input, .search-box input:focus { border: 0 !important; box-shadow: none !important; border-radius: 0; background: transparent; width: auto; padding: 0 10px 0 8px; }
.search-box .search-ic { margin-left: 2px; }

/* ------------------------------------------------------------------ Live */
:root { --live: #ff2e4d; --live-2: #ff6a3d; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--live); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em;
  padding: 3px 8px 3px 7px; border-radius: 6px; line-height: 1.2; vertical-align: middle; }
.live-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: livepulse 1.4s ease-in-out infinite; }
.live-pill.on-thumb { position: absolute; left: 8px; bottom: 8px; box-shadow: 0 4px 14px rgba(255,46,77,.45); }
.live-card .thumb .dur { display: inline-flex; align-items: center; gap: 4px; }
.live-card .thumb .dur .ic { width: 13px; height: 13px; }
.upcoming-tag { background: color-mix(in srgb, var(--accent) 88%, #000) !important; color: var(--accent-ink) !important; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-left: auto; box-shadow: 0 0 0 0 rgba(255,46,77,.6); animation: livering 1.6s infinite; }
.live-ring { position: relative; display: inline-flex; border-radius: 50%; }
.live-ring .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--live); }
@keyframes livepulse { 50% { opacity: .35; } }
@keyframes livering { 0% { box-shadow: 0 0 0 0 rgba(255,46,77,.55); } 70% { box-shadow: 0 0 0 8px rgba(255,46,77,0); } 100% { box-shadow: 0 0 0 0 rgba(255,46,77,0); } }
.shelf-head h2 .live-pill { margin-right: 6px; }
.hero-live .hero-ic { background: linear-gradient(135deg, var(--live), var(--live-2)); color: #fff; }

.live-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 14px 0 4px; border-radius: var(--radius);
  background: linear-gradient(90deg, color-mix(in srgb, var(--live) 16%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--live) 35%, var(--border)); color: var(--text); }
.live-banner:hover { color: var(--text); border-color: var(--live); }
.live-banner b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-banner.upcoming { background: linear-gradient(90deg, var(--accent-soft), var(--surface)); border-color: var(--accent-line); }
.live-banner.upcoming > .ic { color: var(--accent); }

/* watch page: player + chat */
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; max-width: 1760px; margin: 0 auto; align-items: start; }
.live-layout .watch-tags { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.live-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: 20px;
  background: radial-gradient(circle at 50% 40%, rgba(20,26,34,.82), rgba(0,0,0,.94)); color: #fff; }
.live-overlay > .ic { width: 46px; height: 46px; color: var(--accent); margin-bottom: 4px; }
.live-overlay h3 { margin: 0; font-size: 20px; font-weight: 800; }
.live-overlay p { margin: 0; color: rgba(255,255,255,.72); font-variant-numeric: tabular-nums; }
.live-chat { position: sticky; top: calc(var(--topbar) + 16px); display: flex; flex-direction: column; height: calc(100vh - var(--topbar) - 40px); min-height: 420px; max-height: 860px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.live-chat > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.chat-list { flex: 1; overflow-y: auto; padding: 10px 6px 10px 12px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.chat-msg { position: relative; display: flex; gap: 9px; align-items: flex-start; padding: 5px 30px 5px 4px; border-radius: 8px; font-size: 13.5px; line-height: 1.4; }
.chat-msg:hover { background: var(--surface-2); }
.chat-msg .avatar { flex: none; margin-top: 1px; }
.chat-msg > div { min-width: 0; overflow-wrap: anywhere; }
.chat-author { color: var(--text-2); font-weight: 700; margin-right: 6px; }
.chat-author.is-creator { background: var(--accent-soft); color: var(--accent); padding: 0 6px; border-radius: 5px; }
.chat-msg .vbadge { margin-right: 6px; vertical-align: -1px; }
.chat-body { color: var(--text); }
.chat-del { position: absolute; right: 4px; top: 4px; opacity: 0; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--text-3); }
.chat-del .ic { width: 14px; height: 14px; }
.chat-msg:hover .chat-del, .chat-del:focus-visible { opacity: 1; }
.chat-del:hover { color: var(--live); background: var(--surface-3); }
.chat-off { margin: auto; text-align: center; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chat-form { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.chat-form input { flex: 1; min-width: 0; height: 38px; border-radius: var(--pill); }
.chat-signin { display: block; text-align: center; padding: 14px; border-top: 1px solid var(--border); font-weight: 700; color: var(--accent); }

/* studio control room */
.live-state { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: var(--pill); font-weight: 800; font-size: 12px; letter-spacing: .06em;
  background: var(--surface-3); color: var(--text-2); }
.live-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.live-state.on { background: var(--live); color: #fff; }
.live-state.on::before { background: #fff; animation: livepulse 1.4s infinite; }
.golive-preview { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; margin: 10px 0 12px; }
.golive-preview video { width: 100%; height: 100%; object-fit: contain; display: block; }
.golive-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: rgba(255,255,255,.6); font-size: 14px; }
.golive-empty .ic { width: 38px; height: 38px; }
.golive-stats { display: flex; gap: 18px; margin-bottom: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.golive-stats b { color: var(--text); }
.copy-row input[type="password"] { letter-spacing: .1em; }

@media (max-width: 1100px) {
  .live-layout { grid-template-columns: 1fr; }
  .live-chat { position: static; height: 460px; }
}
.form-grid label.toggle-row { flex-direction: row; }
.key-warn { display: flex; align-items: center; gap: 6px; font-weight: 500; margin-top: -4px; }
.key-warn .ic { width: 14px; height: 14px; flex: none; }
[data-golive-msg] { margin-top: 12px; }
.golive-preview + .golive-stats + .row-gap select { width: auto; flex: 1; min-width: 180px; }

/* ---------------------------------------------------------------- Posts */
.post-feed, .post-page { max-width: 720px; margin: 0 auto; }
.post-page { padding-top: 6px; }
.back-link { margin-bottom: 14px; }
.post { padding: 18px 20px 14px; margin-bottom: 16px; transition: border-color .2s, box-shadow .2s; }
.post.is-new { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.post-meta { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.post-author { font-weight: 700; }
.post-meta .vbadge { margin-right: 2px; }
.post-age { color: var(--text-3); font-size: 13px; }
.post-age::before { content: "·"; margin-right: 6px; }
.post-age:hover { color: var(--text-2); text-decoration: underline; }
.post-more { margin-right: -8px; color: var(--text-2); }
.post-body { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; white-space: normal; }
.post-body.is-long { max-height: 9.6em; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.post-body.is-long.open { max-height: none; -webkit-mask-image: none; mask-image: none; }
.post-readmore { margin-top: 4px; font-size: 13.5px; }
.post-image { display: block; width: 100%; max-height: 640px; margin-top: 12px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); cursor: zoom-in; padding: 0; }
.post-image img { width: 100%; height: 100%; max-height: 640px; object-fit: cover; display: block; }
.post-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.post-actions .pill { height: 34px; padding: 0 13px; font-size: 13.5px; }
.post-actions .pill .ic { width: 18px; height: 18px; }
.post-actions .pill.is-off { opacity: .55; cursor: default; }
.post-edit { margin-top: 6px; }
.post-edit textarea { width: 100%; min-height: 110px; }
.post-more-btn { display: flex; margin: 10px auto 0; }
.post-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.post-row .post { margin-bottom: 0; }
.post-row .post-image, .post-row .post-image img { max-height: 300px; }
.post-owner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.post-owner > .po-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.post-page .comments { margin-top: 0; }
.pc-empty { text-align: center; padding: 10px 0 6px; }
.pc-more { display: flex; margin: 4px auto 0; }
.post-comment .comment-tools button { padding: 4px 8px; }

/* composer */
.post-composer { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.pc-main { flex: 1; min-width: 0; }
.pc-main textarea { width: 100%; border: 0 !important; background: transparent; box-shadow: none !important; padding: 8px 0; font-size: 15px; resize: none; min-height: 44px; outline: 0; }
.pc-preview { position: relative; margin: 6px 0 4px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); max-width: 420px; }
.pc-preview img { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.pc-preview .icon-btn { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.65); color: #fff; }
.pc-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.pc-file { position: relative; overflow: hidden; cursor: pointer; }
.pc-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pc-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); font-weight: 500; cursor: pointer; }
.pc-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.pc-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.pc-count.over { color: #ff6b6b; }
.btn.loading { opacity: .7; pointer-events: none; }

/* image viewer */
.img-viewer { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: fadein .15s ease; }
.img-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; cursor: default; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.img-viewer .icon-btn { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,.12); color: #fff; }
@keyframes fadein { from { opacity: 0; } }

/* Create menu + subscriptions switch */
.create-menu { min-width: 280px; }
.create-menu a { align-items: flex-start !important; }
.create-menu a > span { display: flex; flex-direction: column; line-height: 1.3; }
.create-menu small { color: var(--text-3); font-size: 12px; font-weight: 500; }
.create-menu .ic { margin-top: 2px; }
.sub-view { margin-bottom: 18px; }
.sub-view .chip { display: inline-flex; align-items: center; gap: 6px; }
.sub-view .chip .ic { width: 16px; height: 16px; }
.shelf-head h2 .ic { width: 20px; height: 20px; color: var(--accent); vertical-align: -3px; margin-right: 6px; }

@media (max-width: 640px) {
  .post { padding: 14px 14px 10px; border-radius: 0; border-left: 0; border-right: 0; margin-left: -16px; margin-right: -16px; }
  .post-row { grid-template-columns: 1fr; }
  .post-composer { padding: 12px; }
  .pc-count { margin-left: 0; }
  .create-menu { position: fixed; left: 10px; right: 10px; top: calc(var(--topbar) + 4px); min-width: 0; }
}
.post-row .post-age { flex-basis: 100%; }
.post-row .post-age::before { content: none; }

/* ------------------------------------------------- Premium, Points, Tips */
:root { --gold: #ffc53d; --gold-2: #e8760b; --gold-soft: color-mix(in srgb, #ffc53d 16%, transparent); }
[data-accent="gold"]   { --accent: #ffbe3b; --accent-2: #ff8a1f; --accent-ink: #1d1100; }
[data-accent="aurora"] { --accent: #4ee6c4; --accent-2: #a46bff; --accent-ink: #061615; }
.acc-gold i { background: linear-gradient(135deg, #fff0a8, #ffc53d 45%, #e8760b); }
.acc-aurora i { background: linear-gradient(135deg, #4ee6c4, #6b8cff 55%, #c56bff); }
.accent-dot.locked { opacity: .6; cursor: not-allowed; }
.accent-dot.locked i { display: grid; place-items: center; color: #fff; }
.accent-dot.locked i .ic { width: 16px; height: 16px; }
.gem-ic { width: 13px; height: 13px; color: var(--gold); vertical-align: -2px; }
.pbadge { display: inline-flex; width: var(--pb, 14px); height: var(--pb, 14px); margin-left: 4px; vertical-align: -2px; flex: none;
  filter: drop-shadow(0 1px 3px rgba(232,118,11,.45)); }
.pbadge svg { width: 100%; height: 100%; }
h1 .pbadge { vertical-align: 0; }
.pbadge-txt { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #1d1100; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; }

/* points chip in the top bar */
.points-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 9px; border-radius: var(--pill);
  background: var(--gold-soft); color: var(--text); font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.points-chip .ic { width: 19px; height: 19px; color: var(--gold); }
.points-chip:hover { color: var(--text); background: color-mix(in srgb, var(--gold) 24%, transparent); }
.points-chip.bump { animation: chipbump .5s var(--ease); }
.points-float { position: absolute; right: 6px; top: -4px; font-size: 12px; font-weight: 800; color: var(--gold); pointer-events: none; animation: floatup 1.3s ease-out forwards; }
@keyframes chipbump { 30% { transform: scale(1.12); } }
@keyframes floatup { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-26px); } }
.toast-points { background: linear-gradient(135deg, #3a2a00, #2a1c00); border-color: color-mix(in srgb, var(--gold) 45%, transparent); color: #ffe7a3; }
.menu-premium .ic { color: var(--gold) !important; }
.menu small, .account-menu a small { margin-left: auto; color: var(--text-3); font-size: 12px; }
.side-premium .ic { color: var(--gold); }

/* points wallet */
.points-page { max-width: 1100px; margin: 0 auto; }
.points-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 26px;
  background: radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 55%), var(--surface); }
.ph-coin { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #fff0a8, #ffc53d 45%, #e8760b); color: #4a2a00; box-shadow: 0 10px 30px -8px rgba(232,118,11,.6); }
.ph-coin .ic { width: 42px; height: 42px; stroke-width: 1.8; }
.ph-main { flex: 1; min-width: 220px; }
.ph-main h1 { margin: 2px 0 4px; font-size: 42px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ph-main h1 small { font-size: 16px; color: var(--text-2); font-weight: 600; }
.ph-main p { margin: 0; }
.ph-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.earn-list { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 12px; }
.earn-list li { display: grid; grid-template-columns: 1fr 120px 52px; gap: 12px; align-items: center; }
.earn-list li > div:first-child { display: flex; flex-direction: column; }
.earn-bar, .redeem-bar { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.earn-bar i, .redeem-bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.earn-num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 13px; }
.earn-num.done { color: var(--gold); }
.points-history { list-style: none; padding: 0; margin: 8px 0 0; max-height: 520px; overflow: auto; }
.points-history li { display: grid; grid-template-columns: 1fr auto 70px; gap: 10px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--border); font-size: 14px; }
.points-history b { text-align: right; font-variant-numeric: tabular-nums; }
.points-history .pos { color: var(--gold); } .points-history .neg { color: var(--text-2); }
.center { text-align: center; }

/* premium page */
.premium-page { max-width: 1100px; margin: 0 auto; }
.premium-hero { text-align: center; padding: 34px 20px 26px; border-radius: var(--radius-lg); margin-bottom: 22px;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--gold) 26%, transparent), transparent 60%),
              radial-gradient(circle at 85% 90%, rgba(164,107,255,.18), transparent 50%), var(--surface); border: 1px solid var(--border); }
.pr-gem .pbadge { margin: 0 0 6px; filter: drop-shadow(0 10px 28px rgba(232,118,11,.55)); animation: gemfloat 4s ease-in-out infinite; }
@keyframes gemfloat { 50% { transform: translateY(-6px) rotate(-3deg); } }
.premium-hero h1 { font-size: 44px; margin: 0; font-weight: 800; letter-spacing: -.02em; }
.premium-hero h1 span { background: linear-gradient(135deg, #fff0a8, #ffc53d 40%, #e8760b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.premium-hero > p { color: var(--text-2); max-width: 560px; margin: 8px auto 0; font-size: 16px; }
.pr-status { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 8px 16px; border-radius: var(--pill); background: var(--gold-soft); font-weight: 600; }
.pr-status .ic { color: var(--gold); }
.perk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 22px; }
.perk { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.perk p { margin: 0; font-size: 13.5px; }
.perk-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); margin-bottom: 6px; }
.perk-ic .ic { width: 21px; height: 21px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { margin: 0; position: relative; display: flex; flex-direction: column; gap: 8px; }
.plan h3 { margin: 0; }
.plan.featured { border-color: color-mix(in srgb, var(--gold) 55%, transparent); box-shadow: 0 0 0 4px var(--gold-soft); }
.plan-tag { position: absolute; top: -11px; right: 16px; background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #1d1100; font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: var(--pill); }
.plan-price { font-size: 34px; font-weight: 800; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 14px; color: var(--text-2); font-weight: 600; }
.plan .btn, .buy-form { margin-top: auto; }
.buy-form { display: flex; flex-direction: column; gap: 10px; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); font-weight: 500; line-height: 1.4; }
.consent input { margin-top: 2px; accent-color: var(--gold); flex: none; }
.redeem-row { display: flex; align-items: center; gap: 10px; }
.redeem-row .btn { flex: 1; }
.redeem-bar { margin: 4px 0; }
.manage-sub { margin: 22px 0 0; }
.premium-legal { max-width: 680px; margin: 18px auto 0; }

/* tips */
.tip-btn .ic { color: #ff5c8a; }
.tip-btn:hover .ic { fill: #ff5c8a; }
.tip-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.tip-amounts label { position: relative; }
.tip-amounts input { position: absolute; opacity: 0; }
.tip-amounts span { display: grid; place-items: center; height: 44px; border-radius: 12px; background: var(--surface-2); font-weight: 800; cursor: pointer; border: 2px solid transparent; }
.tip-amounts input:checked + span { border-color: #ff5c8a; background: color-mix(in srgb, #ff5c8a 14%, var(--surface-2)); }
.tip-amounts input:focus-visible + span { outline: 2px solid var(--accent); }
.tip-other { margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
#tip-modal textarea { width: 100%; margin-bottom: 8px; }
#tip-modal h2 .ic { color: #ff5c8a; vertical-align: -3px; }
.tip-summary { font-weight: 700; margin: 10px 0 4px; min-height: 1.2em; }
.chat-msg.is-tip { background: linear-gradient(90deg, color-mix(in srgb, #ff5c8a 22%, transparent), color-mix(in srgb, var(--gold) 12%, transparent)); border: 1px solid color-mix(in srgb, #ff5c8a 40%, transparent); margin: 4px 0; padding: 8px 30px 8px 8px; }
.chat-tip { display: inline-flex; align-items: center; gap: 4px; background: #ff5c8a; color: #fff; font-weight: 800; font-size: 12px; padding: 1px 8px; border-radius: 6px; margin-right: 6px; }
.chat-tip .ic { width: 12px; height: 12px; fill: #fff; stroke: #fff; }
.chat-author.is-premium { color: var(--gold); }

/* studio monetization */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.tile { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.tile b { font-size: 26px; font-variant-numeric: tabular-nums; }
.mon-state { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 10px 14px; border-radius: var(--radius-sm); }
.mon-state.ok { background: color-mix(in srgb, #14dd8b 14%, transparent); color: #3ee0a0; }
.mon-state.wait { background: var(--surface-2); color: var(--text-2); }
.req-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.req-list li { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.req-list li .ic { width: 18px; height: 18px; color: #ff6b6b; flex: none; }
.req-list li.ok .ic { color: #14dd8b; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tip-msg { max-width: 320px; overflow-wrap: anywhere; }
.mini-user { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; }
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .ph-cta { align-items: flex-start; }
}
@media (max-width: 640px) {
  .points-chip { padding: 0 9px 0 7px; }
  .points-chip span { display: none; }
  .premium-hero h1 { font-size: 34px; }
  .earn-list li { grid-template-columns: 1fr 70px 46px; }
}
.points-page > p.center { margin-top: 18px; }
.points-page a, .premium-legal a { color: var(--accent); }
