:root {
  --forehead-x: 50%;
  --forehead-y: 28%;
  --forehead-w: 18%;
  --forehead-h: 12%;
  --flash-x: 50%;
  --flash-y: 35%;
  --font-display: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #000;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background-color: #000;
  color: #fff;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background-color 600ms ease 180ms, color 400ms ease 180ms;
}

.fan-page {
  width: 100vw;
  min-height: 100%;
}

.hero {
  display: grid;
  min-height: 100svh;
  place-items: center;
  position: relative;
}

.streamer-stage {
  position: relative;
  width: min(80vw, 80vh, 520px);
  margin: 0;
  aspect-ratio: 1;
}

.streamer-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: min(80vw, 520px);
  max-height: 80vh;
  object-fit: contain;
  filter: brightness(0.15) contrast(1.1) drop-shadow(0 0 2rem rgba(109, 73, 169, 0.18));
  opacity: 0.92;
  transition: filter 700ms ease 100ms, opacity 700ms ease 100ms;
  user-select: none;
}

.forehead-trigger {
  position: absolute;
  top: calc(var(--forehead-y) - (var(--forehead-h) / 2));
  left: calc(var(--forehead-x) - (var(--forehead-w) / 2));
  width: var(--forehead-w);
  height: var(--forehead-h);
  margin: 0;
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}

.forehead-trigger::before {
  position: absolute;
  inset: -45%;
  pointer-events: none;
  content: "";
  background: radial-gradient(
    ellipse,
    rgba(222, 205, 255, 0.24) 0%,
    rgba(184, 147, 247, 0.16) 28%,
    rgba(123, 82, 185, 0.07) 52%,
    transparent 76%
  );
  border-radius: 50%;
  filter: blur(9px);
  mix-blend-mode: screen;
  opacity: 0.62;
  animation: forehead-glow 2.8s ease-in-out infinite;
}

.forehead-trigger:hover::before,
.forehead-trigger:focus-visible::before {
  opacity: 0.78;
}

.forehead-trigger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 5px;
  box-shadow: 0 0 1.25rem rgba(255, 255, 255, 0.75);
}

.forehead-trigger:disabled {
  cursor: default;
}

.hint {
  position: fixed;
  bottom: clamp(1.25rem, 4vh, 2.5rem);
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: opacity 250ms ease;
}

.flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  background: #fff;
  clip-path: circle(0 at var(--flash-x) var(--flash-y));
}

body.activated {
  background-color: #fff;
  color: #181818;
}

body.activated .flash-overlay {
  animation: forehead-flash 2200ms cubic-bezier(0.16, 0.84, 0.25, 1) forwards;
}

body.activated .streamer-image {
  filter: brightness(1) contrast(1);
  opacity: 1;
}

body.activated .hint {
  opacity: 0;
}

body.activated .forehead-trigger::before {
  animation: none;
  opacity: 0;
}

body[data-debug="true"] .forehead-trigger {
  background: rgba(83, 217, 255, 0.28);
  outline: 1px solid rgba(83, 217, 255, 0.95);
}

.after-content {
  background: #fff;
  color: #1a1a1a;
  padding: 0 0 clamp(4.5rem, 12vw, 9rem);
}

.post-flash-hero {
  position: relative;
  display: grid;
  align-content: center;
  min-height: min(78svh, 50rem);
  padding: clamp(6rem, 15vw, 11rem) clamp(1.5rem, 6vw, 4rem) clamp(4.5rem, 10vw, 7rem);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 70% 20%, rgba(185, 146, 255, 0.25), transparent 32%),
    #18141f;
}

.post-flash-hero::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, rgba(24, 20, 31, 0.72) 0%, rgba(24, 20, 31, 0.2) 48%, transparent 74%);
}

.post-flash-hero .message-kicker,
.post-flash-hero h1,
.post-flash-hero__lead,
.message,
.clips {
  width: min(100%, 44rem);
  margin-right: auto;
  margin-left: auto;
}

.post-flash-hero .message-kicker,
.post-flash-hero h1,
.post-flash-hero__lead {
  position: relative;
  z-index: 2;
}

.post-flash-hero h1 {
  max-width: 12ch;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.post-flash-hero__lead {
  max-width: 34rem;
  margin: 2rem 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.9;
}

.post-flash-character {
  position: absolute;
  right: clamp(1rem, 6vw, 7rem);
  bottom: -3rem;
  z-index: 0;
  width: min(42vw, 35rem);
  height: auto;
  max-height: 92%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 1.5rem 2.5rem rgba(0, 0, 0, 0.38));
  user-select: none;
}

.message {
  padding: clamp(4.5rem, 12vw, 8rem) clamp(1.5rem, 6vw, 4rem) 0;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 2;
}

.message-kicker {
  margin: 0 0 1.25rem;
  color: #7c5ab3;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.message h2,
.clips h2 {
  margin: 0 0 2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.message p {
  margin: 0 0 1.25rem;
}

.profile-note {
  color: #68636e;
  font-size: 0.8125rem;
  line-height: 1.75;
}

.clips {
  padding: clamp(5rem, 12vw, 8rem) clamp(1.5rem, 6vw, 4rem) 0;
}

.clips-heading > p:not(.message-kicker) {
  margin: 0;
  color: #68636e;
  line-height: 1.8;
}

.clip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.clip-slot {
  display: grid;
  min-height: 14rem;
  padding: 1.25rem;
  align-content: end;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(145, 100, 219, 0.52), transparent 60%),
    #26212d;
  border-radius: 0.75rem;
  box-shadow: 0 1rem 2.5rem rgba(38, 25, 57, 0.12);
}

.clip-slot__number {
  margin: 0 auto auto 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.clip-slot h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.clip-slot p:not(.clip-slot__number) {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.75rem;
  line-height: 1.6;
}

body.content-ready .after-content {
  animation: content-reveal 550ms ease-out both;
}

body.content-ready .hero {
  display: none;
}

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

@keyframes forehead-flash {
  0% {
    opacity: 0;
    clip-path: circle(0 at var(--flash-x) var(--flash-y));
  }

  8% {
    opacity: 1;
    clip-path: circle(7vmax at var(--flash-x) var(--flash-y));
  }

  38% {
    opacity: 1;
    clip-path: circle(150vmax at var(--flash-x) var(--flash-y));
  }

  70% {
    opacity: 1;
    clip-path: circle(150vmax at var(--flash-x) var(--flash-y));
  }

  100% {
    opacity: 0;
    clip-path: circle(150vmax at var(--flash-x) var(--flash-y));
  }
}

@keyframes forehead-glow {
  0%,
  100% {
    transform: scale(0.92);
  }

  50% {
    transform: scale(1.08);
  }
}

@keyframes content-reveal {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }

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

@media (prefers-reduced-motion: reduce) {
  body,
  .streamer-image,
  .hint {
    transition: none;
  }

  .flash-overlay {
    display: none;
  }

  .forehead-trigger::before {
    animation: none;
  }

  body.content-ready .after-content {
    animation: none;
  }
}

@media (max-width: 480px) {
  .hint {
    bottom: 1.5rem;
    font-size: 0.625rem;
  }

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

  .clip-slot {
    min-height: 10rem;
  }

  .post-flash-hero {
    min-height: 42rem;
  }

  .post-flash-character {
    right: -28vw;
    bottom: -1rem;
    width: min(100vw, 34rem);
    opacity: 0.48;
  }
}
