:root {
  --z-font: Inter, system-ui, sans-serif;
  --bg: #000000;
  --card: rgba(16, 16, 18, 0.72);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --muted: #9ca3af;
  --join: #22c55e;
  --glow: rgba(255, 255, 255, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--z-font);
  overflow-x: hidden;
}

body.cursor-none {
  cursor: none;
}

body.cursor-none a,
body.cursor-none button,
body.cursor-none input[type="range"],
body.cursor-none [role="button"] {
  cursor: none;
}

body.cursor-none .gate {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* background video */
.bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45) saturate(0.85);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.bg-fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: transparent;
}

/* background rain */
#rain-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* cursor trail */
#trail-canvas {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* custom PNG cursor — DOM layer (works where CSS url() fails) */
.cursor-3d {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  pointer-events: none;
  transform-origin: center center;
  will-change: transform;
}

.cursor-3d img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.55));
  transform-style: preserve-3d;
}

/* gate */
.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.gate.is-off {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate p {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.85);
}

/* 3D tilt container */
.perspective-wrap {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 96px;
  perspective: 1100px;
  perspective-origin: 50% 42%;
}

/* main stack — mouse-tilted in 3D */
.stack {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 520px;
}

/* guns.lol-style centered profile */
.profile-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  width: 100%;
}

.hero-av {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.hero-av.hidden {
  display: none;
}

.display-name {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--name, #7cff3a);
  text-shadow: 0 0 18px color-mix(in srgb, var(--name, #7cff3a) 45%, transparent);
}

.display-name--rainbow,
.display-name--rainbow #name {
  background: linear-gradient(90deg, #ffffff, #c9ccd2, #ffffff, #c9ccd2, #ffffff);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  animation: name-rainbow 4s linear infinite;
}

@keyframes name-rainbow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.display-name .gem {
  font-size: 1rem;
  margin-left: 4px;
  vertical-align: middle;
}

.brand-line {
  margin: -4px 0 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}

.brand-line:empty {
  display: none;
}

.badge-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  min-height: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

.badge-row::-webkit-scrollbar {
  display: none;
}

.badge-row.hidden {
  display: none !important;
}

.badge-row .badge-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-radius: 4px;
  opacity: 0.98;
  flex-shrink: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.badge-row a.badge-ico:hover,
.badge-row a.badge-ico:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

.badge-row .badge-ico img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

.profile-center .bio {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
  max-width: 320px;
}

.profile-center .bio:empty,
.profile-center .joined:empty {
  display: none;
}

.profile-center .joined {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* legacy card styles kept for subcards */
.card {
  width: 100%;
  max-width: 440px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 22px 20px 18px;
  position: relative;
}

/* subcards */
.subcards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 0;
  width: 100%;
  max-width: 440px;
}

.subcards--single {
  grid-template-columns: 1fr;
}

@media (max-width: 400px) {
  .subcards {
    grid-template-columns: 1fr;
  }
}

.sub--friend strong {
  font-weight: 600;
}

.sub {
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 72px;
}

.pres-av-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.pres-av-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.pres-av-wrap .dnd {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ed4245;
  border: 2px solid #111;
}

.pres-av-wrap.hidden {
  display: none;
}

.sub strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.sub p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.server-card {
  gap: 12px;
  align-items: flex-start;
}

.srv-av {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.srv-av .srv-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.srv-av .srv-icon.hidden {
  display: none !important;
}

.srv-av .srv-fallback {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #fca5a5;
  font-weight: 800;
  font-size: 15px;
}

.srv-av.has-icon .srv-fallback {
  display: none;
}

.srv-body {
  flex: 1;
  min-width: 0;
}

.srv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.srv-head span.title {
  font-size: 13px;
  font-weight: 600;
}

.disc-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #5865f2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.disc-ico-img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.join-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 14px;
  border-radius: 8px;
  background: var(--join);
  color: #052e16;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.join-btn:hover {
  filter: brightness(1.08);
}

.join-btn.hidden {
  display: none;
}

.foot {
  display: none;
}

.foot--views-only {
  display: none;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.socials.hidden {
  display: none;
}

.social-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s;
}

.social-ico:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
}

.social-ico--tiktok {
  background: rgba(0, 0, 0, 0.55);
}

.social-ico-img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

/* bottom-left views (guns.lol style) */
.views-fixed {
  position: fixed;
  left: 18px;
  bottom: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  pointer-events: none;
  user-select: none;
}

.views-eye {
  display: block;
  opacity: 0.85;
}

.views {
  display: none;
}

.views-label {
  display: none;
}

/* player */
.player-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
}

.pb-art {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.pb-main {
  flex: 1;
  min-width: 0;
}

.pb-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pb-seek {
  display: grid;
  grid-template-columns: minmax(2.75rem, auto) 1fr minmax(2.75rem, auto);
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
}

.pb-seek .pb-time {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pb-seek #t-curr {
  grid-column: 1;
  grid-row: 1;
}

.pb-seek #t-dur {
  grid-column: 3;
  grid-row: 1;
  text-align: right;
}

.pb-seek input[type="range"] {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  height: 4px;
  accent-color: #a78bfa;
  cursor: pointer;
}

.pb-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.pb-btns .pb-text-btn {
  box-sizing: border-box;
  min-width: 44px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.pb-btns .pb-text-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px), (pointer: coarse) {
  .player-card {
    flex-wrap: wrap;
    row-gap: 14px;
    column-gap: 12px;
  }

  /* Times on their own row so they never crowd the transport icons */
  .pb-seek {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 10px;
  }

  .pb-seek #t-curr {
    grid-column: 1;
    grid-row: 1;
  }

  .pb-seek #t-dur {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .pb-seek input[type="range"] {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 28px;
    padding: 12px 0;
    box-sizing: content-box;
  }

  .pb-btns {
    width: 100%;
    justify-content: center;
    gap: 12px;
    padding-top: 2px;
  }

  .pb-btns .pb-text-btn {
    min-width: 52px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 13px;
  }
}

.player-card.hidden {
  display: none;
}

/* hidden host for YouTube IFrame API (audio driven by custom bar) */
.yt-player-host {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 160px;
  height: 90px;
  opacity: 0.02;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* liquid glass panels + FG server card */
.glass-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%}
.glass{display:flex;align-items:center;gap:12px;padding:16px 14px;border-radius:24px;color:#fff;text-decoration:none;border:1px solid rgba(255,255,255,.24);background:linear-gradient(135deg,rgba(255,255,255,.2),rgba(255,255,255,.04) 45%,rgba(255,255,255,.12));-webkit-backdrop-filter:blur(16px) saturate(1.7) brightness(1.1);backdrop-filter:blur(16px) saturate(1.7) brightness(1.1);box-shadow:inset 0 1.5px 0 rgba(255,255,255,.65),inset 0 -1px 0 rgba(255,255,255,.14),inset 0 0 26px rgba(255,255,255,.08),0 20px 50px rgba(0,0,0,.5);transition:border-color .25s,transform .25s}
.glass .ico{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.28);box-shadow:inset 0 1px 0 rgba(255,255,255,.5)}
.glass .meta{display:flex;flex-direction:column;min-width:0;flex:1}
.glass .meta strong{font-size:15px;font-weight:700}
.glass .meta small{font-size:12px;color:var(--muted)}
.fg{width:100%;gap:14px}
.fg .srv-av{width:52px;height:52px}
.fg .srv-fallback{color:#fff}
.fg .srv-body strong{display:block;font-size:17px;font-weight:700}
.fg .srv-body small{font-size:12px;color:var(--muted)}
.fg .pill{display:inline-block;margin-bottom:4px;padding:2px 9px;border-radius:99px;font-size:10px;font-weight:600;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.22)}
.fg-join{flex:none;padding:10px 22px;border-radius:99px;background:linear-gradient(180deg,#fff,#cfd1d6);color:#0b0b0d;font-size:13px;font-weight:700;text-decoration:none}
@media (max-width:480px){.glass-row{grid-template-columns:1fr}}

.glass{transition:transform .28s cubic-bezier(.22,1,.36,1),border-color .25s,box-shadow .25s}
.glass:hover{transform:translateY(-4px) scale(1.035);border-color:rgba(255,255,255,.55);box-shadow:inset 0 1.5px 0 rgba(255,255,255,.8),inset 0 0 30px rgba(255,255,255,.12),0 26px 60px rgba(0,0,0,.55),0 0 36px rgba(255,255,255,.12)}
.fg-join{transition:transform .2s}.fg-join:hover{transform:scale(1.08)}
.glass .ico--av{position:relative;overflow:hidden;padding:0;width:46px;height:46px}
.ico--av img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%}
#rb-av{opacity:0;transition:opacity .3s}
.ico--av.has-av #rb-av{opacity:1}
.ico--av.has-av .ico-fallback{display:none}
.name-row{display:flex;align-items:center;justify-content:center;gap:10px}
.name-spider{width:2.2rem;height:2.2rem;object-fit:contain;filter:drop-shadow(0 0 10px rgba(255,255,255,.45))}
.nohappy{margin:-6px 0 0;font-size:12px;letter-spacing:.14em;color:var(--muted)}
.fg .srv-av{border-radius:50%}

.glass:focus-visible{outline:2px solid rgba(255,255,255,.7);outline-offset:3px}
.glass{position:relative}
.glass::before{content:"";position:absolute;inset:-6px;z-index:-1;border-radius:inherit}

/* v6: fix hover flicker (3D layers were z-fighting with the tilted stack) */
.stack{transform-style:flat}
.glass{will-change:transform}

/* v7: performance — lighter glass blur + shadows (same look, far less GPU work per frame) */
.glass{-webkit-backdrop-filter:blur(10px) saturate(1.3);backdrop-filter:blur(10px) saturate(1.3);box-shadow:inset 0 1.5px 0 rgba(255,255,255,.65),inset 0 -1px 0 rgba(255,255,255,.14),inset 0 0 26px rgba(255,255,255,.08),0 14px 34px rgba(0,0,0,.45)}
.glass:hover{box-shadow:inset 0 1.5px 0 rgba(255,255,255,.8),inset 0 0 30px rgba(255,255,255,.12),0 18px 40px rgba(0,0,0,.5),0 0 28px rgba(255,255,255,.1)}
.glass .ico{box-shadow:none}
@media (prefers-reduced-motion:reduce){.display-name--rainbow,.display-name--rainbow #name{animation:none}}

/* ======================= v8: music worlds ======================= */
@property --accent { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
:root { --accent: #ffffff; --accent-rgb: 255,255,255; transition: --accent 1.2s ease; }

/* per-song background video + darkness */
.world-v { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
.world-v.on { opacity: 1; }
.world-dim { position: fixed; inset: 0; z-index: 0; background: #000; opacity: 1; transition: opacity 1.4s ease; pointer-events: none; }

/* beat glow — accent light breathing in from the edges */
.beat-glow { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(var(--accent-rgb), .22) 100%); will-change: opacity; }

/* lyrics: letters rain in, light up as they're sung, then fall away */
.lyric-wrap { width: 100%; height: 0; display: grid; place-items: center; margin: -9px 0; transition: height .5s ease, margin .5s ease; }
.lyric-wrap.on { height: 64px; margin: -4px 0 -6px; }
.lyric { position: relative; margin: 0; width: 100%; min-height: 64px; display: grid; place-items: center; text-align: center; }
.lyric-line { grid-area: 1 / 1; max-width: 100%; padding: 0 10px; box-sizing: border-box; font-family: "Space Grotesk", Inter, sans-serif; font-weight: 600; font-size: 21px; line-height: 1.28; letter-spacing: -.01em; text-transform: lowercase; color: rgba(255,255,255,.26); }
.lw { display: inline-block; white-space: nowrap; }
.lc { display: inline-block; transition: color .18s ease, text-shadow .25s ease; }
.lyric-line.in .lc { animation: lc-in .55s cubic-bezier(.2,.9,.25,1.15) both; animation-delay: var(--d); }
.lyric-line.out .lc { animation: lc-out .6s cubic-bezier(.55,0,.9,.4) both; animation-delay: calc(var(--d) * .6); }
.lc.lit { color: #fff; text-shadow: 0 0 14px rgba(var(--accent-rgb), .75), 0 0 2px rgba(255,255,255,.6); }
@keyframes lc-in { 0% { opacity: 0; transform: translate(var(--x), calc(var(--h) * -1)) scaleY(1.9); } 60% { opacity: 1; transform: translate(0, 2px) scaleY(.92); } 100% { opacity: 1; transform: none; } }
@keyframes lc-out { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(calc(var(--x) * -.6), var(--h)) scaleY(1.7); } }

/* now playing */
.np { width: 100%; gap: 14px; padding: 12px 14px 10px 12px; align-items: center; }
.np-art { position: relative; flex: none; width: 58px; height: 58px; border-radius: 16px; border: 1px solid rgba(255,255,255,.28); color: #fff; cursor: pointer;
  background: radial-gradient(circle at 30% 25%, rgba(var(--accent-rgb), .55), rgba(var(--accent-rgb), .08) 70%), rgba(255,255,255,.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45); display: grid; place-items: center; transition: transform .2s ease; }
.np-art:hover { transform: scale(1.06); }
.np-num { position: absolute; top: 5px; left: 7px; font: 600 9px/1 "Space Grotesk", sans-serif; letter-spacing: .08em; opacity: .7; }
.np-art .i-pause, .np.is-playing .np-art .i-play { display: none; }
.np.is-playing .np-art .i-pause { display: block; }
.np-eq { position: absolute; bottom: 7px; right: 7px; display: flex; gap: 2px; align-items: flex-end; height: 9px; }
.np-eq i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; opacity: .8; }
.np.is-playing .np-eq i { animation: eq .8s ease-in-out infinite alternate; }
.np.is-playing .np-eq i:nth-child(2) { animation-delay: -.3s; } .np.is-playing .np-eq i:nth-child(3) { animation-delay: -.55s; }
@keyframes eq { from { height: 2px; } to { height: 9px; } }
.np-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.np-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.np-top strong { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-top small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.np-wave { position: relative; height: 26px; cursor: pointer; }
.np-bars { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; }
.np-bars i { flex: 1; min-width: 1px; border-radius: 2px; background: rgba(255,255,255,.2); }
.np-fill { clip-path: inset(0 100% 0 0); }
.np-fill i { background: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb), .5); }
.np-wave:hover .np-bars:not(.np-fill) i { background: rgba(255,255,255,.3); }
.np-times { display: flex; justify-content: space-between; font: 500 10px/1 Inter, sans-serif; color: var(--muted); letter-spacing: .04em; }
.np-ctrl { display: flex; gap: 6px; flex: none; }
.np-ctrl button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .18s ease, background .2s ease; }
.np-ctrl button:hover { transform: scale(1.1); background: rgba(255,255,255,.16); }
.np-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: -8px; width: 100%; }
.np-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.62); font: 600 11px/1 Inter, sans-serif; cursor: pointer; transition: color .2s, border-color .2s, background .2s, transform .2s; }
.np-chip .n { font: 600 9px/1 "Space Grotesk", sans-serif; opacity: .55; }
.np-chip:hover { color: #fff; transform: translateY(-2px); }
.np-chip.on { color: #fff; border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 35%, transparent); }
.np button:focus-visible, .np-chip:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: 2px; }

/* accent touches on the existing pieces */
.display-name { transition: text-shadow 1.2s ease; }
.name-spider { transition: filter 1.2s ease; filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), .5)); }
.name-spider.twitch { animation: twitch .24s ease-out; }
@keyframes twitch { 0% { transform: rotate(0) scale(1); } 30% { transform: rotate(-9deg) scale(1.12); } 60% { transform: rotate(6deg) scale(.98); } 100% { transform: none; } }

/* ---- the drop ---- */
body.pre-drop .vignette { background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,.7)); transition: background .4s; }
body.pre-drop .display-name { animation: pre-shiver .09s steps(2) infinite; }
@keyframes pre-shiver { 0% { transform: translateX(-1px); } 100% { transform: translateX(1px); } }
.drop-flash { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 40%), rgba(255,255,255,.85) 0, rgba(var(--accent-rgb), .5) 9%, rgba(var(--accent-rgb), .12) 28%, rgba(var(--accent-rgb), 0) 55%); }
.drop-flash.go { animation: flash .6s cubic-bezier(.2,.7,.3,1) both; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
/* anamorphic light streak through the name */
.drop-flare { position: fixed; left: 0; right: 0; top: var(--fy, 40%); height: 0; z-index: 61; pointer-events: none; }
.drop-flare::before, .drop-flare::after { content: ""; position: absolute; left: 0; right: 0; opacity: 0; transform: scaleX(.04); }
.drop-flare::before { top: -1px; height: 2px;
  background: linear-gradient(90deg, transparent 2%, rgba(var(--accent-rgb), .55) 28%, #fff 50%, rgba(var(--accent-rgb), .55) 72%, transparent 98%);
  box-shadow: 0 0 10px 1px rgba(var(--accent-rgb), .7); }
.drop-flare::after { top: -22px; height: 44px; background: radial-gradient(50% 50% at 50% 50%, rgba(var(--accent-rgb), .32), transparent 100%); }
.drop-flare.go::before { animation: flare 1s cubic-bezier(.12,.85,.25,1) both; }
.drop-flare.go::after { animation: flare-glow 1s cubic-bezier(.12,.85,.25,1) both; }
@keyframes flare { 0% { opacity: 1; transform: scaleX(.04); } 22% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1.1) scaleY(.5); } }
@keyframes flare-glow { 0% { opacity: .9; transform: scaleX(.1) scaleY(.6); } 25% { opacity: .9; transform: scaleX(.8); } 100% { opacity: 0; transform: scaleX(1) scaleY(.3); } }
.display-name.glitch { animation: glitch .12s steps(2) infinite; }
.display-name.glitch #name, .display-name.glitch { background: none !important; -webkit-text-fill-color: #fff !important; color: #fff !important; }
.display-name.glitch #name { text-shadow: 2px 0 rgba(var(--accent-rgb), .95), -2px 0 rgba(0,255,255,.6); }
@keyframes glitch {
  0% { transform: translate(0); clip-path: inset(0 0 0 0); }
  25% { transform: translate(-3px, 1px); clip-path: inset(10% 0 35% 0); }
  50% { transform: translate(3px, -1px); clip-path: inset(55% 0 5% 0); }
  75% { transform: translate(-1px, 0); clip-path: inset(0 0 60% 0); }
  100% { transform: translate(2px, 1px); clip-path: inset(30% 0 20% 0); }
}

@media (max-width: 480px) {
  .lyric-line { font-size: 18px; }
  .np-ctrl button { width: 30px; height: 30px; }
  .np-top small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lyric-line.in .lc, .lyric-line.out .lc { animation: none; }
  .lyric-line.out { display: none; }
}

/* the slam — every hard kick knocks the page from top to bottom */
.tilt-scene.kick-a > * { animation: slam-a .34s cubic-bezier(.2,.8,.3,1) backwards; }
.tilt-scene.kick-b > * { animation: slam-b .34s cubic-bezier(.2,.8,.3,1) backwards; }
.tilt-scene > :nth-child(2) { animation-delay: .025s !important; }
.tilt-scene > :nth-child(3) { animation-delay: .05s !important; }
.tilt-scene > :nth-child(4) { animation-delay: .075s !important; }
.tilt-scene > :nth-child(5) { animation-delay: .1s !important; }
.tilt-scene > :nth-child(6) { animation-delay: .12s !important; }
/* uses the separate translate/scale properties so it stacks on top of the hover pop instead of replacing it */
@keyframes slam-a { 0% { translate: 0 0; scale: 1; } 22% { translate: 0 7px; scale: .982; } 100% { translate: 0 0; scale: 1; } }
@keyframes slam-b { 0% { translate: 0 0; scale: 1; } 22% { translate: 0 7px; scale: .982; } 100% { translate: 0 0; scale: 1; } }
@media (prefers-reduced-motion: reduce) { .tilt-scene.kick-a > *, .tilt-scene.kick-b > * { animation: none; } }

/* ======================= v9: phone layout — one screen, no scrolling ======================= */
@media (max-width: 600px), (max-height: 520px) and (orientation: landscape) {
  html, body { height: 100%; min-height: 0; overflow: hidden; overscroll-behavior: none; }
  .perspective-wrap { height: 100dvh; min-height: 0; perspective: 900px; }
  .profile-center { gap: 7px; }
  .hero-av { width: 76px; height: 76px; }
  .display-name { font-size: 1.42rem; }
  .name-row { gap: 8px; }
  .name-spider { width: 1.75rem; height: 1.75rem; }
  .nohappy { font-size: 10.5px; margin-top: -3px; }

  .lyric-wrap, .lyric-wrap.on { height: 48px; margin: -2px 0; }
  .lyric { min-height: 48px; }
  .lyric-line { font-size: 16px; line-height: 1.22; padding: 0 4px; }

  .glass-row { grid-template-columns: 1fr 1fr; gap: 9px; }
  .glass-row .glass { padding: 10px; gap: 9px; border-radius: 18px; min-width: 0; }
  .glass-row .glass .ico, .glass-row .glass .ico--av { width: 36px; height: 36px; }
  .glass-row .glass .meta strong { font-size: 13.5px; }
  .glass-row .glass .meta small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .fg { padding: 9px 11px; gap: 11px; border-radius: 20px; }
  .fg .srv-av { width: 42px; height: 42px; }
  .fg .srv-body strong { font-size: 15px; }
  .fg .pill { font-size: 9px; margin-bottom: 2px; padding: 1px 8px; }
  .fg-join { padding: 8px 17px; font-size: 12px; }

  .np { padding: 9px 10px; gap: 10px; border-radius: 20px; }
  .np-art { width: 48px; height: 48px; border-radius: 13px; }
  .np-body { gap: 3px; }
  .np-top strong { font-size: 14px; flex-shrink: 0; max-width: 62%; }
  .np-top small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
  .np-wave { height: 22px; }
  .np-ctrl { gap: 5px; }
  .np-ctrl button { width: 30px; height: 30px; }

  .np-list { flex-wrap: nowrap; gap: 4px; margin-top: -3px; }
  .np-chip { padding: 5px 8px; font-size: 10.5px; gap: 0; white-space: nowrap; }
  .np-chip .n { display: none; }

  .views-fixed { left: 12px; bottom: calc(8px + env(safe-area-inset-bottom)); font-size: 11px; gap: 5px; }
  .views-fixed .views-eye { width: 13px; height: 13px; }
}

/* phone upright */
@media (max-width: 600px) {
  .perspective-wrap { padding: max(14px, env(safe-area-inset-top)) 14px calc(28px + env(safe-area-inset-bottom)); }
  .stack { gap: 11px; }
}

/* phone sideways: profile + lyrics on the left, panels on the right */
@media (max-height: 520px) and (orientation: landscape) {
  .perspective-wrap { padding: max(10px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); }
  .stack { display: grid; max-width: 820px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-areas: "prof row" "prof fg" "lyr np" "lyr list"; column-gap: 24px; row-gap: 9px; align-items: center; }
  .profile-center { grid-area: prof; align-self: end; }
  .lyric-wrap { grid-area: lyr; align-self: start; }
  .glass-row { grid-area: row; }
  .fg { grid-area: fg; }
  .np { grid-area: np; }
  .np-list { grid-area: list; margin-top: 0; }
  .lyric-wrap, .lyric-wrap.on { height: 64px; }
  .lyric { min-height: 64px; }
  .views-fixed { display: none; }
}
/* phone upright: scale with screen height so tall phones are filled, short ones stay compact */
@media (max-width: 600px) {
  .stack { gap: clamp(9px, 1.75dvh, 17px); }
  .profile-center { gap: clamp(5px, 0.95dvh, 10px); }
  .hero-av { width: clamp(64px, 10.8dvh, 104px); height: clamp(64px, 10.8dvh, 104px); }
  .display-name { font-size: clamp(1.32rem, 3.3dvh, 1.8rem); }
  .name-spider { width: clamp(1.6rem, 3.6dvh, 2.2rem); height: clamp(1.6rem, 3.6dvh, 2.2rem); }
  .lyric-wrap, .lyric-wrap.on { height: clamp(44px, 7.6dvh, 68px); }
  .lyric { min-height: clamp(44px, 7.6dvh, 68px); }
  .lyric-line { font-size: clamp(15px, 2.35dvh, 20px); }
  .glass-row .glass { padding: clamp(9px, 1.55dvh, 14px) 10px; }
  .fg { padding-top: clamp(8px, 1.4dvh, 13px); padding-bottom: clamp(8px, 1.4dvh, 13px); }
  .np { padding-top: clamp(8px, 1.4dvh, 13px); padding-bottom: clamp(8px, 1.4dvh, 13px); }
  .np-art { width: clamp(44px, 6.6dvh, 58px); height: clamp(44px, 6.6dvh, 58px); }
  .np-wave { height: clamp(20px, 3dvh, 28px); }
}

/* ======================= v10: rain physics, the spider, generated worlds ======================= */
.world-gl { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
.world-gl.on { opacity: 1; }
#wet-canvas { position: fixed; inset: 0; z-index: 12; pointer-events: none; }
.spider-rig { position: fixed; left: 0; top: 0; z-index: 14; width: 0; height: 0; pointer-events: none; transform-origin: 0 0; will-change: transform; opacity: 0; }
.spider-silk { position: absolute; left: -0.5px; top: 0; width: 1px; height: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,.05), rgba(255,255,255,.38)); }
.spider-body { position: absolute; top: 0; display: block; pointer-events: none; user-select: none; will-change: transform;
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), .45)) drop-shadow(0 2px 3px rgba(0,0,0,.6)); }

/* touch screens: no desktop cursor glow / trail */
@media (pointer: coarse) { .cursor-3d, #trail-canvas { display: none !important; } }

/* rain haze low on the screen */
.perspective-wrap::before { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 40vh; pointer-events: none;
  background: linear-gradient(to top, rgba(var(--accent-rgb), .045), rgba(220,228,240,.022) 45%, transparent); }

/* ======================= v11: the 3D scene (desktop) ======================= */
#scene-gl { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; display: block; }
/* the glass is drawn by the GPU now: panels keep their edges and highlights, the blur/refraction comes from the scene */
body.scene-on .glass { -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.012) 45%, rgba(255,255,255,.045)); }
body.scene-on .perspective-wrap::before { opacity: .5; }
