:root {
  --bg: #003153;
  --bg-2: #0c466e;
  --ink: #f3f0e7;
  --muted: #c5d0da;
  --gold: #d7b56a;
  --line: rgba(215, 181, 106, 0.38);
  --header: 64px;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --brush: "Ma Shan Zheng", "KaiTi", cursive;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 12px);
  overflow-x: clip;
  overflow-y: auto;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.skip { position: absolute; left: 12px; top: -40px; background: var(--gold); color: #111; padding: 8px 12px; }
.skip:focus { top: 8px; z-index: 50; }
.leaflet-container { z-index: 0; }
.leaflet-container img { max-width: none; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header); padding: 8px 22px;
  background: rgba(0, 36, 61, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; letter-spacing: 0.08em; }
.brand img { width: 30px; height: 30px; }
.nav-toggle {
  display: none; border: 1px solid var(--gold); background: transparent; color: var(--gold);
  min-height: 40px; padding: 0 14px; font: inherit; cursor: pointer;
}
#site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
#site-nav a { text-decoration: none; font-size: 14px; color: var(--muted); }
#site-nav a:hover, #site-nav a:focus-visible { color: var(--gold); }

.hero { position: relative; min-height: 100svh; display: grid; align-items: end; }
.hero img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 58%;
}
.hero-panel {
  position: relative;
  width: min(820px, calc(100% - 32px));
  margin: 18vh 6vw 7vh;
  padding: 28px 28px 24px;
  background: rgba(0, 32, 56, 0.78);
  border: 1px solid var(--line);
}
.kicker { color: var(--gold); letter-spacing: 0.12em; font-size: 13px; margin: 0 0 8px; }
.brush { font-family: var(--brush); font-weight: 400; font-size: clamp(42px, 6vw, 72px); line-height: 1.05; margin: 0 0 10px; }
.hero-title { font-size: clamp(20px, 2.6vw, 30px); margin: 0; font-weight: 500; }
.hero-panel p { margin: 6px 0; }
.hero-line { color: var(--muted); }
.hero-vow {
  margin: 14px 0 2px;
  color: var(--gold);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.btn, .btn-line {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--gold); background: var(--gold); color: #1a1408;
}
.btn-line { background: transparent; color: var(--gold); }

.band, .block { width: min(1120px, calc(100% - 40px)); margin: 0 auto 104px; }
.band { margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.stat { padding: 20px 12px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { display: block; font-size: clamp(22px, 3vw, 34px); color: var(--gold); font-weight: 500; }
.stat span { color: var(--muted); font-size: 14px; }

.block-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.join-head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: baseline;
}
.join-vow {
  grid-column: 2;
  margin: 6px 0 0;
  color: var(--gold);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
}
.block-head span { color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: 0.14em; }
h2 { font-size: 40px; font-weight: 500; margin: 0; }
.lead, .prose p { color: #e7eef4; font-size: 18px; }
.split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: start; }
.frame img { width: 100%; max-height: 640px; object-fit: cover; object-position: center 30%; border: 1px solid var(--line); }
.systems, .depts { display: grid; gap: 14px; }
.systems { grid-template-columns: 1fr 1fr; }
.depts { grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.system, .dept { background: var(--bg-2); border: 1px solid var(--line); padding: 22px; }
.system p:first-child { margin: 0; color: var(--gold); letter-spacing: 0.12em; font-size: 13px; }
.system h3, .dept h3 { margin: 8px 0; font-size: 28px; font-weight: 500; }
.system p:last-child, .dept p { margin: 0; color: var(--muted); font-size: 18px; }
.goal { border-left: 2px solid var(--gold); padding-left: 16px; color: var(--gold); font-size: 18px; }

.photo-break img { width: 100%; max-height: 72vh; object-fit: cover; object-position: center center; }
.photo-break.field img { max-height: 84vh; object-position: center 46%; }
.photo-break { margin: 0 0 104px; }

.gallery { margin-top: 22px; }
.gallery-viewport {
  position: relative;
  height: clamp(220px, 42vw, 460px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #00243d;
}
.gallery-viewport img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.gallery-viewport img.is-active { opacity: 1; }
.gallery-dots { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.gallery-dots button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.gallery-dots button::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid var(--gold);
}
.gallery-dots button.is-active::before { background: var(--gold); }

.tl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  position: relative;
  margin-top: 8px;
  padding-top: 42px;
}
.tl::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 7px;
  right: calc((100% - 80px) / 5 - 7px);
  height: 2px;
  background: var(--gold);
}
.tl-item {
  position: relative;
  min-width: 0;
  padding: 0;
  background: transparent;
}
.tl-item::before {
  content: "";
  position: absolute;
  top: -37px;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(0, 49, 83, 0.9);
}
.tl-item span { display: block; color: var(--gold); letter-spacing: 0.08em; font-size: 22px; font-weight: 500; }
.tl-youbai { margin: 6px 0 0; font-size: 22px; font-weight: 500; }
.tl-china { margin: 0 0 8px; color: var(--muted); font-size: 18px; }
.tl-item p:last-child { margin: 0; color: #e7eef4; font-size: 18px; }

.join-top img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; border: 1px solid var(--line); }
.jobs { display: grid; gap: 12px; margin-top: 22px; }
.job { border: 1px solid var(--line); background: var(--bg-2); }
.job summary { cursor: pointer; min-height: 52px; padding: 14px 16px; font-size: 18px; list-style: none; }
.job summary::-webkit-details-marker { display: none; }
.job summary::after { content: "＋"; float: right; color: var(--gold); }
.job[open] summary::after { content: "－"; }
.job-body { padding: 0 16px 16px; font-size: 18px; }
.job-body h3 { font-size: 18px; letter-spacing: 0.1em; color: var(--gold); margin: 14px 0 6px; font-weight: 500; }
.job-body p { margin: 0 0 8px; font-size: 18px; }
.job-body ul { margin: 0; padding-left: 1.2em; }
.job-body li { margin: 6px 0; font-size: 18px; }

.contact-grid { align-items: stretch; }
.contact-card p { margin: 0 0 14px; display: grid; gap: 2px; font-size: 18px; }
.contact-card span { color: var(--gold); font-size: 12px; letter-spacing: 0.12em; }
.contact-card a { overflow-wrap: anywhere; }
.note { color: var(--muted) !important; }
.map { min-height: 360px; height: 100%; border: 1px solid var(--line); background: #0a3a58; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 20px 48px;
  display: grid; justify-items: center; text-align: center; gap: 8px; color: var(--muted);
}
.site-footer p { margin: 0; }
.site-footer img { width: 36px; height: 36px; }
.beian { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; }
.beian a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.beian img { width: 16px; height: 16px; }
.noscript { padding: 24px; text-align: center; }

.to-top {
  position: fixed;
  right: 22px;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 40;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(0, 36, 61, 0.55);
  backdrop-filter: blur(8px);
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background 0.2s ease;
}
.to-top::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  transform: translateY(2px) rotate(-45deg);
}
.to-top.is-on { opacity: 1; pointer-events: auto; }
.to-top:hover, .to-top:focus-visible { background: rgba(0, 36, 61, 0.82); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .gallery-viewport img, .to-top { transition: none; }
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  #site-nav {
    display: none; position: absolute; top: var(--header); left: 0; right: 0;
    flex-direction: column; background: #00243d; border-bottom: 1px solid var(--line); padding: 8px 0 12px;
  }
  #site-nav.is-open { display: flex; }
  #site-nav a { padding: 12px 22px; font-size: 16px; }
  .hero { min-height: auto; }
  .hero img { position: relative; height: 52vh; }
  .hero-panel { margin: 0; width: 100%; border-left: 0; border-right: 0; }
  .split, .systems, .depts, .stats, .pair { grid-template-columns: 1fr; }
  .tl { grid-template-columns: 1fr; gap: 26px; padding: 4px 0 4px 32px; }
  .tl::before { top: 10px; bottom: 10px; left: 6px; right: auto; width: 2px; height: auto; background: var(--gold); }
  .tl-item::before { top: 8px; left: -32px; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .pair img, .join-top img, .frame img { height: auto; max-height: 420px; }
  .map { height: 300px; }
  .kicker span:last-child { display: block; margin-top: 4px; }
}

@media (max-width: 640px) {
  .band, .block, .photo-break { width: min(1120px, calc(100% - 28px)); margin-bottom: 84px; }
  .photo-break { width: 100%; }
  .brush { font-size: 40px; }
  .hero-vow { font-size: 22px; letter-spacing: 0.08em; }
  .gallery-viewport { height: 230px; }
  .photo-break img { max-height: 46vh; }
}
