/* Reset default styles */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100dvh;
  font-family: 'Space Grotesk', sans-serif;
  overflow: hidden; /* Hide overflow to prevent scrolling */
  background-color: black; /* Set background color to black */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

body.devtools-open {
  overflow: hidden;
  background: #000;
}

body.devtools-open > *:not(#devtools-overlay) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

img,
a,
p,
span,
div,
i,
input[type="range"] {
  -webkit-user-drag: none;
}

body.intro-active #video-background {
  filter: grayscale(1) brightness(0.08) contrast(1.55) blur(4.6px) saturate(0.08);
  transform: scale(1.085);
  transition: filter 1.15s ease, transform 1.15s ease;
  animation: vhs-camera-drift 6.5s ease-in-out infinite;
}

body:not(.intro-active) #video-background {
  filter: none;
  transform: scale(1);
  transition: filter 1.15s ease, transform 1.15s ease;
  animation: none;
}

body:not(.intro-active) #myVideo {
  animation: site-video-drift 24s ease-in-out infinite;
  transition: filter 0.45s ease, transform 0.45s ease;
}

/* Define custom cursor */
.custom-cursor {
  cursor: url('./assets/cursor/pointer.png'), auto !important;
}

#site-shell {
  position: relative;
  min-height: 100dvh;
}

#cursor-aura,
#link-flash {
  position: fixed;
  inset: 0 auto auto 0;
  pointer-events: none;
  opacity: 0;
}

#cursor-aura {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(225, 36, 36, 0.8), rgba(156, 10, 10, 0.32) 42%, rgba(0, 0, 0, 0) 72%);
  box-shadow:
    0 0 18px rgba(225, 36, 36, 0.28),
    0 0 42px rgba(122, 8, 8, 0.16);
  mix-blend-mode: screen;
  filter: blur(0.4px);
  transform: translate3d(-50%, -50%, 0) scale(0.9);
  transition: opacity 0.28s ease;
  z-index: 1500;
}

body:not(.intro-active) #cursor-aura {
  opacity: 0.68;
}

#link-flash {
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(180, 20, 20, 0.26), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(130, 0, 0, 0.12));
  mix-blend-mode: screen;
  z-index: 2600;
}

body.is-link-transition #link-flash {
  animation: link-flash 0.2s ease-out forwards;
}

/* Intro overlay */
#intro-overlay {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(96, 12, 12, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.78), rgba(0, 0, 0, 0.94));
  transition: opacity 0.8s ease, visibility 0.8s ease;
  transform-origin: center;
}

#intro-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px,
      transparent 3px
    );
  opacity: 0.36;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: vhs-scanlines 4.6s linear infinite;
}

#intro-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(144, 14, 14, 0.16), transparent 40%),
    radial-gradient(circle at left center, rgba(115, 0, 0, 0.15), transparent 26%),
    radial-gradient(circle at right center, rgba(115, 0, 0, 0.15), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0));
  opacity: 0.46;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: vhs-flicker 0.1s steps(2, end) infinite;
}

#intro-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}

#intro-overlay.is-haunting,
#intro-overlay.is-message,
#intro-overlay.is-possession,
#intro-overlay.is-morphing,
#intro-overlay.is-ready {
  animation: overlay-breathe 7s ease-in-out infinite;
}

#intro-panel {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #f4f7fb;
  overflow: hidden;
}

#intro-panel::before,
#intro-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#intro-panel::before {
  background:
    radial-gradient(circle at center, transparent 26%, rgba(0, 0, 0, 0.56) 72%, rgba(0, 0, 0, 0.9) 100%);
  opacity: 0.95;
}

#intro-panel::after {
  background:
    radial-gradient(circle at center, rgba(122, 0, 0, 0.1), transparent 44%),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.05), transparent 34%);
  mix-blend-mode: screen;
  opacity: 0.32;
  animation: dread-pulse 3.2s ease-in-out infinite;
}

#intro-particles,
#intro-artifacts,
#intro-presence {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

#intro-presence {
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.6s ease;
}

#intro-presence::before,
#intro-presence::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#intro-presence::before {
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.05), transparent 18%),
    radial-gradient(circle at 50% 58%, rgba(12, 0, 0, 0.42), transparent 24%),
    radial-gradient(ellipse at 50% 48%, rgba(0, 0, 0, 0.72) 0 18%, transparent 38%);
  filter: blur(24px);
}

#intro-presence::after {
  background:
    radial-gradient(circle at 50% 44%, rgba(145, 0, 0, 0.18), transparent 12%),
    radial-gradient(circle at 50% 60%, rgba(0, 0, 0, 0.48), transparent 22%);
  filter: blur(42px);
}

.intro-eye {
  position: absolute;
  top: 43%;
  width: 54px;
  height: 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8), rgba(176, 0, 0, 0.54) 34%, rgba(0, 0, 0, 0) 72%);
  box-shadow:
    0 0 18px rgba(125, 0, 0, 0.26),
    0 0 32px rgba(255, 255, 255, 0.06);
  opacity: 0;
  filter: blur(1.2px);
}

.intro-eye--left {
  left: calc(50% - 86px);
}

.intro-eye--right {
  left: calc(50% + 32px);
}

#intro-overlay.is-haunting #intro-presence,
#intro-overlay.is-message #intro-presence,
#intro-overlay.is-morphing #intro-presence {
  opacity: 0.16;
}

#intro-overlay.is-haunting .intro-eye,
#intro-overlay.is-message .intro-eye,
#intro-overlay.is-possession .intro-eye,
#intro-overlay.is-morphing .intro-eye {
  animation: eye-reveal 6.8s ease-in-out infinite;
}

#intro-overlay.is-message .intro-eye,
#intro-overlay.is-possession .intro-eye,
#intro-overlay.is-morphing .intro-eye {
  opacity: 0.18;
}

#intro-flash,
#intro-warnings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#intro-flash {
  position: fixed;
  opacity: 0;
  z-index: 30;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 1), rgba(255, 255, 255, 1) 46%, rgba(255, 255, 255, 0.96) 72%, rgba(255, 255, 255, 0.92) 100%);
  mix-blend-mode: normal;
  box-shadow:
    0 0 120px rgba(255, 255, 255, 1),
    0 0 260px rgba(255, 255, 255, 0.95),
    inset 0 0 80px rgba(255, 255, 255, 1);
}

.intro-warning {
  position: absolute;
  color: rgba(238, 228, 218, 0.74);
  font-size: clamp(0.62rem, 0.82vw, 0.8rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  filter: blur(4px);
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.08),
    2px 0 0 rgba(112, 0, 0, 0.16);
  transition: opacity 1.9s ease, filter 1.9s ease, transform 1.9s ease;
}

.intro-warning--tl {
  top: 22px;
  left: 24px;
  transform: translateY(-12px) rotate(-8deg);
  transform-origin: top left;
}

#intro-artifacts::before,
#intro-artifacts::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#intro-artifacts::before {
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.18) 49%, transparent 51%, transparent 100%);
  opacity: 0.34;
  mix-blend-mode: screen;
  transform: translateY(-120%);
  animation: tracking-roll 3.1s linear infinite;
}

#intro-artifacts::after {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.12) 0.8px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.06) 0.8px, transparent 1px);
  background-size: 18px 18px, 23px 23px;
  background-position: 0 0, 11px 9px;
  opacity: 0.24;
  mix-blend-mode: screen;
  animation: grain-flicker 0.09s steps(2, end) infinite;
}

.intro-particle {
  position: absolute;
  top: -20vh;
  user-select: none;
  will-change: transform, opacity;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.intro-particle--dust {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(242, 238, 232, 0.88);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.34);
  animation-name: dust-fall;
}

.intro-particle--scratch {
  width: 1px;
  height: 72px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.78), transparent);
  opacity: 0.46;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.16);
  animation-name: scratch-fall;
}

.intro-particle--ember {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(116, 0, 0, 0.62);
  box-shadow: 0 0 10px rgba(116, 0, 0, 0.28);
  animation-name: ember-fall;
}

#intro-text {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  color: #ece4da;
  font-size: clamp(3.2rem, 10vw, 7rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transform:
    translate(
      calc(-50% + var(--intro-drift-x)),
      calc(-50% + var(--intro-drift-y))
    )
    skewX(var(--intro-skew-x))
    skewY(var(--intro-skew-y))
    scale(1.48);
  transform-origin: center;
  opacity: 0;
  white-space: nowrap;
  --intro-drift-x: 0px;
  --intro-drift-y: 0px;
  --intro-skew-x: 0deg;
  --intro-skew-y: 0deg;
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.08),
    3px 0 0 rgba(112, 0, 0, 0.18),
    -3px 0 0 rgba(0, 0, 0, 0.28);
  transition:
    opacity 0.52s ease,
    transform 0.52s ease,
    letter-spacing 0.52s ease,
    color 0.52s ease,
    text-shadow 0.52s ease,
    filter 0.52s ease;
}

.intro-char {
  position: relative;
  display: inline-block;
  min-width: 0.58em;
}

.intro-char--space {
  min-width: 0.46em;
}

.intro-char--alert {
  color: #a00a0a;
  text-shadow:
    0 0 12px rgba(180, 10, 10, 0.3),
    2px 0 0 rgba(58, 0, 0, 0.22),
    -2px 0 0 rgba(0, 0, 0, 0.22);
}

#intro-overlay.is-warning .intro-warning {
  opacity: 0.72;
  filter: blur(0.3px);
}

#intro-overlay.is-warning .intro-warning--tl {
  transition-delay: 0s;
  transform: translateY(0) rotate(-8deg);
}

#intro-overlay.is-flashing .intro-warning {
  opacity: 0;
  filter: blur(6px);
  transition: opacity 0.05s linear, filter 0.05s linear;
}

#intro-overlay.is-flashing #intro-flash {
  animation: jump-flash 0.26s linear forwards;
}

#intro-overlay.is-unstable #intro-artifacts::before {
  animation: tracking-roll-fast 0.18s linear infinite;
  opacity: 0.52;
}

#intro-overlay.is-unstable #intro-artifacts::after {
  animation: grain-flicker 0.05s steps(2, end) infinite;
  opacity: 0.34;
}

#intro-overlay.is-unstable #intro-text {
  filter: blur(1.2px);
}

#intro-overlay.is-entering {
  animation: none;
}

#intro-overlay.is-entering #intro-artifacts::before,
#intro-overlay.is-entering #intro-artifacts::after {
  animation:
    grain-flicker 0.035s steps(2, end) infinite,
    tracking-roll-fast 0.08s linear infinite;
  opacity: 0.68;
}

#intro-overlay.is-entering #intro-text {
  animation: intro-collapse 0.62s cubic-bezier(0.16, 0.84, 0.12, 1) forwards;
}

#intro-overlay.is-entering #intro-panel {
  animation: entry-tear 0.62s steps(3, end) forwards;
}

#intro-overlay.is-entering #intro-flash {
  animation: enter-flash 0.42s ease-out forwards;
}

#intro-overlay.is-entering::after {
  animation: entry-red-hit 0.62s ease-out forwards;
}

#intro-overlay.is-haunting #intro-text {
  opacity: 1;
  animation:
    horror-title-in 3.4s cubic-bezier(0.16, 0.72, 0.2, 1) forwards,
    horror-glitch 2.2s steps(1, end) infinite;
}

#intro-overlay.is-haunting #intro-panel {
  animation: horror-wobble 3.4s linear forwards;
}

#intro-overlay.is-haunting::after {
  animation: horror-strobe 3.4s ease-out forwards;
}

#intro-overlay.is-message #intro-text,
#intro-overlay.is-morphing #intro-text {
  opacity: 1;
  transform:
    translate(
      calc(-50% + var(--intro-drift-x)),
      calc(-50% + var(--intro-drift-y))
    )
    skewX(var(--intro-skew-x))
    skewY(var(--intro-skew-y))
    scale(1.02);
  filter: blur(0.4px);
  color: #d8d1c8;
  text-shadow:
    0 0 16px rgba(255, 255, 255, 0.08),
    2px 0 0 rgba(112, 0, 0, 0.14),
    -2px 0 0 rgba(0, 0, 0, 0.22);
  animation: text-morph-settle 0.65s ease-out;
}

#intro-overlay.is-possession #intro-text {
  opacity: 1;
  color: #efe3da;
  letter-spacing: 0.24em;
  transform:
    translate(
      calc(-50% + var(--intro-drift-x)),
      calc(-50% + var(--intro-drift-y) - 54px)
    )
    skewX(-7deg)
    skewY(1deg)
    scale(1.08);
  filter: blur(0.8px);
  text-shadow:
    0 0 24px rgba(255, 255, 255, 0.1),
    6px 0 0 rgba(145, 0, 0, 0.28),
    -6px 0 0 rgba(0, 0, 0, 0.34);
  animation:
    possession-drop 0.92s cubic-bezier(0.12, 0.74, 0.18, 1) forwards,
    possession-glitch 0.24s steps(2, end) infinite;
}

#intro-overlay.is-message #intro-text {
  font-size: clamp(3.2rem, 10vw, 7rem);
  letter-spacing: 0.2em;
}

#intro-overlay.is-ready #intro-text {
  opacity: 1;
  color: #ece4da;
  font-size: clamp(3.2rem, 10vw, 7rem);
  letter-spacing: 0.2em;
  transform:
    translate(
      calc(-50% + var(--intro-drift-x)),
      calc(-50% + var(--intro-drift-y))
    )
    skewX(var(--intro-skew-x))
    skewY(var(--intro-skew-y))
    scale(1);
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.08),
    3px 0 0 rgba(112, 0, 0, 0.18),
    -3px 0 0 rgba(0, 0, 0, 0.28);
  animation:
    prompt-breathe 2.4s ease-in-out infinite,
    horror-glitch 8s steps(1, end) infinite;
}

#intro-overlay.is-ready #intro-text:hover {
  filter: brightness(1.18);
  text-shadow:
    0 0 24px rgba(255, 255, 255, 0.14),
    5px 0 0 rgba(145, 0, 0, 0.28),
    -5px 0 0 rgba(0, 0, 0, 0.32);
}

#intro-text.has-cursor::after {
  content: attr(data-cursor);
  margin-left: 0.12em;
  animation: cursor-blink 0.9s steps(1, end) infinite;
}

#intro-overlay.is-hidden #intro-text {
  opacity: 0;
}

@keyframes horror-title-in {
  0% {
    opacity: 0;
    transform:
      translate(
        calc(-50% + var(--intro-drift-x)),
        calc(-50% + var(--intro-drift-y))
      )
      skewX(var(--intro-skew-x))
      skewY(var(--intro-skew-y))
      scale(1.86);
    letter-spacing: 0.28em;
    filter: blur(8px);
  }
  8% {
    opacity: 1;
    filter: blur(1px);
  }
  18% {
    transform:
      translate(
        calc(-50% + var(--intro-drift-x)),
        calc(-50% + var(--intro-drift-y))
      )
      skewX(var(--intro-skew-x))
      skewY(var(--intro-skew-y))
      scale(1.12);
    letter-spacing: 0.24em;
    filter: blur(0);
  }
  36% {
    transform:
      translate(
        calc(-50% + var(--intro-drift-x)),
        calc(-50% + var(--intro-drift-y))
      )
      skewX(var(--intro-skew-x))
      skewY(var(--intro-skew-y))
      scale(1.05);
    letter-spacing: 0.21em;
  }
  58% {
    transform:
      translate(
        calc(-50% + var(--intro-drift-x)),
        calc(-50% + var(--intro-drift-y))
      )
      skewX(var(--intro-skew-x))
      skewY(var(--intro-skew-y))
      scale(1);
    letter-spacing: 0.2em;
  }
  100% {
    opacity: 1;
    transform:
      translate(
        calc(-50% + var(--intro-drift-x)),
        calc(-50% + var(--intro-drift-y))
      )
      skewX(var(--intro-skew-x))
      skewY(var(--intro-skew-y))
      scale(0.98);
    letter-spacing: 0.2em;
    filter: blur(0);
  }
}

@keyframes horror-wobble {
  0%, 100% {
    transform: translate(0, 0);
  }
  8% {
    transform: translate(-3px, 2px);
  }
  16% {
    transform: translate(5px, -2px);
  }
  26% {
    transform: translate(-8px, 3px);
  }
  34% {
    transform: translate(6px, 1px);
  }
  48% {
    transform: translate(-5px, -2px);
  }
  62% {
    transform: translate(3px, 2px);
  }
}

@keyframes horror-strobe {
  0%, 100% {
    opacity: 0.26;
  }
  14% {
    opacity: 0.48;
  }
  18% {
    opacity: 0.1;
  }
  22% {
    opacity: 0.44;
  }
  36% {
    opacity: 0.14;
  }
}

@keyframes prompt-breathe {
  0%, 100% {
    opacity: 0.76;
    filter: brightness(0.92);
    text-shadow:
      0 0 18px rgba(255, 255, 255, 0.08),
      3px 0 0 rgba(112, 0, 0, 0.16),
      -3px 0 0 rgba(0, 0, 0, 0.26);
  }
  50% {
    opacity: 1;
    filter: brightness(1.08);
    text-shadow:
      0 0 22px rgba(255, 255, 255, 0.12),
      4px 0 0 rgba(140, 0, 0, 0.22),
      -4px 0 0 rgba(0, 0, 0, 0.3);
  }
}

@keyframes overlay-breathe {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.012);
  }
}

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

@keyframes vhs-camera-drift {
  0%, 100% {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(1.1) translate3d(0.6%, -0.5%, 0);
  }
}

@keyframes vhs-scanlines {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(22px);
  }
}

@keyframes tracking-roll {
  0% {
    transform: translateY(-120%);
    opacity: 0;
  }
  10% {
    opacity: 0.2;
  }
  18% {
    opacity: 0;
  }
  100% {
    transform: translateY(140%);
    opacity: 0;
  }
}

@keyframes tracking-roll-fast {
  0% {
    transform: translateY(-120%);
  }
  100% {
    transform: translateY(160%);
  }
}

@keyframes grain-flicker {
  0%, 100% {
    opacity: 0.11;
  }
  35% {
    opacity: 0.2;
  }
  55% {
    opacity: 0.06;
  }
  80% {
    opacity: 0.18;
  }
}

@keyframes dread-pulse {
  0%, 100% {
    opacity: 0.26;
    transform: scale(1);
  }
  50% {
    opacity: 0.42;
    transform: scale(1.02);
  }
}

@keyframes eye-reveal {
  0%, 100% {
    opacity: 0;
    transform: scaleX(0.72) translateY(2px);
    filter: blur(2px);
  }
  18% {
    opacity: 0.08;
    transform: scaleX(0.88) translateY(1px);
    filter: blur(1.5px);
  }
  26% {
    opacity: 0.22;
    transform: scaleX(1) translateY(0);
    filter: blur(1px);
  }
  34% {
    opacity: 0.04;
    transform: scaleX(0.8) translateY(2px);
    filter: blur(1.8px);
  }
  62% {
    opacity: 0.16;
    transform: scaleX(0.94) translateY(0);
    filter: blur(1.2px);
  }
  70% {
    opacity: 0;
    transform: scaleX(0.7) translateY(2px);
    filter: blur(2px);
  }
}

@keyframes dust-fall {
  0% {
    transform: translate3d(0, -18vh, 0) scale(0.7);
    opacity: 0;
  }
  12% {
    opacity: 0.48;
  }
  100% {
    transform: translate3d(12px, 132vh, 0) scale(1.05);
    opacity: 0;
  }
}

@keyframes scratch-fall {
  0% {
    transform: translate3d(0, -22vh, 0) rotate(8deg);
    opacity: 0;
  }
  14% {
    opacity: 0.24;
  }
  100% {
    transform: translate3d(-14px, 126vh, 0) rotate(-10deg);
    opacity: 0;
  }
}

@keyframes ember-fall {
  0% {
    transform: translate3d(0, -18vh, 0) scale(0.7);
    opacity: 0;
  }
  12% {
    opacity: 0.52;
  }
  100% {
    transform: translate3d(-6px, 128vh, 0) scale(1.1);
    opacity: 0;
  }
}

@keyframes horror-glitch {
  0%, 100% {
    text-shadow:
      0 0 18px rgba(255, 255, 255, 0.08),
      3px 0 0 rgba(112, 0, 0, 0.18),
      -3px 0 0 rgba(0, 0, 0, 0.28);
  }
  12% {
    text-shadow:
      0 0 12px rgba(255, 255, 255, 0.05),
      6px 0 0 rgba(112, 0, 0, 0.24),
      -6px 0 0 rgba(0, 0, 0, 0.26);
  }
  14% {
    text-shadow:
      0 0 18px rgba(255, 255, 255, 0.08),
      -4px 0 0 rgba(112, 0, 0, 0.18),
      4px 0 0 rgba(0, 0, 0, 0.22);
  }
  52% {
    text-shadow:
      0 0 14px rgba(255, 255, 255, 0.05),
      2px 0 0 rgba(112, 0, 0, 0.22),
      -2px 0 0 rgba(0, 0, 0, 0.3);
  }
}

@keyframes text-morph-settle {
  0% {
    opacity: 0.7;
    filter: blur(1.4px);
    transform:
      translate(
        calc(-50% + var(--intro-drift-x)),
        calc(-50% + var(--intro-drift-y))
      )
      skewX(var(--intro-skew-x))
      skewY(var(--intro-skew-y))
      scale(1.06);
  }
  100% {
    opacity: 1;
    filter: blur(0.4px);
    transform:
      translate(
        calc(-50% + var(--intro-drift-x)),
        calc(-50% + var(--intro-drift-y))
      )
      skewX(var(--intro-skew-x))
      skewY(var(--intro-skew-y))
      scale(1.02);
  }
}

@keyframes possession-drop {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform:
      translate(
        calc(-50% + var(--intro-drift-x)),
        calc(-50% + var(--intro-drift-y) - 132px)
      )
      skewX(-16deg)
      skewY(3deg)
      scale(1.2);
  }
  16% {
    opacity: 1;
    filter: blur(2.2px);
  }
  42% {
    filter: blur(0.6px);
    transform:
      translate(
        calc(-50% + var(--intro-drift-x) + 8px),
        calc(-50% + var(--intro-drift-y) - 24px)
      )
      skewX(10deg)
      skewY(-2deg)
      scale(1.04);
  }
  64% {
    transform:
      translate(
        calc(-50% + var(--intro-drift-x) - 7px),
        calc(-50% + var(--intro-drift-y) + 8px)
      )
      skewX(-7deg)
      skewY(1deg)
      scale(1.02);
  }
  100% {
    opacity: 1;
    filter: blur(0.7px);
    transform:
      translate(
        calc(-50% + var(--intro-drift-x)),
        calc(-50% + var(--intro-drift-y))
      )
      skewX(-3deg)
      skewY(0deg)
      scale(1);
  }
}

@keyframes possession-glitch {
  0%, 100% {
    text-shadow:
      0 0 24px rgba(255, 255, 255, 0.1),
      6px 0 0 rgba(145, 0, 0, 0.28),
      -6px 0 0 rgba(0, 0, 0, 0.34);
  }
  22% {
    text-shadow:
      0 0 18px rgba(255, 255, 255, 0.05),
      10px 0 0 rgba(165, 0, 0, 0.3),
      -10px 0 0 rgba(0, 0, 0, 0.36);
  }
  48% {
    text-shadow:
      0 0 16px rgba(255, 255, 255, 0.04),
      -7px 0 0 rgba(145, 0, 0, 0.26),
      7px 0 0 rgba(0, 0, 0, 0.28);
  }
  64% {
    text-shadow:
      0 0 28px rgba(255, 255, 255, 0.12),
      3px 0 0 rgba(180, 10, 10, 0.34),
      -3px 0 0 rgba(0, 0, 0, 0.38);
  }
}

@keyframes jump-flash {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  42% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes intro-collapse {
  0% {
    opacity: 1;
    transform:
      translate(
        calc(-50% + var(--intro-drift-x)),
        calc(-50% + var(--intro-drift-y))
      )
      skewX(var(--intro-skew-x))
      skewY(var(--intro-skew-y))
      scale(1);
  }
  22% {
    opacity: 1;
    transform:
      translate(
        calc(-50% + var(--intro-drift-x) + 18px),
        calc(-50% + var(--intro-drift-y) - 6px)
      )
      skewX(18deg)
      skewY(-6deg)
      scale(1.06);
  }
  52% {
    opacity: 1;
    transform:
      translate(
        calc(-50% + var(--intro-drift-x) - 26px),
        calc(-50% + var(--intro-drift-y) + 10px)
      )
      skewX(-24deg)
      skewY(8deg)
      scale(0.9);
  }
  100% {
    opacity: 0;
    transform:
      translate(
        calc(-50% + var(--intro-drift-x) + 34px),
        calc(-50% + var(--intro-drift-y) - 18px)
      )
      skewX(32deg)
      skewY(-10deg)
      scale(0.58);
  }
}

@keyframes entry-tear {
  0% {
    opacity: 1;
    transform: translateX(0);
    filter: none;
  }
  24% {
    opacity: 1;
    transform: translateX(18px) translateY(-6px);
    filter: blur(1px);
  }
  52% {
    opacity: 1;
    transform: translateX(-22px) translateY(8px);
    filter: blur(2px);
  }
  100% {
    opacity: 0;
    transform: translateX(26px) translateY(-10px);
    filter: blur(3px);
  }
}

@keyframes enter-flash {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 0.95;
  }
  28% {
    opacity: 0;
  }
  42% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
  }
}

@keyframes entry-red-hit {
  0% {
    opacity: 0.46;
  }
  18% {
    opacity: 0.82;
  }
  100% {
    opacity: 0;
  }
}

@media screen and (max-width: 600px) {
  #intro-panel {
    width: 100%;
  }

  #intro-text {
    letter-spacing: 0.12em;
  }
}

/* Video background styles */
#video-background {
  position: fixed; /* Fixed position to cover the entire viewport */
  top: 0;
  left: 0;
  width: 100vw; /* 100% of viewport width */
  height: 100dvh; /* 100% of viewport height */
  z-index: 0;
  overflow: hidden;
}

/* Scan lines effect */
#video-background::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 2px);
  z-index: 1;
  pointer-events: none;
}

/* Video styles */
#myVideo {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cover the entire viewport while maintaining aspect ratio */
  z-index: 0; /* Behind other content */
  pointer-events: none;
}

#myVideo.is-video-spiking {
  filter: blur(1.8px) brightness(0.78) contrast(1.18);
  transform: scale(1.032);
}

/* Positioning classes */
.top-left {
  top: 0;
  left: 0;
}

.top-right {
  top: 0;
  right: 0;
}

.bottom-left {
  bottom: 0;
  left: 0;
}

.bottom-right {
  bottom: 0;
  right: 0;
}

/* Blurred box styles */
#blurred-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 72px));
  min-height: 214px;
  background:
    linear-gradient(180deg, rgba(22, 22, 22, 0.16), rgba(8, 8, 8, 0.08)),
    rgba(255, 255, 255, 0.01);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999;
  display: none;
  padding: 18px 20px 17px;
  text-align: left;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

body:not(.intro-active) #blurred-box {
  display: block !important;
}

/* Blurred box hover effect */
#blurred-box:hover {
  background:
    linear-gradient(180deg, rgba(40, 10, 10, 0.18), rgba(8, 8, 8, 0.1)),
    rgba(255, 255, 255, 0.02);
  border-color: rgba(168, 18, 18, 0.18);
  box-shadow:
    0 22px 62px rgba(0, 0, 0, 0.26),
    0 0 26px rgba(115, 8, 8, 0.08);
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}

.avatar-shell {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
}

#profile-picture {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 7px rgba(255, 255, 255, 0.018),
    0 10px 28px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.identity-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

#username {
  margin: 0;
  color: #f3f1ed;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.38rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 0.96;
  text-wrap: balance;
}

.identity-subtitle {
  margin: 0;
  color: rgba(234, 229, 223, 0.64);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
}

.identity-subtitle.is-haunted {
  color: rgba(220, 42, 42, 0.9);
  text-shadow:
    0 0 16px rgba(180, 10, 10, 0.2),
    4px 0 0 rgba(120, 0, 0, 0.16);
  transform: translateX(2px);
}

.profile-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(238, 232, 226, 0.74);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-stat i {
  color: rgba(12, 12, 12, 0.92);
  font-size: 0.76rem;
}

#viewer-count {
  color: #f4eee8;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  min-width: 12px;
}

.profile-stat__label {
  color: rgba(234, 229, 223, 0.56);
}

.viewer-loading {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(244, 238, 232, 0.22);
  border-top-color: rgba(209, 18, 18, 0.9);
  animation: viewer-loading-spin 0.7s linear infinite;
}

#avatar-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  display: none;
}

/* Links styles */
.links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  z-index: 1001;
}

.links a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  text-decoration: none;
  transition:
    color 0.24s ease,
    transform 0.24s ease,
    text-shadow 0.24s ease;
}

.links a::before,
.links a::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  white-space: nowrap;
}

.links a::before {
  content: attr(data-label);
  bottom: calc(100% + 10px);
  color: rgba(247, 239, 232, 0.92);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.links a::after {
  content: attr(data-note);
  top: calc(100% + 8px);
  color: rgba(217, 209, 201, 0.54);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Link hover effect */
.links a:hover {
  color: #d11212;
  transform: translateY(-2px);
  text-shadow: 0 0 16px rgba(209, 18, 18, 0.32);
}

.links a:hover::before,
.links a:hover::after,
.links a:focus-visible::before,
.links a:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.links a i {
  font-size: 22px;
}

/* Hover styles for links */
.links a:hover {
  text-decoration: none;
}

/* User Description styles */
.user-description {
  display: flex;
  justify-content: center;
}

.user-description p {
  margin: 0;
  width: min(100%, 396px);
  padding: 10px 14px;
  color: rgba(246, 241, 235, 0.92);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.92rem, 1.38vw, 1.12rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease,
    opacity 0.35s ease,
    filter 0.35s ease;
}

.quote-glitch-word {
  position: relative;
  display: inline-block;
  transition:
    color 0.12s ease,
    text-shadow 0.12s ease,
    transform 0.12s ease,
    filter 0.12s ease;
}

.quote-glitch-word.is-glitching {
  color: #fff2ea;
  filter: blur(0.7px);
  transform: translateX(2px) skewX(-10deg);
  text-shadow:
    4px 0 0 rgba(186, 24, 24, 0.52),
    -4px 0 0 rgba(255, 255, 255, 0.16),
    0 0 20px rgba(186, 24, 24, 0.34);
}

#user-description.is-quote-shifting {
  opacity: 0.56;
  filter: blur(1.4px);
  transform: translateY(4px);
}

/* User description hover effect */
.user-description:hover p {
  background: linear-gradient(180deg, rgba(130, 18, 18, 0.1), rgba(255, 255, 255, 0.03));
  border-color: rgba(186, 24, 24, 0.16);
  transform: translateY(-2px);
}

#music-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(18px);
  width: min(810px, calc(100vw - 44px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 80px;
  padding: 0 18px 0 0;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(24, 24, 24, 0.28), rgba(5, 5, 5, 0.14)),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

body:not(.intro-active) #music-dock {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

#music-dock:hover {
  border-color: rgba(186, 24, 24, 0.14);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.24),
    0 0 22px rgba(130, 18, 18, 0.08);
}

.music-dock__media {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 16px;
  min-width: 0;
  flex: 0 1 266px;
}

.music-cover {
  width: 78px;
  height: auto;
  margin: -1px 0 -1px -1px;
  align-self: stretch;
  border-radius: 17px 0 0 17px;
  overflow: hidden;
  flex: 0 0 auto;
  box-shadow: none;
  pointer-events: auto;
  transform-style: preserve-3d;
  transform: perspective(500px) rotateX(0deg) rotateY(0deg) scale(1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  will-change: transform;
}

.music-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
  transition: transform 0.22s ease, filter 0.22s ease;
}

.music-cover.is-tilting {
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(125, 0, 0, 0.12);
}

.music-cover.is-tilting img {
  transform: scale(1.04);
  filter: saturate(1.04);
}

.music-meta {
  min-width: 0;
  flex: 1 1 auto;
  padding-block: 10px;
  max-width: 170px;
}

.music-label,
#music-title,
#music-source {
  margin: 0;
}

.music-label {
  color: rgba(229, 223, 216, 0.56);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

#music-title {
  color: #f4f0ea;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

#music-source {
  color: rgba(229, 223, 216, 0.62);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  max-width: 100%;
}

#devtools-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

body.devtools-open #devtools-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.devtools-panel {
  width: min(470px, calc(100vw - 32px));
  padding: 24px 26px;
  border-radius: 20px;
  text-align: center;
  background: rgba(14, 14, 14, 0.86);
  border: 1px solid rgba(186, 24, 24, 0.18);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.devtools-kicker,
.devtools-panel h2,
.devtools-panel p {
  margin: 0;
}

.devtools-kicker {
  color: rgba(240, 224, 214, 0.58);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.devtools-icon {
  display: block;
  margin: 14px 0 12px;
  color: #d11818;
  font-size: 2.4rem;
}

.devtools-panel h2 {
  margin-top: 0;
  color: #f3ece4;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1;
}

.devtools-panel p:last-child {
  margin-top: 12px;
  color: rgba(236, 228, 220, 0.72);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.music-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 38px;
  flex: 0 0 108px;
  justify-content: center;
  min-width: 108px;
}

.music-visualizer span {
  width: 5px;
  height: 100%;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 248, 240, 0.96) 0%, rgba(255, 133, 133, 0.9) 28%, rgba(176, 18, 18, 0.88) 72%, rgba(98, 0, 0, 0.92) 100%);
  box-shadow:
    0 0 16px rgba(176, 18, 18, 0.2),
    0 0 3px rgba(255, 255, 255, 0.14);
  transform-origin: bottom center;
  transform: scaleY(var(--bar-scale, 0.24));
  opacity: 0.82;
  animation: music-bar 1.35s cubic-bezier(0.32, 0, 0.2, 1) infinite;
}

.music-visualizer span:nth-child(1) { animation-delay: 0s; }
.music-visualizer span:nth-child(2) { animation-delay: 0.12s; }
.music-visualizer span:nth-child(3) { animation-delay: 0.24s; }
.music-visualizer span:nth-child(4) { animation-delay: 0.36s; }
.music-visualizer span:nth-child(5) { animation-delay: 0.18s; }
.music-visualizer span:nth-child(6) { animation-delay: 0.44s; }
.music-visualizer span:nth-child(7) { animation-delay: 0.28s; }
.music-visualizer span:nth-child(8) { animation-delay: 0.52s; }

.music-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(244, 240, 234, 0.84);
  flex: 0 0 auto;
}

.music-volume i {
  color: #d11212;
  font-size: 1.08rem;
}

#music-volume-slider {
  width: min(150px, 20vw);
  accent-color: #c91111;
}

#music-volume-value {
  min-width: 36px;
  color: rgba(229, 223, 216, 0.76);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes music-bar {
  0%, 100% {
    opacity: 0.4;
    box-shadow:
      0 0 12px rgba(176, 18, 18, 0.14),
      0 0 2px rgba(255, 255, 255, 0.1);
  }
  18% {
    opacity: 0.76;
  }
  48% {
    opacity: 1;
    box-shadow:
      0 0 18px rgba(176, 18, 18, 0.24),
      0 0 4px rgba(255, 255, 255, 0.14);
  }
  72% {
    opacity: 0.86;
  }
}

@keyframes site-video-drift {
  0%, 100% {
    transform: scale(1.01) translate3d(0, 0, 0);
  }
  35% {
    transform: scale(1.04) translate3d(0.7%, -0.4%, 0);
  }
  62% {
    transform: scale(1.028) translate3d(-0.4%, 0.35%, 0);
  }
}

@keyframes link-flash {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0.78;
  }
  100% {
    opacity: 0;
  }
}

@keyframes viewer-loading-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media screen and (max-width: 720px) {
  #blurred-box {
    top: calc(50% - 34px);
    width: min(92vw, 400px);
    min-height: auto;
    padding: 16px 14px 14px;
    border-radius: 18px;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 14px;
    margin-bottom: 12px;
  }

  .identity-block {
    align-items: center;
  }

  .identity-subtitle {
    letter-spacing: 0.2em;
    text-align: center;
  }

  .profile-stats {
    justify-content: center;
  }

  .links {
    gap: 18px;
    margin-top: 12px;
  }

  #music-dock {
    flex-direction: column;
    align-items: stretch;
    width: min(94vw, 420px);
    gap: 12px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
    min-height: 0;
  }

  .music-dock__media {
    gap: 12px;
    flex: 1 1 auto;
  }

  .music-meta {
    max-width: none;
    padding-block: 0;
  }

  .music-visualizer {
    order: 3;
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    height: 30px;
  }

  .music-volume {
    justify-content: space-between;
    gap: 12px;
  }

  #music-volume-slider {
    width: 100%;
  }
}

@media screen and (max-width: 480px) {
  #cursor-aura {
    display: none;
  }

  #intro-overlay {
    padding: 14px;
  }

  #intro-text,
  #intro-overlay.is-message #intro-text,
  #intro-overlay.is-possession #intro-text,
  #intro-overlay.is-ready #intro-text {
    font-size: clamp(2.1rem, 14vw, 3.9rem);
    letter-spacing: 0.12em;
  }

  .intro-warning--tl {
    top: 14px;
    left: 14px;
    font-size: 0.56rem;
  }

  #blurred-box {
    top: calc(50% - 52px);
    width: min(92vw, 348px);
    padding: 14px 12px 13px;
    border-radius: 16px;
  }

  .avatar-shell,
  #profile-picture {
    width: 62px;
    height: 62px;
  }

  #avatar-frame {
    width: 80px;
    height: 80px;
  }

  #username {
    font-size: clamp(1.32rem, 8vw, 1.8rem);
  }

  .identity-subtitle {
    font-size: 0.56rem;
    letter-spacing: 0.16em;
  }

  .profile-stat {
    font-size: 0.62rem;
    gap: 6px;
  }

  .profile-stat i {
    font-size: 0.7rem;
  }

  .user-description p {
    width: 100%;
    padding: 10px 11px 12px;
    font-size: 0.9rem;
    line-height: 1.28;
  }

  .music-dock__media {
    gap: 10px;
  }

  .music-cover {
    width: 54px;
    height: 54px;
    align-self: auto;
    margin: 0;
    border-radius: 12px;
  }

  .music-label {
    font-size: 0.58rem;
    letter-spacing: 0.16em;
  }

  #music-title {
    font-size: 0.8rem;
  }

  #music-source {
    font-size: 0.64rem;
    line-height: 1.3;
    white-space: normal;
  }

  .music-visualizer {
    height: 26px;
  }

  .music-visualizer span {
    width: 4px;
  }

  .music-volume {
    gap: 10px;
  }

  .music-volume i {
    font-size: 0.96rem;
  }

  #music-volume-value {
    min-width: 32px;
    font-size: 0.62rem;
    text-align: right;
  }

  .devtools-panel {
    width: min(100%, calc(100vw - 24px));
    padding: 22px 18px 20px;
    border-radius: 18px;
  }

  .links a::before,
  .links a::after {
    display: none;
  }

  .devtools-icon {
    margin: 12px 0 10px;
    font-size: 2rem;
  }

  .devtools-panel p:last-child {
    font-size: 0.74rem;
    line-height: 1.45;
  }
}

@media screen and (max-width: 480px) and (max-height: 760px) {
  #blurred-box {
    top: calc(50% - 68px);
  }

  #music-dock {
    bottom: max(6px, env(safe-area-inset-bottom, 0px));
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .music-visualizer {
    height: 22px;
  }
}
