/* ==========================================================================
   Profile — white cloud glass (iOS 26 inspired)
   ========================================================================== */

@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/bodoni-moda-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/inter/v19/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hjp-Ek-_EeA.woff2) format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/poppins/v21/pxiEyp8kv8JHgFVrJJfedw.woff2) format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/spacegrotesk/v19/VdGPAYm_1EO6L0eCZO6VOvlLqRFz.woff2) format("woff2");
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/geist/v6/m8JVjfNBoA4U2_q5FQ.woff2) format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/ibmplexsans/v19/zYXgKvWU73Gl9_KO6k_z19HHlKWrCQ.woff2) format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/jetbrainsmono/v23/tDbY2o-flEEny0FZhsf21LKX-Zc.woff2) format("woff2");
}

:root {
  --ink: #1c1c1e;
  --ink-soft: rgba(28, 28, 30, 0.62);
  --ink-faint: rgba(28, 28, 30, 0.44);

  --glass: rgba(255, 255, 255, 0.46);
  --glass-strong: rgba(255, 255, 255, 0.7);
  --glass-line: rgba(255, 255, 255, 0.78);

  --accent: #5b6cff;
  --accent-soft: rgba(91, 108, 255, 0.16);

  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 13px;

  --ease-spring: cubic-bezier(0.22, 0.9, 0.28, 1);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);

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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  color: var(--ink);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked {
  overflow: hidden;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Background: video + white cloud haze
   ========================================================================== */

.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #eef1f8;
}

.scene__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(1.02);
  transform: scale(1.015);
}

.scene--fallback .scene__video {
  display: none;
}

.scene__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 52% at 50% 42%, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.08) 68%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(125% 100% at 10% 0%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.15) 46%, rgba(255, 255, 255, 0.08) 72%, rgba(255, 255, 255, 0.12) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(244, 247, 255, 0.15) 60%, rgba(238, 242, 252, 0.2) 100%);
}

.cloud {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, rgba(255, 255, 255, 0.6) 45%, rgba(255, 255, 255, 0) 72%);
  filter: blur(28px);
  opacity: 0.55;
  pointer-events: none;
  will-change: transform;
}

.cloud--1 {
  width: 62vw;
  height: 62vw;
  max-width: 720px;
  max-height: 720px;
  top: -22vw;
  left: -16vw;
  animation: drift-a 26s ease-in-out infinite alternate;
}

.cloud--2 {
  width: 48vw;
  height: 48vw;
  max-width: 560px;
  max-height: 560px;
  bottom: -16vw;
  right: -12vw;
  opacity: 0.38;
  animation: drift-b 32s ease-in-out infinite alternate;
}

.cloud--3 {
  width: 34vw;
  height: 34vw;
  max-width: 400px;
  max-height: 400px;
  top: 42%;
  left: 52%;
  opacity: 0.26;
  animation: drift-c 38s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 5vh, 0) scale(1.12); }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to   { transform: translate3d(-5vw, -6vh, 0) scale(0.95); }
}

@keyframes drift-c {
  from { transform: translate3d(-3vw, 2vh, 0) scale(0.9); }
  to   { transform: translate3d(3vw, -3vh, 0) scale(1.1); }
}

/* ==========================================================================
   Layout
   ========================================================================== */

.page {
  width: 100%;
  max-width: 440px;
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(64px + var(--safe-top)) 22px calc(38px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--page-gap);
  animation: page-in 0.6s var(--ease-out);
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-height: 720px) {
  .page {
    justify-content: flex-start;
  }
}

/* ==========================================================================
   Profile card (rectangle with banner)
   ========================================================================== */

.profile {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background:
    radial-gradient(130% 95% at 16% 0%, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0.22) 54%, rgba(255, 255, 255, 0.05) 100%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.28));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 32px 72px -36px rgba(49, 64, 128, 0.5),
    0 3px 12px -6px rgba(49, 64, 128, 0.12);
  backdrop-filter: blur(34px) saturate(170%) brightness(1.04);
  -webkit-backdrop-filter: blur(34px) saturate(170%) brightness(1.04);
  overflow: visible;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .profile:hover {
    transform: translateY(-3px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 1),
      inset 0 0 0 1px rgba(255, 255, 255, 0.18),
      0 38px 80px -38px rgba(49, 64, 128, 0.56),
      0 4px 14px -6px rgba(49, 64, 128, 0.14);
  }
}

/* Decorative buttons behind profile card */
.profile__decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.decor-btn {
  position: absolute;
  width: 120px;
  height: auto;
  opacity: 0.15;
  filter: drop-shadow(0 4px 12px rgba(8, 13, 30, 0.3));
  animation: decor-float 8s ease-in-out infinite;
  user-select: none;
}

.decor-btn--1 {
  top: -30px;
  left: -20px;
  transform: rotate(-15deg);
  animation-delay: 0s;
}

.decor-btn--2 {
  top: -20px;
  right: -30px;
  transform: rotate(10deg);
  animation-delay: -2s;
}

.decor-btn--3 {
  bottom: -40px;
  left: -25px;
  transform: rotate(-8deg);
  animation-delay: -4s;
}

.decor-btn--4 {
  bottom: -30px;
  right: -20px;
  transform: rotate(12deg);
  animation-delay: -6s;
}

@keyframes decor-float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-8px) rotate(calc(var(--rot, 0deg) + 3deg)); }
}

/* Apply custom rotation via inline style */
.decor-btn--1 { --rot: -15deg; }
.decor-btn--2 { --rot: 10deg; }
.decor-btn--3 { --rot: -8deg; }
.decor-btn--4 { --rot: 12deg; }

/* Separate banner box above profile card */
.profile__banner-box {
  width: 100%;
  margin-bottom: 12px;
}

.profile__banner {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 2;
  border-radius: 25px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.3),
    0 16px 36px -16px rgba(12, 18, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

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

.profile__banner-fade {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 55%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 60%, rgba(255, 255, 255, 0.25) 100%);
  pointer-events: none;
}

/* Avatar + crown */
.profile__avatar {
  position: relative;
  margin-top: -62px;
  z-index: 3;
  --crown-w: clamp(70px, 24vw, 108px);
}

.crown {
  position: absolute;
  top: calc(var(--crown-w) * -0.6);
  left: 50%;
  z-index: 4;
  width: var(--crown-w);
  height: auto;
  transform: translateX(-50%);
  filter:
    drop-shadow(0 7px 13px rgba(8, 13, 30, 0.58))
    drop-shadow(0 1px 2px rgba(8, 13, 30, 0.42));
  animation: crown-dance 8s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
}

.crown img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes crown-dance {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  12.5%    { transform: translateX(-50%) translateY(-2px) rotate(2deg); }
  25%      { transform: translateX(-50%) translateY(-4px) rotate(3deg); }
  37.5%    { transform: translateX(-50%) translateY(-2px) rotate(1deg); }
  50%      { transform: translateX(-50%) translateY(0) rotate(0deg); }
  62.5%    { transform: translateX(-50%) translateY(-2px) rotate(-1deg); }
  75%      { transform: translateX(-50%) translateY(-4px) rotate(-3deg); }
  87.5%    { transform: translateX(-50%) translateY(-2px) rotate(-2deg); }
}

.avatar {
  position: relative;
  width: 116px;
  height: 116px;
  border-radius: 50%;
}

.avatar__aura {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: conic-gradient(
    from 210deg,
    rgba(255, 255, 255, 0.95),
    rgba(196, 216, 255, 0.62),
    rgba(230, 212, 255, 0.5),
    rgba(216, 247, 255, 0.5),
    rgba(255, 255, 255, 0.95)
  );
  filter: blur(9px);
  opacity: 0.78;
  animation: spin 28s linear infinite;
}

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

.avatar__img {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.6);
  border: 3px solid rgba(255, 255, 255, 0.98);
  box-shadow:
    0 0 0 1px rgba(78, 96, 150, 0.08),
    0 24px 42px -18px rgba(32, 46, 96, 0.58),
    0 6px 16px -6px rgba(32, 46, 96, 0.32);
  transition: transform 0.4s var(--ease-spring);
}

.avatar:hover .avatar__img {
  transform: scale(1.035);
}

.profile__body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 22px 36px;
}

.profile__name {
  font-family: "Bodoni Moda", "Bodoni MT", Didot, "Times New Roman", serif;
  font-size: clamp(29px, 7vw, 34px);
  font-weight: 700;
  font-optical-sizing: auto;
  letter-spacing: -0.012em;
  line-height: 1.08;
  text-wrap: balance;
  color: var(--ink);
  background: linear-gradient(
    102deg,
    #17181d 0%,
    #17181d 36%,
    #6d7689 44%,
    #d5dbe7 50%,
    #6d7689 56%,
    #17181d 64%,
    #17181d 100%
  );
  background-size: 250% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    name-in 0.9s var(--ease-out) both,
    name-sheen 8s 1.3s ease-in-out infinite;
}

@keyframes name-in {
  from { opacity: 0; transform: translateY(9px); filter: blur(5px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes name-sheen {
  0%, 16%  { background-position: 0% 50%; }
  55%, 100% { background-position: 100% 50%; }
}

.profile__bio {
  max-width: 36ch;
  margin-top: 6px;
  font-size: clamp(13.5px, 3.5vw, 14.5px);
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: 0.003em;
  line-height: 1.45;
  text-wrap: pretty;
  background: linear-gradient(
    100deg,
    rgba(28, 28, 30, 0.55) 0%,
    rgba(28, 28, 30, 0.55) 40%,
    rgba(28, 28, 30, 0.9) 50%,
    rgba(28, 28, 30, 0.55) 60%,
    rgba(28, 28, 30, 0.55) 100%
  );
  background-size: 260% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    bio-in 0.9s 0.14s var(--ease-out) both,
    bio-sheen 9s 1.6s ease-in-out infinite;
}

@keyframes bio-in {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bio-sheen {
  0%, 18%  { background-position: 0% 50%; }
  60%, 100% { background-position: 100% 50%; }
}

.profile__bio[hidden] {
  display: none;
}

.profile__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 15px;
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 22px -16px rgba(45, 60, 120, 0.45);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: #3f4658;
}

.profile__tag svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #5865f2;
}

/* ==========================================================================
   Social links — bare white brand marks, no boxes
   ========================================================================== */

.links {
  width: 100%;
  display: flex;
  justify-content: center;
}

.links__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.links__row .icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #ffffff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.28s var(--ease-spring), opacity 0.28s var(--ease-out);
  animation: icon-in 0.5s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 55ms + 100ms);
}

@keyframes icon-in {
  from { opacity: 0; transform: translateY(8px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.links__row .icon-btn svg {
  width: 25px;
  height: 25px;
  filter:
    drop-shadow(0 1px 2px rgba(20, 30, 55, 0.55))
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.links__row .icon-btn:hover {
  transform: translateY(-3px) scale(1.08);
  opacity: 0.92;
}

.links__row .icon-btn:active {
  transform: scale(0.94);
}

/* ==========================================================================
   Generic glass icon button (editor + cropper close)
   ========================================================================== */

.icon-btn--close {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.48));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 18px -10px rgba(56, 72, 130, 0.35);
  color: var(--ink-soft);
  transition: background 0.2s, transform 0.2s var(--ease-spring);
}

.icon-btn--close:hover {
  background: rgba(255, 255, 255, 0.92);
}

.icon-btn--close:active {
  transform: scale(0.94);
}

.icon-btn--close::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
}

.icon-btn--close svg {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   Edit trigger
   ========================================================================== */

.edit-fab {
  position: fixed;
  top: calc(14px + var(--safe-top));
  right: 14px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.52));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 10px 26px -12px rgba(56, 72, 130, 0.35);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: transform 0.25s var(--ease-spring), background 0.25s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.edit-fab svg {
  width: 16px;
  height: 16px;
}

.edit-fab:hover {
  transform: translateY(-2px);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.66));
}

.edit-fab:active {
  transform: scale(0.96);
}

/* ==========================================================================
   Mini music player
   ========================================================================== */

.player {
  position: relative;
  z-index: 2;
  width: min(228px, calc(100vw - 64px));
  height: 46px;
  flex-shrink: 0;
  margin-top: 2px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 9px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 16px 34px -20px rgba(37, 50, 96, 0.45);
  backdrop-filter: blur(26px) saturate(180%) brightness(1.04);
  -webkit-backdrop-filter: blur(26px) saturate(180%) brightness(1.04);
  transition: background 0.25s var(--ease-out);
}

.player:focus-within {
  background: rgba(255, 255, 255, 0.46);
}

.player__toggle {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 10px -5px rgba(37, 50, 96, 0.3);
  color: var(--ink);
  transition: transform 0.2s var(--ease-spring), background 0.2s;
}

.player__toggle:hover {
  transform: scale(1.06);
}

.player__toggle:active {
  transform: scale(0.94);
}

.player__toggle::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
}

.player__icon {
  width: 14px;
  height: 14px;
}

.player__icon--play {
  margin-left: 1px;
}

.player__icon--pause {
  display: none;
}

.player.is-playing .player__icon--play {
  display: none;
}

.player.is-playing .player__icon--pause {
  display: block;
}

.player__bars {
  display: inline-flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5px;
  width: 12px;
  height: 11px;
  color: var(--ink-soft);
  opacity: 0.45;
  transition: opacity 0.2s;
}

.player__bars i {
  width: 2.5px;
  height: 100%;
  border-radius: 1px;
  background: currentColor;
  transform-origin: bottom;
  transform: scaleY(0.32);
  animation: eq 1.15s ease-in-out infinite;
  animation-play-state: paused;
}

.player__bars i:nth-child(2) { animation-delay: -0.38s; }
.player__bars i:nth-child(3) { animation-delay: -0.7s; }

.player.is-playing .player__bars {
  opacity: 0.7;
}

.player.is-playing .player__bars i {
  animation-play-state: running;
}

@keyframes eq {
  0%, 100% { transform: scaleY(0.32); }
  50%      { transform: scaleY(1); }
}

.player__seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.player__seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    rgba(28, 28, 30, 0.76) 0%,
    rgba(28, 28, 30, 0.76) var(--seek, 0%),
    rgba(28, 28, 30, 0.14) var(--seek, 0%),
    rgba(28, 28, 30, 0.14) 100%
  );
}

.player__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 30, 60, 0.35);
}

.player__seek::-moz-range-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(28, 28, 30, 0.14);
}

.player__seek::-moz-range-progress {
  height: 3px;
  border-radius: 99px;
  background: rgba(28, 28, 30, 0.76);
}

.player__seek::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: var(--ink);
}

/* ==========================================================================
   Editor sheet
   ========================================================================== */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out), visibility 0.25s;
}

.sheet.is-open {
  visibility: visible;
  opacity: 1;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(38, 46, 70, 0.26);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sheet__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(91svh, 800px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 18px calc(22px + var(--safe-bottom));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-bottom: none;
  background: rgba(250, 251, 255, 0.86);
  backdrop-filter: blur(44px) saturate(180%);
  -webkit-backdrop-filter: blur(44px) saturate(180%);
  box-shadow: 0 -24px 70px -20px rgba(30, 40, 80, 0.35);
  transform: translateY(30px);
  transition: transform 0.32s var(--ease-spring);
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 28, 30, 0.18) transparent;
}

.sheet.is-open .sheet__panel {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .sheet {
    align-items: center;
    padding: 24px;
  }

  .sheet__panel {
    border-radius: var(--radius-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.84);
    padding-bottom: 22px;
    transform: translateY(16px) scale(0.98);
  }

  .sheet.is-open .sheet__panel {
    transform: translateY(0) scale(1);
  }
}

.sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.sheet__title {
  font-family: "Bodoni Moda", "Bodoni MT", Didot, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.sheet__sub {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ==========================================================================
   Form
   ========================================================================== */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field > label,
.links-field > legend {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

input[type="text"],
input[type="url"],
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(28, 28, 30, 0.08);
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.4;
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231c1c1e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

input::placeholder,
textarea::placeholder {
  color: rgba(28, 28, 30, 0.32);
}

input:focus,
textarea:focus,
select:focus {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(91, 108, 255, 0.55);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Media rows */
.media-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.media-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.media-row__thumb {
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 18px -10px rgba(56, 72, 130, 0.45);
}

.media-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-row__thumb--avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.media-row__thumb--banner {
  width: 88px;
  height: 40px;
  border-radius: 9px;
}

.media-row__body {
  flex: 1;
  min-width: 0;
}

.media-row__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.media-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.media-editor__hint {
  font-size: 11.5px;
  color: var(--ink-faint);
  padding-left: 3px;
}

/* Gradient customization fields */
.gradients-field {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.gradients-field > legend {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

.gradient-group {
  margin-bottom: 14px;
}

.gradient-group:last-child {
  margin-bottom: 0;
}

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

.gradient-group__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.gradient-preview {
  width: 60px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(28, 28, 30, 0.08);
  background: var(--preview-gradient, linear-gradient(135deg, #5b6cff, #ff6496));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.gradient-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.gradient-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
  flex: 1;
}

.gradient-control label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

.gradient-control input[type="color"] {
  width: 100%;
  height: 36px;
  border: 1px solid rgba(28, 28, 30, 0.1);
  border-radius: 8px;
  padding: 2px;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.gradient-control input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.gradient-control input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.gradient-control input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 11px;
  padding: 10px 16px;
  min-height: 40px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: rgba(28, 28, 30, 0.06);
  color: var(--ink);
  transition: background 0.2s, transform 0.2s var(--ease-spring), opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: rgba(28, 28, 30, 0.1);
}

.btn:active {
  transform: scale(0.97);
}

.btn--small {
  min-height: 32px;
  padding: 5px 11px;
  border-radius: 9px;
  font-size: 12px;
  background: rgba(28, 28, 30, 0.07);
}

.btn--small:hover {
  background: rgba(28, 28, 30, 0.12);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(28, 28, 30, 0.09);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.82);
}

.btn--primary {
  background: var(--ink);
  color: #ffffff;
  padding: 11px 20px;
}

.btn--primary:hover {
  background: #000000;
}

.btn--add {
  width: 100%;
  padding: 10px;
  min-height: 42px;
  border: 1px dashed rgba(28, 28, 30, 0.18);
  background: transparent;
  color: var(--ink-soft);
}

.btn--add:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(28, 28, 30, 0.3);
}

.btn--add svg {
  width: 15px;
  height: 15px;
}

/* Links editor */
.links-field {
  border: none;
  margin-top: 4px;
}

.links-field > legend {
  margin-bottom: 8px;
}

.link-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.link-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 36px;
  grid-template-areas:
    "label icon remove"
    "url   url  url";
  gap: 7px;
  padding: 9px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.link-edit__label { grid-area: label; }
.link-edit__icon { grid-area: icon; }
.link-edit__url { grid-area: url; }

.link-edit input,
.link-edit select {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 13.5px;
  border-radius: 9px;
}

.link-edit select {
  padding-right: 28px;
  background-position: right 9px center;
}

.link-edit__remove {
  grid-area: remove;
  align-self: start;
  width: 36px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgba(28, 28, 30, 0.4);
  transition: background 0.2s, color 0.2s;
}

.link-edit__remove:hover {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
}

.link-edit__remove svg {
  width: 16px;
  height: 16px;
}

/* Sheet actions */
.sheet__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(28, 28, 30, 0.07);
}

/* ==========================================================================
   Cropper
   ========================================================================== */

.cropper {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.24s var(--ease-out), visibility 0.24s;
}

.cropper.is-open {
  visibility: visible;
  opacity: 1;
}

.cropper__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 38, 62, 0.34);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cropper__panel {
  position: relative;
  width: min(540px, 100%);
  max-height: 92svh;
  overflow-y: auto;
  padding: 18px 16px calc(16px + var(--safe-bottom));
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  background: rgba(250, 251, 255, 0.92);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 0 30px 80px -24px rgba(24, 34, 70, 0.45);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.3s var(--ease-spring);
}

.cropper.is-open .cropper__panel {
  transform: translateY(0) scale(1);
}

.cropper__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.cropper__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.cropper__sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-faint);
}

.cropper__stage {
  position: relative;
  width: min(74vw, 292px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: #cdd5e4;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 12px 30px -14px rgba(30, 40, 80, 0.5);
  touch-action: none;
  cursor: grab;
}

.cropper__stage--banner {
  width: 100%;
  aspect-ratio: 5 / 2;
  border-radius: 14px;
}

.cropper__stage.is-dragging {
  cursor: grabbing;
}

.cropper__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
  opacity: 0.55;
  pointer-events: none;
}

#cropper-image {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  transform-origin: center;
  will-change: transform, width, height;
}

.cropper__zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 0 4px;
  color: var(--ink-soft);
}

.cropper__zoom svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cropper__zoom input {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  width: 100%;
  height: 18px;
  background: transparent;
  cursor: pointer;
}

.cropper__zoom input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(28, 28, 30, 0.14);
}

.cropper__zoom input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(28, 28, 30, 0.12);
  box-shadow: 0 2px 6px rgba(20, 30, 60, 0.25);
}

.cropper__zoom input::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(28, 28, 30, 0.14);
}

.cropper__zoom input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(28, 28, 30, 0.12);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(20, 30, 60, 0.25);
}

.cropper__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(28, 28, 30, 0.07);
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(76px + var(--safe-bottom));
  z-index: 200;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(28, 28, 30, 0.9);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease-spring), opacity 0.3s;
}

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

/* ==========================================================================
   Small screens
   ========================================================================== */

@media (max-width: 380px) {
  .edit-fab {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .edit-fab span {
    display: none;
  }

  .profile {
    padding: 7px;
    border-radius: 29px;
  }

  .profile__banner {
    border-radius: 23px;
  }

  .avatar {
    width: 106px;
    height: 106px;
  }

  .profile__avatar {
    margin-top: -56px;
  }

  .profile__body {
    padding: 13px 22px 64px;
  }

  .profile__name {
    font-size: 28px;
  }

  .links__row {
    gap: 4px;
  }

  .links__row .icon-btn {
    width: 42px;
    height: 42px;
  }

  .links__row .icon-btn svg {
    width: 24px;
    height: 24px;
  }

  .link-edit {
    grid-template-columns: minmax(0, 1fr) 100px 36px;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.links__row .icon-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .page,
  .links__row .icon-btn,
  .cloud,
  .player__bars i {
    animation: none !important;
  }

  .crown {
    animation: crown-dance 12s ease-in-out infinite !important;
  }

  /* Keep a slow, non-moving text sheen - it is a colour effect, not motion. */
  .profile__name {
    animation: name-sheen 14s ease-in-out infinite;
  }

  .profile__bio {
    animation: bio-sheen 16s ease-in-out infinite;
  }

  .avatar__aura {
    animation-duration: 40s !important;
  }

  /* Video keeps playing: it is content, not decoration. */
}

@media (forced-colors: active) {
  .profile__name {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: currentColor;
  }

  .profile__bio {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: currentColor;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .profile,
  .player,
  .sheet__panel,
  .cropper__panel,
  .edit-fab,
  .profile__tag,
  .icon-btn--close {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
