/* ============================================================
   BIO SITE — theme values are set as CSS custom properties
   at runtime by js/main.js from config.json, so this file
   defines structure + behavior, config.json defines identity.
   ============================================================ */

:root {
  --accent: #8b7cf7;
  --accent2: #ff6f91;
  --gold: #ffd166;
  --glass-opacity: 0.05;
  --glass-blur: 22px;
  --radius: 28px;
  --font-display: 'Unbounded', ui-rounded, 'SF Pro Rounded', 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', 'Fira Code', ui-monospace, monospace;
  --overlay-opacity: 0.6;
  --bg-blur: 20px;
  --bg-mono: 0;
  --glossy-intensity: 1;
  --cursor-color: #8b7cf7;
  --cursor-size: 34px;
  --banner-h: 110px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #07070c;
  color: #f2f1f7;
  font-family: var(--font-body);
  overflow-x: hidden;
}

body { min-height: 100dvh; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Background layers ----------
   DOM order inside #bg-media-wrap (bottom to top):
   media (img/video, inserted by JS) -> #bg-gradient (color tint)
   -> #bg-canvas (ambient particles) -> #bg-overlay (dark vignette).
   Keeping particles INSIDE this stack, under the vignette, is what stops
   them from ever reading as a bright layer sitting on top of your image —
   they're part of the scene, dimmed by the same overlay as everything else. */
/* ---------- Background layers ----------
   DOM order inside #bg-media-wrap (bottom to top):
   media (img/video, inserted by JS) -> #bg-gradient (color tint)
   -> #bg-canvas (ambient particles) -> #bg-overlay (dark vignette).
   Keeping particles INSIDE this stack, under the vignette, is what stops
   them from ever reading as a bright layer sitting on top of your image —
   they're part of the scene, dimmed by the same overlay as everything else. */

#bg-media-wrap {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

#bg-canvas {
  position: absolute; 
  inset: 0; 
  width: 100%; 
  height: 100%;
  pointer-events: none;
}

#bg-media-wrap img,
#bg-media-wrap video {
  position: absolute; 
  inset: 0;
  width: 100%; 
  height: 100%;
  object-fit: cover;
  
  transform: scale(1.03); /* hides blur edge halo */
}

#bg-gradient {
  position: absolute; 
  inset: 0;
  opacity: 0;
  mix-blend-mode: normal;
  transition: opacity .4s ease;
}

#bg-overlay {
  position: absolute; 
  inset: 0;
  background: radial-gradient(120% 120% at 50% 0%, rgba(7,7,12,0.2), rgba(7,7,12,0.92));
  opacity: var(--overlay-opacity);
}
/* ---------- Enter gate ---------- */
#gate {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: #07070c;
  cursor: pointer;
  transition: opacity .6s ease, visibility .6s ease;
}
#gate.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-inner { text-align: center; }
.gate-ring {
  width: 64px; height: 64px; margin: 0 auto 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.12);
  border-top-color: var(--accent);
  animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#gate-text {
  font-family: var(--font-mono);
  letter-spacing: .08em;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  text-transform: uppercase;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:.5} 50%{opacity:1} }

/* ---------- App ---------- */
#app {
  position: relative; z-index: 1;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 16px 90px;
}

/* ---------- Glass chamber: stacked frosted panes behind the card,
   each with its own blur/offset, so the glass reads as real depth
   rather than one flat translucent rectangle. Tilts with the mouse. ---------- */
.card-stage {
  width: 100%; max-width: 420px;
  perspective: 1400px;
}

.card-chamber {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg);
  transition: transform .15s ease-out;
  animation: rise .7s cubic-bezier(.2,.8,.2,1) both;
  will-change: transform;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chamber-pane {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  
  backdrop-filter: blur(calc(var(--glass-blur) * 0.5));
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 0.5));
  
  pointer-events: none;
}
.pane-2 { transform: translate3d(0, 10px, -26px) scale(0.972); opacity: 0.75; }
.pane-3 { transform: translate3d(0, 20px, -52px) scale(0.944); opacity: 0.45;
  background: rgba(255,255,255, calc(var(--glass-opacity) * 0.35));
  backdrop-filter: blur(calc(var(--glass-blur) * 0.35));
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 0.35));
}

.card {
  position: relative;
  transform: translateZ(0);
  padding: 28px 26px 26px;
  border-radius: var(--radius, 28px);

  /* Fallback tint in case --glass-opacity is too low */
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, var(--glass-opacity, 0.07));

  border: 1px solid rgba(255, 255, 255, 0.25);

  /* Frosted Glass Effect — saturate+contrast boosted so whatever's behind
     reads as vivid "crystal" glass rather than a flat gray smear. If the
     background itself is heavily blurred/darkened (high blurPx + high
     overlayOpacity in config), there's less crisp detail available for
     this to work with — try lowering those for a clearer glass look. */
  backdrop-filter: blur(var(--glass-blur, 22px)) saturate(200%) contrast(1.1);
  -webkit-backdrop-filter: blur(var(--glass-blur, 22px)) saturate(200%) contrast(1.1);

  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 30px 70px -20px rgba(0, 0, 0, 0.65);

  overflow: hidden;
}
/* Slowly rotating holographic edge — a soft conic-gradient ring sitting
   just outside the card border, masked down to a thin line. Reads as a
   glass rim catching shifting light rather than a static outline. */
.card.fx-edge::before {
  content: "";
  position: absolute; inset: -1px; z-index: 2; pointer-events: none;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--rot, 0deg),
    color-mix(in srgb, var(--accent) 70%, transparent),
    transparent 25%, transparent 50%,
    color-mix(in srgb, var(--accent2) 70%, transparent) 65%,
    transparent 85%, color-mix(in srgb, var(--accent) 70%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rotate-edge 7s linear infinite;
  opacity: calc(0.8 * var(--glossy-intensity));
}
@keyframes rotate-edge { to { --rot: 360deg; } }

/* Film-grain: an inline noise texture keeps the frosted glass from
   looking like a flat blurred rectangle — real ground glass scatters
   light unevenly. Very low opacity, blended with overlay. */
.card.fx-grain::after {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: calc(0.035 * var(--glossy-intensity));
  mix-blend-mode: overlay;
  border-radius: inherit;
}

/* Specular sweep: a bright diagonal band drifts across the glass on a
   slow loop, like light catching a moving pane. Runs independently of
   the cursor-tracked glare so the card never looks fully static. */
.card.fx-sweep .card-sweep {
  position: absolute; top: -50%; left: -60%; z-index: 0; pointer-events: none;
  width: 45%; height: 200%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.09) 45%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.09) 55%, transparent);
  transform: rotate(8deg);
  animation: sweep 8s ease-in-out infinite;
  opacity: var(--glossy-intensity);
}
.card:not(.fx-sweep) .card-sweep { display: none; }
@keyframes sweep {
  0%, 100% { left: -60%; }
  50% { left: 120%; }
}

/* soft light that follows the cursor across the glass */
.card:not(.fx-glare) .card-glare { display: none; }
.card-glare {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(240px 240px at var(--mx, 50%) var(--my, 20%),
    rgba(255,255,255,0.16), transparent 70%);
  opacity: 0;
  transition: opacity .3s ease;
}
.card-chamber:hover .card.fx-glare .card-glare,
.card-chamber.tilting .card.fx-glare .card-glare { opacity: var(--glossy-intensity); }

/* thin bright line along the top edge, like light catching a glass rim */
.card-edge-light {
  position: absolute; top: 0; left: 12%; right: 12%; height: 1px; z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
}

.card > *:not(.card-glare):not(.card-edge-light):not(.banner) { position: relative; z-index: 1; }

.banner {
  position: absolute; top: 0; left: 0; right: 0;
  height: var(--banner-h, 100px);
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 45%, transparent), color-mix(in srgb, var(--accent2) 40%, transparent));
  opacity: 0.9;
  overflow: hidden;
}
.banner:empty { opacity: 0.55; }
.banner img,
.banner video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 75%;
  transform: scale(1.05); /* Slight zoom for premium feel */
  display: block;
}
/* fades the bottom of the banner into the glass so the avatar/name
   transition reads as intentional rather than a hard cut line */
.banner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(7,7,12,0.35));
  pointer-events: none;
}

.card-top {
  position: relative;
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-top: calc(var(--banner-h, 150px) - 73px);
}

.avatar-wrap { position: relative; width: 96px; height: 96px; }
.aura-ring { position: absolute; inset: -12px; width: 120px; height: 120px; transform: rotate(-90deg); }
.aura-ring-track { fill: none; stroke: rgba(255,255,255,0.12); stroke-width: 3; }
.aura-ring-fill {
  fill: none; stroke: var(--accent); stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 339.3;
  stroke-dashoffset: 339.3;
  transition: stroke-dashoffset 1s ease;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 70%, transparent));
}
.avatar {
  width: 96px; height: 96px; object-fit: cover;
  border: 3px solid #07070c;
  background: #12121c;
  display: block;
}
.avatar[data-shape="circle"] { border-radius: 50%; }
.avatar[data-shape="rounded"] { border-radius: 22px; }
.avatar[data-shape="square"] { border-radius: 4px; }

/* Discord's real status glyphs are shapes, not just colors — filled
   circle (online), crescent moon (idle), circle with a dash cut out
   (dnd), hollow ring (offline). Drawn as tiny inline SVGs so the shape
   reads correctly at a glance instead of just a colored blob. */
.status-dot {
  position: absolute; bottom: 2px; right: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  border: 0px solid #07070c;
  background-color: #07070c;
  background-size: 60%; background-position: center; background-repeat: no-repeat;
}
.status-dot[data-status="online"] {
  background-color: #3ba55d;
}
.status-dot[data-status="idle"] {
  background-color: #07070c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='%23faa61a'/%3E%3Ccircle cx='6' cy='6.5' r='7.5' fill='%2307070c'/%3E%3C/svg%3E");
  background-size: 100%;
}
.status-dot[data-status="dnd"] {
  background-color: #07070c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='%23ed4245'/%3E%3Crect x='4.5' y='8.2' width='11' height='3.6' rx='1.4' fill='%2307070c'/%3E%3C/svg%3E");
  background-size: 100%;
}
.status-dot[data-status="offline"] {
  background-color: #07070c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8.5' fill='none' stroke='%23747f8d' stroke-width='3'/%3E%3C/svg%3E");
  background-size: 100%;
}

.views-pill {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 5px 10px;
  border-radius: 100px;
}

.display-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 28px);
  margin: 18px 0 2px;
  line-height: 1.15;
}
.name-effect-gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--gold));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 6s linear infinite;
}
@keyframes sheen { to { background-position: 200% center; } }

.name-effect-neon {
  color: #fff;
  text-shadow: 0 0 6px var(--accent), 0 0 18px var(--accent), 0 0 40px color-mix(in srgb, var(--accent) 60%, transparent);
}

.name-effect-glitch { position: relative; color: #fff; }
.name-effect-glitch::before, .name-effect-glitch::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0; width: 100%;
  overflow: hidden; background: transparent;
}
.name-effect-glitch::before { color: var(--accent2); animation: glitch1 2.6s infinite linear; clip-path: inset(0 0 55% 0); }
.name-effect-glitch::after { color: var(--accent); animation: glitch2 3.1s infinite linear; clip-path: inset(55% 0 0 0); }
@keyframes glitch1 { 0%,88%,100%{transform:translate(0,0)} 89%{transform:translate(-2px,-1px)} 91%{transform:translate(2px,1px)} 93%{transform:translate(-1px,1px)} }
@keyframes glitch2 { 0%,90%,100%{transform:translate(0,0)} 91%{transform:translate(2px,0)} 94%{transform:translate(-2px,1px)} }

/* "tada" — a bouncy scale/rotate burst, animate.css-style, replaying every
   few seconds so it stays lively without being constantly distracting */
.name-effect-tada {
  display: inline-block;
  color: #fff;
  animation: tada 4s ease-in-out infinite;
  transform-origin: center;
}
@keyframes tada {
  0%, 68%, 100% { transform: scale3d(1,1,1) rotate(0); }
  70% { transform: scale3d(0.92,0.92,0.92) rotate(-2deg); }
  75% { transform: scale3d(1.12,1.12,1.12) rotate(-4deg); }
  80% { transform: scale3d(1.12,1.12,1.12) rotate(3deg); }
  85% { transform: scale3d(1.1,1.1,1.1) rotate(-3deg); }
  90% { transform: scale3d(1.05,1.05,1.05) rotate(2deg); }
  95% { transform: scale3d(1.02,1.02,1.02) rotate(-1deg); }
}

/* "sparkle" — small twinkling stars scattered over the name */
.name-effect-sparkle { position: relative; color: #fff; display: inline-block; }
.sparkle-text { position: relative; z-index: 1; }
.sparkle-dot {
  position: absolute;
  color: var(--gold);
  pointer-events: none;
  opacity: 0;
  animation: sparkle-twinkle 2.4s ease-in-out infinite;
  filter: drop-shadow(0 0 4px var(--gold));
}
@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(25deg); }
}

.handle-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.handle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  background: none; border: none; padding: 0; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.handle:hover { color: rgba(255,255,255,0.85); }
.handle .copied { color: var(--gold); font-size: 11px; opacity: 0; transition: opacity .2s; }
.handle.just-copied .copied { opacity: 1; }

.badges {
  display: flex; gap: 4px; align-items: center;
  padding: 4px 7px;
  background: rgba(255,255,255,0.05);
  border: 0px solid rgba(255,255,255,0.08);
  border-radius: 100px;
}
.badge-item { position: relative; display: flex; }
.badge-item img { width: var(--badge-size, 18px); height: var(--badge-size, 18px); display: block; }
.badge-item .tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #14141c; border: 1px solid rgba(255,255,255,0.12);
  padding: 4px 8px; border-radius: 8px;
  font-size: 11px; white-space: nowrap; color: #fff;
  opacity: 0; pointer-events: none; transition: opacity .15s ease; z-index: 5;
}
.badge-item:hover .tip { opacity: 1; }

.discord-presence {
  margin-top: 14px; padding: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}
.dc-header { display: flex; align-items: center; gap: 10px; }
.dc-avatar-wrap { position: relative; width: 36px; height: 36px; flex: none; }
.dc-avatar { width: 36px; height: 36px; border-radius: 50%; display: block; background: #12121c; }
.dc-status-dot {
  position: absolute; bottom: -2px; right: -2px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 0px solid #14141c;
  background-color: #747f8d; background-size: 100%; background-position: center; background-repeat: no-repeat;
}
.dc-status-dot[data-status="online"] { background-color: #3ba55d; }
.dc-status-dot[data-status="idle"] {
  background-color: #14141c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='%23faa61a'/%3E%3Ccircle cx='6' cy='6.5' r='7.5' fill='%2314141c'/%3E%3C/svg%3E");
}
.dc-status-dot[data-status="dnd"] {
  background-color: #14141c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='%23ed4245'/%3E%3Crect x='4.5' y='8.2' width='11' height='3.6' rx='1.4' fill='%2314141c'/%3E%3C/svg%3E");
}
.dc-status-dot[data-status="offline"] {
  background-color: #14141c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8' fill='none' stroke='%23747f8d' stroke-width='3'/%3E%3C/svg%3E");
}
.dc-name-row { display: flex; align-items: center; gap: 6px; }
.dc-name { font-weight: 600; font-size: 13.5px; color: #fff; }
.dc-badges { display: flex; gap: 3px; }
.dc-badge { width: 14px; height: 14px; line-height: 1; cursor: default; flex: none; }
.dc-status-text { font-size: 12px; color: rgba(255,255,255,0.6); display: flex; align-items: center; gap: 4px; }
.dc-emoji { width: 14px; height: 14px; }
.dc-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3ba55d; margin-left: auto; flex: none;
  box-shadow: 0 0 6px #3ba55d;
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.dc-activity {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; gap: 10px; align-items: center;
}
.dc-art { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; background: #12121c; }
.dc-art-wrap { position: relative; flex: none; }
.dc-art-badge {
  position: absolute; bottom: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(20,20,28,0.9); background: #1a1a24; object-fit: cover;
}
.dc-idle .dc-activity-detail { color: rgba(255,255,255,0.45); font-style: italic; }
.dc-activity-text { min-width: 0; flex: 1; }
.dc-activity-kind { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(#010000); }
.dc-activity-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-activity-detail { font-size: 12px; color: rgba(255,255,255,0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-activity-elapsed { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px; font-family: var(--font-mono); }

.dc-progress { margin-top: 6px; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.12); overflow: hidden; }
.dc-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 4px; }
.dc-progress-time {
  display: flex; justify-content: space-between;
  font-size: 10px; font-family: var(--font-mono); color: rgba(255,255,255,0.4); margin-top: 3px;
}

.bio-typer {
  margin: 16px 0 20px;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
  min-height: 48px;
}
.caret { display: inline-block; margin-left: 1px; color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.socials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--social-size, 46px), var(--social-size, 46px)));
  justify-content: center;
  gap: 14px;
}
.social-btn {
  display: flex; align-items: center; justify-content: center;
  width: var(--social-size, 46px); height: var(--social-size, 46px);
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: transform .18s ease, color .18s ease, filter .18s ease;
  position: relative;
}
.social-btn svg, .social-btn img { width: 60%; height: 60%; }
.social-btn:hover {
  transform: translateY(-3px) scale(1.08);
  color: var(--accent2);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 60%, transparent));
}
.social-btn .tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #14141c; border: 1px solid rgba(255,255,255,0.12);
  padding: 4px 8px; border-radius: 8px;
  font-size: 11px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.social-btn:hover .tip { opacity: 1; }

/* ---------- Music player: cover, marquee title, prev/play-pause/next ---------- */
.music-player {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 20;
  display: flex; align-items: center; gap: 10px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 8px 10px 8px 8px;
  border-radius: 100px;
  background: rgba(20,20,28,0.7);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(14px);
  color: rgba(255,255,255,0.85);
}
.music-cover { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.music-info { min-width: 0; flex: 1; overflow: hidden; }
.music-marquee-wrap { overflow: hidden; }
.music-marquee {
  display: inline-block; white-space: nowrap; font-family: var(--font-mono); font-size: 12px;
  padding-left: 100%;
  animation: marquee 9s linear infinite;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.music-controls { display: flex; align-items: center; gap: 2px; flex: none; }
.music-btn {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: transparent; border: none; color: rgba(255,255,255,0.75);
  cursor: pointer; transition: color .15s ease, transform .15s ease;
}
.music-btn:hover { color: #fff; transform: scale(1.08); }
.music-btn-main {
  width: 32px; height: 32px;
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  color: #fff;
}
.music-btn-main:hover { background: color-mix(in srgb, var(--accent) 45%, transparent); }

/* ---------- Footer ---------- */
.footer {
  position: fixed; bottom: 8px; left: 0; right: 0;
  text-align: center; font-size: 11px; color: rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-mono);
  z-index: 5;
  pointer-events: none;
}
.footer a { color: rgba(255,255,255,0.4); pointer-events: auto; text-decoration: none; }
.footer a:hover { color: rgba(255,255,255,0.7); }

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .card, .chamber-pane { padding: 22px 18px 20px; border-radius: 22px; }
  :root { --banner-h: 110px; }
  .card-top { margin-top: calc(var(--banner-h) - 60px); }
  .avatar, .avatar-wrap { width: 80px; height: 80px; }
  .aura-ring { width: 104px; height: 104px; inset: -12px; }
  .display-name { font-size: 24px; }
  .socials { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
}

@media (min-width: 900px) {
  .card-stage { max-width: 460px; }
}

/* ---------- Custom cursor ----------
   Only hides the system cursor when JS has confirmed a custom cursor is
   actually active (see initCustomCursor). Previously this was forced
   unconditionally, so disabling the cursor in config left visitors with
   NO cursor at all — fixed. */
body.custom-cursor-active,
body.custom-cursor-active a,
body.custom-cursor-active button,
body.custom-cursor-active .social-btn,
body.custom-cursor-active .handle,
body.custom-cursor-active .music-btn,
body.custom-cursor-active #gate { cursor: none; }

#cursor-layer { position: fixed; inset: 0; pointer-events: none; z-index: 999; }

#cursor-dot, #cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
#cursor-dot {
  width: 6px; height: 6px;
  background: var(--cursor-color);
  box-shadow: 0 0 8px color-mix(in srgb, var(--cursor-color) 80%, transparent);
}
#cursor-ring {
  width: var(--cursor-size); height: var(--cursor-size);
  border: 1.5px solid color-mix(in srgb, var(--cursor-color) 70%, white 10%);
  background: color-mix(in srgb, var(--cursor-color) 8%, transparent);
  transition: width .18s ease, height .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#cursor-ring.cursor-ring-image { background: none; border: none; }
#cursor-ring img { width: 100%; height: 100%; object-fit: contain; }
body.cursor-hover #cursor-ring:not(.cursor-ring-image) {
  width: calc(var(--cursor-size) * 1.45);
  height: calc(var(--cursor-size) * 1.45);
  border-color: var(--accent2);
  background: color-mix(in srgb, var(--accent2) 14%, transparent);
}
body.cursor-down #cursor-ring:not(.cursor-ring-image) {
  width: calc(var(--cursor-size) * 0.75); height: calc(var(--cursor-size) * 0.75);
}
.cursor-trail-dot {
  position: fixed; top: 0; left: 0; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cursor-color); pointer-events: none;
  transform: translate(-50%, -50%);
}

@media (hover: none), (pointer: coarse) {
  /* touch devices: no fake cursor, real system cursor/tap behavior */
  body.custom-cursor-active,
  body.custom-cursor-active a,
  body.custom-cursor-active button { cursor: auto; }
  #cursor-layer { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #cursor-layer { display: none; }
  body.custom-cursor-active { cursor: auto; }
}

/* ---------- Content protection (security.* in config.json) ---------- */
.no-select, .no-select * {
  user-select: none; -webkit-user-select: none; -moz-user-select: none;
}
.no-select img { -webkit-user-drag: none; }

/* Focus visibility for accessibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
