:root {
  color-scheme: light;
  --bg: #fff3e7;
  --bg-deep: #f5c39b;
  --panel: rgba(255, 249, 242, 0.84);
  --panel-strong: rgba(255, 252, 248, 0.94);
  --text: #5f302c;
  --muted: #87615a;
  --line: rgba(130, 76, 56, 0.14);
  --line-strong: rgba(130, 76, 56, 0.22);
  --accent: #d86c52;
  --accent-deep: #aa4c46;
  --accent-soft: rgba(216, 108, 82, 0.12);
  --shadow: 0 26px 60px rgba(122, 68, 48, 0.14);
  --shadow-soft: 0 14px 28px rgba(122, 68, 48, 0.12);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --sidebar-width: 300px;
  --sidebar-collapsed-width: 92px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 215, 152, 0.72), transparent 26%),
    radial-gradient(circle at 85% 18%, rgba(247, 164, 122, 0.34), transparent 24%),
    radial-gradient(circle at bottom right, rgba(217, 119, 122, 0.24), transparent 26%),
    linear-gradient(180deg, #fff7ef 0%, var(--bg) 44%, #fde7dc 100%);
  color: var(--text);
  font-family:
    "Quicksand",
    "PingFang SC",
    "PingFang TC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    "Noto Sans CJK TC",
    sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(10px);
}

body::before {
  top: -120px;
  left: -60px;
  width: 320px;
  height: 320px;
  background: rgba(255, 211, 148, 0.32);
}

body::after {
  right: -120px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  background: rgba(214, 116, 121, 0.18);
}

body.is-modal-open {
  overflow: hidden;
}

button,
a {
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(255, 240, 226, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transition:
    padding 360ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 360ms ease;
}

.sidebar-top {
  display: grid;
  gap: 20px;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 249, 242, 0.9);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.sidebar-toggle span {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 240ms ease, opacity 240ms ease;
}

.sidebar-toggle-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.sidebar-toggle.has-custom-image span {
  opacity: 0;
}

.home-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 249, 242, 0.9);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  cursor: pointer;
}

.home-shortcut span {
  font-size: 1.3rem;
  line-height: 1;
}

.home-shortcut.is-active {
  background: linear-gradient(135deg, rgba(255, 246, 234, 0.98), rgba(255, 228, 211, 0.92));
  border-color: rgba(203, 118, 82, 0.26);
}

.sidebar-kicker,
.section-kicker,
.detail-kicker {
  margin: 0;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-brand-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-brand-image {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 20px rgba(125, 70, 51, 0.1);
}

.sidebar-brand h1,
.locations-heading,
.lightbox-meta h2,
.home-message {
  margin: 0;
  font-family:
    "Cormorant Garamond",
    "Songti SC",
    "STSong",
    "Noto Serif CJK SC",
    "PMingLiU",
    serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.sidebar-brand h1 {
  margin-top: 12px;
  font-size: clamp(2.4rem, 5vw, 3.1rem);
  line-height: 0.94;
}

.sidebar-nav {
  display: grid;
  gap: 12px;
  max-height: 240px;
  opacity: 1;
  overflow: hidden;
  transform: translateX(0);
  transition:
    opacity 280ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    max-height 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 247, 238, 0.5);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.nav-tab:hover {
  transform: translateX(3px);
  background: rgba(255, 247, 238, 0.92);
  border-color: rgba(192, 126, 84, 0.18);
}

.nav-tab.is-active {
  background: linear-gradient(135deg, rgba(255, 246, 234, 0.98), rgba(255, 228, 211, 0.92));
  border-color: rgba(203, 118, 82, 0.26);
  box-shadow: 0 14px 28px rgba(141, 75, 48, 0.12);
}

.nav-tab-copy {
  display: grid;
  gap: 4px;
}

.nav-tab-copy strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.sidebar-brand {
  max-height: 200px;
  opacity: 1;
  overflow: hidden;
  transform: translateX(0);
  transition:
    opacity 280ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    max-height 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.locations-copy,
.detail-description,
.detail-facts dd {
  color: var(--muted);
}

body.sidebar-collapsed .sidebar-inner {
  align-items: center;
  gap: 14px;
  padding-right: 12px;
  padding-left: 12px;
}

body.sidebar-collapsed .sidebar-top {
  justify-items: center;
  gap: 14px;
}

body.sidebar-collapsed .sidebar-brand,
body.sidebar-collapsed .sidebar-nav {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-12px);
}

body:not(.sidebar-collapsed) .sidebar-toggle span:first-child {
  transform: translateY(3px) rotate(45deg);
}

body:not(.sidebar-collapsed) .sidebar-toggle span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

body:not(.sidebar-collapsed) .sidebar-toggle.has-custom-image span {
  transform: none;
}

.main-panel {
  min-width: 0;
  padding: 22px 22px 22px 0;
}

.panel-section {
  position: relative;
  display: none;
  min-height: calc(100vh - 44px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.8), rgba(255, 240, 226, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-section.is-active {
  display: block;
}

.home-panel {
  display: none;
}

.home-panel::before,
.home-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

.home-panel::before {
  top: 6%;
  left: 6%;
  width: 36vw;
  height: 36vw;
  background: radial-gradient(circle, rgba(255, 197, 134, 0.28), transparent 68%);
}

.home-panel::after {
  right: 8%;
  bottom: 4%;
  width: 30vw;
  height: 30vw;
  background: radial-gradient(circle, rgba(213, 110, 117, 0.18), transparent 70%);
}

.home-panel.is-active {
  display: grid;
  place-items: center;
}

.home-message-wrap {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.home-message {
  max-width: 10ch;
  font-size: clamp(4rem, 11vw, 8.6rem);
  line-height: 0.86;
  letter-spacing: -0.04em;
  text-align: center;
  background: linear-gradient(135deg, #9b4b45 0%, #de8354 38%, #f1b56e 70%, #bd6476 100%);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  text-shadow: 0 18px 40px rgba(211, 133, 86, 0.12);
}

.locations-panel,
.about-panel {
  padding: 28px;
}

.section-header {
  margin-bottom: 28px;
}

.locations-heading {
  max-width: 14ch;
  margin-top: 6px;
  font-size: clamp(3.3rem, 6vw, 5.8rem);
  line-height: 0.88;
  color: #713732;
}

.locations-copy {
  max-width: 54ch;
  margin: 14px 0 0;
  line-height: 1.7;
}

.gallery-grid {
  column-count: 3;
  column-gap: 22px;
}

.location-card {
  display: block;
  width: 100%;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  background: transparent;
  break-inside: avoid;
  cursor: pointer;
}

.location-card:hover {
  transform: translateY(-6px);
}

.location-card-frame {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 14px 14px 54px;
  border-radius: 30px;
  background: linear-gradient(180deg, #fffdf9 0%, #fff3e6 100%);
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: 0 22px 45px rgba(125, 70, 51, 0.16);
  transform-origin: center center;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.location-card:nth-child(odd) .location-card-frame {
  transform: rotate(-1.2deg);
}

.location-card:nth-child(3n) .location-card-frame {
  transform: rotate(1.4deg);
}

.location-card:hover .location-card-frame {
  transform: translateY(-2px) rotate(0.2deg);
  box-shadow: 0 30px 58px rgba(125, 70, 51, 0.2);
}

.location-card-frame::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(240, 177, 124, 0.18), rgba(214, 110, 96, 0.16));
}

.location-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 10px 20px rgba(100, 51, 38, 0.08);
}

.about-blank {
  min-height: calc(100vh - 96px);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 249, 243, 0.72), rgba(254, 236, 224, 0.88));
  border: 1px dashed rgba(130, 76, 56, 0.22);
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(70, 32, 28, 0.42);
  backdrop-filter: blur(18px);
  cursor: pointer;
}

.lightbox-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(340px, 0.62fr);
  gap: 24px;
  width: calc(100vw - 24px);
  height: calc(100vh - 24px);
  margin: 12px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(255, 238, 226, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 34px;
  box-shadow: 0 40px 90px rgba(87, 40, 32, 0.22);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 245, 0.94);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.lightbox-media-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 20px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(248, 201, 150, 0.24), rgba(239, 155, 113, 0.14));
}

.lightbox-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  object-fit: contain;
  box-shadow: 0 26px 45px rgba(99, 48, 37, 0.14);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(140, 79, 60, 0.18);
  border-radius: 999px;
  background: rgba(255, 249, 243, 0.92);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transform: translateY(-50%);
  cursor: pointer;
}

.lightbox-nav span {
  font-size: 1.15rem;
  font-weight: 700;
}

.lightbox-nav:hover:not(:disabled) {
  transform: translateY(calc(-50% - 2px));
  box-shadow: 0 18px 34px rgba(125, 70, 51, 0.16);
}

.lightbox-nav:disabled {
  opacity: 0.42;
  box-shadow: none;
  cursor: default;
}

.lightbox-nav-prev {
  left: 18px;
}

.lightbox-nav-next {
  right: 18px;
}

.lightbox-meta {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 48px 12px 12px 4px;
}

.lightbox-meta h2 {
  margin-top: 10px;
  font-size: clamp(2.8rem, 4vw, 3.7rem);
  line-height: 0.9;
  color: #6e3531;
}

.detail-description {
  margin: 18px 0 0;
  font-size: 1.02rem;
  line-height: 1.8;
}

.detail-facts {
  display: grid;
  gap: 16px;
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(140, 79, 60, 0.14);
}

.detail-facts div {
  display: grid;
  gap: 8px;
}

.detail-facts dt {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-facts dd {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  line-height: 1.7;
}

.maps-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(140, 79, 60, 0.2);
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.88);
  color: #7b4139;
  font-weight: 700;
  box-shadow: none;
}

.home-shortcut:hover,
.maps-link:hover,
.lightbox-close:hover,
.sidebar-toggle:hover {
  transform: translateY(-2px);
}

@media (max-width: 1120px) {
  .gallery-grid {
    column-count: 2;
  }

  .lightbox-dialog {
    grid-template-columns: 1fr;
  }

  .lightbox-media-wrap {
    min-height: 46vh;
  }

  .lightbox-meta {
    overflow: auto;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  body.sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px 16px 0;
  }

  .sidebar-inner {
    height: auto;
  }

  body.sidebar-collapsed .sidebar-inner {
    align-items: flex-start;
    gap: 24px;
    padding-right: 18px;
    padding-left: 18px;
  }

  body.sidebar-collapsed .sidebar-top {
    justify-items: flex-start;
    gap: 20px;
  }

  .main-panel {
    padding: 16px;
  }
}

@media (max-width: 720px) {
  .locations-panel,
  .about-panel {
    padding: 20px;
  }

  .gallery-grid {
    column-count: 1;
  }

  .lightbox-dialog {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    margin: 6px;
    padding: 12px;
    border-radius: 24px;
  }

  .lightbox-media-wrap {
    padding: 14px;
    min-height: 38vh;
  }

  .lightbox-nav {
    width: 46px;
    height: 46px;
  }

  .lightbox-nav-prev {
    left: 10px;
  }

  .lightbox-nav-next {
    right: 10px;
  }

  .lightbox-meta {
    padding: 34px 6px 6px;
  }

  .home-message {
    font-size: clamp(3.4rem, 14vw, 5.9rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
