/* Daily / Graphite. All UI assets are local; no font or CDN requests. */
:root {
  color-scheme: dark;
  font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  font-synthesis: none;
  --bg: #101113;
  --panel: #191b1e;
  --raised: #202226;
  --input: #121416;
  --ink: #f3f4f1;
  --muted: #a0a4aa;
  --subtle: #737880;
  --line: #303338;
  --lime: #cbf48b;
  --lime-ink: #19240c;
  --purple: #bba9ef;
  --blue: #83cddc;
  --orange: #efb77c;
  --danger: #ffa19b;
  --radius: 24px;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .42; cursor: not-allowed; transform: none !important; }
button, a { -webkit-user-select: none; user-select: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 5px; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: var(--input); color: var(--ink); min-height: 48px; transition: border-color .2s, box-shadow .2s; }
input:hover, select:hover { border-color: #555b61; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px #cbf48b13; }
input::placeholder, textarea::placeholder { color: #838890; }
input[type=number] { font-variant-numeric: tabular-nums; }
input[type=number]::-webkit-inner-spin-button { opacity: .4; }
input[readonly] { color: var(--muted); }
select { appearance: none; padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a0a4aa' stroke-width='1.8'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
option { background: #191b1e; color: var(--ink); }
label { display: grid; gap: 9px; font-size: .875rem; color: #d1d4d7; font-weight: 500; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: .875rem; color: #d1d4d7; margin-bottom: 10px; font-weight: 500; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 3.2vw, 2.75rem); line-height: 1.1; letter-spacing: -.055em; font-weight: 550; }
h2 { font-size: 1.1875rem; font-weight: 550; letter-spacing: -.025em; }
h3 { font-size: 1rem; font-weight: 550; letter-spacing: -.015em; }
p { line-height: 1.65; }
a { color: var(--lime); text-decoration-thickness: 1px; text-underline-offset: 4px; }
svg { display: block; }
.icon { width: 19px; height: 19px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 20px; padding: 14px; border-radius: 10px; background: var(--lime); color: var(--lime-ink); z-index: 100; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.small-text { font-size: .875rem; line-height: 1.6; }
.eyebrow { color: var(--muted); text-transform: uppercase; font-size: .75rem; line-height: 1.4; letter-spacing: .13em; font-weight: 550; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 12px 18px; border-radius: 13px; border: 1px solid var(--line); background: var(--raised); color: var(--ink); font-size: .875rem; font-weight: 550; line-height: 1.2; transition: background .18s, border-color .18s, transform .18s, box-shadow .18s; text-decoration: none; }
.btn:hover { background: #2b2e32; border-color: #454a50; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); box-shadow: 0 2px 0 #0002; }
.btn-primary:hover { background: #daf7ad; border-color: #daf7ad; box-shadow: 0 5px 24px #cbf48b15; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { border-color: transparent; color: var(--ink); background: #ffffff08; }
.btn-sm { min-height: 38px; padding: 9px 13px; font-size: .8125rem; border-radius: 10px; }
.btn-icon { width: 44px; height: 44px; padding: 0; min-height: 44px; flex-shrink: 0; }
.btn-icon.btn-sm { width: 38px; height: 38px; min-height: 38px; }
.btn-danger { color: var(--danger); border-color: #ffa19b26; background: #ffa19b09; }
.btn-danger:hover { background: #ffa19b18; border-color: #ffa19b48; }
.btn-full { width: 100%; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 100px; padding: 6px 10px; font-size: .75rem; line-height: 1.3; color: var(--muted); white-space: nowrap; }
.pill .icon { height: 13px; width: 13px; }
.pill-accent { background: #cbf48b0b; color: var(--lime); border-color: #cbf48b22; }
.site-header { border-bottom: 1px solid #ffffff09; background: #101113f2; }
.header-inner { max-width: 1440px; margin: auto; padding: 24px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; gap: 9px; align-items: center; border: none; padding: 0; color: var(--ink); background: transparent; font-size: 1.875rem; font-weight: 750; letter-spacing: -.075em; line-height: 1; flex: 0 0 auto; }
.brand-mark { display: grid; place-items: center; height: 30px; width: 30px; border-radius: 10px; background: var(--lime); color: #101c07; }
.brand-mark .icon { width: 20px; height: 20px; stroke-width: 2.5; }
.nav { display: flex; align-items: center; gap: 5px; border: 1px solid #ffffff08; padding: 5px; border-radius: 16px; background: #191b1e; }
.nav button { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; padding: 10px 15px; min-height: 40px; border-radius: 11px; font-size: .875rem; font-weight: 500; background: transparent; color: var(--muted); transition: color .2s, background .2s; white-space: nowrap; }
.nav button:hover { color: var(--ink); background: #ffffff06; }
.nav button.active { color: var(--ink); background: #303337; box-shadow: 0 1px 3px #0003, inset 0 1px #ffffff08; }
.nav .icon { width: 17px; height: 17px; }
.header-account { display: flex; align-items: center; gap: 12px; }
.avatar { height: 37px; width: 37px; border-radius: 50%; display: grid; place-items: center; background: #303538; color: #e4e8e1; font-size: .875rem; font-weight: 600; }
.main { max-width: 1380px; margin: 0 auto; padding: 38px 40px 32px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.page-head .eyebrow { margin-bottom: 9px; }
.page-head p { color: var(--muted); font-size: .875rem; margin-top: 11px; }
.page-actions { display: flex; align-items: center; gap: 12px; }
.date-nav { display: flex; align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.date-nav input { background: transparent; border-color: transparent; padding: 6px; min-height: 36px; width: 145px; font-size: .8125rem; }
.date-nav .btn { min-height: 34px; width: 32px; height: 34px; border-radius: 8px; }
.date-nav .today-button { width: auto; padding: 7px 11px; border-left: 1px solid var(--line); border-radius: 0 8px 8px 0; }
.panel { background: var(--panel); border: 1px solid #2b2e32; border-radius: var(--radius); min-width: 0; overflow: hidden; }
.panel-pad { padding: 26px; }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 25px; }
.panel-top p { font-size: .8125rem; color: var(--muted); margin-top: 5px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, 1fr); gap: 22px; align-items: start; }
.main-stack, .aside-stack { display: grid; gap: 22px; min-width: 0; }
.overview-panel { display: grid; grid-template-columns: 1fr 210px; position: relative; padding: 30px; min-height: 265px; }
.overview-main { display: flex; flex-direction: column; align-items: flex-start; }
.overview-main .eyebrow { margin-bottom: 17px; }
.calorie-number { font-size: clamp(3.5rem, 5.5vw, 5rem); line-height: .98; letter-spacing: -.075em; font-weight: 500; font-variant-numeric: tabular-nums; }
.calorie-number small { font-size: .9375rem; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.energy-note { display: flex; align-items: center; gap: 7px; font-size: .875rem; color: var(--lime); margin-top: 18px; }
.energy-note .icon { height: 16px; width: 16px; }
.energy-note.neutral { color: var(--muted); }
.energy-goal { color: var(--muted); font-size: .8125rem; margin-top: auto; padding-top: 20px; }
.ring { position: relative; width: 186px; height: 186px; margin: auto; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { stroke: #303734; }
.ring-value { stroke: var(--lime); stroke-linecap: round; transition: stroke-dasharray .65s ease; }
.ring-inner { text-align: center; }
.ring-inner strong { display: block; font-size: 2rem; font-weight: 500; letter-spacing: -.06em; }
.ring-inner span { display: block; margin-top: 5px; color: var(--muted); font-size: .75rem; }
.macro-grid { border-top: 1px solid var(--line); grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; margin-top: 28px; padding-top: 24px; }
.macro-label { display: flex; align-items: center; gap: 7px; font-size: .8125rem; color: var(--muted); }
.macro-key { height: 7px; width: 7px; border-radius: 2px; background: var(--macro-color); flex-shrink: 0; }
.macro-value { display: flex; align-items: baseline; gap: 4px; margin-top: 9px; font-size: 1.375rem; font-weight: 500; letter-spacing: -.025em; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.macro-value small { color: var(--muted); font-size: .75rem; font-weight: 400; letter-spacing: 0; }
progress { display: block; width: 100%; height: 5px; margin: 14px 0 0; border: 0; border-radius: 10px; appearance: none; background: #2d3035; overflow: hidden; }
progress::-webkit-progress-bar { background: #2d3035; border-radius: 10px; }
progress::-webkit-progress-value { border-radius: 10px; background: var(--macro-color,var(--lime)); }
progress::-moz-progress-bar { background: var(--macro-color,var(--lime)); border-radius: 10px; }
.journal-panel { padding: 26px; }
.meal { padding: 20px 0; border-top: 1px solid var(--line); }
.meal:last-child { padding-bottom: 0; }
.meal-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meal-heading .meal-kcal { margin-left: auto; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.meal-symbol { width: 38px; height: 38px; border-radius: 12px; color: #d0d5db; background: #272a2f; display: grid; place-items: center; flex: 0 0 auto; }
.meal[data-meal=Breakfast] .meal-symbol { color: var(--orange); background: #efb77c0c; }
.meal[data-meal=Lunch] .meal-symbol { color: var(--lime); background: #cbf48b0c; }
.meal[data-meal=Dinner] .meal-symbol { color: var(--purple); background: #bba9ef0c; }
.meal[data-meal=Snacks] .meal-symbol { color: var(--blue); background: #83cddc0c; }
.entry { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 13px; margin-left: 50px; padding: 15px 0 0; }
.entry-title { font-size: .875rem; font-weight: 500; overflow-wrap: anywhere; line-height: 1.5; }
.entry-meta { display: flex; gap: 9px; flex-wrap: wrap; color: var(--muted); font-size: .75rem; margin-top: 5px; line-height: 1.5; }
.entry-calories { font-size: .9375rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry-calories small { color: var(--muted); font-size: .75rem; margin-left: 3px; }
.meal-empty { color: var(--muted); font-size: .8125rem; margin: 11px 0 0 50px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 42px 24px; gap: 13px; }
.empty .empty-symbol { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 17px; background: #ffffff03; color: var(--muted); }
.empty h3 { font-size: 1rem; }
.empty p { font-size: .875rem; color: var(--muted); max-width: 340px; }
.empty .btn { margin-top: 6px; }
.compact-empty { padding: 25px 4px; }
.compact-empty .empty-symbol { display: none; }
.weight-value { font-size: 2.625rem; line-height: 1.15; letter-spacing: -.06em; font-variant-numeric: tabular-nums; font-weight: 500; }
.weight-value small { font-size: .875rem; letter-spacing: 0; color: var(--muted); }
.weight-meta { margin-top: 10px; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.weight-meta .delta { color: var(--ink); font-weight: 550; }
.chart-wrap { margin-top: 22px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: inherit; fill: var(--muted); font-size: 12px; }
.chart-grid { stroke: #303338; stroke-dasharray: 3 5; }
.chart-line { fill: none; stroke: var(--lime); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-point { fill: var(--panel); stroke: var(--lime); stroke-width: 2; }
.chart-point:last-of-type { fill: var(--lime); }
.chart-point:focus { outline: none; stroke-width: 4; }
.chart-note { margin-top: 12px; font-size: .75rem; color: var(--muted); line-height: 1.6; }
.habit-top { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.habit-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; margin-top: 15px; }
.habit-day { display: flex; align-items: center; flex-direction: column; gap: 9px; }
.habit-day>span { color: var(--muted); font-size: .75rem; }
.day-cell { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); font-size: .8125rem; }
.day-cell .icon { width: 16px; height: 16px; }
.habit-day.logged .day-cell { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.habit-day.current .day-cell { outline: 1px solid var(--muted); outline-offset: 3px; }
.habit-day.future .day-cell { opacity: .35; }
.shelf-shortcut { padding: 23px 25px; background: #cbf48b; color: var(--lime-ink); display: flex; flex-direction: column; align-items: flex-start; gap: 18px; border: 0; }
.shelf-shortcut .eyebrow { color: #435a2d; }
.shelf-shortcut h2 { font-size: 1.4rem; line-height: 1.3; max-width: 260px; letter-spacing: -.045em; }
.shelf-shortcut p { font-size: .8125rem; color: #435a2d; }
.shelf-shortcut .btn { background: #16240c; border-color: #16240c; color: #edf5e5; }
.shelf-shortcut .btn:hover { background: #2d431c; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font-size: .75rem; margin-top: 30px; padding: 5px 2px; }
.site-footer span { display: flex; align-items: center; gap: 6px; }
.site-footer .icon { height: 13px; width: 13px; }
.shelf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.search-field { position: relative; display: block; max-width: 390px; width: 100%; }
.search-field>.icon { position: absolute; left: 15px; top: 15px; color: var(--muted); width: 18px; height: 18px; }
.search-field input { padding-left: 43px; background: var(--panel); }
.food-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.food-grid>.empty { grid-column: 1/-1; border: 1px dashed var(--line); border-radius: var(--radius); min-height: 300px; }
.food-card { padding: 24px; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.food-card:hover { border-color: #51564e; }
.food-card .card-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.food-card .card-symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #ffffff05; color: var(--lime); }
.food-card h2 { margin-bottom: 8px; overflow-wrap: anywhere; }
.food-card .card-caption { font-size: .8125rem; color: var(--muted); }
.food-energy { margin-top: 24px; display: flex; align-items: baseline; gap: 6px; }
.food-energy strong { font-size: 2rem; line-height: 1.2; font-weight: 500; letter-spacing: -.05em; }
.food-energy span { color: var(--muted); font-size: .8125rem; }
.food-macros { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 14px; font-size: .8125rem; color: var(--muted); }
.food-macros b { font-weight: 500; color: var(--ink); }
.card-bottom { border-top: 1px solid var(--line); margin-top: 23px; padding-top: 19px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.recipe-items { display: grid; gap: 7px; padding: 0; list-style: none; margin: 20px 0 0; flex: 1; }
.recipe-items li { display: flex; justify-content: space-between; gap: 10px; font-size: .8125rem; color: var(--muted); line-height: 1.6; }
.recipe-items li>span:first-child { overflow-wrap: anywhere; }
.recipe-items li>span:last-child { white-space: nowrap; }
.weight-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-bottom: 22px; }
.stat-card { padding: 26px; }
.stat-card .eyebrow { margin-bottom: 20px; }
.stat-card.accent { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.stat-card.accent .eyebrow, .stat-card.accent .weight-meta, .stat-card.accent small { color: #42552e; }
.trends-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
th { font-weight: 400; color: var(--muted); padding: 14px 12px; border-bottom: 1px solid var(--line); font-size: .75rem; white-space: nowrap; }
td { padding: 16px 12px; border-bottom: 1px solid #2a2d30; font-variant-numeric: tabular-nums; }
th:first-child,td:first-child { padding-left: 0; }
th:last-child,td:last-child { padding-right: 0; text-align: right; }
tr:last-child td { border-bottom: 0; }
.history-row { display: grid; grid-template-columns: 1fr auto auto; gap: 13px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; padding-bottom: 0; }
.history-row p { font-size: .875rem; }
.history-row small { color: var(--muted); font-size: .75rem; display: block; margin-top: 4px; overflow-wrap: anywhere; line-height: 1.5; }
.history-row .reading { font-size: 1rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.history-row .reading span { color: var(--muted); font-size: .8125rem; }
.settings-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 22px; align-items: start; }
.settings-grid .panel-pad { padding: 30px; }
.settings-section { margin-top: 27px; }
.settings-section>p { margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.form-grid .wide { grid-column: 1/-1; }
.input-suffix { position: relative; display: block; }
.input-suffix input { padding-right: 56px; }
.input-suffix>span { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); font-size: .8125rem; color: var(--muted); pointer-events: none; }
.field-hint { color: var(--muted); font-size: .75rem; line-height: 1.6; font-weight: 400; }
.goal-label { display: flex; align-items: center; gap: 7px; }
.account-email { color: var(--ink); font-size: .9375rem; overflow-wrap: anywhere; line-height: 1.6; }
.account-section { margin: 20px 0 26px; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.export-icon { display: grid; place-items: center; background: #ffffff05; width: 48px; height: 48px; border-radius: 14px; color: var(--lime); margin-bottom: 22px; }
.settings-grid .stack { display: grid; gap: 22px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-actions .delete-button { margin-right: auto; }
.error { margin-top: 18px; border: 1px solid #ffa19b30; background: #ffa19b09; color: #ffc2be; border-radius: 12px; font-size: .875rem; line-height: 1.6; padding: 13px 15px; overflow-wrap: anywhere; }
.error:empty { display: none; }
.info-box { display: flex; align-items: flex-start; gap: 11px; border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; color: var(--muted); background: #ffffff02; font-size: .8125rem; line-height: 1.7; }
.info-box .icon { color: var(--lime); margin-top: 3px; width: 16px; height: 16px; }
.info-box code { color: var(--ink); }
dialog { width: min(548px,calc(100% - 32px)); max-height: min(92dvh,900px); border: 1px solid #41454b; border-radius: 26px; padding: 28px; color: var(--ink); background: #1c1e21; box-shadow: 0 36px 140px #0009, inset 0 1px #ffffff05; }
dialog::backdrop { background: #050609a6; backdrop-filter: blur(7px); }
dialog[open] { animation: modal-in .22s cubic-bezier(.2,.8,.2,1); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.modal-head h2 { font-size: 1.5rem; letter-spacing: -.045em; line-height: 1.25; }
.modal-head p { font-size: .8125rem; color: var(--muted); margin-top: 8px; }
.modal-head .btn-icon { margin-top: -5px; margin-right: -6px; }
.portion-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; align-items: end; }
.portion-input input { font-size: 1.625rem; font-weight: 500; padding: 16px; min-height: 72px; letter-spacing: -.04em; }
.portion-input .input-suffix>span { font-size: .9375rem; }
.portion-result { border: 1px solid #cbf48b27; background: #cbf48b08; border-radius: 12px; padding: 14px 17px; min-height: 72px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.portion-result strong { color: var(--lime); font-size: 1.4rem; letter-spacing: -.03em; font-weight: 500; }
.portion-result span { color: var(--muted); font-size: .75rem; }
.meal-picker { margin-top: 24px; }
.meal-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.meal-option { position: relative; display: block; cursor: pointer; }
.meal-option input { position: absolute; opacity: 0; height: 1px; width: 1px; padding: 0; min-height: 0; }
.meal-option>span { display: flex; flex-direction: column; gap: 9px; justify-content: center; align-items: center; background: #151719; border: 1px solid var(--line); border-radius: 12px; padding: 13px 5px; color: var(--muted); font-size: .75rem; transition: color .15s, background .15s, border-color .15s; }
.meal-option:hover>span { border-color: #626952; color: var(--ink); }
.meal-option input:checked+span { color: var(--lime); background: #cbf48b0a; border-color: #9bb565; }
.meal-option input:focus-visible+span { outline: 2px solid var(--lime); outline-offset: 3px; }
.recipe-builder { margin-top: 23px; }
.ingredient-row { display: grid; grid-template-columns: minmax(0,1fr) 100px 38px; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.ingredient-row .ingredient-name { font-size: .875rem; overflow-wrap: anywhere; }
.ingredient-row .input-suffix input { padding: 10px; padding-right: 31px; min-height: 42px; }
.ingredient-row .input-suffix>span { right: 10px; }
.ingredient-picker { display: flex; gap: 9px; align-items: center; margin-top: 16px; }
.ingredient-picker select { flex: 1; }
.recipe-summary { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 22px; padding: 16px 18px; border-radius: 13px; background: #cbf48b0a; color: var(--lime); }
.recipe-summary>span { font-size: .8125rem; }
.recipe-summary strong { font-size: 1.125rem; font-weight: 500; }
.delete-confirm { margin-top: 22px; padding: 17px; border-radius: 14px; border: 1px solid #ffa19b40; background: #ffa19b08; }
.delete-confirm[hidden] { display: none; }
.delete-confirm p { color: #ffd2ce; font-size: .875rem; margin-bottom: 13px; }
.delete-confirm .row { justify-content: flex-end; }
#notice { position: fixed; z-index: 50; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: min(560px,calc(100vw - 32px)); color: var(--ink); font-size: .875rem; line-height: 1.5; pointer-events: none; }
#notice:not(:empty) { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border: 1px solid #535b47; border-radius: 15px; background: #252c22; box-shadow: 0 8px 40px #0007; animation: toast-in .2s ease-out; }
#notice .icon { color: var(--lime); height: 18px; width: 18px; }
.auth-layout { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-visual { padding: 45px 55px; background: #c9ee9d; color: #182111; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-visual .brand { color: #182111; }
.auth-visual .brand-mark { color: #c9ee9d; background: #182111; }
.auth-visual-main { padding: 65px 0; position: relative; }
.auth-visual h1 { font-size: clamp(3.5rem,6.5vw,6.25rem); line-height: .99; letter-spacing: -.08em; max-width: 540px; font-weight: 500; }
.auth-visual h1>span { display: block; }
.auth-visual p { max-width: 340px; margin-top: 30px; font-size: 1rem; color: #435830; }
.auth-visual .auth-caption { font-size: .75rem; letter-spacing: .05em; color: #435830; display: flex; gap: 9px; align-items: center; }
.auth-form-side { display: flex; flex-direction: column; justify-content: center; padding: 65px; }
.auth-form-wrap { width: 100%; max-width: 385px; margin: auto; }
.auth-form-wrap h2 { font-size: 2rem; font-weight: 500; letter-spacing: -.05em; margin: 18px 0 12px; }
.auth-form-wrap>p { color: var(--muted); font-size: .875rem; }
.auth-form-wrap form { display: grid; gap: 20px; margin-top: 30px; }
.auth-form-wrap form .btn { min-height: 51px; margin-top: 5px; }
.auth-form-wrap form .error { margin-top: 0; }
.auth-note { color: var(--muted); font-size: .75rem; margin-top: 24px; line-height: 1.7; }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-field .btn { position: absolute; right: 5px; top: 4px; margin: 0 !important; width: 39px; height: 40px; min-height: 40px !important; padding: 0; }
.boot-screen { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 25px; padding: 28px; }
.boot-brand { font-size: 3rem; font-weight: 650; letter-spacing: -.085em; }
.boot-brand span { color: var(--lime); margin-left: 3px; }
.boot-screen>p { font-size: .875rem; color: var(--muted); text-align: center; }
.loader { width: 26px; height: 26px; border: 2px solid var(--line); border-top-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite; }
.setup-screen { min-height: 100dvh; max-width: 520px; margin: auto; padding: 12vh 28px; }
.setup-screen .brand { margin-bottom: 48px; }
.setup-screen h1 { font-size: 2.25rem; margin-bottom: 18px; }
.setup-screen>p { color: var(--muted); margin-bottom: 26px; font-size: .9375rem; }
.view-enter { animation: view-in .25s ease-out; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-in { from { opacity: 0; margin-bottom: -5px; } to { opacity: 1; margin-bottom: 0; } }
@media (min-width:1600px) { .main { padding-top: 50px; } .overview-panel { min-height: 290px; } }
@media (max-width:1150px) {
  .header-inner { padding: 22px 28px; gap: 15px; }
  .header-account .pill { display: none; }
  .nav button { padding: 10px 12px; }
  .main { padding: 32px 28px; }
  .dashboard-grid { grid-template-columns: minmax(0,1.4fr) minmax(300px,1fr); gap: 18px; }
  .overview-panel { padding: 25px; grid-template-columns: 1fr 160px; }
  .ring { width: 150px; height: 150px; }
  .page-head { align-items: flex-start; }
  .page-actions { flex-wrap: wrap; justify-content: flex-end; }
  .food-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .header-inner { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; justify-content: center; }
  .nav button { flex: 1; }
  .header-account .pill { display: inline-flex; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .aside-stack { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .overview-panel { grid-template-columns: 1fr 210px; }
  .ring { width: 178px; height: 178px; }
  .calorie-number { font-size: 4.6rem; }
  .trends-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1.2fr 1fr; gap: 18px; }
  .auth-form-side { padding: 45px 30px; }
  .auth-visual { padding: 35px; }
  .weight-stats { gap: 14px; }
  .stat-card { padding: 22px; }
  .stat-card .weight-value { font-size: 2.2rem; }
}
@media (max-width:640px) {
  body { min-width: 320px; }
  .header-inner { padding: 19px 20px; flex-wrap: nowrap; }
  .brand { font-size: 1.65rem; }
  .brand-mark { width: 27px; height: 27px; border-radius: 9px; }
  .header-account { gap: 9px; }
  .header-account .pill { font-size: .75rem; }
  .header-account .avatar { height: 32px; width: 32px; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; width: 100%; border: 0; border-top: 1px solid #41454b; border-radius: 0; background: #1a1c20f5; backdrop-filter: blur(16px); padding: 9px 8px calc(9px + env(safe-area-inset-bottom)); gap: 3px; }
  .nav button { flex-direction: column; gap: 6px; font-size: .875rem; line-height: 1.3; padding: 8px 3px; border-radius: 11px; min-width: 0; }
  .nav button.active { color: var(--lime); background: #cbf48b0b; box-shadow: none; }
  .nav .icon { width: 21px; height: 21px; }
  .main { padding: 26px 16px calc(98px + env(safe-area-inset-bottom)); }
  .page-head { flex-wrap: wrap; gap: 20px; margin-bottom: 22px; }
  .page-head h1 { font-size: 2.125rem; }
  .page-head .eyebrow { font-size: .75rem; }
  .page-head p { max-width: 330px; }
  .page-actions { width: 100%; justify-content: space-between; gap: 9px; }
  .page-actions>.btn-primary { flex: 1; }
  .date-nav { flex: 1; }
  .date-nav input { width: 130px; flex: 1; }
  .today-button { display: none; }
  .page-actions .btn { font-size: .8125rem; }
  .overview-panel { padding: 22px; grid-template-columns: minmax(0,1fr) 125px; border-radius: 22px; min-height: 0; }
  .calorie-number { font-size: clamp(2.6rem,11vw,4rem); }
  .calorie-number small { display: block; margin: 7px 0 0; font-size: .8125rem; }
  .overview-main .eyebrow { margin-bottom: 15px; }
  .energy-note { font-size: .75rem; line-height: 1.5; margin-top: 14px; }
  .energy-goal { font-size: .75rem; padding-top: 15px; }
  .ring { width: 125px; height: 125px; }
  .ring-inner strong { font-size: 1.625rem; }
  .ring-inner span { font-size: .75rem; }
  .macro-grid { gap: 14px; margin-top: 23px; padding-top: 20px; }
  .macro-label { font-size: .75rem; }
  .macro-value { font-size: 1.2rem; }
  .macro-value small { font-size: .75rem; }
  .journal-panel, .panel-pad { padding: 22px; }
  .panel { border-radius: 22px; }
  .panel-top { margin-bottom: 20px; }
  .aside-stack { grid-template-columns: 1fr; }
  .meal { padding: 18px 0; }
  .meal-symbol { width: 33px; height: 33px; border-radius: 10px; }
  .meal .meal-kcal { font-size: .8125rem; }
  .entry { margin-left: 0; gap: 8px; padding-top: 16px; }
  .entry-meta { gap: 7px; }
  .entry-calories small { display: none; }
  .entry-title { font-size: .875rem; }
  .meal-empty { margin-left: 45px; }
  .site-footer { align-items: flex-start; flex-direction: column; margin-top: 24px; }
  .food-grid { grid-template-columns: 1fr; gap: 16px; }
  .food-card { padding: 24px; }
  .food-card .card-label { margin-bottom: 15px; }
  .shelf-toolbar { gap: 10px; }
  .shelf-toolbar>.pill { display: none; }
  .search-field { max-width: none; }
  .food-energy { margin-top: 20px; }
  .weight-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .weight-stats .stat-card:first-child { grid-column: 1/-1; }
  .stat-card { padding: 22px; }
  .stat-card .eyebrow { margin-bottom: 15px; letter-spacing: .07em; font-size: .75rem; }
  .stat-card .weight-value { font-size: 2rem; }
  .stat-card:first-child .weight-value { font-size: 2.75rem; }
  .stat-card .weight-meta { font-size: .75rem; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid .panel-pad { padding: 24px; }
  .form-grid { gap: 18px 14px; }
  .history-row { gap: 8px; }
  dialog { width: calc(100% - 20px); max-height: 92dvh; padding: 24px 20px; border-radius: 22px; }
  .modal-head { margin-bottom: 24px; }
  .modal-head h2 { font-size: 1.375rem; }
  .form-actions { gap: 7px; margin-top: 24px; padding-top: 20px; }
  .form-actions .btn { padding: 11px 13px; font-size: .8125rem; }
  .meal-options { gap: 6px; }
  .meal-option>span { font-size: .75rem; padding: 12px 3px; }
  .ingredient-row { grid-template-columns: minmax(0,1fr) 87px 35px; gap: 7px; }
  .auth-layout { display: flex; flex-direction: column; min-height: 100dvh; }
  .auth-visual { padding: 26px; min-height: auto; border-radius: 0 0 28px 28px; }
  .auth-visual-main { padding: 38px 0 16px; }
  .auth-visual h1 { font-size: 3.3rem; line-height: .98; }
  .auth-visual h1>span { display: inline; }
  .auth-visual p, .auth-caption { display: none !important; }
  .auth-form-side { padding: 34px 26px 40px; }
  .auth-form-wrap h2 { font-size: 1.75rem; }
  .auth-form-wrap { max-width: 420px; }
  #notice { bottom: calc(95px + env(safe-area-inset-bottom)); }
}
@media (max-width:370px) { .header-account .pill { display: none; } .overview-panel { grid-template-columns: 1fr 105px; padding: 19px; } .ring { width: 105px; height: 105px; } .page-actions { flex-wrap: wrap; } .page-actions>.btn-primary { flex: 0 0 100%; } }
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
