@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Nunito:wght@400;600;700;800&display=swap");

:root {
  --cream: #fdf8f3;
  --cream-dark: #f5ecdf;
  --paper: #ffffff;
  --peach: #f9d5c4;
  --peach-soft: #fde4d8;
  --lavender: #d9ccee;
  --lavender-soft: #ebe3f6;
  --mint: #c8e6d5;
  --mint-soft: #e0f0e8;
  --ink: #3d3142;
  --ink-soft: #6b5b72;
  --muted: #6b5b72;
  --accent: #7c6aa0;
  --accent-warm: #d88a6b;
  --line: rgba(124, 106, 160, 0.09);
  --shadow: 0 4px 20px rgba(124, 106, 160, 0.08);
  --shadow-lg: 0 12px 40px rgba(124, 106, 160, 0.12);
  --radius: 24px;
  --radius-sm: 14px;
  --radius-lg: 32px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 10% 20%, var(--peach-soft) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, var(--lavender-soft) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, var(--mint-soft) 0%, transparent 50%),
    var(--cream);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; max-width: 100%; min-width: 0; }
button { cursor: pointer; }
h1, h2, h3, .brand, .font-serif { font-family: "Fraunces", Georgia, serif; letter-spacing: 0; }
h1 em, h2 em { color: var(--accent); font-style: italic; }

.shell { margin: 0 auto; max-width: 1100px; padding: 0 24px; }
.section { padding: 68px 0; }
.site-header {
  backdrop-filter: blur(14px);
  background: rgba(253, 248, 243, 0.82);
  border-bottom: 1px solid rgba(124, 106, 160, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-row { align-items: center; display: flex; gap: 22px; justify-content: space-between; min-height: 64px; min-width: 0; }
.brand { align-items: center; display: inline-flex; flex: 0 0 auto; font-weight: 800; gap: 12px; }
nav { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 6px; justify-content: flex-end; min-width: 0; }
nav a { border-radius: 999px; color: var(--ink-soft); font-size: 0.95rem; font-weight: 800; line-height: 1.2; padding: 8px 12px; white-space: nowrap; }
nav a:hover { background: white; color: var(--accent); }

.logo-mark, .moon-icon {
  background: linear-gradient(135deg, var(--lavender) 0%, var(--peach) 100%);
  border-radius: 50%;
  box-shadow: var(--shadow);
  display: inline-block;
  position: relative;
}
.logo-mark { height: 36px; width: 36px; }
.logo-mark::after { background: var(--cream); border-radius: 50%; content: ""; height: 28px; position: absolute; right: 3px; top: 3px; width: 28px; }
.moon-icon { animation: gentle-pulse 4s ease-in-out infinite; height: 72px; width: 72px; }
.moon-icon::after { background: var(--cream); border-radius: 50%; content: ""; height: 58px; position: absolute; right: 5px; top: 5px; width: 58px; }

.home-hero { padding-bottom: 52px; padding-top: 34px; text-align: center; }
.hero-copy { margin: 0 auto; max-width: 760px; }
.hero-copy h1 { font-size: clamp(2.7rem, 7vw, 4.4rem); line-height: 1.06; margin: 16px 0 12px; }
.hero-copy p { color: var(--ink-soft); font-size: 1.15rem; margin: 0 auto; max-width: 690px; }
.eyebrow { color: var(--accent-warm); font-size: 0.76rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }

.card, .soft-card {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.card { background: rgba(255, 255, 255, 0.94); border-radius: var(--radius-lg); }
.soft-card { background: rgba(255, 255, 255, 0.76); border-radius: var(--radius); }
.pad { padding: 26px; }
.notice { background: var(--mint-soft); border: 1px solid rgba(124,106,160,0.08); border-left: 4px solid var(--mint); border-radius: var(--radius-sm); color: var(--ink-soft); line-height: 1.65; padding: 16px 18px; }
.hero-notice { margin: 22px auto 0; max-width: 760px; text-align: left; }

.calculator-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.88fr); margin: 32px auto 0; max-width: 900px; text-align: left; }
.tabs { background: white; border-radius: var(--radius-sm); box-shadow: var(--shadow); display: flex; gap: 6px; margin-bottom: 22px; padding: 6px; }
.tab-btn { background: transparent; border: 0; border-radius: 12px; color: var(--ink-soft); flex: 1; font-weight: 900; min-height: 44px; padding: 9px 12px; }
.tab-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-warm)); color: white; box-shadow: 0 4px 12px rgba(124,106,160,0.25); }
.tab-panel[hidden] { display: none; }

.field { display: grid; gap: 7px; font-size: 0.94rem; font-weight: 800; margin-bottom: 14px; min-width: 0; }
.two { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
.input, .select, .textarea {
  background: var(--cream);
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  color: var(--ink);
  min-height: 46px;
  padding: 13px 16px;
  width: 100%;
}
.input[type="time"] { appearance: none; -webkit-appearance: none; }
.textarea { min-height: 130px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { background: white; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124,106,160,0.1); outline: none; }
.btn {
  align-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: white;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
}
.btn:hover { box-shadow: 0 8px 20px rgba(124,106,160,0.25); transform: translateY(-1px); }
.btn.secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.secondary:hover { background: white; }
.full { width: 100%; }

.result-box { border: 1px dashed var(--line); border-radius: 22px; min-height: 260px; padding: 24px; text-align: center; }
.result-time { color: var(--accent); font-family: "Fraunces", Georgia, serif; font-size: 2.1rem; font-weight: 800; line-height: 1.15; margin: 8px 0; }
.muted { color: var(--muted); }
.small { color: var(--muted); font-size: 0.9rem; line-height: 1.65; }
.meal-result { text-align: left; }
.meal-list { display: grid; gap: 12px; margin: 16px 0; }
.meal-block { background: rgba(253, 248, 243, 0.72); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.meal-block h3 { font-size: 1.04rem; margin: 0 0 8px; }
.meal-block ul { margin: 0; padding-left: 1.1rem; }

.feature-grid, .article-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.article-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-head { align-items: end; display: flex; gap: 18px; justify-content: space-between; margin-bottom: 28px; }
.section-head h2, .prose h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); line-height: 1.08; margin: 10px 0 0; }
.soft-card h3 { font-size: 1.32rem; line-height: 1.16; margin: 10px 0; }
.soft-card p { color: var(--muted); }

.newsletter-grid, .premium-grid, .faq-grid { display: grid; gap: 28px; grid-template-columns: 0.85fr 1.15fr; }
.inline-form { display: grid; gap: 12px; grid-template-columns: 1fr auto; }
.status { color: var(--accent); font-weight: 900; margin-top: 12px; }

.prose { margin: 0 auto; max-width: 820px; padding: 52px 22px 86px; }
.prose h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin: 42px 0 14px; }
.prose p, .prose li { color: var(--muted); font-size: 1.04rem; line-height: 1.8; }
.prose ul { padding-left: 1.2rem; }
.faq-list { display: grid; gap: 14px; }
details summary { cursor: pointer; font-size: 1.1rem; font-weight: 900; }

.admin-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { font-family: "Fraunces", Georgia, serif; font-size: 2.2rem; font-weight: 800; margin: 0; }
table { border-collapse: collapse; width: 100%; }
td, th { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; }

.site-footer { background: rgba(255,253,249,0.66); border-top: 1px solid var(--line); padding: 42px 0; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1.4fr 1fr 1fr; }
.footer-title { color: var(--ink); font-weight: 900; }
.site-footer p, .site-footer a { color: var(--muted); display: block; font-size: 0.95rem; line-height: 1.7; margin: 7px 0; }

.decorative-clouds { inset: 0; pointer-events: none; position: fixed; z-index: 0; }
.cloud { animation: float 20s ease-in-out infinite; background: currentColor; border-radius: 999px; opacity: 0.24; position: fixed; }
.cloud::before, .cloud::after { background: currentColor; border-radius: 999px; content: ""; position: absolute; }
.cloud-1 { color: var(--peach); height: 30px; left: 5%; top: 12%; width: 86px; }
.cloud-2 { animation-delay: -5s; color: var(--lavender); height: 36px; right: 7%; top: 62%; width: 104px; }
.cloud-3 { animation-delay: -10s; color: var(--mint); height: 28px; right: 15%; top: 32%; width: 76px; }
.cloud::before { height: 44px; left: 18px; top: -18px; width: 44px; }
.cloud::after { height: 36px; right: 16px; top: -10px; width: 36px; }
body > header, body > main, body > footer { position: relative; z-index: 1; }

@keyframes gentle-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes float { 0%, 100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-20px) translateX(10px); } }

@media (max-width: 860px) {
  .shell { padding: 0 16px; }
  .section { padding: 48px 0; }
  .calculator-grid, .newsletter-grid, .premium-grid, .faq-grid, .footer-grid { grid-template-columns: 1fr; }
  .feature-grid, .article-grid, .article-grid.four, .admin-grid { grid-template-columns: 1fr; }
  .two, .inline-form { grid-template-columns: 1fr; }
  .section-head { align-items: stretch; flex-direction: column; }
  .decorative-clouds { display: none; }
  .btn { width: 100%; }
}

@media (max-width: 520px) {
  .site-header { position: relative; }
  .header-row {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    padding-bottom: 12px;
    padding-top: 12px;
  }
  .brand {
    font-size: 1.05rem;
    justify-content: center;
  }
  .logo-mark {
    height: 30px;
    width: 30px;
  }
  .logo-mark::after {
    height: 23px;
    width: 23px;
  }
  nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  nav::-webkit-scrollbar {
    display: none;
  }
  nav a {
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid var(--line);
    flex: 0 0 auto;
    font-size: 0.82rem;
    min-width: max-content;
    padding: 8px 10px;
    text-align: center;
    white-space: nowrap;
  }
  .home-hero {
    padding-top: 22px;
  }
  .hero-copy h1 {
    font-size: clamp(2.15rem, 13vw, 2.85rem);
  }
  .card {
    border-radius: 22px;
  }
  .pad {
    padding: 18px;
  }
  .tabs {
    gap: 4px;
    padding: 4px;
  }
  .tab-btn {
    font-size: 0.86rem;
    min-height: 42px;
    padding: 8px 6px;
  }
  .field {
    font-size: 0.9rem;
  }
  .input,
  .select,
  .textarea {
    font-size: 16px;
    min-height: 48px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .calculator-grid {
    margin-top: 22px;
  }
}

@media (max-width: 360px) {
  .shell {
    padding: 0 12px;
  }
  .hero-copy h1 {
    font-size: 2.05rem;
  }
}

@media (max-width: 700px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
  }

  .shell,
  .calculator-grid,
  .card,
  .pad,
  form,
  .field,
  .two,
  .result-box {
    max-width: 100%;
    min-width: 0;
  }

  .card,
  .field,
  .result-box {
    overflow: hidden;
  }

  .input,
  .select,
  .textarea,
  input[type="time"],
  input[type="number"],
  input[type="email"],
  input[type="password"] {
    box-sizing: border-box !important;
    display: block !important;
    font-size: 16px !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  input[type="time"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    text-align: center;
  }
}
