:root {
  --ink: #172a24;
  --muted: #66756f;
  --paper: #f7f3e9;
  --paper-deep: #eee7d9;
  --surface: #fffdf8;
  --green: #1f4d3d;
  --green-2: #326b56;
  --jade: #8eb5a0;
  --line: #d9d7ca;
  --amber: #bb7a2b;
  --spring: #5d8d69;
  --summer: #3d8f7d;
  --autumn: #b46f32;
  --winter: #466683;
  --shadow: 0 20px 60px rgb(31 77 61 / 9%);
  --radius-lg: 28px;
  --radius-md: 18px;
  --content: 1180px;
  color-scheme: light;
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 6%, rgb(142 181 160 / 20%), transparent 30rem),
    radial-gradient(circle at 92% 26%, rgb(187 122 43 / 9%), transparent 25rem),
    var(--paper);
  font-size: 16px;
  line-height: 1.7;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 8px 14px;
  color: white;
  background: var(--green);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(calc(100% - 40px), var(--content));
  min-height: 80px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid rgb(31 77 61 / 14%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.3;
}

.brand strong {
  letter-spacing: 0.1em;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header-nav a {
  color: #455750;
  text-decoration: none;
  font-size: 14px;
}

.header-nav a:hover {
  color: var(--green);
}

.quiet-button {
  justify-self: end;
  padding: 9px 16px;
  color: var(--green);
  background: transparent;
  border: 1px solid rgb(31 77 61 / 25%);
  border-radius: 999px;
  cursor: pointer;
}

.quiet-button:hover {
  background: rgb(255 255 255 / 50%);
}

main {
  overflow: clip;
}

.hero,
.recipe-section,
.guide-section,
.sources-section,
.medical-notice,
footer {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.hero {
  position: relative;
  min-height: 660px;
  padding: 82px 0 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
  align-items: center;
  gap: 70px;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 330px;
  height: 330px;
  right: -120px;
  top: 30px;
  border: 1px solid rgb(31 77 61 / 13%);
  border-radius: 50%;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(52px, 7.2vw, 88px);
  line-height: 1.08;
}

.hero h1 > span {
  display: block;
  white-space: nowrap;
}

.hero-intro {
  max-width: 620px;
  margin: 28px 0 0;
  color: #4b5c55;
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 34px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: white;
  background: var(--green);
  border: 1px solid var(--green);
  box-shadow: 0 12px 30px rgb(31 77 61 / 18%);
}

.primary-button:hover {
  background: #173f31;
}

.text-link {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.hero-stats {
  display: flex;
  gap: 34px;
  margin: 48px 0 0;
}

.hero-stats div {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 7px;
}

.hero-stats dt {
  color: var(--green);
  font-family: "Songti SC", "STSong", serif;
  font-size: 30px;
  font-weight: 700;
}

.hero-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.season-wheel {
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: 1;
  justify-self: end;
  border: 1px solid rgb(31 77 61 / 16%);
  border-radius: 50%;
}

.season-wheel::before,
.season-wheel::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px dashed rgb(31 77 61 / 16%);
  border-radius: 50%;
}

.season-wheel::after {
  inset: 29%;
  border-style: solid;
  background: rgb(255 253 248 / 58%);
}

.wheel-center {
  position: absolute;
  z-index: 2;
  inset: 35%;
  display: grid;
  place-content: center;
  text-align: center;
}

.wheel-center span {
  color: var(--amber);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.wheel-center strong {
  margin: 6px 0 2px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
}

.wheel-center small {
  color: var(--muted);
  white-space: nowrap;
}

.season-orbit {
  position: absolute;
  z-index: 3;
  display: grid;
  min-width: 105px;
  min-height: 105px;
  place-content: center;
  text-align: center;
  color: white;
  border: 8px solid var(--paper);
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.season-orbit span {
  font-family: "Songti SC", "STSong", serif;
  font-size: 27px;
  line-height: 1.1;
}

.season-orbit small {
  margin-top: 3px;
  font-size: 10px;
  white-space: nowrap;
}

.season-spring {
  top: -1%;
  left: 36%;
  background: var(--spring);
}

.season-summer {
  top: 38%;
  right: -4%;
  background: var(--summer);
}

.season-autumn {
  right: 38%;
  bottom: -4%;
  background: var(--autumn);
}

.season-winter {
  top: 39%;
  left: -4%;
  background: var(--winter);
}

.medical-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 24px 28px;
  background: #fff9e9;
  border: 1px solid #ead5a8;
  border-radius: var(--radius-md);
}

.notice-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff9e9;
  background: var(--amber);
  border-radius: 50%;
  font-weight: 800;
}

.medical-notice strong {
  color: #6b451c;
}

.medical-notice p {
  margin: 4px 0 0;
  color: #6d614e;
  font-size: 14px;
}

.recipe-section,
.guide-section,
.sources-section {
  padding: 100px 0 20px;
  scroll-margin-top: 24px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.64fr);
  align-items: end;
  gap: 48px;
  margin-bottom: 32px;
}

.section-heading h2 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.15;
}

.section-lead,
.result-summary {
  justify-self: end;
  max-width: 520px;
  margin: 0 0 7px;
  color: var(--muted);
}

.result-summary {
  font-size: 14px;
}

.filter-panel {
  position: sticky;
  z-index: 10;
  top: 10px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: rgb(255 253 248 / 90%);
  border: 1px solid rgb(31 77 61 / 13%);
  border-radius: 20px;
  box-shadow: 0 12px 35px rgb(31 77 61 / 8%);
  backdrop-filter: blur(16px);
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 14px;
}

.search-box:focus-within {
  border-color: var(--green-2);
}

.search-box span {
  color: var(--green);
  font-size: 23px;
  transform: rotate(-20deg);
}

.search-box input {
  width: 100%;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-box input::placeholder {
  color: #84918c;
}

.season-filters {
  display: flex;
  gap: 6px;
}

.filter-chip {
  min-height: 42px;
  padding: 0 14px;
  color: #52635c;
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: white;
  background: var(--green);
}

.type-filter {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.type-filter select {
  min-height: 42px;
  padding: 0 30px 0 12px;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 12px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.recipe-card {
  position: relative;
  display: flex;
  min-height: 360px;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 26px rgb(31 77 61 / 4%);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.recipe-card::before {
  content: "";
  position: absolute;
  width: 84px;
  height: 84px;
  right: -34px;
  top: -34px;
  background: var(--card-accent, var(--green));
  border-radius: 50%;
  opacity: 0.13;
}

.recipe-card:hover {
  border-color: rgb(31 77 61 / 35%);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.recipe-card[data-season="春季"] {
  --card-accent: var(--spring);
}

.recipe-card[data-season="夏季"] {
  --card-accent: var(--summer);
}

.recipe-card[data-season="秋季"] {
  --card-accent: var(--autumn);
}

.recipe-card[data-season="冬季"] {
  --card-accent: var(--winter);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.card-meta span {
  padding: 3px 8px;
  color: var(--green);
  background: rgb(142 181 160 / 17%);
  border-radius: 999px;
  font-size: 11px;
}

.card-meta .official-badge {
  color: #80521f;
  background: #fff1cf;
}

.recipe-number {
  margin-left: auto;
  color: #96a09c;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.recipe-card h3 {
  margin: 20px 0 10px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 26px;
  line-height: 1.25;
}

.card-ingredients {
  margin: 0;
  color: #43554e;
  font-size: 14px;
}

.card-method {
  margin: 18px 0 0;
  padding-top: 16px;
  color: #5c6c65;
  border-top: 1px dashed var(--line);
  font-size: 13px;
}

.card-benefits {
  display: -webkit-box;
  margin: 15px 0 20px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: auto;
  padding: 0;
  color: var(--green);
  background: none;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

.card-open span {
  transition: transform 160ms ease;
}

.card-open:hover span {
  transform: translateX(4px);
}

.empty-state {
  margin: 34px 0 0;
  padding: 70px 20px;
  text-align: center;
  background: rgb(255 253 248 / 60%);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}

.empty-state > span {
  color: var(--jade);
  font-size: 58px;
}

.empty-state h3 {
  margin: 6px 0;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--muted);
}

.secondary-button {
  color: var(--green);
  background: white;
  border: 1px solid rgb(31 77 61 / 30%);
}

.guide-section {
  margin-top: 90px;
  padding-inline: 52px;
  padding-bottom: 68px;
  background: var(--green);
  border-radius: var(--radius-lg);
}

.guide-section .eyebrow {
  color: #d8b57a;
}

.guide-section h2,
.guide-section .section-lead {
  color: white;
}

.guide-section .section-heading {
  padding-top: 66px;
}

.guide-section .section-lead {
  opacity: 0.74;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgb(255 255 255 / 18%);
  border-left: 1px solid rgb(255 255 255 / 18%);
}

.guide-grid article {
  min-height: 230px;
  padding: 28px 24px;
  color: white;
  border-right: 1px solid rgb(255 255 255 / 18%);
  border-bottom: 1px solid rgb(255 255 255 / 18%);
}

.guide-grid article > span {
  color: #d8b57a;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.guide-grid h3 {
  margin: 30px 0 8px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 21px;
}

.guide-grid p {
  margin: 0;
  color: rgb(255 255 255 / 70%);
  font-size: 13px;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.risk-grid div {
  padding: 18px 20px;
  background: rgb(255 255 255 / 7%);
  border-radius: 12px;
}

.risk-grid strong {
  color: #f2d5a4;
}

.risk-grid p {
  margin: 3px 0 0;
  color: rgb(255 255 255 / 68%);
  font-size: 13px;
}

.sources-section {
  padding-bottom: 110px;
}

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

.source-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 74px;
  border-bottom: 1px solid var(--line);
}

.source-item span {
  color: #9aa49f;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.source-item p {
  margin: 0;
  font-size: 14px;
}

.source-item a {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.source-item a:hover {
  text-decoration: underline;
}

.source-date {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 34px 0 44px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer strong {
  color: var(--green);
}

footer p {
  margin: 3px 0 0;
  font-size: 12px;
}

.recipe-dialog {
  width: min(calc(100% - 32px), 720px);
  max-height: min(86vh, 820px);
  padding: 36px;
  overflow-y: auto;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 24px;
  box-shadow: 0 30px 100px rgb(0 0 0 / 28%);
}

.recipe-dialog::backdrop {
  background: rgb(17 31 26 / 58%);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--green);
  background: var(--paper);
  border: 0;
  border-radius: 50%;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-right: 48px;
}

.dialog-meta span {
  padding: 4px 9px;
  color: var(--green);
  background: rgb(142 181 160 / 18%);
  border-radius: 999px;
  font-size: 11px;
}

.dialog-number {
  margin: 30px 0 0;
  color: var(--amber);
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.recipe-dialog h2 {
  margin: 4px 0 22px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 38px;
}

.dialog-details {
  margin: 0;
}

.dialog-details div {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.dialog-details dt {
  margin-bottom: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.dialog-details dd {
  margin: 0;
  color: #42524c;
}

.dialog-warning {
  margin: 10px 0 0;
  padding: 14px 16px;
  color: #6b451c;
  background: #fff5df;
  border-radius: 10px;
  font-size: 13px;
}

.noscript-message {
  position: fixed;
  z-index: 50;
  inset: auto 20px 20px;
  padding: 14px;
  color: white;
  text-align: center;
  background: #7d2d24;
  border-radius: 10px;
}

:focus-visible {
  outline: 3px solid #d8a654;
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .season-wheel {
    width: min(78vw, 470px);
    justify-self: center;
  }

  .filter-panel {
    grid-template-columns: 1fr auto;
  }

  .search-box {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 680px) {
  .site-header,
  .hero,
  .recipe-section,
  .medical-notice,
  footer {
    width: min(calc(100% - 28px), var(--content));
  }

  .site-header {
    min-height: 70px;
  }

  .brand small,
  .quiet-button {
    display: none;
  }

  .hero {
    min-height: 0;
    padding: 54px 0 60px;
  }

  .hero h1 {
    font-size: clamp(48px, 15vw, 68px);
  }

  .hero-intro {
    font-size: 16px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .hero-stats {
    gap: 18px;
  }

  .hero-stats div {
    display: block;
  }

  .hero-stats dd {
    margin-top: -3px;
  }

  .season-wheel {
    width: min(88vw, 420px);
  }

  .season-orbit {
    min-width: 82px;
    min-height: 82px;
    border-width: 6px;
  }

  .season-orbit span {
    font-size: 22px;
  }

  .season-orbit small {
    font-size: 9px;
  }

  .medical-notice {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .recipe-section,
  .guide-section,
  .sources-section {
    padding-top: 74px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .section-lead,
  .result-summary {
    justify-self: start;
  }

  .filter-panel {
    position: relative;
    top: auto;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .season-filters {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
  }

  .filter-chip {
    min-height: 38px;
    padding: 0 6px;
    font-size: 13px;
  }

  .type-filter {
    justify-content: space-between;
  }

  .type-filter select {
    flex: 1;
  }

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

  .recipe-card {
    min-height: 330px;
  }

  .guide-section {
    width: 100%;
    margin-top: 70px;
    padding-inline: 20px;
    border-radius: 0;
  }

  .guide-section .section-heading {
    padding-top: 54px;
  }

  .guide-grid,
  .risk-grid {
    grid-template-columns: 1fr;
  }

  .guide-grid article {
    min-height: 190px;
  }

  .sources-section {
    width: min(calc(100% - 28px), var(--content));
  }

  .source-item {
    grid-template-columns: 34px 1fr;
    padding: 14px 0;
  }

  .source-item a {
    grid-column: 2;
  }

  footer {
    align-items: start;
    flex-direction: column;
    gap: 18px;
  }

  .recipe-dialog {
    padding: 28px 22px;
    border-radius: 18px;
  }
}

@media print {
  body {
    background: white;
    font-size: 10pt;
  }

  .site-header,
  .hero,
  .medical-notice,
  .filter-panel,
  .guide-section,
  .sources-section,
  footer,
  .card-open {
    display: none !important;
  }

  .recipe-section {
    width: 100%;
    padding: 0;
  }

  .section-heading {
    display: block;
  }

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

  .recipe-card {
    min-height: auto;
    break-inside: avoid;
    padding: 12px;
    box-shadow: none;
  }

  .card-benefits {
    display: block;
    overflow: visible;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
