:root {
  --accent: #ff4fa8;
  --accent-2: #a35cff;
  --accent-soft: rgba(255, 79, 168, 0.16);
  --text: #f2f2f5;
  --muted: #a4a4b4;
  --faint: #6c6c7c;
  --panel: rgba(12, 12, 17, 0.8);
  --panel-solid: #101016;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --hover: rgba(255, 255, 255, 0.07);
  --radius: 14px;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", "Segoe UI Mono", Consolas, monospace;
  --header-h: 58px;
  --pl-buffer: rgba(255, 255, 255, 0.32);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { overflow-x: clip; line-height: 1.45; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
kbd {
  font-family: var(--mono); font-size: 0.78em;
  padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.05);
}
.ic { width: 20px; height: 20px; flex: none; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 3vw, 32px);
  background: rgba(6, 6, 9, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex; align-items: baseline;
  text-decoration: none; line-height: 1;
  font-family: var(--mono); font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-wub { color: var(--text); }
.brand-session {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 79, 168, 0.35));
}
.brand:hover .brand-session { filter: drop-shadow(0 0 14px rgba(255, 79, 168, 0.6)); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .nav-random {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 9px; border: 0; background: none;
  text-decoration: none; color: var(--muted); font-size: 14px;
}
.nav a:hover, .nav-random:hover { color: var(--text); background: var(--hover); }
.nav a.is-on { color: var(--text); background: var(--accent-soft); }
.nav-random .ic { width: 17px; height: 17px; }

#app {
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px clamp(16px, 3vw, 32px) 64px;
  display: flex; flex-direction: column; gap: 20px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(10px);
}
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; }
.link { color: var(--accent); text-decoration: none; font-size: 14px; }
.link:hover { text-decoration: underline; }
.empty, .empty-state { color: var(--muted); }
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state h2 { color: var(--text); margin-top: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 13px;
  border-radius: 9px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13.5px; text-decoration: none; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.26); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn .ic { width: 17px; height: 17px; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #12000a; font-weight: 600; }
.btn-primary:hover { background: #ff6db8; border-color: #ff6db8; }
.input, .select {
  height: 34px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.35);
  font-size: 13.5px;
}
.input:focus, .select:focus, .search:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; }
.select { padding-right: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px; text-decoration: none; white-space: nowrap; color: var(--muted);
}
.chip:hover { color: var(--text); background: var(--hover); }
.chip.is-on { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }
.chip small { color: var(--faint); font-size: 11.5px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 18px; border-radius: 10px;
  background: #1b1b24; border: 1px solid var(--line-strong);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  font-size: 14px; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.browse-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.browse-title { margin: 0; font-family: var(--mono); font-size: clamp(22px, 3vw, 30px); font-weight: 600; }
.browse-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.browse-tools { display: flex; gap: 8px; flex: 0 1 420px; }
.search {
  display: flex; align-items: center; gap: 8px; flex: 1 1 200px; min-width: 0;
  height: 36px; padding: 0 10px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.35);
}
.search .ic { width: 17px; height: 17px; color: var(--faint); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; }
.browse-tools .select { height: 36px; }

.month-nav {
  display: flex; gap: 22px; overflow-x: auto;
  padding: 2px 0 14px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.month-year { display: flex; align-items: center; gap: 6px; flex: none; }
.month-year + .month-year { padding-left: 22px; border-left: 1px solid var(--line-strong); }
.year-label {
  font-family: var(--mono); font-size: 15px; font-weight: 800; letter-spacing: 0.02em;
  color: var(--text); margin-right: 6px;
  padding: 3px 10px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-strong);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.grid-compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.card {
  display: flex; flex-direction: column;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(20, 20, 27, 0.75);
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s;
}
.card:hover { transform: translateY(-2px); border-color: rgba(255, 79, 168, 0.55); }
.card.is-watched { opacity: 0.72; }
.card.skeleton { aspect-ratio: 16 / 13; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.card-thumb {
  position: relative; aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(163, 92, 255, 0.28), transparent 60%),
    radial-gradient(90% 90% at 100% 100%, rgba(255, 79, 168, 0.22), transparent 60%),
    #0c0c12;
  display: flex; align-items: center; justify-content: center;
  isolation: isolate; overflow: hidden;
}
.card-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.5s ease;
}
.card-thumb::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(closest-side at 50% 50%, rgba(8, 8, 12, 0.62), rgba(8, 8, 12, 0.25) 70%, transparent),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 32%, transparent 68%, rgba(0, 0, 0, 0.6));
  opacity: 0; transition: opacity 0.5s ease;
}
.card-thumb.has-img .card-img, .card-thumb.has-img::before { opacity: 1; }
.card-thumb > :not(.card-img) { z-index: 2; }
.card-thumb.has-img .card-date, .card-thumb.has-img .card-weekday { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85); }
.card-thumb.has-img .card-date span { color: rgba(255, 255, 255, 0.82); }
.card-thumb.has-img .card-weekday { text-shadow: none; }
.card-date { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; font-family: var(--mono); }
.card-date b { font-size: 40px; font-weight: 700; }
.card-date span { font-size: 13px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); margin-top: 6px; }
.card-date-other .ic { width: 34px; height: 34px; color: var(--muted); }
.card-weekday {
  position: absolute; left: 8px; top: 8px;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.78);
  font-size: 11px; font-weight: 600; color: var(--text);
}
.card-badges { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; }
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.6); font-size: 11px; font-weight: 600;
}
.badge .ic { width: 12px; height: 12px; }
.badge-tag { color: #fdff76; }
.badge-ok { color: #3ee08f; }
.badge-fav { color: #ff6b9a; padding: 2px 5px; }
.badge-fav .ic path { fill: currentColor; }
.card-dur:empty { display: none; }
.card-dur, .card-views {
  position: absolute; bottom: 9px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 5px;
  background: rgba(0, 0, 0, 0.78);
  font-family: var(--mono); font-size: 11.5px;
}
.card-dur { left: 8px; }
.card-views { right: 8px; }
.card-views .ic { width: 13px; height: 13px; color: var(--muted); }
.card-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.15); }
.card-progress i { display: block; height: 100%; background: var(--accent); }
.card-body { padding: 10px 12px 12px; }
.card-title {
  margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7em; text-transform: none;
}
.card-meta { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.card-tags { display: flex; flex-wrap: nowrap; gap: 4px; margin-top: 8px; min-height: 21px; overflow: hidden; }
.card-tag {
  flex: 0 1 auto; min-width: 0; max-width: 60%;
  padding: 2px 7px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  color: color-mix(in srgb, var(--c) 75%, white);
  font-size: 11px; line-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-tag-more { flex: none; --c: #a8a8b8; }

.hero {
  backdrop-filter: none; background: rgba(12, 12, 17, 0.92);
  display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr); gap: 22px;
  align-items: center;
}
.hero-skeleton { min-height: 280px; animation: pulse 1.4s ease-in-out infinite; }
.hero-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hero-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.hero-title { margin: 0; font-family: var(--mono); font-size: clamp(18px, 2vw, 24px); line-height: 1.3; overflow-wrap: anywhere; }
.hero-title a { text-decoration: none; }
.hero-title a:hover { color: var(--accent); }
.hero-meta { margin: 0; font-size: 13.5px; color: var(--muted); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px; font-family: var(--mono); font-size: 13px; }
.hero-stats span { display: inline-flex; align-items: center; gap: 6px; }
.hero-stats .ic { width: 16px; height: 16px; color: var(--muted); }
.hero .card-tags { flex-wrap: wrap; overflow: visible; }
.hero .card-tag { max-width: 100%; font-size: 12px; padding: 3px 9px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); } }

.continue-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 300px); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.cw-item, .history-item {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 12px 36px 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(20, 20, 27, 0.7);
  text-decoration: none;
}
.cw-item:hover, .history-item:hover { border-color: rgba(255, 79, 168, 0.55); }
.cw-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cw-bar { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); margin-top: 4px; overflow: hidden; }
.cw-bar i { display: block; height: 100%; background: var(--accent); }
.cw-remove {
  position: absolute; right: 6px; top: 6px;
  width: 26px; height: 26px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: none; color: var(--faint);
}
.cw-remove:hover { color: var(--text); background: var(--hover); }
.cw-remove .ic { width: 15px; height: 15px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { flex-direction: row; align-items: center; }
.history-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }

.watch {
  display: grid; gap: 20px;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "player timeline" "info timeline" "more more";
  align-items: start;
}
.watch-player { grid-area: player; }
.timeline { grid-area: timeline; }
.watch-info { grid-area: info; }
.more { grid-area: more; }

.watch[data-size="sm"] { grid-template-columns: minmax(0, 640px) minmax(300px, 1fr); }
.watch[data-size="lg"], .watch[data-size="theater"] {
  grid-template-columns: minmax(0, 1fr) 380px;
  grid-template-areas: "player player" "info timeline" "more more";
}
.watch[data-size="theater"] .watch-player {
  --bleed: calc(50% - (100vw - var(--sbw, 0px)) / 2);
  margin: -22px var(--bleed) 0;
  background: #000;
}
.watch[data-size="theater"] .player-host {
  aspect-ratio: auto;
  height: min(56.25vw, calc(100vh - var(--header-h)));
  border-radius: 0;
}
.watch:not([data-size="lg"]):not([data-size="theater"]) .timeline {
  position: sticky; top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  display: flex; flex-direction: column;
}

@media (max-width: 960px) {
  .watch, .watch[data-size] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "player" "info" "timeline" "more";
  }
  .watch .timeline { position: static !important; max-height: none !important; }
  .watch[data-size="theater"] .watch-player { margin-top: -22px; }
}

.info-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.info-nav, .info-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.watch-title {
  margin: 16px 0 14px; font-family: var(--mono);
  font-size: clamp(18px, 2.2vw, 24px); font-weight: 600; line-height: 1.3;
  overflow-wrap: anywhere;
}
.stats {
  display: flex; flex-wrap: wrap; gap: 1px;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--line);
}
.stats > div { flex: 1 1 150px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; background: rgba(14, 14, 20, 0.92); text-align: center; }
.stats b, .stats .link { font-family: var(--mono); font-size: 16px; font-weight: 600; }
.stats span { font-size: 12px; color: var(--muted); }
.segments { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.segments-label { font-size: 12px; color: var(--faint); margin-right: 4px; text-transform: uppercase; letter-spacing: 0.08em; }

@media (max-width: 640px) {
  .info-actions .btn span { display: none; }
  .info-actions .btn { padding: 0 10px; }
}

.timeline { padding: 16px; }
.timeline-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.timeline-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.count { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 1px 7px; border-radius: 6px; background: var(--hover); }
.tl-sources { display: flex; gap: 2px; padding: 3px; margin-bottom: 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.tl-sources button { flex: 1; padding: 5px 6px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 12.5px; }
.tl-sources button span { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.tl-sources button.is-on { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.tl-item.is-community .tl-label { color: color-mix(in srgb, var(--text) 88%, var(--c)); }
.watch-info .card-tags { flex-wrap: wrap; overflow: visible; min-height: 0; margin: -4px 0 16px; }
.watch-info .card-tag { max-width: 100%; font-size: 12px; padding: 3px 9px; }
.tl-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.tl-filter {
  padding: 3px 9px; border-radius: 999px; font-size: 12px;
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: none; color: var(--c);
}
.tl-filter.is-on { background: color-mix(in srgb, var(--c) 22%, transparent); }
.tl-list { list-style: none; margin: 0 -6px; padding: 0; overflow-y: auto; flex: 1; min-height: 60px; }
.tl-item {
  position: relative; display: flex; align-items: center;
  border-radius: 9px; margin: 2px 0;
}
.tl-item::before { content: ""; position: absolute; left: 6px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--c); }
.tl-item:hover { background: var(--hover); }
.tl-item.is-active { background: color-mix(in srgb, var(--c) 14%, transparent); }
.tl-jump {
  flex: 1; min-width: 0; display: grid;
  grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px;
  padding: 8px 6px 8px 18px; border: 0; background: none; text-align: left;
}
.tl-time { grid-row: span 2; font-family: var(--mono); font-size: 12.5px; color: var(--c); font-variant-numeric: tabular-nums; padding-top: 1px; display: flex; flex-direction: column; }
.tl-time small { color: var(--faint); font-size: 11px; }
.tl-label { font-size: 13.5px; overflow-wrap: anywhere; }
.tl-cat { font-size: 11px; color: var(--faint); }
.tl-actions { display: flex; opacity: 0; transition: opacity 0.15s; padding-right: 4px; }
.tl-item:hover .tl-actions, .tl-item:focus-within .tl-actions { opacity: 1; }
.tl-actions button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted); }
.tl-actions button:hover { color: var(--text); background: var(--hover); }
.tl-actions .ic { width: 15px; height: 15px; }
@media (hover: none) { .tl-actions { opacity: 1; } }
.tl-empty { padding: 14px 10px; color: var(--muted); font-size: 13.5px; }
.tl-empty p { margin: 0 0 8px; }
.tl-edit { flex: 1; display: flex; flex-direction: column; gap: 7px; padding: 10px 8px 10px 18px; }
.tl-edit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-edit .input { width: 100%; }
.tl-edit .input-time { width: 92px; font-family: var(--mono); }
.tl-edit .select { height: 34px; flex: 1; min-width: 100px; }
.spacer { flex: 1; }
.tl-tools { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--line); }
.tl-tools label.btn { cursor: pointer; }

.player-host {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: #000;
}
.player-host.has-mini::after {
  content: "Playing in mini player";
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--faint); font-size: 14px;
}
.player {
  position: absolute; inset: 0;
  background: #000; color: #fff;
  border-radius: inherit; overflow: hidden;
  outline: none; user-select: none; -webkit-user-select: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
.pl-stage { position: relative; width: 100%; height: 100%; }
.player video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player.is-idle { cursor: none; }
.player button { border: 0; background: none; color: inherit; }

.pl-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; transition: opacity 0.2s; }
.pl-bigplay {
  pointer-events: auto;
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 79, 168, 0.88) !important;
  box-shadow: 0 0 0 8px rgba(255, 79, 168, 0.18), 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s;
}
.pl-bigplay:hover { transform: scale(1.06); }
.pl-bigplay .ic { width: 34px; height: 34px; margin-left: 4px; color: #12000a; }
.player.is-playing .pl-bigplay .ic { margin-left: 0; }
.player.is-playing .pl-center, .player.is-seeking .pl-center { opacity: 0; }
.player.is-playing .pl-center button, .player.is-seeking .pl-center button { pointer-events: none; }
.pl-cskip { display: none; }

.pl-spinner {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.18); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite; opacity: 0; pointer-events: none; transition: opacity 0.2s 0.15s;
}
.player.is-buffering:not(.is-paused) .pl-spinner, .player.is-seeking .pl-spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.pl-osd {
  position: absolute; left: 50%; top: 14%; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.72); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
  opacity: 0; pointer-events: none; white-space: nowrap; max-width: 80%; overflow: hidden; text-overflow: ellipsis;
}
.pl-osd.show { animation: osd 1.1s ease forwards; }
@keyframes osd { 0% { opacity: 0; transform: translate(-50%, 6px); } 12%, 70% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

.pl-resume {
  position: absolute; left: 14px; bottom: 84px; z-index: 3;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 12px; border-radius: 10px;
  background: rgba(10, 10, 14, 0.88); border: 1px solid var(--line-strong);
  font-size: 13px;
}
.pl-resume .ic { width: 16px; height: 16px; color: var(--accent); }
.pl-resume button { padding: 4px 9px; border-radius: 7px; font-size: 12.5px; color: var(--accent) !important; }
.pl-resume button:hover { background: var(--hover) !important; }
.pl-resume .pl-x { color: var(--muted) !important; padding: 4px; }
.pl-resume .pl-x .ic { color: inherit; width: 14px; height: 14px; }

.pl-error {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(0, 0, 0, 0.82); text-align: center; padding: 20px;
}
.pl-error p { margin: 0; font-size: 15px; }

.pl-chrome {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 40px 14px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.5) 55%, transparent);
  transition: opacity 0.25s;
}
.player.is-idle .pl-chrome { opacity: 0; pointer-events: none; }
.player.is-idle .pl-resume { opacity: 0; }

.pl-seek {
  position: relative;
  height: calc(18px + var(--lanes, 0) * 5px);
  cursor: pointer; touch-action: none; outline: none;
}
.pl-rail {
  position: absolute; left: 0; right: 0; top: 7px; height: 4px;
  border-radius: 3px; background: rgba(255, 255, 255, 0.2);
  transition: height 0.12s, top 0.12s;
}
.pl-seek:hover .pl-rail, .player.is-scrubbing .pl-rail { top: 5.5px; height: 7px; }
.pl-buffered, .pl-hoverfill, .pl-played { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; }
.pl-buffered { right: 0; }
.pl-hoverfill { background: rgba(255, 255, 255, 0.28); opacity: 0; }
.player.is-seek-hover .pl-hoverfill { opacity: 1; }
.pl-played { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.pl-thumb {
  position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 79, 168, 0.25);
  transform: scale(0); transition: transform 0.12s;
}
.pl-seek:hover .pl-thumb, .player.is-scrubbing .pl-thumb, .pl-seek:focus-visible .pl-thumb { transform: scale(1); }
.pl-markers { position: absolute; inset: 0; pointer-events: none; }
.pl-marker {
  position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1.5px;
  border-radius: 2px; background: var(--c);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
}
.pl-tracks { position: absolute; left: 0; right: 0; top: 16px; pointer-events: none; }
.pl-track { position: absolute; height: 3.5px; min-width: 3px; border-radius: 2px; background: var(--c); opacity: 0.9; }

.pl-preview {
  position: absolute; bottom: calc(100% + 6px); left: 0;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  pointer-events: none; opacity: 0; transition: opacity 0.12s;
}
.player.is-seek-hover .pl-preview, .player.is-scrubbing .pl-preview { opacity: 1; }
.pl-preview canvas {
  display: none; width: 192px; height: 108px;
  border-radius: 8px; border: 2px solid rgba(255, 255, 255, 0.85);
  background: #000; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
}
.pl-preview.has-frame canvas { display: block; }
.pl-preview-tag {
  max-width: 220px; padding: 3px 8px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.85); border-left: 3px solid var(--c);
  font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pl-preview-time {
  padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.85);
  font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums;
}

.pl-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.pl-group { display: flex; align-items: center; gap: 2px; min-width: 0; }
.pl-controls button {
  position: relative; height: 38px; min-width: 38px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 9px; transition: background 0.12s;
}
.pl-controls button:hover { background: rgba(255, 255, 255, 0.12); }
.pl-controls .ic { width: 23px; height: 23px; }
.pl-skip span {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-48%);
  font-size: 8.5px; font-weight: 800; text-align: center; pointer-events: none;
}
.pl-time { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 10px !important; }
.pl-speed { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.pl-speed.is-active { color: var(--accent); }
.pl-tagbtn span { font-size: 13px; font-weight: 600; }
.pl-tagbtn { color: #fdff76; }

.pl-volume { display: flex; align-items: center; }
.pl-vol-slider {
  position: relative; width: 0; height: 38px; overflow: hidden;
  cursor: pointer; touch-action: none; outline: none;
  transition: width 0.18s, margin 0.18s;
}
.pl-volume:hover .pl-vol-slider, .pl-volume:focus-within .pl-vol-slider, .pl-volume.is-boosted .pl-vol-slider { width: 104px; margin: 0 8px 0 4px; overflow: visible; }
.pl-vol-track {
  position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px;
  border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, 0.25);
}
.pl-vol-boostzone {
  position: absolute; top: 0; bottom: 0; left: var(--split, 60%); right: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 79, 168, 0.45) 0 3px, transparent 3px 6px);
}
.pl-vol-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #fff; }
.pl-volume.is-boosted .pl-vol-fill { background: linear-gradient(90deg, #fff 0, #fff calc(var(--split, 60%) * 1.2), var(--accent)); }
.pl-vol-knob {
  position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.pl-volume.is-boosted .pl-vol-knob { background: var(--accent); }
.pl-vol-readout { display: none; font-family: var(--mono); font-size: 12px; min-width: 40px; font-variant-numeric: tabular-nums; }
.pl-volume:hover .pl-vol-readout, .pl-volume.is-boosted .pl-vol-readout { display: inline; }
.pl-volume.is-boosted .pl-vol-readout { color: var(--accent); font-weight: 700; }

.pl-menu, .pl-composer {
  position: absolute; z-index: 5;
  background: rgba(14, 14, 20, 0.95);
  border: 1px solid var(--line-strong); border-radius: 13px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  font-size: 13.5px;
}
.pl-menu {
  right: 12px; bottom: 74px;
  width: min(440px, calc(100% - 24px));
  max-height: calc(100% - 90px); overflow-y: auto;
  padding: 12px;
}
.pl-menu-speed, .pl-menu-size { width: 220px; padding: 8px; }
.pl-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pl-menu-head .pl-x, .pl-menu-settings > .pl-menu-head { display: none; }
.pl-menu-title { padding: 4px 8px 8px; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.pl-opt {
  display: flex !important; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px !important; border-radius: 8px; text-align: left;
}
.pl-opt:hover { background: var(--hover) !important; }
.pl-opt.is-on { color: var(--accent) !important; background: var(--accent-soft) !important; }
.pl-opt .ic { width: 18px; height: 18px; }
.pl-tabs { display: flex; gap: 2px; padding: 3px; margin-bottom: 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.pl-tabs button { flex: 1; padding: 6px 4px; border-radius: 8px; font-size: 13px; color: var(--muted) !important; }
.pl-tabs button.is-on { background: rgba(255, 255, 255, 0.1) !important; color: var(--text) !important; }
.pl-tabbody { display: flex; flex-direction: column; gap: 10px; padding: 0 4px 4px; }
.pl-range { display: grid; grid-template-columns: 110px 1fr 48px; align-items: center; gap: 10px; }
.pl-range span { color: var(--muted); }
.pl-range output { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.pl-menu input[type="range"] { width: 100%; accent-color: var(--accent); }
.pl-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.pl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; color: var(--muted); }
.pl-row-compact { padding: 8px 10px 4px; margin-top: 6px; border-top: 1px solid var(--line); }
.pl-row-label { color: var(--muted); margin-top: 4px; }
.pl-field { display: flex; flex-direction: column; gap: 8px; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-chips button {
  flex: 1 0 56px; height: 38px; border-radius: 9px;
  border: 1px solid var(--line-strong) !important;
  font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--muted) !important;
}
.pl-chips button.is-on { border-color: var(--accent) !important; background: var(--accent-soft) !important; color: var(--text) !important; }
.pl-select { height: 30px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.4); font-size: 13px; }
.pl-toggle {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 36px; height: 20px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.18); position: relative; cursor: pointer; transition: background 0.15s;
}
.pl-toggle::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform 0.15s;
}
.pl-toggle:checked { background: var(--accent); }
.pl-toggle:checked::after { transform: translateX(16px); }
.pl-seg { display: flex; gap: 4px; }
.pl-seg label { flex: 1; }
.pl-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pl-seg span { display: block; text-align: center; padding: 6px; border-radius: 8px; border: 1px solid var(--line-strong); cursor: pointer; color: var(--muted); }
.pl-seg input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.pl-seg input:focus-visible + span { outline: 2px solid var(--accent); }
.pl-link { align-self: flex-start; padding: 0 !important; color: var(--accent) !important; font-size: 13px; }
.pl-note { margin: 0; font-size: 12.5px; color: var(--faint); }
.pl-keys { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 0; }
.pl-keys dt { white-space: nowrap; }
.pl-keys dd { margin: 0; color: var(--muted); }

.pl-composer {
  left: 12px; bottom: 74px;
  width: min(460px, calc(100% - 24px));
  max-height: calc(100% - 90px); overflow-y: auto;
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.pl-composer-head { display: flex; align-items: center; gap: 8px; color: #fdff76; }
.pl-composer-head strong { color: var(--text); flex: 1; }
.pl-composer-head .ic { width: 18px; height: 18px; }
.pl-x { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--muted) !important; }
.pl-x:hover { background: var(--hover) !important; color: var(--text) !important; }
.pl-x .ic { width: 16px !important; height: 16px !important; color: inherit; }
.pl-input {
  height: 34px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.45);
  font-size: 14px; outline: none; min-width: 0;
}
.pl-input:focus { border-color: var(--accent); }
.pl-input-time { width: 86px; font-family: var(--mono); font-size: 13px; margin-left: 4px; }
.pl-composer-times { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.pl-chip { padding: 5px 9px; border-radius: 7px; border: 1px solid var(--line-strong) !important; font-size: 12px; }
.pl-chip:hover { background: var(--hover) !important; }
.pl-cats { display: flex; flex-wrap: wrap; gap: 5px; }
.pl-cat input { position: absolute; opacity: 0; pointer-events: none; }
.pl-cat span {
  display: block; padding: 4px 10px; border-radius: 999px; cursor: pointer; font-size: 12.5px;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); color: var(--c);
}
.pl-cat input:checked + span { background: color-mix(in srgb, var(--c) 25%, transparent); border-color: var(--c); }
.pl-cat input:focus-visible + span { outline: 2px solid var(--c); }
.pl-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pl-hint { font-size: 12px; color: var(--faint); }
.pl-share { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); cursor: pointer; }
.pl-share input { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; }
.pl-share:not([hidden]) + .pl-hint { display: none; }
.pl-primary {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 9px;
  background: var(--accent) !important; color: #12000a !important; font-weight: 700; font-size: 13.5px;
  text-decoration: none;
}
.pl-primary .ic { width: 17px; height: 17px; }

.pl-minibar { display: none; }
.player.is-mini {
  position: fixed; inset: auto 16px 16px auto; z-index: 40;
  width: min(400px, calc(100vw - 32px)); height: auto; aspect-ratio: 16 / 9;
  border-radius: 12px; border: 1px solid var(--line-strong);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.7);
  animation: mini-in 0.2s ease;
}
@keyframes mini-in { from { opacity: 0; transform: translateY(16px); } }
.player.is-mini .pl-minibar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 3;
  display: flex; align-items: center; gap: 2px; padding: 6px 6px 18px 12px;
  background: linear-gradient(rgba(0, 0, 0, 0.8), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.player.is-mini:hover .pl-minibar, .player.is-mini.is-paused .pl-minibar { opacity: 1; }
.pl-minititle { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-minibar button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; }
.pl-minibar button:hover { background: rgba(255, 255, 255, 0.15); }
.pl-minibar .ic { width: 17px; height: 17px; }
.player.is-mini .pl-chrome { padding: 24px 8px 4px; }
.player.is-mini .pl-controls .pl-group > :not([data-act="play"]):not(.pl-volume),
.player.is-mini .pl-vol-slider, .player.is-mini .pl-vol-readout,
.player.is-mini .pl-tracks, .player.is-mini .pl-menu, .player.is-mini .pl-composer, .player.is-mini .pl-resume { display: none !important; }
.player.is-mini .pl-bigplay { width: 54px; height: 54px; }
.player.is-mini .pl-bigplay .ic { width: 24px; height: 24px; }

.player.is-fullscreen { border-radius: 0; }
.player.is-fullscreen .pl-chrome {
  padding: 60px max(24px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}

/* Container is on .player, not the host: containment on an ancestor traps the fixed mini player. */
.player { container: player / inline-size; }
@container player (max-width: 620px) {
  .pl-skip, .pl-tagbtn span, .pl-vol-readout { display: none !important; }
  .pl-volume.is-boosted:not(:hover):not(:focus-within) .pl-vol-slider { width: 0; margin: 0; overflow: hidden; }
  .pl-volume.is-boosted [data-act="mute"] { color: var(--accent); }
  .pl-time { font-size: 12px; padding: 0 4px !important; }
  .pl-controls button { min-width: 34px; padding: 0 5px; }
  .pl-range { grid-template-columns: 84px 1fr 44px; }
  .pl-grid2 { grid-template-columns: 1fr; }
}
@container player (max-width: 420px) {
  .pl-speed, [data-act="sizeMenu"], [data-act="pip"] { display: none !important; }
}

.pl-sheet {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
}
.pl-sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); animation: fade-in 0.2s ease; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
html.pl-sheet-open { overflow: hidden; }
.pl-sheet button { border: 0; background: none; color: inherit; }
.pl-sheet .pl-menu, .pl-sheet .pl-composer {
  position: relative; inset: auto; width: 100%; max-width: 560px; margin: 0 auto;
  max-height: 82vh; max-height: 82dvh;
  border-radius: 18px 18px 0 0; border-bottom: 0;
  padding: 6px 16px calc(16px + env(safe-area-inset-bottom));
  background: #121219; backdrop-filter: none;
  font-size: 15px;
  animation: sheet-in 0.22s ease;
}
.pl-sheet .pl-menu::before, .pl-sheet .pl-composer::before {
  content: ""; display: block; flex: none; width: 40px; height: 4px; margin: 2px auto 6px;
  border-radius: 2px; background: rgba(255, 255, 255, 0.22);
}
.pl-sheet .pl-menu-head { padding: 0 0 4px; }
.pl-sheet .pl-menu-head .pl-x { display: grid; width: 40px; height: 40px; }
.pl-sheet .pl-menu-settings > .pl-menu-head { display: flex; }
.pl-sheet .pl-menu-title { padding: 0 2px; font-size: 12.5px; }
.pl-sheet .pl-menu-settings { display: flex; flex-direction: column; overflow: hidden; height: min(560px, 82vh); height: min(560px, 82dvh); }
.pl-sheet .pl-tabs { flex: none; margin-bottom: 8px; }
.pl-sheet .pl-tabs button { padding: 10px 4px; font-size: 14px; }
.pl-sheet .pl-tabbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; gap: 14px; padding: 6px 2px 8px; }
.pl-sheet .pl-grid2 { grid-template-columns: 1fr; gap: 2px; }
.pl-sheet .pl-row { min-height: 46px; color: var(--text); border-bottom: 1px solid var(--line); }
.pl-sheet .pl-grid2 .pl-row:last-child { border-bottom: 0; }
.pl-sheet .pl-row-compact { border-bottom: 0; padding: 8px 10px 0; }
.pl-sheet .pl-row-label { color: var(--text); margin: 0; }
.pl-sheet .pl-range { grid-template-columns: 1fr auto; row-gap: 2px; }
.pl-sheet .pl-range span { color: var(--text); }
.pl-sheet .pl-range input { grid-column: 1 / -1; grid-row: 2; height: 32px; margin: 0; }
.pl-sheet .pl-range output { font-size: 13.5px; color: var(--muted); }
.pl-sheet .pl-select { height: 38px; padding: 0 10px; font-size: 16px; }
.pl-sheet .pl-toggle { width: 46px; height: 28px; }
.pl-sheet .pl-toggle::after { width: 24px; height: 24px; }
.pl-sheet .pl-toggle:checked::after { transform: translateX(18px); }
.pl-sheet .pl-opt { min-height: 46px; padding: 10px 12px !important; font-size: 15px; }
.pl-sheet .pl-menu-speed, .pl-sheet .pl-menu-size { width: 100%; overflow-y: auto; }
.pl-sheet .pl-link { padding: 6px 0 !important; font-size: 14px; }
.pl-sheet .pl-note { font-size: 13px; }
.pl-sheet .pl-composer { gap: 12px; }
.pl-sheet .pl-composer-head .pl-x { width: 40px; height: 40px; }
.pl-sheet .pl-input { height: 44px; font-size: 16px; }
.pl-sheet .pl-input-time { width: 104px; }
.pl-sheet .pl-chip { padding: 9px 12px; font-size: 13.5px; }
.pl-sheet .pl-cat span { padding: 7px 13px; font-size: 14px; }
.pl-sheet .pl-composer-foot { flex-wrap: wrap; }
.pl-sheet .pl-primary { height: 44px; padding: 0 18px; margin-left: auto; font-size: 15px; }
.pl-sheet .pl-share { font-size: 14.5px; min-height: 40px; }
.pl-sheet .pl-share input { width: 20px; height: 20px; }

@media (hover: none) {
  .pl-hint { display: none; }
  .pl-vol-slider, .pl-vol-readout { display: none !important; }
  .pl-center { display: flex; align-items: center; justify-content: center; gap: clamp(24px, 9%, 72px); }
  .pl-cskip {
    position: relative; display: grid; place-items: center; pointer-events: auto;
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.5) !important;
  }
  .pl-cskip .ic { width: 30px; height: 30px; }
  .pl-cskip span {
    position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-48%);
    font-size: 10px; font-weight: 800; text-align: center; pointer-events: none;
  }
  .pl-bigplay { width: 64px; height: 64px; }
  .pl-bigplay .ic { width: 30px; height: 30px; }
  .player.is-playing:not(.is-idle):not(.is-seeking) .pl-center { opacity: 1; }
  .player.is-playing:not(.is-idle):not(.is-seeking) .pl-center button { pointer-events: auto; }
  .player.is-playing .pl-bigplay { background: rgba(0, 0, 0, 0.5) !important; box-shadow: none; }
  .player.is-playing .pl-bigplay .ic { color: #fff; }
  .player.is-idle .pl-center { opacity: 0; }
  .player.is-idle .pl-center button { pointer-events: none; }
  .player.is-buffering:not(.is-paused) .pl-bigplay { opacity: 0; }
  .player.is-mini .pl-cskip { display: none; }
  .player.is-mini:not(.is-idle) .pl-minibar { opacity: 1; }

  .pl-seek { height: calc(30px + var(--lanes, 0) * 5px); margin-top: -8px; }
  .pl-rail, .pl-seek:hover .pl-rail { top: 13px; height: 4px; }
  .player.is-scrubbing .pl-rail { top: 11.5px; height: 7px; }
  .pl-seek .pl-tracks { top: 22px; }
  .pl-thumb, .pl-seek:hover .pl-thumb { transform: scale(0.8); }
  .player.is-scrubbing .pl-thumb { transform: scale(1.15); }
  .pl-controls button { min-width: 40px; height: 40px; }

  .input, .select, .search input, .pl-input, .pl-select { font-size: 16px; }
}
@container player (max-width: 420px) {
  .pl-chrome { padding: 32px 8px 4px; }
  .pl-controls { gap: 4px; }
  .pl-group { gap: 0; }
  .pl-cskip { width: 44px; height: 44px; }
  .pl-cskip .ic { width: 26px; height: 26px; }
  .pl-bigplay { width: 56px; height: 56px; }
  .pl-controls button { min-width: 36px; padding: 0 4px; }
  .pl-time { font-size: 11.5px; padding: 0 4px !important; }
  @media (hover: none) { .pl-volume { display: none; } }
}
@container player (max-width: 340px) {
  .pl-dur { display: none; }
}

@media (max-width: 640px) {
  .watch-player, .watch[data-size] .watch-player {
    margin: -22px calc(-1 * clamp(16px, 3vw, 32px)) 0;
    background: #000;
  }
  .watch .player-host, .watch[data-size="theater"] .player-host {
    aspect-ratio: 16 / 9; height: auto; border-radius: 0;
  }
  .watch .player:not(.is-mini) { box-shadow: none; }
  .panel { padding: 16px; }
  #app { gap: 16px; }
  .player.is-mini { width: min(260px, calc(100vw - 24px)); inset: auto 12px 12px auto; }
}
@media (max-width: 640px) and (orientation: portrait) {
  .watch-player { position: sticky; top: var(--header-h); z-index: 20; }
}

.account { position: relative; flex: none; margin-left: 6px; }
.account-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04);
  font-size: 14px; color: var(--text); max-width: 200px;
}
.account-btn:hover { background: rgba(255, 255, 255, 0.1); }
.account-btn .ic { width: 17px; height: 17px; }
.account-btn.is-user { padding: 0 12px 0 4px; }
.account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  object-fit: cover; background: var(--accent-soft);
}
.avatar-initial { display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--accent); }
.avatar-lg { width: 40px; height: 40px; font-size: 17px; }
.avatar-xl { width: 72px; height: 72px; font-size: 30px; }
.account-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  width: min(300px, calc(100vw - 32px));
  padding: 10px; border-radius: 12px;
  background: var(--panel-solid); border: 1px solid var(--line-strong);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
  display: flex; flex-direction: column; gap: 2px;
}
.account-pop-title { margin: 4px 6px 2px; font-weight: 700; }
.account-pop-sub { margin: 0 6px 10px; font-size: 13px; color: var(--muted); }
.account-pop-user { display: flex; align-items: center; gap: 10px; padding: 6px 6px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.account-pop-user div { display: flex; flex-direction: column; min-width: 0; }
.account-pop-user b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-pop-user small { font-size: 12px; color: var(--muted); }
.account-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  font-size: 14px; color: var(--text); text-decoration: none; text-align: left;
}
.account-item:hover { background: var(--hover); }
.account-item .ic { width: 17px; height: 17px; color: var(--muted); }
.provider-list { display: flex; flex-direction: column; gap: 6px; }
.provider-btn {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px; border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  font-size: 14px; font-weight: 600; color: var(--text);
}
.provider-btn:hover { background: color-mix(in srgb, var(--c) 26%, transparent); }
.provider-btn:disabled { opacity: 0.5; }
.provider-btn .ic { width: 19px; height: 19px; color: var(--c); }
.provider-list-lg { max-width: 360px; }
.provider-list-lg .provider-btn { height: 46px; font-size: 15px; }
.muted-note { margin: 0; font-size: 13px; color: var(--muted); }

.social { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 16px; }
.hero .social { margin: 0; }
.fav-btn.is-on { color: #ff6b9a; border-color: color-mix(in srgb, #ff6b9a 55%, transparent); background: color-mix(in srgb, #ff6b9a 12%, transparent); }
.fav-btn.is-on .ic path { fill: currentColor; }
.stars { display: inline-flex; }
.star { width: 30px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--faint); }
.star .ic { width: 21px; height: 21px; transition: transform 0.12s; }
.star.is-on { color: #ffc94d; }
.star.is-on .ic path { fill: currentColor; }
.stars:hover .star { color: #ffc94d; }
.stars:hover .star:hover ~ .star { color: var(--faint); }
.stars:hover .star:hover ~ .star .ic path { fill: none; }
.star:hover .ic { transform: scale(1.15); }
.rating-avg { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.account-page .browse-sub { max-width: 60ch; }
.profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.profile-name { display: flex; flex-direction: column; gap: 6px; flex: 1 1 260px; }
.profile-label { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }
.profile-row { display: flex; gap: 8px; }
.profile-row .input { flex: 1; max-width: 320px; font-size: 16px; font-weight: 600; }
.acct-stats > div { flex-basis: 120px; }
.perks { list-style: none; margin: 18px 0 22px; padding: 0; display: grid; gap: 12px; max-width: 640px; }
.perks li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.perks b { color: var(--text); }
.perks .ic { color: var(--accent); margin-top: 1px; }
.connections { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.connection {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(20, 20, 27, 0.7);
}
.connection-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.connection-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.connection-main small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-tags { max-height: 420px; margin: 0; }
.my-tags .tl-jump { text-decoration: none; }
.danger-row { display: flex; flex-wrap: wrap; gap: 8px; }
.report-item { flex-wrap: wrap; align-items: flex-start; }
.report-item .connection-main { flex-basis: 220px; }
.report-item .connection-main small { white-space: normal; }
.report-item .danger-row { margin-left: auto; }
.report-reasons { color: var(--text); }
.tl-actions button.is-reported { color: #ff8080; opacity: 0.8; }
.btn-danger { color: #ff8080; border-color: color-mix(in srgb, #ff5c5c 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, #ff5c5c 16%, transparent); border-color: #ff5c5c; }
.auth-state p { max-width: 50ch; margin-left: auto; margin-right: auto; }

@media (max-width: 720px) {
  .nav-random span, .account-btn.is-user .account-name { display: none; }
  .account-btn.is-user { padding: 0 4px; }
  .nav a, .nav-random { padding: 7px 9px; }
}
@media (max-width: 520px) {
  .brand { font-size: 18px; }
  .nav { gap: 0; }
  .account-btn:not(.is-user) .account-name { display: none; }
  .account-btn:not(.is-user) { padding: 0 9px; }
  .nav [data-nav="favorites"], .is-signed-in .nav [data-nav="history"] { display: none; }
}

.pl-audio { position: absolute; inset: 0; overflow: hidden; background: #000; }
.pl-audio-bg {
  position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px);
  object-fit: cover; filter: blur(22px) brightness(0.45) saturate(1.2);
}
.pl-audio-badge {
  position: absolute; top: 14px; left: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px; font-weight: 600;
}
.pl-audio-badge > .ic { width: 17px; height: 17px; color: var(--accent); }
.player .pl-audio-show {
  height: 26px; padding: 0 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); font-size: 12.5px; font-weight: 600;
}
.player .pl-audio-show:hover { background: rgba(255, 255, 255, 0.22); }
.player.is-audio video { visibility: hidden; }
.player.is-audio [data-act="pip"] { display: none !important; }
.pl-audiobtn.is-on { color: var(--accent); }
.player.is-mini .pl-audio-badge { display: none; }

.site-footer {
  position: relative; z-index: 1;
  max-width: 1480px; margin: 0 auto;
  padding: 18px clamp(16px, 3vw, 32px) calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13.5px;
}
.footer-links, .about-links { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.footer-links a, .about-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 8px;
  color: var(--muted); text-decoration: none;
}
.footer-links a:hover, .about-links a:hover, .footer-links a.is-on { color: var(--text); background: var(--hover); }
.footer-links .ic, .about-links .ic { width: 16px; height: 16px; }
.footer-note { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--faint); }
.hit-counter { display: inline-flex; align-items: center; gap: 10px; }
.hit-digits {
  display: inline-flex; gap: 2px; padding: 3px;
  border-radius: 5px; background: #000; border: 1px solid #2a2a33;
  box-shadow: inset 0 0 0 1px #000, 0 0 12px rgba(255, 79, 168, 0.08);
}
.hit-digits span {
  display: grid; place-items: center; width: 16px; height: 24px;
  border-radius: 2px;
  background: linear-gradient(#17171d 0 50%, #0d0d11 50% 100%);
  color: #7dff9a; text-shadow: 0 0 6px rgba(125, 255, 154, 0.55);
  font: 700 15px/1 var(--mono);
}
.hit-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }

.about { max-width: 820px; width: 100%; margin: 0 auto; padding: 28px clamp(18px, 4vw, 36px); }
.about h1 { margin: 0 0 12px; font-size: clamp(24px, 4vw, 32px); }
.about h2 { display: flex; align-items: center; gap: 9px; margin: 26px 0 8px; font-size: 18px; }
.about h2 .ic { width: 20px; height: 20px; color: var(--accent); }
.about p { margin: 0; color: var(--muted); max-width: 68ch; }
.about .about-lead { color: var(--text); font-size: 16px; }
.about a:not(.about-links a) { color: var(--accent); }
.about-links { margin-top: 4px; }
.about-links a { border: 1px solid var(--line-strong); }

@media (max-width: 640px) {
  .site-footer { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; }
}
