:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-alt: #f4efe8;
  --text: #171513;
  --muted: #6f675c;
  --line: #e2dcd3;
  --accent: #1a5160;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.06);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --max: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.zh { font-family: "PingFang SC", "Microsoft YaHei", Inter, sans-serif; }
a { color: inherit; text-decoration: none; transition: 0.2s ease; }
button, input { font: inherit; }
.container { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn.primary { background: var(--text); color: #fff; }
.btn.secondary { border-color: var(--line); background: transparent; color: var(--text); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 243, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 220, 211, 0.8);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand-logo { height: 52px; width: auto; object-fit: contain; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--accent); font-weight: 700; }
.lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 3px;
  border: 1px solid rgba(26, 81, 96, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 18px rgba(23, 21, 19, 0.06);
  white-space: nowrap;
}
.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}
.lang a[aria-current="page"] { color: #fff; background: var(--accent); }
.nav-links .lang { display: none; }
.header-lang { flex: 0 0 auto; }
.mobile-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
}
.mobile-nav-toggle span { width: 18px; height: 2px; background: currentColor; border-radius: 99px; transition: transform 0.22s ease, opacity 0.22s ease; }
.site-header.nav-open .mobile-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .mobile-nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .mobile-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav-panel {
  display: none;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: rgba(251, 248, 243, 0.98);
  padding: 10px;
  box-shadow: 0 18px 30px rgba(23, 21, 19, 0.08);
}
.mobile-nav-panel a, .mobile-nav-lang {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}
.mobile-nav-panel a.active { color: var(--accent); background: rgba(26, 81, 96, 0.08); }
.mobile-contact { justify-content: center; margin-top: 6px; background: var(--text); color: #fff !important; border-radius: 99px !important; }
.mobile-nav-lang { color: var(--text); border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; border-radius: 0; min-height: 42px; }
.mobile-nav-lang a { min-height: 30px; padding: 0 10px; border-radius: 999px; color: var(--muted); font-weight: 750; }
.mobile-nav-lang a[aria-current="page"] { color: #fff; background: var(--accent); }

.page-hero {
  padding: 72px 0 52px;
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--bg) 100%);
  border-bottom: 1px solid rgba(226, 220, 211, 0.72);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 60px;
  align-items: center;
}
h1 {
  color: var(--accent);
  font-size: clamp(38px, 4.8vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 820;
  margin-bottom: 20px;
}
.page-hero p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
  max-width: 760px;
}
.hero-card {
  background: rgba(255,255,255,0.76);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.hero-card strong { display: block; color: var(--text); font-size: 32px; line-height: 1; margin-bottom: 10px; }
.hero-card span { color: var(--muted); font-size: 14px; line-height: 1.65; }

.tour-section { padding: 58px 0 84px; }
.tour-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: stretch;
}
.viewer-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #111;
  box-shadow: var(--shadow-lg);
  min-height: 620px;
}
.tour-canvas {
  width: 100%;
  height: 100%;
  min-height: 620px;
  display: block;
  cursor: grab;
  background: #151515;
  touch-action: none;
}
.tour-canvas:active { cursor: grabbing; }
.tour-overlay {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-end;
  pointer-events: none;
}
.scene-caption {
  max-width: 560px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(18, 18, 18, 0.62);
  color: #fff;
  backdrop-filter: blur(10px);
}
.scene-caption span { display: block; color: rgba(255,255,255,0.68); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.scene-caption strong { display: block; font-size: 22px; line-height: 1.2; }
.tour-hint {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.tour-loading,
.tour-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
  color: rgba(255,255,255,0.86);
  background: rgba(17,17,17,0.82);
  z-index: 4;
}
.tour-loading[hidden], .tour-fallback[hidden] { display: none; }
.tour-fallback-content {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
}
.tour-fallback img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.18);
}
.tour-fallback p {
  color: rgba(255,255,255,0.82);
  font-size: 14px;
  line-height: 1.7;
}

.tour-sidebar {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.76);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.tour-sidebar h2 {
  color: var(--accent);
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.tour-sidebar p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.scene-list {
  display: grid;
  gap: 10px;
}
.scene-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 11px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.scene-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: rgba(26,81,96,0.26); }
.scene-button[aria-current="true"] { border-color: rgba(26,81,96,0.48); background: rgba(26,81,96,0.08); }
.scene-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(26,81,96,0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}
.scene-button span:last-child { min-width: 0; font-size: 14px; font-weight: 750; }
.tour-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.small-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.about-link-band {
  padding: 70px 0;
  border-top: 1px solid var(--line);
  background: var(--surface-alt);
}
.about-link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.about-link-card h2 { color: var(--accent); font-size: 30px; line-height: 1.2; margin-bottom: 10px; }
.about-link-card p { color: var(--muted); max-width: 760px; line-height: 1.75; }
.footer { padding: 32px 0; text-align: center; color: var(--muted); font-size: 13px; background: var(--surface); }

@media (max-width: 1040px) {
  .hero-grid, .tour-shell { grid-template-columns: 1fr; }
  .hero-card { max-width: 520px; }
  .viewer-card, .tour-canvas { min-height: 560px; }
}
@media (max-width: 768px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  .container { width: min(calc(100% - 28px), var(--max)); }
  .nav-links { display: none; }
  .site-header .nav {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 12px;
    gap: 6px;
    justify-content: flex-start;
  }
  .brand { min-width: 0; justify-self: start; }
  .brand-logo { height: 32px; max-width: 96px; }
  .header-lang {
    position: absolute;
    right: 52px;
    top: 16px;
    margin-left: 0;
  }
  .lang { gap: 2px; }
  .lang a { min-height: 28px; padding: 0 6px; font-size: 12px; }
  .mobile-nav-toggle {
    position: absolute;
    right: 12px;
    top: 17px;
    display: inline-flex !important;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
  }
  .site-header.nav-open .mobile-nav-panel { display: block; }
  .page-hero { padding: 52px 0 36px; }
  h1 { font-size: 34px; line-height: 1.12; }
  .page-hero p { font-size: 15px; }
  .tour-section { padding: 34px 0 58px; }
  .viewer-card, .tour-canvas { min-height: 470px; }
  .tour-overlay { align-items: flex-start; flex-direction: column; }
  .tour-hint { white-space: normal; }
  .about-link-card { grid-template-columns: 1fr; padding: 24px; }
  .about-link-card h2 { font-size: 26px; }
}
