:root {
  --bg: #faf8f2;
  --surface: #ffffff;
  --surface-soft: #f3f0e8;
  --surface-green: #dcebe7;
  --text: #2f2b24;
  --muted: #7a7468;
  --line: #e4ded2;
  --primary: #5f8f86;
  --primary-strong: #3f6f66;
  --accent: #b99a5b;
  --danger: #b86b5d;
  --shadow: 0 18px 60px rgba(83, 72, 49, 0.08);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(220, 235, 231, 0.9), transparent 28rem),
    linear-gradient(180deg, #fbfaf5 0%, var(--bg) 38%, #f5f1e8 100%);
  color: var(--text);
  font-family:
    Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

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

.app-shell {
  width: min(100%, 1180px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 0 88px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 10px 18px;
  background: rgba(250, 248, 242, 0.88);
  border-bottom: 1px solid rgba(228, 222, 210, 0.7);
  backdrop-filter: blur(16px);
}

.brand {
  font-size: 18px;
  font-weight: 700;
}

.icon-button,
.avatar-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
}

.icon-button {
  gap: 4px;
}

.icon-button span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
}

.avatar-button {
  background: var(--surface-green);
  color: var(--primary-strong);
  font-weight: 700;
}

.screen {
  min-height: calc(100dvh - 152px);
  padding: 18px;
  outline: none;
}

.page {
  display: none;
  animation: enter 260ms ease both;
}

.page.is-active {
  display: block;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  display: grid;
  gap: 24px;
  min-height: 420px;
  padding: 44px 0 28px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 14px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--primary-strong);
  font-size: 13px;
}

.hero h1,
.page-title {
  max-width: 780px;
  margin: 0;
  font-family: "Songti SC", "STSong", "PingFang SC", serif;
  font-size: clamp(34px, 9vw, 68px);
  font-weight: 650;
  line-height: 1.08;
}

.hero-copy,
.lead {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.button.ghost {
  background: transparent;
  color: var(--primary-strong);
}

.button:active,
.service-card:active,
.option:active,
.slot:active {
  transform: scale(0.99);
}

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

.triad-item {
  min-height: 98px;
  padding: 16px;
  border: 1px solid rgba(228, 222, 210, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.triad-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-strong);
  font-size: 20px;
}

.triad-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.section {
  padding: 38px 0;
  border-top: 1px solid rgba(228, 222, 210, 0.72);
}

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

.section h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.section-note {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 18px;
}

.pathway-grid,
.entry-grid {
  display: grid;
  gap: 14px;
}

.pathway-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.entry-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-feature,
.teaching-feature,
.places-feature {
  display: grid;
  gap: 22px;
  align-items: stretch;
}

.about-feature {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

.about-story,
.founder-panel {
  padding: 26px;
  border: 1px solid rgba(228, 222, 210, 0.78);
  background: rgba(255, 255, 255, 0.5);
}

.about-story h3,
.founder-panel h3 {
  max-width: 680px;
  margin: 0 0 14px;
  font-family: "Songti SC", "STSong", "PingFang SC", serif;
  font-size: 28px;
  line-height: 1.35;
}

.about-story p,
.founder-panel p,
.layer-item p {
  color: var(--muted);
  line-height: 1.85;
}

.value-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.value-strip span {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-green);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
}

.image-frame {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(228, 222, 210, 0.8);
  background: var(--surface-soft);
  box-shadow: var(--shadow);
}

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

.image-frame figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  width: fit-content;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(47, 43, 36, 0.78);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  backdrop-filter: blur(8px);
}

.entry-photo {
  min-height: 480px;
}

.core-layers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.layer-item {
  min-height: 290px;
  padding: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(243, 240, 232, 0.58));
}

.layer-item .layer-key {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 0 40px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-family: "Songti SC", "STSong", "PingFang SC", serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.layer-item h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

.pathway-item {
  min-height: 210px;
  padding: 18px;
  border-top: 2px solid var(--primary);
  background: rgba(255, 255, 255, 0.48);
}

.pathway-item span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.pathway-item h3 {
  margin: 34px 0 10px;
  font-family: "Songti SC", "STSong", "PingFang SC", serif;
  font-size: 26px;
}

.pathway-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.teaching-feature {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
}

.founder-panel {
  min-height: 410px;
}

.metric-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 12px;
}

.metric-rail div {
  min-height: 88px;
  padding: 14px 10px;
  border-top: 2px solid var(--accent);
  background: rgba(250, 248, 242, 0.76);
}

.metric-rail strong,
.metric-rail span {
  display: block;
}

.metric-rail strong {
  margin-bottom: 6px;
  font-size: 25px;
}

.metric-rail span,
.fine-note {
  color: var(--muted);
  font-size: 13px;
}

.teaching-gallery {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(240px, 1.28fr);
  gap: 12px;
  min-height: 600px;
}

.tall-photo,
.practice-photo {
  min-height: 100%;
}

.places-feature {
  grid-template-columns: minmax(360px, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
}

.landscape-photo {
  aspect-ratio: 4 / 3;
}

.places-feature h2 {
  max-width: 520px;
  font-family: "Songti SC", "STSong", "PingFang SC", serif;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.25;
}

.place-list {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.place-list p {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.place-list strong {
  flex: 0 0 96px;
}

.place-list span {
  flex: 1;
  color: var(--muted);
  line-height: 1.6;
}

.panel,
.service-card,
.booking-summary,
.result-card,
.profile-block {
  border: 1px solid rgba(228, 222, 210, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.panel {
  padding: 20px;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.panel p,
.panel li {
  color: var(--muted);
  line-height: 1.7;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.timeline-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.timeline-body {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.link-list {
  display: grid;
  gap: 10px;
}

.external-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.page-head {
  max-width: 760px;
  padding: 28px 0 24px;
}

.page-head .page-title {
  font-size: clamp(30px, 7vw, 52px);
}

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  display: grid;
  gap: 12px;
  min-height: 220px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
}

.service-card h3 {
  margin: 0;
  font-size: 19px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.booking-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.stepper {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.step {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.step.is-done {
  background: var(--primary);
}

.date-strip,
.slot-grid,
.option-grid {
  display: grid;
  gap: 10px;
}

.date-strip {
  grid-template-columns: repeat(4, 1fr);
}

.date-button,
.slot,
.option {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  cursor: pointer;
}

.date-button.is-selected,
.slot.is-selected,
.option.is-selected {
  border-color: var(--primary);
  background: var(--surface-green);
  color: var(--primary-strong);
  font-weight: 700;
}

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

.booking-summary {
  position: sticky;
  top: 82px;
  padding: 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.summary-row strong {
  color: var(--text);
  text-align: right;
}

.assessment-shell {
  max-width: 720px;
  margin: 0 auto;
}

.progress {
  height: 6px;
  margin: 12px 0 28px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 220ms ease;
}

.question-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.question-card h2 {
  margin: 0 0 20px;
  font-size: 24px;
  line-height: 1.35;
}

.option {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  text-align: left;
}

.result-card {
  padding: 24px;
}

.result-card h2 {
  margin: 0 0 12px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.metric {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.metric strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.profile-block {
  padding: 18px;
}

.profile-block h3 {
  margin: 0 0 12px;
}

.profile-block p,
.profile-block li {
  color: var(--muted);
  line-height: 1.7;
}

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.tab {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 54px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
}

.tab-icon {
  font-size: 18px;
}

.tab.is-active {
  background: var(--surface-green);
  color: var(--primary-strong);
  font-weight: 700;
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  line-height: 1.7;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  box-shadow: var(--shadow);
  animation: enter 180ms ease both;
}

@media (min-width: 860px) {
  .app-shell {
    padding-bottom: 0;
  }

  .screen {
    padding: 24px 40px 48px;
  }

  .tabbar {
    position: sticky;
    bottom: auto;
    top: 64px;
    display: flex;
    justify-content: center;
    padding: 10px 40px;
    background: rgba(250, 248, 242, 0.84);
  }

  .tab {
    min-width: 110px;
    min-height: 42px;
    grid-auto-flow: column;
  }
}

@media (max-width: 820px) {
  .content-grid,
  .booking-flow,
  .services,
  .entry-grid,
  .about-feature,
  .core-layers,
  .teaching-feature,
  .places-feature,
  .profile-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .pathway-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .date-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .slot-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .booking-summary {
    position: static;
  }

  .section-header {
    display: block;
  }

  .entry-photo {
    min-height: 380px;
  }

  .teaching-gallery {
    grid-template-columns: minmax(112px, 0.68fr) minmax(0, 1.32fr);
    min-height: 390px;
  }

  .metric-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .pathway-grid {
    grid-template-columns: 1fr;
  }

  .about-story,
  .founder-panel,
  .layer-item {
    padding: 18px;
  }

  .about-story h3,
  .founder-panel h3 {
    font-size: 24px;
  }

  .core-layers {
    gap: 10px;
  }

  .layer-item {
    min-height: auto;
  }

  .layer-item .layer-key {
    margin-bottom: 22px;
  }

  .entry-photo {
    min-height: 310px;
  }

  .teaching-gallery {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .tall-photo {
    aspect-ratio: 3 / 4;
  }

  .practice-photo {
    aspect-ratio: 4 / 3;
  }

  .place-list p {
    display: block;
  }

  .place-list strong,
  .place-list span {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
