:root {
  --bg: #0b0e0f;
  --bg-2: #121617;
  --bg-3: #191e20;
  --line: #242b2e;
  --text: #eef2f3;
  --muted: #8d989c;
  --accent: #53fc18;
  --accent-ink: #0b0e0f;
  --danger: #ff5a5f;
  --live: #ff3b3b;
  --radius: 12px;
  --radius-sm: 8px;
  --nav-h: 64px;
  --top-h: 60px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1 { font-size: 1.5rem; margin: 0; line-height: 1.2; }
h2, h3 { margin: 0; }
p { margin: 0; }

.icon { display: inline-flex; width: 20px; height: 20px; flex: none; }
.icon svg { width: 100%; height: 100%; }
.icon-inline { width: 14px; height: 14px; vertical-align: -2px; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  height: calc(var(--top-h) + var(--safe-top));
  padding: var(--safe-top) calc(16px + var(--safe-right)) 0 calc(16px + var(--safe-left));
  background: rgba(11, 14, 15, 0.88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; flex: none; }
.brand b { color: var(--accent); }
.search { flex: 1; max-width: 560px; margin-left: auto; display: flex; background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; padding: 9px 14px; outline: none; font-size: 16px; }
.search input::-webkit-search-cancel-button { display: none; }
.search button { background: transparent; border: 0; padding: 0 14px; color: var(--muted); cursor: pointer; }

.nav {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: rgba(11, 14, 15, 0.94);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-top: 1px solid var(--line);
}
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; }
.nav a svg { width: 24px; height: 24px; }
.nav a.active { color: var(--accent); }

main {
  outline: none;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px calc(16px + var(--safe-right)) calc(var(--nav-h) + var(--safe-bottom) + 28px) calc(16px + var(--safe-left));
}

@media (min-width: 900px) {
  .nav {
    top: calc(var(--top-h) + var(--safe-top)); right: auto; bottom: 0;
    width: 88px; height: auto; flex-direction: column; justify-content: flex-start;
    padding: 12px 0; border-top: 0; border-right: 1px solid var(--line);
  }
  .nav a { flex: none; height: 72px; }
  main { padding-left: calc(88px + 28px); padding-right: 28px; padding-bottom: 40px; }
}

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section { margin: 8px 0 28px; }
.section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.title-live { display: inline-flex; align-items: center; gap: 8px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255, 59, 59, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0); } }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; margin-bottom: 12px; }
.grow { flex: 1; min-width: 0; }
.center { display: flex; justify-content: center; margin: 20px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: #20272a; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: #6bff38; }
.btn-ghost { background: transparent; }
.btn-active { border-color: var(--accent); color: var(--accent); }
.btn-danger { color: var(--danger); }
.btn-sm { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line); cursor: pointer; color: var(--text); flex: none; }
.icon-btn:hover { background: #20272a; }

.input, .select {
  min-height: 42px; padding: 9px 12px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius-sm);
  outline: none; font-size: 16px; min-width: 0;
}
.input:focus, .select:focus { border-color: var(--accent); }
.select-sm { min-height: 34px; padding: 4px 8px; font-size: 14px; }
.input-time { width: 110px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.mini-label { flex-direction: row; align-items: center; gap: 8px; }

.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.panel h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

.hero { background: linear-gradient(135deg, rgba(83, 252, 24, .12), rgba(83, 252, 24, 0) 60%), var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 28px 22px; margin-bottom: 28px; display: grid; gap: 12px; }
.hero h2 { font-size: 1.4rem; line-height: 1.25; }
.hero p { color: var(--muted); max-width: 640px; }
.add-form { display: flex; gap: 10px; max-width: 560px; }
.add-form .input { flex: 1; }

.grid { display: grid; gap: 18px 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; gap: 20px; } }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 300px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: thin; }
.scroller > * { scroll-snap-align: start; }
@media (max-width: 560px) { .scroller { grid-auto-columns: 78%; } }

.card { position: relative; min-width: 0; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--bg-3); }
.thumb-img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.thumb:hover .thumb-img { transform: scale(1.03); }
.thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.thumb-empty .icon { width: 36px; height: 36px; }
.badge { position: absolute; padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 700; background: rgba(0, 0, 0, .78); display: inline-flex; align-items: center; gap: 4px; }
.badge .icon { width: 13px; height: 13px; }
.badge-dur { right: 8px; bottom: 8px; }
.badge-live { left: 8px; top: 8px; background: var(--live); color: #fff; letter-spacing: .04em; }
.badge-watched { left: 8px; top: 8px; background: rgba(0, 0, 0, .78); color: var(--accent); }
.thumb-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .25); }
.thumb-progress span { display: block; height: 100%; background: var(--accent); }
.card-body { display: flex; gap: 10px; padding-top: 10px; align-items: flex-start; }
.card-text { flex: 1; min-width: 0; }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; line-height: 1.3; word-break: break-word; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 13px; }
.card-meta a:hover { color: var(--text); }
.card-cat { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--muted); background: var(--bg-3); border-radius: 6px; padding: 1px 7px; }
.card-remove { width: 32px; height: 32px; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }

.avatar { border-radius: 50%; object-fit: cover; background: var(--bg-3); flex: none; }
.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-lg { width: 88px; height: 88px; border: 4px solid var(--bg); }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); }
.avatar-sm.avatar-fallback { font-size: 14px; }
.avatar-lg.avatar-fallback { font-size: 34px; }

.channel-head { margin-bottom: 24px; }
.channel-banner { position: relative; z-index: 0; width: 100%; height: clamp(90px, 16.6vw, 260px); border-radius: var(--radius); background: var(--bg-3) center / cover no-repeat; overflow: hidden; }
.channel-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(11, 14, 15, .55)); pointer-events: none; }
.channel-info { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 0 8px; }
.channel-head.has-banner .channel-info { margin-top: 12px; }
.channel-head.has-banner .channel-info > .avatar-lg { margin-top: -56px; align-self: flex-start; box-shadow: 0 6px 20px rgba(0, 0, 0, .45); }
.channel-info > .row { margin-left: auto; }
@media (max-width: 560px) {
  .channel-head.has-banner .channel-info > .avatar-lg { margin-top: -44px; width: 76px; height: 76px; }
  .channel-info > .row { margin-left: 0; width: 100%; }
}
.channel-text { flex: 1; min-width: 200px; display: grid; gap: 4px; }
.channel-text h1 { display: flex; align-items: center; gap: 8px; }
.verified { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); padding: 3px; }
.verified .icon { width: 100%; height: 100%; }
.bio { color: var(--muted); max-width: 720px; white-space: pre-line; font-size: 14px; }
.pill-live { display: inline-block; margin-left: 8px; background: var(--live); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; vertical-align: middle; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .section-title { margin: 0; }
.toolbar input[type=search] { width: 220px; }

.watch { max-width: 1280px; margin: 0 auto; }
.stage { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; }
.stage .empty, .stage .error-box { background: var(--bg-2); width: 100%; height: 100%; margin: 0; display: flex; flex-direction: column; justify-content: center; }
.video { width: 100%; height: 100%; background: #000; display: block; }
@media (max-width: 700px) {
  .watch { margin: -20px calc(-16px - var(--safe-right)) 0 calc(-16px - var(--safe-left)); }
  .stage { border-radius: 0; }
  .watch-info { padding: 0 calc(16px + var(--safe-right)) 0 calc(16px + var(--safe-left)); }
}
.stage-loading { display: flex; align-items: center; justify-content: center; min-height: 200px; width: 100%; }
.player-error { position: absolute; inset: 0; background: rgba(0, 0, 0, .85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; z-index: 2; }
.watch-info { display: grid; gap: 12px; padding-top: 14px; }
.player-controls { display: flex; gap: 16px; flex-wrap: wrap; }
.watch-title { font-size: 1.3rem; word-break: break-word; }
.watch-channel { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.watch-meta { font-size: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.download-panel { margin-top: 4px; }
.range-box { display: flex; gap: 16px; flex-wrap: wrap; }
.range-box label { flex-direction: row; align-items: center; color: var(--text); }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 600; }
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.follow-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.follow-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty h3 { color: var(--text); font-size: 1.1rem; }
.error-box { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 28px 16px; margin-bottom: 16px; border: 1px solid rgba(255, 90, 95, .35); background: rgba(255, 90, 95, .07); border-radius: var(--radius); }

.skeleton .thumb, .sk-line { background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.sk-line { height: 14px; border-radius: 6px; margin-top: 12px; width: 85%; }
.sk-line.short { width: 50%; margin-top: 8px; }
.sk-line.wide { width: 40%; height: 28px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.spinner-inline { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px;
  max-width: min(92vw, 520px); padding: 12px 16px;
  background: #f3f6f7; color: #0b0e0f; border-radius: 12px; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-action { background: transparent; border: 0; color: #1a7f00; font-weight: 800; cursor: pointer; padding: 4px; white-space: nowrap; }
@media (min-width: 900px) { #toast { bottom: 24px; } }

.install-banner {
  position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.install-banner img { border-radius: 10px; }
.noscript { padding: 40px; text-align: center; }

@media (max-width: 560px) {
  .brand span { display: none; }
  h1 { font-size: 1.3rem; }
  .toolbar input[type=search] { width: 100%; }
  .toolbar .row { width: 100%; }
  .toolbar .row .input { flex: 1; }
  .add-form { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.kp {
  --kp-accent: var(--accent);
  position: relative; width: 100%; height: 100%;
  background: #000; overflow: hidden; outline: none;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
  opacity: 0; transition: opacity .35s ease;
  font-variant-numeric: tabular-nums;
}
.kp.kp-in { opacity: 1; }
.kp .video { position: absolute; inset: 0; object-fit: contain; }
.kp:not(.kp-native) { cursor: pointer; }
.kp.kp-idle { cursor: none; }
.kp-ico { display: inline-flex; width: 24px; height: 24px; flex: none; pointer-events: none; }
.kp-ico svg { width: 100%; height: 100%; }

.kp-top, .kp-bottom { position: absolute; left: 0; right: 0; z-index: 3; transition: opacity .3s ease, transform .3s cubic-bezier(.2, .8, .2, 1); }
.kp-top { top: 0; padding: 14px 18px 40px; background: linear-gradient(rgba(0, 0, 0, .7), transparent); pointer-events: none; opacity: 0; transform: translateY(-8px); }
.kp-fs .kp-top, .theater .kp-top { opacity: 1; transform: none; }
.kp-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.kp-bottom { bottom: 0; padding: 40px 12px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .45) 40%, rgba(0, 0, 0, .82)); cursor: default; }
.kp.kp-idle .kp-bottom, .kp.kp-idle .kp-top { opacity: 0; transform: translateY(10px); pointer-events: none; }
.kp.kp-idle .kp-top { transform: translateY(-10px); }
.kp.kp-fresh .kp-bottom { opacity: 0; pointer-events: none; }

.kp-progress { position: relative; height: 18px; margin: 0 6px; display: flex; align-items: center; cursor: pointer; touch-action: none; outline: none; }
.kp-track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); overflow: hidden; transition: height .18s ease; }
.kp-progress:hover .kp-track, .kp-scrubbing .kp-track, .kp-progress:focus-visible .kp-track { height: 7px; }
.kp-buffered, .kp-hoverbar, .kp-played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; }
.kp-buffered { background: rgba(255, 255, 255, .35); transition: width .4s ease; }
.kp-hoverbar { background: rgba(255, 255, 255, .25); opacity: 0; transition: opacity .15s; }
.kp-progress:hover .kp-hoverbar { opacity: 1; }
.kp-played { background: var(--kp-accent); box-shadow: 0 0 12px rgba(83, 252, 24, .55); }
.kp-knob { position: absolute; top: 50%; left: 0; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%; background: var(--kp-accent); box-shadow: 0 0 0 4px rgba(83, 252, 24, .25), 0 2px 6px rgba(0, 0, 0, .5); transform: scale(0); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.kp-progress:hover .kp-knob, .kp-scrubbing .kp-knob, .kp-progress:focus-visible .kp-knob { transform: scale(1); }
.kp-scrubbing .kp-knob { transform: scale(1.25); }
.kp-timetip { position: absolute; bottom: 24px; left: 0; transform: translateX(-50%) translateY(4px); padding: 4px 9px; border-radius: 7px; background: rgba(15, 18, 19, .92); border: 1px solid rgba(255, 255, 255, .12); font-size: 13px; font-weight: 700; white-space: nowrap; opacity: 0; transition: opacity .15s, transform .15s; pointer-events: none; }
.kp-progress:hover .kp-timetip, .kp-scrubbing .kp-timetip { opacity: 1; transform: translateX(-50%); }

.kp-bar { display: flex; align-items: center; gap: 2px; height: 48px; }
.kp-spacer { flex: 1; }
.kp-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: background .15s, transform .12s; flex: none; }
.kp-btn:hover { background: rgba(255, 255, 255, .12); }
.kp-btn:active { transform: scale(.88); }
.kp-btn:focus-visible { outline: 2px solid var(--kp-accent); outline-offset: -2px; }
.kp-btn .kp-ico { transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.kp-play .kp-ico { width: 28px; height: 28px; }
.kp-gear .kp-ico { transition: transform .4s cubic-bezier(.3, 1.2, .5, 1); }
.kp-gear.kp-rot .kp-ico { transform: rotate(60deg); }
.kp-qbadge { position: absolute; top: 7px; right: 3px; padding: 0 3px; border-radius: 3px; background: var(--kp-accent); color: #000; font-size: 8.5px; font-weight: 900; line-height: 12px; pointer-events: none; }
@media (hover: hover) {
  .kp-btn[data-tip]::after {
    content: attr(data-tip); position: absolute; bottom: 52px; left: 50%;
    transform: translate(-50%, 6px); padding: 5px 9px; border-radius: 7px;
    background: rgba(15, 18, 19, .94); border: 1px solid rgba(255, 255, 255, .1);
    font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none;
    transition: opacity .15s, transform .15s;
  }
  .kp-btn[data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); transition-delay: .35s; }
  .kp-bar > .kp-btn:last-child[data-tip]::after { left: auto; right: 0; transform: translateY(6px); }
  .kp-bar > .kp-btn:last-child[data-tip]:hover::after { transform: none; }
  .kp-bar > .kp-btn:first-child[data-tip]::after { left: 0; transform: translateY(6px); }
  .kp-bar > .kp-btn:first-child[data-tip]:hover::after { transform: none; }
  .kp-menu-open .kp-btn::after { display: none; }
}

.kp-volwrap { display: flex; align-items: center; }
.kp-vol {
  --fill: 100%;
  -webkit-appearance: none; appearance: none; width: 0; height: 4px; margin: 0; padding: 0;
  border-radius: 4px; background: linear-gradient(90deg, #fff var(--fill), rgba(255, 255, 255, .3) var(--fill));
  opacity: 0; cursor: pointer; outline: none;
  transition: width .25s cubic-bezier(.2, .8, .2, 1), opacity .2s, margin .25s;
}
.kp-volwrap:hover .kp-vol, .kp-vol:focus-visible, .kp-vol:active { width: 76px; opacity: 1; margin: 0 10px 0 4px; }
.kp-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.kp-vol::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }
@media (hover: none) { .kp-vol { display: none; } }

.kp-time { margin-left: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; color: #fff; }
.kp-sep, .kp-dur { color: rgba(255, 255, 255, .7); }
.kp-livebtn { display: inline-flex; align-items: center; gap: 7px; margin-left: 8px; padding: 5px 10px; border: 0; border-radius: 6px; background: transparent; color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .05em; cursor: pointer; transition: background .15s; }
.kp-livebtn:hover { background: rgba(255, 255, 255, .12); }
.kp-livedot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 59, 59, .7); animation: pulse 1.8s infinite; }
.kp-livebtn.kp-behind .kp-livedot { background: #8d989c; animation: none; }

.kp-bigplay {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px;
  display: flex; align-items: center; justify-content: center; padding: 0 0 0 5px;
  border: 0; border-radius: 50%; background: var(--kp-accent); color: #0b0e0f; cursor: pointer;
  box-shadow: 0 10px 40px rgba(83, 252, 24, .35), 0 0 0 0 rgba(83, 252, 24, .45);
  opacity: 0; transform: scale(.6); pointer-events: none;
  transition: opacity .3s, transform .35s cubic-bezier(.3, 1.5, .5, 1);
}
.kp-bigplay .kp-ico { width: 38px; height: 38px; }
.kp.kp-fresh:not(.kp-loading) .kp-bigplay, .kp.kp-ended .kp-bigplay { opacity: 1; transform: scale(1); pointer-events: auto; animation: kp-breathe 2.4s ease-in-out infinite; }
.kp-bigplay:hover { transform: scale(1.08) !important; }
@keyframes kp-breathe { 50% { box-shadow: 0 10px 40px rgba(83, 252, 24, .35), 0 0 0 14px rgba(83, 252, 24, 0); } }

.kp-flash { position: absolute; z-index: 2; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; opacity: 0; pointer-events: none; }
.kp-flash .kp-ico { width: 34px; height: 34px; }
.kp-flash-text { font-weight: 800; font-size: 18px; }
.kp-flash.kp-flash-on { animation: kp-flash .6s ease-out forwards; }
@keyframes kp-flash { 0% { opacity: .95; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.5); } }

.kp-seekhint { position: absolute; z-index: 2; top: 0; bottom: 0; width: 38%; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; }
.kp-left { left: 0; border-radius: 0 50% 50% 0 / 0 60% 60% 0; background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, .16), transparent 70%); }
.kp-right { right: 0; border-radius: 50% 0 0 50% / 60% 0 0 60%; background: radial-gradient(circle at 70% 50%, rgba(255, 255, 255, .16), transparent 70%); }
.kp-seekhint-text { padding: 8px 14px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-weight: 800; font-size: 15px; }
.kp-seekhint.kp-seekhint-on { animation: kp-hint .75s ease-out forwards; }
.kp-seekhint.kp-seekhint-on .kp-seekhint-text { animation: kp-hint-text .75s cubic-bezier(.3, 1.4, .5, 1) forwards; }
@keyframes kp-hint { 0% { opacity: 0; } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes kp-hint-text { 0% { transform: scale(.7); } 30% { transform: scale(1.05); } 100% { transform: scale(1); } }

.kp-spinner { position: absolute; z-index: 1; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.kp-spinner span { display: block; width: 100%; height: 100%; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .15); border-top-color: var(--kp-accent); animation: spin .8s linear infinite; }
.kp.kp-loading .kp-spinner { opacity: 1; transition-delay: .25s; }

.kp-menu {
  position: absolute; z-index: 4; right: 12px; bottom: 62px; width: 260px; max-height: calc(100% - 80px);
  overflow: hidden; border-radius: 14px; background: rgba(18, 22, 23, .94);
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 16px 48px rgba(0, 0, 0, .55);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  opacity: 0; transform: translateY(10px) scale(.96); transform-origin: bottom right; pointer-events: none;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2, .9, .3, 1.2);
  cursor: default; display: flex;
}
.kp-menu-open .kp-menu { opacity: 1; transform: none; pointer-events: auto; }
.kp-menu-page { flex: 0 0 100%; padding: 6px; overflow-y: auto; transition: transform .25s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.kp-menu-sub { transform: translateX(30%); opacity: 0; }
.kp-menu-subopen .kp-menu-main { transform: translateX(-100%); opacity: 0; }
.kp-menu-subopen .kp-menu-sub { transform: translateX(-100%); opacity: 1; }
.kp-mi, .kp-opt, .kp-mi-back { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-radius: 9px; background: transparent; color: #fff; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; transition: background .12s; }
.kp-mi:hover, .kp-opt:hover, .kp-mi-back:hover { background: rgba(255, 255, 255, .08); }
.kp-mi-label { flex: 1; }
.kp-mi-value { color: rgba(255, 255, 255, .65); font-weight: 500; }
.kp-mi .kp-ico, .kp-mi-back .kp-ico { width: 18px; height: 18px; color: rgba(255, 255, 255, .6); }
.kp-mi-back { border-bottom: 1px solid rgba(255, 255, 255, .08); border-radius: 9px 9px 0 0; margin-bottom: 4px; }
.kp-mi-empty { color: rgba(255, 255, 255, .5); cursor: default; }
.kp-opt-check { display: inline-flex; width: 18px; height: 18px; color: var(--kp-accent); }
.kp-opt-check .kp-ico { width: 18px; height: 18px; }
.kp-opt-on { color: var(--kp-accent); }

.kp.kp-fs { border-radius: 0; }
.kp.kp-fs .kp-bar { height: 56px; }
.kp.kp-fs .kp-bottom { padding: 60px max(24px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.kp.kp-fs .kp-top { padding: max(18px, env(safe-area-inset-top)) 28px 50px; }
.kp.kp-fs .kp-title { font-size: 20px; }

@media (max-width: 560px) {
  .kp-bar { height: 42px; }
  .kp-btn { width: 40px; height: 40px; }
  .kp-ico { width: 22px; height: 22px; }
  .kp-time { font-size: 12.5px; margin-left: 4px; }
  .kp-bigplay { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
  .kp-bigplay .kp-ico { width: 30px; height: 30px; }
  .kp-menu { right: 8px; bottom: 54px; width: min(260px, calc(100% - 16px)); }
  .kp-theater { display: none; }
  .kp-bottom { padding: 30px 6px 2px; }
}

.watch { transition: max-width .35s cubic-bezier(.2, .8, .2, 1); }
.stage { transition: border-radius .3s, max-height .35s; }
.player-error { z-index: 6; animation: fade-in .25s ease; }
@media (min-width: 900px) {
  .watch.theater { max-width: none; }
  .watch.theater .stage { max-height: calc(100dvh - var(--top-h) - 120px); aspect-ratio: auto; height: min(56.25vw, calc(100dvh - var(--top-h) - 120px)); }
  .watch.theater .watch-info { max-width: 1280px; margin: 0 auto; width: 100%; }
}

@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(.9); } 75% { transform: scale(1.06); } 100% { transform: scale(1); } }

main.page-enter > * { animation: page-in .38s cubic-bezier(.2, .8, .2, 1) both; }
main.page-enter > *:nth-child(2) { animation-delay: .04s; }
main.page-enter > *:nth-child(3) { animation-delay: .08s; }
main.page-enter > *:nth-child(4) { animation-delay: .12s; }

.grid > .card:not(.skeleton), .scroller > .card { animation: card-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.grid > .card:nth-child(2), .scroller > .card:nth-child(2) { animation-delay: .03s; }
.grid > .card:nth-child(3), .scroller > .card:nth-child(3) { animation-delay: .06s; }
.grid > .card:nth-child(4), .scroller > .card:nth-child(4) { animation-delay: .09s; }
.grid > .card:nth-child(5), .scroller > .card:nth-child(5) { animation-delay: .12s; }
.grid > .card:nth-child(6), .scroller > .card:nth-child(6) { animation-delay: .15s; }
.grid > .card:nth-child(7) { animation-delay: .18s; }
.grid > .card:nth-child(8) { animation-delay: .21s; }
.grid > .card:nth-child(n+9) { animation-delay: .24s; }

.thumb { transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; }
.thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--accent); opacity: 0; transition: opacity .2s; pointer-events: none; }
@media (hover: hover) {
  .card:hover .thumb { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(83, 252, 24, .15); }
  .card:hover .thumb::after { opacity: 1; }
  .card:hover .card-title { color: #fff; }
}
.thumb-img { opacity: 0; transition: opacity .35s ease, transform .4s cubic-bezier(.2, .8, .2, 1); }
.thumb-img.loaded, .thumb-empty { opacity: 1; }
.thumb .play-overlay { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(83, 252, 24, .92); color: #0b0e0f; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.thumb .play-overlay .icon { width: 24px; height: 24px; margin-left: 3px; }
.thumb .play-overlay svg path { fill: currentColor; }
@media (hover: hover) { .card:hover .play-overlay { opacity: 1; transform: scale(1); } }
.thumb-progress span { transition: width .6s cubic-bezier(.2, .8, .2, 1); }

.btn, .icon-btn, .tab { transition: background .18s, border-color .18s, color .18s, transform .12s, box-shadow .2s; }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(83, 252, 24, .3); }
.icon-btn:active { transform: scale(.9); }
.btn.pop, .icon-btn.pop { animation: pop .4s cubic-bezier(.3, 1.4, .5, 1); }
.nav a { transition: color .2s; position: relative; }
.nav a svg { transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.nav a.active svg { transform: translateY(-2px) scale(1.08); }
.nav a::before { content: ""; position: absolute; top: 0; left: 50%; width: 28px; height: 3px; margin-left: -14px; border-radius: 0 0 3px 3px; background: var(--accent); transform: scaleX(0); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.nav a.active::before { transform: scaleX(1); }
@media (min-width: 900px) {
  .nav a::before { top: 50%; left: 0; width: 3px; height: 28px; margin: -14px 0 0; border-radius: 0 3px 3px 0; transform: scaleY(0); }
  .nav a.active::before { transform: scaleY(1); }
}
.panel, .hero, .follow-list li { transition: border-color .2s, background .2s; }
.follow-list li:hover { border-color: #33403f; }
.follow-list li { animation: card-in .35s cubic-bezier(.2, .8, .2, 1) both; }
.download-panel { animation: page-in .3s cubic-bezier(.2, .8, .2, 1); }
.range-box:not([hidden]) { animation: page-in .25s ease; }
.install-banner { animation: banner-in .5s cubic-bezier(.2, .9, .3, 1.2) .8s both; }
@keyframes banner-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
#toast { transition: opacity .22s, transform .35s cubic-bezier(.2, .9, .3, 1.3); }
.input, .select { transition: border-color .18s, box-shadow .18s; }
.input:focus, .select:focus { box-shadow: 0 0 0 3px rgba(83, 252, 24, .15); }
.search { transition: border-color .18s, box-shadow .18s; }
.search:focus-within { box-shadow: 0 0 0 3px rgba(83, 252, 24, .15); }
.topbar { transition: box-shadow .25s; }
.topbar.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.avatar { transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.card-avatar:hover .avatar, .watch-channel a:hover .avatar { transform: scale(1.08); }
.channel-banner { animation: banner-fade .5s ease; }
@keyframes banner-fade { from { opacity: 0; } }

.watch.watch-vod { max-width: 1280px; }
.watch-main { min-width: 0; }
@media (min-width: 1100px) {
  .watch.with-chat { max-width: 1680px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
  .watch.with-chat .watch-side { position: sticky; top: calc(var(--top-h) + var(--safe-top) + 16px); height: calc(100dvh - var(--top-h) - var(--safe-top) - 36px); max-height: 820px; }
  .watch.with-chat.theater .watch-side { max-height: none; }
}
@media (max-width: 1099px) {
  .watch-side { height: min(60vh, 520px); margin-top: 14px; }
  .watch.with-chat .watch-side { animation: page-in .3s cubic-bezier(.2, .8, .2, 1); }
}
@media (max-width: 700px) {
  .watch-side { margin: 14px calc(16px + var(--safe-right)) 0 calc(16px + var(--safe-left)); }
}

.chat { display: flex; flex-direction: column; height: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.chat-delay { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.chat-delay-btn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-3); color: var(--text); cursor: pointer; font-weight: 700; line-height: 1; transition: background .15s, transform .1s; }
.chat-delay-btn:hover { background: #20272a; }
.chat-delay-btn:active { transform: scale(.88); }
.chat-delay-val { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.chat-body { position: relative; flex: 1; min-height: 0; }
.chat-list { position: absolute; inset: 0; overflow-y: auto; padding: 8px 10px; overscroll-behavior: contain; scrollbar-width: thin; }
.chat-msg { padding: 3px 4px; border-radius: 6px; font-size: 13.5px; line-height: 1.5; word-wrap: break-word; overflow-wrap: anywhere; animation: chat-in .25s ease-out both; }
.chat-msg:hover { background: rgba(255, 255, 255, .04); }
@keyframes chat-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chat-user { font-weight: 700; color: var(--accent); }
.chat-colon { color: var(--muted); }
.chat-text { color: var(--text); }
.chat-badge { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-right: 4px; border-radius: 4px; font-size: 10px; font-weight: 900; vertical-align: -2px; background: #3a4447; color: #fff; }
.chat-badge-broadcaster { background: #ff3b3b; }
.chat-badge-moderator { background: #00b85c; }
.chat-badge-vip { background: #e91fce; }
.chat-badge-og { background: #2a8bff; }
.chat-badge-subscriber { background: #8b5cf6; }
.chat-badge-founder { background: #f5a623; color: #000; }
.chat-badge-verified { background: var(--accent); color: #000; }
.emote { display: inline-block; height: 28px; width: auto; max-width: 84px; vertical-align: middle; margin: -4px 1px; }
.chat-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: var(--muted); font-size: 14px; pointer-events: none; }
.chat-jump { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 6px 14px; border: 0; border-radius: 999px; background: var(--accent); color: #0b0e0f; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); animation: page-in .25s ease; }

.kp-range { position: absolute; top: 0; bottom: 0; background: rgba(255, 196, 0, .55); border-radius: inherit; }
.kp-timetip { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.kp-timetip.kp-hasimg { padding: 4px; }
.kp-tipimg { width: 176px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; background: #000; display: block; }
@media (max-width: 560px) { .kp-tipimg { width: 128px; } }

.range-end { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-in .3s ease; }
.range-end-box { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 20px; animation: page-in .35s cubic-bezier(.2, .8, .2, 1); }
.range-end-icon { width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 196, 0, .18); color: #ffc400; display: flex; align-items: center; justify-content: center; }
.range-end-icon .icon { width: 26px; height: 26px; }
.range-chip { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 4px 6px 4px 12px; border-radius: 999px; background: rgba(255, 196, 0, .12); border: 1px solid rgba(255, 196, 0, .35); color: #ffd54d; font-weight: 600; font-size: 14px; animation: page-in .3s ease; }
.range-chip .icon { width: 16px; height: 16px; }
.share-panel { animation: page-in .3s cubic-bezier(.2, .8, .2, 1); }
.share-url { width: 100%; font-size: 14px; color: var(--muted); }

.badge-clip { left: 8px; top: 8px; background: #8b5cf6; color: #fff; letter-spacing: .04em; }
.badge-resume { left: 8px; bottom: 12px; background: var(--accent); color: #0b0e0f; }
.badge-resume .icon svg path { fill: currentColor; }
.tab .icon { width: 18px; height: 18px; }
.tabs { flex-wrap: wrap; }

.stats { display: grid; gap: 18px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat-tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; animation: card-in .4s cubic-bezier(.2, .8, .2, 1) both; }
.stat-tile:nth-child(2) { animation-delay: .04s; }
.stat-tile:nth-child(3) { animation-delay: .08s; }
.stat-tile:nth-child(4) { animation-delay: .12s; }
.stat-tile:nth-child(5) { animation-delay: .16s; }
.stat-tile:nth-child(6) { animation-delay: .2s; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 1.35rem; white-space: nowrap; font-weight: 800; letter-spacing: -.01em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.chart { margin: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.chart-title { font-weight: 700; font-size: 15px; }
.col-wrap { position: relative; height: 180px; padding-left: 40px; }
.col-grid { position: absolute; inset: 0 0 22px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.col-gridline { border-top: 1px dashed rgba(255, 255, 255, .08); height: 0; position: relative; }
.col-gridline span { position: absolute; left: 0; top: -8px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.col-grid::after { content: ""; border-top: 1px solid rgba(255, 255, 255, .16); }
.cols { position: absolute; left: 40px; right: 0; top: 0; bottom: 0; display: flex; gap: 2px; align-items: stretch; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.col-bar { position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline: none; border-radius: 4px; }
.col-bar:hover, .col-bar:focus-visible { background: rgba(255, 255, 255, .04); }
.col-fill { display: block; width: min(100%, 26px); min-height: 0; background: var(--accent); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: grow-up .6s cubic-bezier(.2, .8, .2, 1) both; transition: filter .15s; }
.col-bar:hover .col-fill, .col-bar:focus-visible .col-fill { filter: brightness(1.15); }
.col-zero .col-fill { background: transparent; }
@keyframes grow-up { from { transform: scaleY(0); } to { transform: none; } }
.col-x { height: 22px; line-height: 22px; text-align: center; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: visible; }
.col-bar[data-tip]::after, .hbar[data-tip]::after {
  content: attr(data-tip); position: absolute; z-index: 3; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 4px);
  padding: 5px 9px; border-radius: 7px; background: rgba(15, 18, 19, .96); border: 1px solid rgba(255, 255, 255, .12);
  color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s;
}
.col-bar:hover::after, .col-bar:focus-visible::after, .hbar:hover::after, .hbar:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.cols .col:first-child .col-bar::after { left: 0; transform: translate(0, 4px); }
.cols .col:first-child .col-bar:hover::after { transform: none; }
.cols .col:last-child .col-bar::after { left: auto; right: 0; transform: translate(0, 4px); }
.cols .col:last-child .col-bar:hover::after { transform: none; }
.hbars { display: grid; gap: 10px; }
.hbar { position: relative; display: grid; gap: 4px; outline: none; border-radius: 6px; }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.hbar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-val { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-track { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--accent); border-radius: 4px; transform-origin: left; animation: grow-right .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow-right { from { transform: scaleX(0); } to { transform: none; } }
.chart-table summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.chart-table table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.chart-table td { padding: 4px 6px; border-bottom: 1px solid var(--line); }
.chart-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .watch.watch-vod.theater:not(.with-chat) { max-width: none; } }
@media (max-width: 1099px) {
  .watch.with-chat .watch-main { display: contents; }
  .watch.with-chat .stage { position: sticky; top: calc(var(--top-h) + var(--safe-top)); z-index: 12; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
  .watch.with-chat .watch-side { height: min(55vh, 520px); }
}
@media (max-width: 560px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 7px 13px; flex: none; }
}

.modal-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade-in .2s ease; }
.modal-overlay.closing { animation: fade-out .2s ease forwards; }
.modal { width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 64px rgba(0, 0, 0, .6); animation: modal-in .28s cubic-bezier(.2, .9, .3, 1.15); }
.modal-overlay.closing .modal { animation: modal-out .2s ease forwards; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 6px 20px; }
.modal-head h3 { font-size: 1.1rem; }
.modal-close { width: 36px; height: 36px; }
.modal-body { padding: 8px 20px 20px; }
.share-body { display: grid; gap: 12px; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes modal-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@media (max-width: 560px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { width: 100%; border-radius: 18px 18px 0 0; padding-bottom: var(--safe-bottom); animation: sheet-in .32s cubic-bezier(.2, .9, .3, 1); }
  .modal-overlay.closing .modal { animation: sheet-out .2s ease forwards; }
}
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { to { transform: translateY(100%); } }

.scroller { padding-top: 8px; padding-bottom: 18px; margin-top: -8px; margin-bottom: -10px; }
.thumb.has-progress .badge-dur, .thumb.has-progress .badge-resume { bottom: 12px; }
.badge-resume { left: 8px; bottom: 8px; }
.badge { line-height: 1.35; }
.thumb::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(transparent 40%, rgba(0, 0, 0, .45)); opacity: 0; transition: opacity .25s; pointer-events: none; }
.thumb > .badge, .thumb > .play-overlay, .thumb > .thumb-progress { z-index: 1; }
@media (hover: hover) { .card:hover .thumb::before { opacity: 1; } }
.thumb .play-overlay { background: var(--accent); box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }
.thumb .play-overlay .icon { margin-left: 4px; }
.thumb::before { z-index: 1; }
.thumb > .badge, .thumb > .play-overlay, .thumb > .thumb-progress { z-index: 2; }
@media (hover: hover) { .scroller .card:hover .thumb { box-shadow: 0 8px 18px rgba(0, 0, 0, .4), 0 0 0 1px rgba(83, 252, 24, .15); } }

.badge-locked { left: 8px; top: 8px; z-index: 3; background: rgba(0, 0, 0, .82); color: #ffd54d; }
.badge-locked .icon { width: 13px; height: 13px; }
.thumb.is-locked .thumb-img { filter: grayscale(.6) brightness(.55); }
.thumb.is-locked .badge-clip, .thumb.is-locked .badge-watched { display: none; }
.locked { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--bg-2); }
.locked-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(18px) brightness(.35); transform: scale(1.1); }
.locked-box { position: relative; display: grid; justify-items: center; gap: 10px; max-width: 440px; padding: 24px; text-align: center; animation: page-in .4s cubic-bezier(.2, .8, .2, 1); }
.locked-box h2 { font-size: 1.25rem; }
.locked-box p { color: rgba(255, 255, 255, .75); font-size: 14px; }
.locked-icon { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 213, 77, .14); color: #ffd54d; }
.locked-icon .icon { width: 28px; height: 28px; }
@media (max-width: 560px) { .locked-box { padding: 14px; gap: 6px; } .locked-box p { font-size: 13px; } .locked-icon { width: 44px; height: 44px; } }

.btn-live { background: var(--live); border-color: var(--live); color: #fff; }
.btn-live:hover { background: #ff5555; box-shadow: 0 6px 20px rgba(255, 59, 59, .35); }
.btn-live .live-dot { background: #fff; box-shadow: none; }
.pill-live-lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; margin-left: 0; vertical-align: 3px; }
.pill-live-lg .live-dot { width: 7px; height: 7px; background: #fff; }
.live-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.live-viewers { color: var(--live); font-weight: 700; }
.live-uptime { font-variant-numeric: tabular-nums; }
.live-off { background: rgba(255, 255, 255, .08); color: var(--muted); }
.chat-head strong { display: inline-flex; align-items: center; gap: 8px; }
.chat-conn { width: 8px; height: 8px; border-radius: 50%; background: #8d989c; transition: background .2s; }
.chat-conn[data-state="ok"] { background: var(--accent); box-shadow: 0 0 8px rgba(83, 252, 24, .7); }
.chat-conn[data-state="connecting"] { background: #ffc400; }
.chat-conn[data-state="down"] { background: var(--live); }
.watch-live .chat-msg { animation-duration: .18s; }

.next-stream { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 6px 12px; border-radius: 999px; background: rgba(83, 252, 24, .08); border: 1px solid rgba(83, 252, 24, .25); color: #b6ff9a; font-size: 13.5px; font-weight: 600; cursor: pointer; justify-self: start; transition: background .15s; animation: page-in .35s ease; }
.next-stream:hover { background: rgba(83, 252, 24, .14); }
.next-stream .icon { width: 16px; height: 16px; }
.schedule { display: grid; gap: 18px; max-width: 820px; }
.schedule-day { display: grid; gap: 8px; }
.schedule-day-title { font-size: 1rem; text-transform: capitalize; color: var(--text); }
.schedule-item { display: flex; gap: 16px; align-items: flex-start; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); animation: card-in .35s cubic-bezier(.2, .8, .2, 1) both; transition: border-color .2s; }
.schedule-item:hover { border-color: #33403f; }
.schedule-item.on-air { border-color: rgba(255, 59, 59, .55); background: linear-gradient(90deg, rgba(255, 59, 59, .08), transparent 60%), var(--bg-2); }
.schedule-time { display: grid; min-width: 56px; font-variant-numeric: tabular-nums; }
.schedule-time strong { font-size: 1.1rem; }
.schedule-body { display: grid; gap: 6px; min-width: 0; }
.schedule-title { font-weight: 700; word-break: break-word; }
.schedule-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.schedule-meta .card-cat { margin-top: 0; }
.schedule-repeat { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.schedule-repeat .icon { width: 14px; height: 14px; }
.player-error .spinner { margin-bottom: 4px; }
