/* ============================================================
   Public bio page. Per-profile settings arrive as CSS variables
   set inline on <body>:
     --accent     accent color
     --text-c     base text color
     --card-op    card background opacity (0..0.95)
     --card-blur  card backdrop blur (px)
   ============================================================ */

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
}

body {
  background: #08080d;
  color: var(--text-c, #fff);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ---- background layers ---- */

.bg-fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1000px 600px at 50% -10%, color-mix(in srgb, var(--accent, #2dd4bf) 22%, transparent), transparent 70%),
    radial-gradient(800px 500px at 85% 110%, color-mix(in srgb, var(--accent, #2dd4bf) 10%, transparent), transparent 70%),
    #08080d;
}

img.bg-media, video.bg-media {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: blur(var(--bg-blur, 0px));
  opacity: var(--bg-op, 1);
}
/* Overscan a blurred background so its softened edges never reveal the
   page behind it; only kicks in when a blur is actually set. */
.bg-blurred img.bg-media, .bg-blurred video.bg-media {
  transform: scale(1.08);
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.45);
}

canvas#fx {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* ---- click-to-enter splash ---- */

#splash {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(5, 5, 9, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: opacity 0.5s ease;
}

#splash.leaving { opacity: 0; pointer-events: none; }

#splash .s-handle {
  font-size: clamp(22px, 4.5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 0 24px color-mix(in srgb, var(--accent, #2dd4bf) 65%, transparent);
}

#splash .s-hint {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  animation: splash-pulse 2.4s ease-in-out infinite;
}

@keyframes splash-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---- volume control ---- */

.volume {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(10, 10, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 9px 13px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity 0.3s ease;
}

/* collapsed by default: only the mute button shows; hover/focus expands the slider */
.volume #vol-slider,
.volume #vol-label {
  width: 0;
  min-width: 0;
  margin-left: 0;
  opacity: 0;
  pointer-events: none;
  transition: width 0.25s ease, margin-left 0.25s ease, opacity 0.2s ease;
}

.volume:hover #vol-slider,
.volume:focus-within #vol-slider {
  width: 96px;
  margin-left: 10px;
  opacity: 1;
  pointer-events: auto;
}

.volume:hover #vol-label,
.volume:focus-within #vol-label {
  width: 32px;
  margin-left: 8px;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .volume #vol-slider,
  .volume #vol-label { transition: none; }
}

.volume button {
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 18px;
}

.volume input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 96px;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 13px;
  width: 13px;
  border-radius: 50%;
  background: var(--accent, #fff);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent, #fff) 70%, transparent);
}

.volume input[type="range"]::-moz-range-thumb {
  height: 13px;
  width: 13px;
  border: none;
  border-radius: 50%;
  background: var(--accent, #fff);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent, #fff) 70%, transparent);
}

.volume #vol-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11.5px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  white-space: nowrap;
}

/* ---- layout ---- */

.bio-wrap {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: max(9vh, 70px) 16px 80px;
}

.tilt-zone { perspective: 900px; width: 100%; max-width: var(--page-w, 640px); }

/* ---- the card ---- */

.bio-card {
  width: 100%;
  background: rgba(9, 9, 14, var(--card-op, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--card-r, 26px);
  backdrop-filter: blur(var(--card-blur, 12px));
  -webkit-backdrop-filter: blur(var(--card-blur, 12px));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  padding: 42px 40px 36px;
  position: relative;
  text-align: center;
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

@media (max-width: 520px) { .bio-card { padding: 34px 22px 28px; } }

/* Corner containers for the stat pills (views / comments). Two pills in one
   corner sit in a row; right corners grow inward via row-reverse. */
.stat-slot { position: absolute; display: flex; gap: 6px; align-items: center; }
.slot-tl { top: 16px; left: 18px; }
.slot-tr { top: 16px; right: 18px; flex-direction: row-reverse; }
.slot-bl { bottom: 16px; left: 18px; }
.slot-br { bottom: 16px; right: 18px; flex-direction: row-reverse; }

.views {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sp-text-c, rgba(255, 255, 255, 0.55));
  font-size: 12.5px;
  font-weight: 600;
  background: var(--sp-bg, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--sp-border, rgba(255, 255, 255, 0.09));
  border-radius: 999px;
  padding: 4px 11px;
  font-variant-numeric: tabular-nums;
}

.views i { font-size: 11px; color: var(--sp-icon-c, inherit); }
.sp-icon-img { width: 14px; height: 14px; border-radius: 3px; object-fit: cover; display: block; }

/* Avatar shape + ring. Two levels on purpose: the glow drop-shadow filter
   must sit on a parent (.pfp-wrap) because filter + clip-path on the same
   element clips the shadow; .pfp-ring paints the ring in its padding area
   and shares the shape (border-radius / clip-path) with the img. */
.pfp-wrap {
  --pfp-ring: var(--ring-c, color-mix(in srgb, var(--accent, #2dd4bf) 65%, transparent));
  /* shrink-wrap like the old inline <img> so the card's text-align keeps
     positioning the avatar (center by default, left under .align-left) */
  display: inline-block;
  width: fit-content;
  line-height: 0;
}
.pfp-wrap.pfp-glow {
  filter: drop-shadow(0 0 30px color-mix(in srgb, var(--pfp-ring) 40%, transparent));
}
.pfp-ring {
  display: block;
  padding: var(--ring-w, 3px);
  background: var(--pfp-ring);
}
.pfp {
  height: 110px;
  width: 110px;
  object-fit: cover;
  display: block;
}

/* shapes — wrapper ring box and img share the radius / clip */
.pfp-ring, .pfp { border-radius: 50%; }
.shape-rounded .pfp-ring, .shape-rounded .pfp { border-radius: 24%; }
.shape-square .pfp-ring, .shape-square .pfp { border-radius: 4px; }
.shape-squircle .pfp-ring, .shape-squircle .pfp { border-radius: 36%; }
.shape-blob .pfp-ring, .shape-blob .pfp { border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%; }
.shape-hexagon .pfp-ring, .shape-hexagon .pfp {
  border-radius: 0;
  clip-path: polygon(50% 0, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
}
.shape-diamond .pfp-ring, .shape-diamond .pfp {
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* ring styles */
.ring-dashed .pfp-ring {
  background: repeating-conic-gradient(var(--pfp-ring) 0 14deg, transparent 14deg 26deg);
}
/* double = solid ring + a detached outline. outline follows border-radius
   but not clip-path, so hexagon/diamond degrade to a plain solid ring */
.ring-double .pfp-ring {
  outline: max(1px, calc(var(--ring-w, 3px) * 0.75)) solid var(--pfp-ring);
  outline-offset: calc(var(--ring-w, 3px) * 0.75);
}
.shape-hexagon.ring-double .pfp-ring, .shape-diamond.ring-double .pfp-ring { outline: none; }
@property --pfp-spin {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.ring-gradient .pfp-ring {
  background: conic-gradient(from var(--pfp-spin),
    var(--pfp-ring),
    color-mix(in srgb, var(--pfp-ring) 20%, #ffffff) 25%,
    var(--pfp-ring) 50%,
    color-mix(in srgb, var(--pfp-ring) 35%, transparent) 75%,
    var(--pfp-ring));
  animation: pfp-spin 3.5s linear infinite;
}
@keyframes pfp-spin { to { --pfp-spin: 360deg; } }

/* ring off wins over any style */
.pfp-wrap.ring-off .pfp-ring {
  padding: 0;
  background: none;
  outline: none;
  animation: none;
}

.namerow {
  margin: 16px 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
}

.username {
  color: var(--text-c, #fff);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.badges { display: inline-flex; gap: 7px; align-items: center; }

.badges .badge { display: inline-flex; cursor: help; }

.badges i {
  font-size: 14px;
  color: var(--accent, #2dd4bf);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent, #2dd4bf) 60%, transparent));
}

.badges i.staff { color: #facc15; filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.6)); }

/* ---- hover tooltips (any element with data-tip) ---- */

[data-tip] { position: relative; }

[data-tip]::before,
[data-tip]::after {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, 3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 60;
}

[data-tip]::after {
  content: attr(data-tip);
  margin-bottom: 10px;
  padding: 5px 11px;
  border-radius: 9px;
  background: rgba(12, 12, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

[data-tip]::before {
  content: "";
  margin-bottom: 5px;
  border: 5px solid transparent;
  border-top-color: rgba(12, 12, 18, 0.94);
}

[data-tip]:hover::before,
[data-tip]:hover::after,
[data-tip]:focus-visible::before,
[data-tip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---- custom tags ---- */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  margin: 8px 0 2px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tag, var(--accent, #2dd4bf));
  border: 1px solid color-mix(in srgb, var(--tag, var(--accent, #2dd4bf)) 45%, transparent);
  background: color-mix(in srgb, var(--tag, var(--accent, #2dd4bf)) 12%, transparent);
  text-decoration: none;
  white-space: nowrap;
}
a.tag-chip:hover { filter: brightness(1.15); }

.tag-anchor { position: relative; display: inline-block; }
/* avatar anchor shrink-wraps like the bare .pfp-wrap so the card's
   text-align keeps centering it, while giving the tooltip a positioning box */
.pfp-anchor { line-height: 0; }
.tag-pop {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: 11px;
  background: rgba(12, 12, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 60;
}
.tag-pop::before {
  content: "";
  position: absolute;
  border: 5px solid transparent;
}
.tag-pop.pop-top {
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 3px);
}
.tag-pop.pop-top::before {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: rgba(12, 12, 18, 0.94);
}
.tag-pop.pop-left {
  right: calc(100% + 10px);
  top: 50%;
  transform: translate(-3px, -50%);
  align-items: flex-end;
}
.tag-pop.pop-left::before {
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: rgba(12, 12, 18, 0.94);
}
.tag-pop.pop-right {
  left: calc(100% + 10px);
  top: 50%;
  transform: translate(3px, -50%);
  align-items: flex-start;
}
.tag-pop.pop-right::before {
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: rgba(12, 12, 18, 0.94);
}
.tag-anchor:hover .tag-pop,
.tag-anchor:focus-within .tag-pop {
  opacity: 1;
  visibility: visible;
}
.tag-anchor:hover .pop-top, .tag-anchor:focus-within .pop-top { transform: translate(-50%, 0); }
.tag-anchor:hover .pop-left, .tag-anchor:focus-within .pop-left,
.tag-anchor:hover .pop-right, .tag-anchor:focus-within .pop-right { transform: translate(0, -50%); }
/* narrow screens: no side room — side pops fall back to popping above */
@media (max-width: 560px) {
  .tag-pop.pop-left, .tag-pop.pop-right {
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(100% + 10px);
    transform: translate(-50%, 3px);
    align-items: center;
  }
  .tag-pop.pop-left::before, .tag-pop.pop-right::before {
    left: 50%;
    right: auto;
    top: 100%;
    transform: translateX(-50%);
    border-color: transparent;
    border-top-color: rgba(12, 12, 18, 0.94);
  }
  .tag-anchor:hover .pop-left, .tag-anchor:focus-within .pop-left,
  .tag-anchor:hover .pop-right, .tag-anchor:focus-within .pop-right { transform: translate(-50%, 0); }
}

.handle-line {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13.5px;
  font-weight: 500;
  margin: 0;
}

/* customizable @ before the handle (span or img, splash + card) */
img.at-mark {
  height: 1.1em;
  width: auto;
  vertical-align: -0.16em;
}

.location,
.occupation {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  margin-top: 8px;
}

/* the two sit on one line when both are set */
.location + .occupation { margin-left: 14px; }

.location i,
.occupation i { font-size: 11.5px; color: var(--accent, #2dd4bf); }

.uid-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent, #2dd4bf);
  background: color-mix(in srgb, var(--accent, #2dd4bf) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #2dd4bf) 40%, transparent);
}

.uid-chip i { font-size: 11px; }

.bio {
  color: color-mix(in srgb, var(--text-c, #fff) 72%, transparent);
  font-size: 14.5px;
  margin: 14px auto 0;
  max-width: 460px;
  min-height: 1.4em;
}

/* rendered bio markdown */
.bio .bl { display: block; }
.bio h1, .bio h2, .bio h3 { margin: 10px 0 4px; line-height: 1.25; color: var(--text-c, #fff); }
.bio h1 { font-size: 22px; }
.bio h2 { font-size: 18px; }
.bio h3 { font-size: 15.5px; }
.bio ul { margin: 6px auto; padding-left: 22px; text-align: left; max-width: 320px; }
.bio-card.align-left .bio ul { margin-left: 0; }
.bio li { margin: 2px 0; }
.bio hr { border: 0; border-top: 1px solid color-mix(in srgb, var(--text-c, #fff) 22%, transparent); margin: 10px 0; }
.bio code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; background: rgba(255, 255, 255, 0.09); border-radius: 5px; padding: 1px 6px; }
.bio a { color: var(--accent, #2dd4bf); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.bio a:hover { opacity: 0.85; }
.bio u { text-underline-offset: 2px; }

.bio .caret {
  display: inline-block;
  width: 1px;
  border-right: 2px solid var(--accent, #2dd4bf);
  margin-left: 2px;
  animation: caret-blink 0.9s steps(1) infinite;
}

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

/* ---- socials icon row ---- */

.socials {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--text-c, #fff);
  font-size: 18px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.socials a:hover {
  transform: translateY(-3px) scale(1.06);
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent, #2dd4bf);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

body.mono-icons .socials a,
body.mono-icons .bio-links .l-icon { color: var(--text-c, #fff); }

/* ---- crypto address chips + copy modal ---- */

.crypto-chips {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crypto-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.crypto-chip:hover {
  transform: translateY(-3px) scale(1.06);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.crypto-chip .ct {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

body.mono-icons .crypto-chip i,
body.mono-icons .crypto-chip .ct { color: var(--text-c, #fff) !important; }

.crypto-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.crypto-modal[hidden] { display: none; }

.cm-box {
  position: relative;
  width: min(430px, 100%);
  padding: 26px 24px 22px;
  border-radius: 18px;
  background: rgba(18, 18, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.cm-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  cursor: pointer;
}

.cm-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.cm-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.cm-address {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-all;
  user-select: all;
}

.cm-balance {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.cm-balance.loading {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
}

.cm-copy {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.cm-copy:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }

/* ---- linked telegram accounts ---- */

.tg-chips {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tg-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-c, #fff);
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.tg-chip i { font-size: 14px; color: #2aabee; }

.tg-chip:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent, #2dd4bf);
}

body.mono-icons .tg-chip i { color: var(--text-c, #fff); }

/* ---- link buttons ---- */

.bio-links {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.bio-links a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 14px 52px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-c, #fff);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}

.bio-links a .l-icon {
  position: absolute;
  left: 18px;
  font-size: 16.5px;
  color: var(--accent, #2dd4bf);
}

.bio-links a:hover {
  transform: translateY(-2.5px);
  border-color: color-mix(in srgb, var(--accent, #2dd4bf) 55%, transparent);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35), 0 0 18px color-mix(in srgb, var(--accent, #2dd4bf) 22%, transparent);
}

/* ---- discord presence (filled by JS via Lanyard) ---- */

.presence {
  display: none;
  margin-top: 20px;
  align-items: center;
  gap: 13px;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 12px 16px;
}

.presence.on { display: flex; }

.presence .p-avatar-wrap { position: relative; flex-shrink: 0; }

.presence img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: block;
}

.presence .p-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 3px solid #101016;
  background: #6b7280;
}

.presence .p-dot.online { background: #22c55e; }
.presence .p-dot.idle { background: #eab308; }
.presence .p-dot.dnd { background: #ef4444; }

.presence .p-info { min-width: 0; }

.presence .p-name { font-size: 13.5px; font-weight: 700; }

.presence .p-activity {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presence .p-brand { margin-left: auto; color: #5865f2; font-size: 17px; flex-shrink: 0; }

/* ---- steam profile card ---- */

.steam-card {
  display: flex;
  margin-top: 20px;
  align-items: center;
  gap: 13px;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 12px 16px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.steam-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
}

/* stacked cards sit closer together than the first sits to the section above */
.steam-card + .steam-card { margin-top: 10px; }

.steam-card .s-avatar-wrap { position: relative; flex-shrink: 0; }

.steam-card img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: block;
}

.steam-card .s-level {
  position: absolute;
  right: -7px;
  bottom: -7px;
  min-width: 21px;
  height: 21px;
  padding: 0 4px;
  border-radius: 999px;
  background: #101016;
  border: 2px solid #66c0f4;
  color: #66c0f4;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.steam-card .s-info { min-width: 0; display: block; }

.steam-card .s-name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.steam-card .s-meta {
  display: flex;
  gap: 11px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.steam-card .s-meta i { font-size: 11px; margin-right: 3px; }

.steam-card .s-brand { margin-left: auto; color: #66c0f4; font-size: 17px; flex-shrink: 0; }

body.mono-icons .steam-card .s-brand,
body.mono-icons .steam-card .s-level { color: var(--text-c, #fff); border-color: var(--text-c, #fff); }

/* ---- social stat cards (roblox, tiktok, ... hydrated from /api/socialcard) ---- */

.social-card {
  margin-top: 20px;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.social-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: color-mix(in srgb, var(--accent, #2dd4bf) 45%, transparent);
}

.social-card + .social-card { margin-top: 10px; }

.social-card .sc-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, #2dd4bf);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.mono-icons .social-card .sc-head { color: var(--text-c, #fff); }

.social-card .sc-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px 14px;
}

.social-card .sc-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.social-card .sc-info { min-width: 0; flex: 1; }

.social-card .sc-name {
  display: block;
  font-size: 14.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-card .sc-handle {
  display: block;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-card .sc-stats {
  display: flex;
  gap: 18px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.social-card .sc-stat b {
  display: block;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--accent, #2dd4bf);
  line-height: 1.15;
}

body.mono-icons .social-card .sc-stat b { color: var(--text-c, #fff); }

.social-card .sc-stat i {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.social-card .sc-view {
  flex-shrink: 0;
  align-self: center;
  padding: 8px 14px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent, #2dd4bf);
  border: 1px solid color-mix(in srgb, var(--accent, #2dd4bf) 55%, transparent);
  background: color-mix(in srgb, var(--accent, #2dd4bf) 12%, transparent);
  text-decoration: none;
  transition: background 0.18s ease;
}

.social-card .sc-view:hover {
  background: color-mix(in srgb, var(--accent, #2dd4bf) 24%, transparent);
}

body.mono-icons .social-card .sc-view {
  color: var(--text-c, #fff);
  border-color: color-mix(in srgb, var(--text-c, #fff) 45%, transparent);
  background: color-mix(in srgb, var(--text-c, #fff) 10%, transparent);
}

@media (max-width: 480px) {
  .social-card .sc-body { flex-wrap: wrap; }
  .social-card .sc-view { margin-left: auto; }
}

/* ---- local profile widgets: timezone, weather, spotify, join date ----
   These render inside the shared .social-card shell (outer chrome — margin,
   border, radius, hover — already covered above); only the inner layout is
   type-specific here. */

.tz-card {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 18px;
}

.tz-card .tz-time {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tz-card .tz-zone {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.wx-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
}

.wx-card i { font-size: 21px; color: var(--accent, #38bdf8); flex-shrink: 0; }

.wx-card .wx-temp { font-size: 17px; font-weight: 800; }
.wx-card .wx-temp small { font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, 0.5); margin-left: 4px; }

.wx-card .wx-label {
  margin-left: auto;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 16px;
}

.spotify-card .sp-art { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }

.spotify-card .sp-info { min-width: 0; }

.spotify-card .sp-track {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-card .sp-artist {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-date-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
}

.account-date-card i { font-size: 17px; color: var(--accent, #8b5cf6); flex-shrink: 0; }

.account-date-card .ad-joined { font-size: 13px; font-weight: 600; }

.account-date-card .ad-uid {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

/* ---- linked discord servers (counts hydrated by JS) ---- */

.dsv-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dsv {
  display: block;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dsv:hover {
  transform: translateY(-2.5px);
  border-color: color-mix(in srgb, var(--accent, #2dd4bf) 55%, transparent);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

.dsv-banner {
  height: 64px;
  background-size: cover;
  background-position: center;
}

.dsv-banner.none {
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent, #2dd4bf) 45%, #14141c), #14141c);
}

.dsv-body {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px 12px;
}

.dsv-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  margin-top: -28px;
  border: 3px solid #101016;
  background: #101016;
  flex-shrink: 0;
  display: block;
}

.dsv-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5865f2;
  font-size: 20px;
}

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

.dsv-name {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dsv-counts {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  min-height: 16px;
  align-items: center;
}

.dsv-counts .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.dsv-counts .dot.on { background: #22c55e; }
.dsv-counts .dot.off { background: #6b7280; }

.dsv-counts b { color: var(--text-c, #fff); font-weight: 700; margin-right: 3px; }

.dsv-join {
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  background: #5865f2;
  color: #fff;
}

/* ---- comments ---- */

.comments-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sp-text-c, rgba(255, 255, 255, 0.55));
  font-size: 12.5px;
  font-weight: 600;
  background: var(--sp-bg, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--sp-border, rgba(255, 255, 255, 0.09));
  border-radius: 999px;
  padding: 4px 11px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.comments-toggle i { font-size: 11px; color: var(--sp-icon-c, inherit); }

.comments-toggle .ct-count {
  color: rgba(255, 255, 255, 0.4);
  font-variant-numeric: tabular-nums;
}

.comments-toggle:hover,
.comments-toggle.active {
  border-color: var(--sp-border, color-mix(in srgb, var(--accent, #2dd4bf) 55%, transparent));
  background: var(--sp-bg, rgba(255, 255, 255, 0.09));
  color: var(--sp-text-c, var(--text-c, #fff));
}

.comments-toggle:hover .ct-count,
.comments-toggle.active .ct-count { color: color-mix(in srgb, var(--text-c, #fff) 60%, transparent); }

.comments-card { display: none; }

.comments-card.open {
  display: block;
  animation: comments-in 0.35s ease;
}

@keyframes comments-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.comments-card {
  width: 100%;
  max-width: 640px;
  background: rgba(9, 9, 14, var(--card-op, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  backdrop-filter: blur(var(--card-blur, 12px));
  -webkit-backdrop-filter: blur(var(--card-blur, 12px));
  padding: 24px 28px;
  text-align: left;
}

.comments-card .c-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 16px;
}

.comments-card .c-head i { color: var(--accent, #2dd4bf); font-size: 13px; }

.comments-card .c-head .count { color: rgba(255, 255, 255, 0.4); font-weight: 600; }

.comment-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.comment-form .hp { display: none; }

.comment-form input.name,
.comment-form textarea {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-c, #fff);
  font-family: inherit;
  font-size: 13.5px;
  padding: 10px 13px;
  resize: vertical;
}

.comment-form input.name { width: 180px; }

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent, #2dd4bf) 55%, transparent);
}

.comment-form .commenting-as { font-size: 12.5px; color: rgba(255, 255, 255, 0.45); }

.comment-form button {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--text-c, #fff);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 18px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.comment-form button:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: color-mix(in srgb, var(--accent, #2dd4bf) 55%, transparent);
}

.comment { border-top: 1px solid rgba(255, 255, 255, 0.07); padding: 12px 2px; }

.comment .meta {
  margin: 0 0 3px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.comment .author { font-weight: 700; font-size: 13px; }

/* commenter badges: same crown/gem as the namerow, scaled down and pulled
   toward the author name (meta gap stays 10px for the rest of the row) */
.comment .c-badges { gap: 5px; margin-left: -4px; align-self: center; }

.comment .c-badges i { font-size: 11px; }

.comment .when { color: rgba(255, 255, 255, 0.35); font-size: 12px; }

.comment .body {
  margin: 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.75);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.comment .del { display: inline; margin-left: auto; }

.comment .del button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.comment .del button:hover { color: #f87171; }

.no-comments { color: rgba(255, 255, 255, 0.4); font-size: 13px; }

.login-to-comment { color: rgba(255, 255, 255, 0.4); font-size: 13px; margin: 0 0 20px; }

.login-to-comment a { color: var(--accent, #2dd4bf); font-weight: 600; text-decoration: none; }

.login-to-comment a:hover { text-decoration: underline; }

/* ---- watermark (free plan) ---- */

.watermark {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(10, 10, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.watermark:hover { border-color: rgba(255, 255, 255, 0.3); color: #fff; }

.watermark i { color: #2dd4bf; font-size: 12px; }

/* ---- username effects live in fx.css (shared with the builder) ---- */

@media (prefers-reduced-motion: reduce) {
  #splash .s-hint, .bio .caret, .comments-card.open, .ring-gradient .pfp-ring { animation: none; }
  .bio-card { transition: none; }
  [data-tip]::before, [data-tip]::after { transition: none; }
}

/* ---- background scaling (bg_fit setting) ---- */

/* cover (crop) is the .bg-media default above */
.bg-media.fit-contain {
  object-fit: contain;
  background: #08080d; /* letterbox bars when aspect ratios differ */
}

.bg-media.fit-fill { object-fit: fill; }

/* ---- custom brand icons ---- */

/* Roblox has no Font Awesome glyph; its tilted-square mark is a CSS mask,
   drawn on ::before so it composes with icon boxes the same way FA does */
.icon-roblox::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' transform='rotate(15 12 12)' d='M3.5 3.5h17v17h-17zM9.35 9.35h5.3v5.3h-5.3z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' transform='rotate(15 12 12)' d='M3.5 3.5h17v17h-17zM9.35 9.35h5.3v5.3h-5.3z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---- cursor effects overlay (bio.js draws into it) ---- */

canvas#cursor-fx {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}


/* ============================================================
   Layout system: card layout / alignment / style presets
   (builder Layout & Card tiles — classes set on .bio-card)
   ============================================================ */

/* float: the avatar breaks out over the card's top edge; it stays centered
   in every alignment so it never collides with the corner chips */
.bio-card.layout-float { margin-top: 55px; }
.bio-card.layout-float .pfp-wrap { display: block; width: fit-content; margin-left: auto; margin-right: auto; margin-top: calc(-55px - 42px); }
@media (max-width: 520px) { .bio-card.layout-float .pfp-wrap { margin-top: calc(-55px - 34px); } }

/* compact: avatar sits beside an identity column (name, handle, uid,
   location); everything after the header spans the full width */
.bio-card.layout-compact { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; text-align: left; }
.bio-card.layout-compact > * { grid-column: 1 / -1; }
.bio-card.layout-compact .pfp-wrap { grid-column: 1; grid-row: 1 / span 4; align-self: center; }
.bio-card.layout-compact .pfp { width: 84px; height: 84px; }
.bio-card.layout-compact .namerow { grid-column: 2; grid-row: 1; justify-content: flex-start; margin: 0; align-self: end; }
.bio-card.layout-compact .handle-line { grid-column: 2; grid-row: 2; align-self: start; margin-top: 2px; }
.bio-card.layout-compact .uid-chip { grid-column: 2; grid-row: 3; justify-self: start; margin: 7px 0 0; }
.bio-card.layout-compact .location { grid-column: 2; grid-row: 4; margin: 6px 0 0; }
.bio-card.layout-compact .occupation { grid-column: 2; grid-row: 5; justify-self: start; margin: 2px 0 0; }
.bio-card.layout-compact .stat-slot { grid-column: auto; grid-row: auto; }
/* body content keeps its own alignment; just restore the vertical rhythm
   the stacked flow gets from margin collapsing */
.bio-card.layout-compact .bio { margin-top: 22px; }
.bio-card.layout-compact.align-center .bio { margin-left: auto; margin-right: auto; }
.bio-card.layout-compact.align-left .bio { margin-left: 0; }

/* left alignment: text and chip rows hug the left edge */
.bio-card.align-left { text-align: left; }
.bio-card.align-left .namerow,
.bio-card.align-left .socials,
.bio-card.align-left .crypto-chips,
.bio-card.align-left .tg-chips { justify-content: flex-start; }
.bio-card.align-left .pfp-wrap { align-self: flex-start; }
.bio-card.align-left .uid-chip { margin-left: 0; margin-right: auto; }
.bio-card.align-left .bio { margin-left: 0; margin-right: 0; }

/* card style shells */
.bio-card.style-outlined {
  background: rgba(9, 9, 14, calc(var(--card-op, 0.55) * 0.45));
  border: 1.5px solid color-mix(in srgb, var(--accent, #2dd4bf) 45%, rgba(255, 255, 255, 0.25));
  box-shadow: none;
}
.bio-card.style-soft {
  border: none;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.6);
}
.bio-card.style-transparent {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* glowing social + link icons (Effects tile) */
.glow-icons .socials a i,
.glow-icons .bio-links a .l-icon,
.glow-icons .crypto-chip i { filter: drop-shadow(0 0 7px var(--accent, #2dd4bf)); }

/* ---- tracks player ---- */

.tracks-player {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 20px;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 12px 16px;
}

.tp-cover {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tp-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tp-cover-fallback {
  color: rgba(255, 255, 255, 0.35);
  font-size: 18px;
}

.tp-disc { display: none; }

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

.tp-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-c, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-title.tp-secret { opacity: .6; font-style: italic; }

.tp-artist {
  font-size: 12px;
  color: color-mix(in srgb, var(--text-c, #fff) 55%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.tp-bar {
  margin-top: 8px;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  overflow: hidden;
}

.tp-progress {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--accent, #2dd4bf);
}

.tp-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 7px;
}

.tp-controls button {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  color: var(--text-c, #fff);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.tp-controls button:hover { opacity: 1; color: var(--accent, #2dd4bf); }

.tp-controls #tp-play { font-size: 16px; }

/* ---- compact: single tight row, artist after a middot, controls flush right ---- */

.tp-compact { padding: 9px 14px; }

.tp-compact .tp-cover { width: 36px; height: 36px; border-radius: 8px; }

.tp-compact .tp-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 6px;
}

.tp-compact .tp-title { order: 1; font-size: 12.5px; }

.tp-compact .tp-artist {
  order: 2;
  margin-top: 0;
  font-size: 12px;
}

.tp-compact .tp-artist::before { content: '\00b7'; margin-right: 6px; opacity: 0.6; }

.tp-compact .tp-controls { order: 3; margin-left: auto; margin-top: 0; gap: 10px; }

.tp-compact .tp-bar { order: 4; flex-basis: 100%; margin-top: 5px; height: 3px; }

/* ---- banner: blurred cover fills the card, body overlays the bottom ---- */

.tp-banner {
  position: relative;
  display: block;
  min-height: 96px;
  padding: 0;
  overflow: hidden;
}

.tp-banner .tp-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.tp-banner .tp-cover img {
  filter: blur(18px) brightness(0.6) saturate(1.15);
  transform: scale(1.2);
}

.tp-banner .tp-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 6, 10, 0.1) 0%, rgba(6, 6, 10, 0.8) 100%);
}

.tp-banner .tp-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.tp-banner .tp-body {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 14px 16px 12px;
  color: #fff;
}

/* ---- vinyl: round cover on a grooved disc, spins while playing ---- */

.tp-vinyl .tp-cover {
  border-radius: 50%;
  overflow: visible;
  animation: tp-spin 4s linear infinite;
  animation-play-state: paused;
}

.tp-vinyl.playing .tp-cover { animation-play-state: running; }

.tp-vinyl .tp-cover img { border-radius: 50%; }

.tp-vinyl .tp-disc {
  display: block;
  position: absolute;
  inset: -7px;
  z-index: -1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, #17171c 0, #17171c 2px, #26262e 3px, #26262e 4px);
}

/* ---- cover_vinyl: square cover with a disc peeking out from behind ---- */

.tp-cover_vinyl .tp-cover {
  border-radius: 10px;
  overflow: visible;
}

.tp-cover_vinyl .tp-cover img { border-radius: 10px; }

.tp-cover_vinyl .tp-disc {
  display: block;
  position: absolute;
  top: 50%;
  left: 60%;
  width: 100%;
  height: 100%;
  z-index: -1;
  transform: translateY(-50%);
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, #17171c 0, #17171c 2px, #26262e 3px, #26262e 4px);
  animation: tp-spin 4s linear infinite;
  animation-play-state: paused;
}

.tp-cover_vinyl.playing .tp-disc { animation-play-state: running; }

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

@media (prefers-reduced-motion: reduce) {
  .tp-vinyl .tp-cover,
  .tp-cover_vinyl .tp-disc { animation: none; }
}

/* ---- template try-on bar ---- */
.tpl-preview-bar {
    position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 10px; z-index: 60;
    padding: 10px 14px; border-radius: 14px;
    background: rgba(10, 10, 14, 0.85); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.14); color: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}
.tpl-preview-bar .tpl-preview-label { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.tpl-preview-bar form { margin: 0; }
