:root {
  color-scheme: light;
  --ink: #202528;
  --muted: #667176;
  --line: #dce2e3;
  --paper: #f5f1ea;
  --panel: #ffffff;
  --brand: #0f6f69;
  --brand-dark: #0a504c;
  --rose: #b75d69;
  --gold: #b8893b;
  --shadow: 0 14px 34px rgba(32, 37, 40, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0, var(--paper) 360px),
    var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid rgba(32, 37, 40, 0.08);
  background: rgba(255, 255, 255, 0.92);
  padding: 18px clamp(18px, 5vw, 56px);
  backdrop-filter: blur(12px);
}

.label {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.line-link,
.album-link,
.copy-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
  font: inherit;
}

.line-link {
  background: var(--brand);
  color: #fff;
  padding: 0 16px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 111, 105, 0.22);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.intro {
  display: grid;
  gap: 18px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 26px;
}

.intro p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.intro-title {
  color: var(--ink) !important;
  font-size: 22px !important;
  font-weight: 900;
  line-height: 1.45 !important;
}

.search-field {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.search-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.search-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(32, 37, 40, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 0 14px;
  box-shadow: 0 10px 24px rgba(32, 37, 40, 0.06);
}

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 9px 14px;
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(32, 37, 40, 0.05);
}

.album-section {
  margin-top: 36px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.section-title h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: 0;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.album-card {
  overflow: hidden;
  border: 1px solid rgba(32, 37, 40, 0.1);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.album-card:hover {
  box-shadow: 0 18px 44px rgba(32, 37, 40, 0.14);
  transform: translateY(-2px);
}

.album-cover {
  position: relative;
  display: grid;
  min-height: 184px;
  place-items: center;
  background:
    linear-gradient(140deg, rgba(15, 111, 105, 0.9), rgba(183, 93, 105, 0.76)),
    linear-gradient(45deg, #e7dfd2, #c9d8d5);
  background-position: center;
  background-size: cover;
  color: #fff;
  padding: 22px;
}

.album-cover[data-place="yangmingshan"] {
  background:
    linear-gradient(140deg, rgba(41, 86, 73, 0.92), rgba(184, 137, 59, 0.82)),
    linear-gradient(45deg, #dfe9df, #c6d2b4);
}

.album-code {
  display: none;
}

.album-body {
  display: grid;
  gap: 12px;
  padding: 15px;
}

.album-body h3 {
  min-height: 50px;
  margin-bottom: 0;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: 0;
}

.album-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.album-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.album-link {
  border: 0;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 111, 105, 0.16);
}

.secondary-link {
  border: 1px solid rgba(15, 111, 105, 0.22);
  background: #eef7f4;
  color: var(--brand-dark);
}

.copy-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.copy-button.copied {
  border-color: rgba(15, 111, 105, 0.35);
  color: var(--brand-dark);
}

.album-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(32, 37, 40, 0.52);
  padding: 20px;
}

.album-dialog[aria-hidden="false"] {
  display: flex;
}

.dialog-open {
  overflow: hidden;
}

.album-dialog-panel {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(32, 37, 40, 0.28);
  padding: 22px;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.dialog-close {
  position: sticky;
  top: 0;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 7px 10px;
}

.album-dialog-panel h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
  line-height: 1.25;
}

.dialog-preview {
  display: grid;
  min-height: 300px;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(15, 111, 105, 0.9), rgba(183, 93, 105, 0.76)),
    linear-gradient(45deg, #e7dfd2, #c9d8d5);
  background-position: center;
  background-size: cover;
  color: #fff;
  font-size: 58px;
  font-weight: 900;
  margin-bottom: 16px;
  text-align: center;
}

.dialog-preview[data-place="yangmingshan"] {
  background:
    linear-gradient(140deg, rgba(41, 86, 73, 0.92), rgba(184, 137, 59, 0.82)),
    linear-gradient(45deg, #dfe9df, #c6d2b4);
}

.album-dialog-panel p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.photo-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  background: #edf0ef;
  object-fit: cover;
}

@media (max-width: 640px) {
  body {
    background:
      linear-gradient(180deg, #ffffff 0, #ffffff 180px, var(--paper) 420px),
      var(--paper);
  }

  .topbar {
    align-items: center;
    padding: 16px;
  }

  .topbar h1 {
    font-size: 30px;
  }

  .line-link {
    min-height: 38px;
    padding: 0 12px;
    font-size: 14px;
  }

  main {
    width: min(100% - 24px, 1180px);
    padding-top: 20px;
  }

  .intro {
    gap: 14px;
    margin-bottom: 26px;
    padding-bottom: 18px;
  }

  .intro-title {
    font-size: 20px !important;
  }

  .intro p {
    font-size: 15px;
    line-height: 1.65;
  }

  .quick-nav {
    flex-wrap: nowrap;
    margin: 0 -12px;
    overflow-x: auto;
    padding: 0 12px 4px;
    scrollbar-width: none;
  }

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

  .quick-nav a {
    flex: 0 0 auto;
    padding: 10px 13px;
    font-size: 14px;
  }

  .section-title {
    display: block;
    margin-bottom: 12px;
  }

  .section-title h2 {
    font-size: 25px;
  }

  .album-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .album-cover {
    min-height: 230px;
  }

  .album-body h3 {
    min-height: auto;
    font-size: 20px;
  }

  .album-dialog {
    align-items: stretch;
    padding: 0;
  }

  .album-dialog-panel {
    width: 100%;
    max-height: none;
    border-radius: 0;
    padding: 16px 14px 22px;
  }

  .album-dialog-panel h2 {
    font-size: 23px;
  }

  .dialog-header {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: -16px -14px 14px;
    background: rgba(255, 255, 255, 0.94);
    padding: 14px;
    backdrop-filter: blur(12px);
  }

  .dialog-close {
    min-height: 38px;
  }

  .dialog-preview {
    min-height: 235px;
    font-size: 46px;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
  }

  .dialog-actions {
    position: sticky;
    bottom: 0;
    margin: 16px -14px -22px;
    background: rgba(255, 255, 255, 0.94);
    padding: 12px 14px;
    backdrop-filter: blur(12px);
  }
}
