.widget {
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.glass {
  background: linear-gradient(165deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01) 40%), var(--bg-panel);
  border: 1px solid rgba(255,255,255,0.14);
  border-top-color: rgba(255,255,255,0.28);
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  box-shadow:
    0 10px 36px rgba(0,0,0,0.4),
    inset 0 1px 1px rgba(255,255,255,0.18),
    inset 0 0 24px rgba(255,255,255,0.03);
}

/* subtle rain-on-glass shimmer: soft diagonal glare + drifting droplet highlights */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.05) 0, transparent 3%),
    radial-gradient(circle at 70% 55%, rgba(255,255,255,0.04) 0, transparent 2.5%),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.05) 0, transparent 2%),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.03) 0, transparent 2%),
    linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.035) 50%, transparent 60%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 220% 220%;
  animation: glassDrift 14s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes glassDrift {
  0%   { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
  50%  { background-position: 0% 6%, 0% -4%, 0% 5%, 0% -3%, 100% 100%; }
  100% { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
}

/* Profile card: lighter glass so background stays visible (like music view) */
#profile-card.glass {
  background:
    linear-gradient(165deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01) 45%),
    rgba(12, 10, 8, 0.18);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow:
    0 8px 28px rgba(0,0,0,0.28),
    inset 0 1px 1px rgba(255,255,255,0.14);
}
body.light-mode #profile-card.glass {
  background:
    linear-gradient(165deg, rgba(255,255,255,0.35), rgba(255,255,255,0.12) 45%),
    rgba(255, 250, 235, 0.35);
}

.profile-box { text-align: center; position: relative; z-index: 1; }

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 22px rgba(240,207,122,0.35);
  margin: 0 auto 12px;
  object-fit: cover;
}

.profile-box h1 {
  font-size: 1.4rem;
  letter-spacing: 0.15em;
  color: var(--gold-bright);
}

.profile-tagline {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.profile-quote {
  margin-top: 14px;
  font-size: 0.8rem;
  color: #c9bd9c;
  line-height: 1.6;
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}
.social-row a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: border-color 0.2s, transform 0.2s;
}
.social-row a:hover { border-color: var(--gold); transform: translateY(-2px); }
.social-row a svg { width: 16px; height: 16px; fill: var(--gold-bright); }

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-inline-end: 6px;
  position: relative;
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.5;
  animation: statusPulse 2s ease-out infinite;
}
.status-online { background: #43d17c; box-shadow: 0 0 6px #43d17c; }
.status-idle { background: #e2b13c; box-shadow: 0 0 6px #e2b13c; }
.status-dnd { background: #e5484d; box-shadow: 0 0 6px #e5484d; }
.status-offline { background: #5c5c5c; }
.status-offline::after { display: none; }

@keyframes statusPulse {
  0% { transform: scale(0.6); opacity: 0.55; }
  70% { transform: scale(1.8); opacity: 0; }
  100% { opacity: 0; }
}

.recent-game {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  position: relative; z-index: 1;
}
.recent-game img { width: 36px; height: 36px; border-radius: 6px; }
.recent-game .title { font-size: 0.82rem; color: var(--gold-bright); }
.recent-game .meta { font-size: 0.7rem; color: var(--text-dim); }

.widget-error { color: #d98c6b; font-size: 0.8rem; position: relative; z-index: 1; }

.widget.compact { padding: 12px 16px; }
.widget.compact h2 { margin-bottom: 6px; font-size: 0.7rem; }
.widget.compact .row { padding: 3px 0; font-size: 0.78rem; }
.widget.compact .recent-game { margin-top: 4px; padding-top: 4px; }

/* Telegram: channel row + DM/support row, cat photo thumbnail */
.tg-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,0.08); position: relative; z-index: 1; }
.tg-row:last-child { border-bottom: none; }
.tg-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.tg-icon svg { width: 16px; height: 16px; fill: var(--gold-bright); }
.tg-icon-channel { background: #34c759; }
.tg-icon-channel svg { fill: #fff; }
.tg-icon-dm { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af, #515bd4); }
.tg-icon-dm svg { fill: #fff; }
.tg-cat { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.tg-cat-wrap { position: relative; flex-shrink: 0; }
.tg-cat-wrap .tg-icon { position: absolute; bottom: -4px; right: -4px; width: 16px; height: 16px; border: 2px solid rgba(10,9,6,0.85); }
.tg-cat-wrap .tg-icon svg { width: 8px; height: 8px; }
.tg-title { font-size: 0.82rem; color: var(--gold-bright); }
.tg-meta { font-size: 0.7rem; color: var(--text-dim); }

/* ===== Friends cards (home + full view) ===== */
.friends-count {
  margin-inline-start: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.friend-star {
  font-size: 0.9rem;
  margin-inline-end: 5px;
  color: #ffe08a;
  text-shadow: 0 0 10px rgba(255, 220, 120, 0.9), 0 0 18px rgba(240, 207, 122, 0.5);
  vertical-align: middle;
  display: inline-block;
  animation: starTwinkle 2.8s ease-in-out infinite;
}
@keyframes starTwinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.12); }
}

.friends-home,
.friends-full-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.friends-group-title {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.friends-group-title span {
  color: var(--gold-bright);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.friends-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .friends-cards { grid-template-columns: 1fr; }
}
.friends-full-sections .friends-cards {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.friend-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  min-height: 64px;
}
.friend-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.friend-card.starred {
  border-color: rgba(255, 220, 120, 0.55);
  background: linear-gradient(135deg, rgba(255, 220, 120, 0.14) 0%, rgba(240, 207, 122, 0.06) 50%, rgba(0, 0, 0, 0.18) 100%);
  box-shadow:
    0 0 18px rgba(255, 210, 100, 0.22),
    0 0 40px rgba(240, 180, 60, 0.1),
    inset 0 0 20px rgba(255, 220, 120, 0.06);
}
.friend-card.starred:hover {
  border-color: rgba(255, 230, 140, 0.75);
  box-shadow:
    0 0 24px rgba(255, 210, 100, 0.35),
    0 8px 28px rgba(0, 0, 0, 0.4);
}
.friend-card.starred .friend-card-bg {
  opacity: 0.28;
  filter: saturate(1.35) brightness(0.85);
}
.friend-card.in-game {
  border-color: rgba(240, 207, 122, 0.4);
}

/* Slow orbit only for starred friends (less lag) */
.friend-card.starred .avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: #ffe08a;
  border-right-color: rgba(255, 224, 138, 0.3);
  animation: starOrbit 6s linear infinite;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 0 6px rgba(255, 220, 120, 0.3);
}
.friend-card.starred.is-online .avatar-wrap::before {
  border-top-color: #43d17c;
  border-right-color: rgba(67, 209, 124, 0.35);
  box-shadow: 0 0 6px rgba(67, 209, 124, 0.35);
}
.friend-card.starred.is-offline .avatar-wrap::before {
  border-top-color: #c4b48a;
  border-right-color: rgba(180, 170, 140, 0.25);
  box-shadow: none;
  animation-duration: 9s;
}
.friend-card.starred.in-game .avatar-wrap::before {
  border-top-color: #ffe08a;
  border-right-color: rgba(255, 224, 138, 0.3);
  box-shadow: 0 0 6px rgba(255, 220, 120, 0.3);
}
@keyframes starOrbit {
  to { transform: rotate(360deg); }
}
/* No spin on non-starred playing avatars */
.friend-card:not(.starred) .avatar-wrap.ring-playing .friend-ring {
  animation: none !important;
}
.friend-card.starred .friend-avatar,
.friend-card.starred .avatar-fallback {
  box-shadow: 0 0 12px rgba(255, 220, 120, 0.45);
}
.friend-card.starred.is-online .friend-avatar,
.friend-card.starred.is-online .avatar-fallback {
  box-shadow: 0 0 12px rgba(67, 209, 124, 0.45);
}
.friend-card.starred.is-offline .friend-avatar,
.friend-card.starred.is-offline .avatar-fallback {
  box-shadow: 0 0 8px rgba(180, 160, 100, 0.3);
}

.friend-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: saturate(1.1) brightness(0.7);
  pointer-events: none;
  z-index: 0;
}
.friend-card-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 7, 5, 0.75) 30%, rgba(8, 7, 5, 0.35) 100%);
}

.friend-card .avatar-wrap,
.friend-card .friend-info {
  position: relative;
  z-index: 1;
}

.friend-card .avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}
.friend-card .friend-avatar,
.friend-card .avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 4px;
}
.friend-card .avatar-fallback {
  background: rgba(240, 207, 122, 0.18);
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Status ring around avatar */
.friend-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  pointer-events: none;
}
.friend-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 2.2;
}
.friend-ring-progress {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 113 113;
  transform-origin: 20px 20px;
}
/* Regular friends: full ring, living glow, NO spin (spin only costs lag) */
.avatar-wrap.ring-playing .friend-ring {
  animation: none;
  filter: drop-shadow(0 0 6px rgba(240, 207, 122, 0.5));
}
.avatar-wrap.ring-playing .friend-ring-progress {
  stroke: var(--gold-bright, #f0cf7a);
  stroke-dasharray: 113.1 0;
  stroke-dashoffset: 0;
}
.avatar-wrap.ring-online .friend-ring {
  animation: none;
}
.avatar-wrap.ring-online .friend-ring-progress {
  stroke: #43d17c;
  stroke-dasharray: 113.1 0;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 5px rgba(67, 209, 124, 0.55));
  animation: onlineGlow 2.8s ease-in-out infinite;
}
.avatar-wrap.ring-online .friend-ring-track {
  stroke: rgba(67, 209, 124, 0.22);
}
.avatar-wrap.ring-offline .friend-ring-progress {
  stroke: rgba(140, 140, 140, 0.35);
  stroke-dasharray: 113.1 0;
}
@keyframes friendRingSpin {
  to { transform: rotate(360deg); }
}
@keyframes onlineGlow {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}
.friend-game-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  margin-inline-start: auto;
  opacity: 0.92;
  border: 1px solid rgba(255,255,255,0.12);
  position: relative;
  z-index: 1;
}
@media (max-width: 760px) {
  .friend-card.starred .avatar-wrap::before { animation-duration: 9s; }
  .friend-star { animation-duration: 3.5s; }
  .friend-game-icon { width: 24px; height: 24px; }
}

.friend-card .steam-badge {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
  width: 15px;
  height: 15px;
  background: #171a21;
  border-radius: 50%;
  border: 1.5px solid var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.friend-card .steam-badge svg { width: 9px; height: 9px; fill: #66c0f4; }
.friend-card .platform-badge.psn {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
  min-width: 16px;
  height: 14px;
  padding: 0 3px;
  background: #003087;
  border-radius: 4px;
  border: 1.5px solid var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  z-index: 2;
}

.friend-card .friend-info { min-width: 0; flex: 1; }
.friend-card .friend-name {
  font-size: 0.86rem;
  color: var(--gold-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  font-weight: 500;
}
.friend-card .friend-game {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.friend-card.in-game .friend-game {
  color: var(--gold-bright);
  opacity: 0.9;
}

body.light-mode .friend-card {
  background: rgba(255, 250, 235, 0.45);
}
body.light-mode .friend-card-bg::after {
  background: linear-gradient(90deg, rgba(255, 250, 235, 0.85) 25%, rgba(255, 250, 235, 0.4) 100%);
}

/* ===== Birthday / calendar widget ===== */
.calendar-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  position: relative; z-index: 1;
}
.calendar-tabs button {
  flex: 1;
  padding: 5px 0;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s;
}
.calendar-tabs button.active { color: var(--gold-bright); border-color: var(--gold); }

.calendar-body {
  display: flex;
  justify-content: space-around;
  text-align: center;
  position: relative; z-index: 1;
}
.calendar-stat .num {
  font-size: 1.5rem;
  color: var(--gold-bright);
  font-weight: 700;
}
.calendar-stat .label {
  font-size: 0.66rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.calendar-date {
  text-align: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  font-size: 0.72rem;
  color: var(--text-dim);
  position: relative; z-index: 1;
}

/* Now listening under profile */
.now-listening {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(240, 207, 122, 0.22);
  font-size: 0.72rem;
  color: var(--gold-bright);
  max-width: 100%;
}
.now-listening.hidden { display: none; }
.nl-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5a5a;
  box-shadow: 0 0 8px #ff5a5a;
  animation: nlPulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes nlPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
.nl-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Quote fade */
.profile-quote {
  transition: opacity 0.4s ease;
}

@media (max-width: 760px) {
}

/* Skeleton placeholders */
.skel {
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: skelShine 1.2s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skelShine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Apple-style spinner + glass skeleton (Instagram-refresh feel) ===== */
.widget-loading {
  padding: 4px 2px 6px;
}
.widget-loading-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.widget-loading-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.apple-spin {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.apple-spin-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(240, 207, 122, 0.18);
  border-top-color: var(--gold-bright, #f0cf7a);
  box-sizing: border-box;
  animation: appleSpin 0.75s linear infinite;
  will-change: transform;
}
@keyframes appleSpin {
  to { transform: rotate(360deg); }
}
@keyframes introLikeSpin {
  to { transform: rotate(360deg); }
}

.skel-body { display: flex; flex-direction: column; gap: 10px; }
.skel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.skel-row.compact { gap: 8px; }
.skel-line {
  height: 11px;
  border-radius: 6px;
  flex: 1;
}
.skel-line.short {
  flex: 0 0 36px;
  max-width: 36px;
  height: 11px;
}

.skel-friends { display: flex; flex-direction: column; gap: 10px; }
.skel-friend {
  display: flex;
  align-items: center;
  gap: 10px;
}
.skel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}
.skel-friend-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* shimmer already defined as .skel — refine for glass gold feel */
.skel {
  background: linear-gradient(
    90deg,
    rgba(240, 207, 122, 0.06) 0%,
    rgba(240, 207, 122, 0.16) 45%,
    rgba(240, 207, 122, 0.06) 90%
  );
  background-size: 200% 100%;
  animation: skelShine 1.35s ease-in-out infinite;
  border-radius: 8px;
}

@media (max-width: 760px) {
  .skel-avatar { width: 30px; height: 30px; }
  .skel-line { height: 9px; }
  .widget-loading-head { margin-bottom: 10px; }
}

.widget-coming {
  color: var(--gold-bright);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 18px 8px;
  opacity: 0.85;
  position: relative;
  z-index: 1;
  animation: comingFade 0.6s ease;
}
@keyframes comingFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 0.85; transform: translateY(0); }
}


/* Status + Timeline widget (replaces Discord) */
.status-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.status-box .status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.status-info { min-width: 0; }
.status-label {
  font-weight: 600;
  font-size: 0.9rem;
}
.status-text {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.tl-heading {
  margin-top: 8px !important;
  margin-bottom: 8px !important;
}
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tl-item {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.78rem;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}
.tl-year {
  color: var(--gold-bright);
  font-weight: 600;
  min-width: 3.2em;
  flex-shrink: 0;
}
.tl-text {
  color: var(--text);
  line-height: 1.4;
}
.widget-dim {
  font-size: 0.75rem;
  color: var(--text-dim);
  opacity: 0.8;
}

/* ===== Profile bio redesign ===== */
.bio-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 2px 12px;
}
.bio-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bio-header .profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(240, 207, 122, 0.35);
  flex-shrink: 0;
}
.bio-header-text h1 {
  font-size: 1.15rem;
  margin: 0 0 4px;
}
.bio-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--st) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--st) 40%, transparent);
  font-size: 0.78rem;
  max-width: 100%;
  flex-wrap: wrap;
}
.bio-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--st);
  box-shadow: 0 0 8px var(--st);
  flex-shrink: 0;
}
.bio-status-label {
  color: var(--st);
  font-weight: 600;
}
.bio-status-sep { opacity: 0.5; }
.bio-status-msg {
  color: var(--text-dim);
  font-size: 0.72rem;
}
.bio-section h2 {
  font-size: 0.85rem;
  margin: 0 0 10px;
  color: var(--gold-bright);
}
.notes-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.note-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text);
}
.bio-section-small .bio-text {
  font-size: 0.78rem;
  line-height: 1.75;
  opacity: 0.9;
  white-space: pre-line;
}

.share-link-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: inherit;
  font-size: 0.95rem;
}
.share-link-btn:hover { border-color: var(--gold); }
.now-listening {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(67, 209, 124, 0.1);
  border: 1px solid rgba(67, 209, 124, 0.25);
  font-size: 0.75rem;
  color: #9ddeb8;
}
.now-listening .nl-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43d17c;
  box-shadow: 0 0 8px #43d17c;
  animation: onlineGlow 2s ease-in-out infinite;
}

.friend-card.starred.in-game .friend-card-bg {
  opacity: 0.35;
  filter: saturate(1.4) brightness(0.75);
}
.song-request-box {
  margin-top: 18px;
  padding: 14px;
}
.song-request-box h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--gold-bright);
}
.sr-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.sr-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sr-fields input,
.sr-fields textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font: inherit;
}
.sr-msg {
  font-size: 0.75rem;
  color: var(--gold-bright);
}

.member-auth-box {
  margin-top: 20px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}
.member-auth-box h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--gold-bright);
}
.ma-hint { font-size: 0.72rem; color: var(--text-dim); margin-bottom: 10px; }
.ma-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.ma-form { display: flex; flex-direction: column; gap: 8px; }
.ma-form input, .member-auth-box input, .member-auth-box textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font: inherit;
}
.ma-row { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.ma-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(240,207,122,0.35);
}
.ma-name { font-weight: 600; margin-bottom: 6px; }
.ma-upload-btn { display: inline-block; cursor: pointer; font-size: 0.75rem; padding: 6px 10px; }
.ma-actions { display: flex; gap: 8px; margin-top: 8px; }
.ma-msg { font-size: 0.75rem; color: var(--gold-bright); margin-top: 8px; }

.ma-form.is-hidden { display: none !important; }
.ma-help {
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--text-dim);
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
}
.ma-help a { color: var(--gold-bright); text-decoration: underline; }
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-inline-start: 6px;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
}
body.light-mode .verified-badge,
body.accent-amber .verified-badge {
  background: #e7b567;
  color: #1a1208;
}
/* Force full rings */
.avatar-wrap.ring-online .friend-ring-progress,
.avatar-wrap.ring-playing .friend-ring-progress {
  stroke-dasharray: 113.1 0 !important;
  stroke-dashoffset: 0 !important;
}

.member-tea-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px;
  overflow-y: auto;
}
.member-tea-card {
  margin-top: 10vh !important;
  width: 100%;
  max-width: 380px;
}
.social-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0;
  cursor: pointer;
}
.social-icon-btn svg { width: 18px; height: 18px; }
.social-row a svg { width: 18px; height: 18px; fill: currentColor; }
.social-icon-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
}

.verified-badge-img {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-inline-start: 6px;
  display: inline-block;
  filter: drop-shadow(0 0 6px rgba(231, 181, 44, 0.55));
}
.admin-ios-spin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--gold-bright, #f0cf7a);
  animation: adminSpin 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes adminSpin {
  to { transform: rotate(360deg); }
}
.admin-busy {
  gap: 10px;
  font-size: 0.85rem;
}
.song-request-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.verified-badge-img {
  width: 26px;
  height: 26px;
  vertical-align: middle;
  margin-inline-start: 6px;
  display: inline-block;
  filter: drop-shadow(0 0 8px rgba(231, 181, 44, 0.45));
  transform: scaleX(1.08);
}
.mem-head {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
}
.mem-av {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.mem-av-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  color: #c9bd9c;
  font-weight: 700;
}
.mem-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  width: 100%;
  font-size: 0.75rem;
}
.mem-sw {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-dim);
}
.site-members-box {
  margin-top: 12px;
}
.bio-social a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bio-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Hide public members block if old DOM remains */
#site-members { display: none !important; }

.bio-as-home {
  text-align: center;
  padding: 20px 16px 24px;
}
.bio-as-home .profile-avatar {
  margin-left: auto;
  margin-right: auto;
}
.bio-as-home h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bio-as-home .name-deco {
  color: var(--gold-bright);
  opacity: 0.85;
  font-size: 0.9rem;
}
.bio-status-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px auto 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--st, #43d17c) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--st, #43d17c) 40%, transparent);
  font-size: 0.78rem;
}
.bio-as-home .bio-section {
  text-align: start;
  margin-top: 18px;
}
.bio-as-home .bio-section h2 {
  font-size: 0.85rem;
  color: var(--gold-bright);
  margin-bottom: 8px;
}
.bio-as-home .social-row {
  margin-top: 20px;
}
.verified-badge-img {
  width: 28px !important;
  height: 28px !important;
  transform: scaleX(1.12) !important;
  filter: drop-shadow(0 0 10px rgba(216, 155, 16, 0.65)) !important;
}

.bio-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.bio-slice-top,
.bio-slice-bottom {
  padding: 20px 16px;
}
.bio-slice-bottom {
  text-align: start;
}
.bio-slice-bottom .bio-section h2 {
  font-size: 0.85rem;
  color: var(--gold-bright);
  margin: 0 0 8px;
}
.bio-slice-bottom .bio-section + .bio-section {
  margin-top: 16px;
}
.side-nav .nav-btn {
  /* keep readable with 6 items */
  width: 42px;
  height: 42px;
}
#account-box.member-auth-box,
#account-box {
  max-width: 420px;
  margin: 0 auto;
}

.profile-actions {
  position: relative;
  margin-top: 16px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-main-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--gold-bright);
  font-size: 0.82rem;
  text-decoration: none;
}
.profile-main-link:hover {
  border-color: var(--gold);
}
.profile-corner-icons {
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
}
.profile-corner-icons a,
.profile-corner-icons button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding: 0;
  cursor: pointer;
}
.profile-corner-icons svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}


/* smoothness */
.friend-card,
.fd-card,
.glass-panel,
.widget {
  transform: translateZ(0);
  backface-visibility: hidden;
}
.friend-card.starred .avatar-wrap::before {
  will-change: transform;
}
@media (max-width: 760px) {
  .friend-card.starred .avatar-wrap::before {
    animation-duration: 8s;
  }
  .avatar-wrap.ring-online .friend-ring-progress {
    animation-duration: 3.5s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .apple-spin-ring,
  .friend-card.starred .avatar-wrap::before,
  .avatar-wrap.ring-online .friend-ring-progress,
  .friend-star {
    animation: none !important;
  }
}

/* Maintenance gate — works without loading full admin.css */
#maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #0a0906;
  color: var(--gold-bright, #f0cf7a);
  text-align: center;
  padding: 24px;
}
#maintenance-overlay .msg {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #d9cba0;
  max-width: 320px;
}
#maintenance-overlay .admin-bypass {
  margin-top: 20px;
  font-size: 0.72rem;
  color: var(--text-dim, #9a9080);
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
