/* NutriAI 2100 — mobile-first visual system. */
:root {
  color-scheme: dark;
  --stage-left: max(10px, calc((100vw - 1200px) / 2 + 10px));
  --bg: #020611;
  --surface: rgba(6, 15, 33, .88);
  --glass: linear-gradient(125deg, #071329d9, #020813ef 68%, #10102bd9);
  --success: #38e576;
  --warning: #ff6478;
  --glow: 0 0 18px #00cfff66;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --surface-raised: #0b1730;
  --line: rgba(77, 117, 193, .26);
  --text: #edf5fc;
  --muted: #8ba9cd;
  --cyan: #13d5f4;
  --blue: #218bff;
  --violet: #b16aff;
  --pink: #e5a0d0;
  --lime: #95e5b8;
  --radius: 15px;
  --shadow: 0 16px 48px #00000024, inset 0 1px 0 #ffffff05;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #365269 var(--bg); }
body {
  display: flow-root; margin: 0; min-height: 100vh; min-height: 100dvh; padding-top: env(safe-area-inset-top); color: var(--text); background: var(--bg);
  background-image: radial-gradient(ellipse at 0 10%, #003f7150, transparent 42%), radial-gradient(ellipse at 90% 50%, #25117033, transparent 40%);
  background-attachment: fixed; font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.035em; line-height: 1.2; overflow-wrap: anywhere; }
h2 { font-size: 25px; margin-bottom: 12px; }
h3 { font-size: 19px; }
p { line-height: 1.65; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a { touch-action: manipulation; }
button, input, select, textarea, fieldset { min-width: 0; max-width: 100%; }
button { white-space: normal; overflow-wrap: anywhere; }
button:disabled { opacity: .42; cursor: not-allowed; }
a { color: var(--cyan); }
:where(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
::selection { background: #61e3f433; color: white; }
::placeholder { color: #70879b; opacity: 1; }

/* These gates are shared with auth, onboarding, routing and module controllers. */
[hidden], .hidden, body.auth-pending .app-shell { display: none !important; }
.app-view { min-width: 0; }
.app-view:focus { outline: none; }
.ambient { position: fixed; pointer-events: none; width: 45vw; height: 45vw; max-width: 620px; max-height: 620px; border-radius: 50%; filter: blur(100px); opacity: .07; z-index: -1; }
.ambient-one { background: var(--violet); top: -200px; left: -100px; }
.ambient-two { background: var(--cyan); right: -15%; top: 40%; }
.glass {
  background: var(--glass);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.app-shell { max-width: 1480px; margin: auto; min-height: 100dvh; }
.main-content { min-width: 0; padding: 26px 16px calc(116px + env(safe-area-inset-bottom)); }
.sidebar { display: none; }
.eyebrow { color: #91a8ba; font: 500 9px/1.6 'DM Mono', monospace; letter-spacing: .14em; margin: 0 0 7px; text-transform: uppercase; }
.topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px 12px; margin-bottom: 28px; }
.topbar h1 { font-size: clamp(25px, 5vw, 36px); margin: 0; }
.topbar h1 span { color: inherit; }
.topbar .eyebrow { font-size: 8px; letter-spacing: .1em; max-width: 240px; }
.top-actions { display: contents; }
.utility-actions { display: flex; grid-column: 1 / -1; grid-row: 2; gap: 8px; }
.icon-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 14px; background: #17263665; color: #bbd1e2; font-size: 19px; }
.icon-button::after { content: attr(title); color: var(--muted); font-size: 10px; line-height: 1.25; text-align: left; }
.utility-actions .icon-button { flex: 1; }
.user-summary { display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; color: #cafaff; background: linear-gradient(135deg, #236375, #393655); border: 1px solid #8cdfed40; box-shadow: 0 0 0 4px #6ed2f007; font-weight: 600; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
#userEmail { display: none; color: var(--muted); overflow-wrap: anywhere; font-size: 11px; }
.logout-button { min-height: 44px; padding: 8px; border: 0; border-radius: 12px; background: #ffffff04; color: var(--muted); font-size: 11px; }
.menu-button { display: none; }

/* Shared buttons and fields — full touch targets, restrained hierarchy. */
:where(.text-button, .cancel-meal, .diet-controls button, .diet-ingredient button, .recipe-step button, .water-actions button, .ai-result button) {
  min-height: 46px; padding: 12px 16px; border-radius: 14px; border: 1px solid #61e3f42b;
  background: #61e3f40a; color: #a2e9f4; font-size: 13px; font-weight: 500; line-height: 1.4;
}
:where(.save-meal, .profile-form button, #addMealOpen, #recipeAdd, #fridgeAdd, #dietAddMeal, .plan-creation button, #measurementOpen, #addWater, #aiAdd) {
  min-height: 48px; padding: 13px 18px; border: 1px solid #94efff3b; border-radius: 15px;
  background: linear-gradient(115deg, #7ce6ec, #59bdf7); color: #071923; font-size: 13px; font-weight: 600;
  box-shadow: 0 5px 20px #39b8ed16, inset 0 1px 0 #ffffff3b;
}
#dietDeletePlan, #dietDeleteDay, .diet-meal .diet-controls button:last-child:not(:first-child) { color: var(--pink); background: #e5a0d005; border-color: #e5a0d020; }
#dietMeals .diet-meal .diet-controls button { color: #a2e9f4; background: #61e3f40a; border-color: #61e3f42b; }
#dietMeals .diet-meal .diet-controls button:nth-child(2) { color: var(--pink); border-color: #e5a0d020; }
:where(label) { color: #a5b6c6; font-size: 12px; line-height: 1.5; }
:where(input, select, textarea) {
  width: 100%; min-height: 50px; border: 1px solid #a4cae224; border-radius: 14px;
  padding: 13px 14px; color: var(--text); background: #080f19a3; font-size: 16px;
  box-shadow: inset 0 2px 5px #00000014; transition: border-color .18s, box-shadow .18s;
}
select { padding-right: 28px; text-overflow: ellipsis; }
input, select, textarea { font-size: 16px; }
input[type="date"], input[type="time"] { min-width: 0; }
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: #61e3f477; box-shadow: 0 0 0 3px #61e3f40a; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 2px; }
button, a { transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s; }

/* Approved reference: desktop card geometry and component treatments. */
.dashboard-view { display:grid; grid-template-columns:minmax(0,405fr) minmax(0,350fr); gap:18px 20px; align-items:start; }
.hero-grid { grid-column:1/-1; display:grid; grid-template-columns:minmax(0,440fr) minmax(0,270fr); gap:20px; margin-right:40px; min-height:230px; }
.calorie-card,.water-card,.journal-card,.quick-card,.dashboard-trend,.mila-advice { border-radius:var(--radius); padding:20px; min-width:0; position:relative; }
.card-heading,.water-title,.dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.dashboard-view h2 { font-size:18px; font-weight:500; letter-spacing:-.025em; margin:0; }
.card-ellipsis { color:#5577ad; font-size:11px; letter-spacing:2px; position:absolute; top:25px; right:20px; }
.calorie-card { height:230px; padding:20px 23px; background:radial-gradient(ellipse at 0 0,#14276b65,transparent 67%),var(--glass); border-color:#4641918c; }
.calorie-card h2 { font-size:20px; }
.calorie-layout { display:grid; grid-template-columns:minmax(0,184fr) minmax(0,184fr); align-items:center; gap:24px; margin-top:4px; }
.ring { --degree:0%; width:170px; max-width:100%; aspect-ratio:1; justify-self:center; display:grid; place-items:center; position:relative; border-radius:50%; background:conic-gradient(from 0deg,#122647 0deg,#253267 145deg,#493093 205deg,#19274e 285deg,#122647 360deg); box-shadow:0 0 26px #5143ad1c; }
.ring-arc { position:absolute; inset:0; width:100%; height:100%; filter:drop-shadow(0 0 8px #1ecff747); z-index:1; }.ring-arc circle { stroke-dasharray:var(--ring-progress,0) 100; }.ring::before { content:""; position:absolute; inset:14px; border-radius:50%; background:radial-gradient(circle at 65% 25%,#050d1e,#020611 70%); }
.ring-core { position:relative; text-align:center; }#eatenKcal { display:block; font-size:36px; font-weight:500; letter-spacing:-.045em; line-height:1.2; }#eatenKcal small { display:none; }.ring-core>span { display:block; margin-top:5px; color:var(--muted); font-size:13px; }#goalKcal { font-weight:400; }#goalKcal small { font-size:inherit; }
.energy-remaining { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.macro-grid { display:flex; flex-direction:column; gap:18px; transform:translateY(-9px); min-width:0; }.macro-card { --macro:var(--cyan); border:0; padding:0; border-radius:0; background:none; box-shadow:none; backdrop-filter:none; }.macro-card.carbs { --macro:var(--success); order:1; }.macro-card.fat { --macro:var(--warning); order:2; }
.macro-top { display:flex; justify-content:space-between; gap:4px; align-items:baseline; font-size:12px; }.macro-top b { font-size:12px; font-weight:400; white-space:nowrap; }.macro-top small { font-size:11px; color:var(--muted); }.macro-icon,.macro-card p { display:none; }.bar { height:8px; border-radius:10px; background:#101c34; margin-top:7px; overflow:hidden; }.bar i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--macro),color-mix(in srgb,var(--macro),white 18%)); transition:width .4s; }
.water-card { height:214px; margin-top:16px; padding:24px; display:flex; flex-direction:column; }.water-title { display:contents; }.water-title>div { display:contents; }.water-title .eyebrow { font:500 16px Inter,sans-serif; text-transform:none; letter-spacing:0; padding-left:31px; color:var(--text); margin:1px 0 25px; }.water-title h2 { order:2; font-size:21px; margin-top:auto; }.water-title small { font-size:16px; color:var(--muted); }.drop { position:absolute; left:24px; top:26px; width:16px; height:21px; border-radius:70% 30% 60% 40%; transform:rotate(-35deg); background:var(--cyan); font-size:0; box-shadow:0 0 14px #0cdaff8c; }
.water-wave { height:73px; position:relative; margin-bottom:16px; }.water-bars { position:absolute; inset:0; display:flex; justify-content:space-between; gap:8px; }.water-bars>span { position:relative; width:8px; height:100%; border-radius:7px; background:#102445; overflow:visible; }.water-bars i { position:absolute; bottom:0; width:100%; border-radius:7px; background:linear-gradient(#15d8fa,#05c1df); height:var(--fill,0%); box-shadow:0 0 10px #04cce766; transition:height .4s; }#waterFill { position:absolute; width:0; height:1px; clip-path:inset(50%); }
.water-actions { position:absolute; right:20px; bottom:17px; }.water-actions #addWater { display:grid; place-items:center; width:39px; height:39px; min-height:39px; padding:0; border-radius:50%; background:linear-gradient(125deg,#19d6f4,#30b4ee); color:#001024; border:1px solid #61cfff; font-size:28px; font-weight:400; }
summary { cursor:pointer; list-style:none; }summary::-webkit-details-marker { display:none; }summary:focus-visible { outline:2px solid var(--cyan); outline-offset:4px; }
.water-more { position:absolute; top:18px; right:16px; z-index:3; }.water-more>summary { color:#456594; letter-spacing:2px; padding:8px 0; font-size:11px; }.water-options { position:absolute; right:0; top:34px; width:150px; padding:10px; border-radius:12px; background:#061126; }.water-options button { min-height:40px; border:1px solid var(--line); border-radius:10px; background:#101d39; color:var(--muted); padding:8px; }.water-options button+button { margin-left:8px; }
.journal-card { grid-column:1; grid-row:2/4; min-height:314px; padding:16px 19px; }.section-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:28px 0 16px; }.section-head h2 { margin:0; }#meals { margin:0 0 12px; gap:8px; }#meals .eyebrow { display:none; }#meals h2 { font-size:18px; }.meal-count { display:block; margin-top:5px; font-size:17px; color:#dbe8fd; }#addMealOpen { margin-left:auto; background:linear-gradient(140deg,#08294199,#081126); color:#a3edff; padding:8px 10px; min-height:39px; font-size:12px; border-radius:14px; white-space:nowrap; border-color:#174267; box-shadow:inset 0 1px 0 #ffffff05; }.journal-tools>summary { display:grid; place-items:center; width:37px; height:39px; border:1px solid #152c4b; border-radius:15px; font-size:27px; color:#8fd2f2; background:#0a182c; }
.macro-heading { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
.day-navigator { display:flex; align-items:center; gap:5px; padding:0; margin:0; border:0; background:none; box-shadow:none; }.day-navigator>div { flex:1; min-width:0; }.day-navigator span { display:none; }.day-navigator input { min-height:40px; font-size:12px; padding:4px; background:none; border:0; }.day-navigator button { min-height:40px; min-width:30px; border:1px solid var(--line); background:#0b1930; border-radius:9px; color:var(--muted); }.today-button { font-size:10px; }
.meals-list { background:none; border:0; box-shadow:none; backdrop-filter:none; }.meal-row { display:grid; grid-template-columns:52px minmax(0,1fr) auto auto; grid-template-areas:"symbol info kcal time"; gap:12px; align-items:center; min-height:72px; padding:9px 0; border-bottom:1px solid #13213936; }.meal-row:last-child { border:0; }
.meal-symbol { grid-area:symbol; width:52px; height:54px; border-radius:12px; background-image:url('design-reference.png'); background-size:1536px 1024px; background-position:-303px -537px; }.meal-row[data-meal-art="lunch"] .meal-symbol { background-position:-303px -610px; }.meal-row[data-meal-art="dinner"] .meal-symbol { background-position:-303px -681px; }
.meal-info { grid-area:info; min-width:0; }.meal-type { font-size:14px; color:var(--text); }.meal-name { font-size:12px; color:var(--muted); font-weight:400; margin:6px 0 0; line-height:1.45; letter-spacing:-.02em; }.meal-macros { display:none; font-size:10px; color:var(--muted); margin:5px 0 0; }.meal-kcal { grid-area:kcal; font-size:13px; font-weight:500; white-space:nowrap; align-self:start; margin-top:9px; }.meal-kcal small { font-size:11px; color:#b4c9e3; font-weight:400; }.meal-time { grid-area:time; font-size:12px; color:var(--muted); align-self:start; margin-top:10px; }.edit-meal,.delete-meal { display:none; width:36px; height:36px; border:1px solid var(--line); border-radius:10px; background:#0c1930; color:var(--muted); }.edit-meal { grid-area:edit; }.delete-meal { grid-area:delete; }
.journal-card:has(.journal-tools[open]) .meal-row { grid-template-areas:"symbol info kcal time" "symbol info edit delete"; }.journal-card:has(.journal-tools[open]) :is(.meal-macros,.edit-meal,.delete-meal) { display:block; }
.empty-meals,.empty-measure-chart { color:var(--muted); font-size:13px; text-align:center; padding:30px 10px; }
.quick-card { grid-column:2; padding:14px 12px 8px; min-height:135px; }.quick-card h2 { margin-left:3px; font-size:17px; }.quick-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-top:12px; }.quick-actions>* { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:11px; height:79px; min-height:44px; border:1px solid #193758; border-radius:14px; background:radial-gradient(ellipse at 50% 25%,#07366144,transparent 70%),linear-gradient(135deg,#05172e,#080f22); color:#bfd5f3; text-decoration:none; font-size:11px; }.quick-actions svg { width:25px; height:25px; display:block; filter:drop-shadow(0 0 5px #00cfff55); }.quick-actions span { color:var(--cyan); }.quick-actions>*:nth-child(3) { border-color:#3d2862; background:linear-gradient(135deg,#15112e,#090d24); }.quick-actions>*:nth-child(3) span { color:#c376ef; }.quick-actions>*:nth-child(4) { border-color:#272b66; }.quick-actions>*:nth-child(4) span { color:#39b6ff; }.quick-actions>*:nth-child(4) svg { fill:#208edd; stroke:#37c4ff; }
.dashboard-trend { grid-column:2; padding:17px 20px 10px; min-height:166px; }.dashboard-trend h2 { font-size:17px; }.dashboard-trend .card-heading>span { color:#00e5d1; font-size:12px; }.dashboard-weight-plot { height:108px; margin-top:4px; }.dashboard-weight-plot svg { width:100%; height:100%; overflow:visible; }.trend-link { position:absolute; inset:0; font-size:0; border-radius:inherit; }.trend-link:focus-visible { outline:2px solid var(--cyan); }
.mila-advice { grid-column:1; min-height:163px; padding:20px 62px 20px 26px; border-color:#1c759b94; }.mila-advice h2 { color:#40e4f5; margin-bottom:17px; font-size:19px; white-space:nowrap; }.mila-advice h2 span { display:inline-grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#04c9f340; box-shadow:var(--glow); margin-right:6px; vertical-align:middle; }.mila-advice p { font-size:13px; line-height:1.75; margin:0; }.mila-advice #calorieTip { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }.mila-advice>a { position:absolute; right:23px; bottom:31px; display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:linear-gradient(135deg,#18d8f5,#30b0ed); color:#001123; text-decoration:none; font-size:25px; }
.motivation-card { position:relative; overflow:hidden; border-radius:var(--radius); text-decoration:none; color:var(--text); min-height:150px; margin:6px 0 0 15px; background:linear-gradient(0deg,#010511b3,#05091615 70%),url('assets/mountain-reference.png') 100% 77%/112% auto; border-color:#40649e88; }.motivation-card>div { position:relative; padding:49px 23px 18px; height:100%; }.motivation-card h2 { font-size:19px; line-height:1.4; text-shadow:0 2px 12px #000; }.motivation-line { display:block; height:5px; border-radius:5px; width:80%; background:#172039; margin-top:14px; overflow:hidden; }.motivation-line i { display:block; height:100%; width:var(--motivation-progress,0%); background:linear-gradient(90deg,#07d8e3,#0bc6e4); border-radius:inherit; }.motivation-percent { position:absolute; right:22px; bottom:20px; font-size:14px; }
.visually-hidden { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; overflow:hidden!important; clip-path:inset(50%); white-space:nowrap; }
/* Mila's face, reflections and bloom are the actual approved reference artwork. */
.mila-floating { --mila-scale:1; position:fixed; left:calc(var(--stage-left) + 990px); top:215px; width:150px; z-index:15; text-decoration:none; text-align:center; }
.mila-orb { display:block; position:relative; width:calc(150px * var(--mila-scale)); height:calc(150px * var(--mila-scale)); margin:auto; background:url('design-reference.png') calc(-999px * var(--mila-scale)) calc(-213px * var(--mila-scale)) / calc(1536px * var(--mila-scale)) calc(1024px * var(--mila-scale)); mask-image:radial-gradient(ellipse at 50% 50%,#000 48%,#000c 57%,transparent 72%); }
.mila-orb::before,.mila-orb::after { content:""; position:absolute; inset:13% 12%; border:1px solid #4086ff48; border-radius:48% 52% 50% 50%; transform:rotate(-20deg); pointer-events:none; }.mila-orb::after { inset:19% 8%; border-color:#8359ff3b; transform:rotate(20deg); }
.mila-label { display:block; padding:10px 6px; margin:-6px 12px 0; transform:translateX(30px); border:1px solid #493f9b8a; border-radius:18px; background:linear-gradient(130deg,#071126e8,#20164ae8); color:#e9edff; font-size:17px; text-align:left; }.mila-label>span { color:#9174ff; text-shadow:0 0 12px #5554ff; padding:0 6px; }.mila-label small { display:block; margin:4px 0 0 30px; font-size:9px; color:var(--muted); white-space:nowrap; }.mila-label small b { color:#24c9ff; }
.mila--idle .mila-orb { animation:mila-idle 5s ease-in-out infinite; }.mila--listening .mila-orb { animation:mila-listen 2.5s ease-in-out infinite; }.mila--thinking .mila-orb::before { animation:mila-think 10s linear infinite; }.mila--thinking .mila-orb::after { animation:mila-think 14s linear infinite reverse; }
.mila-waveform { display:none; position:absolute; left:21%; right:21%; bottom:16%; align-items:center; justify-content:center; gap:4px; height:19px; }.mila--speaking .mila-waveform { display:flex; }.mila-waveform i { height:5px; width:2px; background:#92ebff; box-shadow:0 0 7px #00bdff; border-radius:4px; animation:mila-wave 1s ease-in-out infinite alternate; }.mila-waveform i:nth-child(2n) { animation-delay:-.4s; }.mila-waveform i:nth-child(3n) { animation-delay:-.7s; }
@keyframes mila-idle { 50% { transform:translateY(-2px); filter:brightness(1.08); } }@keyframes mila-listen { 50% { transform:scale(1.035); filter:brightness(1.15); } }@keyframes mila-think { to { transform:rotate(340deg); } }@keyframes mila-wave { to { height:19px; } }
/* The topbar disclosures retain the existing date and utility controls. */
.date-control { position:absolute; right:73px; top:13px; z-index:6; }.date-control>summary { display:flex; align-items:center; gap:10px; min-height:42px; padding:10px 14px; border:1px solid #23375e; border-radius:16px; background:linear-gradient(110deg,#040b18,#10123599); color:var(--muted); }.date-control #todayDate { font:12px Inter,sans-serif; letter-spacing:0; margin:0; text-transform:lowercase; display:block; }.date-control #todayDate::first-letter { text-transform:uppercase; }.calendar-symbol { width:17px; height:17px; border:1px solid #779fc5; border-radius:2px; position:relative; }.calendar-symbol::before { content:""; position:absolute; top:4px; width:100%; border-top:1px solid #779fc5; }.date-controls-panel { position:absolute; top:50px; right:0; width:300px; padding:12px; border-radius:15px; background:#071327; }
.utility-menu>summary { display:grid; place-items:center; width:41px; height:42px; border:1px solid #2b3470; border-radius:16px; background:#11173d88; color:#a6c7ed; }.utility-menu svg { width:23px; height:23px; }.utility-panel { position:absolute; right:0; top:50px; min-width:170px; padding:10px; border-radius:14px; background:#071327; }.utility-actions { display:flex; gap:6px; }.utility-actions .icon-button { width:44px; min-height:44px; padding:8px; }.icon-button::after { display:none; }
.header-quote { position:absolute; right:72px; top:76px; color:#789ac2; font-size:14px; font-style:italic; text-align:right; line-height:1.5; margin:0; }

/* Screens and collections: independent content cards, not one giant panel. */
.diet-card { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; backdrop-filter: none; }
.module-intro { position: relative; padding: 0 0 24px; }
.module-intro h2 { font-size: clamp(30px, 5vw, 40px); margin-bottom: 12px; }
.module-intro .eyebrow { color: var(--cyan); }
.module-intro > p:last-child { max-width: 620px; font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0; }
.recipes-card .module-intro .eyebrow { color: var(--violet); }
.fridge-card .module-intro .eyebrow { color: var(--lime); }
.diet-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 18px 0; }
.diet-controls label { display: flex; flex-direction: column; gap: 8px; flex: 1 1 140px; min-width: 0; }
.diet-controls button { flex: 1 1 120px; }
.plan-creation, .plan-selection, .plan-actions, .library-toolbar { padding: 20px; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(130deg, #192b3bc7, #050c1bd9); box-shadow: var(--shadow); }
.plan-creation { border-top-color: #61e3f43b; }
.plan-creation label:first-child { flex-basis: 100%; }
.plan-actions { background: #15233365; }
.library-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.library-toolbar label { min-width: 0; }
.library-toolbar label:has(input[type="search"]) { grid-column: 1 / -1; }
.library-toolbar button { padding-inline: 10px; }
#recipeSync, #fridgeSync, #dietSync { background: #ffffff03; border-color: var(--line); color: var(--muted); }
.diet-card > p, .diet-dialog p { color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.diet-card > p:empty, .diet-summary:empty, [role="alert"]:empty { display: none; }
.diet-summary { margin: 18px 0; padding: 18px 20px; border: 1px solid #61e3f42a; border-radius: 20px; background: linear-gradient(100deg, #61e3f40b, #aa9aff07); color: #a9dfed; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
#dietWeekSummary { color: #bcdae7; margin-top: 20px; font-size: 14px; }
#dietMessage, #recipeStatus, #fridgeStatus { color: #bed7e3; }
.diet-meal { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 25px; margin: 16px 0; background: linear-gradient(145deg, #192b3bc9, #101b2bcf); box-shadow: var(--shadow); overflow-wrap: anywhere; }
.diet-meal h3 { margin: 10px 0 14px; font-size: 23px; }
.diet-meal small { display: inline-block; color: #b6abec; font-size: 10px; line-height: 1.6; letter-spacing: .015em; }
.diet-meal p { color: var(--muted); font-size: 13px; line-height: 1.75; }
.diet-meal .diet-controls { padding-top: 16px; margin: 20px 0 0; border-top: 1px solid var(--line); gap: 8px; }
.diet-meal .diet-controls button { padding: 11px 12px; font-size: 12px; flex-basis: 95px; }
.recipe-list, .fridge-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.recipe-list .diet-meal, .fridge-list .diet-meal { margin: 0; }
.recipe-list .diet-meal { border-top-color: #aa9aff42; }
.fridge-list .diet-meal { border-top-color: #95e5b83b; }
.fridge-list .diet-controls label { flex-basis: 100%; }
.fridge-expiry { width: fit-content; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: #ffffff03; font-size: 11px !important; }
.fridge-list .fridge-expiry.soon { color: var(--lime); border-color: #95e5b82b; background: #95e5b807; }
.fridge-list .fridge-expiry.expired { color: var(--pink); border-color: #e5a0d03b; background: #e5a0d007; }
.fridge-notes { white-space: pre-wrap; }

/* Progress: responsive plots; no horizontal page or card scrolling. */
.stats-heading { margin-top: 0; margin-bottom: 24px; }
.stats-heading h2 { font-size: 34px; }
.segmented { display: flex; padding: 4px; gap: 3px; border: 1px solid var(--line); border-radius: 15px; background: #0b1522; }
.segmented button { min-width: 58px; min-height: 40px; border: 1px solid transparent; border-radius: 11px; background: none; color: var(--muted); font-size: 12px; }
.segmented .active { color: #b7f2fb; background: #61e3f413; border-color: #61e3f422; box-shadow: 0 2px 10px #00000014; }
.chart-card, .measurements-card { padding: 24px 20px; border-radius: var(--radius); min-width: 0; }
.chart-labels { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.chart-labels b { color: #bfdfea; font: 500 11px/1.6 'DM Mono', monospace; overflow-wrap: anywhere; }
.chart, .weight-chart { height: 190px; display: flex; align-items: flex-end; gap: 5px; margin-top: 28px; background: repeating-linear-gradient(to top, #bddaf10b 0 1px, transparent 1px 25%); border-bottom: 1px solid var(--line); }
.chart-bar, .weight-bar { position: relative; flex: 1 1 0; min-width: 0; border-radius: 6px 6px 2px 2px; max-width: none; }
.chart-bar { height: var(--bar-height); background: linear-gradient(180deg, #72deec, #338aaf88); animation: grow .45s both; }
.chart-bar:last-child { background: linear-gradient(180deg, #b0f6e0, #52bdc9); box-shadow: 0 0 18px #61e3f412; }
.chart-days, .weight-chart-days { display: flex; gap: 5px; margin-top: 12px; }
.chart-days span, .weight-chart-days span { flex: 1 1 0; min-width: 0; text-align: center; color: #8ba2b4; font: 8px/1.5 'DM Mono', monospace; }
.chart:has(.chart-bar:nth-child(8)), .chart-days:has(span:nth-child(8)) { gap: 3px; }
.stat-averages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--line); }
.stat-averages > div { padding: 13px 9px; border: 1px solid #a4cae20d; border-radius: 15px; background: #a4cae206; }
.stat-averages span { display: block; color: var(--muted); font: 7px/1.7 'DM Mono', monospace; }
.stat-averages b { display: block; margin-top: 10px; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.measurements-card { margin-top: 24px; }
.measurements-header { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; }
.measurements-header h2 { margin: 0; font-size: 25px; }
.measurements-header p:last-child { font-size: 12px; color: var(--muted); max-width: 400px; margin: 12px 0 0; }
.measurement-current { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.measure-pill { padding: 18px 15px; border: 1px solid #a4cae21a; border-radius: 18px; background: #a4cae206; }
.measure-pill span { font: 9px 'DM Mono', monospace; color: var(--muted); }
.measure-pill b { display: block; color: #c0e8ee; font-size: 28px; font-weight: 500; margin-top: 8px; overflow-wrap: anywhere; }
.measure-pill b small { font-size: 11px; color: var(--muted); font-weight: 400; }
.measure-delta { display: block; margin-top: 9px; color: var(--muted); font: 10px 'DM Mono', monospace; }
.measure-delta.up { color: var(--pink); }
.measure-delta.down { color: var(--lime); }
.measurement-history { display: grid; gap: 8px; margin-top: 20px; }
.history-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: #a4cae207; color: var(--muted); font: 10px/1.7 'DM Mono', monospace; overflow-wrap: anywhere; }
.history-item b { color: var(--text); }
.delete-measurement { width: 44px; min-width: 44px; height: 44px; border: 1px solid #e5a0d020; border-radius: 12px; background: #e5a0d005; color: var(--pink); font-size: 22px; }
.weight-chart-wrap { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.weight-chart { height: 170px; margin-top: 42px; gap: 6px; }
.weight-bar { height: var(--weight-height); background: linear-gradient(180deg, #aa9aff, #6b6aa255); animation: grow .45s both; }
.weight-bar b { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); color: #c2b9ea; font: 8px 'DM Mono', monospace; white-space: nowrap; }
.weight-chart-days { gap: 6px; }
.weight-chart-days span { font-size: 7px; }
.empty-measure-chart { width: 100%; padding: 38px 20px; color: var(--muted); font-size: 13px; text-align: center; line-height: 1.8; }

/* Profile and Copilot. */
.profile-card { padding: 26px 22px; margin: 0; border-radius: 30px; background: radial-gradient(ellipse at 100% 0, #aa9aff12, transparent 60%), linear-gradient(135deg, #162b3c, #050c1b); }
.profile-card .module-intro::before { content: "◎"; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 21px; margin-bottom: 24px; background: linear-gradient(135deg, #61e3f411, #aa9aff17); border: 1px solid #b9dfff26; color: #b9def1; font-size: 36px; }
.profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 18px 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.profile-form label > div { display: flex; align-items: center; border: 1px solid #a4cae224; border-radius: 14px; background: #080f1980; margin-top: 9px; padding-right: 12px; }
.profile-form label > div:focus-within { border-color: #61e3f477; }
.profile-form label > div input { border: 0; box-shadow: none; background: transparent; }
.profile-form label > div span { color: var(--muted); font-size: 11px; }
.profile-form select { margin-top: 9px; }
.profile-form label:has(select), .profile-form button { grid-column: 1 / -1; }
.profile-form button { margin-top: 8px; }
.calculated-goal { padding: 20px; margin-top: 24px; border: 1px solid #61e3f423; border-radius: 18px; background: #61e3f408; color: var(--muted); font-size: 13px; line-height: 1.8; }
.calculated-goal b { display: block; color: var(--cyan); font-size: 27px; font-weight: 500; margin-top: 5px; }
.copilot-card { padding: 28px 22px; border-radius: 30px; background: radial-gradient(ellipse at 90% 0, #6c53bf27, transparent 70%), linear-gradient(145deg, #142636, #101b2c); }
.copilot-head { display: flex; flex-direction: column; gap: 24px; }
.ai-star { display: grid; place-items: center; width: 66px; height: 66px; font-size: 33px; color: #ccecfb; border-radius: 23px; border: 1px solid #bcadff3c; background: linear-gradient(135deg, #397d992c, #62529948); box-shadow: 0 0 42px #9a79e816; }
.copilot-head .eyebrow { color: #bfb2f3; }
.copilot-head h2 { font-size: clamp(32px, 6vw, 46px); margin: 0; }
.copilot-card > p { max-width: 470px; color: var(--muted); font-size: 14px; margin: 18px 0 28px; }
.ai-input { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid #9bb5e52c; border-radius: 22px; background: #070e1bb0; }
.ai-input:focus-within { border-color: #a89efb70; box-shadow: 0 0 0 4px #aa9aff06; }
.ai-input textarea { min-height: 156px; padding: 8px; border: 0; background: transparent; box-shadow: none; font-size: 16px; resize: vertical; }
.ai-input textarea:focus-visible { outline-offset: 0; }
.ai-input button { align-self: flex-end; width: 52px; height: 48px; border: 1px solid #a6f2fa52; border-radius: 15px; color: #07202b; background: linear-gradient(130deg, #7fdfed, #929eeb); font-size: 22px; }
.ai-result { margin-top: 22px; }
.ai-result-card { padding: 20px; border: 1px solid #61e3f426; border-radius: 22px; background: linear-gradient(130deg, #61e3f408, #aa9aff0a); }
.ai-result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: var(--cyan); font: 9px/1.6 'DM Mono', monospace; }
.ai-result-head b { color: var(--text); font: 500 28px Inter, sans-serif; }
.ai-products { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0; }
.ai-products span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: #ffffff03; color: #acbfce; font-size: 11px; }
.ai-macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.ai-macros span { font-size: 11px; color: var(--muted); }
.ai-macros b { display: block; color: #d8e6f3; margin-bottom: 5px; font-size: 21px; font-weight: 500; overflow-wrap: anywhere; }
.ai-result-card button { width: 100%; margin-top: 24px; }
.ai-result-card button i { font-style: normal; }
.ai-success { padding: 18px; color: var(--lime); border: 1px solid #95e5b829; border-radius: 17px; background: #95e5b808; font-size: 14px; }

/* Global dialogs keep native showModal, focus trapping and Escape behavior. */
.meal-dialog { width: min(540px, calc(100% - 24px)); max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 0; border: 1px solid #afdaf42c; border-radius: 28px; color: var(--text); background: linear-gradient(145deg, #16293c, #0c1827); box-shadow: 0 30px 100px #0000008c; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.meal-dialog::backdrop { background: #020812b8; -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
.meal-dialog form { padding: 24px 20px max(24px, env(safe-area-inset-bottom)); }
.dialog-head { margin-bottom: 24px; align-items: center; }
.dialog-head > div { min-width: 0; }
.dialog-head h2 { font-size: 25px; margin: 0; }
.close { flex-shrink: 0; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 14px; color: #b7cddd; background: #ffffff04; font-size: 25px; }
.meal-dialog label { display: block; margin: 15px 0; }
.meal-dialog label input, .meal-dialog label select, .meal-dialog label textarea { display: block; margin-top: 8px; }
.meal-dialog h3 { margin: 28px 0 10px; font-size: 20px; }
.form-row, .form-row.three, .diet-macros, .diet-ingredient { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-row, .diet-macros, .diet-ingredient { align-items: end; }
.form-row > label { min-width: 0; margin: 9px 0; }
.save-meal { width: 100%; margin-top: 20px; }
.modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.modal-actions .save-meal { flex: 1; margin-top: 0; }
.cancel-meal { color: #b4c6d6; border-color: var(--line); background: #ffffff04; }
.diet-dialog { width: min(800px, calc(100% - 24px)); }
.diet-ingredient, .recipe-step { padding: 16px 12px; margin: 22px 0; border: 1px solid #adc6e124; border-radius: 18px; background: #070f1c35; min-width: 0; }
.diet-ingredient legend, .recipe-step legend { padding: 0 8px; color: var(--cyan); font: 11px/1.5 'DM Mono', monospace; }
.diet-ingredient label { margin: 0; }
.diet-ingredient button { align-self: end; font-size: 12px; }
.recipe-step textarea, .diet-dialog textarea { width: 100%; }
.recipe-step button { margin: 4px 5px 4px 0; padding: 10px 12px; font-size: 12px; }
#recipeDetails { padding: 24px 20px; }
#recipeDetailsBody { overflow-wrap: anywhere; color: var(--muted); font-size: 14px; }
#recipeDetailsBody p, #recipeDetailsBody li { white-space: pre-wrap; line-height: 1.8; }
#recipeDetailsBody li { margin: 12px 0; padding-left: 4px; }
#recipeDetailsBody li::marker { color: var(--cyan); }
#recipeDetailsBody h3 { color: var(--text); }
#recipeDetailsBody ul, #recipeDetailsBody ol { padding-left: 22px; }
#recipeNutritionPreview { margin: 22px 0; }
#recipeError, #fridgeError, #profileError, #authError { color: #f1aecd; }
.product-picker { position: relative; }
.product-search-row { display: flex; align-items: stretch; gap: 8px; }
.product-search-row > input { min-width: 0; }
#scanProduct { flex: 0 0 auto; min-height: 44px; margin-top: 8px; padding: 0 13px; border: 1px solid #61e3f466; border-radius: 12px; background: linear-gradient(135deg,#61e3f418,#5caeff12); color: var(--cyan); font-size: 11px; white-space: nowrap; }
.scanner-dialog { width: min(520px,calc(100% - 20px)); max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 20px 20px max(20px, env(safe-area-inset-bottom)); border: 1px solid #61e3f45c; border-radius: 26px; color: var(--text); background: linear-gradient(145deg,#10263a,#07121f); box-shadow: 0 30px 100px #000b; overflow-y: auto; overscroll-behavior: contain; }
.scanner-dialog::backdrop { background: #01070dd9; backdrop-filter: blur(10px); }
.scanner-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.scanner-head h2 { margin: 3px 0 0; font-size: 23px; }
.scanner-view { position: relative; overflow: hidden; aspect-ratio: 4/3; border: 1px solid #61e3f438; border-radius: 20px; background: #020810; }
.scanner-view video { width: 100%; height: 100%; object-fit: cover; }
.scanner-frame { position: absolute; inset: 32% 8%; border: 2px solid var(--cyan); border-radius: 12px; box-shadow: 0 0 0 999px #02081266,0 0 22px #61e3f477; }
#scannerStatus { min-height: 22px; margin: 16px 0; color: var(--muted); font-size: 12px; text-align: center; }
#cancelScanner { width: 100%; }
.product-suggestions { position: relative; margin-top: 6px; max-height: min(220px, 30vh); overflow-y: auto; padding: 5px; background: #102335; border: 1px solid #61e3f447; border-radius: 14px; box-shadow: 0 20px 40px #00000060; }
.product-suggestions button { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px; width: 100%; min-height: 52px; padding: 11px; border: 0; border-radius: 10px; background: none; color: var(--text); text-align: left; }
.product-suggestions button > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.product-suggestions strong { font-size: 13px; font-weight: 500; }
.product-suggestions small, .product-suggestions em { color: var(--muted); font-size: 10px; font-style: normal; }

/* Login, onboarding and feedback use the same visual language. */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-size: 19px; font-weight: 600; letter-spacing: .04em; }
.brand span span { color: var(--cyan); }
.brand small { display: block; margin-top: 4px; font: 9px 'DM Mono', monospace; letter-spacing: .3em; color: var(--muted); }
.brand-name { font-size:17px; font-weight:500; letter-spacing:-.02em; color:var(--cyan); }.brand-name em { font-size:13px; font-style:normal; font-weight:400; }.brand .brand-name small { font:8px Inter,sans-serif; letter-spacing:.02em; margin-top:5px; }.brand-mark { display: grid; place-items: center; width: 40px; height: 44px; border-radius: 15px; background: linear-gradient(135deg, #7fe5ea, #4fa8d4); color: #0b2636; font-weight: 600; box-shadow: 0 4px 24px #61e3f418; }
.auth-screen { display: grid; place-items: center; min-height: 100dvh; padding: 26px 16px; }
.auth-card { width: min(100%, 490px); padding: 32px 24px; border-radius: 32px; background: radial-gradient(ellipse at 100% 0, #39527630, transparent 65%), linear-gradient(140deg, #08152a, #0d1827); }
.auth-brand { margin-bottom: 48px; }
.auth-card h1 { font-size: clamp(33px, 8vw, 46px); line-height: 1.14; margin: 16px 0; }
.auth-card h1 span { color: #a3e4ed; }
.auth-copy { color: var(--muted); font-size: 14px; margin-bottom: 30px; }
.oauth-button { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px; border: 1px solid #e0eef9; border-radius: 15px; background: #f1f7fc; color: #172937; font-size: 14px; font-weight: 500; }
.oauth-button > span { color: #4285f4; font: bold 20px Arial, sans-serif; }
.oauth-button i { font-style: normal; margin-left: auto; }
.oauth-future { display: flex; gap: 12px; margin: 12px 0 22px; }
.oauth-future button { flex: 1; padding: 13px; min-height: 60px; border: 1px solid var(--line); border-radius: 15px; background: #ffffff03; color: var(--muted); font-size: 14px; }
.oauth-future small { display: block; margin-top: 5px; font: 8px 'DM Mono', monospace; letter-spacing: .1em; }
.auth-note { color: var(--muted); font-size: 13px; line-height: 1.7; }
.auth-note:empty { display: none; }
.onboarding-screen { min-height: 100dvh; padding: 24px 16px; }
.onboarding-card { max-width: 880px; padding: 28px 22px; margin: auto; border-radius: 30px; }
.onboarding-card h1 { font-size: clamp(28px, 6vw, 40px); max-width: 620px; }
.onboarding-card p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.onboarding-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 28px 0; }
.onboarding-fields label { display: flex; flex-direction: column; gap: 9px; }
.onboarding-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 24px 0; }
.onboarding-results > div { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #61e3f405; color: var(--muted); font-size: 13px; }
.onboarding-results b { display: block; color: var(--cyan); font-size: 29px; margin-top: 10px; font-weight: 500; }
.onboarding-card .text-button { margin: 16px 8px 0 0; }
.onboarding-card .oauth-button { background: linear-gradient(115deg, #7ce6ec, #59bdf7); border-color: #94efff3b; color: #071923; }
.sync-message { position: fixed; z-index: 30; top: 14px; left: 16px; right: 16px; padding: 13px 18px; border: 1px solid #95e5b833; border-radius: 16px; background: #112636f2; color: var(--lime); box-shadow: 0 10px 32px #00000035; font-size: 12px; line-height: 1.6; pointer-events: none; opacity: 0; transform: translateY(-12px); transition: opacity .2s, transform .2s; backdrop-filter: blur(20px); }
.sync-message.cloud { color: #a7e7f6; border-color: #61e3f438; }
.sync-message.visible { opacity: 1; transform: translateY(0); }

/* Navigation uses the existing data-route attributes and disclosure controller. */
.mobile-navigation { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: #0b1624f0; border-top: 1px solid #a4cae226; border-radius: 24px 24px 0 0; box-shadow: 0 -12px 40px #00000024; backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); }
.mobile-navigation a, .mobile-navigation button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 58px; padding: 8px 3px; border: 1px solid transparent; border-radius: 16px; color: #8ea4b8; background: none; text-decoration: none; font-size: 10px; font-weight: 500; }
.mobile-navigation .active { border-color: #61e3f417; background: linear-gradient(155deg, #61e3f41a, #329fff09); color: #95effa; box-shadow: inset 0 1px 0 #61e3f423; }
.more-navigation { display: grid; gap: 6px; position: fixed; z-index: 21; bottom: calc(90px + env(safe-area-inset-bottom)); right: 12px; width: min(300px, calc(100vw - 24px)); padding: 12px; border-radius: 23px; background: #07132af5; box-shadow: 0 16px 60px #00000060; }
.more-navigation a { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 12px 16px; border-radius: 14px; color: #b4c6d8; font-size: 14px; text-decoration: none; }
.more-navigation .active { color: var(--cyan); background: #61e3f40d; }
.mobile-navigation a::before, .mobile-navigation button::before, .nav-item::before, .more-navigation a::before { content: ""; display: block; width: 21px; height: 21px; flex-shrink: 0; background: currentColor; mask: var(--nav-icon) center / contain no-repeat; -webkit-mask: var(--nav-icon) center / contain no-repeat; }
[data-route="dashboard"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m3%2010%209-7%209%207v10a1%201%200%200%201-1%201h-5v-7H9v7H4a1%201%200%200%201-1-1Z%22%2F%3E%3C%2Fsvg%3E"); }
[data-route="diet"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%203v7M5%203v5a3%203%200%200%200%206%200V3M8%2011v10M19%203c-4%203-4%209%200%209V3Zm0%209v9%22%2F%3E%3C%2Fsvg%3E"); }
[data-route="recipes"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205C8%202%204%203%203%204v15c3-1%206-1%209%202m0-16c4-3%208-2%209-1v15c-3-1-6-1-9%202V5Z%22%2F%3E%3C%2Fsvg%3E"); }
[data-route="fridge"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%225%22%20y%3D%222%22%20width%3D%2214%22%20height%3D%2220%22%20rx%3D%223%22%2F%3E%3Cpath%20d%3D%22M5%2010h14M8%205v2M8%2013v3%22%2F%3E%3C%2Fsvg%3E"); }
[data-route="progress"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%203v18h18M6%2015l5-5%204%203%205-7%22%2F%3E%3C%2Fsvg%3E"); }
[data-route="profile"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M4%2021v-2a8%208%200%200%201%2016%200v2%22%2F%3E%3C%2Fsvg%3E"); }
[data-route="copilot"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m12%203%202.5%206.5L21%2012l-6.5%202.5L12%2021l-2.5-6.5L3%2012l6.5-2.5ZM20%202v4m-2-2h4%22%2F%3E%3C%2Fsvg%3E"); }
#moreNavigationToggle { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%225%22%20cy%3D%2212%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%2219%22%20cy%3D%2212%22%20r%3D%221%22%2F%3E%3C%2Fsvg%3E"); }

/* Responsive geometry: the approved desktop stage is 1068px + Mila's edge. */
@media (min-width:821px) {
 .app-shell { display:grid; grid-template-columns:230px minmax(0,1fr); gap:30px; width:calc(100% - 132px); max-width:1068px; margin:34px 0 36px var(--stage-left); min-height:948px; padding:16px 24px 24px 12px; border:1px solid #0877a1; border-right-color:#44358e; border-radius:30px; background:radial-gradient(ellipse at 100% 50%,#20145b44,transparent 50%),linear-gradient(115deg,#04112066,#01050ec9); box-shadow:0 0 40px #003e7528; }
 .sidebar { display:flex; flex-direction:column; position:sticky; top:30px; height:906px; max-height:calc(100dvh - 65px); min-height:650px; padding:23px 11px 22px; border-radius:23px; background:linear-gradient(150deg,#020712,#010610); border-color:#10243c; }.sidebar .brand { padding:0 15px; }.sidebar .brand-mark { width:36px; height:37px; border-radius:9px; font-size:24px; background:linear-gradient(125deg,#17c7f8,#35a5e6); }.sidebar .brand-name { white-space:nowrap; font-size:18px; }.sidebar .brand-name em { font-size:14px; }
 .sidebar .nav-item::before { width:24px; height:27px; background-image:url('design-reference.png'); background-size:1536px 1024px; background-color:transparent; mask:radial-gradient(ellipse,#000 55%,transparent 78%); -webkit-mask:radial-gradient(ellipse,#000 55%,transparent 78%); }
 .sidebar [data-route="dashboard"].nav-item::before { background-position:-50px -150px; }
 .sidebar [data-route="diet"].nav-item::before { background-position:-50px -210px; }
 .sidebar [data-route="recipes"].nav-item::before { background-position:-50px -266px; }
 .sidebar [data-route="fridge"].nav-item::before { background-position:-50px -323px; }
 .sidebar [data-route="progress"].nav-item::before { background-position:-50px -382px; }
 .sidebar [data-route="profile"].nav-item::before { background-position:-50px -439px; }
 .sidebar [data-route="copilot"].nav-item::before { background-image:url('design-reference.png'); background-position:-49px -522px; background-color:transparent; }
 .navigation { display:grid; gap:9px; margin-top:28px; }.nav-item { display:flex; align-items:center; gap:16px; position:relative; min-height:49px; padding:10px 17px; text-decoration:none; color:#98bee4; font-size:15px; border:1px solid transparent; border-radius:12px; }.nav-item i { display:none; }.nav-item.active { color:#39ecff; border-color:#173260; border-left:2px solid #10e9ff; background:linear-gradient(100deg,#023a4a90,#0c1631); box-shadow:-5px 0 15px #00c8ff1c; }.nav-item.active::before { filter:drop-shadow(0 0 7px #00cfff); }.nav-item[data-route="copilot"] { margin:20px 15px 0; border-top:1px solid #107595; border-radius:0; padding:22px 0 21px; color:var(--text); }.nav-item[data-route="copilot"]::before { background:#0ad8ee; filter:drop-shadow(0 0 8px #03cfff); }.nav-item[data-route="copilot"] small { position:absolute; left:34px; top:49px; color:var(--muted); font-size:10px; }
 .sidebar-bottom { position:relative; margin-top:auto; padding:24px 6px 0; }.sidebar-bottom>p,.sync-status { display:none; }.user-summary { position:relative; gap:10px; }.avatar { width:39px; height:39px; }.sidebar-account-name { position:absolute; left:57px; top:27px; font-size:14px; pointer-events:none; }#userEmail { display:none; }.logout-button { position:absolute; left:49px; top:20px; min-height:28px; font-size:10px; padding:4px 0; background:none; }.sidebar-settings { position:absolute; right:7px; top:21px; width:39px; height:41px; display:grid; place-items:center; border:1px solid #14385b; border-radius:16px; font-size:21px; text-decoration:none; color:#86acd2; }
 .main-content { padding:34px 0 0; }.mobile-navigation,.more-navigation,.mobile-brand { display:none; }.topbar { height:120px; margin:0; position:relative; display:block; padding-right:240px; }.topbar h1 { font-size:20px; font-weight:400; }.topbar h1 .greeting-person { display:block; font-size:40px; color:#68e8f4; font-weight:500; line-height:1.15; margin-top:4px; }.greeting-subtitle { color:#7497c2; margin:7px 0 0; font-size:17px; font-weight:300; }.top-actions { position:absolute; right:18px; top:13px; display:block; z-index:7; }
 .mila-floating::before { content:""; position:absolute; pointer-events:none; width:180px; height:248px; right:5px; bottom:calc(100% - 19px); background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 250'%3E%3Cdefs%3E%3ClinearGradient id='g' x2='0' y2='1'%3E%3Cstop stop-color='%239757ff'/%3E%3Cstop offset='1' stop-color='%2300d9ff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M70 -10C130 40 -30 50 20 85C40 105 130 60 155 130C180 180 110 200 110 250' stroke='url(%23g)' stroke-width='2.4' fill='none'/%3E%3C/svg%3E") center/contain no-repeat; filter:drop-shadow(0 0 5px #147aff) drop-shadow(0 0 9px #553aff); }
}
@media (min-width:821px) and (max-width:1199px) {
 .app-shell { grid-template-columns:180px minmax(0,1fr); gap:20px; padding-right:18px; }.sidebar .brand { padding:0 5px; gap:8px; }.sidebar .brand-name { font-size:15px; }.sidebar .brand-name em { font-size:11px; }.sidebar .brand-name small { font-size:7px; }.nav-item { font-size:13px; padding:12px; }.main-content { padding-top:26px; }.topbar { padding-right:180px; }.header-quote { font-size:11px; right:53px; }.date-control { right:53px; }.date-control>summary { padding:8px; gap:6px; }.date-control #todayDate { font-size:9px; }.top-actions { right:0; }.hero-grid { margin-right:0; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); }.calorie-card { padding:20px 15px; }.calorie-layout { gap:12px; }.macro-top { display:block; }.macro-top b { display:block; margin-top:3px; }.macro-grid { gap:11px; transform:none; }.ring { width:150px; }#eatenKcal { font-size:30px; }.water-card { padding:24px 15px; }.water-title .eyebrow { font-size:14px; padding-left:22px; }.drop { left:15px; width:13px; }.water-more { right:8px; }.water-title small { font-size:12px; }.water-title h2 { font-size:18px; }.water-actions { right:12px; }.water-actions #addWater { width:34px; height:34px; min-height:34px; }.journal-card { padding:16px 12px; }#meals { flex-wrap:wrap; }#meals>div { flex-basis:100%; }#addMealOpen { margin-left:0; }.journal-tools { margin-left:auto; }.meal-row { gap:7px; grid-template-columns:44px minmax(0,1fr) auto; grid-template-areas:"symbol info kcal" "symbol info time"; }.meal-symbol { width:44px; }.meal-time { margin-top:0; }.meal-kcal { margin-top:0; }.meal-name { font-size:11px; }.quick-actions { gap:7px; }.quick-actions>* { font-size:10px; }.quick-card { padding-inline:10px; }.mila-advice { padding-left:16px; padding-right:55px; }.mila-advice h2 { font-size:15px; }.mila-advice h2 span { width:26px; height:26px; margin-right:3px; }.mila-advice p { font-size:12px; }.mila-floating { --mila-scale:.65; left:auto; right:4px; width:102px; }.mila-label { margin:0; transform:none; font-size:14px; }.mila-label small { font-size:8px; margin-left:24px; }.mila-floating::before { width:130px; height:230px; right:0; }.motivation-card { margin-left:0; }.motivation-card>div { padding-left:16px; }.motivation-card h2 { font-size:17px; }.motivation-percent { right:12px; }
}
@media (max-width:820px) {
 .main-content { padding:20px 16px calc(100px + env(safe-area-inset-bottom)); }.mobile-brand { display:flex; align-items:center; gap:7px; text-decoration:none; font-size:14px; margin-bottom:29px; height:30px; }.mobile-brand .brand-mark { width:24px; height:26px; font-size:17px; border-radius:6px; }.mobile-brand small { font-size:11px; }.topbar { display:block; position:relative; margin-bottom:16px; padding-right:95px; min-height:105px; }.topbar h1 { font-size:16px; font-weight:400; }.topbar h1 .greeting-person { display:block; font-size:30px; color:#6deaff; line-height:1.15; margin-top:3px; }.greeting-subtitle { font-size:12px; color:var(--muted); margin:6px 0; }.header-quote { display:none; }.top-actions { display:block; position:fixed; top:19px; right:18px; z-index:16; }.utility-menu>summary { width:31px; height:32px; border-radius:10px; }.utility-menu svg { width:20px; height:20px; }.date-control { top:auto; bottom:0; right:auto; left:0; }.date-control>summary { min-height:24px; padding:0; border:0; background:none; border-radius:0; gap:5px; }.date-control #todayDate { font-size:9px; }.calendar-symbol { width:11px; height:12px; }.date-controls-panel { left:0; right:auto; width:min(300px,calc(100vw - 32px)); top:29px; }
 .dashboard-view { grid-template-columns:minmax(0,1fr); gap:16px; }.hero-grid { grid-template-columns:minmax(0,1fr); gap:16px; margin:0; }.journal-card,.quick-card,.dashboard-trend,.mila-advice { grid-column:auto; grid-row:auto; }.calorie-card { height:auto; min-height:237px; padding:18px; }.calorie-card h2 { font-size:18px; }.calorie-layout { gap:18px; margin-top:15px; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); }.ring { width:174px; }.ring::before { inset:13px; }#eatenKcal { font-size:34px; }.macro-top { display:block; font-size:11px; }.macro-top b { display:block; margin-top:4px; font-size:11px; }.macro-top small { font-size:10px; }.macro-grid { gap:14px; transform:none; }.bar { height:6px; margin-top:6px; }.water-card { height:177px; margin-top:0; padding:18px 22px; }.water-title .eyebrow { margin-bottom:18px; }.water-wave { height:57px; margin-bottom:15px; }.water-title h2 { font-size:21px; }.water-title small { font-size:14px; }.water-actions { right:20px; bottom:16px; }.drop { top:21px; left:22px; }.water-more { right:20px; top:13px; }
 .journal-card { min-height:0; padding:18px 16px; }.meal-row { grid-template-columns:52px minmax(0,1fr) auto; grid-template-areas:"symbol info kcal" "symbol info time"; gap:3px 11px; min-height:77px; }.meal-kcal,.meal-time { margin-top:0; }.meal-time { align-self:end; margin-bottom:6px; }.meal-name { font-size:12px; }.meal-type { font-size:13px; }.meal-count { font-size:14px; }#meals h2 { font-size:16px; }#addMealOpen { font-size:11px; padding:8px; }.journal-tools>summary { width:30px; }.journal-card:has(.journal-tools[open]) .meal-row { grid-template-areas:"symbol info kcal" "symbol info time" ". edit delete"; }
 .mila-floating { --mila-scale:.60; left:auto; width:90px; right:18px; top:59px; }.mila-label { margin:-6px 12px 0; transform:none; padding:3px 4px; border-radius:9px; font-size:11px; text-align:center; background:#101231a8; }.mila-label>span { padding:0 3px; }.mila-label small { display:none; }.mila-orb::before,.mila-orb::after { border-width:.7px; }.mila-waveform { gap:3px; bottom:12%; }.mila-waveform i { width:1.5px; }.mobile-navigation { border-radius:0; background:#020813f5; padding-top:4px; padding-bottom:calc(5px + env(safe-area-inset-bottom)); }.mobile-navigation a,.mobile-navigation button { min-height:54px; font-size:9px; }.mobile-navigation .active { border-color:transparent; background:none; color:var(--cyan); box-shadow:none; }.mobile-navigation .active::before { filter:drop-shadow(0 0 5px #00cfff70); }.more-navigation { bottom:76px; }.motivation-card { margin:0; min-height:169px; }.mila-advice { min-height:170px; padding:20px 62px 20px 22px; }.sidebar-account-name,.sidebar-settings { display:none; }.user-summary { margin-top:20px; }
}
@media (max-width:359px) {
 .main-content { padding-inline:12px; }.calorie-card { padding:15px; min-height:219px; }.calorie-layout { gap:14px; }#eatenKcal { font-size:30px; }.ring-core>span { font-size:11px; }.ring::before { inset:11px; }.macro-top { font-size:10px; }.macro-top b { font-size:10px; }.macro-top small { font-size:9px; }.macro-grid { gap:13px; }.journal-card { padding:15px 12px; }#meals { gap:5px; }#meals h2 { font-size:14px; }#addMealOpen { font-size:10px; padding:6px; }.journal-tools>summary { width:26px; }.meal-row { gap:3px 9px; }.meal-kcal { font-size:12px; }.meal-time { font-size:11px; }.meal-name { font-size:11px; }.quick-actions { gap:9px; }.quick-actions>* { font-size:10px; }.mila-advice { padding-left:16px; }.mila-advice h2 { font-size:17px; }.mila-advice h2 span { margin-right:3px; width:29px; height:29px; }.mila-advice p { font-size:12px; }.form-row.three { grid-template-columns:minmax(0,1fr); }.meal-dialog form,#recipeDetails { padding:22px 16px; }
}
@media (min-width:600px) {
 .onboarding-fields,.onboarding-results { grid-template-columns:repeat(2,minmax(0,1fr)); }.form-row.three { grid-template-columns:repeat(3,minmax(0,1fr)); }.diet-macros,.diet-ingredient { grid-template-columns:repeat(4,minmax(0,1fr)); }.library-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); }.measurement-current { grid-template-columns:repeat(3,minmax(0,1fr)); }.profile-form { grid-template-columns:repeat(3,minmax(0,1fr)); }.measurement-history { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (hover: hover) {
  button:not(:disabled):hover { filter: brightness(1.08); border-color: #83d9ea65; }
  .nav-item:hover, .more-navigation a:hover { color: var(--cyan); background-color: #61e3f40a; }
  .mobile-navigation a:hover { color: #c0f3fa; }
  .meal-row:hover, .diet-meal:hover { border-color: #a4cae22d; }
  .chart-bar:hover, .weight-bar:hover { filter: brightness(1.2); }
  .product-suggestions button:hover { background: #61e3f410; }
}
@keyframes grow { from { transform: scaleY(.1); transform-origin: bottom; opacity: .35; } to { transform: scaleY(1); transform-origin: bottom; opacity: 1; } }
@keyframes premiumPop { 0% { opacity: .7; } 100% { opacity: 1; } }
.premium-pop { animation: premiumPop .3s ease-out; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Final precision pass against the desktop region of design-reference.png. */
@media (min-width:1200px) {
 .navigation { gap:6px; margin-top:26px; }
 .nav-item { min-height:52px; padding:10px 14px; gap:16px; }
 .nav-item.active { margin-right:9px; }
 .nav-item[data-route="copilot"] { margin:16px 15px 0 13px; padding:17px 0 21px; gap:11px; }
 .nav-item[data-route="copilot"] small { left:35px; top:45px; }
 .sidebar [data-route="copilot"].nav-item::before { background:radial-gradient(ellipse,#29edff44,transparent 72%); mask:none; -webkit-mask:none; }
 .sidebar [data-route="copilot"] i { display:block; position:absolute; left:5px; color:#0ee2f5; font-size:22px; text-shadow:0 0 12px #00cfff; }
 .sidebar-bottom { padding-bottom:9px; }
 .sidebar-account-name { top:23px; left:55px; max-width:100px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
 .sidebar-settings { top:18px; right:10px; }
 .logout-button { top:22px; }
 .topbar>div:first-child { padding-left:5px; }
 .greeting-subtitle { margin-top:3px; }
 .top-actions { right:11px; top:26px; }
 .date-control { right:70px; top:18px; }
 .date-control>summary { min-height:43px; padding-inline:15px; }
 .header-quote { right:78px; top:78px; text-align:left; }
 .calorie-layout { transform:translate(3px,0); }
 .ring { height:160px; background-color:#192849; box-shadow:0 0 25px #2359ff1a; }
 .macro-grid { transform:translateY(-4px); }
 .water-card { padding-top:25px; }
 .water-bars { padding-inline:2px; }
 .water-wave { height:71px; }
 .journal-card { min-height:314px; padding-right:16px; }
 #addMealOpen { min-width:129px; font-size:13px; }
 .meal-row { column-gap:16px; grid-template-columns:52px minmax(0,1fr) 63px 42px; }
 .meal-kcal { margin-top:7px; }
 .meal-time { margin-top:8px; font-size:13px; }
 .meal-name { letter-spacing:-.035em; }
 .quick-card,.dashboard-trend { transform:translateX(2px); }
 .quick-actions { gap:15px; }
 .dashboard-trend { min-height:167px; }
 .mila-advice { width:calc(100% + 17px); margin-top:-2px; padding-top:16px; }
 .mila-advice h2 { margin-bottom:13px; }
 .mila-advice h2 span { margin-right:3px; }
 .mila-advice>a { right:24px; bottom:31px; }
 .motivation-card { margin:2px -2px 0 17px; min-height:145px; }
 .motivation-card>div { padding-top:49px; padding-bottom:13px; }
 .motivation-line { margin-top:14px; width:81%; }
 .mila-floating { top:213px; left:calc(var(--stage-left) + 991px); }
 .mila-label { margin-top:-3px; transform:translateX(32px); padding:10px 6px 12px; background:linear-gradient(130deg,#071126ed,#151038db); }
 .app-shell { background:radial-gradient(ellipse at 100% 70%,#2b176355,transparent 45%),radial-gradient(ellipse at 25% 22%,#04255033,transparent 45%),linear-gradient(115deg,#04112066,#01050ec9); }
 .calorie-card { box-shadow:0 0 30px #3046cb15,inset 0 1px #739fff0a; }
 .mila-advice { background:radial-gradient(ellipse at 0 70%,#00377744,transparent 80%),var(--glass); }
 .dashboard-trend { background:radial-gradient(ellipse at 100% 80%,#32247825,transparent 75%),var(--glass); }
}
.calendar-symbol::after { content:""; position:absolute; left:3px; right:3px; top:-3px; height:5px; border-inline:1px solid #9cbbdf; }
.mila-advice>a { font-size:0; }
.mila-advice>a::after { content:""; width:8px; height:8px; border-top:2px solid #001123; border-right:2px solid #001123; transform:rotate(45deg); margin-left:-3px; }
.avatar:empty::before { content:""; width:18px; height:22px; background:currentColor; mask:var(--nav-icon) center/contain no-repeat; }
.sidebar .avatar { --nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 23v-3a8 8 0 0 1 16 0v3'/%3E%3C/svg%3E"); }

/* Catalog actions reuse the meal modal palette. */
#lookupBarcode { padding: 9px 12px; border: 1px solid #61e3f447; border-radius: 10px; background: #61e3f410; color: var(--text); font: inherit; cursor: pointer; }
#lookupBarcode { align-self: center; }
#catalogMessage { margin: 8px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
#catalogMessage:empty { display: none; }
.product-suggestions button { overflow-wrap: anywhere; }

/* Day journal: one card per meal, products nested inside. */
.meal-group { margin: 10px 0; border: 1px solid #31516c80; border-radius: 16px; background: linear-gradient(125deg, #102337db, #091624ed); overflow: hidden; }
.meal-group[data-filled="true"] { border-color: #38cdd050; }
.meal-group-header { display: flex; align-items: center; gap: 4px; padding: 6px; }
.meal-group-open { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; flex: 1; min-width: 0; padding: 12px; border: 0; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.meal-group-title { font-size: 16px; font-weight: 600; }
.meal-group-kcal { color: #62e9d7; font-size: 15px; font-weight: 600; white-space: nowrap; }
.meal-group-macros { grid-column: 1 / -1; font-size: 12px; line-height: 1.6; color: #a9bfd2; }
.meal-group-toggle { flex: 0 0 44px; height: 44px; margin-right: 4px; border: 1px solid #61e3f42b; border-radius: 12px; background: #123148; color: #72e8e8; font-size: 24px; cursor: pointer; }
.meal-group-toggle:disabled { opacity: .25; cursor: default; }
.meal-group-products { padding: 0 16px 12px; border-top: 1px solid #31516c60; }
.meal-group-products[hidden] { display: none; }
.meal-product { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #31516c60; }
.meal-product-info { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; overflow-wrap: anywhere; }
.meal-product-info strong { font-size: 14px; font-weight: 500; }
.meal-product-amount { font-size: 12px; color: #7de8d8; }
.meal-product-info small { flex-basis: 100%; color: #9eb2c5; font-size: 11px; line-height: 1.6; }
.meal-product-actions { display: flex; gap: 6px; }
.meal-product-actions button { min-height: 44px; padding: 7px 10px; border: 1px solid #61e3f433; border-radius: 10px; background: #0b2032; color: #bcecf0; font: inherit; font-size: 12px; cursor: pointer; }
.meal-product-actions .delete-product { color: #f2b1c6; border-color: #ef97b128; }
.meal-group-add { display: block; min-height: 44px; margin: 4px 14px 10px; padding: 8px 12px; border: 1px dashed #51dace55; border-radius: 10px; background: #2bd5b909; color: #81eadc; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.meal-group-products > .meal-group-add { margin: 12px 0 0; width: 100%; }
.meal-group button:focus-visible { outline: 2px solid #77fff0; outline-offset: -2px; }
.meal-group-open:hover, .meal-group-add:hover { background: #2bd5b915; }
@media (max-width: 520px) {
  .meal-group-header { padding: 4px; }
  .meal-group-open { padding: 10px 8px; gap: 5px 8px; }
  .meal-group-title { font-size: 14px; }
  .meal-group-kcal { font-size: 13px; }
  .meal-group-macros { font-size: 11px; }
  .meal-group-products { padding: 0 12px 12px; }
  .meal-product { flex-wrap: wrap; gap: 6px; }
  .meal-product-info { flex-basis: 100%; }
  .meal-product-actions { justify-content: flex-end; width: 100%; }
  .meal-product-actions button { min-width: 68px; }
}
