:root {
  --ink: #152d2a;
  --muted: #6f7b75;
  --cream: #f7f4ed;
  --paper: #fffdf9;
  --line: #e9e4d9;
  --mint: #d8f0dd;
  --lime: #bee875;
  --coral: #f57f69;
  --sun: #ffc95c;
  --lavender: #e8ddff;
  --shadow: 0 18px 50px rgba(21,45,42,.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 85% 4%, #fff0bf 0, transparent 24rem), var(--cream); }
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }
.app-shell { max-width: 1440px; margin: auto; padding: 20px clamp(16px, 4vw, 52px) 56px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 34px; }
.brand { display: flex; gap: 11px; align-items: center; font-weight: 850; letter-spacing: -.04em; font-size: 1.35rem; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--ink); color: white; font-size: 1.45rem; box-shadow: 0 6px 0 #c6dd77; transform: rotate(-4deg); }
.eyebrow { margin: 0 0 6px; color: var(--coral); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; max-width: 720px; font-size: clamp(2.05rem, 5vw, 4.4rem); line-height: .98; letter-spacing: -.065em; }
h2 { font-size: 1.35rem; letter-spacing: -.04em; }
h3 { margin-bottom: 5px; font-size: 1.05rem; letter-spacing: -.025em; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 26px; }
.hero-copy { max-width: 780px; }
.hero-copy > p:last-child { color: var(--muted); max-width: 610px; font-size: 1.04rem; line-height: 1.6; }
.hero-art { display: none; min-width: 160px; padding: 20px; border-radius: 28px; background: var(--lime); font-size: 4rem; transform: rotate(4deg); box-shadow: var(--shadow); }
.actions, .button-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 10px 15px; border-radius: 14px; color: var(--ink); background: white; border: 1px solid var(--line); font-weight: 750; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(21,45,42,.1); }
.btn.primary { color: white; background: var(--ink); border-color: var(--ink); }
.btn.accent { background: var(--coral); color: white; border-color: var(--coral); }
.btn.small { min-height: 34px; padding: 7px 10px; border-radius: 10px; font-size: .82rem; }
.btn.danger { color: #ad4938; background: #fff2ef; border-color: #ffd8d1; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 28px; }
.stat { padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.stat:nth-child(2) { background: var(--mint); }
.stat:nth-child(3) { background: var(--sun); }
.stat-label { color: var(--muted); font-size: .78rem; font-weight: 800; }
.stat-value { margin-top: 8px; font-size: 1.5rem; font-weight: 850; letter-spacing: -.04em; }
.plan-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.week-label { color: var(--muted); font-size: .9rem; font-weight: 750; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(140px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 7px; }
.day-card { min-height: 330px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.day-card.weekend { background: #fbfaf6; }
.day-head { display: flex; justify-content: space-between; align-items: center; padding: 13px 14px 10px; border-bottom: 1px solid var(--line); }
.day-name { font-size: .78rem; font-weight: 850; text-transform: capitalize; }
.day-number { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--ink); background: var(--lime); font-size: .78rem; font-weight: 850; }
.meal-image { display: block; width: 100%; height: 126px; object-fit: cover; background: linear-gradient(135deg, var(--mint), var(--sun)); }
.meal-body { padding: 14px; }
.meal-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 13px; }
.pill { display: inline-flex; align-items: center; width: max-content; padding: 4px 7px; border-radius: 99px; background: var(--lavender); color: #654896; font-size: .7rem; font-weight: 800; }
.pill.green { background: var(--mint); color: #2b6849; }
.meal-description { color: var(--muted); min-height: 39px; font-size: .79rem; line-height: 1.45; }
.empty-meal { display: grid; place-items: center; min-height: 256px; padding: 18px; text-align: center; color: var(--muted); }
.empty-meal .emoji { display: block; margin-bottom: 8px; font-size: 2rem; }
.alternative-select { display: none; width: 100%; margin-top: 8px; }
.alternative-select.open { display: block; }
.select, .field input, .field select { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: white; }
.select:focus, input:focus { outline: 3px solid #d8f0dd; border-color: #75b786; }
.lower-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin-top: 28px; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.panel-header h2 { margin-bottom: 0; }
.list { display: grid; gap: 9px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 14px; background: #faf8f2; }
.list-row strong { display: block; font-size: .88rem; }
.list-row small { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1.3fr .65fr .75fr auto; gap: 8px; align-items: end; }
.field label { display: block; margin: 0 0 5px; color: var(--muted); font-size: .72rem; font-weight: 750; }
.notice { margin: 10px 0; padding: 11px 13px; border-radius: 12px; background: #fff4d5; color: #785716; font-size: .82rem; }
.notice.error { background: #fff0ed; color: #a43e2e; }
.notice.success { background: var(--mint); color: #276041; }
.leftover { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.muted { color: var(--muted); }
.tiny { font-size: .76rem; }
.login-shell { display: grid; place-items: center; min-height: 92vh; padding: 20px; }
.login-card { width: min(100%, 480px); padding: clamp(25px, 7vw, 52px); border: 1px solid var(--line); border-radius: 32px; background: var(--paper); box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 35px; }
.login-card h1 { font-size: clamp(2.4rem, 9vw, 4.5rem); }
.login-card input { width: 100%; margin: 10px 0 12px; min-height: 50px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; }
.loading-card { display: grid; place-items: center; min-height: 70vh; color: var(--muted); }
.loader { width: 22px; height: 22px; display: inline-block; margin-right: 8px; vertical-align: -5px; border: 3px solid #d8f0dd; border-top-color: var(--coral); border-radius: 50%; animation: spin .8s linear infinite; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 5; max-width: 340px; padding: 13px 16px; border-radius: 14px; color: white; background: var(--ink); box-shadow: var(--shadow); animation: rise .2s ease; }
@keyframes spin { to { transform: rotate(360deg); } } @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (min-width: 850px) { .hero-art { display: block; } }
@media (max-width: 1050px) { .week-grid { grid-template-columns: repeat(7, 185px); } .lower-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .app-shell { padding: 14px 14px 40px; } .topbar { margin-bottom: 24px; } .topbar .brand { font-size: 1.1rem; } .hero { display: block; } .hero .actions { margin-top: 18px; } .stats { gap: 7px; } .stat { padding: 13px 10px; border-radius: 16px; } .stat-label { font-size: .68rem; } .stat-value { font-size: 1.08rem; } .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .wide { grid-column: 1 / -1; } .panel { padding: 17px; border-radius: 20px; } }
