@font-face {
  font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-var.woff2") format("woff2");
}
:root {
  --bg: #0b0b10;
  --fg: #ffffff;
  --muted: rgba(255,255,255,.62);
  --faint: rgba(255,255,255,.38);
  --glass: rgba(255,255,255,.08);
  --glass-hi: rgba(255,255,255,.16);
  --glass-line: rgba(255,255,255,.13);
  --accent: #7b6cf0;
  --accent2: #4b6bdc;
  --star: #f5c518;
  --gutter: max(16px, 6.25vw);
  --radius: 12px;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-size: clamp(11px, .52vw + 6px, 22px); background: var(--bg); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img { display: block; }
.hidden { display: none !important; }
:focus { outline: none; }
svg.i { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

/* ---------- ambient background ---------- */
#ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.amb {
  position: absolute; inset: -12%; background-size: cover; background-position: center;
  filter: blur(70px) saturate(1.5) brightness(.55); opacity: 0; transform: scale(1.1);
  transition: opacity 1.2s var(--ease);
}
.amb.on { opacity: 1; }
.amb-shade { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, rgba(11,11,16,.15), rgba(11,11,16,.75) 70%, var(--bg)); }

/* ---------- glass ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 40px rgba(0,0,0,.35);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
}

/* ---------- header ---------- */
#top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 1.75rem var(--gutter) 1.5rem;
  background: linear-gradient(rgba(11,11,16,.7), rgba(11,11,16,0));
  transition: opacity .3s;
}
body.login #top, body.playing #top { display: none; }
.brand { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; justify-self: start; }
.brand span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
#tabs { display: flex; gap: .15rem; padding: .3rem; border-radius: 999px; }
#tabs a {
  padding: .75rem 2.3rem; border-radius: 999px; font-size: 1.55rem; font-weight: 500; color: var(--muted);
  transition: background .2s, color .2s; white-space: nowrap; border: 1px solid transparent;
}
#tabs a:hover { color: var(--fg); }
#tabs a.on { background: var(--glass-hi); color: var(--fg); font-weight: 600; border-color: rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.top-right { justify-self: end; display: flex; align-items: center; gap: 1.5rem; }
#clock { font-size: 1.55rem; font-weight: 500; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.avatar {
  width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 1.5rem; background: var(--glass-hi) center/cover no-repeat;
  border: 1px solid var(--glass-line);
}

/* ---------- layout ---------- */
#view { position: relative; z-index: 1; min-height: 100vh; }
.page { padding: 9.5rem var(--gutter) 6rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 3.2rem; }
.page-head h1 { margin: 0; font-size: 4.2rem; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap; }
.page-head h1 small { font-size: 1.6rem; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.sortbtn { display: flex; align-items: center; gap: 1rem; color: var(--faint); font-size: 1.5rem; }
.sortbtn .circ { width: 4rem; height: 4rem; border-radius: 50%; display: grid; place-items: center; }
.sortbtn .circ svg { width: 1.7rem; height: 1.7rem; }
body.kbnav .sortbtn:focus .circ { background: #fff; color: #000; }
body.kbnav .sortbtn:focus { color: var(--fg); }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); gap: 3.2rem 2.5vw; }
.grid.g4 { --cols: 4; }
.card { display: block; scroll-margin: 22vh var(--gutter) 12vh; min-width: 0; }
.card .art {
  position: relative; border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.06);
  aspect-ratio: 2/3; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.card.land .art { aspect-ratio: 16/9; }
.card.square .art { aspect-ratio: 1/1; }
.card .art img { width: 100%; height: 100%; object-fit: cover; }
.noart { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; text-align: center; font-weight: 600; color: var(--muted); font-size: 1.4rem; }
.card .ct { margin-top: .9rem; font-size: 1.45rem; font-weight: 500; color: rgba(255,255,255,.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .cs { margin-top: .25rem; font-size: 1.25rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge {
  position: absolute; top: .8rem; right: .8rem; min-width: 2.3rem; height: 2.3rem; padding: 0 .55rem; border-radius: 999px;
  display: grid; place-items: center; font-size: 1.2rem; font-weight: 600;
  background: rgba(30,30,36,.62); border: 1px solid rgba(255,255,255,.25);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.badge svg { width: 1.2rem; height: 1.2rem; }
.prog { position: absolute; left: .8rem; right: .8rem; bottom: .8rem; height: .35rem; border-radius: 9px; background: rgba(255,255,255,.25); overflow: hidden; }
.prog i { display: block; height: 100%; background: #fff; border-radius: 9px; }
.card:hover .art { transform: translateY(-3px); }
body.kbnav .card:focus .art { transform: scale(1.05); box-shadow: 0 0 0 3px #fff, 0 18px 50px rgba(0,0,0,.6); }
body.kbnav .card:focus .ct { color: #fff; font-weight: 600; }

/* person cards */
.card.person .art { aspect-ratio: 1/1; border-radius: 50%; }
.card.person .ct, .card.person .cs { text-align: center; }

/* ---------- rows ---------- */
.rows { padding: 0 0 6rem; position: relative; z-index: 2; }
.row { margin-top: 3.4rem; }
.row h2 { margin: 0 var(--gutter) 1.4rem; font-size: 2rem; font-weight: 700; }
.scroller {
  display: flex; gap: 1.6vw; overflow-x: auto; overflow-y: visible; scroll-snap-type: x proximity;
  padding: .8rem var(--gutter) 1.4rem; scrollbar-width: none; scroll-padding: 0 var(--gutter);
}
.scroller::-webkit-scrollbar { display: none; }
.scroller .card { flex: none; width: max(120px, 12.4vw); scroll-snap-align: start; }
.scroller .card.land { width: max(220px, 20.8vw); }
.scroller .card.square { width: max(130px, 12.4vw); }
.scroller .card.person { width: max(96px, 8.6vw); }
.scroller .card.ep { width: max(240px, 22vw); }
.card.ep .ov { margin-top: .4rem; font-size: 1.2rem; color: var(--faint); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 86vh; display: flex; align-items: flex-end; transition: opacity .4s; }
.hero.detail { min-height: 78vh; }
.hero.fade { opacity: 0; }
.hero-bg { position: absolute; inset: 0; background: center 20%/cover no-repeat; }
.hero-grad {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11,11,16,.92) 0%, rgba(11,11,16,.55) 38%, rgba(11,11,16,0) 70%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11,11,16,.5) 22%, rgba(11,11,16,0) 50%),
    linear-gradient(180deg, rgba(11,11,16,.55) 0%, rgba(11,11,16,0) 22%);
}
.hero-body { position: relative; padding: 0 var(--gutter) 4.5rem; max-width: min(100%, 58rem + var(--gutter)); }
.hero .logo { max-width: min(38rem, 70vw); max-height: 15rem; object-fit: contain; object-position: left bottom; margin-bottom: 2rem; filter: drop-shadow(0 4px 18px rgba(0,0,0,.5)); }
.htitle { margin: 0 0 1.4rem; font-size: 5rem; line-height: 1.02; font-weight: 800; letter-spacing: -.02em; text-shadow: 0 4px 24px rgba(0,0,0,.5); }
.kicker { font-size: 1.6rem; font-weight: 600; color: rgba(255,255,255,.85); margin-bottom: .6rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .7rem; font-size: 1.6rem; color: rgba(255,255,255,.85); }
.meta .dot { color: var(--faint); }
.meta .star { color: var(--star); }
.meta .rate { border: 1.5px solid rgba(255,255,255,.7); border-radius: 5px; padding: .05rem .5rem; font-size: 1.2rem; font-weight: 600; }
.ov { margin: 1.5rem 0 0; font-size: 1.65rem; line-height: 1.55; color: rgba(255,255,255,.78); max-width: 52rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.detail .ov { -webkit-line-clamp: 5; }
.actions { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 2.8rem; }
.btn {
  display: inline-flex; align-items: center; gap: .7rem; padding: 1.15rem 2.2rem; border-radius: var(--radius);
  font-size: 1.6rem; font-weight: 600; background: rgba(255,255,255,.09); border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: background .2s, color .2s, transform .2s; scroll-margin: 30vh;
}
.btn.primary { background: rgba(255,255,255,.24); }
.btn:hover { background: rgba(255,255,255,.2); }
.btn.on svg { color: var(--accent); }
body.kbnav .btn:focus, body.kbnav #tabs a:focus, body.kbnav .pill:focus, body.kbnav .key:focus, body.kbnav .ib:focus, body.kbnav .avatar:focus, body.kbnav .track:focus, body.kbnav #pop button:focus, body.kbnav .user:focus {
  background: #fff; color: #000; transform: scale(1.04);
}
body.kbnav #tabs a:focus { transform: none; }
.dots { position: absolute; right: var(--gutter); bottom: 5rem; display: flex; gap: .5rem; }
.dots i { width: .6rem; height: .6rem; border-radius: 50%; background: rgba(255,255,255,.3); transition: all .3s; }
.dots i.on { width: 1.8rem; border-radius: 9px; background: #fff; }

/* season pills */
.pills { display: flex; gap: .8rem; overflow-x: auto; scrollbar-width: none; padding: .4rem var(--gutter) .6rem; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; padding: .7rem 1.6rem; border-radius: 999px; font-size: 1.4rem; font-weight: 500; color: var(--muted); border: 1px solid var(--glass-line); background: rgba(255,255,255,.05); }
.pill.on { background: var(--glass-hi); color: #fff; font-weight: 600; }

/* ---------- album ---------- */
.album { display: grid; grid-template-columns: minmax(0, 28rem) 1fr; gap: 4rem; align-items: start; }
.album .cover { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: rgba(255,255,255,.06); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.album .cover img { width: 100%; height: 100%; object-fit: cover; }
.album h1 { margin: 0 0 .6rem; font-size: 4rem; font-weight: 800; letter-spacing: -.02em; }
.album .by { font-size: 1.7rem; color: var(--muted); }
.tracks { margin-top: 2.4rem; display: flex; flex-direction: column; gap: .2rem; }
.track { display: grid; grid-template-columns: 3rem 1fr auto; gap: 1rem; align-items: center; text-align: left; padding: 1rem 1.2rem; border-radius: 10px; font-size: 1.5rem; scroll-margin: 25vh; }
.track:hover { background: rgba(255,255,255,.07); }
.track .n { color: var(--faint); font-variant-numeric: tabular-nums; }
.track .d { color: var(--faint); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.track.now { color: var(--accent); }

/* ---------- search ---------- */
.search { display: grid; grid-template-columns: minmax(0, 34rem) 1fr; gap: 6rem; }
.q {
  width: 100%; font: inherit; font-size: 2.3rem; color: #fff; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.3);
  padding: .9rem 0 1.1rem; caret-color: var(--accent); scroll-margin: 30vh;
}
.q::placeholder { color: var(--faint); }
.q:focus { border-bottom-color: #fff; }
.kb { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; margin-top: 2.6rem; }
.key { height: 4.6rem; border-radius: 10px; font-size: 1.8rem; color: rgba(255,255,255,.8); display: grid; place-items: center; }
.key:hover { background: rgba(255,255,255,.08); }
.key.wide { grid-column: span 3; font-size: 1.5rem; }
.res-col h2 { margin: 1rem 0 2.4rem; font-size: 2rem; font-weight: 700; }
.empty { color: var(--faint); font-size: 1.6rem; padding: 2rem 0; }

/* ---------- login ---------- */
.login-wrap { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 3rem 16px; overflow: hidden; }
.lg-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; overflow: hidden; background: #09090f url("img/login-bg.svg") center/cover no-repeat; }
.blob { position: absolute; width: 50vmax; height: 50vmax; border-radius: 50%; filter: blur(80px); opacity: .45; animation: drift 26s ease-in-out infinite alternate; }
.b1 { background: #6d4cf0; left: -8vmax; top: -10vmax; }
.b2 { background: #1f6be0; right: -10vmax; bottom: -14vmax; animation-delay: -9s; animation-duration: 32s; }
.b3 { background: #c03f98; left: 35vw; top: 30vh; width: 34vmax; height: 34vmax; opacity: .25; animation-delay: -17s; animation-duration: 38s; }
.lg-wall.tiles { opacity: .35; }
.tile { display: block; width: 100%; aspect-ratio: 2/3; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.tile.t0 { background: linear-gradient(160deg, #6d4cf0, #1b1640); }
.tile.t1 { background: linear-gradient(160deg, #1f6be0, #0d1a33); }
.tile.t2 { background: linear-gradient(160deg, #c03f98, #2a1026); }
.tile.t3 { background: linear-gradient(160deg, #20b6c9, #0b2328); }
.tile.t4 { background: linear-gradient(160deg, #e07a3a, #2b160b); }
.tile.t5 { background: linear-gradient(160deg, #3a3a52, #121218); }
.tile.t6 { background: linear-gradient(160deg, #8b6cf0, #4b6bdc); }
.tile.t7 { background: linear-gradient(160deg, #d9b44a, #2a210b); }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vw, 4vh) scale(1.12); } 100% { transform: translate(-4vw, 8vh) scale(.95); } }
.lg-wall {
  position: absolute; inset: -30% -20%; display: flex; gap: 1.6rem; justify-content: center;
  transform: rotate(-12deg); opacity: .7;
}
.lg-col { display: flex; flex-direction: column; gap: 1.6rem; flex: none; width: 13rem; animation: wall linear infinite; }
.lg-col img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); background: rgba(255,255,255,.05); }
@keyframes wall { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.lg-shade { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(45% 55% at 50% 50%, rgba(8,8,13,.7), rgba(8,8,13,.25) 100%); }
@media (prefers-reduced-motion: reduce) { .blob, .lg-col { animation: none; } }

.lg-gear { position: fixed; top: 2rem; right: var(--gutter); z-index: 3; width: 4.4rem; height: 4.4rem; color: rgba(255,255,255,.85); }
.lg-gear svg { width: 2.1rem; height: 2.1rem; transition: transform .6s var(--ease); }
.lg-gear:hover svg, body.kbnav .lg-gear:focus svg { transform: rotate(90deg); }
body.kbnav .lg-gear:focus { background: #fff; color: #000; }

.login-card {
  position: relative; z-index: 2; width: min(44rem, 100%); padding: 3.6rem 3.6rem 3rem; border-radius: 28px;
  background: rgba(20,20,28,.55); border-color: rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 30px 80px rgba(0,0,0,.55);
  animation: rise .6s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.login-card.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.lg-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 3.2rem; }
.lg-head .brand { font-size: 2.2rem; }
.srv-chip { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem 1rem; border-radius: 999px; font-size: 1.2rem; color: var(--muted); background: rgba(255,255,255,.06); border: 1px solid var(--glass-line); max-width: 55%; }
.srv-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sdot { width: .7rem; height: .7rem; border-radius: 50%; background: #999; flex: none; animation: blink 1.2s infinite; }
.srv-chip.ok .sdot { background: #3ddc84; box-shadow: 0 0 10px #3ddc84; animation: none; }
.srv-chip.bad .sdot { background: #ff5d5d; animation: none; }
@keyframes blink { 50% { opacity: .3; } }
.greet { margin: 0; font-size: 3.4rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.greet-sub { margin: .7rem 0 2.6rem; font-size: 1.55rem; color: var(--muted); }

.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: .35rem; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid var(--glass-line); margin-bottom: 2.2rem; }
.seg button { position: relative; z-index: 1; padding: .9rem 0; border-radius: 10px; font-size: 1.4rem; font-weight: 600; color: var(--muted); transition: color .25s; }
.seg button.on { color: #fff; }
.seg-thumb { position: absolute; top: .35rem; bottom: .35rem; left: .35rem; width: calc(50% - .35rem); border-radius: 10px; background: rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); transition: transform .3s var(--ease); }
.seg[data-m="qc"] .seg-thumb { transform: translateX(100%); }
body.kbnav .seg button:focus { color: #000; background: #fff; }

.fl { position: relative; margin-bottom: 1.4rem; }
.fl input {
  width: 100%; font: inherit; font-size: 1.65rem; color: #fff; padding: 2.3rem 1.5rem .8rem; border-radius: 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); transition: border-color .2s, box-shadow .2s, background .2s; scroll-margin: 20vh;
}
.fl input:focus { border-color: var(--accent); background: rgba(255,255,255,.09); box-shadow: 0 0 0 4px rgba(123,108,240,.25); }
.fl label { position: absolute; left: 1.55rem; top: 1.65rem; font-size: 1.6rem; color: var(--faint); pointer-events: none; transition: all .18s var(--ease); }
.fl input:focus + label, .fl input:not(:placeholder-shown) + label { top: .75rem; font-size: 1.15rem; color: var(--muted); font-weight: 500; }
.fl input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 100px #23222e inset; caret-color: #fff; }
.fl #pw { padding-right: 5rem; }
.eye { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); width: 3.6rem; height: 3.6rem; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.eye:hover { color: #fff; background: rgba(255,255,255,.08); }
.eye svg { width: 2rem; height: 2rem; }
body.kbnav .eye:focus { background: #fff; color: #000; }

.btn.cta {
  width: 100%; justify-content: center; margin-top: 1rem; padding: 1.4rem; border: 0; border-radius: 14px; font-size: 1.7rem; font-weight: 700;
  background: linear-gradient(135deg, #8b6cf0, #4b6bdc); box-shadow: 0 10px 30px rgba(91,90,230,.4), inset 0 1px 0 rgba(255,255,255,.3); position: relative;
}
.btn.cta:hover { filter: brightness(1.1); background: linear-gradient(135deg, #8b6cf0, #4b6bdc); }
body.kbnav .btn.cta:focus { background: linear-gradient(135deg, #8b6cf0, #4b6bdc); color: #fff; box-shadow: 0 0 0 3px #fff, 0 10px 30px rgba(91,90,230,.5); }
.btn.cta.busy span { visibility: hidden; }
.btn.cta.busy::after { content: ""; position: absolute; width: 2rem; height: 2rem; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }

.qc { text-align: center; }
.qc-digits { display: flex; justify-content: center; gap: .7rem; margin: .4rem 0 2rem; min-height: 6.6rem; align-items: center; }
.qc-digits span { width: 4.8rem; height: 6.4rem; display: grid; place-items: center; font-size: 3.2rem; font-weight: 800; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); font-variant-numeric: tabular-nums; animation: rise .4s var(--ease) both; }
.qc-digits span:nth-child(2) { animation-delay: .05s; } .qc-digits span:nth-child(3) { animation-delay: .1s; }
.qc-digits span:nth-child(4) { animation-delay: .15s; } .qc-digits span:nth-child(5) { animation-delay: .2s; } .qc-digits span:nth-child(6) { animation-delay: .25s; }
.qc-wait { display: inline-flex; align-items: center; gap: .8rem; font-size: 1.4rem; color: var(--muted); }
.pulse { width: .9rem; height: .9rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(123,108,240,.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(123,108,240,0); } 100% { box-shadow: 0 0 0 0 rgba(123,108,240,0); } }
.qc-help { margin: 1.6rem 0 1.8rem; font-size: 1.4rem; line-height: 1.55; color: var(--muted); }
.qc-help b { color: #fff; }

.err { color: #ff8a8a; font-size: 1.4rem; min-height: 1.6rem; margin-top: 1.4rem; text-align: center; line-height: 1.5; }
.err a { color: #fff; text-decoration: underline; }
.users { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem; }
.users:not(:empty) { margin-bottom: 2.4rem; }
.user { display: flex; flex-direction: column; align-items: center; gap: .6rem; font-size: 1.3rem; padding: .8rem; border-radius: 12px; }
.user .avatar { width: 6rem; height: 6rem; font-size: 2.2rem; }

/* ---------- settings ---------- */
.settings { position: relative; z-index: 1; max-width: calc(76rem + 2 * var(--gutter)); margin: 0 auto; }
body.login .settings { padding-top: 5rem; }
.back-btn { margin-bottom: 1rem; }
.set-card { border-radius: 20px; padding: 2.6rem 2.8rem; margin-bottom: 2rem; background: rgba(255,255,255,.05); }
.set-card h2 { margin: 0 0 .4rem; font-size: 2rem; font-weight: 700; }
.set-help { margin: 0 0 1.8rem; font-size: 1.4rem; color: var(--muted); line-height: 1.5; }
.set-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.set-row .fl { margin: 0; }
.set-row .btn { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.set-row .btn.cta { width: auto; margin: 0; padding-left: 2.6rem; padding-right: 2.6rem; }
.grow { flex: 1; min-width: 14rem; }
.set-status { margin-top: 1.2rem; font-size: 1.4rem; color: var(--muted); min-height: 1.6rem; }
.set-status.ok { color: #3ddc84; }
.set-status.bad { color: #ff8a8a; }
.chips { display: flex; flex-wrap: wrap; gap: .8rem; }
.chip { padding: .9rem 1.6rem; border-radius: 999px; font-size: 1.4rem; font-weight: 500; color: var(--muted); border: 1px solid var(--glass-line); background: rgba(255,255,255,.05); }
.chip:hover { color: #fff; }
.chip.on { background: linear-gradient(135deg, #8b6cf0, #4b6bdc); color: #fff; border-color: transparent; font-weight: 600; }
body.kbnav .chip:focus { background: #fff; color: #000; }
.acct .avatar { width: 5rem; height: 5rem; font-size: 2rem; }
.acct b { font-size: 1.7rem; }
.acct .set-help { margin: .2rem 0 0; }
.set-foot { text-align: center; color: var(--faint); font-size: 1.2rem; margin-top: 3rem; }

/* ---------- popover ---------- */
#pop { position: fixed; z-index: 60; min-width: 22rem; padding: .6rem; border-radius: 16px; background: rgba(28,28,36,.82); }
#pop h4 { margin: .8rem 1.2rem .4rem; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 600; }
#pop button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1.5rem; padding: .9rem 1.2rem; border-radius: 10px; font-size: 1.45rem; text-align: left; }
#pop button:hover { background: rgba(255,255,255,.1); }
#pop button.sel::after { content: "✓"; color: var(--accent); font-weight: 700; }
#pop hr { border: 0; border-top: 1px solid var(--glass-line); margin: .5rem .4rem; }
#pop .who { padding: .9rem 1.2rem .5rem; font-weight: 700; font-size: 1.6rem; }

/* ---------- toast & spinner ---------- */
#toast { position: fixed; left: 50%; bottom: 3rem; transform: translate(-50%, 2rem); opacity: 0; z-index: 90; padding: 1rem 1.8rem; border-radius: 12px; background: rgba(28,28,36,.92); border: 1px solid var(--glass-line); font-size: 1.45rem; transition: all .3s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.spin { width: 4rem; height: 4rem; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: #fff; animation: spin .8s linear infinite; }
.center { min-height: 70vh; display: grid; place-items: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.sentinel { height: 1px; }

/* ---------- player ---------- */
#player { position: fixed; inset: 0; z-index: 50; background: #000; }
#player video { width: 100%; height: 100%; background: #000; }
#player .p-top {
  position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 1.4rem; padding: 2rem var(--gutter) 4rem;
  background: linear-gradient(rgba(0,0,0,.75), rgba(0,0,0,0)); transition: opacity .35s;
}
#player.idle .p-top { opacity: 0; pointer-events: none; }
#player.idle { cursor: none; }
.p-title { flex: 1; min-width: 0; }
.p-title b { display: block; font-size: 2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-title span { font-size: 1.4rem; color: var(--muted); }
.ib { width: 4.2rem; height: 4.2rem; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ib:hover { background: rgba(255,255,255,.12); }
.ib svg { width: 1.9rem; height: 1.9rem; }
#player .p-load { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
#player .p-err { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 1.7rem; color: var(--muted); padding: 2rem; }
.p-next { position: absolute; right: var(--gutter); bottom: 9rem; }

/* ---------- audio bar ---------- */
#audiobar {
  position: fixed; z-index: 40; left: 50%; bottom: 1.6rem; transform: translateX(-50%); width: min(62rem, calc(100vw - 32px));
  display: flex; align-items: center; gap: 1rem; padding: .7rem 1rem .7rem .7rem; border-radius: 18px; background: rgba(28,28,36,.75);
}
#ab-art { width: 4.8rem; height: 4.8rem; border-radius: 10px; object-fit: cover; background: rgba(255,255,255,.08); }
.ab-meta { flex: 1; min-width: 0; }
#ab-title { font-weight: 600; font-size: 1.45rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ab-artist { font-size: 1.25rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-prog { height: .3rem; border-radius: 9px; background: rgba(255,255,255,.18); margin-top: .5rem; overflow: hidden; }
.ab-prog i { display: block; height: 100%; width: 0; background: #fff; }
body.playing #audiobar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1500px) { .grid { --cols: 5; } }
@media (max-width: 1150px) { .grid { --cols: 4; } .grid.g4 { --cols: 3; } }
@media (max-width: 900px) {
  html { font-size: 12px; }
  #top { grid-template-columns: auto 1fr auto; gap: 12px; padding: 14px 16px; }
  #tabs { overflow-x: auto; scrollbar-width: none; justify-self: center; max-width: 100%; }
  #tabs::-webkit-scrollbar { display: none; }
  #tabs a { padding: .7rem 1.3rem; font-size: 1.35rem; }
  #clock { display: none; }
  .brand { font-size: 1.7rem; }
  .search { grid-template-columns: 1fr; gap: 2rem; }
  .album { grid-template-columns: 1fr; }
  .album .cover { max-width: 22rem; }
}
@media (max-width: 700px) {
  .grid, .grid.g4 { --cols: 3; gap: 2rem 12px; }
  .kb { display: none; }
  #top .brand { display: none; }
  #top { grid-template-columns: 1fr auto; }
  #tabs { justify-self: start; }
  .htitle { font-size: 3.6rem; }
  .hero { min-height: 72vh; }
  .hero-grad { background: linear-gradient(0deg, var(--bg) 0%, rgba(11,11,16,.75) 45%, rgba(11,11,16,.2) 100%); }
  .page { padding-top: 7.5rem; }
  .page-head h1 { font-size: 3rem; }
  .login-card { padding: 2.4rem; }
}
@media (max-width: 420px) { .grid, .grid.g4 { --cols: 2; } }

/* ---------- TV app ---------- */
html.tv, html.tv body { scrollbar-width: none; }
html.tv ::-webkit-scrollbar { display: none; }
html.tv .card:hover .art { transform: none; }
html.phoneapp, html.phoneapp body { scrollbar-width: none; }
html.phoneapp ::-webkit-scrollbar { display: none; }

/* ---------- standalone: choose a server ---------- */
button.srv-chip { cursor: pointer; font: inherit; font-size: 1.2rem; }
button.srv-chip:hover { color: #fff; border-color: rgba(255,255,255,.3); }
body.kbnav button.srv-chip:focus { background: #fff; color: #000; }
.found { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1.8rem; }
.found-scan { display: flex; align-items: center; gap: .9rem; color: var(--muted); font-size: 1.4rem; padding: .6rem .2rem; }
.srv-found {
  display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; text-align: left; width: 100%;
  padding: 1.2rem 1.5rem; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  transition: background .2s, border-color .2s; scroll-margin: 20vh;
}
.srv-found b { font-size: 1.6rem; }
.srv-found span { font-size: 1.3rem; color: var(--muted); }
.srv-found:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); }
body.kbnav .srv-found:focus { background: #fff; color: #000; }
body.kbnav .srv-found:focus span { color: #333; }

/* ---------- live tv ---------- */
.live .page-head { flex-wrap: wrap; }
.live-tabs { display: flex; gap: .8rem; }
.btn.sm { padding: .7rem 1.4rem; font-size: 1.35rem; border-radius: 10px; }
.btn:disabled { opacity: .35; pointer-events: none; }
.sec { margin: 3.2rem 0 1.6rem; font-size: 2rem; font-weight: 700; }
.sec:first-child { margin-top: 0; }

.guide { --chw: 17rem; --rowh: 6.4rem; display: flex; flex-direction: column; gap: .6rem; }
.g-head { display: grid; grid-template-columns: var(--chw) 1fr; gap: 1rem; align-items: end; position: sticky; top: 8.5rem; z-index: 3;
  padding: .8rem 0; background: linear-gradient(rgba(11,11,16,.92), rgba(11,11,16,.75)); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.g-nav { display: flex; gap: .5rem; flex-wrap: wrap; }
.g-times { position: relative; height: 2.4rem; }
.g-times span { position: absolute; bottom: 0; transform: translateX(-2px); font-size: 1.3rem; color: var(--muted); white-space: nowrap; padding-left: .5rem; border-left: 1px solid rgba(255,255,255,.18); }
.g-row { display: grid; grid-template-columns: var(--chw) 1fr; gap: 1rem; height: var(--rowh); }
.g-ch { display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; border-radius: 12px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08); min-width: 0; scroll-margin: 22vh var(--gutter); }
.g-ch img { width: 5.6rem; height: 3.6rem; object-fit: contain; flex: none; }
.g-ch span { font-size: 1.3rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-ch:hover { background: rgba(255,255,255,.1); }
.g-line { position: relative; border-radius: 12px; background: rgba(255,255,255,.025); }
.g-prog { position: absolute; top: 0; bottom: 0; padding: .7rem 1rem; border-radius: 10px; text-align: left; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: .2rem; min-width: 0;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09); box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  transition: background .15s, transform .15s; scroll-margin: 22vh var(--gutter); }
.g-prog { margin-right: 3px; }
.g-prog b { font-size: 1.35rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-prog span { font-size: 1.15rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-prog.now { background: rgba(123,108,240,.22); border-color: rgba(139,108,240,.45); }
.g-prog.rec b::before { content: "●"; color: #ff5d5d; margin-right: .5rem; font-size: 1rem; vertical-align: middle; }
.g-prog.empty { background: transparent; border-style: dashed; }
.g-prog:hover { background: rgba(255,255,255,.14); }
.g-now { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #ff5d5d; box-shadow: 0 0 8px #ff5d5d; z-index: 2; pointer-events: none; }
.g-times .g-now { top: 0; bottom: -.6rem; }
body.kbnav .g-prog:focus, body.kbnav .g-ch:focus { background: #fff; color: #000; z-index: 4; }
body.kbnav .g-prog:focus span, body.kbnav .g-ch:focus span { color: #333; }

.logo-art { position: absolute; inset: 0; display: grid; place-items: center; padding: 14%;
  background: radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,.12), rgba(255,255,255,.03)); }
.logo-art img { max-width: 100%; max-height: 100%; width: auto !important; height: auto !important; object-fit: contain; }
.logo-art span { font-weight: 700; font-size: 1.6rem; text-align: center; }
.live-badge { position: absolute; top: .8rem; left: .8rem; padding: .2rem .7rem; border-radius: 6px; font-size: 1.05rem; font-weight: 800; letter-spacing: .06em;
  background: #e53935; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.chan-grid { --cols: 5; }

.pg-info { max-width: 38rem; padding: 1rem 1.2rem .8rem; }
.pg-info b { font-size: 1.8rem; display: block; }
.pg-ep { font-size: 1.4rem; color: rgba(255,255,255,.85); margin-top: .2rem; }
.pg-time { font-size: 1.25rem; color: var(--muted); margin-top: .5rem; }
.pg-info p { font-size: 1.35rem; line-height: 1.5; color: rgba(255,255,255,.78); margin: .9rem 0 .2rem; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

.sched { display: flex; flex-direction: column; gap: .6rem; }
.sched-row { display: flex; align-items: center; gap: 1.4rem; padding: 1.2rem 1.6rem; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.sched-row b { display: block; font-size: 1.5rem; }
.sched-row span { font-size: 1.25rem; color: var(--muted); }

@media (max-width: 1150px) { .chan-grid { --cols: 3; } }
@media (max-width: 700px) {
  .guide { --chw: 7.4rem; --rowh: 5.6rem; }
  .g-ch { flex-direction: column; justify-content: center; gap: .3rem; padding: .4rem; }
  .g-ch img { width: 4.4rem; height: 2.6rem; }
  .g-ch span { font-size: 1rem; max-width: 100%; }
  .g-head { top: 6.6rem; }
  .chan-grid { --cols: 2; }
}
.g-nav .btn.sm { min-width: 4.4rem; justify-content: center; }
.chan .logo-art { padding: 10% 18% 22%; }
.g-no { font-style: normal; font-size: 1.25rem; font-weight: 700; color: var(--muted); min-width: 2.6rem; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .g-head { grid-template-columns: var(--chw) 1fr; row-gap: .6rem; }
  .g-nav { grid-column: 1 / -1; flex-direction: row; }
  .g-times { grid-column: 2; }
  .g-times span { font-size: 1.1rem; }
  .g-ch .g-no { display: none; }
}

/* ---------- play tiles: picture plays, text links open the show / season / episode pages ---------- */
.card-art { display: block; scroll-margin: 22vh var(--gutter) 12vh; }
.card-txt a { color: inherit; border-radius: 4px; scroll-margin: 22vh var(--gutter) 12vh; }
.card-txt a.ct { display: block; }
.card-txt a:hover { text-decoration: underline; text-underline-offset: 3px; color: #fff; }
.card.split:hover .art { transform: translateY(-3px); }
html.tv .card.split:hover .art { transform: none; }
body.kbnav .card-art:focus .art { transform: scale(1.05); box-shadow: 0 0 0 3px #fff, 0 18px 50px rgba(0,0,0,.6); }
body.kbnav .card-art:focus + .card-txt .ct { color: #fff; font-weight: 600; }
body.kbnav .card-txt a:focus { text-decoration: underline; text-underline-offset: 3px; color: #fff; }

/* ---------- top bar hides on scroll down ---------- */
#top { transition: transform .35s var(--ease), opacity .3s; }
body.tophide #top { transform: translateY(-110%); opacity: 0; pointer-events: none; }
.g-head { transition: top .35s var(--ease); }
body.tophide .g-head { top: 0; }
