/* Nacho Video redesign — shared styles */
:root {
  --bg: #ffffff; --surface: #f4f4f5; --surface2: #e9e9ec; --border: #e4e4e7;
  --text: #111113; --muted: #5b5b66; --accent: #f59e0b; --accent-text: #b45309; --on-accent: #111113;
  --shadow: 0 10px 30px rgba(0,0,0,.12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e10; --surface: #1a1a1e; --surface2: #26262c; --border: #2a2a31;
    --text: #f4f4f5; --muted: #a1a1aa; --accent: #fbbf24; --accent-text: #fcd34d; --on-accent: #111113;
    --shadow: 0 10px 30px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e10; --surface: #1a1a1e; --surface2: #26262c; --border: #2a2a31;
  --text: #f4f4f5; --muted: #a1a1aa; --accent: #fbbf24; --accent-text: #fcd34d; --on-accent: #111113;
  --shadow: 0 10px 30px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.4; min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: #8a8a94; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { display: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-weight: 800; font-size: 20px; letter-spacing: -.5px; }
.logo svg { width: 30px; height: 30px; }
.search { flex: 1 1 160px; max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 6px 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.search input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; outline: none; }
.search button { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--surface2); }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 700; }
.btn-primary:hover { background: var(--accent); filter: brightness(.95); }
.btn-dark { background: var(--text); color: var(--bg); border-color: transparent; font-weight: 700; }
.btn-dark:hover { background: var(--text); filter: brightness(1.1); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface); }
.icon-btn { width: 42px; padding: 0; }
.btn svg { width: 18px; height: 18px; }
.avatar { width: 36px; height: 36px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: #5b4a8a; flex-shrink: 0; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
.hide-sm { display: none; }
@media (min-width: 720px) { .hide-sm { display: inline-flex; } .site-header { height: 64px; padding: 0 24px; gap: 16px; } }

/* Chip nav */
.chips { padding: 10px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 60px; z-index: 19; background: var(--bg); }
@media (min-width: 720px) { .chips { top: 64px; padding: 12px 24px; } }
.chip { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; border: 1px solid transparent; }
.chip:hover { background: var(--surface2); }
.chip.active, .chip[aria-current="page"] { background: var(--text); color: var(--bg); font-weight: 600; }
.chip-outline { background: var(--surface); border-color: var(--border); height: 38px; }

/* Layout */
.container { width: 100%; max-width: 1392px; margin: 0 auto; padding: 16px; }
@media (min-width: 720px) { .container { padding: 24px; } }
main.container { flex: 1; display: flex; flex-direction: column; gap: 36px; padding-bottom: 96px; }
@media (min-width: 720px) { main.container { padding-bottom: 48px; } }
.section { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; display: flex; align-items: center; gap: 8px; }
.section-head h2 svg { width: 22px; height: 22px; }
@media (min-width: 720px) { .section-head h2 { font-size: 22px; } }
.see-all { color: var(--accent-text); font-weight: 600; font-size: 14px; }

/* Video grid + cards */
.grid { display: grid; grid-template-columns: 1fr; gap: 22px 18px; margin: 0 -16px; }
.grid .card .thumb { border-radius: 0; }
.grid .card .card-body { padding: 0 16px; }
@media (min-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 0; }
  .grid .card .thumb { border-radius: 14px; }
  .grid .card .card-body { padding: 0; }
}
.card { display: flex; flex-direction: column; gap: 10px; }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--surface2); transition: transform .15s ease; }
.card:hover .thumb { transform: translateY(-2px); }
.thumb .play { width: 44px; height: 44px; opacity: .9; }
.thumb .dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.75); color: #fff; font-size: 12px; font-weight: 600; }
.card-body { display: flex; gap: 10px; }
.card-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card h3 { font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover h3 { color: var(--accent-text); }
.meta { color: var(--muted); font-size: 13px; }
.t1 { background: #5b4a8a; } .t2 { background: #2f5f7a; } .t3 { background: #8a4a3c; } .t4 { background: #3d6b4f; }
.t5 { background: #7a5a2e; } .t6 { background: #4a5a7a; } .t7 { background: #6b3f5e; } .t8 { background: #3f6b6b; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 20px 16px; color: var(--muted); font-size: 13px; }
.site-footer .inner { max-width: 1392px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer b { color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.site-footer b svg { width: 18px; height: 18px; }

/* Mobile bottom tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; height: calc(64px + env(safe-area-inset-bottom)); padding: 4px 8px env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid var(--border); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 56px; font-size: 11px; font-weight: 500; color: var(--muted); }
.tabbar a[aria-current="page"] { color: var(--text); font-weight: 700; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar .upload-tab span { width: 56px; height: 40px; border-radius: 14px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
.tabbar .upload-tab svg { width: 26px; height: 26px; }
@media (min-width: 720px) { .tabbar { display: none; } }

/* Watch page */
.watch { display: flex; flex-wrap: wrap; gap: 28px 24px; align-items: flex-start; }
.watch-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.watch-side { flex: 1 1 320px; max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 719px) { .watch-side { max-width: none; } main.container.watch-container { padding-top: 0; } .player { margin: 0 -16px; border-radius: 0; } }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.player .big-play { width: 72px; height: 72px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
.player .big-play svg { width: 32px; height: 32px; }
.player .controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; color: #fff; background: rgba(0,0,0,.55); font-size: 13px; font-weight: 600; }
.player .track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); position: relative; }
.player .track i { position: absolute; left: 0; top: 0; bottom: 0; width: 34%; border-radius: 2px; background: var(--accent); }
.player .row { display: flex; align-items: center; gap: 12px; }
.player .row .spacer { flex: 1; }
.player .row button { border: 0; background: transparent; color: #fff; height: 32px; min-width: 32px; display: inline-flex; align-items: center; justify-content: center; }
.player .row button svg { width: 20px; height: 20px; }
.watch h1 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; line-height: 1.3; }
@media (min-width: 720px) { .watch h1 { font-size: 22px; } }
.watch-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.channel { display: flex; align-items: center; gap: 12px; }
.channel .who { display: flex; flex-direction: column; line-height: 1.25; }
.channel .who a { font-weight: 700; }
.channel .who span { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding-bottom: 2px; }
.actions::-webkit-scrollbar { display: none; }
.actions .btn { height: 40px; flex-shrink: 0; }
.pill-group { display: inline-flex; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; flex-shrink: 0; }
.pill-group .btn { border: 0; border-radius: 0; background: transparent; }
.pill-group .sep { width: 1px; background: var(--border); }
.btn[aria-pressed="true"] { color: var(--accent-text); }
.btn[aria-pressed="true"] svg { fill: currentColor; }
.share-sheet { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.share-sheet[hidden] { display: none; }
.share-sheet header { display: flex; align-items: center; justify-content: space-between; }
.share-sheet h2 { font-size: 16px; font-weight: 700; }
.share-targets { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.share-targets::-webkit-scrollbar { display: none; }
.share-targets button { flex-shrink: 0; width: 80px; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: transparent; font-size: 12px; font-weight: 500; }
.share-targets span { width: 52px; height: 52px; border-radius: 999px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.share-link { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.share-link input { flex: 1; min-width: 0; height: 36px; border: 0; background: transparent; outline: none; font-size: 14px; }
.share-link button { height: 36px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 700; flex-shrink: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); min-height: 36px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.description { background: var(--surface); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.description b { font-weight: 700; }
.description a { color: var(--accent-text); font-weight: 600; }
.description .more { align-self: flex-start; border: 0; background: transparent; font-weight: 700; font-size: 14px; padding: 6px 0; min-height: 36px; }
.comments { display: flex; flex-direction: column; gap: 18px; padding-top: 6px; }
.comments-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.comments-head h2 { font-size: 18px; font-weight: 800; }
.seg { display: inline-flex; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.seg button { height: 34px; padding: 0 14px; border: 0; background: transparent; font-size: 13px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); font-weight: 600; }
.composer { display: flex; gap: 12px; align-items: flex-start; }
.composer .field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.composer textarea { width: 100%; min-height: 48px; resize: vertical; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 10px 14px; outline: none; }
.composer textarea:focus { border-color: var(--accent); }
.composer .row { display: flex; justify-content: flex-end; gap: 8px; }
.composer .row .btn { height: 36px; }
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.comment { display: flex; gap: 12px; }
.comment .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.comment .by { font-size: 13px; }
.comment .by a { font-weight: 700; }
.comment .by span { color: var(--muted); }
.comment .tools { display: flex; gap: 4px; margin-left: -10px; }
.comment .tools button { height: 36px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; }
.comment .tools button:hover { background: var(--surface); }
.comment .tools svg { width: 16px; height: 16px; }
.next-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.next-head h2 { font-size: 16px; font-weight: 800; }
.next { display: flex; gap: 10px; }
.next .thumb { width: 160px; flex-shrink: 0; border-radius: 10px; }
.next .thumb .dur { font-size: 11px; right: 6px; bottom: 6px; }
.next h3 { font-size: 14px; }
.next .meta { font-size: 12px; }
.mobile-composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--border); }
.mobile-composer input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); outline: none; }
.mobile-composer button { width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
.mobile-composer button svg { width: 20px; height: 20px; }
@media (min-width: 720px) { .mobile-composer { display: none; } }
.only-desktop { display: none; }
@media (min-width: 720px) { .only-desktop { display: flex; } }

/* Upload page */
.upload-wrap { max-width: 920px; }
.upload-wrap h1 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.lede { color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted); }
.steps li i { width: 24px; height: 24px; border-radius: 999px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; }
.steps li.current { background: var(--text); color: var(--bg); font-weight: 700; }
.steps li.current i { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.dropzone { border: 2px dashed var(--border); border-radius: 20px; background: var(--surface); padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.dropzone.over { border-color: var(--accent); background: var(--surface2); }
.dropzone .badge { width: 72px; height: 72px; border-radius: 999px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
.dropzone .badge svg { width: 34px; height: 34px; }
.dropzone p.big { font-size: 18px; font-weight: 700; }
.dropzone p.small { color: var(--muted); font-size: 14px; }
.dropzone .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.dropzone .btn { height: 48px; }
.progress-card { border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; gap: 14px; align-items: center; }
.progress-card .thumb { width: 112px; flex-shrink: 0; border-radius: 10px; }
.progress-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.progress-card .line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.progress-card .line b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-card .line span { color: var(--muted); flex-shrink: 0; }
.bar { height: 8px; border-radius: 4px; background: var(--surface2); position: relative; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 64%; background: var(--accent); border-radius: 4px; }
.hint { color: var(--muted); font-size: 13px; }
.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; }
.field .count { color: var(--muted); font-weight: 500; }
.req { color: var(--accent-text); }
.input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); outline: none; }
.input:focus, .input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,158,11,.25); }
textarea.input { resize: vertical; }
.two { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; }
.tag-input .tag { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.tag-input .tag button { border: 0; background: transparent; color: var(--muted); width: 26px; height: 26px; border-radius: 999px; }
.tag-input input { flex: 1; min-width: 100px; height: 30px; border: 0; background: transparent; outline: none; font-size: 14px; }
fieldset { border: 0; margin: 0; padding: 0; }
.thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .thumbs { grid-template-columns: repeat(4, 1fr); } }
.thumbs label { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; border: 3px solid transparent; cursor: pointer; display: block; overflow: hidden; }
.thumbs label:has(input:checked) { border-color: var(--accent); }
.thumbs label:has(input:checked)::after { content: "Selected"; position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; }
.thumbs .add { border: 2px dashed var(--border); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.thumbs .add svg { width: 22px; height: 22px; }
.box { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.box legend { padding: 0 6px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.radio input { width: 18px; height: 18px; accent-color: var(--accent); }
.radio span span { color: var(--muted); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--border); }
.form-foot .btn { height: 48px; }
.form-foot .btn-primary { padding: 0 26px; font-weight: 800; }
.form-foot .group { display: flex; gap: 10px; margin-left: auto; }
.form-foot a { color: var(--accent-text); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.toast.show { opacity: 1; }
@media (min-width: 720px) { .toast { bottom: 32px; } }

/* Profile page */
.cover { height: 140px; background: #2f5f7a; margin: 0 -16px; position: relative; }
@media (min-width: 720px) { .cover { height: 220px; margin: 0; border-radius: 0 0 20px 20px; } }
.profile-head { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; margin-top: -40px; }
@media (min-width: 720px) { .profile-head { margin-top: -56px; align-items: flex-end; } }
.profile-avatar { width: 88px; height: 88px; border-radius: 999px; border: 4px solid var(--bg); background: #5b4a8a; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800; flex-shrink: 0; }
@media (min-width: 720px) { .profile-avatar { width: 120px; height: 120px; font-size: 48px; } }
.profile-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 240px; padding-bottom: 4px; }
.profile-id h1 { font-size: 22px; font-weight: 800; letter-spacing: -.4px; display: flex; align-items: center; gap: 8px; }
@media (min-width: 720px) { .profile-id h1 { font-size: 28px; } }
.profile-id .handle { color: var(--muted); font-size: 14px; }
.stats { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.stats b { color: var(--text); font-weight: 700; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
@media (min-width: 720px) { .profile-actions { width: auto; padding-bottom: 8px; } }
.profile-actions .btn { height: 42px; flex: 1 1 auto; }
@media (min-width: 720px) { .profile-actions .btn { flex: 0 0 auto; } }
.verified { width: 20px; height: 20px; color: var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .tabs { margin: 0; padding: 0; } }
.tabs button { height: 46px; padding: 0 16px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.profile-body { display: flex; flex-wrap: wrap; gap: 28px 24px; align-items: flex-start; }
.profile-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.profile-side { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 719px) { .profile-side { max-width: none; order: -1; } }
.about { background: var(--surface); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.about h2 { font-size: 15px; font-weight: 800; }
.about .kv { display: flex; gap: 10px; color: var(--muted); align-items: center; }
.about .kv svg { width: 18px; height: 18px; flex-shrink: 0; }
.about .kv a { color: var(--accent-text); font-weight: 600; }
.playlist-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.playlist-row::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .playlist-row { margin: 0; padding: 0; } }
.playlist { flex: 0 0 200px; display: flex; flex-direction: column; gap: 8px; }
.playlist .thumb { border-radius: 12px; }
.playlist .thumb::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: rgba(255,255,255,.35); }
.playlist .count { position: absolute; right: 0; top: 0; bottom: 0; width: 38%; background: rgba(0,0,0,.6); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; gap: 2px; }
.playlist .count svg { width: 20px; height: 20px; }
.playlist h3 { font-size: 14px; font-weight: 600; }

/* Category page */
.cat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.cat-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cat-icon svg { width: 32px; height: 32px; }
.cat-title { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cat-title h1 { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
@media (min-width: 720px) { .cat-title h1 { font-size: 30px; } }
.cat-title p { color: var(--muted); font-size: 14px; }
.cat-actions { display: flex; gap: 8px; }
.cat-actions .btn { height: 42px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.filters .scroll-x { flex: 1 1 auto; min-width: 0; }
.select-pill { height: 36px; padding: 0 32px 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); appearance: none; -webkit-appearance: none; font-size: 14px; font-weight: 500; outline: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a94' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.select-row { display: flex; gap: 8px; flex-shrink: 0; }
.subcats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .subcats { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .subcats { grid-template-columns: repeat(6, 1fr); } }
.subcat { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid transparent; }
.subcat:hover { border-color: var(--border); background: var(--surface2); }
.subcat b { font-weight: 700; font-size: 15px; }
.subcat span { color: var(--muted); font-size: 12px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; background: var(--surface); }
.pager a:hover { background: var(--surface2); }
.pager [aria-current="page"] { background: var(--text); color: var(--bg); }
.pager .dots { background: transparent; color: var(--muted); }
.cat-grid-list .card .card-body .avatar { display: none; }

/* Partners page */
.hero { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; padding: 8px 0 12px; }
.hero-copy { flex: 1 1 320px; display: flex; flex-direction: column; gap: 14px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface); color: var(--accent-text); font-size: 13px; font-weight: 700; }
.hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -.8px; line-height: 1.1; }
@media (min-width: 720px) { .hero h1 { font-size: 46px; } }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero p.lede { font-size: 17px; }
.hero .row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .row .btn { height: 48px; padding: 0 22px; }
.hero-visual { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.ad-demo { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ad-demo .label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.ad-slot { border: 2px dashed var(--accent); border-radius: 12px; background: var(--bg); padding: 14px; display: flex; gap: 12px; align-items: center; }
.ad-slot .mark { width: 48px; height: 48px; border-radius: 12px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; flex-shrink: 0; }
.ad-slot b { font-weight: 700; display: block; }
.ad-slot span { color: var(--muted); font-size: 13px; }
.ad-slot .tag { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--accent-text); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 8px; flex-shrink: 0; }
.skeleton { height: 10px; border-radius: 5px; background: var(--surface2); }
.skeleton.w1 { width: 70%; } .skeleton.w2 { width: 45%; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-grid i { aspect-ratio: 16/9; border-radius: 8px; display: block; }

.steps-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.step-card { border: 1px solid var(--border); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.step-card .num { width: 40px; height: 40px; border-radius: 999px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.step-card h3 { font-size: 18px; font-weight: 800; }
.step-card p { color: var(--muted); font-size: 14px; }

.tiers { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .tiers { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.tier { border: 1px solid var(--border); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); position: relative; }
.tier.featured { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.tier .ribbon { position: absolute; top: -12px; left: 20px; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.tier h3 { font-size: 20px; font-weight: 800; }
.tier .req { color: var(--muted); font-size: 14px; }
.tier .big { font-size: 30px; font-weight: 800; letter-spacing: -.5px; line-height: 1; }
.tier .big small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.tier ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.tier li { display: flex; gap: 8px; align-items: flex-start; }
.tier li svg { width: 18px; height: 18px; color: var(--accent-text); flex-shrink: 0; margin-top: 1px; }
.tier .btn { margin-top: auto; height: 44px; }

.where { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .where { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .where { grid-template-columns: repeat(4, 1fr); } }
.where-card { border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.where-card h3 { font-size: 15px; font-weight: 700; }
.where-card p { color: var(--muted); font-size: 13px; }
.where-mock { border-radius: 10px; background: var(--surface); padding: 10px; display: flex; flex-direction: column; gap: 6px; aspect-ratio: 4/3; }
.where-mock .block { background: var(--surface2); border-radius: 5px; flex: 1; }
.where-mock .ad { background: var(--accent); opacity: .85; border-radius: 5px; flex: 0 0 22%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: var(--on-accent); }
.where-mock.row { flex-direction: row; }
.where-mock.row .ad { flex: 0 0 30%; }

.faq { display: flex; flex-direction: column; gap: 8px; max-width: 820px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.faq summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; transition: transform .15s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .a { padding: 0 16px 14px; color: var(--muted); font-size: 14px; }

.apply { border-radius: 20px; background: var(--text); color: var(--bg); padding: 24px; display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
@media (min-width: 720px) { .apply { padding: 36px; } }
.apply .copy { flex: 1 1 280px; display: flex; flex-direction: column; gap: 8px; }
.apply h2 { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.apply p { opacity: .8; font-size: 15px; }
.apply form { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; }
.apply .input { background: var(--bg); color: var(--text); border-color: transparent; }
.apply .btn-primary { height: 48px; font-weight: 800; }
.apply .fine { font-size: 12px; opacity: .7; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { border-radius: 14px; background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.stat span { color: var(--muted); font-size: 12px; }

/* Leaderboard page */
.lb-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.lb-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; display: flex; align-items: center; gap: 10px; }
.lb-head h1 svg { width: 28px; height: 28px; color: var(--accent); }
@media (min-width: 720px) { .lb-head h1 { font-size: 32px; } }
.lb-head p { color: var(--muted); font-size: 14px; }
.lb-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; position: sticky; top: 60px; z-index: 15; background: var(--bg); padding: 10px 0; margin: -10px 0; }
@media (min-width: 720px) { .lb-controls { top: 64px; } }
.lb-controls .seg { flex-shrink: 0; }
.lb-controls .seg button { height: 38px; padding: 0 16px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.lb-controls .seg button svg { width: 16px; height: 16px; }
.podium { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .podium { grid-template-columns: 1fr 1.25fr 1fr; align-items: end; gap: 16px; } .podium .p1 { order: 2; } .podium .p2 { order: 1; } .podium .p3 { order: 3; } }
.podium .card { border: 1px solid var(--border); border-radius: 18px; padding: 12px; background: var(--surface); position: relative; }
.podium .p1 .card { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.podium .thumb { border-radius: 12px; }
.rank-badge { position: absolute; left: 20px; top: 20px; width: 36px; height: 36px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; color: #111; z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.rank-badge.gold { background: #fbbf24; } .rank-badge.silver { background: #d4d4d8; } .rank-badge.bronze { background: #d99a66; }
.podium .stat-line { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 18px; letter-spacing: -.3px; }
.podium .stat-line svg { width: 18px; height: 18px; color: var(--accent-text); }
.podium .by { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.podium .by .avatar { width: 24px; height: 24px; font-size: 11px; }
.lb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--bg); }
.lb-row:first-child { border-top: 0; }
.lb-row:hover { background: var(--surface); }
.lb-row .rank { width: 28px; text-align: center; font-weight: 800; color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.lb-row .thumb { width: 96px; flex-shrink: 0; border-radius: 8px; }
@media (min-width: 720px) { .lb-row .thumb { width: 128px; } }
.lb-row .thumb .dur { font-size: 11px; right: 5px; bottom: 5px; }
.lb-row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lb-row h3 { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 720px) { .lb-row h3 { font-size: 15px; } }
.lb-row .val { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.lb-row .val b { font-size: 16px; font-weight: 800; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.lb-row .val span { font-size: 11px; color: var(--muted); }
.delta { font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }
.delta.up { color: #15803d; } .delta.down { color: #b91c1c; } .delta.new { color: var(--accent-text); }
:root[data-theme="dark"] .delta.up { color: #4ade80; } :root[data-theme="dark"] .delta.down { color: #f87171; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .delta.up { color: #4ade80; } :root:not([data-theme="light"]) .delta.down { color: #f87171; } }
.delta svg { width: 12px; height: 12px; }
.member-row .avatar { width: 44px; height: 44px; font-size: 16px; flex-shrink: 0; }
.member-row .info a { font-weight: 700; font-size: 15px; }
.member-row .info span { color: var(--muted); font-size: 13px; }
.lb-you { border: 1px dashed var(--accent); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; background: var(--surface); }
.lb-you .rank { font-weight: 800; font-size: 18px; color: var(--accent-text); }
.lb-you .info { flex: 1; min-width: 0; font-size: 14px; }
.lb-you .info b { font-weight: 700; }
.lb-you .info span { color: var(--muted); display: block; font-size: 13px; }
.lb-sections { display: flex; flex-wrap: wrap; gap: 28px 24px; align-items: flex-start; }
.lb-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.lb-side { flex: 1 1 320px; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 719px) { .lb-side { max-width: none; } }

/* ===== KVS integration ===== */
.hidden { display: none; }
img { max-width: 100%; }
.content, .main-content, .main-container { display: contents; }
.main-block { width: 100%; max-width: 1392px; margin: 0 auto; padding: 16px 16px 96px; flex: 1; display: flex; flex-direction: column; gap: 36px; }
@media (min-width: 720px) { .main-block { padding: 24px 24px 48px; } }
.text { color: var(--muted); font-size: 14px; }

/* Header additions */
.site-header { flex-shrink: 0; }
.chips { flex-shrink: 0; }
.logo span { white-space: nowrap; }
.search input::-webkit-search-cancel-button { display: none; }
@media (max-width: 719px) {
  .site-header.search-open .search { display: flex; position: absolute; left: 0; right: 0; top: 100%; z-index: 21; max-width: none; margin: 0; height: 56px; padding: 0 10px 0 16px; border-radius: 0; border-width: 0 0 1px; background: var(--bg); }
}
.account { position: relative; display: inline-flex; }
.avatar { overflow: hidden; border: 0; padding: 0; cursor: pointer; text-transform: uppercase; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 20px; height: 20px; }
.avatar-guest { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 25; min-width: 220px; padding: 6px; display: none; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.account.open .account-menu { display: flex; }
.account-menu b { padding: 10px 12px 6px; font-size: 13px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu a { padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.account-menu a:hover { background: var(--surface); }
.account-menu a.disabled { color: var(--muted); pointer-events: none; }

/* Video cards with real thumbs */
.card > a { display: flex; flex-direction: column; gap: 10px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .label { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.75); color: #fff; font-size: 11px; font-weight: 700; }
.thumb .label-wide { left: 0; right: 0; top: auto; bottom: 0; padding: 6px 8px; border-radius: 0; text-align: center; font-size: 12px; }
.thumb .fav { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 999px; background: rgba(0,0,0,.7); color: #fff; display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; cursor: pointer; }
.thumb .fav + .fav { right: 46px; }
.thumb .fav svg { width: 16px; height: 16px; }
.card:hover .fav, .thumb .fav:focus-visible { opacity: 1; }
.thumb .fav.fixed { opacity: 1; background: var(--accent); color: var(--on-accent); }
@media (hover: none) { .thumb .fav { opacity: 1; } }
.card.disabled .thumb img, .card.processing .thumb img, .card.error .thumb img { opacity: .45; }
.item-control { padding: 0 16px; }
@media (min-width: 520px) { .item-control { padding: 0; } }
.item-control-holder { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.toggle-button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; cursor: pointer; }
.toggle-button:hover { background: var(--surface2); }
.toggle-button.active { background: var(--text); color: var(--bg); border-color: transparent; }
.toggle-button.disabled { opacity: .5; pointer-events: none; }
.toggle-button input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.list-controls { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.list-controls .right { margin-left: auto; }
.empty-content { grid-column: 1 / -1; padding: 32px 16px; text-align: center; color: var(--muted); background: var(--surface); border-radius: 16px; margin: 0 16px; }
@media (min-width: 520px) { .empty-content { margin: 0; } }
.section-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -.4px; display: flex; align-items: center; gap: 8px; }
@media (min-width: 720px) { .section-head h1 { font-size: 26px; } }
.section-head .scroll-x { max-width: 100%; }
.section-head a.chip { cursor: pointer; }
.load-more { display: flex; justify-content: center; padding-top: 6px; }
.load-more a { height: 44px; padding: 0 28px; cursor: pointer; }
.pager a { cursor: pointer; }
.pager .off { opacity: .45; }

/* Stock KVS forms and popups */
.fancybox-skin { background: var(--bg); color: var(--text); border-radius: 20px; }
.fancybox-inner { border-radius: 20px; }
.fancybox-close { top: 8px; right: 8px; background: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; }
.fancybox-close::before { content: "\00d7"; font-size: 26px; line-height: 1; color: var(--muted); }
.fancybox-close:hover { background-color: var(--surface); }
.fancybox-overlay { background: rgba(0,0,0,.6); }
.popup-title { display: block; padding: 22px 56px 0 24px; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.popup-holder { padding: 16px 24px 24px; min-width: min(440px, 84vw); max-width: 100%; }
form .row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
form .row:has(> input[type="checkbox"]), form .row:has(> input[type="radio"]) { flex-direction: row; align-items: center; gap: 10px; }
.field-label { font-weight: 700; font-size: 14px; }
.field-label.required::after { content: " *"; color: var(--accent-text); }
.textfield, .textarea, .selectbox { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); outline: none; }
.textfield:focus, .textarea:focus, .selectbox:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,158,11,.25); }
.textfield.error, .textarea.error, .selectbox.error { border-color: #dc2626; }
.textarea { resize: vertical; }
input.checkbox, input.radio { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.field-error { color: #b91c1c; font-size: 13px; }
.field-error:empty { display: none; }
.generic-error { margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(220,38,38,.12); color: #b91c1c; font-size: 14px; }
.success, .message { padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: 14px; }
:root[data-theme="dark"] .field-error, :root[data-theme="dark"] .generic-error { color: #f87171; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field-error, :root:not([data-theme="light"]) .generic-error { color: #f87171; } }
.submit, input[type="submit"] { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; cursor: pointer; white-space: nowrap; }
.submit:hover, input[type="submit"]:hover { filter: brightness(.95); }
.submit[disabled], input[type="submit"][disabled] { opacity: .5; cursor: default; filter: none; }
input[type="button"].submit { background: var(--surface); color: var(--text); border-color: var(--border); font-weight: 600; height: 40px; padding: 0 16px; }
form .bottom { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
form .bottom .links { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
form .bottom .links a, .popup-holder a { color: var(--accent-text); font-weight: 600; cursor: pointer; }
.captcha-control .image { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.captcha-control img { width: 165px; height: 68px; border-radius: 8px; }
.autocomplete-suggestions { margin-top: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: auto; }
.autocomplete-suggestion { padding: 9px 14px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.autocomplete-selected { background: var(--surface); }
.autocomplete-group { padding: 8px 14px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.site-footer { flex-shrink: 0; }
.site-footer nav a { cursor: pointer; }
.site-footer nav a:hover { color: var(--text); }
@media (max-width: 719px) { .site-footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); } }
.spot-footer { width: 100%; max-width: 1392px; margin: 0 auto; padding: 0 16px 16px; text-align: center; }
.spot-footer:empty { display: none; }
.section + .pager, .section + .load-more { margin-top: 22px; }
@media (min-width: 720px) { [data-mobile-search] { display: none; } }

/* Watch page (KVS) */
@media (max-width: 719px) { .videoview .main-block { padding-top: 0; } }
.watch .player { display: block; aspect-ratio: auto; }
.player .player-wrap, .player .embed-wrap, .player .no-player { position: relative; background: #000; }
.player .embed-wrap iframe, .player .player-wrap #kt_player, .player .player-wrap #kt_player_internal { position: absolute !important; left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
.player .player-wrap #kt_player.is-fullscreen { position: fixed !important; }
.player .no-player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .25; }
.player .no-player .message { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 90%; text-align: center; color: #fff; font-size: 16px; font-weight: 600; line-height: 1.5; }
.player .no-player .message a { color: #fbbf24; text-decoration: underline; }
.player .no-player .message form { padding-top: 14px; }
.player .no-player .btn-play { position: absolute; inset: 0; background: url("../../player/skin/img/play_white.png") 50% 50% no-repeat; }
.spot { text-align: center; }
.spot:empty { display: none; }
.spot img { height: auto; }
.rating-container { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rating-container .voters { font-size: 13px; color: var(--muted); white-space: nowrap; }
.rating-container .voters:empty { display: none; }
.pill-group .btn.voted { color: var(--accent-text); }
.pill-group .btn.voted svg { fill: currentColor; }
.pill-group .btn.disabled { opacity: .6; cursor: default; }
.share-targets a { flex-shrink: 0; width: 80px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.save-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.save-list .chip { background: var(--bg); border-color: var(--border); cursor: pointer; gap: 8px; }
.save-list .chip.active { background: var(--text); color: var(--bg); }
.save-list .delete { opacity: .7; }
.block-screenshots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.block-screenshots .thumb { border-radius: 10px; }
.description p, .comment-text { overflow-wrap: anywhere; }
.comments-head h2 { margin-right: auto; }
.composer textarea { display: block; }
.composer .field .row { margin-bottom: 8px; }
.composer .row-actions { display: flex; justify-content: flex-end; gap: 8px; }
.composer .row-actions .btn { height: 36px; }
.comment-text img { width: auto; height: 18px; vertical-align: middle; }
.comment .tools a, .comment .tools span { height: 36px; padding: 0 10px; color: var(--muted); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; }
.comment .tools a:hover { background: var(--surface); }
.comment .tools a.disabled { opacity: .5; }
.comment-rating.positive { color: #15803d; }
.comment-rating.negative { color: #b91c1c; }
.dim-comment { opacity: .6; }
.next-list, .next-items { display: flex; flex-direction: column; gap: 12px; }
.card.next { flex-direction: row; }
.next .card-text { min-width: 0; }
.next:hover .thumb { transform: none; }.spot-footer .box { border: 0; padding: 0; }
@media (max-width: 719px) { .videoview ~ .site-footer, .site-footer.no-tabbar { padding-bottom: 20px; } }

/* Lists (KVS) */
.main-block > div[id], main.container > div[id] { display: flex; flex-direction: column; gap: 22px; }
.section + .pager, .section + .load-more { margin-top: 0; }
.content > .section, .content > p.text { width: 100%; max-width: 1392px; margin: 0 auto; padding: 0 16px 24px; }
@media (min-width: 720px) { .content > .section, .content > p.text { padding: 0 24px 32px; } }
.subcat .thumb { border-radius: 10px; margin-bottom: 8px; }
.subcats .empty-content { margin: 0; }.main-block { flex: none; }
.site-footer { margin-top: auto; }

/* Profile (KVS) */
.main-block:has(> .profile-top) { padding-top: 0; }
.profile-top { display: flex; flex-direction: column; gap: 20px; }
.cover { background-size: cover; background-position: center; }
.profile-avatar { overflow: hidden; text-transform: uppercase; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-actions .btn { cursor: pointer; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 16px; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs em { font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface2); color: var(--text); }
.user-data, .main-container-user { display: flex; flex-direction: column; gap: 32px; }
.user-data > div[id], .main-container-user > div[id] { display: flex; flex-direction: column; gap: 22px; }

/* Stock KVS blocks not redesigned yet */
div.box { border: 0; padding: 0; border-radius: 0; }
.headline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.headline h1, .headline h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; margin-right: auto; }
@media (min-width: 720px) { .headline h1, .headline h2 { font-size: 22px; } }
.sort { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sort ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sort strong, .sort li a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--surface); cursor: pointer; }
.sort strong { background: var(--text); color: var(--bg); font-weight: 600; cursor: default; }
.sort li a:hover { background: var(--surface2); }
.headline .button, a.button { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; cursor: pointer; }
a.button.done { opacity: .5; pointer-events: none; }
.headline .button-info { font-weight: 700; color: var(--muted); }
.info-message { padding: 14px 16px; border-radius: 14px; background: var(--surface); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.block-profile .profile-list .margin-fix { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; padding: 16px; border-radius: 16px; background: var(--surface); }
.block-profile .column { display: flex; flex-direction: column; gap: 8px; }
.block-profile .item { color: var(--muted); font-size: 14px; }
.block-profile em { font-style: normal; font-weight: 600; color: var(--text); }
.block-profile a { color: var(--accent-text); font-weight: 600; }
.block-profile .about-me { grid-column: 1 / -1; }
/* Stock KVS lists: members, channels, playlists, tags */
.list-members .margin-fix, .list-channels .margin-fix, .list-playlists .margin-fix, .list-albums .margin-fix { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; }
.list-channels .margin-fix, .list-playlists .margin-fix, .list-albums .margin-fix { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.margin-fix > form[data-controls] { display: contents; }
.margin-fix > form > .generic-error, .margin-fix > form > .bottom, .margin-fix > .empty-content, .margin-fix > form > .empty-content { grid-column: 1 / -1; margin: 0; }
.margin-fix > form > .bottom { display: flex; flex-wrap: wrap; gap: 8px; }
.margin-fix > form > .bottom .right { margin-left: auto; }
.list-members .item, .list-channels .item, .list-playlists .item, .list-albums .item { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.list-members .item > a, .list-channels .item > a, .list-playlists .item > a, .list-albums .item > a { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.box .item .img { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--surface2); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.box .item .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.list-playlists .item .img img:not(.video1) { display: none; }
.list-members .item .img { aspect-ratio: 1; width: 100%; max-width: 112px; margin: 0 auto; border-radius: 999px; }
.list-members .item { text-align: center; }
.list-members .item .wrap { justify-content: center; }
.box .item .title { font-size: 15px; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; }
.box .item:hover .title { color: var(--accent-text); }
.box .item .wrap { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 13px; }
.box .item .wrap em { font-style: normal; }
.box .item .line-private, .box .item .line-disabled, .box .item .unread-notification { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.75); color: #fff; font-size: 11px; font-weight: 700; }
.box .item.unread .title { color: var(--accent-text); }
.list-tags .margin-fix { columns: 5 160px; column-gap: 24px; }
.list-tags ul.item { list-style: none; margin: 0 0 14px; padding: 0; break-inside: avoid; display: flex; flex-direction: column; gap: 6px; }
.list-tags .title { display: block; font-size: 18px; font-weight: 800; padding-top: 6px; color: var(--accent-text); }
.list-tags a:hover { color: var(--accent-text); }.profile-head { position: relative; z-index: 1; }

/* Upload / edit video form (stock KVS markup) */
.main-block:has(.form-upload) { max-width: 968px; }
.form-upload { position: relative; display: flex; flex-direction: column; gap: 18px; }
.form-upload br { display: none; }
.form-upload .two-sections { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.form-upload .section-one { flex: 999 1 420px; min-width: 0; }
.form-upload .section-two { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--surface); color: var(--muted); font-size: 14px; }
.section-title { display: block; margin-bottom: 12px; font-size: 16px; font-weight: 800; color: var(--text); }
.section-title.expand { cursor: pointer; }
.file-control { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 22px 18px; border: 2px dashed var(--border); border-radius: 20px; background: var(--surface); }
.file-control:hover { border-color: var(--accent); }
.file-control .textfield { order: 2; flex: 1 1 200px; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.file-control .button { order: 1; display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700; }
.file-control .button.disabled { opacity: .5; }
.file-control .file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-control .file[disabled] { cursor: default; }
.file-control .field-error { order: 3; flex-basis: 100%; }
.button-group { display: flex; flex-direction: column; gap: 8px; }
.button-group .row { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; }
.button-group .row label { margin-right: 14px; }
.form-upload .preview { position: relative; display: flex; flex-direction: column; gap: 6px; }
.form-upload .preview img { width: 100%; height: auto; border-radius: 12px; background: var(--surface2); }
.form-upload .preview em { font-style: normal; font-size: 13px; }
.form-upload > .bottom { padding-top: 16px; border-top: 1px solid var(--border); justify-content: flex-end; }
.form-upload > .bottom .submit { height: 48px; padding: 0 26px; font-weight: 800; }
form .progressbar { position: absolute; z-index: 990; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 80%); height: 44px; padding: 6px; border-radius: 999px; border: 2px solid var(--accent); background: var(--bg); overflow: hidden; }
form .progressbar .progress { width: 0; height: 100%; border-radius: 999px; background: var(--accent); }
form .progressbar .text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--text); }
form .list-selector { position: relative; }
form .list-selector .textfield { cursor: pointer; }
form .list-selector-popup { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50; height: 220px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
form .list-selector-popup .button-group { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; align-content: start; }
form .list-selector-popup .group-title { grid-column: 1 / -1; font-weight: 800; }
form .list-selector-popup .item { display: flex; align-items: center; gap: 8px; font-size: 14px; }
form .list-selector-popup .item label { cursor: pointer; }
form .list-selector-popup .filter input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); outline: none; }
.list-videos-screenshots .margin-fix { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.list-videos-screenshots .item { display: flex; flex-direction: column; gap: 6px; }
.list-videos-screenshots .img { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface2); }
.list-videos-screenshots .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.toggle-button input[type="radio"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }.form-upload.hidden { display: none; }

/* Static text pages */
.headline + .empty-content { text-align: left; color: var(--text); padding: 20px; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.55; }
.headline + .empty-content h2 { font-size: 17px; font-weight: 800; margin-top: 8px; }
.headline + .empty-content a { color: var(--accent-text); font-weight: 600; }
.main-block > .headline { margin-bottom: -16px; }

/* Channel info (stock markup) */
.block-channel { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px; border-radius: 16px; background: var(--surface); font-size: 14px; }
.block-channel .img { position: relative; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.block-channel .img img { width: 160px; height: auto; border-radius: 12px; }
.block-channel .channel-user, .block-channel .channel-rating a { color: var(--accent-text); font-weight: 600; }
.block-channel .channel-rating { display: flex; flex-direction: column; gap: 4px; }
.block-channel .channel-rating strong { font-size: 22px; font-weight: 800; }
.block-channel .channel-rating a.disabled { color: var(--muted); pointer-events: none; }
.block-channel .channel-info { flex: 1 1 280px; color: var(--muted); }

/* Playlist page (stock markup) */
.playlist .video-holder { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 24px; align-items: start; }
@media (min-width: 1000px) {
  .playlist .video-holder { grid-template-columns: minmax(0, 1fr) 380px; }
  .playlist .video-holder > .player { grid-column: 1; grid-row: 1; }
  .playlist .video-holder > .sidebar-related-videos { grid-column: 2; grid-row: 1 / span 2; }
  .playlist .video-holder > .playlist-info { grid-column: 1; }
}
.playlist .player { display: block; aspect-ratio: auto; }
.playlist .player-holder:empty { aspect-ratio: 16 / 9; }
.playlist .player > .video-info { display: none; }
.playlist .list-videos .margin-fix { display: flex; flex-direction: column; gap: 12px; }
.playlist .list-videos a.item { display: flex; gap: 10px; }
.playlist .list-videos .item .img { width: 160px; flex-shrink: 0; border-radius: 10px; }
.playlist .list-videos .item .title { font-size: 14px; }
.playlist [class^="ico-fav-"] { display: none; }
.playlist-info { display: flex; flex-direction: column; gap: 14px; }
.playlist-info .info-holder { display: flex; flex-direction: column; gap: 12px; }
.playlist-info .info-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.playlist-info .rating-container a, .tabs-menu .toggle-button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; }
.playlist-info .rating-container svg path { stroke: currentColor; }
.playlist-info .rating-container .rate-like svg path { fill: currentColor; }
.tabs-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tabs-menu .toggle-button.active { background: var(--text); color: var(--bg); }
.tab-content { padding: 16px; border-radius: 16px; background: var(--surface); }
.block-user { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 12px; }
.block-user .username { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.block-user .prolink { font-weight: 700; }
.block-user .viewss { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 4px; }
.block-user .avatar { width: 42px; height: 42px; font-size: 0; }
.about-author { font-size: 14px; color: var(--muted); }
.about-author a { color: var(--accent-text); font-weight: 600; }
/* Upload states set by main.min.js */
.form-upload.uploading { min-height: 80px; cursor: wait; }
.form-upload.uploading > *:not(.progressbar) { opacity: 0; visibility: hidden; }
.form-upload.uploading .progressbar, .form-upload.uploading .progressbar * { opacity: 1; visibility: visible; }
.form-upload.uploading-finished { cursor: default; }
.btn.done, a.button.done { opacity: .6; pointer-events: none; }
#comments { scroll-margin-top: 80px; }
.fancybox-inner { height: auto !important; }
.main-container > .section, .main-container > p.text { width: 100%; max-width: 1392px; margin: 0 auto; padding: 0 16px 24px; }
@media (min-width: 720px) { .main-container > .section, .main-container > p.text { padding: 0 24px 32px; } }
/* Pages whose blocks sit right in .main-container */
.main-container > :is(div[id], .headline, .box) { width: 100%; max-width: 1392px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
.main-container > .headline, .main-container > div[id]:first-child { margin-top: 20px; }
.main-container > .box, .main-container > div[id] { margin-bottom: 28px; }
@media (min-width: 720px) { .main-container > :is(div[id], .headline, .box) { padding-left: 24px; padding-right: 24px; } .main-container > .headline, .main-container > div[id]:first-child { margin-top: 28px; } }
.main-container > div[id] { display: flex; flex-direction: column; gap: 20px; }

/* Stock comment form (playlist, album) */
.block-comments form:has(> .toggle-button) .block-new-comment { display: none; }
.block-comments > form:not(.composer) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.block-comments > form:not(.composer) > .block-new-comment, .block-comments > form:not(.composer) > .success { flex-basis: 100%; }
.block-comments .hint { color: var(--muted); font-size: 14px; }
.smileys-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; background: var(--surface2); border-radius: 12px 12px 0 0; font-size: 0; }
.smileys-bar img { width: 20px; height: 20px; cursor: pointer; }
.smileys-support textarea { border-top-left-radius: 0; border-top-right-radius: 0; }.profile-head { align-items: flex-start; }
.profile-id { padding-top: 44px; }
@media (min-width: 720px) { .profile-id { padding-top: 60px; } .profile-actions { padding-top: 64px; } }
@media (max-width: 719px) { .profile-id { flex: 1 1 0; } }

/* Up next like the design: thumbnail on top, text below */
.card.next { flex-direction: column; gap: 8px; }
.next .thumb { width: 160px; }
.next-head .check { min-height: 0; }

/* Selects: own arrow away from the edge, grouped date selects */
select.selectbox, select.input, .fancybox-inner select { -webkit-appearance: none; appearance: none; padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a94' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; cursor: pointer; }
.row.date fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.row.date fieldset .selectbox { flex: 1 1 110px; width: auto; }
form .row + .row { margin-top: 0; }
form .row fieldset { min-width: 0; }
/* Playlist page in the watch layout */
.playlist .watch .player-holder:empty { aspect-ratio: 16 / 9; }
.playlist-items .item { border-radius: 12px; padding: 6px; margin: -6px; }
.playlist-items .item.selected { background: var(--surface); }
.playlist-items .item.selected h3 { color: var(--accent-text); }
.playlist-items .now-playing { display: none; position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; }
.playlist-items .item.selected .now-playing { display: inline-block; }
.next-head .meta { white-space: nowrap; }
.next-head h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }.block-comments > form:not(.composer) > .field-label { font-size: 18px; font-weight: 800; }
.block-comments > form:not(.composer) > .toggle-button { order: 3; }

/* Watch / playlist side column when it wraps under the main column */
@media (max-width: 999px) {
  .watch-side { max-width: none; flex-basis: 100%; }
  .playlist .watch-main { display: contents; }
  .playlist .watch-main > * { flex: 1 1 100%; min-width: 0; }
  .playlist .watch-side { order: 5; }
  .playlist .watch #comments { order: 10; }
}
@media (min-width: 520px) and (max-width: 999px) {
  .watch-side .next-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .watch-side .next .thumb { width: 100%; }
}
/* leaderboard + partners */
.lb-controls .seg a { height: 38px; padding: 0 16px; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.lb-controls .seg a svg { width: 16px; height: 16px; }
.lb-controls .seg a[aria-pressed="true"] { background: var(--text); color: var(--bg); font-weight: 600; }
.lb-controls .chip { text-decoration: none; }
.podium .card { display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; }
.podium .thumb img, .lb-row .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-row .thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; display: block; }
.lb-row h3 a { color: inherit; text-decoration: none; }
.lb-row .meta { font-size: 12px; color: var(--muted); }
.lb-row .avatar img, .podium .by .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.lb-row .avatar { overflow: hidden; }
.lb-side .empty-content, .lb-main .empty-content { padding: 16px; border: 1px solid var(--border); border-radius: 16px; color: var(--muted); }
.partner-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent-text); font-size: 11px; font-weight: 700; vertical-align: middle; }
.partner-spot { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.partner-spot img { max-width: 100%; border-radius: 10px; }
.partner-line { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.partner-line a { color: inherit; font-weight: 600; }
.apply form > div { display: flex; flex-direction: column; gap: 4px; }
.apply form .field-error { color: #fca5a5; }
.apply .generic-error.hidden, .apply .generic-error:empty { display: none; }
.apply .captcha-control .image { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.apply .captcha-control img { border-radius: 8px; }
.apply .captcha-control .input { flex: 1 1 140px; }
.apply .fine a { color: inherit; }.lb-row[hidden] { display: none; }

.apply select.input:has(option[value=""]:checked) { color: #8a8a94; }
.apply select.input option { color: var(--text); background: var(--bg); }
:root[data-theme="dark"] .apply form .field-error, :root[data-theme="dark"] .apply .generic-error { color: #b91c1c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .apply form .field-error, :root:not([data-theme="light"]) .apply .generic-error { color: #b91c1c; } }
