/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── VARIABLES ── */
:root {
  --red:   #C8272D;
  --ink:   #1A1A1A;
  --paper: #FAFAF8;
  --stone: #8B7355;
  --line:  #E0DAD0;
  --muted: #6B6560;
  --white: #FFFFFF;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans TC', 'Noto Sans JP', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-weight: 300;
}

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 64px;
  background: rgba(250, 250, 248, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-family: 'Noto Serif TC', serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--ink);
  text-decoration: none;
}
.nav-logo span { color: var(--red); }
.nav-back {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--red); }
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--red); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.lang-select {
  background: none;
  border: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
  border-radius: 2px;
  outline: none;
}
.lang-select:focus { border-color: var(--red); color: var(--red); }
.hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger .line {
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1),
              opacity  0.25s ease,
              width    0.35s ease;
  transform-origin: center;
}
/* top line rotates down to form \ */
.hamburger.opened .line.top    { transform: translateY(6.5px) rotate(45deg); }
/* middle fades out */
.hamburger.opened .line.middle { opacity: 0; transform: scaleX(0); }
/* bottom line rotates up to form / */
.hamburger.opened .line.bottom { transform: translateY(-6.5px) rotate(-45deg); }

/* sr-only label */
.hamburger span {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  z-index: 99;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 16px 24px;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--red); }
.mobile-menu button {
  display: block;
  width: 100%;
  padding: 16px 24px;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}
.mobile-menu button:hover { color: var(--red); }
.nav-cta {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--white);
  background: var(--red);
  border: none;
  padding: 8px 18px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.2s;
}
.nav-cta:hover { background: #a01e23; }

/* ── PAGE LABEL ── */
.page-label, .section-label {
  font-size: 10px;
  letter-spacing: 5px;
  color: var(--red);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-label::before, .section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--red);
}

/* ── SCROLL LOCK (iOS fix) ── */
body.scroll-locked {
  position: fixed;
  width: 100%;
  overflow-y: scroll; /* 桌機保留 scrollbar 位置，避免版面位移 */
}

/* ── MOBILE NAV ── */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 600px) {
  nav { padding: 0 20px; }
}
