/* =========================================================================
   ddeath.xyz -- public profile page
   Every visual value below is driven by CSS variables that /js/app.js
   writes from the admin settings, so the admin panel can change the look
   without touching this file.
   ========================================================================= */

:root {
  /* typography */
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* background */
  --bg-fallback: #1f5fd6;
  --bg-image: none;
  --bg-blur: 0px;
  --bg-brightness: 1;
  --bg-overlay: 0.1;

  /* glass card */
  --card-w: 900px;
  --card-blur: 24px;
  --card-blur-eff: var(--card-blur); /* capped on phones further down, see @media */
  --card-sat: 160%;
  --card-bg: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.28);
  --card-radius: 28px;
  --card-glow: 0.25;

  /* avatar */
  --avatar-size: 190px;
  --avatar-radius: 22px;
  --avatar-border-w: 2px;
  --avatar-border-c: rgba(255, 255, 255, 0.75);
  --avatar-glow: 24px;
  --deco-scale: 1.2;
  --deco-x: 0px;
  --deco-y: 0px;

  /* glass sheen + glow pulse */
  --sheen-op: 0.22;
  --sheen-cycle: 7s;
  --sheen-angle: 18deg;
  --sheen-band: 22%;
  --glow-color: rgba(255, 255, 255, 0.55);
  --glow-color-dim: rgba(255, 255, 255, 0.16);
  --glow-size: 34px;
  --glow-speed: 4s;

  /* running light around the frame */
  --light-color: rgba(255, 255, 255, 0.95);
  --light-mid: rgba(255, 255, 255, 0.55);
  --light-faint: rgba(255, 255, 255, 0.12);
  --light-arc: 34deg;
  --light-speed: 6s;
  --light-glow: 10px;

  /* background extras */
  --vignette: 0.35;

  /* display-name effect */
  --name-c1: #ffffff;
  --name-c2: #9ec7ff;
  --name-glow: #9ec7ff;
  --name-fx: 6s;

  /* loading screen */
  --loader-bg: #0a0b0b;
  --loader-text: #6b6f6f;
  --ring: rgba(255, 255, 255, 0.55);
  --ring-track: rgba(255, 255, 255, 0.06);
  --ring-speed: 1.2s;

  /* shared ink */
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.72);
  --ink-dim: rgba(255, 255, 255, 0.5);
  --online: #43d67c;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-fallback);
  overflow: hidden;              /* locked until entered; JS enables scroll */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.scrollable { overflow-y: auto; }
body.entered.scrollable { overflow-y: auto; scroll-behavior: smooth; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] { display: none !important; }

/* =========================================================================
   BACKGROUND
   ========================================================================= */
.bg {
  position: fixed;
  inset: -4vmax;                 /* bleed so blur never shows an edge */
  z-index: 0;
  background-color: var(--bg-fallback);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  filter: blur(var(--bg-blur)) brightness(var(--bg-brightness));
  transform: translateZ(0);
}

/* very slow push-in so a still image never feels frozen */
body.ken-burns .bg { animation: kenBurns 44s ease-in-out infinite alternate; }

@keyframes kenBurns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.12) translate(-1.5%, -1%); }
}

/* darkened edges: pushes the eye towards the card in the middle */
.bg-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(0, 0, 0, 0) 38%,
    rgba(0, 0, 0, calc(var(--vignette) * 0.45)) 72%,
    rgba(0, 0, 0, var(--vignette)) 100%);
}

/* =========================================================================
   FLOATING PARTICLES
   ========================================================================= */
.particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease .4s;
}

body.entered .particles { opacity: 1; }

.bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.bg-media.show { display: block; }

.bg-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--bg-overlay);
}

/* =========================================================================
   CURSOR TRAIL
   ========================================================================= */
.trail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  /* The silk threads need to pass over the glass card like the reference
     effect; keeping them below the custom cursor still preserves clarity. */
  z-index: 45;
  pointer-events: none;
}

.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .04);
  box-shadow: 0 0 14px rgba(255, 255, 255, .28), inset 0 0 10px rgba(255,255,255,.08);
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, width .16s ease, height .16s ease, margin .16s ease, background .16s ease;
  will-change: transform;
}

.cursor-dot span {
  position: absolute;
  width: 3px;
  height: 3px;
  left: 50%;
  top: 50%;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 7px #fff;
}

body.custom-cursor .cursor-dot { opacity: 1; }
body.cursor-down .cursor-dot {
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  background: rgba(255, 255, 255, .16);
}
body.hide-cursor, body.hide-cursor * { cursor: none !important; }

/* =========================================================================
   PAGE + GLASS CARD
   ========================================================================= */
.page {
  position: relative;
  z-index: 10;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
  opacity: 0;
  transition: opacity .7s ease;
}

/* when the card overflows the viewport, align to top so content starts visible */
body.scrollable .page {
  place-items: start center;
  padding-top: calc(32px + var(--safe-top));
  padding-bottom: calc(48px + var(--safe-bottom));
}

body.entered .page { opacity: 1; }

.card {
  position: relative;
  width: min(var(--card-w), 100%);
  padding: 34px 38px 22px;
  border-radius: var(--card-radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  -webkit-backdrop-filter: blur(var(--card-blur-eff)) saturate(var(--card-sat));
  backdrop-filter: blur(var(--card-blur-eff)) saturate(var(--card-sat));
  box-shadow:
    0 20px 60px rgba(0, 0, 0, var(--card-glow)),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 0.96));
  transform-style: preserve-3d;
  filter: blur(6px);
  transition: transform .8s cubic-bezier(.22, .8, .25, 1), filter .8s ease;
}

body.entered .card { filter: blur(0); }
.card.tilt-ready { transition: transform .14s ease-out, filter .8s ease; }

/* -------------------------------------------------------------------------
   A comet of light running around the frame.
   A conic gradient is spun with @property --angle, then masked down to a
   1.5px ring so only the border is lit. The gradient fades in from nothing,
   peaks at --light-arc and cuts off, which reads as a head with a tail.
   ------------------------------------------------------------------------- */
.card-light {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0deg,
    var(--light-faint) calc(var(--light-arc) * 0.45),
    var(--light-mid) calc(var(--light-arc) * 0.8),
    var(--light-color) var(--light-arc),
    transparent calc(var(--light-arc) + 5deg),
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: drop-shadow(0 0 var(--light-glow) var(--light-mid));
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  animation: spinAngle var(--light-speed, 6s) linear infinite;
}

/* a second, wider and softer pass just behind it -> the streak actually glows */
.card-light::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 5px;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0deg,
    var(--light-faint) calc(var(--light-arc) * 0.6),
    var(--light-mid) var(--light-arc),
    transparent calc(var(--light-arc) + 12deg),
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: blur(5px);
  opacity: .8;
}

body.entered .card-light { opacity: 1; transition: opacity 1.2s ease .6s; }
body.no-light .card-light { display: none; }

/* =========================================================================
   GLOW PULSE + GLASS SHEEN
   A soft breathing halo around the card, and a grey/white band that slides
   diagonally across the glass like a reflection running over a window.
   Both are switched on from Admin -> Glass card -> Glow & sheen.
   ========================================================================= */
body.entered .card.glow-pulse {
  animation: cardGlow var(--glow-speed) ease-in-out infinite;
}

@keyframes cardGlow {
  0%, 100% {
    box-shadow:
      0 20px 60px rgba(0, 0, 0, var(--card-glow)),
      inset 0 1px 0 rgba(255, 255, 255, .35),
      0 0 calc(var(--glow-size) * .4) var(--glow-color-dim);
  }
  50% {
    box-shadow:
      0 20px 60px rgba(0, 0, 0, var(--card-glow)),
      inset 0 1px 0 rgba(255, 255, 255, .35),
      0 0 var(--glow-size) var(--glow-color);
  }
}

/* the sweeping reflection ------------------------------------------------ */
.card-sheen,
.avatar-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  z-index: 4;
}

.card-sheen::before,
.avatar-sheen::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 0;
  width: var(--sheen-band);
  height: 160%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(206, 211, 219, .45) 28%,
    rgba(238, 241, 245, .8) 46%,
    rgba(255, 255, 255, .95) 52%,
    rgba(206, 211, 219, .45) 72%,
    rgba(255, 255, 255, 0) 100%
  );
  filter: blur(7px);
  will-change: transform, opacity;
  animation: sheenSweep var(--sheen-cycle) cubic-bezier(.35, 0, .3, 1) infinite;
}

.avatar-sheen::before { filter: blur(4px); }

/* the band lives off-screen for most of the cycle -> a sweep, then a pause */
@keyframes sheenSweep {
  0%   { transform: translateX(-160%) rotate(var(--sheen-angle)); opacity: 0; }
  6%   { opacity: 1; }
  26%  { opacity: 1; }
  34%  { transform: translateX(560%) rotate(var(--sheen-angle)); opacity: 0; }
  100% { transform: translateX(560%) rotate(var(--sheen-angle)); opacity: 0; }
}

body.entered .card-sheen   { opacity: var(--sheen-op); transition: opacity 1s ease .8s; }
body.entered .avatar-sheen { opacity: var(--sheen-op); transition: opacity 1s ease .9s; }

body.no-sheen .card-sheen,
body.no-sheen .avatar-sheen { display: none; }
body.no-avatar-sheen .avatar-sheen { display: none; }

.avatar-sheen { border-radius: var(--avatar-radius); }
.avatar-wrap.has-deco .avatar-sheen { border-radius: 50%; }

/* inherits:true so .card-light::after (the soft halo pass) spins along with it */
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: true; }
@keyframes spinAngle { to { --angle: 360deg; } }

/* staggered entrance for the card content */
.card-top, .activity, .card-sub, .gh, .val, .rbx, .card-foot,
.badges, .bio, .socials, .avatar-wrap {
  opacity: 0;
  transform: translateY(10px);
}

.name {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .6s cubic-bezier(.22,.8,.25,1) .22s,
              transform .6s cubic-bezier(.22,.8,.25,1) .22s;
}
body.entered .name        { opacity: 1; transform: none; }
body.entered .badges      { animation: rise .6s cubic-bezier(.22,.8,.25,1) .30s forwards; }
body.entered .bio         { animation: rise .6s cubic-bezier(.22,.8,.25,1) .38s forwards; }
body.entered .socials     { animation: rise .6s cubic-bezier(.22,.8,.25,1) .46s forwards; }
body.entered .avatar-wrap { animation: rise .7s cubic-bezier(.22,.8,.25,1) .26s forwards; }
body.entered .card-top    { animation: fadeIn .1s linear .2s forwards; }
body.entered .activity    { animation: rise .6s cubic-bezier(.22,.8,.25,1) .54s forwards; }
body.entered .card-sub    { animation: rise .6s cubic-bezier(.22,.8,.25,1) .58s forwards; }
body.entered .gh          { animation: rise .6s cubic-bezier(.22,.8,.25,1) .62s forwards; }
body.entered .val         { animation: rise .6s cubic-bezier(.22,.8,.25,1) .64s forwards; }
body.entered .rbx         { animation: rise .6s cubic-bezier(.22,.8,.25,1) .66s forwards; }
body.entered .card-foot   { animation: rise .6s cubic-bezier(.22,.8,.25,1) .70s forwards; }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; transform: none; } }

/* ---------- top row ---------- */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.card-left { min-width: 0; flex: 1; }

.name {
  margin: 0 0 14px;
  font-size: clamp(38px, 5.2vw, 62px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: .01em;
  line-height: 1.05;
  text-shadow: 0 2px 24px rgba(255, 255, 255, .45), 0 1px 2px rgba(0, 0, 0, .18);
  overflow-wrap: anywhere;
}

/* badge pill capsule */
.badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  max-width: 100%;
}

.badge {
  position: relative;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  transition: transform .18s ease;
}

.badge img, .badge svg { width: 100%; height: 100%; object-fit: contain; }
.badge:hover { transform: translateY(-2px) scale(1.12); }

.badge[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 8px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10.5px;
  border-radius: 7px;
  background: rgba(10, 11, 11, .86);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.badge[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* -------------------------------------------------------------------------
   DISPLAY-NAME EFFECTS
   One class per style, all driven by --name-c1 / --name-c2 / --name-glow.
   Text-clipped gradients need an explicit transparent fill, so each of those
   styles sets it and .fx-glow / .fx-neon / .fx-glitch deliberately do not.
   ------------------------------------------------------------------------- */
.name.fx-gradient,
.name.fx-shine {
  display: inline-block;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
  background-repeat: no-repeat;
  will-change: background-position;
}

.name.fx-gradient {
  background-image: linear-gradient(100deg,
    var(--name-c1) 0%, var(--name-c2) 35%, var(--name-c1) 60%, var(--name-c2) 100%);
  background-size: 260% 100%;
  background-position: 0% 0;
  /* `alternate` instead of a one-way loop: the old version animated 0% -> 260%
     and then snapped straight back to 0% every cycle. That hard cut forces
     the browser to fully repaint a background-clip:text element mid-motion,
     which is what showed up as the name flashing invisible before the
     gradient reappeared. Sweeping back and forth never has that cut, so
     there's nothing left to glitch. */
  animation: nameGradient var(--name-fx) ease-in-out infinite alternate;
}

@keyframes nameGradient {
  0%   { background-position: 0% 0; }
  100% { background-position: 100% 0; }
}

/* a hard highlight sliding through the letters */
.name.fx-shine {
  background-image:
    linear-gradient(105deg,
      transparent 0%, transparent 34%,
      var(--name-c2) 43%, #fff 49%, #fff 51%, var(--name-c2) 57%,
      transparent 66%, transparent 100%),
    linear-gradient(var(--name-c1), var(--name-c1));
  background-size: 260% 100%, 100% 100%;
  background-position: 125% 0, 0 0;
  animation: nameShine var(--name-fx) cubic-bezier(.35, 0, .22, 1) infinite;
}

@keyframes nameShine {
  0%, 14%   { background-position: 125% 0, 0 0; }
  58%, 100% { background-position: -55% 0, 0 0; }
}

.name.fx-glow {
  animation: nameGlow var(--name-fx) ease-in-out infinite;
}

@keyframes nameGlow {
  0%, 100% { text-shadow: 0 2px 18px color-mix(in srgb, var(--name-glow) 35%, transparent); }
  50%      { text-shadow: 0 0 14px var(--name-glow), 0 0 38px color-mix(in srgb, var(--name-glow) 60%, transparent); }
}

.name.fx-neon {
  color: #fff;
  text-shadow:
    0 0 4px #fff,
    0 0 11px var(--name-glow),
    0 0 24px var(--name-glow),
    0 0 46px color-mix(in srgb, var(--name-glow) 55%, transparent);
  animation: nameFlicker var(--name-fx) steps(1, end) infinite;
}

@keyframes nameFlicker {
  0%, 92%, 96%, 100% { opacity: 1; }
  94%, 98%           { opacity: .72; }
}

.name.fx-glitch {
  color: #fff;
  animation: nameGlitch var(--name-fx) steps(1, end) infinite;
}

@keyframes nameGlitch {
  0%, 88%, 100% { text-shadow: 0 2px 22px rgba(255, 255, 255, .4); transform: none; }
  90%  { text-shadow: -2px 0 var(--name-c2), 2px 0 var(--name-glow); transform: translateX(1px); }
  93%  { text-shadow:  2px 0 var(--name-c2), -2px 0 var(--name-glow); transform: translateX(-1px); }
  96%  { text-shadow: -1px 0 var(--name-glow), 1px 0 var(--name-c2); transform: none; }
}

/* typewriter bio */
.bio {
  margin: 16px 0 14px;
  min-height: 1.5em;
  font-size: 15px;
  font-style: italic;
  font-weight: 300;
  color: rgba(255, 255, 255, .8);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .16);
}

.caret {
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -.16em;
  background: rgba(255, 255, 255, .8);
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* social icons */
.socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.social {
  position: relative;
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, .88);
  transition: transform .2s cubic-bezier(.2,.9,.3,1.4), color .2s ease, filter .2s ease;
}

.social svg { width: 100%; height: 100%; fill: currentColor; }
.social img { width: 100%; height: 100%; object-fit: contain; }

.social:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.14);
  filter: drop-shadow(0 4px 12px rgba(255, 255, 255, .55));
}

.social[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 9px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  border-radius: 7px;
  background: rgba(10, 11, 11, .86);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.social[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- avatar ---------- */
.card-right { flex: 0 0 auto; }

.avatar-wrap {
  position: relative;
  width: var(--avatar-size);
  height: var(--avatar-size);
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--avatar-radius);
  border: var(--avatar-border-w) solid var(--avatar-border-c);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3), 0 0 var(--avatar-glow) rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .1);
}

/* Decoration frames are square artwork built around a CIRCULAR avatar that
   fills the middle ~83% of the image. Anchoring at the exact centre with a
   transform (instead of percentage insets) keeps it centred at every avatar
   size, and --deco-x / --deco-y let you nudge it from the admin panel. */
.avatar-deco {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% * var(--deco-scale));
  height: calc(100% * var(--deco-scale));
  /* the global `img { max-width: 100% }` rule (see top of file) would clamp
     this back down to the avatar's own size and, since it only caps width
     and not height, warp the ring out of round while doing it -- that was
     the "deco nhỏ hơn / méo" bug. This element is absolutely positioned and
     already sized exactly on purpose, so it opts out of that rule. */
  max-width: none;
  max-height: none;
  transform: translate(-50%, -50%) translate(var(--deco-x), var(--deco-y));
  object-fit: contain;
  pointer-events: none;
  display: none;
  z-index: 2;
}

.avatar-deco.show { display: block; }

/* Small badge/emoji pinned to a corner of the avatar (wanji.lol-style).
   Independent of .avatar-deco -- both can be shown at once. Sized with
   --sticker-size (set from avatar.stickerSize in app.js), positioned per
   corner via the data-corner attribute set alongside it. */
.avatar-sticker {
  position: absolute;
  width: var(--sticker-size, 44px);
  height: var(--sticker-size, 44px);
  max-width: none;
  max-height: none;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(20, 22, 26, .55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35), 0 0 0 2px rgba(255, 255, 255, .18);
  pointer-events: none;
  z-index: 3;
}

.avatar-sticker[data-corner="bottom-right"] { right: -6px; bottom: -6px; }
.avatar-sticker[data-corner="bottom-left"]  { left: -6px;  bottom: -6px; }
.avatar-sticker[data-corner="top-right"]    { right: -6px; top: -6px; }
.avatar-sticker[data-corner="top-left"]     { left: -6px;  top: -6px; }

/* the frame is a circle, so the picture under it has to be one too */
.avatar-wrap.has-deco .avatar {
  border-radius: 50%;
  border-width: 0;
}

body.no-deco-circle .avatar-wrap.has-deco .avatar {
  border-radius: var(--avatar-radius);
  border-width: var(--avatar-border-w);
}

/* =========================================================================
   ACTIVITY / RICH PRESENCE
   ========================================================================= */
.activity {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
}

.act-main { display: flex; align-items: center; gap: 14px; }

.act-art { position: relative; flex: 0 0 auto; }

.act-large {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, .12);
}

.act-small {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(20, 20, 24, .55);
  object-fit: cover;
  display: none;
}

.act-small.show { display: block; }

.act-info { min-width: 0; flex: 1; }

.act-name { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.act-details, .act-state {
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.act-elapsed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--online);
}

.act-elapsed-icon { width: 14px; height: 14px; display: inline-block; }
.act-elapsed-icon svg { width: 100%; height: 100%; fill: currentColor; }

.act-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
}

.act-bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  overflow: hidden;
}

.act-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #fff;
  transition: width .9s linear;
}

.act-controls { display: flex; gap: 10px; opacity: .8; }
.act-controls svg { width: 16px; height: 16px; fill: currentColor; }

/* synced lyrics */
.lyrics {
  margin-top: 10px;
  height: 92px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}

.lyrics-track { transition: transform .45s cubic-bezier(.22,.8,.25,1); }

.lyrics-line {
  height: 30px;
  line-height: 30px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, .35);
  filter: blur(1.2px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .3s ease, filter .3s ease, transform .3s ease;
}

.lyrics-line.active {
  color: #fff;
  filter: none;
  text-shadow: 0 2px 16px rgba(255, 255, 255, .4);
}

/* =========================================================================
   SUB CARDS (discord user + server)
   ========================================================================= */
.card-sub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.card-sub:empty { display: none; }

.sub {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  min-height: 72px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  box-sizing: border-box;
  transition: background .25s ease, transform .25s ease;
}

.sub:hover { background: rgba(255, 255, 255, .12); }

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

.sub-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.sub-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-status {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-avatar {
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  --deco-scale: 1.2;
  --deco-x: 0%;
  --deco-y: 0%;
}

.sub-avatar-img {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, .14);
}

.sub-avatar-deco {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% * var(--deco-scale, 1.2));
  height: calc(100% * var(--deco-scale, 1.2));
  /* see the note on .avatar-deco above -- same fix, same reason */
  max-width: none;
  max-height: none;
  transform: translate(-50%, -50%) translate(var(--deco-x, 0%), var(--deco-y, 0%));
  object-fit: contain;
  pointer-events: none;
  display: none;
  z-index: 2;
}

.sub-avatar-deco.show { display: block; }

/* keep the status dot clear of the decoration ring */
.sub-avatar.has-deco .status-dot { right: -2px; bottom: -2px; z-index: 4; }

.status-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .22);
  background: #747f8d;
  box-shadow: 0 0 8px rgba(0, 0, 0, .35);
}

.status-dot[data-status="online"] { background: var(--online); }
.status-dot[data-status="idle"]   { background: #f0b232; }
.status-dot[data-status="dnd"]    { background: #f23f43; }

.tag-btn {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .9);
  transition: background .2s ease, transform .2s ease;
}

.tag-btn svg { width: 12px; height: 12px; fill: currentColor; }
.tag-btn:hover { background: rgba(255, 255, 255, .3); transform: scale(1.1); }

.guild-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: 11px;
  font-weight: 600;
}

.guild-tag-icon { width: 13px; height: 13px; object-fit: contain; }

.server-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .14);
}

.join-btn {
  padding: 2px 11px;
  border-radius: 8px;
  background: #23a55a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.join-btn:hover {
  background: #1f9550;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(35, 165, 90, .4);
}

.sub-counts {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.count-online { display: inline-flex; align-items: center; gap: 5px; }

.dot-online {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 8px rgba(67, 214, 124, .8);
}

.count-sep { opacity: .55; }

/* =========================================================================
   GITHUB WIDGET
   ========================================================================= */
.gh {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}

.gh-avatar { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; }
.gh-body { flex: 1; min-width: 0; }
.gh-name { font-weight: 700; font-size: 15px; }

.gh-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 3px 0 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.gh-stats b { color: #fff; }

.gh-btn {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 999px;
  background: #23a55a;
  font-size: 12px;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
}

.gh-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(35, 165, 90, .4); }

.gh-joined { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); align-self: flex-end; }

/* =========================================================================
   VALORANT WIDGET
   ========================================================================= */
.val {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}

.val-card { width: 52px; height: 68px; border-radius: 10px; object-fit: cover; background: rgba(0, 0, 0, .25); flex: 0 0 auto; }
.val-body { flex: 1; min-width: 0; }
.val-name { font-weight: 700; font-size: 15px; }

.val-rank-row { display: flex; align-items: center; gap: 6px; margin: 3px 0 7px; }
.val-rank-icon { width: 22px; height: 22px; object-fit: contain; }
.val-rank { font-size: 12.5px; font-weight: 600; color: #ff4655; }
.val-rr { font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft); }

.val-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-soft); }
.val-stats b { color: #fff; }

/* =========================================================================
   ROBLOX WIDGET
   ========================================================================= */
.rbx {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}

.rbx-avatar { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: rgba(0, 0, 0, .25); flex: 0 0 auto; }
.rbx-body { flex: 1; min-width: 0; }
.rbx-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; }
.rbx-verified { color: #e2231a; font-size: 12px; }

.rbx-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 3px 0 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.rbx-stats b { color: #fff; }

.rbx-btn {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 999px;
  background: #e2231a;
  font-size: 12px;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
}

.rbx-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(226, 35, 26, .4); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
  padding-top: 4px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: rgba(255, 255, 255, .85);
  font-variant-numeric: tabular-nums;
}

.foot-left, .foot-right { display: flex; align-items: center; gap: 10px; }
.foot-item { display: inline-flex; align-items: center; gap: 6px; }
.foot-div { opacity: .45; }

.ico { width: 14px; height: 14px; display: inline-block; opacity: .85; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* =========================================================================
   MUSIC BUTTON + MINI PLAYER
   ========================================================================= */
.music-btn {
  position: fixed;
  right: 26px;
  bottom: calc(26px + var(--safe-bottom));
  z-index: 30;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease .9s, transform .5s ease .9s, background .25s ease;
}

body.entered .music-btn { opacity: 1; transform: none; }
.music-btn:hover { background: rgba(255, 255, 255, .28); }
.music-btn svg { width: 22px; height: 22px; fill: #fff; }
.music-btn.playing svg { animation: pulse 2.4s ease-in-out infinite; }

@keyframes pulse { 50% { transform: scale(1.14); } }

.player {
  position: fixed;
  right: 26px;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 31;
  width: 300px;
  max-width: calc(100vw - 32px);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .35);
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px) scale(.96);
  transform-origin: bottom right;
  transition: opacity .3s ease, transform .3s cubic-bezier(.22,.8,.25,1);
}

.player.open { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- circular cover with a white ring ---------- */
.player-disc {
  position: relative;
  flex: 0 0 auto;
  width: 122px;
  height: 122px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, .35),
    0 0 0 4px rgba(255, 255, 255, .92),
    0 0 26px rgba(255, 255, 255, .25);
  animation: spin 14s linear infinite;
  animation-play-state: paused;
}

.player-disc.spinning { animation-play-state: running; }

@keyframes spin { to { transform: rotate(360deg); } }

.player-cover { width: 100%; height: 100%; object-fit: cover; }

/* the vinyl hole only makes sense on a spinning record, keep it subtle */
.player-hole {
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: rgba(15, 15, 18, .55);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
  opacity: 0;
  transition: opacity .3s ease;
}

.player-disc.spinning .player-hole { opacity: 1; }

.player-body { width: 100%; min-width: 0; text-align: center; }

.player-title {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .18);
}

.player-artist {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 0:00 ---- slider ---- 4:19 ---------- */
.player-seek {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.player-time {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
  min-width: 30px;
}

.player-time:last-child { text-align: right; }

.seek, .vol {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  cursor: pointer;
  /* --p is written by music.js so the played part is actually filled in */
  background:
    linear-gradient(#fff, #fff) 0 / var(--p, 0%) 100% no-repeat,
    rgba(255, 255, 255, .26);
  background-clip: padding-box;
  transition: background-size .1s linear;
}

.seek::-webkit-slider-thumb, .vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, .8);
  transition: transform .15s ease;
}

.seek:hover::-webkit-slider-thumb, .vol:hover::-webkit-slider-thumb { transform: scale(1.2); }

.seek::-moz-range-thumb, .vol::-moz-range-thumb {
  width: 12px; height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

/* ---------- prev  (PLAY)  next ---------- */
.player-ctrls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 18px;
}

.pbtn {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  opacity: .85;
  transition: background .2s ease, transform .2s ease, opacity .2s ease;
}

.pbtn:hover { background: rgba(255, 255, 255, .2); transform: scale(1.1); opacity: 1; }
.pbtn svg { width: 17px; height: 17px; fill: currentColor; }

.pbtn-main {
  width: 54px; height: 54px;
  background: #fff;
  color: #10131a;
  opacity: 1;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3), 0 0 22px rgba(255, 255, 255, .35);
}

.pbtn-main:hover { background: #fff; transform: scale(1.07); }
.pbtn-main svg { width: 22px; height: 22px; }

/* ---------- volume row ---------- */
.player-vol {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.player-vol .ico { width: 18px; height: 18px; flex: 0 0 auto; color: var(--ink); }
.player-vol .ico svg { stroke: none; fill: currentColor; }
.player-vol .vol { height: 5px; }

/* =========================================================================
   LOADING / ENTER SCREEN
   ========================================================================= */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--loader-bg);
  cursor: pointer;
  overflow: hidden;
  transition: opacity .7s ease, filter .7s ease, visibility 0s linear .7s;
}

/* faint scanning beam drifting down the screen, like a terminal boot check */
.loader-scan {
  position: absolute;
  inset: -20% 0 auto 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, var(--loader-text), transparent);
  opacity: .05;
  filter: blur(2px);
  animation: loaderScan 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes loaderScan {
  0%   { transform: translateY(-40%); opacity: 0; }
  10%  { opacity: .05; }
  50%  { opacity: .09; }
  90%  { opacity: 0; }
  100% { transform: translateY(320%); opacity: 0; }
}

/* HUD corner brackets framing the whole screen */
.loader-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  opacity: .3;
  border: 1px solid var(--loader-text);
  animation: cornerFade 2.6s ease-in-out infinite;
  pointer-events: none;
}
.loader-corner.tl { top: 26px; left: 26px; border-width: 1px 0 0 1px; }
.loader-corner.tr { top: 26px; right: 26px; border-width: 1px 1px 0 0; }
.loader-corner.bl { bottom: 26px; left: 26px; border-width: 0 0 1px 1px; }
.loader-corner.br { bottom: 26px; right: 26px; border-width: 0 1px 1px 0; }

@keyframes cornerFade { 0%, 100% { opacity: .18; } 50% { opacity: .4; } }

.loader-inner { position: relative; display: grid; justify-items: center; gap: 30px; }

.loader-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: .58em;
  text-indent: .58em;
  color: var(--loader-text);
  text-transform: lowercase;
  animation: loaderNameIn 1.1s cubic-bezier(.22,.8,.25,1) both;
}

@keyframes loaderNameIn {
  0%   { opacity: 0; letter-spacing: .1em; filter: blur(6px); }
  100% { opacity: 1; letter-spacing: .58em; filter: blur(0); }
}

.loader-ring { position: relative; width: 80px; height: 80px; }

/* soft blurred halo breathing behind the ring */
.ring-halo {
  position: absolute;
  inset: -26px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ring) 0%, transparent 68%);
  opacity: .25;
  filter: blur(10px);
  animation: haloBreathe 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes haloBreathe {
  0%, 100% { opacity: .16; transform: scale(.92); }
  50%      { opacity: .34; transform: scale(1.06); }
}

/* radar-style pings expanding outward, staggered */
.ring-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--ring);
  opacity: 0;
  animation: ringPing 3.2s ease-out infinite;
  pointer-events: none;
}
.ring-ping-2 { animation-delay: 1.6s; }

@keyframes ringPing {
  0%   { transform: scale(.7); opacity: .45; }
  100% { transform: scale(1.55); opacity: 0; }
}

.ring-svg { position: relative; width: 100%; height: 100%; transform: rotate(-90deg); }

.ring-track {
  fill: none;
  stroke: var(--ring-track);
  stroke-width: 2;
}

.ring-arc {
  fill: none;
  stroke: var(--ring);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 62 251;
  transform-origin: 50% 50%;
  animation: ringSpin var(--ring-speed) linear infinite;
  transition: opacity .45s ease;
}

/* thinner inner arc, opposite direction, adds depth without being loud */
.ring-arc-2 {
  fill: none;
  stroke: var(--ring);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 28 207;
  opacity: .4;
  transform-origin: 50% 50%;
  animation: ringSpinRev calc(var(--ring-speed) * 1.7) linear infinite;
  transition: opacity .45s ease;
}

@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes ringSpinRev { to { transform: rotate(-360deg); } }

.ring-play {
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,.8,.25,1);
  box-shadow: 0 0 34px rgba(255, 255, 255, .35);
}

.ring-play svg { width: 26px; height: 26px; fill: #0a0b0b; margin-left: 2px; }

.loader.ready .ring-play { opacity: 1; transform: scale(1); }
.loader.ready .ring-arc, .loader.ready .ring-arc-2 { opacity: 0; }
.loader.ready .loader-ring:hover .ring-play { transform: scale(1.08); }

.loader-hint {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .34em;
  text-indent: .34em;
  color: var(--loader-text);
  animation: breathe 2.6s ease-in-out infinite;
}

.loader-hint::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 11px;
  margin-left: 6px;
  background: var(--loader-text);
  vertical-align: -1px;
  animation: caretBlink 1.1s steps(1) infinite;
}

@keyframes caretBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

body.leaving .loader {
  opacity: 0;
  filter: blur(18px);
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .loader-scan, .loader-corner, .loader-name, .ring-halo, .ring-ping, .ring-ping-2,
  .ring-arc-2, .loader-hint::after { animation: none; }
}

/* =========================================================================
   DEVTOOLS LOCK -- best-effort deterrent overlay, off by default (see the
   admin "Bảo mật" section). Blurs and disables the whole page while the
   heuristics in js/devtools-guard.js think DevTools is open.
   ========================================================================= */
body.dt-noselect { user-select: none; -webkit-user-select: none; }
body.dt-noselect img { -webkit-user-drag: none; }

body.dt-locked .page,
body.dt-locked .bg,
body.dt-locked .particles,
body.dt-locked .trail,
body.dt-locked .cursor-dot,
body.dt-locked .music-btn,
body.dt-locked .player {
  filter: blur(24px) saturate(60%) brightness(.6);
  transition: filter .5s ease;
  pointer-events: none;
  user-select: none;
}

.dt-lock {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: rgba(6, 4, 5, .82);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
}

body.dt-locked .dt-lock {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .45s ease;
}

.dt-lock-scan {
  position: absolute;
  inset: -20% 0 auto 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(255,90,90,.5), transparent);
  filter: blur(2px);
  animation: dtScan 2.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes dtScan {
  0%   { transform: translateY(-30%); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(400%); opacity: 0; }
}

.dt-lock-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 96, 96, .55);
  animation: dtCornerFade 2s ease-in-out infinite;
  pointer-events: none;
}
.dt-lock-corner.tl { top: 30px; left: 30px; border-width: 1px 0 0 1px; }
.dt-lock-corner.tr { top: 30px; right: 30px; border-width: 1px 1px 0 0; }
.dt-lock-corner.bl { bottom: 30px; left: 30px; border-width: 0 0 1px 1px; }
.dt-lock-corner.br { bottom: 30px; right: 30px; border-width: 0 1px 1px 0; }

@keyframes dtCornerFade { 0%, 100% { opacity: .35; } 50% { opacity: .8; } }

.dt-lock-inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 380px;
  padding: 0 24px;
  text-align: center;
}

.dt-lock-ring { position: relative; width: 74px; height: 74px; margin-bottom: 4px; }

.dt-lock-halo {
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,80,80,.65) 0%, transparent 68%);
  filter: blur(9px);
  animation: dtHalo 1.8s ease-in-out infinite;
}

@keyframes dtHalo {
  0%, 100% { opacity: .35; transform: scale(.9); }
  50%      { opacity: .7; transform: scale(1.08); }
}

.dt-lock-svg { position: relative; width: 100%; height: 100%; transform: rotate(-90deg); }
.dt-lock-track { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 2; }
.dt-lock-arc {
  fill: none;
  stroke: #ff5a5a;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 50 251;
  transform-origin: 50% 50%;
  animation: dtArcSpin 1.4s linear infinite;
}

@keyframes dtArcSpin { to { transform: rotate(360deg); } }

.dt-lock-icon {
  position: absolute;
  inset: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 90, 90, .12);
}
.dt-lock-icon svg { width: 24px; height: 24px; fill: #ff8080; }

.dt-lock-title {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: lowercase;
  color: #ffbcbc;
  text-shadow: 1px 0 rgba(255,60,60,.5), -1px 0 rgba(60,220,255,.35);
  animation: dtGlitch 3.4s steps(1) infinite;
}

@keyframes dtGlitch {
  0%, 92%, 100% { text-shadow: 1px 0 rgba(255,60,60,.5), -1px 0 rgba(60,220,255,.35); transform: translateX(0); }
  93% { text-shadow: -2px 0 rgba(255,60,60,.6), 2px 0 rgba(60,220,255,.45); transform: translateX(-1px); }
  95% { text-shadow: 2px 0 rgba(255,60,60,.6), -2px 0 rgba(60,220,255,.45); transform: translateX(1px); }
  97% { text-shadow: 1px 0 rgba(255,60,60,.5), -1px 0 rgba(60,220,255,.35); transform: translateX(0); }
}

.dt-lock-msg {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 300;
  letter-spacing: .04em;
  line-height: 1.6;
  color: rgba(255, 220, 220, .65);
}

.dt-lock-status {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255, 150, 150, .45);
}

.dt-dots span { animation: dtDots 1.4s steps(1) infinite; opacity: 0; }
.dt-dots span:nth-child(1) { animation-delay: 0s; }
.dt-dots span:nth-child(2) { animation-delay: .25s; }
.dt-dots span:nth-child(3) { animation-delay: .5s; }
@keyframes dtDots { 0%, 20% { opacity: 0; } 40%, 100% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .dt-lock-scan, .dt-lock-corner, .dt-lock-halo, .dt-lock-arc, .dt-lock-title, .dt-dots span {
    animation: none;
  }
}

/* =========================================================================
   TOAST
   ========================================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  transform: translate(-50%, 14px);
  z-index: 120;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(10, 11, 11, .82);
  border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 860px) {
  /* Phone GPUs pay a real, ongoing cost for backdrop-filter blur -- it has
     to keep re-sampling whatever's moving behind it (background, particles)
     every frame. Capping the radius here keeps the glass look while cutting
     that cost; it uses min() so it only ever brings a value *down*, so a
     smaller custom blur set in the admin panel is left alone. */
  :root { --card-blur-eff: min(var(--card-blur), 14px); }

  .card { width: 92%; padding: 26px 22px 18px; }

  .card-top { flex-direction: column-reverse; align-items: center; text-align: center; gap: 20px; }
  .card-left { width: 100%; }
  .name { font-size: clamp(32px, 9vw, 46px); }
  .badges, .socials { justify-content: center; }
  .badges { display: flex; }
  .bio { text-align: center; }
  .avatar-wrap { width: min(var(--avatar-size), 56vw); height: min(var(--avatar-size), 56vw); }

  .card-sub { grid-template-columns: 1fr; gap: 12px; }

  .card-foot { flex-direction: column; align-items: stretch; gap: 10px; font-size: 11.5px; }
  .foot-left, .foot-right { justify-content: center; }

  .gh { flex-wrap: wrap; }
  .gh-joined { width: 100%; }
  .val, .rbx { flex-wrap: wrap; }

  .player { right: 50%; transform: translate(50%, 12px) scale(.96); transform-origin: bottom center; }
  .player.open { transform: translate(50%, 0) scale(1); }
  .music-btn { right: 18px; bottom: calc(18px + var(--safe-bottom)); }

  .music-btn, .player, .toast {
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    backdrop-filter: blur(12px) saturate(150%);
  }
}

@media (max-width: 420px) {
  .page { padding: 16px 12px calc(16px + var(--safe-bottom)); }
  .activity { padding: 10px; }
  .lyrics { height: 62px; }
  .lyrics-line { height: 31px; line-height: 31px; font-size: 13px; }
}

/* Small phones (iPhone SE / mini and similar, ~375px and below): the 420px
   tier above already reflows everything into one column, this tier just
   tightens the numbers a bit further so nothing feels cramped or wraps
   awkwardly on the smallest screens people actually use. */
@media (max-width: 380px) {
  .card { width: 96%; padding: 22px 16px 16px; border-radius: min(var(--card-radius), 22px); }
  .name { font-size: clamp(28px, 10vw, 38px); margin-bottom: 10px; }
  .avatar-wrap { width: min(var(--avatar-size), 44vw); height: min(var(--avatar-size), 44vw); }
  .card-top { gap: 14px; }
  .bio { font-size: 13.5px; margin: 12px 0 10px; }
  .chips { gap: 5px; margin-bottom: 11px; }
  .chip { padding: 3px 9px; font-size: 11px; }
  .badges { gap: 6px; padding: 5px 9px; }
  .socials { gap: 12px; }
  .card-sub { gap: 9px; }
  .player { width: calc(100vw - 24px); padding: 18px 16px 14px; }
  .music-btn { width: 48px; height: 48px; right: 14px; }
}

/* short screens: allow scrolling instead of clipping the card */
@media (max-height: 600px) {
  body.entered { overflow-y: auto; }
  body.entered .page { place-items: start center; }
}

/* =========================================================================
   REDUCED MOTION
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .card { filter: none; transform: none; }
  .card-top, .activity, .card-sub, .gh, .val, .rbx, .card-foot,
  .name, .badges, .bio, .socials, .avatar-wrap { opacity: 1; transform: none; }
  .player-disc { animation: none; }
  .name { animation: none; }
  .particles { display: none; }
  body.ken-burns .bg { animation: none; }
  .trail, .card-light, .card-sheen, .avatar-sheen { display: none; }
  .card.glow-pulse { animation: none; }
}

/* =========================================================================
   FINISHING TOUCHES
   Small things that make the finished profile look deliberate rather than
   assembled: softer separators, a warmer name, badges that read as one pill,
   sub-cards that lift a little on hover.
   ========================================================================= */
.badges {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.badge { width: 21px; height: 21px; }
.badge svg { filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .3)); }

.avatar { transition: box-shadow .45s ease; }

.card:hover .avatar {
  box-shadow:
    0 14px 38px rgba(0, 0, 0, .34),
    0 0 calc(var(--avatar-glow) * 1.5) rgba(255, 255, 255, .55);
}

.sub, .gh, .val, .rbx {
  transition: background .3s ease, border-color .3s ease, transform .3s ease;
}

.sub:hover, .gh:hover, .val:hover, .rbx:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .22);
  transform: translateY(-2px);
}

.card-foot { opacity: .92; }

.music-btn {
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25), 0 0 18px rgba(255, 255, 255, .18);
}

.music-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3), 0 0 26px rgba(255, 255, 255, .3);
}

/* stacking order inside the card: content < running light < glass reflection */
.card-top, .activity, .card-sub, .gh, .val, .rbx, .card-foot { position: relative; z-index: 5; }
.card-sheen { z-index: 7; }

/* =========================================================================
   v4 ADDITIONS
   1. the badge row moved into the Discord sub-card
   2. decoration alignment now comes from the wrapper element, not :root
   3. music visualiser, status-coloured ring, badge shine
   ========================================================================= */

/* ---------- badges, when they live inside the Discord sub-card ---------- */
.badges-sub {
  margin-top: 7px;
  padding: 4px 9px;
  gap: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: none;
  max-width: 100%;
}

.badges-sub .badge { width: 18px; height: 18px; }

/* the sub-card is narrow: tooltips would run off the edge, so they sit above
   and clamp themselves instead of stretching the row */
.badges-sub .badge[data-tip]::after { font-size: 10px; padding: 3px 7px; }

/* the row is left-aligned even on phones, where the top badges get centred */
.sub-body .badges-sub { justify-content: flex-start; align-self: flex-start; }

/* the sub-card's own animation already handles the entrance */
.badges-sub { opacity: 1; transform: none; animation: none !important; }

/* ---------- decoration: the wrapper owns the numbers -------------------- */
/* fitDeco() writes --deco-scale / --deco-x / --deco-y straight onto
   .avatar-wrap and .sub-avatar after measuring the artwork. Both <img>
   elements already read the inherited values, so nothing else has to change;
   these two lines only stop a decoration from being clipped or from dragging
   the sheen out of round. */
.avatar-wrap, .sub-avatar { overflow: visible; }
.avatar-wrap.has-deco .avatar,
.sub-avatar.has-deco .sub-avatar-img { border-radius: 50%; }

/* while the decoration is still being measured the frame would visibly jump;
   a 140 ms ease makes the correction read as a settle instead of a glitch */
.avatar-deco, .sub-avatar-deco { transition: width .14s ease, height .14s ease, transform .14s ease; }

/* ---------- badge shine on hover --------------------------------------- */
.badge::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 6px;
  background: radial-gradient(60% 60% at 50% 50%, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.badge:hover::before { opacity: 1; }

/* ---------- the Discord sub-card picks up the presence colour ----------- */
.sub-user[data-status="online"] { box-shadow: inset 0 0 0 1px rgba(35, 165, 90, .35); }
.sub-user[data-status="idle"]   { box-shadow: inset 0 0 0 1px rgba(240, 178, 50, .35); }
.sub-user[data-status="dnd"]    { box-shadow: inset 0 0 0 1px rgba(242, 63, 67, .35); }

/* ---------- music visualiser ------------------------------------------- */
.player-viz {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 46px;
  border-radius: 0 0 26px 26px;
  opacity: var(--viz-op, .5);
  pointer-events: none;
  z-index: 0;
}

.player-disc, .player-body { position: relative; z-index: 1; }

/* ---------- views counter rolls up instead of popping in --------------- */
#views { font-variant-numeric: tabular-nums; }

/* =========================================================================
   v5 -- LAYOUT + THE EMPTY SPACE NEXT TO THE BIO

   Moving the badges down into the Discord card left the left column with a
   name, one line of bio and a row of icons standing against a 190px avatar,
   which is where the hole came from. Three things close it: the column is
   centred against the avatar instead of hanging off the top, the bio can now
   print every line instead of one at a time, and there is a row of pills the
   owner fills in with whatever they want.
   ========================================================================= */

/* ---------- top row arrangement ---------- */
.card-top { gap: var(--top-gap, 28px); }

body.top-center .card-top   { align-items: center; }
body.top-left .card-top     { flex-direction: row-reverse; }

body.top-stacked .card-top {
  flex-direction: column-reverse;
  align-items: center;
  text-align: center;
}

body.top-stacked .card-left { width: 100%; text-align: center; }

body.top-stacked .socials,
body.top-stacked .chips,
body.top-stacked .badges,
body.align-center .socials,
body.align-center .chips,
body.align-center .badges { justify-content: center; }

body.top-stacked .rule,
body.align-center .rule { margin-left: auto; margin-right: auto; }

body.align-center .card-left { text-align: center; }

/* ---------- avatar floats out of the card's top-right corner (wanji.lol) --
   The card gets extra top padding to make room, the avatar is pulled up and
   out with an absolute position, and the text column widens to fill the gap
   left behind and leaves clearance on the right so it never runs under the
   floating avatar. Desktop only -- the mobile media query below resets it
   back to the normal stacked layout, since a negative offset this size does
   not have room to work with under ~860px. */
body.top-float .card { padding-top: calc(34px + var(--avatar-size) * .35); }
body.top-float .card-top {
  position: relative;
  /* the floated avatar is pulled out of flow (position: absolute below), so
     the row's own height no longer reflects it -- without this, a big
     avatar simply hangs off the bottom of the card and overlaps whatever
     comes next (the location/clock footer, the Discord card...). Reserving
     the portion of the avatar that sits below the row's top edge keeps the
     card tall enough at every avatar.size (80-360). */
  min-height: calc(var(--avatar-size) * .65);
}
body.top-float .card-right {
  position: absolute;
  top: calc(var(--avatar-size) * -.35);
  right: 38px;
}
body.top-float .card-left {
  width: 100%;
  padding-right: calc(var(--avatar-size) * .55);
}

/* ---------- social icons above the bio instead of below (wanji.lol) ------ */
body.social-top .card-left { display: flex; flex-direction: column; }
body.social-top .card-left > * { order: 3; }
body.social-top .tagline { order: 1; }
body.social-top .name    { order: 2; }
body.social-top .socials { order: 2; margin: 2px 0 14px; }

/* ---------- small line above the name ---------- */
.tagline {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}

/* ---------- hairline between the name and the bio ---------- */
.rule {
  display: block;
  width: 74px;
  height: 1px;
  margin: 2px 0 12px;
  border-radius: 1px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, .55), rgba(255, 255, 255, .14) 60%, rgba(255, 255, 255, 0));
}

body.top-stacked .rule,
body.align-center .rule {
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0), rgba(255, 255, 255, .5) 50%, rgba(255, 255, 255, 0));
}

/* ---------- bio ---------- */
.bio { font-size: var(--bio-size, 15px); }

.bio-lines {
  margin: 4px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: calc(var(--bio-size, 15px) - 1px);
  font-style: italic;
  font-weight: 300;
  color: rgba(255, 255, 255, .72);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .16);
}

.bio-line { overflow-wrap: anywhere; }
.bio-line:first-child { color: rgba(255, 255, 255, .86); }

/* when every line is printed at once there is no cursor to blink */
body.bio-static .bio { display: none; }

/* ---------- the pill row the owner fills in ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 15px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .01em;
  color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .11);
  border: 1px solid rgba(255, 255, 255, .17);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, .19);
  border-color: rgba(255, 255, 255, .3);
  transform: translateY(-1px);
}

body.entered .chips    { animation: rise .6s cubic-bezier(.22,.8,.25,1) .42s forwards; }
body.entered .tagline  { animation: rise .6s cubic-bezier(.22,.8,.25,1) .16s forwards; }
body.entered .rule     { animation: rise .6s cubic-bezier(.22,.8,.25,1) .34s forwards; }
body.entered .bio-lines{ animation: rise .6s cubic-bezier(.22,.8,.25,1) .40s forwards; }
.chips, .tagline, .rule, .bio-lines { opacity: 0; transform: translateY(10px); }

/* ---------- social icons: size, spacing, three shapes ---------- */
.socials { gap: var(--social-gap, 16px); }
.social  { width: var(--social-size, 22px); height: var(--social-size, 22px); }

body.social-pill .social,
body.social-circle .social {
  width: calc(var(--social-size, 22px) + 18px);
  height: calc(var(--social-size, 22px) + 18px);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .17);
}

body.social-pill .social   { border-radius: 12px; }
body.social-circle .social { border-radius: 50%; }

body.social-pill .social svg, body.social-pill .social img,
body.social-circle .social svg, body.social-circle .social img {
  width: var(--social-size, 22px);
  height: var(--social-size, 22px);
}

body.social-pill .social:hover,
body.social-circle .social:hover {
  background: rgba(255, 255, 255, .2);
  border-color: rgba(255, 255, 255, .34);
}

/* ---------- badge size is adjustable now ---------- */
.badge { width: var(--badge-size, 21px); height: var(--badge-size, 21px); }
.badges-sub .badge {
  width: calc(var(--badge-size, 21px) - 3px);
  height: calc(var(--badge-size, 21px) - 3px);
}

/* ---------- the status hairline, dialled down and switchable ---------- */
.sub-user[data-status="online"],
.sub-user[data-status="idle"],
.sub-user[data-status="dnd"] { box-shadow: none; }

body.status-ring .sub-user[data-status="online"] { box-shadow: inset 0 0 0 1px rgba(35, 165, 90, var(--ring-a, .3)); }
body.status-ring .sub-user[data-status="idle"]   { box-shadow: inset 0 0 0 1px rgba(240, 178, 50, var(--ring-a, .3)); }
body.status-ring .sub-user[data-status="dnd"]    { box-shadow: inset 0 0 0 1px rgba(242, 63, 67, var(--ring-a, .3)); }

/* ---------- phones ----------
   The responsive block higher up already stacks the top row; these lines
   repeat it at a higher specificity so a chosen desktop layout (avatar on
   the left, for instance) does not survive down here, and they centre the
   two new rows to match everything else. */
@media (max-width: 860px) {
  body .card-top { flex-direction: column-reverse; align-items: center; text-align: center; }
  body .card-left { text-align: center; }
  body .chips, body .bio-lines { justify-content: center; align-items: center; }
  body .rule { margin-left: auto; margin-right: auto;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.5) 50%, rgba(255,255,255,0)); }
  body .tagline { text-align: center; }
  body .badges-sub { justify-content: flex-start; }

  /* "float" only has room to work with on desktop -- on phones the card
     is already narrow and column-reverse stacked, so give the avatar back
     its normal place in the flow instead of floating it off the card. */
  body.top-float .card { padding-top: 26px; }
  body.top-float .card-right { position: static; top: auto; right: auto; }
  body.top-float .card-left { width: 100%; padding-right: 0; }
}

/* =========================================================================
   v8.3 — extra typography, layouts and compact widget rail
   ========================================================================= */
.name.fx-aurora,.name.fx-hologram {
  display:inline-block;
  color:transparent;
  -webkit-text-fill-color:transparent;
  -webkit-background-clip:text;
  background-clip:text;
  text-shadow:none;
}
.name.fx-aurora {
  background-image:linear-gradient(100deg,var(--name-c1),#7fffd4,var(--name-c2),#ff8bd8,var(--name-c1));
  background-size:320% 100%;
  animation:nameAurora var(--name-fx) linear infinite;
  filter:drop-shadow(0 0 14px color-mix(in srgb,var(--name-glow) 48%,transparent));
}
@keyframes nameAurora { to { background-position:320% 0; } }
.name.fx-hologram {
  background-image:linear-gradient(92deg,#fff 0%,var(--name-c2) 20%,#8fffe8 38%,#ff9de4 57%,var(--name-c1) 78%,#fff 100%);
  background-size:230% 100%;
  animation:nameHologram var(--name-fx) ease-in-out infinite alternate;
  filter:drop-shadow(2px 0 0 rgba(255,73,190,.25)) drop-shadow(-2px 0 0 rgba(70,220,255,.25));
}
@keyframes nameHologram { from { background-position:0 50%; } to { background-position:100% 50%; } }
.name.fx-chromatic { color:var(--name-c1); animation:nameChromatic var(--name-fx) steps(1,end) infinite; }
@keyframes nameChromatic {
  0%,90%,100% { text-shadow:-2px 0 color-mix(in srgb,var(--name-c2) 75%,transparent),2px 0 color-mix(in srgb,var(--name-glow) 75%,transparent),0 0 22px rgba(255,255,255,.2); }
  93% { text-shadow:3px 1px #ff4ea3,-3px -1px #47dfff; transform:translateX(-1px); }
  96% { text-shadow:-3px -1px #ff4ea3,3px 1px #47dfff; transform:translateX(1px); }
}
.name.fx-outline { color:transparent; -webkit-text-fill-color:transparent; -webkit-text-stroke:1.4px var(--name-c1); text-shadow:0 0 18px var(--name-glow); }

/* Additional avatar arrangements. */
body.top-float-left .card-right { right:auto; left:38px; }
body.top-float-left .card-left { padding-right:0; padding-left:calc(var(--avatar-size) * .55); }
body.top-hero .card { margin-top:calc(var(--avatar-size) * .26); padding-top:calc(34px + var(--avatar-size) * .42); }
body.top-hero .card-top { flex-direction:column-reverse; align-items:center; text-align:center; }
body.top-hero .card-right { position:absolute; left:50%; top:calc(var(--avatar-size) * -.52); transform:translateX(-50%); }
body.top-hero .card-left { width:100%; text-align:center; }
body.top-hero .socials,body.top-hero .chips,body.top-hero .badges { justify-content:center; }
body.top-hero .rule { margin-left:auto; margin-right:auto; }
body.top-compact .card-top { align-items:center; }
body.top-compact .avatar-wrap { width:min(var(--avatar-size),138px); height:min(var(--avatar-size),138px); }

/* Widget stack becomes a horizontal, snap-scrolling rail on mobile. */
.widget-stack,.custom-widgets { display:contents; }
.custom-widget {
  position:relative;
  margin-top:18px;
  padding:16px 18px;
  border-radius:18px;
  overflow:hidden;
  background:linear-gradient(135deg,rgba(255,255,255,.105),rgba(255,255,255,.05));
  border:1px solid rgba(255,255,255,.14);
  content-visibility:auto;
  contain-intrinsic-size:auto 96px;
  opacity:0;
  transform:translateY(10px);
}
body.entered .custom-widget { animation:rise .6s cubic-bezier(.22,.8,.25,1) .68s forwards; }
.widget-quote { padding-left:58px; }
.widget-quote .widget-mark { position:absolute; left:17px; top:3px; font:700 56px/1 Georgia,serif; color:rgba(255,255,255,.32); }
.widget-quote p { margin:0; font-size:15px; font-style:italic; line-height:1.5; }
.widget-quote small { display:block; margin-top:8px; color:var(--ink-soft); }
.widget-skills strong,.widget-countdown>strong { display:block; margin-bottom:11px; font-size:13px; letter-spacing:.02em; }
.widget-tags { display:flex; flex-wrap:wrap; gap:7px; }
.widget-tags span { padding:5px 10px; border-radius:999px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.13); font-size:11.5px; }
.widget-status { display:flex; align-items:center; gap:13px; color:inherit; }
.widget-emoji { width:42px; height:42px; display:grid; place-items:center; flex:0 0 auto; border-radius:13px; font-size:22px; background:rgba(255,255,255,.12); box-shadow:inset 0 1px 0 rgba(255,255,255,.2); }
.widget-copy { min-width:0; display:flex; flex-direction:column; gap:3px; }
.widget-copy strong { font-size:14px; }
.widget-copy small { color:var(--ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.countdown-clock { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.countdown-clock span { min-width:0; padding:9px 6px; text-align:center; border-radius:12px; background:rgba(0,0,0,.14); border:1px solid rgba(255,255,255,.1); }
.countdown-clock b,.countdown-clock small { display:block; }
.countdown-clock b { font:600 19px/1.1 var(--mono); }
.countdown-clock small { margin-top:4px; color:var(--ink-dim); font-size:9px; text-transform:uppercase; letter-spacing:.08em; }

/* Richer Roblox card — full-body render, presence and optional join action. */
.rbx { position:relative; overflow:hidden; display:grid; grid-template-columns:150px minmax(0,1fr); min-height:174px; padding:0; gap:0; background:linear-gradient(125deg,rgba(20,22,29,.76),rgba(255,255,255,.08)); }
.rbx::before { content:''; position:absolute; inset:-25%; background-image:var(--rbx-game,none); background-size:cover; background-position:center; opacity:.1; filter:blur(26px); transform:scale(1.15); pointer-events:none; }
.rbx>* { position:relative; z-index:1; }
.rbx-visual { min-height:174px; display:grid; place-items:end center; overflow:hidden; background:radial-gradient(circle at 50% 26%,rgba(255,255,255,.12),transparent 48%),linear-gradient(145deg,rgba(255,255,255,.10),rgba(255,255,255,.04) 70%,transparent); }
.rbx-logo { position:absolute; top:12px; left:13px; font-size:23px; transform:rotate(45deg); color:rgba(255,255,255,.86); }
.rbx-avatar { width:142px; height:160px; max-width:none; object-fit:contain; object-position:center bottom; border-radius:0; background:transparent; filter:drop-shadow(0 16px 20px rgba(0,0,0,.42)); }
.rbx-body { display:flex; flex-direction:column; justify-content:center; min-width:0; padding:18px 20px; }
.rbx-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.rbx-name { font-size:18px; }
.rbx-handle { margin-top:2px; color:var(--ink-dim); font-size:11.5px; }
.rbx-presence { flex:0 0 auto; padding:4px 8px; border-radius:999px; background:rgba(116,127,141,.18); color:#c3c9d1; font-size:10px; font-weight:700; }
.rbx-presence[data-status="online"] { color:#6ee7a2; background:rgba(35,165,90,.16); }
.rbx-presence[data-status="playing"],.rbx-presence[data-status="studio"] { color:#8dc2ff; background:rgba(68,139,240,.18); }
.rbx-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin:13px 0 10px; }
.rbx-stats span { padding:7px 8px; border-radius:10px; text-align:center; background:rgba(255,255,255,.065); }
.rbx-stats b,.rbx-stats small { display:block; }
.rbx-stats b { color:#fff; font:600 14px/1.1 var(--mono); }
.rbx-stats small { margin-top:3px; color:var(--ink-dim); font-size:9px; }
.rbx-description { margin:0 0 10px; color:var(--ink-soft); font-size:11.5px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.rbx-actions { display:flex; gap:8px; }
.rbx-btn { background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.22); }
.rbx-btn-play { background:#23a55a; }

@media (max-width:860px) {
  .page { width:100%; min-width:0; overflow-x:hidden; }
  .card { width:min(680px,calc(100vw - 24px)); max-width:calc(100vw - 24px); min-width:0; }
  .card-sub { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .sub { min-width:0; padding:11px; }
  .sub-avatar,.sub-avatar-img { width:42px; height:42px; }
  .widget-stack { display:grid; width:100%; max-width:100%; min-width:0; contain:inline-size; grid-auto-flow:column; grid-auto-columns:min(82vw,350px); gap:11px; margin:15px -8px 0; padding:2px 8px 9px; overflow-x:auto; overscroll-behavior-inline:contain; scroll-snap-type:inline mandatory; scrollbar-width:none; }
  .widget-stack::-webkit-scrollbar { display:none; }
  .widget-stack>*,.custom-widgets>* { min-width:0; }
  .widget-stack>.gh,.widget-stack>.val,.widget-stack>.rbx,.custom-widgets>.custom-widget { scroll-snap-align:center; margin-top:0; align-self:stretch; }
  .custom-widgets { display:contents; }
  .gh,.val { min-height:126px; }
  .rbx { grid-template-columns:112px minmax(0,1fr); min-height:158px; }
  .rbx-visual { min-height:158px; }
  .rbx-avatar { width:112px; height:145px; }
  .rbx-body { padding:14px; }
  .rbx-description { display:none; }
  .card-foot { flex-direction:row; align-items:center; flex-wrap:wrap; margin-top:18px; }
  .foot-left,.foot-right { justify-content:flex-start; }

  /* Keep the requested protruding avatar on phones instead of turning it
     back into a tall vertical stack. */
  body.top-float .card { margin-top:54px; padding-top:34px; }
  body.top-float .card-top { min-height:108px; }
  body.top-float .card-right { position:absolute; top:-72px; right:18px; left:auto; }
  body.top-float .avatar-wrap { width:min(var(--avatar-size),132px); height:min(var(--avatar-size),132px); }
  body.top-float .card-left { width:100%; padding-right:94px; padding-left:0; text-align:left; }
  body.top-float .socials,body.top-float .chips,body.top-float .badges { justify-content:flex-start; }
  body.top-float .rule { margin-left:0; margin-right:0; background:linear-gradient(90deg,rgba(255,255,255,.55),rgba(255,255,255,.14) 60%,transparent); }
  body.top-float .tagline { text-align:left; }
  body.top-float-left .card-right { left:18px; right:auto; }
  body.top-float-left .card-left { padding-right:0; padding-left:94px; }

  body.top-hero .card { margin-top:60px; padding-top:72px; }
  body.top-hero .card-right { position:absolute; top:-66px; left:50%; right:auto; transform:translateX(-50%); }
  body.top-hero .avatar-wrap { width:min(var(--avatar-size),136px); height:min(var(--avatar-size),136px); }
  body.top-hero .card-left { padding:0; }

  body.top-compact .card-top { flex-direction:row; align-items:center; text-align:left; gap:14px; }
  body.top-compact .card-left { text-align:left; }
  body.top-compact .card-right { order:2; }
  body.top-compact .avatar-wrap { width:min(var(--avatar-size),108px); height:min(var(--avatar-size),108px); }
  body.top-compact .socials,body.top-compact .chips,body.top-compact .badges { justify-content:flex-start; }
  body.top-compact .rule { margin-left:0; margin-right:0; }
  body.top-compact .tagline { text-align:left; }
}

@media (max-width:480px) {
  .card { width:96%; padding-left:16px; padding-right:16px; }
  .card-sub { grid-template-columns:1fr; }
  .widget-stack { grid-auto-columns:min(86vw,330px); }
  body.top-float .card-left { padding-right:74px; }
  body.top-float-left .card-left { padding-left:74px; padding-right:0; }
  body.top-compact .avatar-wrap { width:min(var(--avatar-size),88px); height:min(var(--avatar-size),88px); }
  body.top-compact .name { font-size:clamp(27px,9vw,36px); }
  .countdown-clock { gap:5px; }
}

@media (prefers-reduced-motion:reduce) {
  .custom-widget { opacity:1; transform:none; animation:none !important; }
  .name.fx-aurora,.name.fx-hologram,.name.fx-chromatic { animation:none !important; }
}

/* v12: in-flow layouts reserve the avatar's full footprint. Switching sides
   never puts the picture or its decoration on top of the name. */
@media (min-width:861px) {
  .card-top { display:flex; align-items:center; gap:clamp(20px,4vw,40px); }
  .card-left { flex:1 1 0; min-width:0; padding:0 !important; }
  .card-right { flex:0 0 auto; width:min(var(--avatar-size),32%); min-width:0; }
  .card-right .avatar-wrap { width:100%; height:auto; aspect-ratio:1; }
  body.top-left .card-top { flex-direction:row-reverse; }
  body.top-float-left .card-top { flex-direction:row-reverse; }
  body.top-float .card { padding-top:48px; }
  body.top-float .card-top { min-height:0; }
  body.top-float .card-right,body.top-float-left .card-right { position:relative; inset:auto; transform:translateY(-12px); }
  body.top-hero .card { margin-top:0; padding-top:34px; }
  body.top-hero .card-top,body.top-stacked .card-top { flex-direction:column-reverse; text-align:center; }
  body.top-hero .card-right { position:static; transform:none; width:min(var(--avatar-size),210px); }
  body.top-hero .card-left,body.top-stacked .card-left { width:100%; }
  body.top-compact .card-right { width:min(var(--avatar-size),138px); }
}
@media (max-width:860px) {
  body .card-top,body.top-compact .card-top { display:flex; flex-direction:column-reverse; align-items:center; text-align:center; gap:20px; }
  body .card-right,body.top-float .card-right,body.top-float-left .card-right,body.top-hero .card-right { position:static; inset:auto; order:initial; width:auto; transform:none; }
  body .card-left,body.top-float .card-left,body.top-float-left .card-left,body.top-hero .card-left { width:100%; padding:0; text-align:center; }
  body.top-float .card,body.top-hero .card { margin-top:0; padding-top:26px; }
  body.top-float .card-top { min-height:0; }
  body .avatar-wrap,body.top-float .avatar-wrap,body.top-hero .avatar-wrap,body.top-compact .avatar-wrap { width:min(var(--avatar-size),min(45vw,168px)); height:auto; aspect-ratio:1; }
  body .socials,body .chips,body .badges { justify-content:center; }
  body .rule { margin-left:auto; margin-right:auto; }
}

/* Timed lyrics: a tall, smoothly scrolling stack with a bright current line. */
.lyrics { height:168px; margin-top:16px; }
.lyrics-track { transition:transform .48s cubic-bezier(.2,.8,.2,1); }
.lyrics-line { height:auto; min-height:43px; display:flex; align-items:center; line-height:1.25; padding:6px 1px; font-size:clamp(15px,2.1vw,21px); font-weight:600; white-space:normal; overflow:visible; text-overflow:clip; filter:blur(1.5px); opacity:.38; transition:opacity .35s,filter .35s,color .35s,text-shadow .35s,transform .35s; }
.lyrics-line.past { opacity:.28; }
.lyrics-line.active { opacity:1; filter:none; color:#fff; transform:scale(1.015); transform-origin:left center; text-shadow:0 0 8px rgba(255,255,255,.92),0 0 24px rgba(145,202,255,.8),0 0 48px rgba(111,166,255,.35); }
.player-lyrics { height:132px; margin-top:10px; }
.player-lyrics .lyrics-line { min-height:36px; font-size:14px; }
@media (max-width:600px) { .lyrics { height:132px; } .lyrics-line { min-height:36px; font-size:15px; } }

/* A friendly notice slides down when a blocked shortcut is pressed. */
.dt-notice { position:fixed; top:calc(18px + env(safe-area-inset-top)); left:50%; z-index:10002; display:flex; align-items:center; gap:12px; width:min(360px,calc(100vw - 28px)); padding:13px 16px; border:1px solid rgba(255,137,145,.36); border-radius:18px; color:#fff; background:linear-gradient(135deg,rgba(48,24,33,.97),rgba(20,20,28,.98)); box-shadow:0 18px 48px rgba(0,0,0,.48),0 0 24px rgba(238,79,101,.16); opacity:0; pointer-events:none; transform:translate(-50%,-135%); transition:transform .46s cubic-bezier(.2,.85,.2,1),opacity .25s; }
.dt-notice.show { opacity:1; transform:translate(-50%,0); }
.dt-notice-icon { flex:0 0 38px; width:38px; height:38px; display:grid; place-items:center; border-radius:12px; color:#ffd2d4; background:rgba(255,104,124,.16); font-size:23px; }
.dt-notice-copy strong,.dt-notice-copy small { display:block; }
.dt-notice-copy strong { font-size:13px; letter-spacing:.015em; }
.dt-notice-copy small { margin-top:3px; color:#c5aeb3; font-size:11px; }
@media (prefers-reduced-motion:reduce) { .dt-notice,.lyrics-track,.lyrics-line { transition:none; } }

/* v13: sharp raster backgrounds and restrained motion for still images. */
body.bg-sharp .bg { inset:0; }
body.bg-sharp.ken-burns .bg { animation-name:kenBurnsSharp; }
@keyframes kenBurnsSharp { from { transform:scale(1); } to { transform:scale(1.025); } }
.dt-notice-icon { font:400 28px/1 Arial,sans-serif; }

/* Three additional complete top arrangements, all with in-flow avatars. */
@media (min-width:861px) {
  body.top-editorial .card-top { flex-direction:row-reverse; gap:clamp(28px,5vw,56px); }
  body.top-editorial .card-right { width:min(var(--avatar-size),30%); padding-right:clamp(18px,3vw,34px); border-right:1px solid rgba(255,255,255,.2); }
  body.top-editorial .card-left { max-width:680px; }
  body.top-editorial .name { letter-spacing:-.04em; }
  body.top-showcase .card-top { flex-direction:column-reverse; text-align:center; gap:26px; }
  body.top-showcase .card-right { width:min(var(--avatar-size),230px); }
  body.top-showcase .card-left { width:100%; max-width:700px; text-align:center; }
  body.top-showcase .socials,body.top-showcase .chips,body.top-showcase .badges { justify-content:center; }
  body.top-showcase .rule { margin-left:auto; margin-right:auto; }
  body.top-minimal .card-top { gap:clamp(35px,7vw,100px); }
  body.top-minimal .card-right { width:min(var(--avatar-size),140px); }
  body.top-minimal .card-left { max-width:640px; }
  body.top-minimal .card { padding-top:clamp(34px,5vw,70px); padding-bottom:clamp(34px,5vw,70px); }
}

/* Mobile Roblox card: preserve the key identity and stats in a smaller rail. */
@media (max-width:600px) {
  .rbx { grid-template-columns:88px minmax(0,1fr); min-height:118px; }
  .rbx-visual { min-height:118px; }
  .rbx-avatar { width:88px; height:112px; }
  .rbx-logo { top:8px; left:8px; font-size:15px; }
  .rbx-body { padding:10px 11px; }
  .rbx-head { gap:5px; }
  .rbx-name { font-size:13px; }
  .rbx-handle { font-size:10px; }
  .rbx-presence { padding:3px 5px; font-size:9px; }
  .rbx-stats { gap:4px; margin:7px 0; }
  .rbx-stats span { padding:5px 2px; border-radius:6px; }
  .rbx-stats b { font-size:11px; }
  .rbx-stats small { font-size:8px; margin-top:1px; }
  .rbx-actions { gap:5px; }
  .rbx-actions .rbx-btn { padding:5px 8px; font-size:10px; }
}

/* v14 — separate view counter, anchored clear of the player. */
.view-dock { position:fixed; left:26px; bottom:calc(26px + var(--safe-bottom)); z-index:30; display:flex; align-items:center; gap:11px; min-width:150px; min-height:58px; padding:10px 15px; border:1px solid rgba(255,255,255,.23); border-radius:18px; color:#fff; background:linear-gradient(135deg,rgba(28,31,39,.76),rgba(11,13,19,.88)); box-shadow:0 14px 36px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.13); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); opacity:0; transform:translateY(14px); transition:opacity .55s ease .5s,transform .55s cubic-bezier(.2,.8,.2,1) .5s; }
body.entered .view-dock { opacity:1; transform:none; }
.view-dock-icon { width:23px; height:23px; display:grid; place-items:center; opacity:.85; }
.view-dock-icon svg { width:20px; height:20px; }
.view-dock-copy { display:flex; flex-direction:column; line-height:1.12; }
.view-dock-copy small { font:600 9px/1.2 var(--mono); letter-spacing:.16em; color:rgba(255,255,255,.57); }
.view-dock-copy strong { font:600 17px/1.2 var(--font); font-variant-numeric:tabular-nums; }
.view-dock-live { width:5px; height:5px; margin-left:auto; border-radius:50%; background:#7de7bb; box-shadow:0 0 9px rgba(125,231,187,.7); }
body.has-view-dock .page { padding-bottom:calc(96px + var(--safe-bottom)); }

/* Two balanced layouts inspired by the supplied dark and technical references. */
@media (min-width:861px) {
  body.top-cinema .card { padding:35px 42px; }
  body.top-cinema .card-top { flex-direction:row-reverse; gap:clamp(30px,5vw,70px); }
  body.top-cinema .card-right { width:min(var(--avatar-size),35%); margin-left:-56px; }
  body.top-cinema .card-left { max-width:610px; }
  body.top-cinema .name { letter-spacing:.055em; }
  body.top-terminal .card { width:min(var(--card-w),650px); padding:28px 34px; }
  body.top-terminal .card-top { flex-direction:row-reverse; gap:20px; align-items:flex-start; }
  body.top-terminal .card-right { width:min(var(--avatar-size),95px); }
  body.top-terminal .card-left { flex:1; }
  body.top-terminal .name { font-family:var(--mono); letter-spacing:.01em; }
  body.top-terminal .card-sub { margin-top:24px; }
}

/* Presets use CSS artwork; there are no large images to download. */
body[data-theme-preset="mono-noir"] .bg::after { content:""; position:absolute; inset:-20%; pointer-events:none; background:linear-gradient(128deg,transparent 14%,rgba(255,255,255,.7) 15%,transparent 16.5%,transparent 38%,rgba(255,255,255,.33) 39%,transparent 42%,transparent 71%,rgba(255,255,255,.46) 72%,transparent 74%); opacity:.7; transform:translate3d(-2%,0,0); animation:beamDrift 26s ease-in-out infinite alternate; }
@keyframes beamDrift { to { transform:translate3d(3%,-2%,0); } }
body[data-theme-preset="mono-noir"] .card { box-shadow:0 25px 90px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.16); }
body[data-theme-preset="mono-noir"] .avatar-wrap { box-shadow:0 0 0 3px rgba(255,255,255,.35),0 20px 45px rgba(0,0,0,.45); }
body[data-theme-preset="night-grid"] .bg::after { content:""; position:absolute; inset:0; pointer-events:none; background-image:radial-gradient(rgba(174,205,233,.22) .65px,transparent .8px),linear-gradient(rgba(174,205,233,.065) 1px,transparent 1px),linear-gradient(90deg,rgba(174,205,233,.065) 1px,transparent 1px); background-size:120px 120px,120px 120px,120px 120px; opacity:.8; }
body[data-theme-preset="night-grid"] .card { box-shadow:0 22px 80px rgba(0,0,0,.35),0 0 0 1px rgba(171,202,232,.05); }
body[data-theme-preset="night-grid"] .card::after { content:""; position:absolute; inset:9px; border:1px solid rgba(175,200,228,.06); border-radius:calc(var(--card-radius) - 8px); pointer-events:none; }
body[data-theme-preset="velvet-dusk"] .card { box-shadow:0 24px 90px rgba(17,11,37,.55),0 0 65px rgba(149,105,203,.13),inset 0 1px 0 rgba(255,255,255,.24); }

/* One-time card entrances. Only clip/transform run during the reveal. */
body.entered.enter-frame .card { animation:frameReveal .86s cubic-bezier(.19,1,.22,1) backwards; }
body.entered.enter-rise .card { animation:riseReveal .76s cubic-bezier(.19,1,.22,1) backwards; }
body.entered.enter-zoom .card { animation:zoomReveal .8s cubic-bezier(.19,1,.22,1) backwards; }
@keyframes frameReveal { from { opacity:0; clip-path:inset(47% 42% round var(--card-radius)); } 65% { opacity:1; } to { opacity:1; clip-path:inset(0 round var(--card-radius)); } }
@keyframes riseReveal { from { opacity:0; transform:perspective(1100px) translateY(52px) scale(.96); } to { opacity:1; transform:perspective(1100px) translateY(0) scale(1); } }
@keyframes zoomReveal { from { opacity:0; transform:perspective(1100px) scale(.8); } to { opacity:1; transform:perspective(1100px) scale(1); } }

body.low-power .card { --card-blur-eff:min(var(--card-blur),10px); }
body.low-power .card-sheen,body.low-power .avatar-sheen { display:none; }
body.low-power .card.glow-pulse,body.low-power .card-light,body.low-power .bg::after { animation:none !important; }
body.low-power .view-dock { -webkit-backdrop-filter:none; backdrop-filter:none; }

@media (max-width:600px) {
  .view-dock { left:12px; bottom:calc(12px + var(--safe-bottom)); min-width:115px; min-height:48px; padding:8px 10px; gap:7px; border-radius:13px; }
  .view-dock-copy small { font-size:8px; }
  .view-dock-copy strong { font-size:14px; }
  .view-dock-icon { width:19px; height:19px; }
  .view-dock-live { display:none; }
  body.has-view-dock .page { padding-bottom:calc(75px + var(--safe-bottom)); }
}
@media (prefers-reduced-motion:reduce) {
  body.entered.enter-frame .card,body.entered.enter-rise .card,body.entered.enter-zoom .card { animation:none; clip-path:none; opacity:1; }
  body[data-theme-preset="mono-noir"] .bg::after { animation:none; }
}
