@font-face { font-family: Bodoni; src: url(/fonts/BodoniModa_400Regular.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Bodoni; font-style: italic; src: url(/fonts/BodoniModa_400Regular_Italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Figtree; src: url(/fonts/Figtree_400Regular.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Figtree; font-weight: 600; src: url(/fonts/Figtree_600SemiBold.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Figtree; font-weight: 800; src: url(/fonts/Figtree_800ExtraBold.woff2) format('woff2'); font-display: swap; }

:root {
  --bg: #FCF1F2; --paper: #FFFFFF; --blush: #F7E1E6; --ink: #2B0F25; --ink2: #7B5570; --line: #EDD3DB;
  --ruby: #B3305F; --pivoine: #E98AA7; --lilas: #C6B1E6; --gold: #C29A45; --goldSoft: #F6EAD0; --sage: #6F9C82; --sageSoft: #E1EFE6;
  --velvet: #2A0E24; --onVelvet: #FBE9EF;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Figtree, system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.45; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .45; cursor: default; }
h1, h2, h3 { font-family: Bodoni, Georgia, serif; font-weight: 400; margin: 0; line-height: 1.1; }
h1 { font-size: clamp(32px, 4vw, 48px); }
h1 em { color: var(--ruby); }
h2 { font-size: 24px; }
h3 { font-size: 19px; margin-top: 8px; }
.kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ruby); margin: 0 0 6px; }
.muted { color: var(--ink2); }
.small { font-size: 13px; }
.lead { font-size: 18px; max-width: 60ch; color: var(--ink2); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.btn { background: var(--ruby); color: #fff; font-weight: 800; border-radius: 999px; padding: 12px 20px; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.ghost { border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 600; background: var(--paper); }
.link { color: var(--ruby); font-weight: 700; font-size: 14px; }
.field { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 13px; font: inherit; background: var(--paper); color: var(--ink); }
.err { background: var(--goldSoft); border-radius: 12px; padding: 10px 12px; margin: 0; }
.note { font-size: 13px; color: var(--ink2); margin: 0; }

.open { max-width: 1040px; margin: 0 auto; padding: 48px 20px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.hero { padding-top: 30px; }
.drop { display: block; border: 2px dashed var(--line); border-radius: 16px; padding: 22px; text-align: center; cursor: pointer; font-weight: 600; color: var(--ruby); }
.drop input { display: none; }

.space { max-width: 1240px; margin: 0 auto; padding: 28px 20px 60px; display: flex; flex-direction: column; gap: 18px; }
.space header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
nav { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
nav button { padding: 9px 16px; border-radius: 999px; font-weight: 600; color: var(--ink2); }
nav button.on { background: var(--blush); color: var(--ruby); }
.changes { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--goldSoft); border-radius: 16px; padding: 12px 16px; font-weight: 600; }
.two { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(340px, 1.1fr); gap: 18px; align-items: start; }
.wide { width: 100%; }

.calhead { display: flex; justify-content: space-between; align-items: center; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal b { text-align: center; font-size: 12px; color: var(--ink2); }
.day { aspect-ratio: 1; border-radius: 12px; border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; line-height: 1; gap: 3px; background: var(--paper); }
.day small { font-size: 10px; font-weight: 600; opacity: .8; }
.day.period { border-radius: 50%; border-color: var(--ruby); }
.day.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.day.sel { box-shadow: 0 0 0 3px var(--ruby); }

.lbl { font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
.pain { display: flex; align-items: center; gap: 12px; }
.pain input { flex: 1; accent-color: var(--ruby); }
.pain b { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 600; }
.chip.on { background: var(--ruby); border-color: var(--ruby); color: #fff; }
.chip.add { border-style: dashed; font-weight: 400; }
.big { font-family: Bodoni, Georgia, serif; font-size: 36px; margin: 0; }
.meal { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.mealhead { display: flex; justify-content: space-between; }
.row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.addmeal { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.grams { width: 70px; border: 1.5px solid var(--line); border-radius: 8px; padding: 4px 6px; font: inherit; }

.macro { display: flex; flex-direction: column; gap: 6px; }
.bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--blush); min-width: 140px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }

.report { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.nut { width: 100%; border-collapse: collapse; }
.nut td { border-top: 1px solid var(--line); padding: 10px 8px; vertical-align: middle; }
.nut tr { cursor: pointer; }
.nut tr:hover { background: var(--bg); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.rcard { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; text-align: left; display: flex; flex-direction: column; }
.rcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.rcard b { font-family: Bodoni, Georgia, serif; font-weight: 400; font-size: 19px; padding: 12px 14px 2px; }
.rcard small { color: var(--ink2); padding: 0 14px 14px; }
.recipe img { width: 100%; max-width: 640px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.recipe ul, .recipe ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.news { border-top: 1px solid var(--line); padding-top: 12px; }
.news p { margin: 4px 0; }
footer { margin-top: 10px; }

@media (max-width: 860px) {
  .open, .two { grid-template-columns: 1fr; }
}

.steps { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.center { align-items: center; text-align: center; }
.qrbox { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr { width: 240px; height: 240px; }
.qr svg { width: 100%; height: 100%; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 20px; letter-spacing: .08em; font-weight: 700; margin: 0; }
.changes.scan { flex-direction: column; align-items: center; text-align: center; background: var(--paper); border: 2px solid var(--ruby); }
.changes.scan .qr { width: 200px; height: 200px; }
.changes.ok { background: var(--sageSoft); }
