:root {
  --bg: #f7f1ea;
  --surface: rgba(255, 252, 248, 0.9);
  --surface-strong: #fffdf9;
  --line: rgba(132, 101, 92, 0.12);
  --line-strong: rgba(132, 101, 92, 0.2);
  --text: #433330;
  --muted: #8d7870;
  --accent: #8e5f5d;
  --accent-strong: #6e4a48;
  --gold: #cdb393;
  --shadow: 0 18px 40px rgba(113, 81, 71, 0.07);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --page-width: 430px;
  --safe-top: max(16px, env(safe-area-inset-top));
  --safe-bottom: max(20px, env(safe-area-inset-bottom));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top, rgba(205, 179, 147, 0.16), transparent 28%),
    linear-gradient(180deg, #fbf8f3 0%, #f5eee7 52%, #f7f1ea 100%);
  color: var(--text);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
}

img {
  display: block;
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: var(--safe-top);
  backdrop-filter: blur(18px);
  background: rgba(251, 247, 241, 0.88);
  border-bottom: 1px solid rgba(142, 95, 93, 0.08);
}

.topbar__inner {
  width: min(calc(100% - 24px), var(--page-width));
  margin: 0 auto;
  padding: 10px 4px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar__brand {
  font-weight: 700;
  color: #8a5a58;
}

.page {
  width: min(calc(100% - 24px), var(--page-width));
  margin: 0 auto;
  padding: 18px 0 calc(88px + var(--safe-bottom));
}

.hero {
  margin-top: 8px;
}

.hero__surface {
  position: relative;
  overflow: hidden;
  padding: 26px 20px 20px;
  border: 1px solid rgba(142, 95, 93, 0.1);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(205, 179, 147, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 246, 240, 0.98));
  box-shadow: var(--shadow);
  color: var(--text);
}

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

.hero__surface::before {
  width: 170px;
  height: 170px;
  top: -64px;
  right: -58px;
  background: radial-gradient(circle, rgba(205, 179, 147, 0.28), transparent 70%);
}

.hero__surface::after {
  width: 144px;
  height: 144px;
  right: 22px;
  bottom: -74px;
  border: 1px solid rgba(182, 145, 136, 0.18);
}

.hero__eyebrow,
.section__kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9a7671;
}

.hero h1,
.section h2,
.modal h3 {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: lining-nums tabular-nums;
}

.hero h1 {
  font-size: clamp(34px, 8vw, 42px);
  line-height: 0.98;
  max-width: 7em;
}

.hero__subtitle {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(67, 51, 48, 0.78);
}

.hero__intro {
  margin: 12px 0 0;
  max-width: 19em;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(67, 51, 48, 0.78);
}

.hero__stats {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  min-height: 78px;
  padding: 12px 10px;
  border: 1px solid rgba(142, 95, 93, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.stat-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 22px;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
}

.stat-card span {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.section {
  margin-top: 22px;
}

.section__heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 14px;
}

.section__heading--compact {
  align-items: center;
}

.section h2 {
  font-size: 31px;
  line-height: 1;
  color: var(--accent-strong);
}

.section__hint {
  margin: 0;
  max-width: 11em;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  text-align: right;
}

.calendar-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fffefb;
  box-shadow: var(--shadow);
  cursor: zoom-in;
}

.calendar-card img {
  aspect-ratio: auto;
  object-fit: contain;
}

.calendar-card__tip {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(86, 68, 65, 0.74);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.activity-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(87, 52, 43, 0.08);
  cursor: pointer;
  transition:
    transform 0.36s var(--ease),
    box-shadow 0.36s var(--ease),
    border-color 0.36s var(--ease);
}

.activity-card:active {
  transform: scale(0.98);
}

.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(87, 52, 43, 0.12);
  border-color: rgba(126, 38, 48, 0.2);
}

.activity-card__image {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(205, 179, 147, 0.14), rgba(205, 179, 147, 0.04));
}

.activity-card__image img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.activity-card__content {
  padding: 12px 12px 14px;
}

.activity-card__category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(142, 95, 93, 0.08);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.activity-card__date {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: lining-nums tabular-nums;
}

.activity-card__title {
  margin: 6px 0 0;
  display: -webkit-box;
  min-height: 2.9em;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--text);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-card__summary {
  margin: 6px 0 0;
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.footer {
  margin-top: 24px;
  padding: 18px 18px calc(18px + var(--safe-bottom));
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 251, 246, 0.72);
  box-shadow: 0 12px 24px rgba(87, 52, 43, 0.05);
}

.footer p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.footer p + p {
  margin-top: 6px;
}

.back-to-top {
  position: fixed;
  right: 16px;
  bottom: calc(20px + var(--safe-bottom));
  z-index: 18;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(142, 95, 93, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(87, 30, 38, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition:
    opacity 0.28s var(--ease),
    transform 0.28s var(--ease);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.modal,
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}

.modal.is-open,
.image-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__backdrop,
.image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 22, 22, 0.48);
  backdrop-filter: blur(8px);
}

.modal__sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(calc(100% - 16px), var(--page-width));
  max-height: min(88vh, 760px);
  overflow: auto;
  border-radius: 28px 28px 0 0;
  background: #fffaf4;
  transform: translate(-50%, 28px);
  transition: transform 0.34s var(--ease);
  box-shadow: 0 -14px 42px rgba(67, 37, 32, 0.18);
}

.modal.is-open .modal__sheet {
  transform: translate(-50%, 0);
}

.modal__close,
.image-lightbox__close {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(86, 68, 65, 0.74);
  color: #fff;
  font-size: 12px;
}

.modal__media-wrap {
  padding: 16px 16px 0;
}

.modal__media {
  border-radius: 20px;
  background: #f3ece3;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.modal__content {
  padding: 18px 18px calc(24px + var(--safe-bottom));
}

.modal__tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(142, 95, 93, 0.08);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.modal h3 {
  margin-top: 10px;
  font-size: 34px;
  line-height: 0.95;
  color: var(--accent-strong);
}

.modal__meta {
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.modal__meta div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(117, 84, 72, 0.12);
}

.modal__meta dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.modal__meta dd,
.modal__summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

.modal__meta dd {
  font-variant-numeric: lining-nums tabular-nums;
}

.modal__summary {
  margin-top: 14px;
}

.image-lightbox__figure {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(calc(100% - 24px), 520px);
  margin: 0;
  transform: translate(-50%, -50%) scale(0.96);
  transition: transform 0.3s var(--ease);
}

.image-lightbox.is-open .image-lightbox__figure {
  transform: translate(-50%, -50%) scale(1);
}

.image-lightbox__figure img {
  border-radius: 24px;
  box-shadow: 0 24px 48px rgba(21, 11, 10, 0.24);
}

.image-lightbox__figure figcaption {
  margin-top: 10px;
  text-align: center;
  color: #fff8f1;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.is-locked {
  overflow: hidden;
}

@media (max-width: 360px) {
  .page {
    width: min(calc(100% - 18px), var(--page-width));
  }

  .hero__surface {
    padding-inline: 16px;
  }

  .hero__stats {
    grid-template-columns: 1fr;
  }

  .activity-grid {
    gap: 10px;
  }

  .activity-card__content {
    padding-inline: 10px;
  }
}
