/* ============================================================
   Yaoshi Health Calendar — Design System
   Apple-inspired gold/white theme
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */

:root {
  /* Colors — Gold */
  --color-gold-primary: #B8860B;
  --color-gold-light: #D4A843;
  --color-gold-gradient: linear-gradient(135deg, #D4A843, #B8860B);
  --color-gold-gradient-reverse: linear-gradient(135deg, #B8860B, #D4A843);
  --color-cream: #F5ECD7;

  /* Colors — Neutrals */
  --color-bg-page: #FAF8F5;
  --color-bg-card: #FFFFFF;
  --color-bg-frosted: rgba(255, 255, 255, 0.72);
  --color-text-primary: #1D1D1F;
  --color-text-secondary: #6E6E73;
  --color-text-tertiary: #AEAEB2;
  --color-divider: rgba(0, 0, 0, 0.06);

  /* Colors — Semantic */
  --color-success: #34C759;
  --color-warning: #FF9500;
  --color-danger: #FF3B30;

  /* Typography — Font Families */
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --font-reading: "Noto Serif SC", "Songti SC", Georgia, serif;

  /* Typography — Sizes */
  --text-large-title-size: 34px;
  --text-title-1-size: 28px;
  --text-title-2-size: 22px;
  --text-title-3-size: 20px;
  --text-body-size: 17px;
  --text-caption-size: 13px;
  --text-reading-size: 18px;

  /* Spacing */
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;
  --space-80: 80px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-card: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-nav: 0 1px 0 rgba(0, 0, 0, 0.08);
  --shadow-bottom-nav: 0 -1px 0 rgba(0, 0, 0, 0.08);
  --shadow-gold: 0 4px 16px rgba(184, 134, 11, 0.24);

  /* Transitions */
  --transition-base: 350ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-fast: 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-slow: 500ms cubic-bezier(0.25, 0.1, 0.25, 1);

  /* Layout */
  --nav-height: 48px;
  --bottom-nav-height: 56px;
  --content-max-width: 1200px;
  --sidebar-width: 260px;

  /* Z-index */
  --z-base: 1;
  --z-card: 10;
  --z-nav: 100;
  --z-bottom-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;
}

/* ============================================================
   2. RESET & BASE STYLES
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  font-size: var(--text-body-size);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-gold-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold-light);
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Focus visible — accessibility */
:focus-visible {
  outline: 2px solid var(--color-gold-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   3. TYPOGRAPHY CLASSES
   ============================================================ */

.large-title {
  font-family: var(--font-ui);
  font-size: var(--text-large-title-size);
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.2;
  color: var(--color-text-primary);
}

.title-1 {
  font-family: var(--font-ui);
  font-size: var(--text-title-1-size);
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.25;
  color: var(--color-text-primary);
}

.title-2 {
  font-family: var(--font-ui);
  font-size: var(--text-title-2-size);
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.3;
  color: var(--color-text-primary);
}

.title-3 {
  font-family: var(--font-ui);
  font-size: var(--text-title-3-size);
  font-weight: 600;
  letter-spacing: -0.1px;
  line-height: 1.35;
  color: var(--color-text-primary);
}

.body-text {
  font-family: var(--font-ui);
  font-size: var(--text-body-size);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-primary);
}

.caption {
  font-family: var(--font-ui);
  font-size: var(--text-caption-size);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.reading-text {
  font-family: var(--font-reading);
  font-size: var(--text-reading-size);
  font-weight: 400;
  line-height: 1.8;
  color: var(--color-text-primary);
}

/* Text color utilities */
.text-primary   { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary  { color: var(--color-text-tertiary); }
.text-gold      { color: var(--color-gold-primary); }

/* ============================================================
   4. NAVIGATION BAR
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  height: var(--nav-height);
  background: var(--color-bg-frosted);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--shadow-nav);
  display: flex;
  align-items: center;
  padding: 0 var(--space-20);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  text-decoration: none;
}

.nav__logo-icon {
  width: 28px;
  height: 28px;
  background: var(--color-gold-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.nav__logo-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.1px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: var(--space-6) var(--space-12);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
}

.nav__link:hover {
  color: var(--color-text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.nav__link--active {
  color: var(--color-gold-primary);
  font-weight: 600;
}

.nav__link--active:hover {
  color: var(--color-gold-primary);
  background: rgba(184, 134, 11, 0.06);
}

/* Language segmented control */
.lang-toggle {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 0;
}

.lang-toggle__btn {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: none;
  background: none;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  line-height: 1.4;
}

.lang-toggle__btn:hover {
  color: var(--color-text-primary);
}

.lang-toggle__btn--active {
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ============================================================
   5. CARD STYLES
   ============================================================ */

/* Base card */
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.card:active {
  transform: scale(0.98);
  transition-duration: var(--transition-fast);
}

.card__body {
  padding: var(--space-20);
}

.card__header {
  padding: var(--space-20) var(--space-20) 0;
}

.card__footer {
  padding: 0 var(--space-20) var(--space-20);
}

/* Hero card — gold gradient left border */
.card--hero {
  position: relative;
  border-left: 4px solid transparent;
  background-clip: padding-box;
}

.card--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -4px;
  border-radius: var(--radius-card);
  background: var(--color-gold-gradient);
  z-index: -1;
}

/* Alternative hero approach using border-image */
.card--hero-border {
  border-left: 4px solid var(--color-gold-primary);
  background: var(--color-bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
}

.card--hero-border::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-gold-gradient);
  border-radius: var(--radius-card) 0 0 var(--radius-card);
}

.card--hero-border:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* Grouped card — inset list style */
.card--grouped {
  background: var(--color-bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card--grouped .card-row {
  display: flex;
  align-items: center;
  padding: var(--space-16) var(--space-20);
  border-bottom: 1px solid var(--color-divider);
  transition: background var(--transition-fast);
}

.card--grouped .card-row:last-child {
  border-bottom: none;
}

.card--grouped .card-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* Frosted glass card */
.card--frosted {
  background: var(--color-bg-frosted);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card--frosted:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* Cream card */
.card--cream {
  background: var(--color-cream);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

/* ============================================================
   6. LAYOUT UTILITIES
   ============================================================ */

/* Page container */
.page-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--space-20);
  padding-top: calc(var(--nav-height) + var(--space-24));
  padding-bottom: var(--space-64);
}

/* On mobile, account for bottom nav */
@media (max-width: 767px) {
  .page-container {
    padding-bottom: calc(var(--bottom-nav-height) + var(--space-32));
  }
}

/* Section */
.section {
  margin-bottom: var(--space-40);
}

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-16);
}

.section__title {
  font-size: var(--text-title-2-size);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.2px;
}

.section__link {
  font-size: var(--text-caption-size);
  font-weight: 500;
  color: var(--color-gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Grid utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-16);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-16);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-16);
}

@media (max-width: 1023px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Flex utilities */
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-start {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-4  { gap: var(--space-4); }
.gap-8  { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }
.gap-16 { gap: var(--space-16); }
.gap-20 { gap: var(--space-20); }
.gap-24 { gap: var(--space-24); }

/* Spacing utilities */
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }
.mt-24 { margin-top: var(--space-24); }
.mt-32 { margin-top: var(--space-32); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }
.mb-24 { margin-bottom: var(--space-24); }
.mb-32 { margin-bottom: var(--space-32); }

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-in {
  animation: fadeIn 0.5s var(--transition-base) both;
}

.fade-in-scale {
  animation: fadeInScale 0.4s var(--transition-base) both;
}

/* Staggered delay utilities */
.delay-1 { animation-delay: 50ms; }
.delay-2 { animation-delay: 100ms; }
.delay-3 { animation-delay: 150ms; }
.delay-4 { animation-delay: 200ms; }
.delay-5 { animation-delay: 250ms; }

/* ============================================================
   7. UI COMPONENTS
   ============================================================ */

/* Gold tag / badge */
.gold-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-8);
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.15), rgba(184, 134, 11, 0.12));
  border: 1px solid rgba(184, 134, 11, 0.25);
  color: var(--color-gold-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.gold-tag--solid {
  background: var(--color-gold-gradient);
  border-color: transparent;
  color: #fff;
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--color-divider);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--color-gold-gradient);
  border-radius: var(--radius-pill);
  transition: width var(--transition-slow);
  transform-origin: left center;
}

.progress-bar--thin {
  height: 3px;
}

.progress-bar--thick {
  height: 10px;
}

/* Reading progress bar — fixed top */
.reading-progress-bar {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: var(--z-nav);
}

.reading-progress-bar__fill {
  height: 100%;
  background: var(--color-gold-gradient);
  width: 0%;
  transition: width 100ms linear;
}

/* Lotus divider */
.lotus-divider {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin: var(--space-32) 0;
  color: var(--color-text-tertiary);
}

.lotus-divider::before,
.lotus-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-divider);
}

.lotus-divider__icon {
  font-size: 16px;
  color: var(--color-gold-light);
  opacity: 0.7;
  flex-shrink: 0;
}

/* Thin plain divider */
.divider {
  height: 1px;
  background: var(--color-divider);
  margin: var(--space-24) 0;
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-24);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  border: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn--gold {
  background: var(--color-gold-gradient);
  color: #fff;
  box-shadow: var(--shadow-gold);
}

.btn--gold:hover {
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.36);
  filter: brightness(1.05);
}

.btn--ghost {
  background: transparent;
  color: var(--color-gold-primary);
  border: 1.5px solid var(--color-gold-primary);
}

.btn--ghost:hover {
  background: rgba(184, 134, 11, 0.06);
}

.btn--sm {
  font-size: 13px;
  padding: var(--space-8) var(--space-16);
}

/* ============================================================
   8. MOBILE BOTTOM TAB BAR
   ============================================================ */

.bottom-nav {
  display: none; /* hidden on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-bottom-nav);
  height: var(--bottom-nav-height);
  background: var(--color-bg-frosted);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--shadow-bottom-nav);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav__inner {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.bottom-nav__tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text-tertiary);
  transition: color var(--transition-fast);
  padding: var(--space-6) var(--space-4);
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav__tab:hover {
  color: var(--color-text-secondary);
}

.bottom-nav__tab--active {
  color: var(--color-gold-primary);
}

.bottom-nav__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.bottom-nav__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .bottom-nav {
    display: block;
  }

  /* Hide desktop nav links on mobile */
  .nav__links {
    display: none;
  }
}

/* ============================================================
   9. SHICHEN TIMELINE
   ============================================================ */

.shichen-timeline {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: var(--space-8);
  padding: var(--space-8) 0 var(--space-12);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.shichen-timeline::-webkit-scrollbar {
  display: none;
}

.shichen-pill {
  flex-shrink: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-16);
  background: var(--color-bg-card);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1.5px solid transparent;
  min-width: 72px;
}

.shichen-pill:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}

.shichen-pill--active {
  border-color: var(--color-gold-primary);
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.1), rgba(184, 134, 11, 0.08));
}

.shichen-pill__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.shichen-pill--active .shichen-pill__name {
  color: var(--color-gold-primary);
}

.shichen-pill__time {
  font-size: 11px;
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

.shichen-pill__element {
  font-size: 10px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: rgba(0, 0, 0, 0.04);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

/* ============================================================
   10. CALENDAR GRID
   ============================================================ */

.calendar-grid-wrapper {
  background: var(--color-bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Weekday header row */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--color-divider);
  padding: var(--space-8) 0 var(--space-4);
}

.calendar-weekday {
  font-size: var(--text-caption-size);
  font-weight: 500;
  text-align: center;
  color: var(--color-text-tertiary);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: var(--space-4);
}

.calendar-weekday--weekend {
  color: var(--color-gold-light);
}

/* Calendar body grid */
.calendar-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

/* Day cell */
.calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding: var(--space-8) var(--space-4);
  min-height: 72px;
  border-bottom: 1px solid var(--color-divider);
  border-right: 1px solid var(--color-divider);
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
}

.calendar-day:nth-child(7n) {
  border-right: none;
}

.calendar-day:hover {
  background: rgba(0, 0, 0, 0.02);
}

.calendar-day--other-month {
  opacity: 0.3;
}

.calendar-day--weekend .calendar-day__solar {
  color: var(--color-gold-primary);
}

/* Today highlight */
.calendar-day--today {
  background: rgba(184, 134, 11, 0.04);
}

.calendar-day--today .calendar-day__solar {
  background: var(--color-gold-gradient);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  box-shadow: var(--shadow-gold);
}

.calendar-day--selected {
  background: rgba(184, 134, 11, 0.06);
}

.calendar-day--selected .calendar-day__solar {
  border: 1.5px solid var(--color-gold-primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Day cell inner elements */
.calendar-day__solar {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.calendar-day__lunar {
  font-size: 10px;
  color: var(--color-text-tertiary);
  line-height: 1;
  white-space: nowrap;
}

/* Jieqi (solar term) marker */
.calendar-day__jieqi {
  font-size: 9px;
  font-weight: 600;
  color: var(--color-gold-primary);
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.15), rgba(184, 134, 11, 0.10));
  border: 1px solid rgba(184, 134, 11, 0.2);
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.3;
}

/* Event dot indicator */
.calendar-day__dots {
  display: flex;
  gap: 2px;
  justify-content: center;
  position: absolute;
  bottom: 4px;
}

.calendar-day__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-gold-light);
}

/* Calendar nav header */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-16) var(--space-20);
  border-bottom: 1px solid var(--color-divider);
}

.calendar-nav__title {
  font-size: var(--text-title-3-size);
  font-weight: 600;
  color: var(--color-text-primary);
}

.calendar-nav__btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-gold-primary);
  background: rgba(184, 134, 11, 0.08);
  border: none;
  transition: background var(--transition-fast), transform var(--transition-fast);
  font-size: 16px;
}

.calendar-nav__btn:hover {
  background: rgba(184, 134, 11, 0.15);
  transform: scale(1.05);
}

/* ============================================================
   11. READINGS PAGE
   ============================================================ */

.readings-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--space-32);
  align-items: start;
  padding-top: calc(var(--nav-height) + var(--space-32));
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding-left: var(--space-20);
  padding-right: var(--space-20);
  padding-bottom: var(--space-64);
}

/* Sidebar */
.readings-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-20));
  background: var(--color-bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  max-height: calc(100vh - var(--nav-height) - var(--space-40));
  display: flex;
  flex-direction: column;
}

.readings-sidebar__header {
  padding: var(--space-16) var(--space-20);
  border-bottom: 1px solid var(--color-divider);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  flex-shrink: 0;
}

.readings-sidebar__list {
  overflow-y: auto;
  flex: 1;
  padding: var(--space-8) 0;
  scrollbar-width: thin;
  scrollbar-color: var(--color-divider) transparent;
}

.readings-sidebar__list::-webkit-scrollbar {
  width: 4px;
}

.readings-sidebar__list::-webkit-scrollbar-track {
  background: transparent;
}

.readings-sidebar__list::-webkit-scrollbar-thumb {
  background: var(--color-divider);
  border-radius: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-10, 10px) var(--space-20);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast);
  border-left: 3px solid transparent;
}

.sidebar-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

.sidebar-item--active {
  background: rgba(184, 134, 11, 0.06);
  border-left-color: var(--color-gold-primary);
}

.sidebar-item__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.4;
}

.sidebar-item--active .sidebar-item__title {
  color: var(--color-gold-primary);
  font-weight: 600;
}

.sidebar-item__meta {
  font-size: 11px;
  color: var(--color-text-tertiary);
  margin-top: 2px;
}

/* TOC — table of contents within reading */
.toc {
  background: var(--color-cream);
  border-radius: var(--radius-md);
  padding: var(--space-16) var(--space-20);
  margin: var(--space-24) 0;
}

.toc__title {
  font-size: var(--text-caption-size);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-12);
}

.toc__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.toc__item {
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  transition: color var(--transition-fast);
  padding: 2px 0;
}

.toc__item::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-gold-light);
  flex-shrink: 0;
}

.toc__item:hover {
  color: var(--color-gold-primary);
}

.toc__item--active {
  color: var(--color-gold-primary);
  font-weight: 500;
}

/* Reading area */
.reading-area {
  min-width: 0; /* prevent grid blowout */
}

.reading-header {
  margin-bottom: var(--space-32);
  padding-bottom: var(--space-24);
  border-bottom: 1px solid var(--color-divider);
}

.reading-header__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}

.reading-header__title {
  font-family: var(--font-reading);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text-primary);
  letter-spacing: -0.3px;
  margin-bottom: var(--space-12);
}

.reading-header__meta {
  font-size: 14px;
  color: var(--color-text-tertiary);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
}

.reading-content {
  font-family: var(--font-reading);
  font-size: var(--text-reading-size);
  line-height: 1.8;
  color: var(--color-text-primary);
}

.reading-content h2 {
  font-family: var(--font-ui);
  font-size: var(--text-title-2-size);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-top: var(--space-40);
  margin-bottom: var(--space-16);
  letter-spacing: -0.2px;
}

.reading-content h3 {
  font-family: var(--font-ui);
  font-size: var(--text-title-3-size);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-top: var(--space-32);
  margin-bottom: var(--space-12);
}

.reading-content p {
  margin-bottom: var(--space-20);
}

.reading-content blockquote {
  border-left: 3px solid var(--color-gold-primary);
  padding: var(--space-12) var(--space-20);
  margin: var(--space-24) 0;
  background: rgba(184, 134, 11, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

.reading-content strong {
  font-weight: 600;
  color: var(--color-text-primary);
}

.reading-content em {
  color: var(--color-gold-primary);
  font-style: normal;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-10, 10px) var(--space-16);
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  border: none;
  margin-bottom: var(--space-16);
  width: 100%;
  transition: background var(--transition-fast);
}

.sidebar-toggle:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* ============================================================
   12. FOOTER
   ============================================================ */

.footer {
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-divider);
  padding: var(--space-40) var(--space-20);
}

.footer__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
  text-align: center;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-16);
}

.footer__link {
  font-size: 13px;
  color: var(--color-text-tertiary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-gold-primary);
}

.footer__copy {
  font-size: 12px;
  color: var(--color-text-tertiary);
  line-height: 1.5;
}

/* ============================================================
   13. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ---- Desktop: > 1024px (default / already above) ---- */

/* ---- Tablet: 768px – 1024px ---- */
@media (min-width: 768px) and (max-width: 1023px) {
  .page-container {
    padding-left: var(--space-20);
    padding-right: var(--space-20);
  }

  .readings-layout {
    grid-template-columns: 220px 1fr;
    gap: var(--space-24);
  }

  .calendar-day {
    min-height: 60px;
  }
}

/* ---- Mobile: < 768px ---- */
@media (max-width: 767px) {
  :root {
    --text-large-title-size: 28px;
    --text-title-1-size: 24px;
    --text-title-2-size: 20px;
    --text-title-3-size: 17px;
  }

  .page-container {
    padding-left: var(--space-16);
    padding-right: var(--space-16);
  }

  /* Readings: single column */
  .readings-layout {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-height) + var(--space-16));
    padding-bottom: calc(var(--bottom-nav-height) + var(--space-32));
  }

  .readings-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-overlay);
    border-radius: 0;
    max-height: 100vh;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    max-width: 300px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }

  .readings-sidebar--open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: calc(var(--z-overlay) - 1);
  }

  .sidebar-overlay--visible {
    display: block;
  }

  .sidebar-toggle {
    display: flex;
  }

  /* Calendar adjustments */
  .calendar-day {
    min-height: 48px;
    padding: var(--space-4) 2px;
  }

  .calendar-day__solar {
    font-size: 13px;
    width: 24px;
    height: 24px;
  }

  .calendar-day--today .calendar-day__solar {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .calendar-day__jieqi {
    font-size: 8px;
  }

  /* Nav adjustments */
  .nav__logo-text {
    font-size: 15px;
  }

  /* Reading header */
  .reading-header__title {
    font-size: 24px;
  }

  .reading-content {
    font-size: 16px;
  }

  /* Footer */
  .footer {
    padding: var(--space-32) var(--space-16);
  }
}

/* ============================================================
   14. MISCELLANEOUS UTILITIES
   ============================================================ */

/* Truncation */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Visibility */
.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* Desktop/mobile show-hide helpers */
.desktop-only { display: block; }
.mobile-only  { display: none; }

@media (max-width: 767px) {
  .desktop-only { display: none; }
  .mobile-only  { display: block; }
}

/* Scrollbar polish */
.scroll-x {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scroll-x::-webkit-scrollbar { display: none; }

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

/* ============================================================
   15. HOME CALIBRATION SLICE (2026-08-26)
   Web Liquid Glass approximation is limited to navigation and controls.
   Content surfaces stay warm and solid.
   ============================================================ */

.home-page {
  --nav-height: 56px;
  --bottom-nav-height: 64px;
  --home-gold-ink: #684700;
  --home-surface: #fffdf9;
  --home-surface-soft: #f3ecdf;
  --home-control: rgba(255, 253, 249, 0.82);
  --home-border: rgba(104, 71, 0, 0.18);
  --home-shadow: 0 18px 48px rgba(78, 58, 22, 0.08), 0 2px 8px rgba(78, 58, 22, 0.06);
  --color-text-secondary: #4f4f54;
  --color-text-tertiary: #59595f;
  min-height: 100dvh;
  background: #faf7f2;
}

.home-page .fade-in {
  animation: none;
}

.home-page :focus-visible {
  outline: 3px solid var(--home-gold-ink);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 6px;
  left: 12px;
  z-index: var(--z-modal);
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  padding: 0 16px;
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  background: var(--home-surface);
  box-shadow: var(--home-shadow);
  transform: translateY(-150%);
}

.skip-link:focus-visible {
  color: var(--color-text-primary);
  transform: translateY(0);
}

/* Navigation and controls use the frosted web approximation. */
.home-page .nav,
.home-page .bottom-nav {
  background: rgba(250, 247, 242, 0.86);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 1px 0 rgba(104, 71, 0, 0.14);
}

.home-page .nav {
  height: var(--nav-height);
  padding-right: max(14px, env(safe-area-inset-right));
  padding-left: max(14px, env(safe-area-inset-left));
}

.home-page .nav__logo,
.home-page .nav__link,
.home-page .lang-toggle__btn,
.home-page .bottom-nav__tab {
  min-width: 44px;
  min-height: 44px;
}

.home-page .nav__logo,
.home-page .nav__link {
  display: inline-flex;
  align-items: center;
}

.home-page .nav__link {
  justify-content: center;
  padding: 0 14px;
  color: var(--color-text-secondary);
}

.home-page .nav__link--active,
.home-page .nav__link--active:hover,
.home-page .bottom-nav__tab--active {
  color: var(--home-gold-ink);
}

.home-page .lang-toggle {
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84), 0 4px 12px rgba(78, 58, 22, 0.08);
}

.home-page .lang-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.home-page .lang-toggle__btn--active {
  color: var(--color-text-primary);
  background: rgba(255, 253, 249, 0.94);
}

.home-page .bottom-nav {
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.home-page .bottom-nav__inner {
  height: var(--bottom-nav-height);
}

.home-page .bottom-nav__tab {
  color: var(--color-text-secondary);
}

.home-page .bottom-nav__tab--active {
  color: var(--home-gold-ink);
}

.home-page .bottom-nav__label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
}

.home-main {
  max-width: 1120px;
  padding-top: calc(var(--nav-height) + 12px);
  padding-right: max(14px, env(safe-area-inset-right));
  padding-bottom: calc(var(--bottom-nav-height) + 48px + env(safe-area-inset-bottom, 0px));
  padding-left: max(14px, env(safe-area-inset-left));
}

.home-first-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 48px;
}

.home-page .card,
.home-reading-block,
.home-jieqi-full {
  border: 1px solid var(--home-border);
  border-radius: 22px;
  background: var(--home-surface);
  box-shadow: var(--home-shadow);
}

.home-page .card:hover,
.home-page .card:active {
  transform: none;
  box-shadow: var(--home-shadow);
}

.home-shichen-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow: visible;
  border-left: 3px solid var(--color-gold-primary);
}

.home-shichen__header,
.home-jieqi-card > header,
.home-jieqi-card__identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-shichen__header p,
.home-shichen__header time,
.home-jieqi-card > header p,
.home-jieqi-card > header span,
.home-jieqi-card time {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--color-text-secondary);
}

.home-shichen__identity h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  font-size: clamp(29px, 8vw, 42px);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--color-text-primary);
}

.home-shichen__meridian {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--home-gold-ink);
}

.home-shichen__summary {
  max-width: 48ch;
  margin-top: 8px;
  font-size: 17px;
  font-weight: 550;
  line-height: 1.45;
  color: var(--color-text-primary);
}

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

.home-shichen__meta > div:first-child {
  grid-column: 1 / -1;
}

.home-shichen__meta dt {
  margin-bottom: 1px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--color-text-secondary);
}

.home-shichen__meta dd {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text-primary);
}

.home-shichen__progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.home-shichen__progress .progress-bar {
  height: 5px;
  background: rgba(104, 71, 0, 0.14);
}

.home-shichen__progress output {
  min-width: 34px;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  color: var(--color-text-secondary);
}

.home-jieqi-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  overflow: visible;
  background: var(--home-surface-soft);
}

.home-jieqi-card > header span {
  padding: 3px 8px;
  border: 1px solid var(--home-border);
  border-radius: var(--radius-pill);
  color: var(--home-gold-ink);
  background: rgba(255, 253, 249, 0.62);
}

.home-jieqi-card__identity {
  align-items: baseline;
  flex-wrap: wrap;
}

.home-jieqi-card h2 {
  font-size: 24px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
}

.practice-disclosures {
  display: grid;
  gap: 6px;
}

.practice-disclosure {
  overflow: hidden;
  border: 1px solid rgba(104, 71, 0, 0.16);
  border-radius: 14px;
  background: var(--home-surface);
  box-shadow: 0 6px 18px rgba(78, 58, 22, 0.05);
}

.practice-disclosure > summary {
  display: flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  color: var(--color-text-primary);
  background: var(--home-control);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  list-style: none;
}

.practice-disclosure > summary::-webkit-details-marker {
  display: none;
}

.practice-disclosure > summary::marker {
  content: "";
}

.practice-disclosure > summary::after {
  content: "+";
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--home-gold-ink);
  background: rgba(184, 134, 11, 0.12);
  transition: transform var(--transition-fast);
}

.practice-disclosure[open] > summary::after {
  transform: rotate(45deg);
}

.practice-disclosure__body {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--home-border);
}

.practice-disclosure__body p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-primary);
}

.home-page #full-teaching,
.home-page #shichen-timeline {
  margin-bottom: 56px;
}

.home-page #jieqi-full {
  margin-bottom: 0;
}

.home-reading-block,
.home-jieqi-full {
  padding: clamp(22px, 4vw, 40px);
}

.home-section-heading {
  display: grid;
  gap: 5px;
  margin-bottom: 22px;
}

.home-section-heading p,
.home-section-heading span {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.home-section-heading h2 {
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
}

.home-section-heading--compact {
  margin-bottom: 12px;
}

.home-section-heading--compact h2 {
  font-size: 22px;
}

.home-reading-block__text {
  max-width: 76ch;
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-text-primary);
}

.home-source-note {
  display: grid;
  gap: 6px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--home-border);
}

.home-source-note p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.home-page .shichen-timeline {
  gap: 10px;
  margin: 0 -2px;
  padding: 4px 2px 14px;
}

.home-page .shichen-pill {
  min-width: 84px;
  min-height: 70px;
  padding: 8px 14px;
  border: 1px solid rgba(104, 71, 0, 0.14);
  border-radius: 16px;
  color: var(--color-text-primary);
  background: var(--home-control);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 8px 24px rgba(78, 58, 22, 0.06);
}

.home-page .shichen-pill--active {
  border-color: var(--color-gold-primary);
  background: #f5ead1;
}

.home-page .shichen-pill--active .shichen-pill__name {
  color: var(--home-gold-ink);
}

.home-page .shichen-pill--selected {
  box-shadow: 0 0 0 2px var(--home-gold-ink);
}

.home-page .shichen-pill__time,
.home-page .shichen-pill__element {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.home-page .shichen-pill__element {
  padding: 1px 7px;
  background: rgba(104, 71, 0, 0.08);
}

.home-page .gold-tag {
  font-size: 12px;
  color: var(--home-gold-ink);
}

.home-jieqi-full__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

.home-jieqi-full__section {
  padding-top: 18px;
  border-top: 1px solid var(--home-border);
}

.home-jieqi-full__section h3 {
  margin-bottom: 7px;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.35;
  color: var(--home-gold-ink);
}

.home-jieqi-full__section p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--color-text-primary);
}

.home-page .footer {
  background: var(--home-surface);
  border-top-color: var(--home-border);
}

.home-page .footer__copy,
.home-page .footer__link {
  font-size: 13px;
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .home-main {
    padding-top: calc(var(--nav-height) + 24px);
    padding-right: 28px;
    padding-left: 28px;
  }

  .home-first-screen {
    grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.72fr);
    grid-template-areas:
      "shichen jieqi"
      "shichen practices";
    gap: 14px;
    align-items: stretch;
    margin-bottom: 72px;
  }

  .home-first-screen__shichen { grid-area: shichen; }
  .home-first-screen__jieqi { grid-area: jieqi; }
  .home-first-screen__practices { grid-area: practices; }

  .home-shichen-card {
    padding: 24px;
  }

  .home-jieqi-full__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
  }

  .home-jieqi-full__section:first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1100px) {
  .home-main {
    padding-right: 40px;
    padding-left: 40px;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .home-page .nav,
  .home-page .bottom-nav,
  .home-page .lang-toggle,
  .practice-disclosure > summary,
  .home-page .shichen-pill {
    background: #faf7f2;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .home-page .nav,
  .home-page .bottom-nav,
  .home-page .lang-toggle,
  .practice-disclosure > summary,
  .home-page .shichen-pill {
    background: #faf7f2;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
