/* ===== Reset & Base ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", sans-serif;
  background: #FAF6EE;
  color: #2E3A2C;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: #6B8E5A; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.3; }
ul { padding-left: 1.25em; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid #ECE3D2;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #2E3A2C;
}
.brand:hover { text-decoration: none; }
.brand-icon { width: 32px; height: 32px; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: #4A5749; font-weight: 500; }
.site-nav a:hover { color: #6B8E5A; text-decoration: none; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #FAF6EE 0%, #EFEBDB 100%);
  padding: 80px 0 64px;
  text-align: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #6B8E5A;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: #2E3A2C;
  margin-bottom: 16px;
}
.subtitle {
  max-width: 640px;
  margin: 0 auto 32px;
  color: #5B6657;
  font-size: 1.05rem;
}
.cta-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: #6B8E5A;
  color: #FAF6EE;
  box-shadow: 0 4px 12px rgba(107, 142, 90, 0.25);
}
.btn-primary:hover { background: #5C7C4D; }
.btn-ghost {
  background: transparent;
  color: #6B8E5A;
  border-color: #6B8E5A;
}
.btn-ghost:hover { background: #6B8E5A; color: #FAF6EE; }

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #ECE3D2;
  margin: 48px 0 32px;
}
.tab {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 500;
  color: #6B6B6B;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: #6B8E5A; }
.tab.active {
  color: #6B8E5A;
  border-bottom-color: #6B8E5A;
  font-weight: 700;
}

/* ===== Section ===== */
.tab-panel { padding-bottom: 64px; }
.section-title {
  font-size: 1.75rem;
  color: #2E3A2C;
  margin-bottom: 8px;
}
.section-desc {
  color: #5B6657;
  margin-bottom: 32px;
}
.sub-title {
  font-size: 1.25rem;
  margin: 40px 0 20px;
  color: #2E3A2C;
}

/* ===== Recipe Grid ===== */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.recipe-card {
  background: #FFFFFF;
  border: 1px solid #ECE3D2;
  border-radius: 16px;
  padding: 22px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(46, 58, 44, 0.08);
  border-color: #C7D6B6;
}
.card-day {
  display: inline-block;
  background: #EFEBDB;
  color: #6B8E5A;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  align-self: flex-start;
}
.card-emoji { font-size: 2.2rem; }
.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2E3A2C;
  margin: 0;
}
.card-nutri {
  color: #6B6B6B;
  font-size: 0.9rem;
  margin: 0;
}
.card-arrow {
  color: #6B8E5A;
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: auto;
}

/* ===== Guide Grid ===== */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 16px;
}
.guide-card {
  background: #FFFFFF;
  border: 1px solid #ECE3D2;
  border-radius: 16px;
  padding: 24px;
}
.guide-card h3 {
  font-size: 1.2rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-card.good h3 { color: #6B8E5A; }
.guide-card.bad h3 { color: #D4836A; }
.guide-card ul { margin: 0; }
.guide-card li { margin-bottom: 6px; color: #4A5749; }

/* ===== Tips Grid ===== */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.tip-card {
  background: #FFFFFF;
  border: 1px solid #ECE3D2;
  border-radius: 14px;
  padding: 20px;
}
.tip-icon { font-size: 1.6rem; margin-bottom: 8px; }
.tip-card h4 { font-size: 1.05rem; color: #2E3A2C; margin-bottom: 8px; }
.tip-card p { margin: 0; color: #4A5749; font-size: 0.93rem; }

/* ===== Disclaimer ===== */
.disclaimer {
  margin-top: 40px;
  padding: 20px 24px;
  background: #EFEBDB;
  border-left: 4px solid #D4836A;
  border-radius: 8px;
}
.disclaimer h4 { color: #2E3A2C; margin-bottom: 6px; }
.disclaimer p { margin: 0; color: #4A5749; font-size: 0.92rem; }

/* ===== Footer ===== */
.site-footer {
  background: #2E3A2C;
  color: #C7D6B6;
  padding: 24px 0;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 40px;
}

/* ===== To Top Button ===== */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #6B8E5A;
  color: #FAF6EE;
  border: none;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(46, 58, 44, 0.2);
  z-index: 40;
  transition: opacity 0.2s;
}
.to-top:hover { background: #5C7C4D; }

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 58, 44, 0.5);
  backdrop-filter: blur(2px);
}
.modal-content {
  position: relative;
  background: #FAF6EE;
  border-radius: 18px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(46, 58, 44, 0.25);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: #6B6B6B;
  padding: 4px 10px;
  border-radius: 6px;
}
.modal-close:hover { background: #EFEBDB; color: #2E3A2C; }

.modal-day {
  display: inline-block;
  background: #6B8E5A;
  color: #FAF6EE;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.modal h2 { color: #2E3A2C; font-size: 1.6rem; margin-bottom: 8px; }
.modal-subtitle { color: #6B6B6B; margin-bottom: 24px; }
.modal h3 {
  color: #6B8E5A;
  font-size: 1.05rem;
  margin: 24px 0 10px;
  border-left: 3px solid #6B8E5A;
  padding-left: 10px;
}
.modal ul, .modal ol { color: #4A5749; }
.modal li { margin-bottom: 6px; }
.nutri-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid #ECE3D2;
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}
.nutri-item { text-align: center; }
.nutri-item .v { font-size: 1.15rem; font-weight: 700; color: #6B8E5A; display: block; }
.nutri-item .l { font-size: 0.78rem; color: #6B6B6B; }
.help-box {
  background: #EFEBDB;
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 16px;
  color: #4A5749;
  font-size: 0.95rem;
}
.help-box strong { color: #6B8E5A; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero { padding: 56px 0 40px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 0.9rem; }
  .modal-content { padding: 24px 20px; }
  .recipe-grid { grid-template-columns: 1fr; }
  .tabs { font-size: 0.95rem; }
  .tab { padding: 10px 14px; }
}
@media (max-width: 480px) {
  .site-nav { display: none; }
  .header-inner { justify-content: center; }
  .modal-content { padding: 20px 16px; }
}
