:root {
  --leather-base: #3d2216;
  --leather-highlight: #5a3825;
  --leather-mid: #4a2e1a;
  --pink: #ff3fa4;
  --teal: #00e5d0;
  --yellow: #ffe44d;
  --violet: #b44dff;
  --mist: #f0e6f6;
  --void: #0d0a12;
  --scroll-intensity: 0;
}

* { box-sizing: border-box; }

html {
  background: var(--leather-base);
  color: var(--mist);
  font-family: "Source Sans 3", Inter, sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--void);
}

.leather-field,
.leather-creases,
.bubble-layer,
.edge-mark {
  position: fixed;
  pointer-events: none;
}

.leather-field {
  inset: 0;
  z-index: 0;
  background:
    repeating-radial-gradient(circle at 0 0, rgba(90, 56, 37, 0.9) 0 1px, transparent 2px 6px),
    radial-gradient(circle at 24% 18%, rgba(90, 56, 37, 0.88), transparent 38%),
    radial-gradient(circle at 80% 68%, #4a2e1a 0%, #3d2216 52%, #0d0a12 120%),
    conic-gradient(from 45deg at 50% 50%, rgba(255, 228, 77, 0.03), rgba(0, 229, 208, 0.02), rgba(255, 63, 164, 0.03), rgba(255, 228, 77, 0.03));
  filter: contrast(1.4) saturate(0.6);
}

.leather-field::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: radial-gradient(circle, #f0e6f6 0 1px, transparent 1px 2px);
  background-size: 2px 2px;
}

.leather-creases {
  inset: 0;
  z-index: 1;
  opacity: 0.19;
  filter: url(#leatherWarp);
  background:
    repeating-linear-gradient(102deg, transparent 0 42px, rgba(13, 10, 18, 0.32) 43px, transparent 46px),
    repeating-linear-gradient(17deg, transparent 0 90px, rgba(240, 230, 246, 0.08) 91px, transparent 94px);
  mix-blend-mode: soft-light;
}

.filter-source { position: absolute; }

.bubble-layer {
  inset: 0;
  z-index: 2;
  overflow: hidden;
}

.bubble {
  --size: 72px;
  --color: #ff3fa4;
  --x: 50vw;
  --delay: 0s;
  --duration: 24s;
  --wobble: 4s;
  position: absolute;
  left: var(--x);
  bottom: calc(var(--size) * -1.4);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--color) 55%, white 15%), rgba(255,255,255,0.05) 30%, transparent 70%);
  box-shadow: inset -4px -4px 12px rgba(0, 0, 0, 0.15), 0 0 20px color-mix(in srgb, var(--color) 35%, transparent);
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.86);
  animation: driftUp var(--duration) linear infinite, wobble var(--wobble) ease-in-out infinite alternate, pulse 2.5s ease-in-out infinite alternate;
  animation-delay: var(--delay), var(--delay), calc(var(--delay) * -0.4);
  will-change: transform, opacity;
  contain: layout style;
}

@keyframes driftUp {
  0% { opacity: 0; transform: translate3d(0, 12vh, 0) scale(0.72); }
  7% { opacity: 0.82; }
  85% { opacity: 0.76; }
  100% { opacity: 0; transform: translate3d(0, -122vh, 0) scale(1.05); }
}

@keyframes wobble {
  from { margin-left: -30px; }
  to { margin-left: 30px; }
}

@keyframes pulse {
  from { filter: saturate(1) blur(0); }
  to { filter: saturate(1.5) blur(1px); }
}

.edge-mark {
  z-index: 5;
  opacity: calc(0.12 + (var(--scroll-intensity) * 0.23));
  mix-blend-mode: screen;
  transition: opacity 180ms linear;
}

.spear-mark {
  left: -24px;
  top: 17vh;
  width: min(19vw, 120px);
  height: 66vh;
  animation: spearIntro 600ms ease-out 200ms both;
}

.spear-fill { fill: url(#spearGradient); opacity: 0.62; }
.spear-edge {
  fill: none;
  stroke: #ff3fa4;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 780;
  stroke-dashoffset: calc(520 - (var(--scroll-intensity) * 520));
}

.shield-mark {
  right: -42px;
  top: 27vh;
  width: min(26vw, 220px);
  height: 48vh;
  animation: shieldIntro 600ms ease-out 400ms both;
}

.shield-shape {
  fill: rgba(0, 229, 208, 0.04);
  stroke: #00e5d0;
  stroke-width: calc(3px + (var(--scroll-intensity) * 8px));
  stroke-dasharray: 620;
  stroke-dashoffset: calc(360 - (var(--scroll-intensity) * 210));
}
.shield-shape.middle { opacity: 0.72; }
.shield-shape.inner { opacity: 0.48; }

@keyframes spearIntro { from { opacity: 0; transform: translateX(-42px); } to { opacity: 1; transform: translateX(0); } }
@keyframes shieldIntro { from { opacity: 0; transform: translateX(42px); } to { opacity: 1; transform: translateX(0); } }

.scroll-stage {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  padding-bottom: 28vh;
}

.opening {
  min-height: 112vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.opening-inner { transform: translateY(-5vh); }

.kanji-title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(4rem, 12vw, 10rem);
  letter-spacing: -0.06em;
  color: #f0e6f6;
  font-variation-settings: "opsz" 144;
  text-shadow: 0 0 60px rgba(255, 63, 164, 0.4), 0 0 120px rgba(0, 229, 208, 0.2), 0 16px 40px #0d0a12;
}

.site-signature,
.sticky-note,
.panel-kicker {
  font-family: "Caveat", cursive;
  font-weight: 700;
}

.site-signature {
  margin: -0.5rem 0 0;
  font-size: 1.2rem;
  color: rgba(255, 228, 77, 0.6);
}

.annotation-zone {
  position: relative;
  height: 42vh;
}

.sticky-note {
  position: sticky;
  top: 45vh;
  width: fit-content;
  margin: 0 auto;
  font-size: clamp(0.875rem, 1.8vw, 1.1rem);
  opacity: 0.6;
  transform: rotate(-3deg);
  text-shadow: 0 0 18px currentColor;
}
.note-pink { color: #ff3fa4; }
.note-yellow { color: #ffe44d; transform: rotate(2deg); }
.note-teal { color: #00e5d0; transform: rotate(-1deg); }
.note-violet { color: #b44dff; transform: rotate(3deg); }

.glass-panel {
  --morph: 0;
  --accent: #ff3fa4;
  width: min(70vw, 980px);
  min-height: 60vh;
  margin: 0 auto 28vh;
  padding: clamp(2rem, 6vw, 5.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  isolation: isolate;
  color: #f0e6f6;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: calc(var(--morph) * 48px);
  background:
    radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 36%),
    rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(calc(16px + (var(--morph) * 16px))) saturate(1.8);
  -webkit-backdrop-filter: blur(calc(16px + (var(--morph) * 16px))) saturate(1.8);
  box-shadow:
    0 0 calc(var(--morph) * 24px) color-mix(in srgb, var(--accent) calc(var(--morph) * 30%), transparent),
    0 28px 80px rgba(13, 10, 18, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.17);
  transition: border-radius 220ms ease, box-shadow 220ms ease, backdrop-filter 220ms ease;
}

.glass-panel::before {
  content: "矛盾";
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  top: clamp(1rem, 4vw, 2rem);
  z-index: -1;
  font-family: "Caveat", cursive;
  font-size: clamp(3rem, 10vw, 8rem);
  color: color-mix(in srgb, var(--accent) 28%, transparent);
  opacity: calc(0.12 + (var(--morph) * 0.22));
  transform: rotate(9deg) scale(calc(0.9 + var(--morph) * 0.18));
}

.glass-panel h2 {
  max-width: 11ch;
  margin: 0 0 1.5rem;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: #f0e6f6;
  font-variation-settings: "opsz" calc(9 + (var(--morph) * 135));
  text-shadow: 0 8px 28px #0d0a12, 0 0 26px color-mix(in srgb, var(--accent) 32%, transparent);
  transition: font-variation-settings 800ms ease;
}

.glass-panel p:not(.panel-kicker) {
  max-width: 38ch;
  margin: 0;
  font-family: "Source Sans 3", Inter, sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.75;
  color: #f0e6f6;
}

.panel-kicker {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: clamp(0.875rem, 1.8vw, 1.1rem);
  text-shadow: 0 0 16px var(--accent);
}

.panel-pink { --accent: #ff3fa4; }
.panel-teal { --accent: #00e5d0; margin-left: 22vw; }
.panel-yellow { --accent: #ffe44d; margin-right: 22vw; }
.panel-violet { --accent: #b44dff; }
.panel-final {
  --accent: #ff3fa4;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 63, 164, 0.34), transparent 32%),
    radial-gradient(circle at 80% 30%, rgba(0, 229, 208, 0.28), transparent 34%),
    radial-gradient(circle at 45% 84%, rgba(255, 228, 77, 0.24), transparent 32%),
    rgba(255, 255, 255, 0.055);
}

@media (max-width: 760px) {
  .glass-panel,
  .panel-teal,
  .panel-yellow {
    width: calc(100vw - 2rem);
    min-height: 68vh;
    margin-left: auto;
    margin-right: auto;
  }
  .edge-mark { opacity: calc(0.08 + (var(--scroll-intensity) * 0.18)); }
}
