:root {
  color-scheme: light;
  --ink: #111111;
  --muted: #6f6a63;
  --line: #e8e6e2;
  --paper: #ffffff;
  --soft: #f4f2ee;
  --panel: #f8f5ef;
  --shadow: rgba(18, 17, 15, 0.18);
  --radius: 0px;
  font-family: "Noto Serif TC", "Songti TC", "PingFang TC", "PingFang HK", "Hiragino Mincho ProN", serif;
}

* { box-sizing: border-box; }

html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip;
}

button,
input { font: inherit; }

button { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding:
    calc(16px + env(safe-area-inset-top, 0px))
    max(min(48px, 5vw), env(safe-area-inset-right, 0px))
    18px
    max(min(48px, 5vw), env(safe-area-inset-left, 0px));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 28px;
}

.lang-switch {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: translateY(-50%);
  font-family: "Noto Sans TC", "PingFang TC", "PingFang HK", Inter, system-ui, sans-serif;
}

.lang-button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
}

.lang-button.is-active {
  color: var(--ink);
}

.lang-button:hover {
  color: var(--ink);
}

.lang-sep {
  color: var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  user-select: none;
}

.wordmark {
  color: var(--ink);
  text-decoration: none;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.85rem, 2.5vw, 2.6rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.02em;
}

.nav-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 36px);
  width: 100%;
  padding: 0 64px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
}

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

.nav-tab {
  appearance: none;
  border: 0;
  border-radius: 0;
  padding: 0 0 5px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-family: "Noto Sans TC", "PingFang TC", "PingFang HK", system-ui, sans-serif;
  font-size: clamp(0.92rem, 1.05vw, 1.06rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav-tab.is-active {
  border-bottom-color: var(--ink);
}

main {
  padding: clamp(20px, 3vw, 40px) 0 0;
}

.hero-carousel {
  grid-template-columns: minmax(104px, 0.56fr) minmax(500px, 3.1fr) minmax(104px, 0.56fr);
  gap: clamp(18px, 2.4vw, 36px);
  align-items: stretch;
  width: 100%;
  min-height: 390px;
  height: clamp(390px, calc(100vh - 250px), 560px);
  overflow: hidden;
}

body[data-active-tab="books"] .hero-carousel,
html[data-active-tab="books"] .hero-carousel {
  display: grid;
}

/* Only the Books tab shows the featured carousel + shelf. */
body:not([data-active-tab="books"]) .hero-carousel,
html:not([data-active-tab="books"]) .hero-carousel,
body:not([data-active-tab="books"]) .shelf-section,
html:not([data-active-tab="books"]) .shelf-section {
  display: none !important;
}

body:not([data-active-tab="maps"]) .travel-section,
html:not([data-active-tab="maps"]) .travel-section {
  display: none !important;
}

body:not([data-active-tab="design"]) .page-section[data-page="design"],
body:not([data-active-tab="life"]) .page-section[data-page="life"],
body:not([data-active-tab="music"]) .page-section[data-page="music"],
body:not([data-active-tab="art"]) .page-section[data-page="art"],
body:not([data-active-tab="magazine"]) .page-section[data-page="magazine"],
body:not([data-active-tab="app"]) .page-section[data-page="app"],
body:not([data-active-tab="about"]) .page-section[data-page="about"] {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.feature-card,
.side-panel {
  position: relative;
  min-height: inherit;
  overflow: hidden;
  background: var(--panel);
}

.feature-card {
  isolation: isolate;
}

.feature-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
  filter: blur(26px) saturate(0.82);
  transform: scale(1.09);
  opacity: 0.42;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.46)),
    rgba(246, 242, 235, 0.38);
}

.feature-content {
  display: grid;
  grid-template-columns: minmax(210px, 0.5fr) minmax(280px, 0.9fr);
  gap: clamp(28px, 4vw, 62px);
  align-items: center;
  height: 100%;
  padding: clamp(28px, 3.8vw, 50px);
}

.cover-frame {
  justify-self: end;
  width: min(280px, 23vw);
  background: #ebe5d8;
  box-shadow: 0 22px 48px var(--shadow);
}

.cover-frame img,
.side-panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-frame img {
  aspect-ratio: 2 / 3;
}

.feature-copy {
  align-self: center;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.42);
  max-width: 780px;
  padding-bottom: 0;
}

.feature-kicker,
.feature-date {
  margin: 0 0 12px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.feature-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 2.7vw, 3.55rem);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: 0.01em;
}

.feature-copy p {
  margin: 0;
  font-size: clamp(1rem, 1.25vw, 1.3rem);
  line-height: 1.65;
}

.feature-controls {
  position: absolute;
  right: clamp(26px, 3.4vw, 52px);
  bottom: clamp(20px, 2.4vw, 34px);
  display: flex;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.slide-button {
  appearance: none;
  width: 56px;
  height: 50px;
  border: 0;
  border-radius: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 2.4rem;
  line-height: 1;
}

.slide-button + .slide-button {
  border-left: 2px solid rgba(255, 255, 255, 0.9);
}

.side-panel {
  opacity: 0.48;
}

.side-panel-left { transform: translateX(-18%); }
.side-panel-right { transform: translateX(18%); }

.side-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
}


.page-section {
  padding: clamp(48px, 7vw, 96px) min(48px, 5vw) clamp(72px, 10vw, 140px);
}

.page-shell {
  width: min(720px, 100%);
  margin: 0 auto;
  text-align: center;
}

.page-title {
  margin: 0 0 18px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.55rem, 2.4vw, 2.2rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-title::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  margin: 18px auto 0;
  background: var(--ink);
}

.page-lead {
  margin: 0;
  color: var(--muted);
  font-family: "Noto Sans TC", "PingFang TC", "PingFang HK", system-ui, sans-serif;
  font-size: clamp(0.98rem, 1.2vw, 1.12rem);
  line-height: 1.85;
}

.about-shell {
  width: min(920px, 100%);
  margin: 0 auto;
}

.about-hero-head {
  display: grid;
  justify-items: center;
  margin-bottom: clamp(28px, 4vw, 42px);
}

.about-title {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.55rem, 2.4vw, 2.2rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.about-title::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  margin: 18px auto 0;
  background: var(--ink);
}

.about-blocks {
  display: grid;
  gap: 0;
}

.about-block {
  padding: clamp(28px, 4vw, 40px) 0;
  border-top: 1px solid var(--line);
}

.about-block:last-child {
  border-bottom: 1px solid var(--line);
}

.about-block h2 {
  margin: 0 0 14px;
  font-family: "Noto Sans TC", "PingFang TC", "PingFang HK", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.about-block p {
  margin: 0;
  max-width: 68ch;
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "PingFang HK", system-ui, sans-serif;
  font-size: clamp(0.96rem, 1.15vw, 1.08rem);
  line-height: 1.9;
}

.shelf-section {
  padding: clamp(74px, 9vw, 132px) 0 clamp(86px, 11vw, 150px);
  background: #ffffff;
}

.shelf-heading {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0 auto clamp(34px, 5vw, 64px);
  padding: 0 24px;
  text-align: center;
}

.shelf-heading p {
  margin: 0;
  color: #8a867f;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.shelf-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.2rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.12em;
}

.book-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  align-items: end;
  gap: clamp(42px, 5.2vw, 82px) clamp(28px, 3.8vw, 62px);
  width: min(1180px, calc(100% - 56px));
  min-height: clamp(560px, 54vw, 780px);
  margin: 0 auto;
  padding: clamp(72px, 8vw, 112px) clamp(48px, 6vw, 86px) clamp(64px, 7vw, 104px);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 76%, rgba(38, 35, 31, 0.2), transparent 38%),
    radial-gradient(circle at 48% 16%, rgba(255, 255, 255, 0.78), transparent 42%),
    linear-gradient(108deg, #f2f1ed 0%, #dedcd6 54%, #cac8c2 100%);
}

.book-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 24%, transparent 76%, rgba(40, 38, 35, 0.08)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.54), transparent 52%);
  pointer-events: none;
}

.stage-loading {
  grid-column: 1 / -1;
  margin: 0;
  color: #6c6861;
  font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
}

.shelf-book {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  align-items: end;
  color: var(--ink);
  text-decoration: none;
  transform: translateY(var(--lift)) rotate(var(--tilt));
  transform-origin: 50% 100%;
  transition: transform 220ms ease, filter 220ms ease;
}

.shelf-book::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 0;
  bottom: 70px;
  height: 34px;
  background: rgba(18, 16, 14, 0.46);
  filter: blur(20px);
  transform: skewX(-10deg) translate(18px, 15px);
  z-index: -1;
}

.shelf-book:hover,
.shelf-book:focus-visible {
  filter: saturate(1.04);
  transform: translateY(calc(var(--lift) - 12px)) rotate(var(--tilt));
}

.book-object {
  position: relative;
  display: block;
  width: min(158px, 100%);
  margin: 0 auto;
  aspect-ratio: 2 / 3;
  background: #e8e3d7;
  box-shadow:
    12px 14px 0 rgba(35, 33, 30, 0.12),
    30px 32px 44px rgba(21, 18, 16, 0.36);
}

.book-object::before {
  content: "";
  position: absolute;
  top: 2.5%;
  bottom: 2.5%;
  right: -13px;
  width: 13px;
  background: linear-gradient(90deg, #c9c3b6, #eee9dc 34%, #aaa398 100%);
  transform: skewY(24deg);
  transform-origin: left center;
}

.book-object::after {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.58);
  border-right: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: inset 10px 0 18px rgba(255, 255, 255, 0.18), inset -10px 0 18px rgba(0, 0, 0, 0.09);
  pointer-events: none;
}

.book-pages {
  position: absolute;
  top: 3%;
  right: -18px;
  bottom: 3%;
  width: 12px;
  background: repeating-linear-gradient(90deg, #f8f4e9 0 1px, #d8d0c3 1px 2px);
  transform: skewY(24deg);
  opacity: 0.7;
}

.book-object img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-caption {
  display: grid;
  gap: 4px;
  min-height: 64px;
  color: #2c2a27;
  font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  text-align: center;
  transform: rotate(calc(var(--tilt) * -1));
}

.book-caption strong {
  overflow: hidden;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-caption span {
  overflow: hidden;
  color: #716d66;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.travel-section {
  padding: clamp(24px, 3vw, 48px) 0 clamp(36px, 4.5vw, 64px);
  background: #ffffff;
}

.travel-heading {
  margin-bottom: clamp(18px, 2.4vw, 28px);
}

/* Map catalog shelf — flat covers (scoped so book shelf stays 3D) */
.map-stage {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  justify-content: center;
  justify-items: center;
  align-items: start;
  gap: clamp(22px, 2.8vw, 36px) clamp(14px, 2vw, 28px);
  width: min(1080px, calc(100% - 40px));
  min-height: 0;
  margin: 0 auto;
  padding: clamp(32px, 4vw, 48px) clamp(24px, 3.5vw, 40px) clamp(28px, 3.5vw, 40px);
  overflow: visible;
  background: transparent;
  border: 0;
}

.map-stage::before {
  display: none;
}

.map-stage::after {
  display: none;
}

.map-stage .shelf-book {
  gap: 12px;
  transform: none;
  transform-origin: 50% 50%;
  transition: transform 180ms ease;
}

.map-stage .shelf-book::after {
  display: none;
}

.map-stage .shelf-book:hover,
.map-stage .shelf-book:focus-visible {
  filter: none;
  transform: none;
}

.map-stage .book-object {
  width: min(156px, 100%);
  box-shadow: none;
  border: 1px solid rgba(34, 31, 27, 0.12);
  transition: border-color 180ms ease, transform 180ms ease;
}

.map-stage .book-object::before,
.map-stage .book-object::after,
.map-stage .book-pages {
  display: none;
}

.map-stage .book-caption {
  min-height: 44px;
  transform: none;
}

.map-manual {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: center;
  /* forwards only: avoid opacity:0 sticking when catalog renders under [hidden] */
  animation: map-manual-enter 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--enter-delay, 0ms);
}

@keyframes map-manual-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.map-manual-featured {
  z-index: 2;
}

.map-manual-featured .book-object {
  width: min(156px, 100%);
  box-shadow: none;
}

.map-manual-featured:hover .book-object,
.map-manual-featured:focus-visible .book-object {
  border-color: rgba(34, 31, 27, 0.36);
  transform: translateY(-3px);
}

.map-manual-featured .book-caption em {
  display: inline-block;
  margin-top: 2px;
  color: #5a564f;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-manual.is-soon {
  cursor: default;
}

.map-manual.is-soon .book-object {
  width: min(156px, 100%);
  box-shadow: none;
}

.map-manual.is-soon:hover,
.map-manual.is-soon:focus-visible {
  filter: none;
  transform: none;
}

.map-manual.is-soon:hover .book-object,
.map-manual.is-soon:focus-visible .book-object {
  transform: none;
  border-color: rgba(34, 31, 27, 0.12);
}

.map-manual-featured:hover .map-cover-glow,
.map-manual-featured:focus-visible .map-cover-glow {
  opacity: 0.75;
}

.map-cover {
  overflow: hidden;
  color: #f7f3ea;
}

.map-cover-glow {
  position: absolute;
  inset: -20% auto auto -10%;
  width: 70%;
  height: 55%;
  background: radial-gradient(circle, rgba(244, 240, 226, 0.28), transparent 68%);
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 280ms ease, transform 280ms ease;
}

.map-cover-inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 22px 18px;
  text-align: left;
}

.map-cover-scotland {
  background:
    linear-gradient(180deg, rgba(18, 17, 15, 0.08), rgba(12, 14, 13, 0.72)),
    repeating-linear-gradient(
      105deg,
      transparent 0 14px,
      rgba(247, 243, 234, 0.035) 14px 15px
    ),
    radial-gradient(circle at 22% 18%, rgba(244, 240, 226, 0.22), transparent 32%),
    radial-gradient(ellipse at 78% 72%, rgba(70, 110, 98, 0.35), transparent 42%),
    linear-gradient(148deg, #5a6b60 0%, #2a3d38 46%, #141c1b 100%);
}

.map-cover-island {
  position: absolute;
  inset: 18% 14% 34% 18%;
  border: 1px solid rgba(247, 243, 234, 0.16);
  border-radius: 46% 54% 42% 58% / 48% 40% 60% 52%;
  opacity: 0.55;
  pointer-events: none;
}

.map-tone-coffee {
  color: #5c5348;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.04)),
    linear-gradient(150deg, #ebe2d6 0%, #d4c4b0 48%, #b9a48c 100%);
}

.map-tone-ceramic {
  color: #4f5558;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.06)),
    linear-gradient(148deg, #e4e7e8 0%, #c8ced1 48%, #a8b0b4 100%);
}

.map-tone-food {
  color: #5a463a;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05)),
    linear-gradient(148deg, #f0e2d4 0%, #d8b89a 50%, #c09472 100%);
}

.map-tone-tea {
  color: #4d5544;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05)),
    linear-gradient(148deg, #e5ebd8 0%, #c5d0af 48%, #9eab86 100%);
}

.map-tone-music {
  color: #4a4658;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05)),
    linear-gradient(148deg, #e4e0ec 0%, #c4bdd4 48%, #9d94b3 100%);
}

.map-tone-travel {
  color: #3f4f58;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.05)),
    linear-gradient(148deg, #dde7eb 0%, #b7c8d0 48%, #8fa6b2 100%);
}

.map-tone-city {
  color: #524c48;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05)),
    linear-gradient(148deg, #e8e4df 0%, #ccc5bd 50%, #aea59b 100%);
}

.map-tone-cool {
  color: #5f5a53;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.06)),
    linear-gradient(150deg, #e8e7e2 0%, #d2d0c9 50%, #bdbab2 100%);
}

.map-cover-kicker,
.map-cover-meta,
.map-cover-status {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.map-cover-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  max-width: 8.5em;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.map-manual .book-caption span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.map-cover-status {
  margin-top: 2px;
  color: inherit;
  opacity: 0.72;
}

.map-cover-scotland .map-cover-kicker,
.map-cover-scotland .map-cover-meta {
  color: rgba(247, 243, 234, 0.82);
}

.map-manual.is-soon .book-caption {
  min-height: 44px;
}

@media (prefers-reduced-motion: reduce) {
  .map-manual {
    animation: none;
  }

  .map-cover-glow {
    transition: none;
  }
}

body[data-travel-view="detail"] .travel-heading,
body[data-travel-view="detail"] .map-stage,
html[data-initial-route="maps-detail"] .travel-heading,
html[data-initial-route="maps-detail"] .map-stage {
  display: none !important;
}

body[data-travel-view="detail"] .travel-section {
  padding: 8px 0 16px;
}

.travel-detail {
  width: min(1480px, calc(100% - 24px));
  margin: 0 auto;
}

.open-map-book {
  appearance: none;
  border: 1px solid var(--ink);
  border-radius: 0;
  min-height: 40px;
  padding: 0 16px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.open-map-book {
  width: fit-content;
  margin-top: 4px;
  color: #ffffff;
  background: var(--ink);
}

.map-book-teaser {
  display: grid;
  gap: 16px;
  max-width: 520px;
}

.map-book-teaser h3 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 4.2rem);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: 0.03em;
}

.map-book-teaser p:not(.feature-date) {
  margin: 0;
  color: #4f4b45;
  font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
  font-weight: 650;
  line-height: 1.9;
}

.map-book-rail {
  display: grid;
  align-content: start;
  gap: 22px;
  padding-top: clamp(18px, 2.6vw, 34px);
}

.map-book-card {
  appearance: none;
  border: 0;
  display: grid;
  gap: 18px;
  width: 100%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.map-book-object {
  position: relative;
  display: grid;
  align-content: end;
  gap: 10px;
  width: min(220px, 100%);
  aspect-ratio: 2 / 3;
  padding: 28px 22px;
  color: #f8f4ea;
  background:
    linear-gradient(180deg, rgba(18, 17, 15, 0.12), rgba(18, 17, 15, 0.58)),
    radial-gradient(circle at 26% 18%, rgba(244, 240, 226, 0.26), transparent 34%),
    linear-gradient(142deg, #54645a 0%, #273b36 48%, #171f1e 100%);
  box-shadow:
    12px 14px 0 rgba(35, 33, 30, 0.12),
    28px 34px 50px rgba(21, 18, 16, 0.28);
  transform: perspective(720px) rotateY(-8deg) rotateZ(-1.4deg);
}

.map-book-object::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 26px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.34), rgba(255, 255, 255, 0.08));
}

.map-book-object::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(248, 244, 234, 0.34);
  pointer-events: none;
}

.map-book-cover-kicker,
.map-book-cover-meta {
  position: relative;
  z-index: 1;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.map-book-cover-title {
  position: relative;
  z-index: 1;
  max-width: 7em;
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  font-weight: 580;
  line-height: 1.18;
  letter-spacing: 0.04em;
}

.map-book-cover-meta {
  opacity: 0.8;
}

.map-book-caption {
  display: grid;
  gap: 6px;
  font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
}

.map-book-caption strong {
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.3;
}

.map-book-caption span {
  color: #716d66;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
}

.map-book-spread {
  position: relative;
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(380px, 0.95fr);
  height: min(820px, calc(100vh - 140px));
  min-height: 560px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(28, 26, 23, 0.16) 50%, transparent calc(50% + 1px)),
    #f6f1e8;
  box-shadow: 0 24px 56px rgba(24, 21, 18, 0.12);
}

.map-book-spread::before,
.map-book-spread::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  width: 18px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.1), transparent);
  pointer-events: none;
  z-index: 2;
}

.map-book-spread::before { left: 0; }
.map-book-spread::after {
  right: 0;
  transform: scaleX(-1);
}

.map-page,
.map-notes-page {
  min-width: 0;
  min-height: 0;
  padding: clamp(12px, 1.5vw, 20px);
}

.map-page {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  height: 100%;
  overflow: hidden;
}

.travel-map {
  min-height: 0;
  height: 100%;
  max-height: 100%;
  background:
    radial-gradient(circle at 42% 28%, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(135deg, #d9ded7, #aebdaf);
  overflow: hidden;
}

.region-switch-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
}

.region-switch {
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  align-items: stretch;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: thin;
}

.region-chip {
  appearance: none;
  flex: 0 0 auto;
  border: 1px solid rgba(28, 26, 23, 0.14);
  min-height: 32px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.55);
  color: #3f3b36;
  cursor: pointer;
  font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.region-chip:hover,
.region-chip:focus-visible {
  border-color: rgba(17, 17, 17, 0.42);
  background: rgba(255, 255, 255, 0.88);
}

.region-chip.is-active {
  border-color: rgba(17, 17, 17, 0.72);
  background: #171717;
  color: #f7f3ea;
}

.region-autoplay {
  appearance: none;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(28, 26, 23, 0.14);
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  color: #2a2723;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.region-autoplay:hover,
.region-autoplay:focus-visible {
  border-color: rgba(17, 17, 17, 0.42);
  background: rgba(255, 255, 255, 0.88);
}

.region-autoplay.is-playing {
  border-color: rgba(17, 17, 17, 0.72);
  background: #171717;
  color: #f7f3ea;
}

.region-autoplay-icon {
  display: block;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
}

.region-autoplay.is-playing .region-autoplay-icon {
  width: 8px;
  height: 10px;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 2.5px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / 2.5px 100% no-repeat;
}

.map-notes-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-left: 1px solid rgba(34, 31, 27, 0.1);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.18)),
    repeating-linear-gradient(180deg, rgba(34, 31, 27, 0.035) 0 1px, transparent 1px 34px);
}

.map-notes-head {
  flex: 0 0 auto;
  margin-bottom: 14px;
}

.map-notes-kicker {
  margin: 0 0 8px;
  color: #8a867f;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.map-notes-page h3 {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 2.2vw, 2.4rem);
  font-weight: 560;
  line-height: 1.15;
  letter-spacing: 0.03em;
}

.region-eyebrow {
  margin: 0;
  color: #6a655e;
  font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
}

.region-article {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
}

.region-article p {
  margin: 0 0 1.05em;
  color: #2f2c28;
  font-size: clamp(0.92rem, 1.05vw, 1.02rem);
  font-weight: 500;
  line-height: 1.85;
}

.region-article p:last-child {
  margin-bottom: 0.2em;
}

.mapboxgl-ctrl-group,
.maplibregl-ctrl-group {
  border-radius: 0;
  box-shadow: 0 6px 18px rgba(18, 17, 15, 0.12);
}

@media (max-width: 980px) {
  .site-header {
    gap: 12px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: 14px;
  }

  .nav-tabs {
    justify-content: flex-start;
    gap: 20px;
    padding: 0 72px 0 4px;
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 36px), transparent);
  }

  .lang-button {
    min-height: 32px;
    padding: 6px 2px;
  }

  .hero-carousel {
    grid-template-columns: 1fr;
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 0 12px;
    overflow: hidden;
  }

  .side-panel { display: none; }

  .feature-card {
    min-height: 0;
    height: auto;
  }

  .feature-content {
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: start;
    gap: 22px;
    padding: 28px 20px 96px;
  }

  .cover-frame {
    justify-self: center;
    width: min(220px, 52vw);
  }

  .feature-copy {
    max-width: 36rem;
    text-align: center;
  }

  .feature-copy h1 {
    font-size: clamp(1.55rem, 6vw, 2.1rem);
  }

  .feature-copy p {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .feature-controls {
    right: 50%;
    bottom: 18px;
    transform: translateX(50%);
  }

  .slide-button {
    width: 48px;
    height: 44px;
    font-size: 2rem;
  }

  .shelf-section {
    padding: 48px 0 64px;
  }

  .shelf-heading {
    margin-bottom: 28px;
  }

  .book-stage {
    display: flex;
    gap: 28px;
    width: 100%;
    min-height: 0;
    padding: 48px max(28px, env(safe-area-inset-right, 0px)) 44px max(24px, env(safe-area-inset-left, 0px));
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .book-stage::-webkit-scrollbar { display: none; }

  .shelf-book {
    flex: 0 0 176px;
    scroll-snap-align: center;
  }

  .book-object {
    width: 156px;
  }

  .book-object::before,
  .book-pages {
    display: none;
  }

  .shelf-book::after {
    left: 8%;
    right: 8%;
    bottom: 58px;
    height: 24px;
    transform: none;
    filter: blur(16px);
    opacity: 0.7;
  }

  .map-stage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 18px;
    width: min(100%, calc(100% - 24px));
    min-height: 0;
    margin: 0 auto;
    padding: 28px 20px 32px;
    overflow: visible;
  }

  .map-manual,
  .map-manual.is-soon {
    width: 100%;
    max-width: 168px;
  }

  .map-stage .book-object,
  .map-manual-featured .book-object,
  .map-manual.is-soon .book-object {
    width: min(148px, 100%);
    box-shadow: none;
  }

  .map-manual .book-caption {
    min-height: 0;
  }

  .map-stage .shelf-book,
  .map-stage .shelf-book:hover,
  .map-stage .shelf-book:focus-visible {
    transform: none;
  }

  .map-manual {
    animation: none;
  }

  .travel-section {
    padding: 20px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .travel-detail {
    width: calc(100% - 16px);
  }

  .map-book-spread {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    box-shadow: none;
  }

  .map-book-spread::before,
  .map-book-spread::after { display: none; }

  .map-page {
    gap: 10px;
    height: auto;
    overflow: visible;
  }

  .travel-map {
    height: min(52vh, 420px);
    height: min(52dvh, 420px);
    min-height: 260px;
    border: 1px solid rgba(34, 31, 27, 0.08);
  }

  .map-notes-page {
    border-left: 0;
    border-top: 1px solid rgba(34, 31, 27, 0.1);
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .region-article {
    max-height: min(48vh, 420px);
    max-height: min(48dvh, 420px);
    -webkit-overflow-scrolling: touch;
  }

  .region-switch-row {
    gap: 10px;
  }

  .region-switch {
    gap: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .region-chip,
  .region-autoplay {
    min-height: 36px;
  }

  .region-autoplay {
    width: 36px;
    height: 36px;
  }

  .region-article p {
    line-height: 1.78;
  }

  .page-section {
    padding: 40px max(20px, env(safe-area-inset-right, 0px)) calc(64px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  }

  .about-shell,
  .page-shell {
    width: min(100%, 100%);
  }
}

@media (max-width: 560px) {
  .wordmark { font-size: 1.65rem; }

  .lang-switch {
    gap: 4px;
  }

  .lang-button,
  .lang-sep {
    font-size: 0.7rem;
  }

  .nav-tabs {
    gap: 16px;
    padding: 0 64px 0 2px;
  }

  .nav-tab {
    font-size: 0.88rem;
    letter-spacing: 0.06em;
  }

  main { padding-top: 12px; }

  .hero-carousel {
    padding: 0 8px;
  }

  .feature-content {
    gap: 18px;
    padding: 24px 16px 88px;
  }

  .cover-frame {
    width: min(180px, 48vw);
  }

  .feature-copy h1 {
    font-size: 1.55rem;
  }

  .feature-copy p {
    font-size: 0.92rem;
  }

  .feature-controls {
    bottom: 14px;
  }

  .slide-button {
    width: 44px;
    height: 40px;
    font-size: 1.8rem;
  }

  .shelf-heading h2,
  .page-title,
  .about-title {
    font-size: clamp(1.4rem, 5.4vw, 1.75rem);
    letter-spacing: 0.1em;
  }

  .book-stage {
    gap: 22px;
    padding: 40px 20px 40px 18px;
  }

  .shelf-book { flex-basis: 148px; }

  .book-object { width: 128px; }

  .book-caption {
    min-height: 52px;
  }

  .map-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
    width: calc(100% - 16px);
    padding: 24px 14px 28px;
  }

  .map-manual,
  .map-manual.is-soon {
    max-width: none;
  }

  .map-stage .book-object,
  .map-manual-featured .book-object,
  .map-manual.is-soon .book-object {
    width: min(100%, 132px);
    box-shadow: none;
  }

  .map-cover-inner {
    padding: 14px 12px;
    gap: 6px;
  }

  .map-cover-title {
    max-width: none;
    font-size: 0.88rem;
    -webkit-line-clamp: 3;
  }

  .map-cover-kicker,
  .map-cover-meta,
  .map-cover-status {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
  }

  .map-manual-featured .book-caption em {
    font-size: 0.62rem;
  }

  .travel-section {
    padding-top: 18px;
  }

  .travel-detail {
    width: calc(100% - 12px);
  }

  .map-page,
  .map-notes-page {
    padding: 10px;
  }

  .travel-map {
    height: min(46vh, 340px);
    height: min(46dvh, 340px);
    min-height: 240px;
  }

  .map-notes-page h3 {
    font-size: 1.35rem;
  }

  .region-article {
    max-height: min(42vh, 360px);
    max-height: min(42dvh, 360px);
  }

  .region-chip {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.74rem;
  }

  .about-block p,
  .page-lead {
    font-size: 0.95rem;
    line-height: 1.8;
  }
}

@media (max-width: 380px) {
  .map-stage {
    gap: 20px 10px;
    padding: 20px 10px 24px;
  }

  .map-stage .book-object,
  .map-manual-featured .book-object,
  .map-manual.is-soon .book-object {
    width: min(100%, 118px);
    box-shadow: none;
  }

  .cover-frame {
    width: min(160px, 46vw);
  }

  .nav-tabs {
    gap: 14px;
  }
}
