:root {
  --white: #dce5e9;
  --off: #0b1b2b;
  --off2: #07111d;
  --black: #edf2f4;
  --mid: #a1b0b9;
  --light: #7f929e;
  --border: rgba(199, 213, 224, .28);
  --border2: rgba(199, 213, 224, .14);
  --blue: #c8a565;
  --blue2: #dfbf80;
  --blue-press: #b99350;
  --radius: 3px;
  --radius-lg: 3px;
  --content-max: 1180px;
  --gallery-max: 1400px;
}

body {
  background: #07111d;
  color: #dce5e9;
  font-family: "Noto Sans TC", Inter, sans-serif;
  letter-spacing: .01em;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(circle at 76% 12%, rgba(76, 137, 159, .18), transparent 29%), radial-gradient(circle at 17% 54%, rgba(200, 165, 101, .07), transparent 26%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

nav {
  height: calc(70px + var(--safe-top));
  --nav-h: 70px;
  background: rgba(7, 17, 29, .84);
  border-color: rgba(199, 213, 224, .14);
  padding-left: max(28px, var(--safe-left));
  padding-right: max(28px, var(--safe-right));
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #eef3f5;
  font-family: "Noto Serif TC", serif;
  letter-spacing: .1em;
}
.nav-logo::before {
  content: "38";
  width: 29px;
  height: 29px;
  border: 1px solid #c8a565;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #c8a565;
  font: 600 9px/1 Inter, sans-serif;
}
.nav-links { gap: 34px; }
.nav-links a { color: #a6b5be; font-size: 13px; letter-spacing: .04em; }
.nav-links a:hover { color: #f3f6f7; }
.hamburger span { background: #dce5e9; }

.hero {
  width: min(1380px, calc(100% - 64px));
  min-height: 760px;
  margin: 0 auto;
  padding: calc(70px + var(--safe-top) + 72px) 0 62px;
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  grid-template-rows: auto auto;
  gap: 42px 72px;
  align-items: center;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid rgba(199, 213, 224, .14);
  overflow: visible;
}
.hero::before { display: none; }
.hero-copy { position: relative; z-index: 2; }
.hero-eyebrow {
  color: #c8a565;
  letter-spacing: .26em;
  font: 600 12px/1.4 Inter, sans-serif;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fadeUp .8s .05s forwards;
}
.hero-eyebrow::before { content: ""; width: 42px; height: 1px; background: #c8a565; }
.hero h1 {
  color: #edf2f4;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(4.2rem, 7vw, 6.7rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: .075em;
  margin: 0 0 14px;
  text-shadow: 0 0 42px rgba(126,182,203,.15);
  animation: fadeUp .8s .12s forwards;
}
.hero-kicker {
  color: #bdc9cf;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(1.08rem, 1.7vw, 1.4rem);
  letter-spacing: .15em;
  margin-bottom: 26px;
}
.hero-sub {
  max-width: 590px;
  color: #9dafb9;
  font-size: 1rem;
  line-height: 1.9;
  margin: 0 0 32px;
  animation: fadeUp .8s .2s forwards;
}
.hero-actions { display: flex; align-items: center; gap: 26px; }
.hero-cta {
  border-radius: 0;
  background: #d8dfe2;
  color: #081521;
  padding: 13px 17px 13px 22px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  gap: 25px;
  opacity: 1;
  animation: none;
}
.hero-cta span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #0a1723; color: #fff; }
.hero-cta:hover { background: #f0f3f4; transform: translateY(-2px); }
.hero-secondary { color: #a9b8c0; font-size: 13px; text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid #566b77; }
.hero-secondary:hover { color: #eef3f5; border-color: #c8a565; }

.memory-network {
  height: 450px;
  position: relative;
  border: 1px solid rgba(199, 213, 224, .16);
  background: linear-gradient(145deg, rgba(16, 39, 57, .83), rgba(5, 14, 24, .55));
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0,0,0,.3);
}
.memory-network::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(107,165,187,.13), transparent 47%); }
.network-ring { position: absolute; border: 1px solid rgba(153,198,216,.2); border-radius: 50%; }
.ring-one { inset: 13%; }.ring-two { inset: 28%; border-color: rgba(200,165,101,.25); }
.network-core { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 88px; height: 88px; border-radius: 50%; background: radial-gradient(circle, #d9e8ec 0 3%, #719dad 5%, #183444 34%, rgba(7,17,29,.15) 72%); box-shadow: 0 0 74px rgba(126,182,203,.4); }
.network-node { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #c0d1d7; box-shadow: 0 0 18px #8ec4d7; animation: nodePulse 2.8s ease-in-out infinite; }
.node-one{left:19%;top:24%}.node-two{left:72%;top:18%;animation-delay:.4s}.node-three{left:81%;top:61%;animation-delay:.8s}.node-four{left:28%;top:76%;animation-delay:1.2s}.node-five{left:50%;top:12%;background:#c8a565}.node-six{left:12%;top:54%;background:#c8a565;animation-delay:1.6s}
.network-trace { position: absolute; height: 1px; background: linear-gradient(90deg, transparent, rgba(142,196,215,.48), transparent); transform-origin: left; }
.trace-one{width:260px;left:18%;top:25%;transform:rotate(27deg)}.trace-two{width:240px;left:50%;top:49%;transform:rotate(-42deg)}.trace-three{width:300px;left:26%;top:75%;transform:rotate(-32deg)}
.network-count { position: absolute; z-index: 2; right: 24px; top: 20px; color: #738894; font: 700 10px Inter,sans-serif; letter-spacing: .2em; }
.network-status { position: absolute; z-index: 2; left: 26px; bottom: 24px; }
.network-status strong { display: block; color: #d7e2e6; font: 600 14px "Noto Serif TC",serif; letter-spacing: .12em; }
.network-status span { color: #748995; font: 10px Inter,sans-serif; letter-spacing: .12em; }
@keyframes nodePulse { 50% { opacity: .4; transform: scale(.75); } }
.hero-stats { grid-column: 1 / -1; margin: 0; justify-content: flex-start; gap: 0; opacity: 1; animation: none; border-top: 1px solid rgba(199,213,224,.12); }
.hero-stats > div { min-width: 170px; padding: 24px 36px 0 0; margin-right: 36px; border-right: 1px solid rgba(199,213,224,.12); }
.stat-num { color: #dce5e9; font: 700 2.35rem/1 "Noto Serif TC",serif; }
.stat-label { color: #738793; letter-spacing: .1em; text-transform: uppercase; }
.hero-scroll-hint { bottom: 15px; left: auto; right: 0; transform: none; color: #536a77; letter-spacing: .18em; animation: none; opacity: 1; }

.gallery-section { background: transparent; max-width: 1400px; padding: 96px 32px; }
.gallery-header { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; text-align: left; max-width: 1180px; margin: 0 auto 45px; }
.gallery-header .eyebrow { color: #c8a565; letter-spacing: .24em; font-size: 11px; }
.gallery-header h2 { color: #e6edef; font-family: "Noto Serif TC",serif; font-size: clamp(2rem,4vw,3.1rem); letter-spacing: .08em; }
.gallery-header p { color: #8498a4; margin: 0 0 5px auto; max-width: 430px; }
.story-card { max-width: 1180px; background: rgba(9,24,37,.67); border-color: rgba(199,213,224,.14); box-shadow: none; padding: clamp(26px,4vw,48px); }
.story-quote { color: #c7d3d9; border-color: #c8a565; font-family: "Noto Serif TC",serif; font-size: 1.15rem; }
.story-body { color: #94a6b0; }
.story-pillars { background: rgba(6,17,29,.65); border-color: rgba(199,213,224,.13); border-radius: 0; }
.story-pillars h3,.story-chapters-title { color: #dce5e9; font-family: "Noto Serif TC",serif; letter-spacing: .07em; }
.pillar-item { background: rgba(16,38,55,.7); border: 1px solid rgba(199,213,224,.1); border-radius: 0; }
.pillar-item strong { color: #d5e0e5; }.pillar-list { color: #91a2ac; }
.chapter-grid { gap: 0; border-top: 1px solid rgba(199,213,224,.15); border-bottom: 1px solid rgba(199,213,224,.15); }
.chapter-card { min-height: 280px; border: 0; border-right: 1px solid rgba(199,213,224,.15); border-radius: 0; background: transparent; padding: 34px 30px; }
.chapter-card:last-child { border-right: 0; }
.chapter-card:hover { transform: none; background: rgba(126,182,203,.045); box-shadow: none; }
.chapter-label { color: #c8a565; letter-spacing: .18em; }.chapter-card h4 { color: #dfe7ea; font-family: "Noto Serif TC",serif; font-size: 1.25rem; letter-spacing: .06em; }.chapter-card p { color: #879aa5; }.chapter-relics { color: #657b88; }
.story-card .hero-cta { margin-top: 4px; }

#characters { max-width: none; background: linear-gradient(180deg, transparent, rgba(12,31,47,.7)); }
#characters > * { max-width: 1336px; margin-left: auto; margin-right: auto; }
.filter-sticky { top: calc(70px + var(--safe-top)); background: rgba(7,17,29,.86); border-color: rgba(199,213,224,.1); }
.filter-btn { border-radius: 0; border-color: rgba(199,213,224,.22); background: rgba(12,31,47,.72); color: #9aabb4; letter-spacing: .04em; }
.filter-btn:hover { border-color: #c8a565; color: #dce5e9; }.filter-btn.active { background: #d5dde0; color: #07111d; border-color: #d5dde0; }
.char-grid { grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 18px; }
.char-card { background: linear-gradient(155deg,#10283a,#091823); border-color: rgba(199,213,224,.14); border-radius: 0; }
.char-card:hover { transform: translateY(-6px); border-color: rgba(200,165,101,.5); box-shadow: 0 22px 50px rgba(0,0,0,.28); }
.char-img-wrap { background: #0c1e2d; }
.char-img { filter: saturate(.88) contrast(1.03); }.char-img-tag { border-radius: 0; background: rgba(7,17,29,.8); color: #c8a565; }
.char-body { padding: 17px 18px 19px; border-top: 1px solid rgba(199,213,224,.1); }.char-district { color: #c8a565; letter-spacing: .16em; }.char-name { color: #e3eaed; font-family: "Noto Serif TC",serif; font-size: 1.08rem; letter-spacing: .07em; }.char-romaji { color: #6e838f; }.char-tag { color: #8fa1ab; background: rgba(4,13,22,.45); border-color: rgba(199,213,224,.12); border-radius: 0; }

.modal-overlay { background: rgba(1,7,13,.84); backdrop-filter: blur(18px); }
.modal { background: #0c1e2c; border: 1px solid rgba(199,213,224,.18); border-radius: 2px; box-shadow: 0 28px 90px rgba(0,0,0,.55); }
.modal-img-col { background: #07131e; }.modal-info-col { background: #0c1e2c; }.modal-close,.modal-nav-btn { color: #bdc9cf; background: rgba(7,17,29,.72); }.modal-close:hover,.modal-nav-btn:hover { background: #152c3d; color: #fff; }
.modal-title { color: #edf2f4; font-family: "Noto Serif TC",serif; letter-spacing: .06em; }.modal-no,.modal-sec-label { color: #c8a565; }.modal-romaji,.modal-text { color: #94a6b0; }.modal-alias,.modal-quote { background: rgba(5,15,24,.65); color: #afbec6; border-color: rgba(200,165,101,.35); }.modal-stat { background: rgba(6,17,29,.6); }.modal-stat-label { color: #718692; }.modal-stat-value { color: #d5dfe3; }.modal-divider { background: rgba(199,213,224,.13); }.zodiac-pill { background: rgba(200,165,101,.12); color: #d2b477; }.modal-prompt { background: #07131e; color: #91a5b0; border-color: rgba(199,213,224,.14); }.copy-prompt-btn { border-radius: 0; background: #122a3b; border-color: rgba(199,213,224,.2); color: #c8a565; }

footer { background: #050d16; border-color: rgba(199,213,224,.14); }.footer-card { background: #0b1b29; border-color: rgba(199,213,224,.14); border-radius: 0; box-shadow: none; }.footer-card h3,.footer-meta strong { color: #dce5e9; font-family: "Noto Serif TC",serif; }.footer-card > p,.footer-meta { color: #8fa1ab; }.footer-meta { border-color: rgba(199,213,224,.13); }.footer-copy { color: #718590; } footer a { color: #c8a565; }

@media (max-width: 900px) {
  .hero { width: min(100% - 40px,760px); grid-template-columns: 1fr; min-height: auto; padding-top: calc(70px + var(--safe-top) + 54px); }
  .memory-network { height: 360px; }.hero-stats { margin-bottom: 22px; }
  .gallery-header { grid-template-columns: 1fr; gap: 12px; }.gallery-header p { margin-left: 0; }
}
@media (max-width: 768px) {
  nav { --nav-h: 54px; height: calc(54px + var(--safe-top)); padding-left: max(16px,var(--safe-left)); padding-right: max(16px,var(--safe-right)); }
  .nav-links { background: rgba(7,17,29,.98); top: calc(54px + var(--safe-top)); }.nav-links a { color: #d6e0e4; }
  .hero { width: calc(100% - 32px); padding-top: calc(54px + var(--safe-top) + 48px); gap: 36px; }
  .hero h1 { font-size: clamp(3rem,15vw,4.2rem); letter-spacing: .035em; }.hero-kicker { font-size: 1rem; letter-spacing: .09em; }.hero-actions { flex-direction: column; align-items: flex-start; }.memory-network { height: 310px; }.hero-stats > div { min-width: 105px; padding-right: 18px; margin-right: 18px; }.stat-num { font-size: 1.8rem; }.hero-scroll-hint { display: none; }
  .gallery-section { padding: 68px 16px; }.chapter-grid { grid-template-columns: 1fr; }.chapter-card { min-height: 0; border-right: 0; border-bottom: 1px solid rgba(199,213,224,.15); }.chapter-card:last-child { border-bottom: 0; }
  .filter-sticky { top: calc(54px + var(--safe-top)); background: rgba(7,17,29,.93); }.char-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.char-body { padding: 12px; }.char-tags { display: none; }
  .modal { background: #0c1e2c; border: 0; }.modal-info-col { background: #0c1e2c; }
}
@media (max-width: 420px) {
  .memory-network { height: 260px; }.network-status { left: 17px; bottom: 16px; }.network-count { right: 16px; top: 14px; }.hero-stats > div { min-width: 88px; }.char-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .network-node { animation: none; } }
