@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;500;600;700&display=swap');

:root {
  --ink: #26171f;
  --mag: #ff0080;
  --fux: #ff00ff;
  --text: #f4e8f0;
  --muted: #cbb2c5;
  --line: rgba(236, 214, 232, 0.22);
  --line-soft: rgba(236, 214, 232, 0.14);
  --radius: 18px;
  --serif: "Noto Serif TC", "Songti SC", "Source Han Serif SC", serif;
  --sans: "Noto Sans TC", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.78;
  letter-spacing: 0.012em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -25vmax;
  pointer-events: none;
  background:
    radial-gradient(38% 38% at 22% 26%, rgba(255, 0, 128, 0.60), rgba(255, 0, 128, 0) 62%),
    radial-gradient(34% 34% at 76% 16%, rgba(255, 0, 255, 0.48), rgba(255, 0, 255, 0) 60%),
    radial-gradient(46% 46% at 64% 78%, rgba(255, 0, 128, 0.40), rgba(255, 0, 128, 0) 66%),
    radial-gradient(32% 32% at 12% 84%, rgba(255, 0, 255, 0.34), rgba(255, 0, 255, 0) 68%);
  filter: blur(28px) hue-rotate(0deg);
  animation: aurora 26s ease-in-out infinite alternate;
}

@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); filter: blur(28px) hue-rotate(0deg); }
  100% { transform: translate3d(2.5%, -3.5%, 0) scale(1.18); filter: blur(38px) hue-rotate(42deg); }
}

.frame {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; }

/* 顶部横条 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 14px clamp(14px, 3vw, 28px) 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.mark {
  display: block;
  width: auto;
  height: 30px;
  border-radius: 9px;
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(38, 23, 31, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.burger-bar {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.burger:hover,
.burger:focus-visible {
  border-color: var(--mag);
  color: #fff;
}

/* 二级粘性锚点条 */
.anchorbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px max(clamp(12px, 3vw, 28px), calc((100vw - 1180px) / 2));
  background: linear-gradient(180deg, rgba(24, 14, 20, 0.95), rgba(24, 14, 20, 0.74));
  border-block: 1px solid var(--line-soft);
  backdrop-filter: blur(12px);
}

.anchorbar::-webkit-scrollbar { display: none; }

.anchorbar a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
}

.anchorbar a:hover,
.anchorbar a:focus-visible {
  color: #fff;
  border-color: var(--mag);
  background: rgba(255, 0, 128, 0.14);
}

/* 主体骨架：aside 在左 */
.frame > main {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 28px) 56px;
}

.rail {
  position: sticky;
  top: 74px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(32, 19, 27, 0.55);
  backdrop-filter: blur(8px);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border-left: 2px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.4;
  text-decoration: none;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  color: #fff;
  border-left-color: var(--mag);
  background: rgba(255, 0, 128, 0.13);
}

/* 正文纸面 */
.paper {
  position: relative;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(180deg, rgba(54, 32, 47, 0.72), rgba(30, 18, 26, 0.88));
  backdrop-filter: blur(5px);
  overflow: hidden;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 70vh;
  padding: 34px clamp(18px, 4vw, 52px) 0;
  text-align: right;
  overflow: hidden;
}

.hero:not(:has(.hero-media)) { min-height: 52vh; }

.hero-copy { align-self: flex-end; max-width: 20ch; }

.hero h1 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 5.6vw, 58px);
  line-height: 1.26;
  letter-spacing: 0.03em;
  background: linear-gradient(102deg, #ffffff 22%, #ffd6ec 58%, #ff93d2 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: #ffffff;
  text-shadow: 0 0 34px rgba(255, 0, 128, 0.35);
}

.hero-media {
  position: relative;
  margin: 8px calc(-1 * clamp(18px, 4vw, 52px)) 0;
  height: clamp(190px, 32vh, 320px);
  overflow: hidden;
  will-change: transform;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
}

.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  background: linear-gradient(90deg, var(--mag), var(--fux) 55%, rgba(255, 0, 255, 0));
  clip-path: polygon(0 100%, 100% 46%, 100% 100%);
}

/* 正文内容 */
.paper > article {
  padding: 28px clamp(18px, 4vw, 52px) 30px;
  border-top: 1px dashed var(--line-soft);
  scroll-margin-top: 112px;
}

.paper > article:first-of-type { border-top: 0; padding-top: 34px; }

.paper > article small {
  display: block;
  margin-bottom: 8px;
  color: var(--mag);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.3em;
}

.paper h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(21px, 3.2vw, 30px);
  line-height: 1.42;
  letter-spacing: 0.02em;
  color: #fff;
}

.paper h3 {
  margin: 26px 0 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.5;
  color: #ffe4f2;
}

.paper p { margin: 0 0 16px; }

.paper a {
  color: #ffb3d8;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.paper ul,
.paper ol { margin: 0 0 18px; padding-left: 1.4em; }

.paper li { margin-bottom: 8px; }

.paper strong { color: #fff; font-weight: 500; }

.paper blockquote {
  margin: 22px 0;
  padding: 12px 20px;
  border-left: 3px solid var(--fux);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 0, 128, 0.09);
  color: #ffe9f5;
}

.paper blockquote p:last-child { margin-bottom: 0; }

.paper figure { margin: 22px 0; }

.paper img { border-radius: var(--radius); }

.paper table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.paper th,
.paper td {
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.paper th { background: rgba(255, 0, 255, 0.12); color: #fff; }

/* 页脚 */
.foot {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px clamp(14px, 3vw, 28px) 28px;
  border-top: 1px solid var(--line);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 0.8fr;
  gap: 24px;
}

address { font-style: normal; }

.fbrand {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 1.12rem;
  letter-spacing: 0.12em;
  color: #fff;
}

.fdesc {
  display: block;
  max-width: 32ch;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.foot-nav dl { margin: 0; display: grid; gap: 4px; }

.foot-nav dt {
  color: var(--mag);
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  margin-bottom: 4px;
}

.foot-nav dd { margin: 0; }

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.foot a:hover,
.foot a:focus-visible { color: #fff; text-decoration: underline; }

.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.foot-seal { display: flex; align-items: flex-start; justify-content: flex-end; }

.seal .mark { height: 34px; }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-soft);
  color: var(--muted);
  font-size: 0.86rem;
}

.foot-base p { margin: 0; }

/* 全屏遮罩菜单 */
.veil {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 14px clamp(16px, 4vw, 36px) 34px;
  background:
    radial-gradient(58% 58% at 82% 12%, rgba(255, 0, 128, 0.34), rgba(255, 0, 128, 0) 62%),
    radial-gradient(48% 48% at 8% 92%, rgba(255, 0, 255, 0.30), rgba(255, 0, 255, 0) 66%),
    rgba(22, 13, 19, 0.97);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
}

body.menu-open .veil { opacity: 1; visibility: visible; transform: none; }

.veil-top { display: flex; justify-content: flex-end; }

.veil-close {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.veil-close:hover { border-color: var(--mag); color: #fff; }

.veil-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.veil-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  justify-items: center;
}

.veil-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(20px, 3.6vw, 30px);
  letter-spacing: 0.06em;
  text-decoration: none;
}

.veil-nav a:hover,
.veil-nav a:focus-visible { color: var(--fux); }

:focus-visible { outline: 2px solid var(--fux); outline-offset: 3px; }

@media (max-width: 900px) {
  .frame > main { grid-template-columns: minmax(0, 1fr); gap: 18px; }

  .rail {
    order: 2;
    position: static;
    padding: 8px;
  }

  .rail-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    scrollbar-width: none;
  }

  .rail-nav::-webkit-scrollbar { display: none; }

  .rail-nav a {
    flex: 0 0 auto;
    border-left: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 14px;
    white-space: nowrap;
  }

  .hero {
    min-height: auto;
    text-align: left;
    padding-top: 24px;
  }

  .hero-copy { align-self: flex-start; max-width: none; }

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

  .foot-seal { justify-content: flex-start; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }

  .hero h1 { font-size: clamp(26px, 8vw, 34px); }

  .hero-media { height: 190px; }

  .paper > article { padding-inline: 18px; }

  .foot-grid { grid-template-columns: 1fr; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .veil { transition: none; }
  .hero-media { transform: none !important; }
}

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