@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600&display=swap");

:root {
  --page-bg: #f8f3f2;
  --surface: rgba(255, 253, 251, 0.88);
  --surface-solid: #fffdfb;
  --surface-muted: #f1e9e8;
  --line: rgba(76, 60, 64, 0.12);
  --line-strong: rgba(76, 60, 64, 0.22);
  --ink: #30292b;
  --ink-muted: #74686b;
  --ink-faint: #a19396;
  --accent: #b85f78;
  --accent-soft: #efd1d9;
  --accent-wash: rgba(210, 123, 147, 0.13);
  --sidebar-width: 258px;
  --rail-width: 62px;
  --layout-nav-width: var(--rail-width);
  --layout-gutter: clamp(20px, 6vw, 96px);
  --hero-gutter: 30px;
  --hero-control: rgba(255, 253, 251, 0.74);
  --hero-control-hover: rgba(255, 253, 251, 0.96);
  --hero-control-line: rgba(62, 48, 52, 0.16);
  --shadow: 0 24px 70px rgba(92, 55, 65, 0.12);
}

[data-theme="dark"] {
  --page-bg: #111218;
  --surface: rgba(27, 28, 37, 0.86);
  --surface-solid: #1b1c25;
  --surface-muted: #23242f;
  --line: rgba(226, 226, 238, 0.1);
  --line-strong: rgba(226, 226, 238, 0.2);
  --ink: #eeeef4;
  --ink-muted: #aaa9b8;
  --ink-faint: #777685;
  --accent: #aebdff;
  --accent-soft: #343a58;
  --accent-wash: rgba(130, 148, 230, 0.12);
  --hero-control: rgba(19, 20, 28, 0.62);
  --hero-control-hover: rgba(27, 28, 39, 0.9);
  --hero-control-line: rgba(235, 235, 245, 0.18);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

html { scroll-behavior: smooth; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  background: var(--page-bg);
  color: var(--ink);
  overflow-x: hidden;
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.sidebar-open {
  --layout-nav-width: var(--sidebar-width);
}
button, input { font: inherit; }
.page-shell {
  position: relative;
  width: 100%;
  background:
    url("../concepts/water-underlay-repeat-v1.png"),
    radial-gradient(ellipse at 82% 12%, rgba(239, 196, 207, 0.18), transparent 30%),
    radial-gradient(ellipse at 10% 55%, rgba(244, 210, 205, 0.2), transparent 28%),
    linear-gradient(
      to bottom,
      #f8eeef 0%,
      #fbf1ee 38%,
      #f9e4df 72%,
      #fffaf7 100%
    );
  background-size:
    min(1080px, 125vw) auto,
    100% 100%,
    100% 100%,
    100% 100%;
  background-repeat:
    repeat,
    no-repeat,
    no-repeat,
    no-repeat;
  background-blend-mode:
    soft-light,
    normal,
    normal,
    normal;
}

.hero {
  position: relative;
  min-height: min(100svh, 940px);
  height: max(720px, 100svh);
  overflow: hidden;
  isolation: isolate;
  background: #f8eeef;
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../concepts/watercolor-door-hero-bg-clean-v1.png");
  background-repeat: no-repeat;
  background-position: left top;
  background-size: auto 100%;
  transition: filter 0.8s ease;
}
.hero-art {
  position: absolute;
  z-index: 0;
  max-width: none;
  object-position: center center;
  user-select: none;
  pointer-events: none;
  transition: filter 0.8s ease, opacity 0.8s ease;
}
[data-theme="dark"] .hero-art {
  filter: brightness(0.3) saturate(0.72) hue-rotate(18deg) contrast(1.08);
}
[data-theme="dark"] .hero-backdrop {
  filter: brightness(0.3) saturate(0.72) hue-rotate(18deg) contrast(1.08);
}
[data-theme="dark"] .hero { background: #111218; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 32%),
    linear-gradient(to bottom, transparent 62%, rgba(255, 250, 247, 0.2) 78%, rgba(253, 241, 238, 0.64) 100%),
    linear-gradient(90deg, rgba(255,253,251,0.2), transparent 44%);
  transition: background 0.8s ease;
}
[data-theme="dark"] .hero::after {
  background:
    radial-gradient(circle at 76% 17%, rgba(218,225,255,0.16), transparent 14%),
    linear-gradient(180deg, rgba(7,9,19,0.08), rgba(8,10,22,0.45));
}

#rippleCanvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.door-reflection {
  position: absolute;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.42;
  mix-blend-mode: multiply;
  filter: saturate(0.82) blur(0.35px);
  transform:
    translate3d(var(--reflection-drift-x, 0px), var(--reflection-drift-y, 0px), 0)
    scaleY(0.86);
  transform-origin: top center;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.42) 56%, transparent 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.42) 56%, transparent 100%);
}
.door-reflection img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform: scaleY(-1);
  transform-origin: center;
}
[data-theme="dark"] .door-reflection {
  opacity: 0.2;
  mix-blend-mode: screen;
  filter: brightness(0.7) saturate(0.7) hue-rotate(175deg) blur(0.35px);
}

.nav-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 38;
  width: 62px;
  padding: 16px 7px;
  border-right: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  transition: opacity 0.2s ease, transform 0.28s ease;
}
body.sidebar-open .nav-rail {
  opacity: 0;
  transform: translateX(-12px);
  pointer-events: none;
}
.rail-logo.is-dissolving svg { opacity: 0; transform: scale(0.72); }
.rail-logo svg { transition: opacity 0.14s ease, transform 0.18s ease; }
.logo-particle {
  position: fixed;
  z-index: 60;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  animation: logoParticle 0.46s cubic-bezier(.18,.7,.28,1) forwards;
}
.rail-button {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: var(--accent);
  background: transparent;
  display: grid;
  place-items: center;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.rail-button:hover,
.rail-button:focus-visible {
  color: var(--accent);
  background: rgba(218, 104, 150, 0.12);
  outline: none;
}
.rail-button:active { transform: scale(0.94); }
.rail-button::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 8px;
  color: #fff;
  background: rgba(24, 22, 24, 0.92);
  box-shadow: 0 8px 24px rgba(35, 22, 28, 0.16);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.7rem;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translate(4px, -50%);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.rail-button:hover::after,
.rail-button:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}
.rail-logo {
  color: var(--accent);
  margin-bottom: 1px;
}
[data-theme="dark"] .nav-rail {
  border-right-color: transparent;
}
[data-theme="dark"] .rail-button {
  color: #91a8ef;
}
[data-theme="dark"] .rail-button:hover,
[data-theme="dark"] .rail-button:focus-visible {
  color: #adc0ff;
  background: rgba(111, 137, 226, 0.12);
}

.hero-copy {
  position: absolute;
  z-index: 5;
  top: clamp(145px, 16vh, 205px);
  left: clamp(78px, 8vw, 140px);
  width: auto;
  opacity: 0;
  cursor: pointer;
  transition:
    left 0.34s cubic-bezier(.22,.78,.25,1),
    width 0.34s cubic-bezier(.22,.78,.25,1);
}
.hero-copy-dust {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.copy-glyph-shard {
  position: absolute;
  display: block;
  line-height: var(--line-height, 1);
  white-space: pre;
  opacity: 1;
  transform-origin: 50% 58%;
}
.copy-glyph-shard::before,
.copy-glyph-shard::after {
  content: attr(data-chip);
  position: absolute;
  inset: 0;
  color: inherit;
  opacity: 0;
  clip-path: polygon(0 0, 100% 0, 65% 52%, 0 62%);
}
.copy-glyph-shard::after {
  clip-path: polygon(38% 48%, 100% 34%, 100% 100%, 0 100%);
}
.hero-copy-dust i {
  position: absolute;
  width: var(--size, 3px);
  height: var(--trail, 18px);
  border-radius: 999px;
  background:
    repeating-linear-gradient(to bottom, rgba(55, 48, 50, 0.58) 0 1px, transparent 1px 4px),
    linear-gradient(to bottom, rgba(55, 48, 50, 0.62), rgba(55, 48, 50, 0.18) 62%, transparent);
  box-shadow: 0 0 6px rgba(55, 48, 50, 0.12);
  opacity: 0;
}
.hero-copy-dust i::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 28px;
  height: 8px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse, rgba(255, 255, 255, 0.46) 0 18%, rgba(181, 88, 123, 0.18) 44%, transparent 70%);
  opacity: 0;
  transform: translateX(-50%) scale(0.3, 0.4);
}
.hero-copy-dust.is-powdering .copy-glyph-shard {
  animation: copyGlyphShatter 2.35s var(--delay, 0.05s) cubic-bezier(.18,.62,.22,1) forwards;
}
.hero-copy-dust.is-powdering .copy-glyph-shard.is-door-char {
  transform-origin: 82% 92%;
  animation: copyDoorGlyphDrop 3.05s 1.12s cubic-bezier(.2,.72,.18,1) forwards;
}
.hero-copy-dust.is-powdering .copy-glyph-shard::before {
  animation: copyGlyphChip 2.35s var(--delay, 0.05s) ease-out forwards;
}
.hero-copy-dust.is-powdering .copy-glyph-shard::after {
  animation: copyGlyphChipAlt 2.35s var(--delay, 0.05s) ease-out forwards;
}
.hero-copy-dust.is-powdering i {
  animation: copyDustFall 2.35s var(--delay, 0.16s) cubic-bezier(.18,.62,.22,1) forwards;
}
.hero-copy-dust.is-powdering i::before {
  animation: copyDustRipple 2.35s var(--delay, 0.16s) ease-out forwards;
}
.hero-copy-dust i.is-pink {
  background:
    repeating-linear-gradient(to bottom, rgba(181, 88, 123, 0.7) 0 1px, transparent 1px 4px),
    linear-gradient(to bottom, rgba(181, 88, 123, 0.76), rgba(181, 88, 123, 0.22) 62%, transparent);
  box-shadow: 0 0 7px rgba(181, 88, 123, 0.16);
}
.hero-copy-dust i.is-ink:nth-child(4n) {
  background:
    repeating-linear-gradient(to bottom, rgba(55, 48, 50, 0.4) 0 1px, transparent 1px 5px),
    linear-gradient(to bottom, rgba(55, 48, 50, 0.44), rgba(55, 48, 50, 0.14) 62%, transparent);
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 19px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: rgba(80, 68, 72, 0.58);
  font-size: calc(0.66rem * var(--hero-copy-ratio, 1));
  letter-spacing: 0.18em;
  text-transform: uppercase;
  width: max-content;
  max-width: none;
  translate: 0 var(--eyebrow-lift, 0px);
  transition: translate 0.22s ease;
}
.hero-eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: rgba(181, 88, 123, 0.74);
}
.hero-copy h1 {
  width: max-content;
  max-width: none;
  font-size: var(--hero-title-size, clamp(3.05rem, 6.15vw, 6.55rem));
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.hero-copy h1 .title-line {
  display: block;
  width: max-content;
  white-space: nowrap;
}
.hero-copy h1 .title-line-accent {
  margin-top: 0.08em;
  color: rgba(181, 88, 123, 0.88);
  font-style: italic;
}
.hero-copy p {
  max-width: 420px;
  margin-top: 24px;
  color: rgba(75, 65, 68, 0.68);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: calc(0.86rem * var(--hero-copy-ratio, 1));
  line-height: 1.95;
  letter-spacing: 0.025em;
}
.hero[data-layout="stacked"] .hero-copy p {
  max-width: 100%;
}
.hero[data-layout="stacked"] .hero-art {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.24) 54px, #000 150px);
  mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.24) 54px, #000 150px);
}
.hero-action {
  position: absolute;
  z-index: 8;
  left: var(--hero-action-left, 92px);
  top: var(--hero-action-top, auto);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 124px;
  height: 112px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(55, 48, 50, 0.74);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: calc(0.78rem * var(--hero-copy-ratio, 1));
  letter-spacing: 0.1em;
  cursor: pointer;
  transform: translateX(-50%);
  overflow: visible;
  transition:
    left 1.45s cubic-bezier(.32,.02,.24,1),
    top 1.45s cubic-bezier(.32,.02,.24,1),
    transform 0.2s ease,
    color 0.22s ease;
}
.action-feather {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  width: 76px;
  height: 84px;
  margin-left: -38px;
  transform-origin: 50% 88%;
  pointer-events: none;
  transform: translate(8px, var(--feather-rise-y, 118px)) rotate(14deg) scale(0.42);
  opacity: 0;
}
.hero-action.is-born .action-feather {
  animation:
    featherSurfaceRise 1.45s cubic-bezier(.16,.78,.24,1) forwards,
    featherFloat 4.6s 1.45s ease-in-out infinite;
}
.action-feather::before,
.action-feather::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}
.action-feather::before {
  z-index: 0;
  left: 50%;
  top: 52%;
  width: 106px;
  height: 106px;
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.72) 0 6%, transparent 12%),
    radial-gradient(circle at 67% 36%, rgba(255, 255, 255, 0.48) 0 4%, transparent 10%),
    radial-gradient(circle at 58% 70%, rgba(255, 236, 242, 0.46) 0 5%, transparent 12%),
    radial-gradient(ellipse at 50% 56%, rgba(255, 255, 255, 0.42) 0 18%, rgba(244, 173, 197, 0.2) 42%, transparent 72%);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.45),
    0 0 26px rgba(244, 174, 195, 0.22);
  filter: blur(0.4px);
  transform: translate(-50%, -50%);
  animation: featherBubbleGlow 4.2s ease-in-out infinite;
}
.action-feather::after {
  z-index: 1;
  left: 8px;
  right: 9px;
  top: 6px;
  bottom: 5px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.58) 0 4%, transparent 9%),
    radial-gradient(circle at 72% 78%, rgba(255, 245, 249, 0.44) 0 5%, transparent 12%),
    linear-gradient(125deg, transparent 18%, rgba(255, 255, 255, 0.18) 42%, transparent 62%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
  opacity: 0.74;
  transform: rotate(-4deg);
  animation: featherBubbleSheen 3.6s ease-in-out infinite;
}
.action-feather img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(148, 85, 105, 0.1));
}
.action-particles {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 3;
  width: 150px;
  height: 42px;
  transform: translateX(-50%);
  pointer-events: none;
}
.action-particles i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 248, 246, 0.88);
  box-shadow: 0 0 10px rgba(181, 88, 123, 0.2);
  opacity: 0;
}
.action-particles i:nth-child(1) { --px: -62px; --py: -5px; --sx: -18px; --sy: -22px; }
.action-particles i:nth-child(2) { --px: -44px; --py: 10px; --sx: -8px; --sy: -15px; width: 4px; height: 4px; }
.action-particles i:nth-child(3) { --px: -26px; --py: -10px; --sx: 6px; --sy: -24px; }
.action-particles i:nth-child(4) { --px: -8px; --py: 7px; --sx: 18px; --sy: -12px; width: 6px; height: 6px; }
.action-particles i:nth-child(5) { --px: 12px; --py: -8px; --sx: 26px; --sy: -24px; }
.action-particles i:nth-child(6) { --px: 30px; --py: 9px; --sx: 34px; --sy: -14px; width: 4px; height: 4px; }
.action-particles i:nth-child(7) { --px: 50px; --py: -4px; --sx: 42px; --sy: -20px; }
.action-particles i:nth-child(8) { --px: 66px; --py: 8px; --sx: 52px; --sy: -10px; width: 4px; height: 4px; }
.action-particles i:nth-child(9) { --px: -2px; --py: -18px; --sx: 12px; --sy: -30px; width: 3px; height: 3px; }
.action-particles i:nth-child(10) { --px: 2px; --py: 18px; --sx: 24px; --sy: -8px; width: 6px; height: 6px; }
.hero-action:hover {
  color: rgba(42, 36, 39, 0.82);
  transform: translateX(-50%) translateY(1px);
}
.hero-action:active {
  transform: translateX(-50%) translateY(3px);
}
.hero-action.is-born:not(.is-drifting):not(.is-entering) {
  animation: featherWander 18s 1.45s ease-in-out infinite;
  will-change: transform;
}
.hero-action.is-drifting {
  left: var(--hero-action-door-left, var(--hero-action-left, 50%));
  top: var(--hero-action-door-top, var(--hero-action-top, auto));
  transition:
    left 1.45s cubic-bezier(.32,.02,.24,1),
    top 1.45s cubic-bezier(.32,.02,.24,1),
    transform 0.2s ease,
    color 0.22s ease;
}
.hero-action.is-drifting .action-feather {
  animation: featherDoorHover 3.8s ease-in-out infinite;
  opacity: 1;
}
.hero-action.is-entering {
  pointer-events: none;
}
.hero-action.is-entering .action-feather {
  animation: featherSink 0.9s ease-in forwards;
}
.hero-action.is-entering .action-feather::before,
.hero-action.is-entering .action-feather::after {
  animation: featherBubbleSink 0.9s ease-out forwards;
}
.hero-action.is-entering .action-particles i {
  animation: featherParticle 1.1s ease-out forwards;
}
.hero-action.is-born:not(.is-drifting):not(.is-entering) .action-particles i {
  animation: featherParticleRise 1.3s calc(var(--particle-delay, 0s)) ease-out forwards;
}
[data-theme="dark"] .hero-eyebrow {
  color: rgba(220, 221, 235, 0.55);
}
[data-theme="dark"] .hero-eyebrow::before {
  background: rgba(185, 141, 196, 0.56);
}
[data-theme="dark"] .hero-copy h1 .title-line-accent {
  color: rgba(196, 132, 168, 0.86);
}
[data-theme="dark"] .hero-copy p {
  color: rgba(220, 221, 235, 0.6);
}
[data-theme="dark"] .hero-action {
  color: rgba(220, 221, 235, 0.72);
}

.door-face,
.door-hotspot {
  position: absolute;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 4px;
  opacity: 1;
  transform-origin: center bottom;
  transform:
    perspective(900px)
    translate3d(var(--door-x, 0), var(--door-y, 0), 0)
    rotateX(var(--door-rx, 0deg))
    rotateY(var(--door-ry, 0deg));
  will-change: transform;
}
.door-face {
  z-index: 6;
  pointer-events: none;
}
.door-hotspot {
  z-index: 7;
}
.door-hotspot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
}
.door-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 5px;
  pointer-events: none;
  transform-origin: 50% 88%;
  will-change: transform, filter;
}
.door-visual-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.door-visual-layer img {
  position: absolute;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  user-select: none;
  pointer-events: none;
}
.door-core {
  inset: var(--door-pad-y, 18px) var(--door-pad-x, 18px);
  border-radius: 3px;
  transform-origin: 100% 52%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, filter;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 4px, #000 calc(100% - 4px), transparent),
    linear-gradient(to bottom, transparent, #000 5px, #000 calc(100% - 5px), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 4px, #000 calc(100% - 4px), transparent),
    linear-gradient(to bottom, transparent, #000 5px, #000 calc(100% - 5px), transparent);
  mask-composite: intersect;
}
[data-theme="dark"] .door-visual {
  filter: brightness(0.3) saturate(0.72) hue-rotate(18deg) contrast(1.08);
}
.door-face.door-pressed .door-visual {
  animation: doorPress 0.62s cubic-bezier(.18,.82,.24,1);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 42;
  width: min(var(--sidebar-width), calc(100vw - 18px));
  padding: 12px 10px 10px;
  border-right: 1px solid rgba(120, 88, 98, 0.08);
  background: rgba(255, 247, 247, 0.62);
  box-shadow: 12px 0 38px rgba(49, 35, 39, 0.06);
  backdrop-filter: blur(8px) saturate(1.04);
  -webkit-backdrop-filter: blur(8px) saturate(1.04);
  transform: translateX(-102%);
  transition: transform 0.34s cubic-bezier(.22,.78,.25,1);
  display: flex;
  flex-direction: column;
}
body.sidebar-open .sidebar { transform: none; }
.sidebar-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}
.sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.24s 0.12s ease, transform 0.3s 0.1s ease;
}
body.sidebar-open .sidebar-title { opacity: 1; transform: none; }
.sidebar-actions { display: flex; align-items: center; gap: 0; }
.sidebar-icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
  color: var(--accent);
  background: transparent;
  display: grid;
  place-items: center;
  transition: color 0.18s ease, background 0.18s ease;
}
.sidebar-icon-button:hover { color: var(--accent); background: var(--accent-wash); }
.sidebar-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding-top: 18px;
}
.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 2px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.sidebar-group { margin-bottom: 22px; }
.sidebar-group-title {
  padding: 0 10px 7px;
  color: var(--ink-faint);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.68rem;
}
.sidebar-link {
  min-height: 42px;
  padding: 10px;
  border-radius: 11px;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.78rem;
}
.sidebar-link {
  text-shadow: 0 1px 5px rgba(255, 253, 251, 0.82);
}
.sidebar-link:hover { background: rgba(255, 245, 247, 0.38); }
.sidebar-link-arrow { color: var(--ink-faint); }
.sidebar-empty {
  display: none;
  padding: 28px 12px;
  color: var(--ink-faint);
  text-align: center;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.74rem;
}
.sidebar-foot {
  padding-top: 8px;
  border-top: 1px solid rgba(116, 84, 94, 0.09);
  background: linear-gradient(to top, rgba(255, 249, 248, 0.18), transparent);
}
.sidebar-toolbox {
  display: flex;
  justify-content: flex-end;
  padding: 0 4px 12px;
  border-bottom: 1px solid rgba(116, 84, 94, 0.07);
}
.sidebar-settings {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-height: 40px;
  padding: 0;
}
.sidebar-setting {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  color: var(--accent);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.sidebar-setting svg,
.sidebar-setting span {
  display: block;
  flex: 0 0 auto;
}
.sidebar-setting span {
  width: 18px;
  height: 18px;
}
.sidebar-setting span svg { width: 18px; height: 18px; }
.sidebar-setting:hover { color: var(--accent); background: var(--accent-wash); }
[data-theme="dark"] .sidebar {
  background: rgba(13, 16, 28, 0.64);
  box-shadow: 12px 0 38px rgba(0, 0, 0, 0.14);
}
[data-theme="dark"] .sidebar-link {
  text-shadow: 0 1px 5px rgba(8, 10, 20, 0.78);
}
[data-theme="dark"] .sidebar-link:hover {
  background: rgba(82, 101, 174, 0.2);
}
[data-theme="dark"] .sidebar-title,
[data-theme="dark"] .sidebar-icon-button,
[data-theme="dark"] .sidebar-setting {
  color: #91a8ef;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  padding: clamp(72px, 10vh, 112px) 20px 24px;
  background: rgba(54, 45, 49, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.search-overlay.open { opacity: 1; pointer-events: auto; }
.search-dialog {
  width: min(760px, calc(100vw - 40px));
  max-height: min(680px, calc(100vh - 120px));
  margin: 0 auto;
  border: 1px solid rgba(115, 82, 93, 0.12);
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface-solid) 97%, transparent);
  box-shadow: 0 28px 90px rgba(67, 43, 51, 0.2);
  overflow: hidden;
  transform: translateY(-10px) scale(0.985);
  transition: transform 0.24s cubic-bezier(.2,.75,.25,1);
}
.search-overlay.open .search-dialog { transform: none; }
.search-box {
  height: 76px;
  padding: 0 18px 0 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--accent);
}
.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
}
.search-box input::placeholder { color: var(--ink-faint); }
.search-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  color: var(--ink-faint);
  background: transparent;
  font-size: 1.45rem;
}
.search-close:hover { color: var(--accent); background: var(--accent-wash); }
.search-results {
  max-height: calc(min(680px, 100vh - 120px) - 77px);
  padding: 12px;
  overflow-y: auto;
}
.search-result {
  padding: 13px 14px;
  border-radius: 15px;
  color: var(--ink);
  text-decoration: none;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.search-result:hover { background: var(--accent-wash); }
.search-result-icon { color: var(--accent); display: grid; place-items: center; }
.search-result small { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 0.68rem; }
.search-empty { padding: 42px 18px; color: var(--ink-faint); text-align: center; font-size: 0.78rem; }
[data-theme="dark"] .search-box,
[data-theme="dark"] .search-result-icon { color: #91a8ef; }
.profile-row {
  min-height: 58px;
  padding: 8px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  background: transparent;
}
.profile-row:hover { background: var(--accent-wash); }
.profile-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}
.profile-copy { min-width: 0; flex: 1; }
.profile-name {
  display: block;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.78rem;
}
.profile-bio {
  display: block;
  overflow: hidden;
  color: var(--ink-faint);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.underwater-zone {
  position: relative;
  z-index: 8;
  --seabed-join: clamp(110px, 10vw, 170px);
  --surface-overlap: clamp(36px, 5vw, 72px);
  margin-top: calc(-1 * var(--surface-overlap));
  padding-top: var(--surface-overlap);
  overflow: visible;
  background:
    url("../concepts/water-underlay-repeat-v1.png"),
    linear-gradient(
      to bottom,
      rgba(255, 250, 247, 0.72) 0%,
      rgba(252, 240, 237, 0.68) 38%,
      rgba(255, 247, 244, 0.74) 70%,
      rgba(255, 250, 247, 0.94) 100%
    );
  background-size:
    min(1180px, 128vw) auto,
    100% 100%;
  background-repeat:
    repeat,
    no-repeat;
  background-blend-mode:
    soft-light,
    normal;
  isolation: isolate;
}
.underwater-zone::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-1 * var(--surface-overlap));
  z-index: 1;
  height: calc(var(--surface-overlap) + 52px);
  pointer-events: none;
  background:
    url("../concepts/water-underlay-repeat-v1.png") center top / min(1180px, 128vw) auto repeat,
    linear-gradient(
      to bottom,
      rgba(255, 250, 247, 0) 0%,
      rgba(255, 250, 247, 0.18) 38%,
      rgba(255, 250, 247, 0.46) 72%,
      rgba(255, 250, 247, 0) 100%
    );
  background-blend-mode: soft-light, normal;
  opacity: 0.92;
  filter: blur(0.4px);
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image:
    linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.underwater-zone::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--surface-overlap) - 28px);
  z-index: 1;
  height: 88px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 44%, rgba(255, 250, 247, 0.28), transparent 58%),
    radial-gradient(ellipse at 74% 36%, rgba(252, 235, 233, 0.22), transparent 62%),
    linear-gradient(
      to bottom,
      rgba(255, 250, 247, 0),
      rgba(255, 250, 247, 0.38) 42%,
      rgba(255, 250, 247, 0.18) 68%,
      rgba(255, 250, 247, 0)
    );
  filter: blur(8px);
}

.content {
  position: relative;
  z-index: 2;
  background: transparent;
  padding:
    clamp(30px, 5vw, 68px)
    var(--layout-gutter)
    clamp(38px, 6vw, 86px)
    calc(var(--layout-gutter) + var(--layout-nav-width));
  transition: padding-left 0.34s cubic-bezier(.22,.78,.25,1);
  isolation: isolate;
}
.content::before {
  content: none;
}
.content::after {
  content: none;
}
.content-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  align-items: end;
  gap: clamp(28px, 4vw, 44px);
  margin-bottom: clamp(34px, 5vw, 58px);
}
.section-kicker {
  color: var(--accent);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}
.section-head h2 {
  margin-top: 14px;
  font-size: clamp(2.1rem, 3.6vw, 3.9rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.05em;
}
.section-head p {
  max-width: 540px;
  color: var(--ink-muted);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.84rem;
  line-height: 1.9;
}
.portal-grid {
  --portal-gap: clamp(18px, 2vw, 30px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--portal-gap);
  justify-items: center;
}
.portal-card {
  position: relative;
  container-type: inline-size;
  width: 100%;
  min-height: 0;
  aspect-ratio: 635 / 300;
  --portal-text-left: clamp(32px, 11cqw, 66px);
  --portal-text-right: clamp(84px, 24cqw, 142px);
  padding: clamp(18px, 5.5cqw, 36px) clamp(72px, 18cqw, 120px) clamp(18px, 4.8cqw, 34px) clamp(24px, 8cqw, 56px);
  border: 0;
  border-radius: 0;
  overflow: visible;
  color: var(--ink);
  text-decoration: none;
  background:
    url("../concepts/torn-paper-card-v5.png") center / 100% 100% no-repeat;
  filter:
    drop-shadow(0 2px 3px rgba(92, 62, 66, 0.105))
    drop-shadow(0 15px 18px rgba(86, 56, 63, 0.092));
  transition: transform 0.35s cubic-bezier(.2,.75,.2,1), filter 0.35s ease;
}
.portal-card:nth-child(1) { grid-column: 1; }
.portal-card:nth-child(2) {
  grid-column: 2;
  margin-top: 0;
}
.portal-card:nth-child(3) {
  grid-column: 1 / -1;
  width: calc((100% - var(--portal-gap)) / 2);
  margin-top: 0;
}
.portal-card:hover {
  transform: translateY(-5px) rotate(-0.15deg);
  filter:
    drop-shadow(0 3px 4px rgba(92, 62, 66, 0.12))
    drop-shadow(0 20px 24px rgba(86, 56, 63, 0.12));
}
.portal-card::before {
  content: none;
}
.portal-card::after {
  content: none;
}
.portal-deco {
  position: absolute;
  right: clamp(28px, 10cqw, 78px);
  bottom: clamp(22px, 7cqw, 50px);
  width: clamp(72px, 22cqw, 162px);
  aspect-ratio: 1.22;
  z-index: 1;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.96;
  mix-blend-mode: multiply;
  filter: saturate(1.08) contrast(1.22) brightness(0.94);
}
.portal-card[data-portal-kind="message-bottle"] .portal-deco {
  width: clamp(68px, 20cqw, 142px);
  aspect-ratio: 1.05;
  right: clamp(32px, 10.5cqw, 78px);
  bottom: clamp(24px, 7.4cqw, 52px);
  background-image: url("../concepts/portal-deco-message-bottle.png");
}
.portal-card[data-portal-kind="compass"] .portal-deco {
  width: clamp(76px, 22cqw, 164px);
  aspect-ratio: 1.5;
  right: clamp(34px, 10cqw, 76px);
  bottom: clamp(24px, 7cqw, 50px);
  background-image: url("../concepts/portal-deco-compass.png");
}
.portal-card[data-portal-kind="anchor"] .portal-deco {
  width: clamp(72px, 21cqw, 158px);
  aspect-ratio: 1.42;
  right: clamp(32px, 10cqw, 76px);
  bottom: clamp(24px, 7cqw, 50px);
  background-image: url("../concepts/portal-deco-anchor.png");
}
.portal-index {
  position: absolute;
  top: 16%;
  left: var(--portal-text-left);
  z-index: 2;
  color: var(--ink-faint);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(11px, 2.1cqw, 14px);
  letter-spacing: 0.12em;
  color: var(--accent);
}
.portal-index::after {
  content: "";
  display: block;
  width: clamp(18px, 3.8cqw, 24px);
  height: 1px;
  margin-top: clamp(6px, 1.4cqw, 8px);
  background: rgba(62, 49, 54, 0.42);
}
.portal-card h3 {
  position: absolute;
  top: 36%;
  left: var(--portal-text-left);
  right: var(--portal-text-right);
  z-index: 2;
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(24px, 6cqw, 38px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0;
}
.portal-card p {
  position: absolute;
  top: 60%;
  left: var(--portal-text-left);
  right: var(--portal-text-right);
  z-index: 2;
  max-width: none;
  margin: 0;
  color: var(--ink-muted);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(12.5px, 2.35cqw, 16px);
  line-height: 1.58;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.seabed-scene {
  position: relative;
  z-index: 1;
  --seabed-join: clamp(110px, 10vw, 170px);
  min-height: 0;
  height: clamp(320px, 30vw, 500px);
  margin-top: 0;
  overflow: hidden;
  background: transparent;
  isolation: isolate;
}
.seabed-scene::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 56%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 18%, rgba(255, 250, 247, 0.62), transparent 56%),
    radial-gradient(ellipse at 72% 20%, rgba(252, 234, 230, 0.26), transparent 54%),
    linear-gradient(
      to bottom,
      rgba(255, 250, 247, 0.48) 0%,
      rgba(255, 250, 247, 0.18) 52%,
      rgba(255, 250, 247, 0.03) 86%,
      rgba(255, 250, 247, 0) 100%
    );
  filter: blur(14px);
}
.seabed-scene::after {
  content: none;
}
.seabed-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.88;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.04) 20%, rgba(0,0,0,0.22) 46%, rgba(0,0,0,0.68) 72%, #000 86%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.04) 20%, rgba(0,0,0,0.22) 46%, rgba(0,0,0,0.68) 72%, #000 86%);
}
.seabed-fish-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}
.seabed-fish-path {
  position: absolute;
  width: var(--fish-size);
  aspect-ratio: 21 / 11;
  opacity: var(--fish-opacity, 0.72);
  transform: translate3d(var(--fish-x, 0), var(--fish-y, 0), 0) rotate(var(--fish-rotate, 0deg));
  transition: opacity 0.45s ease;
  will-change: transform, opacity;
}
.seabed-fish-path.is-new {
  animation: fishArrive 0.74s ease both;
}
.seabed-fish-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.9;
  filter: saturate(0.96) contrast(0.98);
  transform: scaleX(var(--fish-facing));
  animation: seabedFishDrift 1.8s ease-in-out infinite alternate;
}
.seabed-prayer {
  position: absolute;
  z-index: 5;
  top: clamp(42px, 7vw, 98px);
  left: 50%;
  width: min(720px, calc(100% - 120px));
  color: rgba(91, 77, 80, 0.4);
  text-align: center;
  transform: translateX(-50%);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(0.7rem, 1vw, 0.82rem);
  line-height: 1.9;
}
.seabed-prayer p + p { margin-top: 2px; }
.fish-god {
  padding: 0 2px;
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.fish-god:hover,
.fish-god:focus-visible {
  color: color-mix(in srgb, var(--accent) 82%, #8f3854);
  outline: none;
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 32%, transparent);
}
.shell-button {
  position: absolute;
  z-index: 5;
  left: var(--shell-left, 30%);
  bottom: var(--shell-bottom, 9.8%);
  width: clamp(126px, 8.8vw, 158px);
  aspect-ratio: 560 / 500;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  transform: translateX(-50%);
  opacity: 0.62;
  filter:
    saturate(0.72)
    contrast(0.92)
    brightness(1.04)
    drop-shadow(0 10px 14px rgba(119, 76, 86, 0.05));
  transition: opacity 0.22s ease, filter 0.22s ease;
  animation: shellRestBreath 5.8s ease-in-out infinite;
}
.shell-button:hover,
.shell-button:focus-visible,
.shell-button[data-shell-state="open"],
.shell-button.is-dragging {
  opacity: 0.95;
  filter:
    saturate(0.96)
    contrast(0.98)
    brightness(1)
    drop-shadow(0 14px 18px rgba(119, 76, 86, 0.08));
}
.shell-button.is-dragging {
  cursor: grabbing;
  animation-play-state: paused;
}
.shell-button.is-resetting {
  animation: shellWiggleHome 1.35s cubic-bezier(.22,.68,.24,1) both;
}
.shell-button.is-idle-wiggle {
  animation: shellIdleWiggle 0.82s cubic-bezier(.2,.76,.24,1) both;
}
.shell-button.is-returning-home {
  animation-play-state: paused;
}
.shell-frame,
.shell-halo,
.pearl-hit-glow,
.pearl-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.shell-frame,
.shell-halo {
  pointer-events: none;
}
.pearl-button {
  z-index: 6;
  inset: 60% 38% 14% 38%;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  opacity: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: none;
  transition: opacity 0.13s ease;
}
.shell-frame {
  z-index: 4;
  object-fit: contain;
  opacity: 1;
  transform: translateZ(0);
  transition: filter 0.18s ease;
}
.pearl-hit-glow {
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 247, 235, 0.42), rgba(222, 145, 170, 0.16) 42%, transparent 70%);
  filter: blur(6px);
  transform: scale(0.78);
  transition: opacity 0.2s ease, transform 0.28s ease;
}
.shell-button[data-shell-state="half"] .pearl-button {
  opacity: 0;
  pointer-events: none;
}
.shell-button[data-shell-state="open"] {
  animation-play-state: paused;
}
.shell-button[data-shell-state="open"] .pearl-button {
  opacity: 1;
  pointer-events: auto;
}
.pearl-button:hover .pearl-hit-glow,
.pearl-button:focus-visible .pearl-hit-glow {
  opacity: 1;
  transform: scale(1.08);
}
.shell-halo {
  inset: 42% 12% 2%;
  width: auto;
  height: auto;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(ellipse, rgba(224, 154, 177, 0.2), transparent 68%);
  filter: blur(14px);
  transform: scale(0.72);
  transition: opacity 0.3s ease, transform 0.48s ease;
}
.shell-button[data-shell-state="open"] .shell-halo {
  opacity: 1;
  transform: scale(1.18);
}
.shell-button::before,
.shell-button::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 54%;
  bottom: 52%;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(190, 104, 128, 0.22);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: shellBubble 6.4s ease-in-out infinite;
}
.shell-button::after {
  left: 60%;
  width: 4px;
  height: 4px;
  animation-delay: 2.6s;
}
.shell-button[data-shell-state="open"]::before,
.shell-button[data-shell-state="open"]::after {
  animation-play-state: paused;
}
.shell-button[data-shell-state="closed"]:hover .shell-frame {
  filter: saturate(1.02) drop-shadow(0 3px 8px rgba(191, 105, 128, 0.09));
}
.shell-button:focus-visible,
.pearl-button:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  outline-offset: 7px;
  border-radius: 50%;
}
.seabed-message {
  position: absolute;
  z-index: 6;
  left: clamp(260px, 24%, 430px);
  bottom: 190px;
  max-width: 220px;
  padding: 8px 12px;
  border: 1px solid rgba(184, 95, 120, 0.1);
  border-radius: 14px;
  color: var(--ink-muted);
  background: rgba(255, 252, 248, 0.58);
  backdrop-filter: blur(5px);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.68rem;
  line-height: 1.55;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.24s ease;
}
.seabed-message.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
[data-theme="dark"] .seabed-art {
  filter: brightness(0.32) saturate(0.68) hue-rotate(18deg) contrast(1.06);
}
[data-theme="dark"] .shell-button {
  filter: brightness(0.68) saturate(0.62) hue-rotate(175deg) drop-shadow(0 12px 18px rgba(0, 0, 0, 0.16));
}
[data-theme="dark"] .seabed-fish-sprite {
  filter: brightness(0.8) saturate(0.72) hue-rotate(175deg);
}
[data-theme="dark"] .seabed-prayer { color: rgba(220, 221, 235, 0.47); }
[data-theme="dark"] .underwater-zone {
  background:
    url("../concepts/water-underlay-repeat-v1.png"),
    linear-gradient(to bottom, #171821 0%, #151720 58%, #171821 100%);
  background-size:
    min(1180px, 128vw) auto,
    100% 100%;
  background-repeat:
    repeat,
    no-repeat;
  background-blend-mode:
    soft-light,
    normal;
}
[data-theme="dark"] .underwater-zone::before {
  background:
    url("../concepts/water-underlay-repeat-v1.png") center top / min(1180px, 128vw) auto repeat,
    linear-gradient(
      to bottom,
      rgba(17, 18, 24, 0) 0%,
      rgba(19, 20, 28, 0.18) 38%,
      rgba(23, 24, 33, 0.52) 72%,
      rgba(23, 24, 33, 0) 100%
    );
  background-blend-mode: soft-light, normal;
}
[data-theme="dark"] .underwater-zone::after {
  background:
    radial-gradient(ellipse at 18% 44%, rgba(23, 24, 33, 0.28), transparent 58%),
    radial-gradient(ellipse at 74% 36%, rgba(33, 34, 46, 0.22), transparent 62%),
    linear-gradient(
      to bottom,
      rgba(23, 24, 33, 0),
      rgba(23, 24, 33, 0.38) 42%,
      rgba(23, 24, 33, 0.18) 68%,
      rgba(23, 24, 33, 0)
    );
}
[data-theme="dark"] .portal-card {
  background:
    linear-gradient(rgba(22, 24, 34, 0.62), rgba(22, 24, 34, 0.62)),
    url("../concepts/torn-paper-card-v5.png") center / 100% 100% no-repeat;
  background-blend-mode: multiply, normal;
  filter:
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.16))
    drop-shadow(0 18px 24px rgba(0, 0, 0, 0.18));
}

@keyframes fishArrive {
  0% { opacity: 0; filter: blur(2px) saturate(0.72); }
  100% { opacity: var(--fish-opacity, 0.82); filter: saturate(0.96) contrast(0.98); }
}
@keyframes seabedFishDrift {
  from { transform: scaleX(var(--fish-facing)) translateY(-2px) rotate(-1.2deg); }
  to { transform: scaleX(var(--fish-facing)) translateY(2px) rotate(1.2deg); }
}
@keyframes shellRestBreath {
  0%, 76%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  82% { transform: translateX(-50%) translateY(-1px) rotate(-0.45deg); }
  88% { transform: translateX(-50%) translateY(0) rotate(0.25deg); }
}
@keyframes shellWiggleHome {
  0% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  18% { transform: translateX(-50%) translateY(-2px) rotate(-2.1deg); }
  36% { transform: translateX(-50%) translateY(1px) rotate(1.6deg); }
  56% { transform: translateX(-50%) translateY(-1px) rotate(-0.95deg); }
  76% { transform: translateX(-50%) translateY(0.5px) rotate(0.45deg); }
  100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
}
@keyframes shellIdleWiggle {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  24% { transform: translateX(-50%) translateY(-1.5px) rotate(-1.4deg); }
  48% { transform: translateX(-50%) translateY(1px) rotate(1.15deg); }
  70% { transform: translateX(-50%) translateY(-0.5px) rotate(-0.55deg); }
}
@keyframes shellBubble {
  0%, 58%, 100% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.7); }
  66% { opacity: 0.58; }
  84% { opacity: 0; transform: translate3d(10px, -34px, 0) scale(1.2); }
}
@keyframes doorPress {
  0% { transform: translate(0, 0) scale(1); filter: brightness(1); }
  16% { transform: translate(-6px, 0) rotate(-0.22deg) scale(1.006); }
  32% { transform: translate(7px, 0) rotate(0.24deg) scale(1.012); filter: brightness(1.03); }
  50% { transform: translate(-5px, 0) rotate(-0.18deg) scale(1.008); }
  68% { transform: translate(4px, 0) rotate(0.14deg) scale(1.004); }
  100% { transform: translate(0, 0) scale(1); filter: brightness(1); }
}
@keyframes featherSurfaceRise {
  0% { opacity: 0; transform: translate(8px, var(--feather-rise-y, 118px)) rotate(14deg) scale(0.42); filter: blur(4px); }
  42% { opacity: 0.82; transform: translate(3px, 44px) rotate(8deg) scale(0.86); filter: blur(1px); }
  100% { opacity: 1; transform: translate(0, -2px) rotate(1deg) scale(1); filter: blur(0); }
}
@keyframes featherFloat {
  0%, 100% { transform: translate(0, -2px) rotate(1deg) scale(1); }
  30% { transform: translate(-12px, -9px) rotate(-5deg) scale(1.018); }
  66% { transform: translate(10px, 7px) rotate(6deg) scale(0.995); }
}
@keyframes featherWander {
  0%, 100% { transform: translateX(-50%) translate(0, 0) rotate(0deg); }
  13% { transform: translateX(-50%) translate(var(--feather-swim-x-a), var(--feather-swim-y-a)) rotate(-1.8deg); }
  29% { transform: translateX(-50%) translate(var(--feather-swim-x-b), var(--feather-swim-y-b)) rotate(2.4deg); }
  45% { transform: translateX(-50%) translate(var(--feather-swim-x-e), var(--feather-swim-y-e)) rotate(-0.8deg); }
  62% { transform: translateX(-50%) translate(var(--feather-swim-x-c), var(--feather-swim-y-c)) rotate(2.8deg); }
  79% { transform: translateX(-50%) translate(var(--feather-swim-x-d), var(--feather-swim-y-d)) rotate(-2.2deg); }
  91% { transform: translateX(-50%) translate(var(--feather-swim-x-f), var(--feather-swim-y-f)) rotate(1.2deg); }
}
@keyframes featherDoorHover {
  0%, 100% { transform: translate(0, -2px) rotate(1deg) scale(1); }
  38% { transform: translate(-5px, -7px) rotate(-2deg) scale(1.01); }
  72% { transform: translate(4px, 3px) rotate(3deg) scale(0.998); }
}
@keyframes featherSink {
  0% { opacity: 1; transform: translate(0, -2px) rotate(1deg) scale(1); filter: blur(0); }
  58% { opacity: 0.72; transform: translate(3px, 44px) rotate(8deg) scale(0.86); filter: blur(1px); }
  100% { opacity: 0; transform: translate(8px, 118px) rotate(14deg) scale(0.42); filter: blur(4px); }
}
@keyframes featherBubbleGlow {
  0%, 100% { opacity: 0.58; transform: translate(-50%, -50%) scale(0.96); filter: blur(0.4px); }
  38% { opacity: 0.78; transform: translate(-50%, -52%) scale(1.03); filter: blur(0.2px); }
  68% { opacity: 0.66; transform: translate(-51%, -48%) scale(0.99); filter: blur(0.7px); }
}
@keyframes featherBubbleSheen {
  0%, 100% { opacity: 0.48; transform: rotate(-6deg) translate(-1px, 0) scale(0.98); }
  45% { opacity: 0.82; transform: rotate(-2deg) translate(2px, -2px) scale(1.03); }
  72% { opacity: 0.56; transform: rotate(-8deg) translate(1px, 1px) scale(1); }
}
@keyframes featherBubbleSink {
  0% { opacity: 0.72; filter: blur(0.4px); }
  58% { opacity: 0.5; filter: blur(1.6px); }
  100% { opacity: 0; filter: blur(5px); }
}
@keyframes featherParticle {
  0% {
    opacity: 0;
    transform: translate(var(--sx), var(--sy)) scale(0.3);
    filter: blur(1.5px);
  }
  24% {
    opacity: 0.95;
    transform: translate(var(--sx), var(--sy)) scale(1.08);
  }
  70% {
    opacity: 0.76;
    transform: translate(var(--px), var(--py)) scale(0.92);
    filter: blur(0.3px);
  }
  100% {
    opacity: 0;
    transform: translate(var(--px), var(--py)) scale(0.18);
    filter: blur(2px);
  }
}
@keyframes featherParticleRise {
  0% {
    opacity: 0;
    transform: translate(var(--px), 18px) scale(0.18);
    filter: blur(2px);
  }
  34% {
    opacity: 0.9;
    transform: translate(var(--sx), var(--sy)) scale(1);
    filter: blur(0.4px);
  }
  100% {
    opacity: 0;
    transform: translate(var(--sx), calc(var(--sy) - 20px)) scale(0.38);
    filter: blur(1.6px);
  }
}
@keyframes copyDustFall {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.45, 0.2);
    filter: none;
  }
  18% {
    opacity: 0.96;
    transform: translate(calc(var(--drift) * 0.08), -3px) scale(1, 0.72);
    filter: none;
  }
  38% {
    opacity: 0.92;
    transform: translate(calc(var(--drift) * 0.28), 10px) scale(0.9, 1.28);
    filter: none;
  }
  72% {
    opacity: 0.66;
    transform: translate(calc(var(--drift) * 0.72), calc(var(--fall) * 0.78)) scale(0.72, 1.65);
    filter: none;
  }
  100% {
    opacity: 0;
    transform: translate(var(--drift), var(--fall)) scale(0.24, 0.18);
    filter: none;
  }
}
@keyframes copyGlyphShatter {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  12% {
    opacity: 0.98;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  32% {
    opacity: 0.86;
    transform: translate(calc(var(--drift) * 0.12), 8px) rotate(-2deg) scale(0.98);
  }
  74% {
    opacity: 0.44;
    transform: translate(calc(var(--drift) * 0.68), calc(var(--fall) * 0.72)) rotate(7deg) scale(0.64, 1.18);
  }
  100% {
    opacity: 0;
    transform: translate(var(--drift), var(--fall)) rotate(13deg) scale(0.18, 0.26);
  }
}
@keyframes copyDoorGlyphDrop {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  10% {
    opacity: 1;
    transform: translate(0, 6px) rotate(168deg) scale(1);
  }
  17% {
    opacity: 1;
    transform: translate(-5px, 20px) rotate(193deg) scale(1);
  }
  24% {
    opacity: 1;
    transform: translate(4px, 32px) rotate(176deg) scale(1);
  }
  30% {
    opacity: 0.96;
    transform: translate(-2px, 44px) rotate(185deg) scale(0.96);
  }
  60% {
    opacity: 0.52;
    transform: translate(calc(var(--drift) * 0.28), calc(var(--fall) * 0.72)) rotate(198deg) scale(0.72, 1.12);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--drift) * 0.55), var(--fall)) rotate(216deg) scale(0.18, 0.28);
  }
}
@keyframes copyGlyphChip {
  0%, 16% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  26% { opacity: 0.74; transform: translate(-2px, -2px) rotate(-4deg); }
  100% { opacity: 0; transform: translate(calc(var(--drift) * -0.36), calc(var(--fall) * 0.86)) rotate(-18deg); }
}
@keyframes copyGlyphChipAlt {
  0%, 18% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  30% { opacity: 0.66; transform: translate(2px, 1px) rotate(5deg); }
  100% { opacity: 0; transform: translate(calc(var(--drift) * 0.38), calc(var(--fall) * 0.82)) rotate(22deg); }
}
@keyframes copyDustRipple {
  0%, 62% {
    opacity: 0;
    transform: translateX(-50%) scale(0.3, 0.4);
  }
  76% {
    opacity: 0.42;
    transform: translateX(-50%) scale(0.9, 0.72);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(1.8, 0.9);
  }
}
@keyframes logoParticle {
  0% { opacity: 0.95; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(0.15); }
}

@media (max-width: 850px) {
  .hero {
    min-height: 760px;
    height: 100svh;
  }
  .hero-art { object-position: 61% center; }
  .hero-copy {
    top: 16%;
    left: 72px;
    width: auto;
  }
  .hero-copy h1 { font-size: var(--hero-title-size, clamp(3rem, 13vw, 5.4rem)); }
  .hero-copy p { max-width: 310px; }
  .content {
    --layout-gutter: 18px;
    padding-right: 18px;
    padding-left: calc(var(--layout-gutter) + var(--layout-nav-width));
  }
  .content-inner {
    width: 100%;
  }
  .section-head {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: clamp(34px, 7vw, 52px);
  }
  .portal-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(18px, 4.8vw, 32px);
  }
  .portal-card:nth-child(n) {
    grid-column: 1;
    width: min(560px, 100%);
    min-height: 0;
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --rail-width: 58px;
    --layout-nav-width: var(--rail-width);
    --hero-gutter: 16px;
  }
  body.sidebar-open {
    --layout-nav-width: var(--rail-width);
  }
  .nav-rail {
    border-right-color: transparent;
  }
  .nav-rail::after {
    content: none;
    position: absolute;
    inset: 0 -10px 0 auto;
    width: 10px;
    pointer-events: none;
    background: linear-gradient(
      to right,
      rgba(113, 76, 89, 0.055),
      rgba(113, 76, 89, 0.018) 48%,
      transparent
    );
  }
  [data-theme="dark"] .nav-rail {
    border-right-color: transparent;
  }
  [data-theme="dark"] .nav-rail::after {
    background: linear-gradient(
      to right,
      rgba(105, 126, 199, 0.07),
      rgba(105, 126, 199, 0.02) 48%,
      transparent
    );
  }
  .hero {
    min-height: 100svh;
  }
  .hero-backdrop {
    background-position: 8% top;
  }
  .hero-copy {
    top: clamp(112px, 14vh, 154px);
    right: 24px;
  }
  .hero-eyebrow {
    max-width: calc(100vw - 104px);
    white-space: nowrap;
  }
  .hero-copy h1 {
    width: max-content;
    max-width: calc(100vw - var(--rail-width) - 42px);
    line-height: 1.08;
    letter-spacing: -0.035em;
    white-space: nowrap;
  }
  .hero-copy h1 .title-line {
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
  }
  .hero-copy p {
    max-width: min(390px, calc(100vw - 112px));
  }
}

@media (max-width: 560px) {
  .nav-rail { width: 58px; padding-inline: 5px; }
  .rail-button { width: 44px; height: 44px; }
  .hero-copy { top: clamp(104px, 12vh, 136px); left: 66px; width: auto; }
  .hero-copy p { font-size: 0.8rem; line-height: 1.75; }
  .hero[data-layout="stacked"] .hero-copy {
    right: 18px;
  }
  .hero[data-layout="stacked"] .hero-eyebrow {
    max-width: 100%;
    margin-bottom: 14px;
    gap: 8px;
    font-size: clamp(0.48rem, 2vw, 0.58rem);
    letter-spacing: 0.1em;
  }
  .hero[data-layout="stacked"] .hero-eyebrow::before { width: 24px; }
  .hero[data-layout="stacked"] .hero-copy h1 {
    line-height: 1.08;
    letter-spacing: -0.025em;
  }
  .hero[data-layout="stacked"] .hero-copy p {
    margin-top: 18px;
    font-size: calc(0.84rem * var(--hero-copy-ratio, 1));
    line-height: 1.78;
  }
  .content {
    --layout-gutter: 16px;
    --seabed-join: 108px;
    padding:
      34px
      16px
      48px
      calc(var(--layout-gutter) + var(--layout-nav-width));
  }
  .portal-card {
    width: 100%;
    min-height: 0;
  }
  .search-overlay { padding: 60px 12px 18px; }
  .search-dialog { width: 100%; border-radius: 22px; }
  .seabed-scene {
    --seabed-join: 108px;
    min-height: 0;
    height: clamp(330px, 62vw, 420px);
    margin-top: 0;
  }
  .seabed-art { object-position: 61% bottom; }
  .seabed-prayer {
    top: 38px;
    bottom: auto;
    width: calc(100% - 96px);
    font-size: 0.7rem;
    line-height: 1.9;
  }
  .shell-button {
    left: var(--shell-left, 30%);
    bottom: var(--shell-bottom, 8%);
    width: 154px;
  }
  .seabed-message {
    left: 50%;
    bottom: 205px;
  }
}

@media (max-width: 760px) and (max-aspect-ratio: 4 / 5) {
  .hero-copy {
    top: 104px;
    left: calc(var(--rail-width) + 18px);
    right: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
