/* ============================================================
   Velour — clean video UI
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-2: #f2f2f2;
  --bg-3: #e5e5e5;
  --hover: rgba(0, 0, 0, .05);
  --text: #0f0f0f;
  --text-2: #606060;
  --line: #e5e5e5;
  --brand: #ff2e63;
  --brand-2: #8e24aa;
  --grad: linear-gradient(135deg, #ff3d6e 0%, #c2185b 50%, #7b1fa2 100%);
  --btn: #0f0f0f;
  --btn-text: #ffffff;
  --shadow: 0 4px 32px rgba(0, 0, 0, .12);
  --top: 56px;
  --side: 240px;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --bg-2: #272727;
    --bg-3: #3f3f3f;
    --hover: rgba(255, 255, 255, .08);
    --text: #f1f1f1;
    --text-2: #aaaaaa;
    --line: #303030;
    --btn: #f1f1f1;
    --btn-text: #0f0f0f;
    --shadow: 0 4px 32px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.i { width: 24px; height: 24px; fill: currentColor; flex: none; }
.link { color: var(--brand); font-weight: 600; }

/* ---------------- Top bar ---------------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 16px; background: var(--bg);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
}
.icon-btn:hover { background: var(--hover); }
.logo { display: flex; align-items: center; gap: 6px; padding: 0 8px; }
.logo-mark {
  width: 30px; height: 22px; border-radius: 7px; background: var(--grad);
  display: grid; place-items: center; box-shadow: 0 2px 10px rgba(255, 46, 99, .35);
}
.logo-mark svg { width: 16px; height: 16px; fill: #fff; }
.logo-mark.big { width: 64px; height: 46px; border-radius: 14px; }
.logo-mark.big svg { width: 32px; height: 32px; }
.logo-word {
  font-weight: 800; font-size: 21px; letter-spacing: -1px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.search { flex: 0 1 640px; display: flex; height: 40px; }
.search input {
  flex: 1; min-width: 0; padding: 0 16px; border: 1px solid var(--line); border-right: 0;
  border-radius: 40px 0 0 40px; background: var(--bg); outline: none; font-size: 16px;
}
.search input:focus { border-color: #1c62b9; box-shadow: inset 0 1px 2px rgba(0,0,0,.2); }
.search button {
  width: 64px; border: 1px solid var(--line); border-radius: 0 40px 40px 0;
  background: var(--bg-2); display: grid; place-items: center;
}
.search button:hover { background: var(--bg-3); }
.mobile-search, .mobile-only { display: none; }

.create-btn, .signin-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 10px;
  border-radius: 18px; font-weight: 600;
}
.create-btn { background: var(--bg-2); }
.create-btn:hover { background: var(--bg-3); }
.signin-btn { border: 1px solid var(--line); color: #065fd4; }
@media (prefers-color-scheme: dark) { .signin-btn { color: #3ea6ff; } }
.signin-btn:hover { background: rgba(6, 95, 212, .08); border-color: transparent; }

/* ---------------- Avatars ---------------- */
.avatar {
  --h: 340;
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 15px;
  background: linear-gradient(135deg, hsl(var(--h) 75% 58%), hsl(calc(var(--h) + 40) 70% 42%));
  user-select: none;
}
.avatar.xs { width: 24px; height: 24px; font-size: 11px; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.xl { width: 136px; height: 136px; font-size: 52px; }
.avatar.xxl { width: 160px; height: 160px; font-size: 64px; }
.avatar-btn { padding: 4px; border-radius: 50%; }
.avatar.is-live {
  border: 2px solid #e5193c;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(229,25,60,.75), 0 0 14px rgba(229,25,60,.55);
}

/* ---------------- Account dropdown ---------------- */
.menu-wrap { position: relative; }
.dropdown {
  position: absolute; right: 0; top: 48px; width: 280px; padding: 8px 0;
  background: var(--bg); border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--line);
  display: none;
}
.dropdown.open { display: block; }
.dropdown-head { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.dropdown-head strong { display: block; font-size: 16px; }
.dropdown-head a { color: #065fd4; font-size: 14px; }
.dropdown > a, .dropdown button {
  display: flex; align-items: center; gap: 16px; width: 100%; padding: 8px 16px; text-align: left; font-size: 14px;
}
.dropdown > a:hover, .dropdown button:hover { background: var(--hover); }
.notification-btn { position: relative; }
.notification-btn .i { fill: #fff; stroke: #111; stroke-width: 2.75px; stroke-linejoin: round; paint-order: stroke fill; }
.notification-badge { position: absolute; top: -2px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border: 2px solid var(--bg); border-radius: 9px; background: #e5193c; color: #fff; font-size: 10px; font-weight: 800; line-height: 13px; text-align: center; }
.notification-menu { width: min(390px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.notification-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.notification-head strong { font-size: 17px; }
.notification-head a { color: #065fd4; font-size: 13px; font-weight: 600; }
.notification-list { max-height: min(560px, calc(100vh - 88px)); overflow-y: auto; }
.notification-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) 8px; align-items: center; gap: 12px; padding: 12px 14px; }
.notification-item:hover { background: var(--hover); }
.notification-item.unread { background: color-mix(in srgb, var(--brand) 7%, var(--bg)); }
.notification-item b { display: block; font-size: 13px; line-height: 1.35; font-weight: 600; }
.notification-item small { display: block; margin-top: 3px; color: var(--text-2); font-size: 11px; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.notification-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; }
.notification-icon .i { width: 17px; height: 17px; }
.notification-empty { padding: 40px 20px; color: var(--text-2); text-align: center; }
.notification-empty .i { width: 32px; height: 32px; margin-bottom: 8px; }
.notification-settings { display: grid; gap: 2px; margin-top: 8px; }
.notification-settings .preference-card { margin: 0; padding: 14px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
video { -webkit-touch-callout: none; }

/* ---------------- Sidebar ---------------- */
.sidebar {
  position: fixed; top: var(--top); left: 0; bottom: 0; width: var(--side); z-index: 40;
  padding: 12px; overflow-y: auto; background: var(--bg);
  display: flex; flex-direction: column;
}
.sidebar > a {
  display: flex; align-items: center; gap: 24px; height: 40px; padding: 0 12px; border-radius: 10px;
}
.sidebar > a:hover { background: var(--hover); }
.sidebar > a.active { background: var(--bg-2); font-weight: 600; }
.sidebar-cta { padding: 8px 12px 16px; color: var(--text-2); }
.sidebar-cta p { margin: 0 0 12px; }
.sidebar-foot { margin-top: auto; padding: 16px 12px 4px; color: var(--text-2); font-size: 12px; }
.scrim { display: none; }

body.side-collapsed .sidebar { width: 72px; padding: 4px; }
body.side-collapsed .sidebar > a { flex-direction: column; gap: 6px; height: 74px; justify-content: center; padding: 0; font-size: 10px; }
body.side-collapsed .sidebar > a.active { background: none; }
body.side-collapsed .sidebar hr, body.side-collapsed .sidebar-cta, body.side-collapsed .sidebar-foot { display: none; }
body.side-collapsed .main { margin-left: 72px; }

/* ---------------- Main ---------------- */
.main { margin-top: var(--top); margin-left: var(--side); padding: 24px; min-height: calc(100vh - var(--top)); }
.page-title { font-size: 24px; font-weight: 700; margin: 0 0 20px; }

.grid {
  display: grid; gap: 40px 16px; margin-bottom: 40px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.card .thumb, .result .thumb, .side-card .thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius);
  overflow: hidden; background: var(--bg-2);
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .hover-preview { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; }
.thumb.previewing .hover-preview { opacity: 1; }
.card .thumb { transition: border-radius .2s; }
.card .thumb:hover { border-radius: 0; }
.dur {
  position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 1px 5px; border-radius: 4px;
  background: rgba(0, 0, 0, .8); color: #fff; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 2px;
}
.dur.flick { background: var(--grad); }
.dur .i { width: 14px; height: 14px; }
.card-meta { display: flex; gap: 12px; padding-top: 12px; }
.card-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-weight: 600; font-size: 16px; line-height: 22px; margin-bottom: 4px;
}
.card-sub { color: var(--text-2); font-size: 14px; display: block; }
a.card-sub:hover { color: var(--text); }

/* ---------------- Flicks shelf ---------------- */
.shelf { margin: 8px 0 48px; padding-top: 24px; border-top: 4px solid var(--bg-2); }
.shelf-title { display: flex; align-items: center; gap: 10px; font-size: 20px; margin: 0 0 16px; }
.flick-badge { width: 28px; height: 28px; display: grid; place-items: center; color: var(--text); }
.flick-badge .i { width: 24px; height: 24px; fill: currentColor; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 210px); gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.shorts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px 12px; }
.short-thumb { aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.short-thumb img, .short-thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.short-card:hover .short-thumb img, .short-card:hover .short-thumb video { transform: scale(1.03); }
.short-title { font-weight: 600; font-size: 16px; margin: 10px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 18px; font-weight: 600; background: var(--bg-2);
}
.btn:hover { background: var(--bg-3); }
.btn.primary { background: var(--btn); color: var(--btn-text); }
.btn.primary:hover { opacity: .85; }
.btn.ghost { background: none; }
.btn.ghost:hover { background: var(--hover); }
.btn.big { height: 44px; border-radius: 22px; font-size: 15px; width: 100%; }
.sub-btn { background: var(--btn); color: var(--btn-text); }
.sub-btn:hover { opacity: .85; background: var(--btn); }
.sub-btn.subscribed { background: var(--bg-2); color: var(--text); }
.sub-btn.subscribed:hover { background: var(--bg-3); opacity: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px;
  border-radius: 18px; background: var(--bg-2); font-weight: 600;
}
.pill:hover { background: var(--bg-3); }
.pill .i { width: 20px; height: 20px; }
.pill.on { color: var(--brand); }
.pill.danger:hover { color: #d00; }
.like-btn.pop .i { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.35) rotate(-12deg); } }

/* ---------------- Watch page ---------------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; max-width: 1760px; margin: 0 auto; }
body.watch-page .main { margin-left: 0; }
body.watch-page .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
body.watch-page.side-open .sidebar { transform: none; }
body.watch-page.side-open .scrim { display: block; position: fixed; inset: var(--top) 0 0 0; background: rgba(0,0,0,.4); z-index: 35; }
.player { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.watch-title { font-size: 20px; font-weight: 700; margin: 12px 0 8px; word-break: break-word; }
.watch-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.owner { display: flex; align-items: center; gap: 12px; }
.owner-name { font-weight: 600; font-size: 16px; }
.owner .sub-btn { margin-left: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.desc-box { margin-top: 12px; padding: 12px; background: var(--bg-2); border-radius: var(--radius); max-height: 120px; overflow: hidden; position: relative; }
.desc-box.open { max-height: none; }
.desc-box .desc-more { position: absolute; right: 12px; bottom: 10px; font-weight: 600; background: var(--bg-2); padding-left: 24px; box-shadow: -20px 0 16px var(--bg-2); }
.desc-box.open .desc-more, .desc-box.short .desc-more { display: none; }
.desc-stats { font-weight: 600; margin-bottom: 4px; }
.desc-text { white-space: normal; word-break: break-word; }
.desc-text a { color: #065fd4; }

.comments h2 { font-size: 20px; margin: 24px 0; }
.comment-form { display: flex; gap: 16px; margin-bottom: 32px; }
.cf-body { flex: 1; }
.cf-body input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 4px 0 6px; background: none; outline: none; }
.cf-body input:focus { border-bottom: 2px solid var(--text); }
.cf-actions { display: none; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.comment-form.focused .cf-actions { display: flex; }
.comment { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.comment-body { flex: 1; min-width: 0; }
.c-head a { font-weight: 600; font-size: 13px; }
.c-head .card-sub { display: inline; font-size: 12px; }
.c-text { margin-top: 2px; word-break: break-word; }
.pinned-comment { padding-left: 10px; border-left: 3px solid var(--brand); }
.pinned-label { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; color: var(--brand); font-size: 11px; font-weight: 700; }
.pinned-label .i { width: 12px; height: 12px; }
.comment-pin-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 4px 8px; border-radius: 14px; color: var(--text-2); font-size: 12px; font-weight: 600; }
.comment-pin-btn:hover, .comment-pin-btn.on { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.comment-pin-btn:disabled { opacity: .5; }
.comment-pin-btn .i { width: 14px; height: 14px; }
.comment-actions { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.comment-action { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 3px 8px; border-radius: 14px; color: var(--text-2); font-size: 12px; font-weight: 600; }
.comment-action:hover, .comment-action.on { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.comment-action:disabled { opacity: .5; }
.comment-action .i { width: 15px; height: 15px; }
.comment-action.dislike .i { transform: rotate(180deg); }
.comment-actions .comment-pin-btn { margin-top: 0; }
.comment-replies { flex: 0 0 calc(100% - 48px); margin-left: 48px; }
.comment-reply { gap: 12px; margin: 14px 0 0; }
.comment-reply .avatar.sm { width: 28px; height: 28px; }
.comment-reply-form { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.comment-reply-form input { flex: 1; min-width: 80px; border: 0; border-bottom: 1px solid var(--line); padding: 7px 2px; background: transparent; color: var(--text); outline: none; }
.comment-reply-form input:focus { border-bottom: 2px solid var(--text); }
.comment-reply-form .btn { height: 30px; padding: 0 12px; font-size: 12px; }
.comment.new { animation: fadein .4s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(-6px); } }

.watch-side { display: flex; flex-direction: column; gap: 8px; }
.side-card { display: grid; grid-template-columns: 168px 1fr; gap: 8px; }
.side-card .thumb { border-radius: 8px; }
.side-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-card .card-sub { font-size: 12px; }

/* ---------------- Search results ---------------- */
.results { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.result { display: grid; grid-template-columns: minmax(240px, 500px) 1fr; gap: 16px; }
.result .thumb.is-short { aspect-ratio: 16 / 9; }
.result .thumb.is-short img, .result .thumb.is-short video { object-fit: contain; background: #111; }
.result-title { font-size: 18px; font-weight: 500; display: block; margin-bottom: 4px; }
.result-chan { display: flex; align-items: center; gap: 8px; margin: 12px 0; color: var(--text-2); }
.result-desc { color: var(--text-2); font-size: 12px; margin: 0; }
.result-channel { display: grid; grid-template-columns: minmax(240px, 500px) 1fr; gap: 16px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.result-channel .avatar { justify-self: center; }
.rc-name { font-size: 18px; font-weight: 600; }

/* ---------------- Channel page ---------------- */
.channel-banner {
  height: 180px; border-radius: 16px; max-width: 1280px; margin: 0 auto;
  background:
    radial-gradient(circle at 20% 30%, hsl(var(--h) 80% 60% / .9), transparent 50%),
    radial-gradient(circle at 80% 70%, hsl(calc(var(--h) + 60) 70% 45% / .9), transparent 55%),
    linear-gradient(135deg, hsl(var(--h) 60% 25%), hsl(calc(var(--h) + 40) 60% 15%));
}
.channel-head { display: flex; gap: 24px; align-items: center; max-width: 1280px; margin: 16px auto 0; }
.ch-info h1 { font-size: 36px; font-weight: 800; margin: 0 0 8px; letter-spacing: -.5px; }
.ch-actions { display: flex; gap: 8px; margin-top: 12px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); max-width: 1280px; margin: 16px auto 24px; }
.tabs a { padding: 12px 0; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--text); border-color: var(--text); }
.channel-head ~ .grid, .channel-head ~ .shorts-grid, .channel-head ~ .empty { max-width: 1280px; margin-left: auto; margin-right: auto; }

.chan-row { display: flex; gap: 12px; overflow-x: auto; margin-bottom: 24px; }
.chan-chip { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 80px; font-size: 12px; }
.chan-chip .avatar { width: 56px; height: 56px; font-size: 22px; }

/* ---------------- Empty states / toasts ---------------- */
.empty { text-align: center; padding: 80px 20px; max-width: 420px; margin: 0 auto; }
.empty.small { padding: 40px 20px; }
.empty h1 { font-size: 22px; margin: 16px 0 8px; }
.empty p { color: var(--text-2); margin: 0 0 20px; }
.empty-mark { width: 96px; height: 96px; border-radius: 28px; background: var(--grad); display: grid; place-items: center; margin: 0 auto; box-shadow: 0 10px 40px rgba(255, 46, 99, .35); }
.empty-mark svg { width: 48px; height: 48px; fill: #fff; }
.empty.dark { color: #fff; } .empty.dark p { color: #aaa; }
.toasts { position: fixed; left: 24px; bottom: 24px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #0f0f0f; color: #fff; padding: 12px 20px; border-radius: 8px; box-shadow: var(--shadow); animation: toast 4s forwards; }
@media (prefers-color-scheme: dark) { .toast { background: #f1f1f1; color: #0f0f0f; } }
@keyframes toast { 0% { opacity: 0; transform: translateY(10px); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; } }

/* ---------------- Forms / upload ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: 13px; }
.field input:not([type=file]):not([type=checkbox]), .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); outline: none; resize: vertical; font-size: 15px;
}
.field input:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 46, 99, .15); }
.err { color: #e5193c; font-size: 13px; margin-top: 4px; }

.upload-wrap { max-width: 1100px; margin: 0 auto; }
.upload { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
.dropzone {
  position: relative; display: grid; place-items: center; min-height: 360px; border-radius: 16px;
  border: 2px dashed var(--bg-3); background: var(--bg-2); cursor: pointer; overflow: hidden; transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: rgba(255, 46, 99, .06); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 24px; pointer-events: none; }
.dz-icon { width: 120px; height: 120px; border-radius: 50%; background: var(--bg-3); display: grid; place-items: center; margin-bottom: 12px; }
.dz-icon .i { width: 56px; height: 56px; color: var(--text-2); }
.dz-preview { position: absolute; inset: 0; background: #000; display: grid; place-items: center; }
.dz-preview video { max-height: 100%; width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 2; }
.dropzone.has-file { border-style: solid; border-color: transparent; }
.dropzone.has-file.flick-preview { align-self: flex-start; width: min(100%, 420px); min-height: 0; aspect-ratio: 9 / 16; margin-inline: auto; }
.dropzone.flick-preview .dz-preview video { object-fit: contain; object-position: center; }
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 6px; }
.type-opt { position: relative; }
.type-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.type-opt span { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.type-opt .i { grid-row: span 2; align-self: center; }
.type-opt small { color: var(--text-2); }
.type-opt input:checked + span { border-color: var(--brand); background: rgba(255, 46, 99, .06); }
.type-opt input:checked + span .i { color: var(--brand); }
.hint { min-height: 20px; margin: 0 0 16px; font-size: 13px; }
.thumb-pick { display: flex; align-items: center; gap: 12px; }
.thumb-pick img { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #000; }
.thumb-pick img.vertical { width: 90px; aspect-ratio: 9 / 16; }
.upload-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.upload-progress .bar { flex: 1; height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.upload-progress .bar span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.upload-progress .pct { font-weight: 600; min-width: 42px; text-align: right; }

/* ---------------- Auth ---------------- */
body.auth-page .main { margin-left: 0; }
body.auth-page .sidebar, body.auth-page #menu-toggle { display: none; }
.auth { min-height: calc(100vh - var(--top) - 48px); display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 420px; padding: 40px; border: 1px solid var(--line); border-radius: 24px; text-align: center; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 20px; }
.auth h1 { font-size: 24px; margin: 0 0 6px; }
.auth-form { text-align: left; margin-top: 28px; }
.auth-form .btn { margin-top: 8px; }
.auth-switch { margin: 24px 0 0; color: var(--text-2); }

/* ============================================================
   Flicks (vertical scroll feed)
   ============================================================ */
body.shorts-page { background: #0b0b0b; color: #fff; }
@media (prefers-color-scheme: light) {
  body.shorts-page { background: #fff; color: #0f0f0f; }
}
body.shorts-page .main { padding: 0; }
.flicks {
  height: calc(100vh - var(--top)); height: calc(100dvh - var(--top));
  overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain;
}
.flicks::-webkit-scrollbar { display: none; }
.flick {
  height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px 0;
}
.flick-stage {
  position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: calc(100vw - 32px);
  border-radius: 16px; overflow: hidden; background: #000;
}
.flick-video { width: 100%; height: 100%; object-fit: cover; }
.flick-tap { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.flick-paused {
  position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; z-index: 2;
  background: rgba(0, 0, 0, .45); display: grid; place-items: center; opacity: 0; transform: scale(.8);
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.flick-paused .i { width: 40px; height: 40px; fill: #fff; }
.flick.is-paused .flick-paused { opacity: 1; transform: none; }
/* Flicks seek bar: a tall invisible hit area with a thin visible line at the bottom */
.flick-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 18px; z-index: 3;
  cursor: pointer; touch-action: none; --bar: 3px;
}
.flick-progress .fp-track, .flick-progress span {
  position: absolute; left: 0; bottom: 0; height: var(--bar); transition: height .12s;
}
.flick-progress .fp-track { right: 0; background: rgba(255,255,255,.28); }
.flick-progress span { width: 0; background: var(--grad); }
.flick-progress span::after {
  content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.4);
  transform: scale(0); transition: transform .12s;
}
.flick-progress:hover, .flick-progress.dragging { --bar: 6px; }
.flick-progress:hover span::after, .flick-progress.dragging span::after { transform: scale(1); }
.fp-tip {
  position: absolute; bottom: 16px; left: 0; transform: translateX(-50%); padding: 3px 8px; border-radius: 6px;
  background: rgba(0,0,0,.8); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none;
  opacity: 0; transition: opacity .12s; white-space: nowrap;
}
.flick-progress:hover .fp-tip, .flick-progress.dragging .fp-tip { opacity: 1; }
@media (hover: none) { .flick-progress { height: 28px; } }
.flick-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 64px 16px 18px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75)); pointer-events: none;
}
.flick-info a, .flick-info button { pointer-events: auto; }
.flick-owner { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.flick-user { font-weight: 600; }
.flick-sub { margin-left: 4px; padding: 6px 12px; border-radius: 16px; background: #fff; color: #0f0f0f; font-weight: 600; font-size: 13px; }
.flick-sub.subscribed { background: rgba(255, 255, 255, .2); color: #fff; }
.flick-title { font-weight: 600; font-size: 15px; }
.flick-desc { font-size: 13px; opacity: .85; margin-top: 4px; }
.flick-rail { display: flex; flex-direction: column; gap: 16px; align-self: flex-end; padding-bottom: 8px; }
.rail-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.rail-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(128, 128, 128, .2); transition: transform .15s, background .15s; }
.rail-btn:hover .rail-ico { background: rgba(128, 128, 128, .32); }
.rail-btn:active .rail-ico { transform: scale(.9); }
.rail-btn.like.on .rail-ico { color: #fff; background: var(--grad); }
.rail-btn.like.pop .rail-ico { animation: pop .35s ease; }
.rail-btn .avatar { width: 40px; height: 40px; border: 2px solid #fff; }

.heart-burst {
  position: absolute; z-index: 4; width: 110px; height: 110px; margin: -55px 0 0 -55px; pointer-events: none;
  animation: burst .8s ease-out forwards;
}
.heart-burst svg { width: 100%; height: 100%; fill: #ff2e63; filter: drop-shadow(0 6px 18px rgba(255, 46, 99, .6)); }
@keyframes burst { 0% { transform: scale(.2) rotate(-15deg); opacity: 0; } 15% { transform: scale(1.15) rotate(-15deg); opacity: 1; } 30% { transform: scale(.95) rotate(-15deg); } 100% { transform: scale(1.1) translateY(-80px) rotate(-15deg); opacity: 0; } }

.flick-mute, .flick-nav button {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(128, 128, 128, .2);
}
.flick-mute:hover, .flick-nav button:hover { background: rgba(128, 128, 128, .35); }
.flick-mute { position: fixed; top: calc(var(--top) + 16px); right: 24px; z-index: 30; }
.flick-nav { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; z-index: 30; }

.drawer {
  position: fixed; z-index: 60; top: var(--top); right: 0; bottom: 0; width: 400px; max-width: 100%;
  background: var(--bg); color: var(--text); box-shadow: var(--shadow);
  display: flex; flex-direction: column; transform: translateX(105%); transition: transform .25s ease;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 18px; margin: 0; }
.drawer-list { flex: 1; overflow-y: auto; padding: 16px; }
.drawer-form { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.drawer-form input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-2); outline: none; }

/* ---------------- Bottom nav (mobile) ---------------- */
.bottom-nav { display: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1300px) {
  .watch { grid-template-columns: minmax(0, 1fr) 340px; }
  .side-card { grid-template-columns: 140px 1fr; }
}
@media (max-width: 1000px) {
  .watch { grid-template-columns: 1fr; }
  .upload { grid-template-columns: 1fr; }
  .dropzone { min-height: 260px; }
}
@media (max-width: 1200px) {
  .sidebar { width: 72px; padding: 4px; }
  .sidebar > a { flex-direction: column; gap: 6px; height: 74px; justify-content: center; padding: 0; font-size: 10px; }
  .sidebar > a.active { background: none; }
  .sidebar hr, .sidebar-cta, .sidebar-foot { display: none; }
  .main { margin-left: 72px; }
  body.watch-page .main, body.auth-page .main { margin-left: 0; }
  body.watch-page .sidebar { width: var(--side); padding: 12px; }
  body.watch-page .sidebar > a { flex-direction: row; gap: 24px; height: 40px; justify-content: flex-start; padding: 0 12px; font-size: 14px; }
  .flick-nav { display: none; }
}
@media (max-width: 720px) {
  :root { --top: 48px; }
  .topbar { padding: 0 8px; gap: 4px; }
  #menu-toggle { display: none; }
  .topbar .search, .create-btn span { display: none; }
  .create-btn { display: none; }
  .mobile-search { display: grid; }
  .search.mobile-only { display: flex; margin-bottom: 16px; }
  .signin-btn { padding: 0 10px; height: 32px; font-size: 13px; }
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 12px 0 72px; }
  .main > *:not(.grid):not(.flicks):not(.player) { padding-left: 12px; padding-right: 12px; }
  .grid { grid-template-columns: 1fr; gap: 24px; }
  .card .thumb { border-radius: 0; }
  .card-meta { padding: 12px 12px 0; }
  .shelf { padding-left: 12px; }
  .watch-main .player { border-radius: 0; margin: -12px -12px 0; }
  .watch-main > *:not(.player) { padding: 0 2px; }
  .result, .result-channel { grid-template-columns: 1fr; }
  .channel-banner { height: 100px; border-radius: 12px; margin: 0 12px; }
  .channel-head { flex-direction: column; text-align: center; }
  .avatar.xxl { width: 96px; height: 96px; font-size: 40px; }
  .ch-info h1 { font-size: 26px; }
  .ch-actions { justify-content: center; }
  .auth-card { border: 0; padding: 24px; }

  body.shorts-page .topbar { background: transparent; position: fixed; }
  body.shorts-page .main { margin-top: 0; padding: 0; }
  body.shorts-page .flicks { height: calc(100dvh - 56px); }
  body.shorts-page .logo-word { color: #fff; -webkit-text-fill-color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
  .flick { padding: 0; position: relative; }
  .flick-stage { height: 100%; width: 100%; max-width: none; aspect-ratio: auto; border-radius: 0; }
  .flick-rail { position: absolute; right: 8px; bottom: 90px; z-index: 5; color: #fff; }
  .flick-rail .rail-ico { background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
  .flick-info { padding-right: 76px; }
  .flick-mute { top: 56px; right: 12px; background: rgba(0,0,0,.35); color: #fff; }

  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: 56px;
    padding-bottom: env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid var(--line);
    justify-content: space-around; align-items: center;
  }
  body.shorts-page .bottom-nav { background: #0b0b0b; color: #fff; border-color: #222; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; min-width: 56px; }
  .bottom-nav .bn-create { width: 44px; min-width: 0; height: 32px; border-radius: 10px; background: var(--grad); color: #fff; justify-content: center; }
  .toasts { left: 12px; right: 12px; bottom: 68px; }
}
.dropzone.has-file input[type=file] { display: none; }
.dz-change { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(0,0,0,.6); color: #fff; }
.dz-change:hover { background: rgba(0,0,0,.8); }

/* ============================================================
   Hashtags, channel customisation, up next
   ============================================================ */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
a.tag { color: #065fd4; font-weight: 500; }
a.tag:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { a.tag { color: #3ea6ff; } }

/* chips bar */
.chips { display: flex; gap: 12px; overflow-x: auto; padding: 0 0 20px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px;
  border-radius: 8px; background: var(--bg-2); font-weight: 500; white-space: nowrap; font-size: 14px;
}
.chip:hover { background: var(--bg-3); }
.chip.on { background: var(--btn); color: var(--btn-text); }
.chip.sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 14px; }
.chip .i { width: 16px; height: 16px; }
.chip small { color: var(--text-2); font-weight: 400; margin-left: 2px; }
body .main > .chips:first-child { position: sticky; top: var(--top); z-index: 20; background: var(--bg); margin: -24px -24px 0; padding: 12px 24px; }
.tag-strip { margin: 0 0 20px; color: var(--text-2); }

/* hashtag page hero */
.tag-hero {
  display: flex; align-items: center; gap: 24px; padding: 32px; margin-bottom: 24px; border-radius: 20px; color: #fff;
  background:
    radial-gradient(circle at 15% 20%, hsl(var(--h) 85% 62% / .95), transparent 55%),
    radial-gradient(circle at 85% 80%, hsl(calc(var(--h) + 70) 75% 50% / .9), transparent 55%),
    linear-gradient(135deg, hsl(var(--h) 55% 22%), hsl(calc(var(--h) + 40) 60% 14%));
}
.tag-hero-mark { width: 104px; height: 104px; border-radius: 28px; background: rgba(255,255,255,.15); backdrop-filter: blur(8px); display: grid; place-items: center; flex: none; }
.tag-hero-mark .i { width: 56px; height: 56px; }
.tag-hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -1px; margin: 0 0 4px; word-break: break-all; }
.tag-hero-sub { opacity: .85; font-size: 15px; }
.tag-play { margin-top: 16px; background: #fff; color: #0f0f0f; }
.tag-play:hover { opacity: .9; }

/* watch page */
.watch-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
.watch-tags + .watch-title { margin-top: 2px; }
.watch-title a.tag { font-weight: inherit; }
.player { position: relative; }
.up-next { position: absolute; inset: 0; background: rgba(0,0,0,.72); display: grid; place-items: center; z-index: 5; color: #fff; }
.up-next[hidden] { display: none; }
.un-card { width: min(420px, 90%); }
.un-label { font-size: 15px; margin-bottom: 12px; opacity: .9; }
.un-body { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: center; }
.un-thumb { aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #222; }
.un-thumb img, .un-thumb video { width: 100%; height: 100%; object-fit: cover; }
.un-title { font-weight: 700; font-size: 16px; }
.un-sub { opacity: .75; margin-top: 4px; }
.un-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.un-actions .btn { background: rgba(255,255,255,.15); color: #fff; }
.un-actions .btn.primary { background: #fff; color: #0f0f0f; }

/* channel page */
.channel-banner { position: relative; overflow: hidden; }
.channel-banner.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-bio { color: var(--text-2); margin: 10px 0 0; max-width: 680px; }
.ch-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ch-actions .btn .i { width: 18px; height: 18px; }

/* settings */
.settings-wrap { max-width: 860px; margin: 0 auto; }
.set-card { border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 20px; }
.set-card h2 { font-size: 18px; margin: 0 0 4px; }
.set-card > .card-sub { margin-bottom: 16px; }
.banner-edit { height: 180px; max-width: none; }
.img-btn {
  position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 18px; background: rgba(0,0,0,.6); color: #fff; font-weight: 600; cursor: pointer;
}
.img-btn:hover { background: rgba(0,0,0,.8); }
.img-btn input, .pfp-edit label.btn input { display: none; }
.pfp-edit { display: flex; align-items: center; gap: 24px; }
.pfp-edit label.btn { cursor: pointer; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--text-2); cursor: pointer; }
.settings-actions { display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; padding: 16px 0; background: var(--bg); }
.settings-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; }
.settings-heading .page-title { margin-bottom: 4px; }
.account-settings .settings { margin-bottom: 18px; }
.set-card-head { display: flex; justify-content: space-between; gap: 16px; }
.inline-save { display: flex; justify-content: flex-end; margin-top: 18px; }
.account-save { margin: -6px 0 26px; }
.preference-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.preference-copy h2 { margin-bottom: 6px; }
.preference-copy p { margin: 0; }
.switch { position: relative; width: 48px; height: 28px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: var(--bg-3); transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); transition: .2s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid #065fd4; outline-offset: 2px; }
.field-help ul { margin: 6px 0 0 18px; }
.layout-order { list-style: none; margin: 16px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.layout-order li { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 7px 10px; border-bottom: 1px solid var(--line); background: var(--bg); }
.layout-order li:last-child { border-bottom: 0; }
.layout-handle { color: var(--text-2); letter-spacing: -3px; font-size: 18px; }
.layout-buttons { display: flex; gap: 2px; margin-left: auto; }
.layout-buttons button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.layout-buttons button:hover { background: var(--hover); }
.layout-buttons button:disabled { opacity: .25; }
.layout-buttons .i { width: 20px; height: 20px; }
.tag-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag-preview:empty { display: none; }
.tag-suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }

/* flicks */
.flick-tags { margin-top: 6px; font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; }
.flick-info a.tag, .flick-title a.tag, .flick-desc a.tag { color: #fff; font-weight: 700; }
.flick-tagbar {
  position: fixed; top: calc(var(--top) + 16px); left: 50%; transform: translateX(-50%); z-index: 30;
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px;
  background: var(--grad); color: #fff; font-weight: 700;
}
.flick-tagbar .i { width: 18px; height: 18px; }
.flick-tagbar span { opacity: .7; margin-left: 4px; }
.rail-btn > .avatar { width: 40px; height: 40px; border: 2px solid #fff; }

@media (max-width: 720px) {
  body .main > .chips:first-child { margin: -12px 0 0; padding: 8px 12px; }
  .tag-hero { flex-direction: column; text-align: center; padding: 24px; border-radius: 0; }
  .tag-hero-mark { width: 72px; height: 72px; border-radius: 20px; }
  .tag-hero h1 { font-size: 28px; }
  .settings-wrap { padding: 0 12px; }
  .set-card { padding: 16px; }
  .pfp-edit { flex-direction: column; text-align: center; }
  .un-body { grid-template-columns: 1fr; }
  .un-thumb { display: none; }
  .settings-actions { bottom: 56px; }
  .flick-tagbar { top: 56px; }
}
@media (max-width: 720px) { body.shorts-page .topbar .icon-btn { color: #fff; } }

/* ============================================================
   18+ gate, report dialog
   ============================================================ */
body.gate-page { background: #0b0610; color: #fff; min-height: 100vh; margin: 0; overflow-x: hidden; }
.gate-bg {
  position: fixed; inset: -20%; z-index: 0; filter: blur(60px); opacity: .85;
  background:
    radial-gradient(circle at 25% 30%, #ff2e63 0, transparent 40%),
    radial-gradient(circle at 75% 70%, #7b1fa2 0, transparent 45%),
    radial-gradient(circle at 60% 20%, #c2185b 0, transparent 35%);
  animation: gate-drift 14s ease-in-out infinite alternate;
}
@keyframes gate-drift { to { transform: translate(4%, -3%) scale(1.08); } }
.gate {
  position: relative; z-index: 1; max-width: 460px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 32px 20px;
}
.gate-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.gate-logo .logo-word { font-size: 38px; letter-spacing: -2px; background: none; -webkit-text-fill-color: #fff; color: #fff; }
.gate-badge {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; font-weight: 800;
  border: 4px solid #fff; margin-bottom: 20px; letter-spacing: -1px; box-shadow: 0 0 40px rgba(255, 46, 99, .6);
}
.gate h1 { font-size: 34px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.5px; }
.gate p { color: rgba(255,255,255,.82); margin: 0 0 28px; font-size: 15px; line-height: 1.55; }
.gate form { width: 100%; }
.gate .btn { width: 100%; height: 52px; border-radius: 26px; font-size: 16px; }
.gate-enter { background: #fff; color: #0f0f0f; }
.gate-enter:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 8px 30px rgba(255, 46, 99, .45); }
.gate-leave { margin-top: 12px; background: rgba(255,255,255,.12); color: #fff; }
.gate-leave:hover { background: rgba(255,255,255,.2); }
.gate .gate-fine { font-size: 12px; color: rgba(255,255,255,.55); margin: 24px 0 0; }

.nsfw-badge { display: inline-grid; place-items: center; height: 18px; padding: 0 5px; border-radius: 4px; border: 1.5px solid currentColor; font-size: 10px; font-weight: 800; margin-left: 2px; color: var(--brand); }

.modal { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { width: 100%; max-width: 420px; background: var(--bg); color: var(--text); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.modal-card h2 { margin: 0 0 4px; font-size: 20px; }
.modal-card .opts { display: flex; flex-direction: column; gap: 4px; margin: 16px 0; }
.modal-card .opts label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.modal-card .opts label:hover { background: var(--hover); }
.modal-card textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Logo image */
.logo-img { width: 36px; height: 36px; object-fit: contain; display: block; }
.logo-img.big { width: 96px; height: 96px; }
.gate-logo .logo-img.big { width: 76px; height: 76px; filter: drop-shadow(0 4px 18px rgba(255, 46, 99, .45)); }

/* Upload from link */
.upload-source { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.link-row { margin-top: 12px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 13px; margin: 4px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.link-input { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); margin-bottom: 6px; }
.link-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 46, 99, .15); }
.link-input .i { color: var(--text-2); width: 20px; height: 20px; }
.link-input input { flex: 1; min-width: 0; border: 0; outline: none; background: none; padding: 8px 0; font-size: 15px; }

/* Sound */
.unmute-pill {
  position: absolute; left: 12px; top: 12px; z-index: 4; display: none; align-items: center; gap: 6px;
  padding: 8px 14px 8px 10px; border-radius: 20px; background: rgba(0,0,0,.7); color: #fff; font-weight: 600;
  animation: pulse 1.6s ease-in-out infinite;
}
.unmute-pill .i { width: 20px; height: 20px; }
body.sound-blocked .unmute-pill { display: inline-flex; }
@keyframes pulse { 50% { transform: scale(1.05); } }
body.sound-blocked .flick-mute { background: var(--grad); color: #fff; animation: pulse 1.6s ease-in-out infinite; }
body.sound-blocked .flick-mute::after {
  content: "Tap for sound"; position: absolute; right: 56px; white-space: nowrap; padding: 6px 10px; border-radius: 14px;
  background: rgba(0,0,0,.75); color: #fff; font-size: 13px; font-weight: 600;
}
.flick-mute { position: fixed; }

/* ============================================================
   Phone app (installed / standalone) + Get the app page
   ============================================================ */
html.standalone .topbar { padding-top: env(safe-area-inset-top); height: calc(var(--top) + env(safe-area-inset-top)); }
html.standalone .main { margin-top: calc(var(--top) + env(safe-area-inset-top)); }
html.standalone .sidebar { top: calc(var(--top) + env(safe-area-inset-top)); }
html.standalone .bottom-nav { height: calc(56px + env(safe-area-inset-bottom)); }
html.standalone body.shorts-page .flicks { height: calc(100dvh - var(--top) - env(safe-area-inset-top)); }
html.standalone .get-app-link { display: none; }
@media (max-width: 720px) {
  html.standalone body.shorts-page .main { margin-top: 0; }
  html.standalone body.shorts-page .flicks { height: calc(100dvh - 56px - env(safe-area-inset-bottom)); }
  html.standalone .flick-mute { top: calc(56px + env(safe-area-inset-top)); }
}
html.standalone body { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
html.standalone input, html.standalone textarea { -webkit-user-select: text; user-select: text; }

.getapp { max-width: 760px; margin: 0 auto; }
.getapp-hero { display: flex; gap: 20px; align-items: center; margin: 8px 0 24px; }
.getapp-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 30px rgba(255, 46, 99, .35); flex: none; }
.getapp-hero h1 { font-size: 30px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.5px; }
.getapp-hero p { margin: 0; color: var(--text-2); font-size: 15px; }
.install-btn { display: none; margin-bottom: 20px; }
html.can-install .install-btn { display: inline-flex; }
html.standalone .install-btn { display: none; }
.getapp-installed { display: none; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; background: rgba(255, 46, 99, .08); margin-bottom: 20px; }
html.standalone .getapp-installed { display: flex; }
html.standalone .getapp-card { display: none; }
.getapp-card { border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 16px; }
.getapp-card.subtle { background: var(--bg-2); border-color: transparent; }
.getapp-card h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin: 0 0 10px; }
.getapp-card p { margin: 0 0 12px; line-height: 1.5; }
.step { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 14px; flex: none; }
.getapp-qr { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
#qr { padding: 10px; background: #fff; border-radius: 12px; line-height: 0; }
#qr img, #qr canvas { width: 180px; height: 180px; }
.getapp-url { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.getapp-url code, .getapp-card code { font-size: 14px; background: var(--bg-2); padding: 3px 7px; border-radius: 6px; word-break: break-all; }
.getapp-card.subtle code { background: var(--bg); }
.getapp-url code { font-size: 16px; font-weight: 600; padding: 8px 12px; }
.getapp-os { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.getapp-os h3 { margin: 4px 0 8px; font-size: 15px; }
.getapp-os ol { margin: 0; padding-left: 20px; line-height: 1.7; }
.i.inline { width: 18px; height: 18px; vertical-align: -3px; }
.getapp pre { background: #0f0f0f; color: #f1f1f1; padding: 14px 16px; border-radius: 10px; overflow-x: auto; margin: 0 0 12px; }
.getapp pre code { background: none !important; padding: 0; color: inherit; }
@media (max-width: 720px) {
  .getapp { padding: 0 12px; }
  .getapp-hero h1 { font-size: 24px; }
  .getapp-icon { width: 72px; height: 72px; border-radius: 16px; }
  .getapp-os { grid-template-columns: 1fr; }
  .getapp-card { padding: 18px; }
}

/* TeaseHub wordmark */
.logo-word b { font-weight: 500; }

/* ============================================================
   TeaseHub Studio
   ============================================================ */
.studio { max-width: 1280px; margin: 0 auto; }
.studio-head { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.studio-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; padding-bottom: 12px; }
.studio-brand .i { color: var(--brand); }
.studio-tabs { border: 0; margin: 0; }
.settings-wrap .studio-head { margin-bottom: 24px; }

.studio-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.studio-stats.live-stats { grid-template-columns: repeat(3, 1fr); }
.studio-stats > div { padding: 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--text-2); font-size: 13px; }
.studio-stats span { display: block; font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.5px; }

.studio-filters { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.studio-search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; height: 40px; }
.studio-search .i { color: var(--text-2); width: 20px; height: 20px; }
.studio-search input { flex: 1; border: 0; outline: none; background: none; font-size: 15px; min-width: 0; }
.studio-filters select { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.studio-filters .btn .i { width: 20px; height: 20px; }

.bulk-bar { display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-bottom: 8px; border-radius: 10px; background: rgba(255, 46, 99, .08); font-weight: 600; }
.bulk-bar.show { display: flex; }
.danger-btn { background: #e5193c; color: #fff; }
.danger-btn:hover { background: #c4122f; }
.danger-btn .i { width: 18px; height: 18px; }

.studio-table { width: 100%; border-collapse: collapse; }
.studio-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.studio-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.studio-table tr:hover td, .studio-table tr.selected td { background: var(--hover); }
.c-check { width: 32px; }
.c-check input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 4px; }
.c-num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.sv { display: flex; gap: 14px; min-width: 0; }
.sv-thumb { position: relative; flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #111; }
.sv-thumb img, .sv-thumb video { width: 100%; height: 100%; object-fit: cover; }
.sv-thumb.vertical img, .sv-thumb.vertical video { object-fit: contain; }
.sv-thumb .dur { right: 4px; bottom: 4px; font-size: 11px; }
.sv-text { min-width: 0; }
.sv-title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sv-title:hover { text-decoration: underline; }
.sv-desc { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.sv-desc .muted { font-style: italic; }
.sv-actions { display: flex; gap: 2px; margin-top: 6px; opacity: 0; transition: opacity .15s; }
.studio-table tr:hover .sv-actions, .studio-table tr.selected .sv-actions { opacity: 1; }
@media (hover: none) { .sv-actions { opacity: 1; } }
.sv-actions a, .sv-actions button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.sv-actions a:hover, .sv-actions button:hover { background: var(--bg-3); color: var(--text); }
.sv-actions .sv-del:hover { color: #e5193c; }
.sv-actions .i { width: 20px; height: 20px; }
.kind { display: inline-block; padding: 2px 8px; border-radius: 10px; background: var(--bg-2); font-size: 12px; font-weight: 600; }
.kind.flick { background: var(--grad); color: #fff; }
.kind.live-kind { background: #e5193c; color: #fff; }
.inline-form { display: inline; }
.live-studio-thumb { display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, hsl(var(--h) 80% 55%), transparent 60%), linear-gradient(135deg, hsl(var(--h) 60% 25%), #0b0610); }
.live-studio-thumb .live-tag { position: absolute; left: 4px; top: 4px; transform: scale(.85); transform-origin: top left; }
.sm-btn { height: 30px; padding: 0 12px; font-size: 13px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; margin-bottom: 12px; }
.back-link .i { width: 20px; height: 20px; }
.back-link:hover { color: var(--text); }
.se-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.se-head h1 { font-size: 24px; margin: 0; }
.se-head-actions { display: flex; gap: 8px; }
.se-head-actions .i { width: 18px; height: 18px; }
.se-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.se-side { position: sticky; top: calc(var(--top) + 16px); border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.se-player { background: #000; aspect-ratio: 16 / 9; }
.se-player.vertical { aspect-ratio: 9 / 12; }
.se-player video { width: 100%; height: 100%; object-fit: contain; }
.live-edit-preview { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: radial-gradient(circle at 30% 30%, hsl(var(--h) 80% 55%), transparent 60%), linear-gradient(135deg, hsl(var(--h) 60% 25%), #0b0610); }
.live-edit-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.live-edit-preview .live-tag { position: absolute; left: 10px; top: 10px; }
.se-stats.live-edit-stats { grid-template-columns: repeat(2, 1fr); }
.se-meta { padding: 14px 16px 4px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.se-meta span { display: block; color: var(--text-2); font-size: 12px; }
.se-meta a { color: #065fd4; word-break: break-all; }
@media (prefers-color-scheme: dark) { .se-meta a { color: #3ea6ff; } }
.se-stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 16px 16px; text-align: center; font-size: 12px; color: var(--text-2); }
.se-stats b { display: block; font-size: 18px; color: var(--text); }

.thumb-edit { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.te-current { position: relative; width: 220px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #111; display: flex; align-items: center; justify-content: center; flex: none; }
.te-current.vertical { width: 140px; aspect-ratio: 9 / 16; }
.te-current img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.te-none { color: #aaa; font-size: 12px; padding: 12px; text-align: center; }
.te-options { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; flex: 1; min-width: 200px; }
.te-options label.btn { cursor: pointer; }
.te-options label.btn input { display: none; }
.te-options .i { width: 18px; height: 18px; }
.te-options .check { margin-top: 0; }
.te-options p { margin: 4px 0 0; font-size: 13px; }

.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 32px 0; padding: 20px 24px; border: 1px solid rgba(229, 25, 60, .35); border-radius: 14px; }
.danger-zone h2 { font-size: 16px; margin: 0 0 4px; }
.danger-zone p { margin: 0; }

@media (max-width: 1000px) {
  .se-grid { grid-template-columns: 1fr; }
  .se-side { position: static; order: -1; }
  .studio-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .studio { padding: 0 12px; }
  .studio-head { gap: 12px; overflow-x: auto; }
  .studio-stats { grid-template-columns: repeat(2, 1fr); }
  .studio-stats > div:first-child { grid-column: span 2; }
  .studio-table thead, .studio-table td:nth-child(3), .studio-table td:nth-child(4), .studio-table td:nth-child(6), .studio-table td:nth-child(7), .studio-table td:nth-child(8) { display: none; }
  .studio-table td:nth-child(5)::after { content: " views"; color: var(--text-2); font-size: 12px; }
  .sv-thumb { width: 104px; }
  .danger-zone { flex-direction: column; align-items: flex-start; }
}

/* Thumbnail frame picker */
.frame-pick { margin: 10px 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); }
.frame-pick.inactive { opacity: .55; }
.fp-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.fp-label { font-weight: 600; font-size: 13px; }
.fp-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); }
.frame-pick input[type=range] { width: 100%; accent-color: var(--brand); height: 24px; cursor: pointer; margin: 0; }
.frame-pick .card-sub { font-size: 12px; margin-top: 2px; }
.thumb-upload-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.getapp-url code.domain { font-family: inherit; font-size: 22px; font-weight: 800; padding: 10px 16px; background: var(--grad); color: #fff; letter-spacing: -.3px; }
.getapp-local summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.getapp-local[open] summary { margin-bottom: 10px; }
.getapp-local .getapp-url { flex-direction: row; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }

/* ============================================================
   Moderation
   ============================================================ */
.mod-brand .i { color: #e5193c; }
.count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: #e5193c; color: #fff; font-size: 12px; }
.count-muted { color: var(--text-2); font-weight: 500; margin-left: 2px; }
.side-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #e5193c; color: #fff; font-size: 11px; display: inline-grid; place-items: center; }
.sidebar > a .side-badge { position: static; }
body.side-collapsed .sidebar .side-badge, .sidebar > a:has(.side-badge) { position: relative; }
.mod-link .i { color: #e5193c; }
.banned-tag { color: #e5193c; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.link-plain { color: inherit; font-weight: 600; }
.link-plain:hover { text-decoration: underline; }
.danger-ghost { background: none; color: #e5193c; }
.danger-ghost:hover { background: rgba(229, 25, 60, .1); }
.admin-pill { color: #e5193c; }
.admin-pill .i { width: 18px; height: 18px; }
.report-list { display: flex; flex-direction: column; gap: 12px; }
.report-card { display: grid; grid-template-columns: 160px 1fr auto; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; align-items: start; }
.report-card.urgent { border-color: #e5193c; box-shadow: 0 0 0 3px rgba(229, 25, 60, .12); }
.report-card .sv-thumb { width: 160px; }
.rc-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.reason-chip { display: inline-block; padding: 2px 9px; border-radius: 10px; background: rgba(229, 25, 60, .12); color: #e5193c; font-size: 12px; font-weight: 700; }
.rc-detail { font-size: 13px; margin-top: 6px; }
.rc-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.rc-actions .btn { width: 100%; }
.rc-actions .i { width: 18px; height: 18px; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.users-table tr.is-banned td { opacity: .7; }
.row-actions { white-space: nowrap; }
.row-actions form, .row-actions > button { display: inline-block; margin-left: 6px; vertical-align: middle; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 20px 0; }
.rail-btn.admin-del .rail-ico { background: rgba(229, 25, 60, .85); color: #fff; }
@media (max-width: 720px) {
  .report-card { grid-template-columns: 96px 1fr; }
  .report-card .sv-thumb { width: 96px; }
  .rc-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .rc-actions .btn, .rc-actions form { flex: 1; }
  .users-table thead, .users-table td:nth-child(2), .users-table td:nth-child(4) { display: none; }
}

/* Verified badge */
.vbadge { width: 1em; height: 1em; min-width: 14px; min-height: 14px; fill: #DE6A5D; vertical-align: -0.12em; margin-left: 4px; flex: none; }
h1 .vbadge { width: .7em; height: .7em; }
.flick-user .vbadge { filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.chan-chip span { display: inline-flex; align-items: center; }

/* Pinned */
.pinned-shelf { max-width: 1280px; margin: 20px auto 0; }
.pin-heading-icon { display: inline-grid; place-items: center; color: var(--text); }
.pin-heading-icon .i { width: 22px; height: 22px; }
.pinned-row { display: flex; flex-wrap: wrap; gap: 24px 16px; align-items: flex-start; }
.pinned-row > .card { width: 320px; max-width: 100%; }
.pinned-row > .short-card { width: 200px; max-width: calc(50% - 8px); }
.channel-section { max-width: 1280px; margin: 28px auto 0; }
.channel-mixed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 16px; align-items: start; }
.channel-mixed-grid .short-card { max-width: 240px; }
.channel-content-grid { max-width: 1280px; margin-left: auto; margin-right: auto; }
.channel-sort { max-width: 1280px; margin: -8px auto 20px; display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.channel-sort label { color: var(--text-2); font-size: 13px; font-weight: 600; }
.channel-sort select { height: 36px; padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.stream-card .card-meta { grid-template-columns: 1fr; padding-top: 10px; }
.lock-icon { width: 42px; height: 42px; color: var(--text-2); }

/* Community posts */
.post-list { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.channel-section .post-list { margin: 0; }
.channel-tabs + .post-list, .channel-tabs ~ .post-list { margin-left: max(0px, calc((100% - 1280px) / 2)); }
.community-post { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--bg); }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head > div { min-width: 0; }
.post-author { font-weight: 700; display: inline-flex; align-items: center; }
.post-delete { margin-left: auto; }
.post-delete button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--text-2); }
.post-delete button:hover { color: #e5193c; background: var(--hover); }
.post-delete .i { width: 18px; height: 18px; }
.post-text { margin: 14px 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.post-image { width: 100%; max-height: 620px; object-fit: contain; background: #111; border-radius: 12px; margin-top: 12px; }
.post-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.post-actions .pill.on { color: var(--brand); }
.post-comments { display: none; padding-top: 14px; }
.post-comments.open { display: block; }
.post-comment-list { display: flex; flex-direction: column; gap: 14px; }
.post-comment-form { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.post-comment-form input { flex: 1; min-width: 0; height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 19px; background: var(--bg-2); }
.post-poll { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.poll-option { --poll: 0%; position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; text-align: left; font-weight: 600; }
.poll-option::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--poll); background: rgba(255,46,99,.13); z-index: 0; transition: width .25s; }
.poll-option > * { position: relative; z-index: 1; }
.poll-option.selected { border-color: var(--brand); }
.poll-option.selected::after { content: "✓"; color: var(--brand); position: relative; z-index: 1; }
.poll-total { margin-top: 2px; }
.post-create-wrap { max-width: 720px; margin: 0 auto; }
.post-create-head h1 { margin: 0 0 18px; font-size: 26px; }
.post-create { border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.post-composer-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.post-composer-head strong { display: block; }
.audience-pill { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 12px; }
.audience-pill .i { width: 14px; height: 14px; }
.post-create textarea { min-height: 130px; border: 0; padding: 0; resize: vertical; font-size: 18px; box-shadow: none !important; }
.post-create-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 10px; }
.post-create-actions > div { display: flex; gap: 4px; }
.icon-text-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 9px; font-weight: 600; cursor: pointer; }
.icon-text-btn:hover { background: var(--hover); }
.icon-text-btn .i { width: 20px; height: 20px; color: var(--brand); }
.icon-text-btn input { display: none; }
.post-image-preview { position: relative; margin: 10px 0; border-radius: 12px; overflow: hidden; background: #111; }
.post-image-preview img { display: block; width: 100%; max-height: 480px; object-fit: contain; }
.post-image-preview button { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; display: grid; place-items: center; }
.post-image-preview .i { width: 18px; height: 18px; }
.post-poll-editor { padding: 12px; background: var(--bg-2); border-radius: 12px; }
.post-poll-editor .field { margin-bottom: 8px; }
.post-poll-editor .field:last-child { margin-bottom: 0; }

/* Viewer preference: obscure previews, then reveal intentionally. */
.blur-thumbnails .thumb > img,
.blur-thumbnails .thumb > video:not(.hover-preview),
.blur-thumbnails .short-thumb > img,
.blur-thumbnails .short-thumb > video {
  filter: blur(20px);
  transform: scale(1.08);
  transition: filter .18s ease, transform .18s ease;
}
.blur-thumbnails .thumb:hover > img,
.blur-thumbnails .thumb:focus-visible > img,
.blur-thumbnails .thumb:hover > video,
.blur-thumbnails .thumb:focus-visible > video,
.blur-thumbnails .short-card:hover .short-thumb > img,
.blur-thumbnails .short-card:focus-visible .short-thumb > img,
.blur-thumbnails .short-card:hover .short-thumb > video,
.blur-thumbnails .short-card:focus-visible .short-thumb > video {
  filter: none;
  transform: none;
}
.pin-tag { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--brand); vertical-align: 1px; }
.pin-tag .i { width: 14px; height: 14px; }
.sv-actions .sv-pin.on { color: var(--brand); }
.se-pin { padding: 4px 16px 0; }
.se-pin .btn { width: 100%; }
.se-pin .i { width: 18px; height: 18px; }
.thumb-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-bottom: 12px; border-radius: 12px; background: var(--bg-2); flex-wrap: wrap; }
.thumb-banner .i { width: 18px; height: 18px; }

/* ============================================================
   Live
   ============================================================ */
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: #e5193c; display: inline-block; box-shadow: 0 0 0 0 rgba(229,25,60,.6); animation: livepulse 1.6s infinite; margin-right: 4px; }
@keyframes livepulse { 70% { box-shadow: 0 0 0 10px rgba(229,25,60,0); } 100% { box-shadow: 0 0 0 0 rgba(229,25,60,0); } }
.live-ico { color: #e5193c; }
.live-badge { background: #e5193c; }
.live-btn { background: #e5193c; color: #fff; }
.live-btn:hover { background: #c4122f; }
.live-btn .i { width: 20px; height: 20px; }
.live-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.live-head .page-title { display: flex; align-items: center; gap: 10px; }
.live-shelf { border-top: 0; padding-top: 0; margin-top: 0; }
.live-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 320px); gap: 16px; overflow-x: auto; padding-bottom: 6px; }
.live-thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, hsl(var(--h) 80% 55%), transparent 60%), linear-gradient(135deg, hsl(var(--h) 60% 25%), #0b0610);
}
.live-thumb .avatar.xl { width: 84px; height: 84px; font-size: 34px; border: 3px solid #e5193c; box-shadow: 0 0 0 4px rgba(229,25,60,.3); }
.live-thumb .stream-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.live-tag { display: inline-block; padding: 2px 7px; border-radius: 4px; background: #e5193c; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .5px; }
.live-tag.ended { background: #555; }
.live-thumb .live-tag { position: absolute; left: 8px; top: 8px; }
.live-viewers { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 4px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 600; }
.live-viewers .i { width: 14px; height: 14px; }

.live-studio, .live-view { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; max-width: 1500px; margin: 0 auto; }
.ls-video, .lv-player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.ls-video video, .lv-player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.ls-video video { transform: scaleX(-1); }
.ls-overlay, .lv-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff; text-align: center; padding: 24px; background: rgba(0,0,0,.6); }
.ls-overlay .i { width: 48px; height: 48px; opacity: .8; }
.ls-overlay p, .lv-state p { margin: 0; max-width: 420px; }
.ls-status { position: absolute; left: 12px; top: 12px; display: flex; gap: 8px; align-items: center; color: #fff; font-weight: 700; font-size: 13px; z-index: 3; }
.ls-status > span:not(.live-tag) { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; background: rgba(0,0,0,.6); }
.ls-status .i { width: 14px; height: 14px; }
.lv-player .unmute-pill { top: auto; bottom: 14px; }
.ls-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.ls-controls input { flex: 1; min-width: 200px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 15px; outline: none; }
.ls-controls input:focus { border-color: var(--brand); }
.ls-controls .i { width: 18px; height: 18px; }
.ls-note { margin: 12px 0 0; }
.ls-share { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ls-share code { background: var(--bg-2); padding: 4px 8px; border-radius: 6px; }
body.is-live .ls-video { box-shadow: 0 0 0 3px #e5193c; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.live-chat { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); height: min(640px, calc(100vh - var(--top) - 48px)); position: sticky; top: calc(var(--top) + 24px); overflow: hidden; }
.lc-head { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--line); }
.lc-list { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.lc-msg { word-break: break-word; }
.lc-msg b { margin-right: 4px; }
.lc-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: center; }
.lc-form input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 19px; border: 1px solid var(--line); background: var(--bg-2); outline: none; }
body.live-page .main { margin-left: 0; }
body.live-page .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
body.live-page.side-open .sidebar { transform: none; }
@media (max-width: 1000px) {
  .live-studio, .live-view { grid-template-columns: 1fr; }
  .live-chat { position: static; height: 420px; }
}
@media (max-width: 720px) {
  .lv-main, .ls-main { margin: -12px -12px 0; }
  .lv-player, .ls-video { border-radius: 0; }
  .lv-main > *:not(.lv-player), .ls-main > *:not(.ls-video) { padding: 0 12px; }
  .live-chat { margin: 0 12px; }
}
body.live-page.side-open .scrim { display: block; position: fixed; inset: var(--top) 0 0 0; background: rgba(0,0,0,.4); z-index: 35; }

/* Create menu (YouTube-style) */
.create-menu { right: 0; width: auto; min-width: 230px; padding: 10px 0; border-radius: 14px; }
.create-menu a, .sheet-card a { display: flex; align-items: center; gap: 22px; padding: 12px 22px; font-size: 16px; }
.create-menu a:hover, .sheet-card a:hover { background: var(--hover); }
.create-menu .i, .sheet-card .i { width: 26px; height: 26px; }
.sheet-card a { border-radius: 10px; }
.create-btn[aria-expanded="true"] { background: var(--bg-3); }
.sheet { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,0); transition: background .2s; display: flex; align-items: flex-end; }
.sheet.open { background: rgba(0,0,0,.45); }
.sheet-card { width: 100%; background: var(--bg); color: var(--text); border-radius: 18px 18px 0 0; padding: 8px 12px calc(16px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .22s ease; }
.sheet.open .sheet-card { transform: none; }
.sheet-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--bg-3); margin: 4px auto 10px; }
.sheet-card h3 { margin: 0 12px 6px; font-size: 18px; }
@media (min-width: 721px) { .sheet { display: none !important; } }
