:root {
  --deep: #12101f;
  --ink: #1a1a2e;
  --red: #ff0000;
  --pink: #ff006e;
  --text: #ece8f7;
  --dim: #b3abc9;
  --line: rgba(255, 0, 110, 0.3);
  --line-soft: rgba(255, 0, 110, 0.16);
  --radius: 10px;
  --bar: 78px;
  --serif: "Playfair Display", "Songti SC", Georgia, serif;
  --sans: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: calc(var(--bar) + 2.6rem);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(255, 0, 110, 0.18), transparent 62%),
    radial-gradient(820px 460px at -8% 18%, rgba(255, 0, 0, 0.13), transparent 58%),
    var(--deep);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 0, 110, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 110, 0.075) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 16%, #000 26%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 16%, #000 26%, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px);
  opacity: 0.75;
}

main { position: relative; z-index: 1; }

.wrap {
  width: min(1180px, 100% - 2.2rem);
  margin-inline: auto;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "sheet" "rail";
  gap: 1.8rem;
  padding-top: 0.6rem;
}

.sheet { grid-area: sheet; min-width: 0; }
.rail { grid-area: rail; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 70vh;
  padding: 3.2rem 0 2.4rem;
  overflow: hidden;
}

.hero-ghost {
  position: absolute;
  left: -0.05em;
  top: 4%;
  z-index: 0;
  font-family: var(--serif);
  font-size: clamp(5rem, 24vw, 13rem);
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 0, 110, 0.34);
  pointer-events: none;
  transform: translate3d(0, var(--par, 0px), 0);
  will-change: transform;
}

.hero-copy { position: relative; z-index: 2; min-width: 0; }

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 6.4vw, 3.5rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.85), 0 0 34px rgba(255, 0, 0, 0.55);
  position: relative;
}

.hero-title::before,
.hero-title::after {
  content: attr(data-t);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-title::before {
  color: var(--red);
  transform: translate(-2px, 1px);
  clip-path: inset(0 0 62% 0);
  animation: glitch-a 5.5s steps(2, end) infinite;
  text-shadow: none;
}

.hero-title::after {
  color: var(--pink);
  transform: translate(2px, -1px);
  clip-path: inset(58% 0 0 0);
  animation: glitch-b 6.5s steps(2, end) infinite;
  text-shadow: none;
}

@keyframes glitch-a {
  0%, 88%, 100% { transform: translate(-2px, 1px); opacity: 0.85; }
  90% { transform: translate(-5px, -2px) skewX(-4deg); opacity: 1; }
  94% { transform: translate(4px, 2px) skewX(3deg); }
}

@keyframes glitch-b {
  0%, 86%, 100% { transform: translate(2px, -1px); opacity: 0.85; }
  92% { transform: translate(6px, 2px) skewX(4deg); opacity: 1; }
  96% { transform: translate(-4px, -2px) skewX(-3deg); }
}

.hero-art {
  width: clamp(80px, 17vw, 132px);
  height: auto;
  justify-self: end;
  align-self: center;
  filter: drop-shadow(0 0 14px rgba(255, 0, 110, 0.6));
}

.prose div {
  margin: 0 0 1.15rem;
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.72), rgba(18, 16, 31, 0.55));
  scroll-margin-top: 1.6rem;
}

.prose div:last-child { margin-bottom: 0; }

.prose h2,
.prose h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.5);
}

.prose h2 { font-size: clamp(1.3rem, 3.2vw, 1.75rem); margin: 0.2rem 0 0.6rem; }
.prose h3 { font-size: 1.15rem; margin: 1.4rem 0 0.5rem; }

.prose h2 + hr,
.prose h3 + hr {
  width: 84px;
  height: 2px;
  margin: 0.1rem 0 1.1rem;
  border: 0;
  background: linear-gradient(90deg, var(--red), var(--pink));
  box-shadow: 0 0 12px rgba(255, 0, 110, 0.75);
}

.prose p { margin: 0 0 0.95rem; }
.prose p:last-child { margin-bottom: 0; }

.prose a {
  color: #ffb3cf;
  text-decoration: underline;
  text-decoration-color: rgba(255, 0, 110, 0.6);
  text-underline-offset: 3px;
}

.prose a:hover { color: #fff; }

.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.35rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--pink); }

.prose strong { color: #fff; }

.prose blockquote {
  margin: 1.1rem 0;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 2px solid var(--pink);
  color: var(--dim);
}

.prose img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.prose th, .prose td {
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
.prose th { color: #fff; background: rgba(255, 0, 110, 0.1); }

.rail {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  background: rgba(18, 16, 31, 0.6);
}

.rail h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #ffd0e2;
}

.rail hr {
  width: 46px;
  height: 2px;
  border: 0;
  margin: 0.55rem 0 0.85rem;
  background: var(--pink);
  box-shadow: 0 0 10px rgba(255, 0, 110, 0.8);
}

.rail-list { margin: 0; padding: 0; list-style: none; }

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.3rem 0.55rem;
  border-left: 2px solid transparent;
  color: var(--dim);
  text-decoration: none;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: #fff;
  border-left-color: var(--pink);
  background: rgba(255, 0, 110, 0.12);
}

.site-foot {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
  padding: 2.2rem 1.1rem 1.4rem;
  border-top: 1px solid var(--line);
  background: rgba(13, 12, 24, 0.75);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
  width: min(1180px, 100%);
  margin-inline: auto;
}

.foot-nav dl { margin: 0; }
.foot-nav dt {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.16em;
  color: var(--pink);
  margin-bottom: 0.3rem;
}
.foot-nav dd { margin: 0 0 0.15rem; }
.foot-nav dd + dt { margin-top: 0.9rem; }

.foot-nav a,
.foot-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.15rem 0;
  color: var(--dim);
  text-decoration: none;
}
.foot-nav a:hover, .foot-list a:hover { color: #fff; text-shadow: 0 0 12px rgba(255, 0, 110, 0.8); }

.foot-addr {
  font-style: normal;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.55);
}

.foot-list { margin: 0; padding: 0; list-style: none; }

.foot-copy {
  width: min(1180px, 100%);
  margin: 1.6rem auto 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-soft);
  font-size: 1rem;
  color: var(--dim);
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
  background: rgba(17, 15, 30, 0.94);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
}

.dock-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid var(--pink);
  border-radius: var(--radius);
  color: var(--pink);
  box-shadow: 0 0 14px rgba(255, 0, 110, 0.35) inset;
}

.dock-mark:hover { color: #fff; border-color: var(--red); }

.dock-btn {
  min-height: 44px;
  padding: 0 1rem;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(255, 0, 110, 0.5);
  border-radius: var(--radius);
  cursor: pointer;
}

.dock-btn[aria-expanded="true"] {
  background: rgba(255, 0, 110, 0.18);
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 0, 110, 0.45);
}

.dock-menu {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(100% + 0.5rem);
  max-height: 0;
  padding: 0 0.9rem;
  overflow: hidden;
  background: #15122a;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: max-height 0.26s ease, padding 0.26s ease;
}

.dock.open .dock-menu {
  max-height: min(64vh, 460px);
  padding: 0.5rem 0.9rem 0.9rem;
  overflow-y: auto;
}

.dock-groups { margin: 0; }
.dock-groups dt {
  margin: 0.85rem 0 0.2rem;
  font-family: var(--serif);
  letter-spacing: 0.16em;
  color: var(--pink);
}
.dock-groups dd { margin: 0; }
.dock-groups a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.2rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 0, 110, 0.12);
}
.dock-groups a:hover { color: #fff; text-shadow: 0 0 12px rgba(255, 0, 110, 0.9); }

.dock-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 1.05rem;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--red), var(--pink));
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 20px rgba(255, 0, 110, 0.5);
}

.dock-cta:hover { filter: brightness(1.12); }

:focus-visible { outline: 2px solid #ffd0e2; outline-offset: 2px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (min-width: 760px) {
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
  .dock-menu { left: auto; right: 0.75rem; width: min(400px, 62vw); }
}

@media (min-width: 900px) {
  .stage {
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-areas: "rail sheet";
    gap: 2.4rem;
    align-items: start;
    padding-top: 1.4rem;
  }
  .rail { position: sticky; top: 1.6rem; }
  .prose div { padding: 1.8rem 1.6rem; }
  .dock { padding-left: max(1rem, calc(50vw - 590px)); padding-right: max(1rem, calc(50vw - 590px)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-title::before, .hero-title::after { animation: none; }
  .hero-ghost { transform: none; }
  .dock-menu { transition: none; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
