:root {
  --bg: #0b0b0b;
  --surface: #161a22;
  --card: rgba(22, 26, 34, 0.76);
  --text: #f5f5f5;
  --muted: #c9c9c9;
  --accent: #8ab4ff;
  --danger: #ff6b6b;
  --border-color: #9aa2b2;
  --border: rgba(154, 162, 178, 0.45);
  --overlay-opacity: 0.55;
  --bg-blur: 8px;
  --bg-brightness: 0.62;
  --profile-shell-bg: rgba(22, 26, 34, 0.55);
  --profile-shell-blur: 18px;
  --space-scale: 1;
  --radius-scale: 1;
  /* Modern (the default): Geist, loaded by views/index.ejs; Apple devices never had
     Segoe UI, so they used to fall through to Tahoma / Verdana. */
  --font-stack: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --page-cursor-default: auto;
  --page-cursor-pointer: var(--page-cursor-default);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-stack);
}

@media (pointer: fine) {
  body.custom-cursor-enabled {
    cursor: var(--page-cursor-default, auto);
  }

  body.custom-cursor-enabled a,
  body.custom-cursor-enabled button,
  body.custom-cursor-enabled summary,
  body.custom-cursor-enabled [role="button"],
  body.custom-cursor-enabled .link-card,
  body.custom-cursor-enabled .social,
  body.custom-cursor-enabled .music-widget-action,
  body.custom-cursor-enabled .music-widget-volume-button,
  body.custom-cursor-enabled .music-widget-volume-slider,
  body.custom-cursor-enabled .music-widget-progress,
  body.custom-cursor-enabled input[type="range"],
  body.custom-cursor-enabled input[type="checkbox"],
  body.custom-cursor-enabled select {
    cursor: var(--page-cursor-pointer, var(--page-cursor-default, pointer));
  }

  body.custom-cursor-enabled input[type="text"],
  body.custom-cursor-enabled input[type="email"],
  body.custom-cursor-enabled input[type="search"],
  body.custom-cursor-enabled input[type="url"],
  body.custom-cursor-enabled input[type="password"],
  body.custom-cursor-enabled textarea,
  body.custom-cursor-enabled [contenteditable="true"] {
    cursor: text;
  }
}

body.font-modern {
  --font-stack: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body.font-editorial {
  --font-stack: Cambria, Georgia, 'Times New Roman', serif;
}

body.font-rounded {
  --font-stack: 'Trebuchet MS', 'Avenir Next', Arial, sans-serif;
}

body.font-mono {
  --font-stack: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, 'Cascadia Mono', Consolas, 'Courier New', monospace;
}

body.font-inter {
  --font-stack: 'Inter', 'Segoe UI', sans-serif;
}

body.font-poppins {
  --font-stack: 'Poppins', 'Trebuchet MS', sans-serif;
}

body.font-playfair {
  --font-stack: 'Playfair Display', Cambria, Georgia, serif;
}

body.font-nunito {
  --font-stack: 'Nunito', 'Avenir Next', sans-serif;
}

.link-card {
  --link-text: var(--text);
}

#bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -3;
}

#bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 20% 20%, #2a2a4d 0%, #0b0b0b 65%);
}

#bg.gradient-sunset::before {
  background: linear-gradient(135deg, #ff5f6d 0%, #ffc371 45%, #2d1a4f 100%);
}

#bg.gradient-ocean::before {
  background: linear-gradient(135deg, #00203f 0%, #005f73 45%, #0a9396 100%);
}

#bg.gradient-forest::before {
  background: linear-gradient(135deg, #132a13 0%, #31572c 45%, #4f772d 100%);
}

#bg.gradient-neon::before {
  background: linear-gradient(130deg, #0f0c29 0%, #302b63 45%, #ff0080 100%);
}

#bg.gradient-midnight::before {
  background: linear-gradient(140deg, #0f172a 0%, #1e1b4b 45%, #312e81 100%);
}

.video-bg,
.image-bg,
#particle-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.video-bg,
.image-bg {
  overflow: hidden;
  filter: blur(var(--bg-blur)) brightness(var(--bg-brightness));
  transform: scale(1.03);
}

.video-bg-frame iframe,
.video-file-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120vw;
  height: 67.5vw;
  min-width: 177vh;
  min-height: 100vh;
  transform: translate(-50%, -50%);
  border: 0;
  object-fit: cover;
  pointer-events: none;
}

.image-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#bg.pattern-grid::after,
#bg.pattern-dots::after,
#bg.pattern-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0.42;
  mix-blend-mode: screen;
  pointer-events: none;
}

#bg.pattern-grid::after {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.24) 1px, transparent 1px);
  background-size: 34px 34px;
}

#bg.pattern-dots::after {
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 1.3px, transparent 1.3px);
  background-size: 20px 20px;
}

#bg.pattern-noise::after {
  background-image: repeating-radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 4px);
  opacity: 0.46;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: radial-gradient(1000px 500px at 50% 0%, transparent, rgba(0, 0, 0, var(--overlay-opacity)));
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(1.2rem * var(--space-scale));
}

.profile-shell {
  margin: 8px auto 18px;
  padding: calc(18px * var(--space-scale)) calc(16px * var(--space-scale)) calc(10px * var(--space-scale));
  border-radius: calc(28px * var(--radius-scale));
  background: var(--profile-shell-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(var(--profile-shell-blur)) saturate(1.08);
  -webkit-backdrop-filter: blur(var(--profile-shell-blur)) saturate(1.08);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.hero {
  display: grid;
  place-items: center;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 14px;
}

.avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  padding: 3px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06));
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.avatar-decoration {
  position: absolute;
  inset: -14%;
  width: 128%;
  height: 128%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}

.avatar-wrap.avatar-frame-freeform {
  width: auto;
  height: auto;
  max-width: min(260px, 78vw);
  padding: 0;
  background: none;
  border-radius: 0;
}

.avatar-wrap.avatar-frame-freeform .avatar {
  width: auto;
  height: auto;
  max-width: min(220px, 72vw);
  max-height: 220px;
  border-radius: 0;
  object-fit: contain;
}

.avatar-wrap.avatar-frame-freeform .placeholder {
  min-width: 110px;
  min-height: 86px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.placeholder {
  color: #bbb;
  font-size: 28px;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.identity .handle {
  opacity: 0.95;
  font-weight: 800;
  margin-top: 10px;
}

.identity .display-name {
  opacity: 0.9;
  font-size: 1rem;
  margin-top: 2px;
}

.bio {
  color: var(--muted);
  margin: 8px 0 0;
}

/* ── Profile badges shelf ── */
.profile-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: default;
}
.profile-badge:hover {
  transform: translateY(-2px);
}
.profile-badge-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.profile-badge-name {
  white-space: nowrap;
}

/* Rarity colour variants */
.profile-badge.rarity-common {
  background: rgba(148,163,184,0.12);
  border-color: rgba(148,163,184,0.25);
  color: #cbd5e1;
}
.profile-badge.rarity-common .profile-badge-icon { stroke: #94a3b8; }

.profile-badge.rarity-uncommon {
  background: rgba(52,211,153,0.1);
  border-color: rgba(52,211,153,0.28);
  color: #6ee7b7;
}
.profile-badge.rarity-uncommon .profile-badge-icon { stroke: #34d399; }

.profile-badge.rarity-rare {
  background: rgba(168,85,247,0.13);
  border-color: rgba(168,85,247,0.32);
  color: #d8b4fe;
}
.profile-badge.rarity-rare .profile-badge-icon { stroke: #c084fc; }
.profile-badge.rarity-rare:hover { box-shadow: 0 4px 14px rgba(168,85,247,0.22); }

.profile-badge.rarity-epic {
  background: rgba(251,191,36,0.1);
  border-color: rgba(251,191,36,0.32);
  color: #fde68a;
}
.profile-badge.rarity-epic .profile-badge-icon { stroke: #fbbf24; }
.profile-badge.rarity-epic:hover { box-shadow: 0 4px 14px rgba(251,191,36,0.22); }

body.username-effect-glow .identity .handle,
body.username-effect-glow .identity .display-name {
  text-shadow:
    0 0 12px color-mix(in srgb, var(--accent) 50%, transparent),
    0 0 28px color-mix(in srgb, var(--accent) 26%, transparent);
}

body.username-effect-rainbow .identity .handle,
body.username-effect-rainbow .identity .display-name {
  background: linear-gradient(90deg, #ff4d6d, #ffd93d, #3ddc97, #4da3ff, #c084fc, #ff4d6d);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: username-rainbow-shift 4s linear infinite;
}

body.username-effect-glitch .identity .handle,
body.username-effect-glitch .identity .display-name {
  position: relative;
  animation: username-glitch-jitter 1.6s steps(2, end) infinite;
  text-shadow:
    -1px 0 rgba(255, 0, 111, 0.55),
    1px 0 rgba(0, 212, 255, 0.48),
    0 0 14px rgba(255, 255, 255, 0.1);
}

body.username-effect-pulse-blue .identity .handle,
body.username-effect-pulse-blue .identity .display-name {
  color: #7dc9ff;
}

body.username-effect-pulse-green .identity .handle,
body.username-effect-pulse-green .identity .display-name {
  color: #7dffc7;
}

body.username-effect-pulse-pink .identity .handle,
body.username-effect-pulse-pink .identity .display-name {
  color: #ff89d7;
}

body.username-effect-pulse-red .identity .handle,
body.username-effect-pulse-red .identity .display-name {
  color: #ff8f93;
}

body.username-effect-pulse-white .identity .handle,
body.username-effect-pulse-white .identity .display-name {
  color: #e8e8ff;
}

body.username-effect-pulse-yellow .identity .handle,
body.username-effect-pulse-yellow .identity .display-name {
  color: #ffe986;
}

/* ═══ WAVE ═══ */
body.username-effect-wave .identity .handle > span,
body.username-effect-wave .identity .display-name > span {
  display: inline-block;
  animation: username-wave-bob 1.4s ease-in-out infinite;
}
@keyframes username-wave-bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

/* ═══ NEON ═══ */
body.username-effect-neon .identity .handle,
body.username-effect-neon .identity .display-name {
  color: #00eeff;
  text-shadow:
    0 0 3px #fff,
    0 0 10px #00eeff,
    0 0 28px #00eeff,
    0 0 60px rgba(0, 238, 255, 0.5);
  animation: username-neon-flicker 7s ease-in-out infinite;
}
@keyframes username-neon-flicker {
  0%, 18%, 20%, 22%, 24%, 52%, 54%, 100% { opacity: 1; }
  19%, 23%, 53% { opacity: 0.25; }
}

/* ═══ FLICKER ═══ */
body.username-effect-flicker .identity .handle,
body.username-effect-flicker .identity .display-name {
  animation: username-flicker 3.5s steps(1, end) infinite;
}
@keyframes username-flicker {
  0%, 7%, 9%, 34%, 36%, 68%, 70%, 100% { opacity: 1; }
  8%, 35%, 69% { opacity: 0.1; }
}

/* ═══ HOLOGRAPHIC ═══ */
body.username-effect-holographic .identity .handle,
body.username-effect-holographic .identity .display-name {
  background: linear-gradient(90deg,
    #ff6ec7 0%, #ffe66d 17%, #4ef5b5 34%,
    #6eb5ff 51%, #c084fc 68%, #ff6ec7 85%, #ffe66d 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: username-holo-shift 3s linear infinite;
}
@keyframes username-holo-shift {
  from { background-position: 0% 50%; }
  to   { background-position: 200% 50%; }
}

/* ═══ FIRE (canvas handles particles; tint text) ═══ */
body.username-effect-fire .identity .handle,
body.username-effect-fire .identity .display-name { color: #ffb04a; }

/* ═══ GLITTER (canvas handles sparks; tint text) ═══ */
body.username-effect-glitter .identity .handle,
body.username-effect-glitter .identity .display-name { color: #ffe566; }

/* ═══ AURORA (canvas handles bands; tint text) ═══ */
body.username-effect-aurora .identity .handle,
body.username-effect-aurora .identity .display-name { color: #7dffc7; }

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

@keyframes username-glitch-jitter {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-1px, 0, 0); }
  40% { transform: translate3d(1px, -1px, 0); }
  60% { transform: translate3d(-1px, 1px, 0); }
  80% { transform: translate3d(1px, 0, 0); }
}

@keyframes username-pulse-blue {
  0%, 100% { text-shadow: 0 0 8px rgba(77, 163, 255, 0.28), 0 0 18px rgba(77, 163, 255, 0.12); }
  50% { text-shadow: 0 0 14px rgba(77, 163, 255, 0.58), 0 0 34px rgba(77, 163, 255, 0.32); }
}

@keyframes username-pulse-green {
  0%, 100% { text-shadow: 0 0 8px rgba(61, 220, 151, 0.28), 0 0 18px rgba(61, 220, 151, 0.12); }
  50% { text-shadow: 0 0 14px rgba(61, 220, 151, 0.58), 0 0 34px rgba(61, 220, 151, 0.32); }
}

@keyframes username-pulse-pink {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 77, 154, 0.28), 0 0 18px rgba(255, 77, 154, 0.12); }
  50% { text-shadow: 0 0 14px rgba(255, 77, 154, 0.58), 0 0 34px rgba(255, 77, 154, 0.32); }
}

@keyframes username-pulse-red {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 92, 92, 0.28), 0 0 18px rgba(255, 92, 92, 0.12); }
  50% { text-shadow: 0 0 14px rgba(255, 92, 92, 0.58), 0 0 34px rgba(255, 92, 92, 0.32); }
}

@keyframes username-pulse-white {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 255, 255, 0.22), 0 0 18px rgba(255, 255, 255, 0.12); }
  50% { text-shadow: 0 0 14px rgba(255, 255, 255, 0.55), 0 0 34px rgba(255, 255, 255, 0.28); }
}

@keyframes username-pulse-yellow {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 217, 61, 0.28), 0 0 18px rgba(255, 217, 61, 0.12); }
  50% { text-shadow: 0 0 14px rgba(255, 217, 61, 0.58), 0 0 34px rgba(255, 217, 61, 0.32); }
}

body.glow-socials .top-actions .icon-btn,
body.glow-socials .top-actions .like-pill,
body.glow-socials .link-card,
body.glow-socials .links-icon-only .link-card,
body.glow-socials .links-icon-only .icon {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent),
    0 0 18px color-mix(in srgb, var(--accent) 24%, transparent);
}

body.glow-socials .link-card .icon,
body.glow-socials .links-icon-only .icon,
body.glow-socials .top-actions .icon-btn span,
body.glow-socials .top-actions .like-pill .heart {
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 58%, transparent));
}

body.glow-badges .profile-badge {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 18px color-mix(in srgb, var(--accent) 18%, transparent);
}

body.icons-monochrome .link-card .icon {
  filter: grayscale(1) brightness(0) invert(1);
}

body.icons-monochrome .custom-icon-svg,
body.icons-monochrome .custom-icon-svg svg {
  color: var(--text);
  fill: currentColor;
  stroke: currentColor;
}

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: calc(16px * var(--space-scale)) calc(6px * var(--space-scale));
}

.top-actions {
  display: flex;
  flex-direction: row;
  gap: 14px;
  align-items: center;
}

.icon-btn,
.like-pill {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn span {
  display: block;
  line-height: 1;
  font-size: 18px;
}

.like-pill {
  min-width: 72px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.like-pill.liked .heart {
  filter: drop-shadow(0 0 6px rgba(138, 180, 255, 0.75));
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent), #ffffff 25%));
}

.discord-showcase {
  display: grid;
  gap: calc(12px * var(--space-scale));
  margin-top: calc(4px * var(--space-scale));
}

.discord-showcase [hidden] {
  display: none !important;
}

.discord-showcase--compact {
  margin-top: 10px;
}

.discord-inline-launchers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.discord-launcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(14, 16, 24, 0.74);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.18s ease;
}

.discord-launcher-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}

.discord-launcher-btn[aria-expanded="true"] {
  background: color-mix(in srgb, var(--accent) 14%, rgba(14, 16, 24, 0.82));
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
}

.discord-launcher-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 28px;
  background: rgba(255, 255, 255, 0.08);
}

.discord-launcher-avatar--placeholder {
  display: grid;
  place-items: center;
  font-weight: 800;
}

/* ═══ DISCORD CARDS — Discord-app-style popup design ═══ */

.discord-card {
  position: relative;
  overflow: hidden;
  border-radius: calc(12px * var(--radius-scale));
  background: #1e1f22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  max-width: 340px;
  margin: 0 auto;
}

/* Banner */
.discord-card-banner {
  height: 96px;
  background-size: cover;
  background-position: center top;
}

.discord-card-banner--default {
  background: linear-gradient(135deg, #5865f2 0%, #3b4ab8 100%);
}

.discord-card-banner--short {
  height: 72px;
}

/* Avatar row — floats avatar over the banner */
.discord-card-avatar-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 14px;
  margin-top: -42px;
  position: relative;
  z-index: 2;
}

.discord-card-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.discord-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  border: 6px solid #1e1f22;
  background: #313338;
}

.discord-card-avatar--placeholder {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  background: #5865f2;
}

.discord-card-decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 108px;
  height: 108px;
  pointer-events: none;
}

.discord-card-status {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 3px solid #1e1f22;
}

.discord-card-status--online { background: #23a559; }

/* Badges */
.discord-card-badges {
  display: flex;
  gap: 4px;
  align-items: center;
  padding-top: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.discord-badge-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  color: #c9cdfb;
  font-size: 10px;
  font-weight: 700;
}

.discord-badge-icon--nitro { color: #c9cdfb; }
.discord-badge-icon--verified { color: #57f287; }
.discord-badge-icon img { width: 14px; height: 14px; object-fit: contain; }

/* Card body — identity, bio, facts */
.discord-card-body {
  padding: 10px 14px 14px;
  display: grid;
  gap: 6px;
}

.discord-card-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f2f3f5;
  line-height: 1.2;
}

.discord-card-username {
  margin: 0;
  font-size: 0.88rem;
  color: #b5bac1;
}

.discord-card-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 0 4px;
}

.discord-card-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b5bac1;
  margin-bottom: 4px;
}

.discord-card-bio {
  margin: 0;
  font-size: 0.88rem;
  color: #dbdee1;
  line-height: 1.5;
}

/* Fact tiles */
.discord-card-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.discord-fact-tile {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.discord-fact-tile--accent strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.discord-fact-label {
  color: #b5bac1;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

.discord-accent-chip {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex: 0 0 auto;
}

/* ── Guild card ── */
.discord-card-guild {
  text-decoration: none;
  color: inherit;
  display: block;
}

.discord-guild-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 14px;
  margin-top: -34px;
  position: relative;
  z-index: 2;
}

.discord-guild-media {
  position: relative;
  flex: 0 0 auto;
}

.discord-guild-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  border: 5px solid #1e1f22;
  background: #313338;
}

.discord-guild-icon--placeholder {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
  background: #5865f2;
}

.discord-guild-member-avatar {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid #1e1f22;
  background: #313338;
}

.discord-guild-join-btn {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  background: #23a559;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.discord-guild-invite-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  width: 100%;
  margin-top: 2px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5865f2, #7983ff);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(88, 101, 242, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.discord-guild-invite-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(88, 101, 242, 0.28);
  filter: brightness(1.04);
}

.discord-guild-invite-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, #ffffff 25%);
  outline-offset: 2px;
}

/* Stat dots */
.discord-guild-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.discord-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #b5bac1;
}

.discord-stat strong { color: #f2f3f5; }

.discord-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 8px;
}

.discord-stat-dot--online  { background: #23a559; }
.discord-stat-dot--muted   { background: #b5bac1; }
.discord-stat-dot--gold    { background: #f0b232; }

@media (max-width: 640px) {
  .discord-inline-launchers { justify-content: center; }
  .discord-launcher-btn     { max-width: 100%; }
  .discord-card             { max-width: 100%; }
}

.links {
  display: grid;
  gap: calc(12px * var(--space-scale));
  margin: calc(1rem * var(--space-scale)) 0;
}

.link-card {
  --btn-bg: var(--card);
  display: flex;
  align-items: center;
  gap: calc(12px * var(--space-scale));
  justify-content: center;
  min-height: calc(54px * var(--space-scale));
  padding: calc(14px * var(--space-scale)) calc(16px * var(--space-scale));
  border-radius: calc(16px * var(--radius-scale));
  background: var(--btn-bg);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  text-decoration: none;
  color: var(--link-text, var(--text));
  border: 1px solid var(--border);
  transition: transform 0.18s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, filter 0.2s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(138, 180, 255, 0.28) inset;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26), 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent) inset;
}

.link-card .icon {
  width: 38px;
  height: 38px;
  opacity: 0.95;
  flex: 0 0 38px;
  object-fit: contain;
}

.link-card .custom-icon-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.link-card .label {
  font-weight: 600;
  letter-spacing: 0.2px;
}

.link-card .link-arrow {
  display: none;
  margin-left: auto;
  opacity: 0.8;
}

.spotlight-wrap {
  margin: calc(0.2rem * var(--space-scale)) 0 calc(0.9rem * var(--space-scale));
}

.spotlight-link {
  position: relative;
  min-height: calc(156px * var(--space-scale));
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
  border-radius: calc(18px * var(--radius-scale));
}

.spotlight-link.has-spotlight-media {
  background: linear-gradient(155deg, rgba(18, 20, 28, 0.92), rgba(8, 10, 15, 0.95));
}

.spotlight-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.spotlight-link.has-spotlight-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(10, 12, 18, 0.86), rgba(10, 12, 18, 0.38));
}

.spotlight-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: calc(10px * var(--space-scale));
  padding: calc(16px * var(--space-scale)) calc(18px * var(--space-scale));
}

.spotlight-badge {
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(8, 10, 15, 0.55);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.spotlight-title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.spotlight-link .label {
  font-size: 1.22rem;
  font-weight: 750;
}

.spotlight-link .link-arrow {
  display: inline;
  position: relative;
  z-index: 2;
  margin-left: auto;
  margin-right: 18px;
  font-size: 1.04rem;
}

.link-card-featured {
  min-height: calc(72px * var(--space-scale));
  justify-content: flex-start;
  gap: calc(10px * var(--space-scale));
}

.featured-thumb {
  width: calc(42px * var(--space-scale));
  height: calc(42px * var(--space-scale));
  border-radius: calc(10px * var(--radius-scale));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.32);
  flex: 0 0 auto;
}

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

.access-item {
  position: relative;
}

.access-item > .block,
.access-item.link-card {
  transition: filter 220ms ease, opacity 220ms ease, transform 220ms ease;
}

.access-item.is-password-locked > .block,
.access-item.is-password-locked.link-card,
.access-item.is-age-locked > .block,
.access-item.is-age-locked.link-card,
.access-item.is-spoiler > .block,
.access-item.is-spoiler.link-card {
  filter: blur(14px) brightness(0.28) saturate(0.38);
  transform: scale(1.01);
}

.access-item.is-password-locked > .block,
.access-item.is-password-locked.link-card {
  filter: blur(16px) brightness(0.22) saturate(0.32);
}

.access-item.is-spoiler > .block,
.access-item.is-spoiler.link-card {
  filter: blur(18px) brightness(0.18) saturate(0.2);
}

.access-item-link.is-password-locked::before,
.access-item-link.is-age-locked::before,
.access-item-link.is-spoiler::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background: rgba(6, 8, 14, 0.58);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.access-item.is-revealed > .block,
.access-item.is-revealed.link-card {
  filter: none;
  transform: none;
}

.access-item-link.is-revealed::before {
  display: none;
}

.access-overlay-inline {
  position: absolute;
  inset: auto 10px 10px auto;
  display: inline-flex;
  gap: 6px;
  z-index: 3;
  pointer-events: auto;
}

.access-overlay[hidden],
.access-overlay-inline[hidden] {
  display: none !important;
}

.access-overlay-tag {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
}

.access-overlay-inline .access-action-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(8, 10, 14, 0.86);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 11px;
  pointer-events: auto;
  cursor: pointer;
}

.access-item-block .access-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(6, 8, 14, 0.35), rgba(6, 8, 14, 0.75));
  border-radius: 14px;
}

.access-action-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(16, 18, 24, 0.84);
  color: #fff;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.block-locked-placeholder {
  border-radius: calc(10px * var(--radius-scale));
  border: 1px dashed rgba(255, 255, 255, 0.26);
  background: rgba(0, 0, 0, 0.3);
  padding: 20px 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
}

@keyframes spoiler-disintegrate {
  0% {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
  }
  60% {
    opacity: 0.35;
    filter: blur(8px);
    transform: scale(1.01);
  }
  100% {
    opacity: 0;
    filter: blur(14px);
    transform: scale(1.02);
  }
}

.access-item.is-revealing::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 24%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1px 8px),
    radial-gradient(circle at 78% 66%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1px 8px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  animation: spoiler-disintegrate 520ms ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .access-item.is-revealing::after {
    animation-duration: 160ms;
  }
}

body.links-grid .links {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

body.links-grid .link-card {
  min-height: 96px;
  flex-direction: column;
  justify-content: center;
}

body.links-grid .link-card-featured {
  grid-column: 1 / -1;
  min-height: 86px;
  flex-direction: row;
  justify-content: flex-start;
}

body.links-compact .links {
  gap: calc(8px * var(--space-scale));
}

body.links-compact .link-card {
  min-height: calc(44px * var(--space-scale));
  padding: calc(10px * var(--space-scale)) calc(12px * var(--space-scale));
  font-size: 0.94rem;
}

body.links-table .links {
  gap: 8px;
}

body.links-table .link-card {
  justify-content: flex-start;
}

body.links-table .link-card .link-arrow {
  display: inline;
}

body.btn-pill .link-card {
  border-radius: 999px;
}

body.btn-square .link-card {
  border-radius: calc(8px * var(--radius-scale));
}

body.btn-glass .link-card {
  background: rgba(22, 26, 34, 0.52);
  background: color-mix(in srgb, var(--btn-bg) 52%, white 18%);
  -webkit-backdrop-filter: blur(8px) saturate(1.05);
  backdrop-filter: blur(8px) saturate(1.05);
}

.live-embeds {
  display: grid;
  gap: 16px;
  margin-top: 1.5rem;
}

.custom-blocks {
  display: grid;
  gap: 14px;
  margin: 1rem 0;
}

.block {
  width: 100%;
}

.block-heading h1,
.block-heading h2,
.block-heading h3 {
  margin: 0.2rem 0;
  text-align: center;
}

.block-richtext .block-richtext-content {
  color: var(--text);
}

.block-richtext .block-richtext-content p:first-child {
  margin-top: 0;
}

.block-richtext .block-richtext-content p:last-child {
  margin-bottom: 0;
}

.block-button-link.block-btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.38);
}

.block-links-cluster .links {
  margin: 0;
}

.block-image {
  margin: 0;
  overflow: hidden;
}

.block-image img {
  width: 100%;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.block-image figcaption {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 8px;
}

.block-embed h3 {
  margin-top: 0;
}

.card {
  background: var(--card);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

.footer {
  margin-top: 2rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

.footer a {
  color: var(--accent);
}

.pp-watermark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 1.5rem auto 1rem;
  padding: 4px 12px 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  width: fit-content;
}

.pp-watermark:hover {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.pp-watermark-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 50%;
}

@keyframes lh-heartbeat {
  0% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.2);
  }

  70% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stagger-reveal-subtle {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.988);
    filter: blur(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes stagger-reveal-energetic {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.976);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.like-pill.pop .heart {
  animation: lh-heartbeat 280ms ease-out;
}

body.anim-subtle .hero {
  animation: fade-slide-up 360ms ease-out both;
}

body.anim-energetic .hero {
  animation: fade-slide-up 520ms cubic-bezier(0.17, 0.67, 0.24, 1.03) both;
}

body.anim-energetic .link-card:hover {
  transform: translateY(-2px) scale(1.015);
}

.links > *:nth-child(1),
.custom-blocks > *:nth-child(1),
.live-embeds > *:nth-child(1) { --stagger-index: 0; }
.links > *:nth-child(2),
.custom-blocks > *:nth-child(2),
.live-embeds > *:nth-child(2) { --stagger-index: 1; }
.links > *:nth-child(3),
.custom-blocks > *:nth-child(3),
.live-embeds > *:nth-child(3) { --stagger-index: 2; }
.links > *:nth-child(4),
.custom-blocks > *:nth-child(4),
.live-embeds > *:nth-child(4) { --stagger-index: 3; }
.links > *:nth-child(5),
.custom-blocks > *:nth-child(5),
.live-embeds > *:nth-child(5) { --stagger-index: 4; }
.links > *:nth-child(6),
.custom-blocks > *:nth-child(6),
.live-embeds > *:nth-child(6) { --stagger-index: 5; }
.links > *:nth-child(7),
.custom-blocks > *:nth-child(7),
.live-embeds > *:nth-child(7) { --stagger-index: 6; }
.links > *:nth-child(8),
.custom-blocks > *:nth-child(8),
.live-embeds > *:nth-child(8) { --stagger-index: 7; }
.links > *:nth-child(9),
.custom-blocks > *:nth-child(9),
.live-embeds > *:nth-child(9) { --stagger-index: 8; }
.links > *:nth-child(10),
.custom-blocks > *:nth-child(10),
.live-embeds > *:nth-child(10) { --stagger-index: 9; }
.links > *:nth-child(11),
.custom-blocks > *:nth-child(11),
.live-embeds > *:nth-child(11) { --stagger-index: 10; }
.links > *:nth-child(12),
.custom-blocks > *:nth-child(12),
.live-embeds > *:nth-child(12) { --stagger-index: 11; }

body.anim-subtle .links > *,
body.anim-subtle .custom-blocks > *,
body.anim-subtle .live-embeds > * {
  animation: stagger-reveal-subtle 340ms ease-out both;
  animation-delay: calc(var(--stagger-index, 0) * 55ms);
}

body.anim-energetic .links > *,
body.anim-energetic .custom-blocks > *,
body.anim-energetic .live-embeds > * {
  animation: stagger-reveal-energetic 470ms cubic-bezier(0.18, 0.76, 0.22, 1) both;
  animation-delay: calc(var(--stagger-index, 0) * 70ms);
}

.link-card,
.block-button-link,
.icon-btn,
.like-pill,
.access-action-btn,
button,
a.btn-secondary {
  transition: transform 150ms ease, box-shadow 180ms ease, filter 140ms ease, border-color 180ms ease;
}

.link-card:hover,
.block-button-link:hover,
.icon-btn:hover,
.like-pill:hover,
.access-action-btn:hover,
button:hover,
a.btn-secondary:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(138, 180, 255, 0.20) inset;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24), 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent) inset;
  filter: brightness(1.03);
}

.link-card:active,
.block-button-link:active,
.icon-btn:active,
.like-pill:active,
.access-action-btn:active,
button:active,
a.btn-secondary:active {
  transform: translateY(1px) scale(0.98);
}

body.anim-none .hero,
body.anim-none .links,
body.anim-none .custom-blocks,
body.anim-none .live-embeds,
body.anim-none .link-card,
body.anim-none .like-pill,
body.anim-none .icon-btn {
  animation: none !important;
  transition: none !important;
}

.auth-container {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
  isolation: isolate;
}

.auth-container::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(138, 180, 255, 0.28), transparent 60%),
    radial-gradient(700px 360px at 15% 80%, rgba(140, 82, 255, 0.20), transparent 62%),
    radial-gradient(700px 360px at 85% 80%, rgba(64, 223, 255, 0.16), transparent 62%);
  background:
    radial-gradient(900px 420px at 50% -10%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 60%),
    radial-gradient(700px 360px at 15% 80%, rgba(140, 82, 255, 0.20), transparent 62%),
    radial-gradient(700px 360px at 85% 80%, rgba(64, 223, 255, 0.16), transparent 62%);
  opacity: 0.85;
}

.form {
  max-width: 360px;
  width: 100%;
}

.auth-card {
  background: rgba(22, 26, 34, 0.82);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid rgba(154, 162, 178, 0.40);
  border: 1px solid color-mix(in srgb, var(--border-color) 40%, transparent);
  border-radius: calc(18px * var(--radius-scale));
  padding: calc(18px * var(--space-scale));
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}

.auth-head {
  margin-bottom: 14px;
}

.auth-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(138, 180, 255, 0.92), rgba(110, 168, 254, 0.25));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, #ffffff 8%), rgba(110, 168, 254, 0.25));
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.10) inset;
  margin-bottom: 12px;
}

.auth-subtitle {
  margin: 6px 0 0;
  color: rgba(201, 201, 201, 0.92);
  color: color-mix(in srgb, var(--muted) 92%, transparent);
  line-height: 1.45;
}

.auth-label {
  display: block;
  font-size: 0.9rem;
  color: rgba(201, 201, 201, 0.88);
  color: color-mix(in srgb, var(--muted) 88%, transparent);
  margin-bottom: 6px;
}

.auth-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: rgba(201, 201, 201, 0.82);
  color: color-mix(in srgb, var(--muted) 82%, transparent);
}

.auth-card label {
  margin: 12px 0;
}

.auth-card input {
  border: 1px solid rgba(154, 162, 178, 0.36);
  border: 1px solid color-mix(in srgb, var(--border-color) 36%, transparent);
  background: rgba(11, 11, 11, 0.55);
  background: color-mix(in srgb, #0b0b0b 55%, transparent);
  border-radius: 14px;
  padding: 11px 12px;
  outline: none;
}

.auth-card input:focus {
  border-color: rgba(138, 180, 255, 0.55);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 4px rgba(138, 180, 255, 0.20);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.auth-primary {
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.auth-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.92rem;
  color: rgba(201, 201, 201, 0.92);
  color: color-mix(in srgb, var(--muted) 92%, transparent);
}

.auth-links a {
  color: rgba(138, 180, 255, 0.92);
  color: color-mix(in srgb, var(--accent) 92%, #ffffff 8%);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-dot {
  opacity: 0.6;
}

.auth-muted {
  color: rgba(201, 201, 201, 0.92);
  color: color-mix(in srgb, var(--muted) 92%, transparent);
}

.auth-alert {
  border-radius: 14px;
  padding: 10px 12px;
  margin: 12px 0;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.auth-alert-error {
  border-color: rgba(255, 107, 107, 0.45);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: rgba(255, 107, 107, 0.18);
  background: color-mix(in srgb, var(--danger) 18%, rgba(255, 255, 255, 0.06));
}

.form-wide {
  max-width: none;
}

.form h1,
.form h2,
.form h3 {
  margin-top: 0;
}

.form label {
  display: block;
  margin: 10px 0;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #333;
  background: #111;
  color: var(--text);
}

.form button {
  margin-top: 10px;
}

button,
.btn-secondary,
.btn-danger {
  background: var(--accent);
  color: #0b0b0b;
  border: none;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.btn-secondary {
  background: #444;
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #000;
}

.hidden {
  display: none;
}

.error {
  color: #ff9aa2;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox input {
  width: auto;
}

.admin .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.inline-form {
  display: inline;
}

.section-card {
  margin-top: 16px;
}

.table {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.row {
  display: grid;
  grid-template-columns: 40px 1.4fr 2fr 90px 120px 80px 80px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
}

.row.head {
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
}

.row-embed,
.row-embed-head,
.row-redirect,
.row-redirect-head {
  grid-template-columns: 60px 1.5fr 1fr 1fr 1.2fr;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-toast {
  position: sticky;
  top: 8px;
  z-index: 80;
  margin: 0 auto 10px;
  width: min(560px, 96%);
  padding: 10px 12px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  background: rgba(23, 93, 43, 0.94);
  color: #f2fff5;
  border: 1px solid rgba(170, 255, 196, 0.35);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast.toast-error {
  background: rgba(125, 26, 40, 0.95);
  border-color: rgba(255, 160, 160, 0.45);
}

.notfound-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
}

.cta {
  margin-top: 16px;
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #ff4d6d;
  color: #000;
  font-weight: 800;
  text-decoration: none;
}

.cardy {
  background: var(--card);
  border: 1px solid var(--border);
  padding: calc(18px * var(--space-scale)) calc(20px * var(--space-scale));
  border-radius: calc(16px * var(--radius-scale));
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.settings-shell {
  background: rgba(12, 12, 12, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.settings-save {
  min-width: 140px;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.settings-tab {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.settings-tab.active {
  background: rgba(138, 180, 255, 0.24);
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  border-color: rgba(138, 180, 255, 0.55);
  border-color: color-mix(in srgb, var(--accent) 55%, white 10%);
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.settings-main {
  min-width: 0;
}

.settings-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
}

.settings-panel h3 {
  margin-bottom: 8px;
}

.settings-panel h4 {
  margin: 6px 0 8px;
}

.settings-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 16px 0;
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.template-gallery-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.template-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.template-preview {
  height: 62px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.template-preview-minimal {
  background: linear-gradient(140deg, #12161d, #2f3645);
}

.template-preview-glass {
  background:
    linear-gradient(140deg, rgba(123, 191, 225, 0.35), rgba(24, 83, 123, 0.45)),
    linear-gradient(140deg, #10283a, #1d5676);
}

.template-preview-neon {
  background: linear-gradient(140deg, #271051, #ff2ea6 72%);
}

.template-preview-creator {
  background: linear-gradient(140deg, #2a1f2f, #ff7a59 78%);
}

.template-preview-business {
  background: linear-gradient(140deg, #102425, #2c5f5f);
}

.template-preview-dark {
  background: linear-gradient(140deg, #090b10, #232839);
}

.template-meta {
  display: grid;
  gap: 2px;
  line-height: 1.2;
}

.template-meta strong {
  font-size: 0.95rem;
}

.template-meta span {
  color: var(--muted);
  font-size: 0.8rem;
}

.template-io-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.settings-footer {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.inline-color-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
}

.color-input {
  -webkit-appearance: none;
  appearance: none;
  height: 42px;
  min-width: 72px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #333;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}

.color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}

.color-input::-moz-color-swatch {
  border: 0;
  border-radius: 7px;
}

.color-chip {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #2a2a2a;
}

.color-chip-lg {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.settings-sidebar {
  position: sticky;
  top: 12px;
  align-self: start;
}

.preview-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
}

.label-with-tip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-tip {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #101010;
  background: rgba(255, 255, 255, 0.9);
  cursor: help;
  outline: none;
}

.field-tip::after {
  content: attr(data-tip);
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  max-width: 70vw;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #111827;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 20;
}

.field-tip:hover::after,
.field-tip:focus-visible::after {
  opacity: 1;
}

.builder-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

.builder-editor-column {
  min-width: 0;
}

.builder-editor-column .admin-accordion {
  margin-top: 0;
}

.builder-editor-column .admin-accordion + .admin-accordion {
  margin-top: 14px;
}

.builder-preview-column {
  position: sticky;
  top: 12px;
  align-self: start;
}

.builder-preview-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.builder-live-preview {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(24, 26, 33, 0.95), rgba(12, 14, 20, 0.95));
  min-height: 360px;
  overflow: hidden;
}

.builder-preview-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding: 12px;
}

.builder-preview-handle {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.78);
}

.builder-preview-name {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 2px;
}

.builder-preview-content {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.builder-preview-block {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 9px 10px;
  font-size: 0.84rem;
}

.builder-preview-block strong {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.76);
}

.builder-preview-links-wrap {
  display: grid;
  gap: 6px;
}

.builder-preview-link {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(18, 19, 22, 0.82);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  display: grid;
}

.builder-preview-link:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.builder-preview-links-wrap.builder-layout-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.builder-preview-links-wrap.builder-layout-compact {
  gap: 4px;
}

.builder-preview-links-wrap.builder-layout-compact .builder-preview-link {
  padding: 6px 8px;
  font-size: 0.78rem;
}

.builder-preview-links-wrap.builder-layout-table .builder-preview-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.builder-preview-link.builder-button-pill {
  border-radius: 999px;
}

.builder-preview-link.builder-button-square {
  border-radius: 6px;
}

.builder-preview-link.builder-button-glass {
  background: rgba(255, 255, 255, 0.10);
  background: color-mix(in srgb, rgba(255, 255, 255, 0.18) 56%, transparent);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.builder-preview-empty {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
}

.builder-preview-links-wrap .builder-preview-link.is-featured {
  border-color: rgba(255, 230, 142, 0.42);
}

.builder-preview-spotlight {
  --spotlight-color: #2a2a2a;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(140deg, rgba(42, 42, 42, 0.55), rgba(12, 14, 20, 0.88));
  background: linear-gradient(140deg, color-mix(in srgb, var(--spotlight-color) 55%, rgba(255, 255, 255, 0.08)), rgba(12, 14, 20, 0.88));
  color: #fff;
  text-decoration: none;
}

.builder-preview-spotlight-badge {
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(10, 12, 18, 0.5);
  padding: 2px 7px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.builder-preview-spotlight-title {
  font-size: 0.9rem;
}

.admin-accordion {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: clip;
}

.admin-accordion > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-accordion > summary::-webkit-details-marker {
  display: none;
}

.admin-accordion > summary::after {
  content: '▾';
  margin-left: auto;
  opacity: 0.8;
}

.admin-accordion[open] > summary::after {
  content: '▴';
}

.admin-accordion .section-card {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.links-help {
  margin-top: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.links-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.links-toolbar .links-help {
  margin: 0;
}

.create-new-btn {
  margin: 0 6px 0 auto;
}

.links-admin-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.link-admin-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.link-admin-item.dragging {
  opacity: 0.7;
  border-color: rgba(138, 180, 255, 0.65);
  border-color: color-mix(in srgb, var(--accent) 65%, white 20%);
}

.link-admin-item.is-hidden-link {
  opacity: 0.65;
}

.link-admin-main {
  min-width: 0;
}

.link-admin-title {
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-admin-url {
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.inline-editable {
  position: relative;
}

.inline-editable.is-editable {
  cursor: pointer;
}

.inline-editable.is-editable:hover {
  color: #fff;
}

.inline-editable.is-editable::after {
  content: '✎';
  margin-left: 7px;
  opacity: 0;
  font-size: 0.7rem;
  transition: opacity 120ms ease;
}

.inline-editable.is-editable:hover::after,
.inline-editable.is-editable:focus-visible::after {
  opacity: 0.75;
}

.inline-editable.inline-edit-active::after {
  display: none;
}

.inline-edit-shell {
  display: grid;
  gap: 6px;
}

.inline-edit-shell input,
.inline-edit-shell textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 7px 9px;
  font-size: 0.83rem;
}

.inline-edit-shell input:focus,
.inline-edit-shell textarea:focus {
  outline: none;
  border-color: rgba(138, 180, 255, 0.60);
  border-color: color-mix(in srgb, var(--accent) 60%, white 10%);
}

.inline-edit-actions {
  display: inline-flex;
  gap: 6px;
}

.inline-edit-btn {
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 4px 7px;
  font-size: 0.73rem;
  line-height: 1;
  cursor: pointer;
}

.inline-edit-btn.save {
  background: rgba(138, 180, 255, 0.35);
  background: color-mix(in srgb, var(--accent) 35%, rgba(255, 255, 255, 0.08));
  border-color: rgba(138, 180, 255, 0.62);
  border-color: color-mix(in srgb, var(--accent) 62%, rgba(255, 255, 255, 0.2));
}

.inline-edit-btn.cancel {
  background: rgba(255, 255, 255, 0.06);
}

.link-admin-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-badge {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
  padding: 2px 7px;
}

.link-pill {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.74rem;
  padding: 2px 7px;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-pill-access {
  border-color: rgba(255, 196, 95, 0.45);
  color: #ffdca3;
}

.link-pill-age {
  border-color: rgba(144, 212, 255, 0.45);
  color: #b8e6ff;
}

.link-pill-spoiler {
  border-color: rgba(250, 165, 255, 0.45);
  color: #f8c0ff;
}

.link-pill-featured {
  border-color: rgba(255, 230, 142, 0.5);
  color: #ffe7a8;
}

.link-pill-pin {
  border-color: rgba(172, 230, 255, 0.48);
  color: #c0e9ff;
}

.link-pill-og {
  border-color: rgba(168, 243, 255, 0.42);
  color: #b9f3ff;
}

.link-admin-actions {
  display: flex;
  gap: 6px;
}

.icon-action {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
}

.icon-action.drag-handle {
  width: 34px;
  min-width: 34px;
  padding: 0;
  cursor: grab;
}

.icon-action.drag-handle:active {
  cursor: grabbing;
}

.icon-action.danger {
  border-color: rgba(255, 111, 111, 0.36);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.modal-overlay[hidden],
.modal-card[hidden] {
  display: none;
}

.modal-shell {
  width: min(680px, 96vw);
}

.modal-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(160deg, rgba(16, 17, 19, 0.98), rgba(11, 13, 16, 0.98));
  box-shadow: 0 28px 46px rgba(0, 0, 0, 0.45);
  padding: 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.55rem;
}

.modal-form {
  display: grid;
  gap: 10px;
}

.modal-grid {
  display: grid;
  gap: 10px;
}

.modal-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-field {
  display: grid;
  gap: 6px;
}

.modal-field-span2 {
  grid-column: span 2;
}

.block-type-group[hidden] {
  display: none !important;
}

.modal-label {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.modal-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-inline-action {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.74rem;
  padding: 5px 8px;
  line-height: 1;
  cursor: pointer;
}

.modal-inline-action:disabled {
  opacity: 0.65;
  cursor: wait;
}

.asset-inline-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.asset-manager-shell {
  display: grid;
  gap: 14px;
  background:
    radial-gradient(140% 140% at 0% 0%, rgba(138, 180, 255, 0.08), transparent 52%),
    radial-gradient(120% 120% at 100% 0%, rgba(255, 122, 193, 0.06), transparent 56%),
    rgba(9, 11, 16, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.asset-manager-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.asset-manager-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.asset-manager-header .modal-hint {
  margin-top: 5px;
}

.asset-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 8px;
}

.asset-stat-chip {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 8, 12, 0.55);
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 78px;
}

.asset-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.74);
}

.asset-stat-chip strong {
  font-size: 1.05rem;
  line-height: 1;
  color: #fff;
}

.asset-panel {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  padding: 12px;
  display: grid;
  gap: 10px;
}

.asset-panel > h4 {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.asset-upload-form {
  display: grid;
  gap: 10px;
}

.asset-upload-form input:not([type='checkbox']):not([type='range']),
.asset-upload-form textarea,
.asset-upload-form select,
.asset-library-toolbar input,
.asset-picker-toolbar input,
.asset-picker-toolbar select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  color: #fff;
}

.asset-upload-form input:not([type='checkbox']):not([type='range']):focus,
.asset-upload-form textarea:focus,
.asset-upload-form select:focus,
.asset-library-toolbar input:focus,
.asset-picker-toolbar input:focus,
.asset-picker-toolbar select:focus {
  outline: none;
  border-color: rgba(138, 180, 255, 0.62);
  border-color: color-mix(in srgb, var(--accent) 62%, #fff 10%);
  box-shadow: 0 0 0 3px rgba(138, 180, 255, 0.18);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.asset-upload-form select option,
.asset-picker-toolbar select option {
  color: #111;
}

#asset-upload-file {
  padding: 8px;
}

#asset-upload-file::file-selector-button {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(140deg, rgba(138, 180, 255, 0.35), rgba(95, 141, 255, 0.2));
  color: #fff;
  padding: 8px 10px;
  margin-right: 10px;
  cursor: pointer;
}

#asset-upload-file:hover::file-selector-button {
  filter: brightness(1.06);
}

#asset-image-quality-value {
  color: rgba(138, 180, 255, 0.70);
  color: color-mix(in srgb, var(--accent) 70%, #fff 22%);
  font-weight: 700;
  margin-left: 2px;
}

#asset-image-quality {
  width: 100%;
  accent-color: var(--accent);
}

.asset-image-tools {
  display: grid;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  padding: 10px;
}

.asset-image-preview-wrap {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(180% 120% at 0% 0%, rgba(138, 180, 255, 0.08), transparent 42%),
    rgba(0, 0, 0, 0.32);
  padding: 10px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

#asset-image-preview-canvas {
  width: min(760px, 100%);
  max-height: 280px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: repeating-conic-gradient(#1c1f24 0% 25%, #13161a 0% 50%) 50% / 14px 14px;
}

.asset-library-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.asset-library-grid,
.asset-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.asset-library-empty {
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  text-align: center;
  padding: 18px 12px;
}

.asset-card,
.asset-picker-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  overflow: hidden;
  display: grid;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  transition: transform 160ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.asset-card:hover,
.asset-picker-card:hover {
  transform: translateY(-2px);
  border-color: rgba(138, 180, 255, 0.55);
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(255, 255, 255, 0.22));
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.28);
}

.asset-preview-shell {
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.05), rgba(8, 10, 14, 0.45)),
    rgba(0, 0, 0, 0.24);
  aspect-ratio: 16 / 9;
}

.asset-preview-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asset-card-meta,
.asset-picker-meta {
  display: grid;
  gap: 9px;
  padding: 11px;
}

.asset-card-meta-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
}

.asset-card-label-input,
.asset-card-alt-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 8px 9px;
  font-size: 0.83rem;
}

.link-pill-asset-type {
  border-color: rgba(149, 198, 255, 0.45);
  color: #c8e5ff;
}

.link-pill-asset-usage {
  border-color: rgba(208, 183, 255, 0.42);
  color: #e2d0ff;
}

.asset-card-path {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.asset-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.asset-card-actions .icon-action {
  min-width: 0;
  height: 32px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.asset-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 8px;
  margin-bottom: 10px;
}

.asset-picker-card .icon-action {
  min-width: 0;
  width: fit-content;
  height: 32px;
  padding: 0 10px;
  font-size: 0.74rem;
}

.modal-form input:not([type='checkbox']),
.modal-form textarea,
.modal-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.modal-form input:not([type='checkbox']):focus,
.modal-form textarea:focus,
.modal-form select:focus {
  outline: none;
  border-color: rgba(138, 180, 255, 0.60);
  border-color: color-mix(in srgb, var(--accent) 60%, white 15%);
  box-shadow: 0 0 0 3px rgba(138, 180, 255, 0.26);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
}

.modal-form select option {
  color: #111;
}

.modal-form textarea {
  min-height: 170px;
  resize: vertical;
  font-family: 'Cascadia Mono', 'Fira Code', Consolas, 'Courier New', monospace;
  font-size: 0.9rem;
}

.modal-checkbox {
  margin-top: 2px;
  color: #f0f0f0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.modal-form input[type='checkbox'],
.modal-checkbox input[type='checkbox'] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  padding: 0;
  border-radius: 5px;
  accent-color: var(--accent);
}

.modal-checkbox-copy {
  display: grid;
  gap: 2px;
}

.modal-checkbox-title {
  font-size: 0.9rem;
  font-weight: 650;
  color: #fff;
  line-height: 1.15;
}

.modal-checkbox-description {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.3;
}

.modal-access-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.modal-access-header h4 {
  margin: 0;
  font-size: 0.95rem;
}

.modal-access-header .modal-hint {
  margin-top: 4px;
}

.modal-checkbox-compact {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  align-items: center;
}

.modal-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.modal-checkbox-card {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
}

.modal-checkbox:focus-within {
  border-color: rgba(138, 180, 255, 0.62);
  border-color: color-mix(in srgb, var(--accent) 62%, rgba(255, 255, 255, 0.16));
  box-shadow: 0 0 0 2px rgba(138, 180, 255, 0.20);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}

.modal-hint {
  margin: 0;
  font-size: 0.83rem;
  color: var(--muted);
}

.icon-key-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
}

.icon-key-preview-chip {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
}

.icon-key-preview-chip img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.icon-key-preview-fallback {
  font-size: 0.92rem;
  font-weight: 700;
  color: #d2d2d2;
}

.icon-key-preview-title {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}

.icon-key-preview-label {
  font-size: 0.84rem;
  color: #fff;
}

.link-enrich-preview {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  align-items: center;
}

.link-enrich-image-wrap {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.24);
  display: grid;
  place-items: center;
}

.link-enrich-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.link-enrich-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.modal-actions a.btn-secondary {
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}

.qr-preview-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

#qr-image {
  width: min(320px, 80vw);
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

#qr-status {
  margin: 0;
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

.text-success {
  color: #78e9a5;
}

.text-danger {
  color: #ff9999;
}

.analytics-shell {
  display: grid;
  gap: 14px;
}

.analytics-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.analytics-filter-form {
  display: inline-flex;
  align-items: end;
  gap: 8px;
}

.analytics-filter-label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
}

.analytics-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-export-link {
  text-decoration: none;
}

.analytics-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.analytics-metric-card {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
}

.analytics-metric-label {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.analytics-metric-value {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 3px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.analytics-block {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
}

.analytics-block h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.analytics-block-wide {
  grid-column: span 2;
}

.analytics-table-wrap {
  overflow: auto;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.analytics-table th,
.analytics-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  padding: 7px 8px;
  font-size: 0.84rem;
}

.analytics-table th {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

.analytics-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.analytics-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.analytics-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.84rem;
}

.analytics-list-time {
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
}

.analytics-empty {
  color: rgba(255, 255, 255, 0.68);
  text-align: center;
}

.design-preview {
  --preview-accent: #8ab4ff;
  --preview-overlay-opacity: 0.45;
  --preview-surface: #161a22;
  --preview-profile-bg: rgba(22, 26, 34, 0.55);
  --preview-profile-blur: 18px;
  --preview-text: #f5f5f5;
  --preview-muted: #c9c9c9;
  --preview-border: #9aa2b2;
  --preview-space-scale: 1;
  --preview-radius-scale: 1;
  position: relative;
  min-height: 280px;
  border-radius: calc(14px * var(--preview-radius-scale));
  overflow: hidden;
  border: 1px solid rgba(154, 162, 178, 0.45);
  border: 1px solid color-mix(in srgb, var(--preview-border) 45%, transparent);
  background: rgba(22, 26, 34, 0.90);
  background: color-mix(in srgb, var(--preview-surface) 90%, #000 10%);
  color: var(--preview-text);
}

.design-preview-bg,
.design-preview-overlay,
.design-preview-content {
  position: absolute;
  inset: 0;
}

.design-preview-bg {
  z-index: 0;
  background: linear-gradient(135deg, #1f2937, #111827);
  background-size: cover;
  background-position: center;
}

.design-preview-overlay {
  z-index: 1;
  background: radial-gradient(circle at 50% 10%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, var(--preview-overlay-opacity)));
}

.design-preview-content {
  z-index: 2;
  padding: calc(14px * var(--preview-space-scale));
  display: grid;
  align-content: start;
  gap: calc(8px * var(--preview-space-scale));
  margin: 12px;
  border-radius: calc(18px * var(--preview-radius-scale));
  background: var(--preview-profile-bg);
  backdrop-filter: blur(var(--preview-profile-blur));
  -webkit-backdrop-filter: blur(var(--preview-profile-blur));
}

.design-preview-handle {
  font-size: 0.85rem;
  opacity: 0.9;
}

.design-preview-name {
  font-size: 1.12rem;
  font-weight: 700;
}

.design-preview-bio {
  font-size: 0.86rem;
  color: var(--preview-muted);
}

.design-preview-actions {
  display: flex;
  gap: calc(8px * var(--preview-space-scale));
  font-size: 0.86rem;
}

.design-preview-actions span {
  border: 1px solid rgba(154, 162, 178, 0.65);
  border: 1px solid color-mix(in srgb, var(--preview-border) 65%, transparent);
  border-radius: 999px;
  padding: calc(3px * var(--preview-space-scale)) calc(8px * var(--preview-space-scale));
}

.design-preview.preview-glow-username .design-preview-handle,
.design-preview.preview-glow-username .design-preview-name {
  text-shadow:
    0 0 10px color-mix(in srgb, var(--preview-accent) 45%, transparent),
    0 0 20px color-mix(in srgb, var(--preview-accent) 22%, transparent);
}

.design-preview.preview-glow-socials .design-preview-actions span {
  box-shadow: 0 0 16px color-mix(in srgb, var(--preview-accent) 20%, transparent);
}

.design-preview-links {
  display: grid;
  gap: calc(8px * var(--preview-space-scale));
}

.preview-link {
  border: 1px solid rgba(154, 162, 178, 0.55);
  border: 1px solid color-mix(in srgb, var(--preview-border) 55%, transparent);
  background: rgba(22, 26, 34, 0.75);
  background: color-mix(in srgb, var(--preview-surface) 75%, transparent);
  padding: calc(8px * var(--preview-space-scale)) calc(10px * var(--preview-space-scale));
  border-radius: calc(10px * var(--preview-radius-scale));
  font-size: 0.85rem;
  font-weight: 600;
}

.design-preview.preview-layout-grid .design-preview-links {
  grid-template-columns: 1fr 1fr;
}

.design-preview.preview-layout-grid .preview-link:last-child {
  grid-column: span 2;
}

.design-preview.preview-layout-compact .preview-link {
  padding: calc(6px * var(--preview-space-scale)) calc(8px * var(--preview-space-scale));
  font-size: 0.78rem;
}

.design-preview.preview-layout-table .preview-link {
  display: flex;
  justify-content: space-between;
}

.design-preview.preview-layout-table .preview-link::after {
  content: '↗';
  opacity: 0.8;
}

.design-preview.preview-button-pill .preview-link {
  border-radius: 999px;
}

.design-preview.preview-button-square .preview-link {
  border-radius: 4px;
}

.design-preview.preview-button-glass .preview-link {
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.design-preview.preview-font-editorial {
  font-family: Cambria, Georgia, 'Times New Roman', serif;
}

.design-preview.preview-font-rounded {
  font-family: 'Trebuchet MS', 'Avenir Next', Arial, sans-serif;
}

.design-preview.preview-font-mono {
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, 'Cascadia Mono', Consolas, 'Courier New', monospace;
}

.design-preview.preview-font-modern {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.design-preview.preview-mode-youtube .design-preview-bg {
  background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.35), rgba(140, 0, 0, 0.65));
}

.design-preview.preview-mode-video .design-preview-bg {
  background-image: linear-gradient(135deg, rgba(8, 16, 31, 0.9), rgba(42, 18, 52, 0.9));
}

.design-preview.preview-mode-particles .design-preview-bg {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3) 1px, transparent 2px),
    radial-gradient(circle at 80% 35%, rgba(255, 255, 255, 0.24) 1px, transparent 2px),
    radial-gradient(circle at 50% 65%, rgba(255, 255, 255, 0.2) 1px, transparent 2px),
    linear-gradient(140deg, #0f172a, #111827);
  background-size: 100px 100px, 120px 120px, 140px 140px, cover;
  animation: preview-particles 8s linear infinite;
}

@keyframes preview-particles {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 30px 20px, -20px 30px, 25px -15px, 0 0;
  }
}

.design-preview.preview-gradient-sunset .design-preview-bg {
  background-image: linear-gradient(135deg, #ff5f6d 0%, #ffc371 45%, #2d1a4f 100%);
}

.design-preview.preview-gradient-ocean .design-preview-bg {
  background-image: linear-gradient(135deg, #00203f 0%, #005f73 45%, #0a9396 100%);
}

.design-preview.preview-gradient-forest .design-preview-bg {
  background-image: linear-gradient(135deg, #132a13 0%, #31572c 45%, #4f772d 100%);
}

.design-preview.preview-gradient-neon .design-preview-bg {
  background-image: linear-gradient(130deg, #0f0c29 0%, #302b63 45%, #ff0080 100%);
}

.design-preview.preview-gradient-midnight .design-preview-bg {
  background-image: linear-gradient(140deg, #0f172a 0%, #1e1b4b 45%, #312e81 100%);
}

.design-preview.preview-pattern-grid .design-preview-overlay::before,
.design-preview.preview-pattern-dots .design-preview-overlay::before,
.design-preview.preview-pattern-noise .design-preview-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
}

.design-preview.preview-pattern-grid .design-preview-overlay::before {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.11) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.11) 1px, transparent 1px);
  background-size: 24px 24px;
}

.design-preview.preview-pattern-dots .design-preview-overlay::before {
  background-image: radial-gradient(rgba(255, 255, 255, 0.33) 1px, transparent 1px);
  background-size: 16px 16px;
}

.design-preview.preview-pattern-noise .design-preview-overlay::before {
  background-image: repeating-radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px 3px);
}

.design-preview.preview-anim-subtle {
  animation: preview-fade 220ms ease-out;
}

.design-preview.preview-anim-energetic {
  animation: preview-fade 350ms cubic-bezier(0.22, 0.75, 0.2, 1.15);
}

.design-preview.preview-anim-none {
  animation: none !important;
}

@keyframes preview-fade {
  from {
    opacity: 0.6;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-sidebar {
    position: static;
  }

  .builder-shell {
    grid-template-columns: 1fr;
  }

  .builder-preview-column {
    position: static;
  }
}

@media (max-width: 760px) {
  .row,
  .row-embed,
  .row-embed-head,
  .row-redirect,
  .row-redirect-head {
    grid-template-columns: 1fr;
  }

  .link-admin-item {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
  }

  .link-admin-meta,
  .link-admin-actions {
    grid-column: 2;
  }

  .settings-header {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-grid-2 {
    grid-template-columns: 1fr;
  }

  .settings-save {
    width: 100%;
  }

  .links-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .links-toolbar .btn-secondary {
    width: 100%;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .asset-library-toolbar,
  .asset-picker-toolbar {
    grid-template-columns: 1fr;
  }

  .template-io-row {
    grid-template-columns: 1fr;
  }

  .asset-manager-header {
    grid-template-columns: 1fr;
  }

  .asset-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .asset-library-grid,
  .asset-picker-grid {
    grid-template-columns: 1fr;
  }

  .analytics-block-wide {
    grid-column: auto;
  }

  body.links-grid .links {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  body.links-grid .links {
    grid-template-columns: 1fr;
  }
}

/* Marketing Landing */
body.marketing-landing {
  --lp-bg: #06060b;
  --lp-surface: #11111a;
  --lp-surface-2: #171726;
  --lp-text: #f5f6ff;
  --lp-muted: #b4b5ca;
  --lp-accent: #8f52ff;
  --lp-accent-2: #6f3be0;
  background:
    radial-gradient(1100px 600px at 16% -4%, rgba(133, 71, 255, 0.24), transparent 56%),
    radial-gradient(900px 520px at 88% 6%, rgba(107, 58, 218, 0.2), transparent 60%),
    var(--lp-bg);
  color: var(--lp-text);
  font-family: 'Sora', 'Space Grotesk', 'Trebuchet MS', Arial, sans-serif;
}

.marketing-landing .container {
  max-width: 1180px;
}

.lp-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 10% 18%, rgba(170, 108, 255, 0.18) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 32%, rgba(170, 108, 255, 0.16) 0 2px, transparent 3px),
    radial-gradient(circle at 24% 72%, rgba(170, 108, 255, 0.12) 0 2px, transparent 3px);
  background-size: 180px 180px, 220px 220px, 260px 260px;
}

.lp-header {
  padding-top: 18px;
}

.lp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(197, 163, 255, 0.2);
  background: linear-gradient(180deg, rgba(16, 16, 26, 0.92), rgba(10, 10, 16, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(3, 3, 8, 0.45);
}

.lp-brand {
  color: var(--lp-text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.lp-nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lp-nav-links a {
  color: var(--lp-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.lp-nav-links a:hover {
  color: var(--lp-text);
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  padding: 11px 18px;
  border: 1px solid transparent;
}

.lp-btn-primary {
  background: linear-gradient(160deg, var(--lp-accent), var(--lp-accent-2));
  color: #fff;
  box-shadow: 0 8px 18px rgba(111, 59, 224, 0.36);
}

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

.lp-btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(200, 173, 255, 0.26);
  color: var(--lp-text);
}

.lp-btn-ghost:hover {
  border-color: rgba(200, 173, 255, 0.5);
}

.lp-hero {
  padding-top: 74px;
  text-align: center;
}

.lp-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.74rem;
  color: #cfb2ff;
  font-weight: 700;
}

.lp-hero h1 {
  margin: 12px auto 10px;
  max-width: 820px;
  font-size: clamp(2.1rem, 5.1vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lp-subtitle {
  margin: 0 auto;
  max-width: 760px;
  color: var(--lp-muted);
  font-size: 1.03rem;
}

.lp-hero-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lp-demo {
  margin-top: 38px;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 16px;
  align-items: end;
}

.lp-demo-dashboard,
.lp-phone-card {
  border: 1px solid rgba(190, 151, 255, 0.24);
  background: linear-gradient(160deg, rgba(18, 18, 30, 0.96), rgba(10, 10, 16, 0.96));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.44);
}

.lp-demo-dashboard {
  border-radius: 24px;
  padding: 16px;
  transform: perspective(1000px) rotateX(5deg) rotateY(-8deg);
  transform-origin: bottom center;
}

.lp-demo-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: #cbc5dd;
  font-size: 0.84rem;
}

.lp-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.lp-demo-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.lp-demo-metrics div {
  border: 1px solid rgba(188, 152, 255, 0.14);
  border-radius: 12px;
  background: rgba(143, 82, 255, 0.08);
  text-align: left;
  padding: 9px 10px;
}

.lp-demo-metrics span {
  display: block;
  font-size: 0.74rem;
  color: #c5bddd;
  margin-bottom: 5px;
}

.lp-demo-metrics strong {
  font-size: 1rem;
}

.lp-demo-chart {
  margin-top: 12px;
  height: 170px;
  border: 1px solid rgba(188, 152, 255, 0.16);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(143, 82, 255, 0.06));
}

.lp-demo-chart span {
  display: block;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, #d7b8ff, #8f52ff);
  min-height: 8%;
}

.lp-demo-phones {
  display: grid;
  gap: 12px;
  transform: translateY(18px);
}

.lp-phone-card {
  border-radius: 20px;
  padding: 16px;
  text-align: left;
}

.lp-phone-card p {
  margin: 0 0 4px;
  color: #cabfe1;
  font-size: 0.82rem;
}

.lp-phone-card h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.lp-phone-link {
  border-radius: 999px;
  border: 1px solid rgba(208, 184, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #eceaff;
  padding: 8px 11px;
  font-size: 0.86rem;
}

.lp-phone-link + .lp-phone-link {
  margin-top: 8px;
}

.lp-phone-card.alt {
  transform: translateX(-26px);
  background: linear-gradient(160deg, rgba(20, 20, 32, 0.95), rgba(12, 12, 18, 0.95));
}

.lp-stats {
  margin-top: 92px;
  text-align: center;
}

.lp-stats h2,
.lp-features h2,
.lp-templates h2,
.lp-final-cta h2,
.lp-analytics h2 {
  font-size: clamp(1.62rem, 3.1vw, 2.45rem);
  margin: 0 0 8px;
  letter-spacing: -0.015em;
}

.lp-stats p {
  margin: 0 auto 18px;
  color: var(--lp-muted);
}

.lp-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.lp-stat-grid article {
  border-radius: 16px;
  border: 1px solid rgba(205, 170, 255, 0.2);
  background: linear-gradient(180deg, rgba(20, 20, 30, 0.94), rgba(12, 12, 18, 0.94));
  padding: 16px 14px;
}

.lp-stat-grid strong {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.lp-stat-grid span {
  color: var(--lp-muted);
  font-size: 0.88rem;
}

.lp-features {
  margin-top: 86px;
}

.lp-feature-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.lp-feature-grid article {
  border-radius: 16px;
  border: 1px solid rgba(204, 168, 255, 0.2);
  background: linear-gradient(180deg, rgba(19, 19, 30, 0.94), rgba(12, 12, 18, 0.94));
  padding: 16px;
}

.lp-feature-grid h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.lp-feature-grid p {
  margin: 0;
  color: var(--lp-muted);
  font-size: 0.92rem;
}

.lp-templates {
  margin-top: 86px;
}

.lp-template-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.lp-template-grid article {
  min-height: 148px;
  border-radius: 16px;
  border: 1px solid rgba(203, 166, 255, 0.25);
  display: grid;
  align-content: end;
  padding: 14px;
  box-shadow: inset 0 -40px 60px rgba(4, 4, 8, 0.55);
}

.lp-template-grid h3 {
  margin: 0 0 4px;
}

.lp-template-grid p {
  margin: 0;
  color: #d9d4eb;
  font-size: 0.88rem;
}

.tp-minimal {
  background: linear-gradient(140deg, #202437, #3a4060);
}

.tp-glass {
  background: linear-gradient(140deg, #223654, #2f6f89);
}

.tp-neon {
  background: linear-gradient(140deg, #2f0f4b, #b23195);
}

.tp-business {
  background: linear-gradient(140deg, #1c2d1f, #385f42);
}

.lp-analytics {
  margin-top: 86px;
}

.lp-analytics-card {
  border: 1px solid rgba(203, 166, 255, 0.24);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(23, 23, 34, 0.96), rgba(13, 13, 20, 0.96));
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  padding: 20px;
}

.lp-analytics-card p {
  color: var(--lp-muted);
}

.lp-analytics-card ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #d8d2ea;
}

.lp-analytics-card li + li {
  margin-top: 8px;
}

.lp-analytics-preview {
  display: grid;
  gap: 10px;
}

.lp-analytics-preview div {
  border-radius: 12px;
  border: 1px solid rgba(199, 162, 255, 0.2);
  background: rgba(143, 82, 255, 0.09);
  padding: 11px;
}

.lp-analytics-preview span {
  display: block;
  color: #c8bfdf;
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.lp-analytics-preview strong {
  font-size: 0.96rem;
}

.lp-final-cta {
  margin-top: 86px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid rgba(211, 183, 255, 0.26);
  background:
    radial-gradient(500px 200px at 20% 20%, rgba(143, 82, 255, 0.26), transparent 60%),
    linear-gradient(150deg, rgba(30, 23, 46, 0.96), rgba(16, 16, 24, 0.96));
  padding: 34px 20px;
}

.lp-final-cta p {
  margin: 0 auto;
  color: var(--lp-muted);
  max-width: 620px;
}

.lp-footer {
  margin-top: 84px;
  padding: 30px 0 24px;
  border-top: 1px solid rgba(192, 153, 255, 0.18);
  background: linear-gradient(180deg, rgba(8, 8, 12, 0), rgba(8, 8, 12, 0.88));
}

.lp-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 20px;
}

.lp-footer h3,
.lp-footer h4 {
  margin: 0 0 8px;
}

.lp-footer p {
  margin: 0;
  color: var(--lp-muted);
  max-width: 360px;
}

.lp-footer a {
  display: block;
  color: var(--lp-muted);
  text-decoration: none;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.lp-footer a:hover {
  color: #fff;
}

.lp-footer-bottom {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid rgba(192, 153, 255, 0.14);
  color: #a39abf;
  font-size: 0.82rem;
}

@media (max-width: 1060px) {
  .lp-nav {
    border-radius: 18px;
  }

  .lp-nav-links {
    display: none;
  }

  .lp-demo {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .lp-demo-dashboard {
    transform: none;
  }

  .lp-phone-card.alt {
    transform: none;
  }

  .lp-stat-grid,
  .lp-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lp-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lp-analytics-card,
  .lp-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .lp-hero {
    padding-top: 52px;
  }

  .lp-stat-grid,
  .lp-template-grid,
  .lp-feature-grid {
    grid-template-columns: 1fr;
  }

  .lp-btn {
    width: 100%;
  }

  .lp-hero-actions {
    align-items: stretch;
  }
}


/* ─── MOBILE: Admin / Dashboard Components ───────────────────── */
@media (max-width: 768px) {
  /* Container padding */
  .container {
    padding: 0 12px;
  }

  /* Admin topbar — stack on small */
  .admin-topbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }

  /* Settings layout — single column */
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .settings-sidebar,
  .builder-preview-column {
    position: static;
  }

  /* Settings tabs — horizontal scroll */
  .settings-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 4px;
  }

  .settings-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Builder — single column */
  .builder-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Data table rows — stack vertically */
  .row {
    grid-template-columns: 1fr;
    gap: 4px;
    font-size: 0.85rem;
  }

  .row.head {
    display: none;
  }

  .row-embed,
  .row-embed-head,
  .row-redirect,
  .row-redirect-head {
    grid-template-columns: 1fr;
  }

  /* Link admin items — collapse grid */
  .link-admin-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .link-admin-meta,
  .link-admin-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  .link-admin-actions {
    justify-content: flex-start;
  }

  /* Drag handle — hide on mobile (no drag on touch) */
  .icon-action.drag-handle {
    display: none;
  }

  /* Modals — full-width on mobile */
  .modal-shell {
    width: 96vw;
    max-width: 96vw;
  }

  .modal-card {
    padding: 12px;
  }

  .modal-header h3 {
    font-size: 1.2rem;
  }

  .modal-grid-2 {
    grid-template-columns: 1fr;
  }

  .modal-field-span2 {
    grid-column: span 1;
  }

  /* Asset grids — single column */
  .asset-library-grid,
  .asset-picker-grid {
    grid-template-columns: 1fr;
  }

  .asset-stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .asset-manager-header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .asset-picker-toolbar {
    grid-template-columns: 1fr;
  }

  /* Asset inline input — stack on mobile */
  .asset-inline-input {
    grid-template-columns: 1fr;
  }

  /* Template gallery — single column */
  .template-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Compact grid — single column */
  .compact-grid {
    grid-template-columns: 1fr;
  }

  /* Admin grid — min 160px instead of 220px */
  .admin .grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
  }

  /* Inline color picker — stack */
  .inline-color-picker {
    grid-template-columns: 1fr 42px;
  }

  /* Template IO row — stack */
  .template-io-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Links toolbar — wrap on small */
  .links-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Buttons — slightly larger touch targets */
  button,
  .btn-secondary,
  .btn-danger {
    padding: 11px 14px;
    font-size: 0.88rem;
  }

  /* QR modal — full-width */
  .qr-wrap canvas {
    max-width: 100%;
    height: auto;
  }

  /* Analytics section (admin) */
  .analytics-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  /* Settings header — stack */
  .settings-header {
    flex-direction: column;
    gap: 8px;
  }

  .settings-save {
    width: 100%;
    min-width: unset;
  }
}

@media (max-width: 480px) {
  /* Even smaller screens */
  .container {
    padding: 0 8px;
  }

  .link-admin-item {
    padding: 8px;
  }

  .modal-card {
    padding: 10px;
    border-radius: 12px;
  }

  .asset-stat-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
  }

  .asset-stat-chip {
    padding: 6px 4px;
    min-width: unset;
  }

  .template-gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .like-pill.pop .heart {
    animation: none !important;
  }

  .link-card,
  .custom-blocks,
  .hero,
  .links,
  .live-embeds,
  .block-button-link,
  .access-action-btn,
  .icon-btn,
  .like-pill,
  button,
  a.btn-secondary,
  .design-preview,
  .design-preview-bg {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ═══════ CURSOR TRAIL ═══════ */
.cursor-trail-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  will-change: left, top;
  mix-blend-mode: screen;
}

.cursor-trail-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  will-change: transform, opacity;
  user-select: none;
}

.cursor-trail-particle--sparkle {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.cursor-trail-particle--emoji {
  font-size: 20px;
  line-height: 1;
}

.cursor-trail-particle--image {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ── Mobile Rain ── */
.mobile-rain-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

.mobile-rain-orb {
  position: absolute;
  top: -20%;
  border-radius: 50%;
  pointer-events: none;
  animation: mobile-rain-orb-fall linear infinite;
  opacity: 0.7;
}

.mobile-rain-drop {
  position: absolute;
  top: -10%;
  pointer-events: none;
  user-select: none;
  animation: mobile-rain-drop-fall linear infinite;
  opacity: 0.6;
}

.mobile-rain-drop--sparkle {
  border-radius: 50%;
}

.mobile-rain-drop--image {
  object-fit: contain;
}

.mobile-rain-drop--emoji {
  line-height: 1;
}

@keyframes mobile-rain-orb-fall {
  0% {
    transform: translateY(-20vh) translateX(0);
    opacity: 0;
  }
  8% {
    opacity: 0.7;
  }
  50% {
    transform: translateY(50vh) translateX(15px);
  }
  92% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(120vh) translateX(-10px);
    opacity: 0;
  }
}

@keyframes mobile-rain-drop-fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 0;
  }
  5% {
    opacity: 0.6;
  }
  50% {
    transform: translateY(50vh) rotate(180deg) translateX(10px);
  }
  95% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(115vh) rotate(360deg) translateX(-8px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-trail-glow,
  .cursor-trail-particle,
  .mobile-rain-container {
    display: none !important;
  }
}

/* ── Premium Effects: Profile Picture (VIS-02) ───────────── */

.avatar-effect-glow {
  box-shadow: 0 0 18px 5px color-mix(in srgb, var(--accent) 55%, transparent),
              0 0 40px 12px color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 999px;
  animation: glow-pulse 3s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
  0% {
    box-shadow: 0 0 18px 5px color-mix(in srgb, var(--accent) 55%, transparent),
                0 0 40px 12px color-mix(in srgb, var(--accent) 20%, transparent);
  }
  100% {
    box-shadow: 0 0 24px 8px color-mix(in srgb, var(--accent) 65%, transparent),
                0 0 50px 16px color-mix(in srgb, var(--accent) 28%, transparent);
  }
}

.avatar-effect-frame {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 999px;
}

.avatar-effect-sparkle {
  position: relative;
}

/* Sparkle orbit elements are positioned by JS. Uses --orbit-radius CSS var. */
.sparkle-dot {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  --orbit-radius: 54px;
}

@keyframes sparkle-orbit-0 {
  0%   { transform: rotate(0deg)   translateX(var(--orbit-radius)) scale(0.8); }
  50%  { transform: rotate(180deg) translateX(var(--orbit-radius)) scale(1.2); }
  100% { transform: rotate(360deg) translateX(var(--orbit-radius)) scale(0.8); }
}
@keyframes sparkle-orbit-1 {
  0%   { transform: rotate(120deg) translateX(var(--orbit-radius)) scale(1); }
  50%  { transform: rotate(300deg) translateX(var(--orbit-radius)) scale(0.7); }
  100% { transform: rotate(480deg) translateX(var(--orbit-radius)) scale(1); }
}
@keyframes sparkle-orbit-2 {
  0%   { transform: rotate(240deg) translateX(var(--orbit-radius)) scale(1.1); }
  50%  { transform: rotate(60deg)  translateX(var(--orbit-radius)) scale(0.8); }
  100% { transform: rotate(600deg) translateX(var(--orbit-radius)) scale(1.1); }
}

/* ── Premium Effects: Typewriter Cursor (VIS-01) ─────────── */

.typewriter-cursor {
  display: inline;
  animation: typewriter-blink 700ms step-end infinite;
  color: var(--accent);
}

@keyframes typewriter-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ── Premium Effects: Layout Template (LAY-01) ───────────── */

.layout-premium-centered .hero {
  margin-top: 24px;
  margin-bottom: 24px;
}

.layout-premium-centered .links {
  max-width: 480px;
  margin: 0 auto;
}

.layout-premium-centered .link-card {
  border-radius: calc(20px * var(--radius-scale, 1));
  padding: calc(16px * var(--space-scale, 1));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ── Premium Effects: Icon-Only Links (LAY-02) ───────────── */

.links-icon-only {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.links-icon-only .link-card {
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 8px;
  border-radius: 999px;
}

.links-icon-only .link-card .label {
  display: none;
}

.links-icon-only .link-card .link-arrow {
  display: none;
}

.links-icon-only .link-card .icon {
  width: 32px;
  height: 32px;
}

/* ── Premium Effects: Splash Screen (INT-01) ─────────────── */

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  backdrop-filter: blur(8px);
  transition: opacity 350ms ease;
}

.splash-screen.dismissing {
  opacity: 0;
  pointer-events: none;
}

/* The splash is focused on load so keyboard users can dismiss it; it fills the
   viewport, so a focus ring around the whole screen adds nothing. */
.splash-screen:focus {
  outline: none;
}

.splash-screen ~ * {
  pointer-events: none;
  user-select: none;
}

.splash-screen.dismissing ~ * {
  pointer-events: auto;
  user-select: auto;
}

.splash-avatar {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 24px 6px color-mix(in srgb, var(--accent) 40%, transparent);
}

.splash-heading {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text, #f5f5f5);
  margin: 0;
}

.splash-subtext {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted, #c9c9c9);
  margin: 0;
}

.splash-enter-btn {
  padding: 8px 32px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--accent, #8ab4ff);
  color: var(--text, #f5f5f5);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms ease, box-shadow 200ms ease;
}

.splash-enter-btn:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: 0 0 16px 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

.splash-enter-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Splash hint text (click anywhere styles) */
.splash-hint {
  font-size: 0.82rem;
  color: var(--muted, #c9c9c9);
  opacity: 0.7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Splash: full image style */
.splash-style-image {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  gap: clamp(16px, 2.6vw, 28px);
  padding:
    clamp(18px, 4vw, 42px)
    clamp(16px, 4vw, 32px)
    calc(clamp(20px, 4vw, 36px) + env(safe-area-inset-bottom, 0px));
  cursor: pointer;
}

.splash-full-image {
  position: relative;
  inset: auto;
  display: block;
  width: auto;
  max-width: min(92vw, 980px);
  max-height: min(72vh, 820px);
  height: auto;
  object-fit: contain;
  object-position: center;
  opacity: 1;
  filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.44));
}

.splash-style-image .splash-hint {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(8, 10, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f5f7fb;
  opacity: 1;
  text-align: center;
}

/* Splash: logo style */
.splash-logo {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 40px 8px color-mix(in srgb, var(--accent) 35%, transparent);
  cursor: pointer;
}
.splash-logo-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--surface, #161a22);
  border: 2px solid rgba(255,255,255,0.1);
}
.splash-style-logo {
  cursor: pointer;
}

/* Splash: minimal style */
.splash-style-minimal {
  cursor: pointer;
}
.splash-minimal-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text, #f5f5f5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* ── Music Player (INT-02) ───────────────────────────────── */

.music-widget {
  --music-bg: linear-gradient(180deg, rgba(18, 18, 24, 0.92), rgba(12, 12, 18, 0.94));
  --music-border: rgba(255, 255, 255, 0.12);
  --music-control-bg: rgba(255, 255, 255, 0.06);
  --music-control-hover: rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: calc(20px * var(--radius-scale, 1));
  border: 1px solid var(--music-border);
  background: var(--music-bg);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.26);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.music-widget.music-playing {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--music-border));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.music-widget--floating {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  width: min(420px, calc(100vw - 24px));
}

.music-widget--block {
  width: 100%;
  max-width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.block-music-player {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.music-widget-cover {
  position: relative;
  width: 58px;
  height: 58px;
  padding: 0;
  border: none;
  border-radius: calc(18px * var(--radius-scale, 1));
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.music-widget-cover--visualizer {
  background:
    radial-gradient(circle at 22% 18%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 40%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(160deg, rgba(20, 24, 38, 0.98), rgba(12, 14, 22, 0.98));
}

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

.music-widget-cover-visual {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.music-widget-cover-bars {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 28px;
}

.music-widget-cover-bars span {
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(216, 180, 254, 0.98), rgba(138, 180, 255, 0.82));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 16%, transparent);
  transform-origin: 50% 100%;
}

.music-widget-cover-bars span:nth-child(1) {
  height: 12px;
}

.music-widget-cover-bars span:nth-child(2) {
  height: 24px;
}

.music-widget-cover-bars span:nth-child(3) {
  height: 18px;
}

.music-widget-cover-bars span:nth-child(4) {
  height: 26px;
}

.music-widget-cover-bars span:nth-child(5) {
  height: 14px;
}

.music-widget.music-playing .music-widget-cover-bars span {
  animation: music-cover-bars 900ms ease-in-out infinite;
}

.music-widget.music-playing .music-widget-cover-bars span:nth-child(2) {
  animation-delay: 120ms;
}

.music-widget.music-playing .music-widget-cover-bars span:nth-child(3) {
  animation-delay: 240ms;
}

.music-widget.music-playing .music-widget-cover-bars span:nth-child(4) {
  animation-delay: 90ms;
}

.music-widget.music-playing .music-widget-cover-bars span:nth-child(5) {
  animation-delay: 180ms;
}

.music-widget-cover-indicator {
  position: absolute;
  inset: auto 6px 6px auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(8, 8, 12, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  color: #fff;
}

.music-widget-cover-indicator .music-icon,
.music-widget-control .music-icon {
  grid-area: 1 / 1;
}

.music-widget [data-music-play] .music-icon {
  transition: opacity 160ms ease, transform 160ms ease;
}

.music-widget [data-music-play] .music-icon-play {
  opacity: 1;
  transform: scale(1);
}

.music-widget [data-music-play] .music-icon-pause {
  opacity: 0;
  transform: scale(0.82);
}

.music-widget.music-playing [data-music-play] .music-icon-play {
  opacity: 0;
  transform: scale(0.82);
}

.music-widget.music-playing [data-music-play] .music-icon-pause {
  opacity: 1;
  transform: scale(1);
}

.music-widget-main {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.music-widget-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.music-widget-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.music-widget-time {
  flex-shrink: 0;
  font-size: 0.84rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.music-widget-progress {
  display: block;
}

.music-widget-progress input,
.music-volume-range {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  accent-color: var(--accent);
}

.music-widget-progress input::-webkit-slider-thumb,
.music-volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid rgba(12, 12, 18, 0.95);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
  cursor: pointer;
}

.music-widget-progress input::-moz-range-thumb,
.music-volume-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid rgba(12, 12, 18, 0.95);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
  cursor: pointer;
}

.music-widget-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.music-widget-control {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--music-control-bg);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.music-widget-control:hover {
  background: var(--music-control-hover);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.music-widget-control:focus-visible,
.music-widget-cover:focus-visible,
.music-widget-progress input:focus-visible,
.music-volume-range:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, white 8%);
  outline-offset: 2px;
}

.music-icon {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.music-icon[hidden] {
  display: none !important;
}

.music-widget-volume {
  position: relative;
  display: flex;
  align-items: center;
}

.music-widget-volume-popover {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  width: 118px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 16, 0.92);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.26);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.music-widget-volume.is-open .music-widget-volume-popover,
.music-widget-volume:hover .music-widget-volume-popover,
.music-widget-volume:focus-within .music-widget-volume-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(-4px);
}

.music-widget--block .music-widget-cover {
  width: 68px;
  height: 68px;
}

.music-widget--block .music-widget-cover-bars {
  height: 32px;
}

.music-widget--block .music-widget-cover-bars span {
  width: 7px;
}

.music-widget--block .music-widget-title {
  font-size: 1.08rem;
}

.music-widget--block .music-widget-time {
  font-size: 0.88rem;
}

@media (max-width: 640px) {
  .music-widget--floating {
    right: 12px;
    bottom: 12px;
    width: min(100vw - 24px, 380px);
  }

  .music-widget {
    gap: 10px;
    padding: 12px;
  }

  .music-widget-title {
    font-size: 0.94rem;
  }

  .music-widget-time {
    font-size: 0.76rem;
  }

  .music-widget-copy {
    gap: 8px;
    align-items: flex-start;
    flex-direction: column;
  }
}

@keyframes music-cover-bars {
  0%, 100% {
    transform: scaleY(0.62);
    opacity: 0.72;
  }

  50% {
    transform: scaleY(1.08);
    opacity: 1;
  }
}

/* ── Premium Effects: Reduced Motion ─────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .avatar-effect-glow {
    animation: none;
  }

  .sparkle-dot {
    animation: none;
    display: none;
  }

  .typewriter-cursor {
    animation: none;
    opacity: 1;
  }

  @keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 18px 5px color-mix(in srgb, var(--accent) 55%, transparent); }
  }

  .splash-screen {
    transition: none;
  }
}

@media (max-width: 640px) {
  .splash-style-image {
    padding:
      max(14px, env(safe-area-inset-top, 0px))
      14px
      calc(20px + env(safe-area-inset-bottom, 0px));
    gap: 16px;
  }

  .splash-full-image {
    max-width: 92vw;
    max-height: min(58vh, 500px);
  }

  .splash-style-image .splash-hint {
    width: min(100%, 280px);
    padding: 10px 14px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
  }
}
