:root {
  --page: #f5f7fa;
  --paper: #ffffff;
  --ink: #19253c;
  --muted: #69748a;
  --line: #e5eaf1;
  --forest: #192a48;
  --forest-hover: #f0f4fb;
  --green: #245eea;
  --green-strong: #174bd0;
  --green-light: #edf3ff;
  --lime: #a6c2ff;
  --warm: #b77950;
  --radius: 17px;
  --shadow: 0 3px 16px #263d5a04;
  --serif: Inter, "Segoe UI", sans-serif;
}

body { font-size: 1rem; letter-spacing: -.012em; -webkit-font-smoothing: antialiased; }
button, input, select { font-family: inherit; }
button { touch-action: manipulation; }
:focus-visible { outline-color: #245eea; outline-width: 2px; }
button:disabled { cursor: default; }
.caption { font-size: 0.875rem; font-weight: 720; letter-spacing: .105em; text-transform: uppercase; }
.muted { color: var(--muted); }
.brand { gap: 10px; }
.brand strong { font-family: Inter, "Segoe UI", sans-serif; font-weight: 780; font-size: 1.625rem; letter-spacing: -.075em; line-height: 1.15; }
.brand-period { color: var(--green); }
.brand-accent { color: var(--green); font-weight: 600; }
.brand-mark { width: 37px; height: 37px; flex: 0 0 37px; border-radius: 11px; background: var(--green); color: white; box-shadow: 0 4px 8px #245eea18; }
.brand-mark .icon { width: 22px; height: 22px; }
.brand-copy { display: grid; gap: 2px; }
.brand small, .brand-copy small { color: #8892a4; font-size: 0.875rem; letter-spacing: .015em; font-weight: 500; margin: 0; }
.sidebar { width: 240px; background: var(--paper); color: var(--ink); border-right: 1px solid var(--line); padding: 31px 15px 20px; }
.sidebar .brand { padding-inline: 10px; }
.navigation { margin-top: 43px; gap: 7px; }
.navigation a, .sidebar-footer a { color: #6c7688; gap: 11px; padding: 11px 12px; min-height: 45px; font-size: .875rem; font-weight: 560; border-radius: 9px; }
.navigation a:hover, .sidebar-footer a:hover { background: var(--forest-hover); color: var(--ink); }
.navigation a[aria-current="page"] { background: #edf3ff; color: #2459d7; font-weight: 700; }
.navigation a[aria-current="page"] .icon { color: #245eea; }
.sidebar-footer { border-color: var(--line); padding-top: 14px; }
.sidebar-status { color: #8790a0; font-size: 0.875rem; padding: 8px 12px; }
.sidebar-footer a { font-size: .875rem; padding-top: 8px; padding-bottom: 8px; }
.sidebar-status i, .network i { width: 6px; height: 6px; background: #d2a86d; }
body[data-online="true"] .sidebar-status i, body[data-online="true"] .network i { background: #6e9e85; box-shadow: 0 0 0 3px #6e9e8510; }
.workspace { margin-left: 240px; }
.topbar { min-height: 76px; background: var(--paper); border-color: var(--line); padding-inline: clamp(24px, 3.1vw, 48px); }
.breadcrumb { font-size: 0.875rem; color: #8b94a3; }
.breadcrumb strong { font-weight: 550; color: #56627b; }
.breadcrumb .icon { color: #a4adba; width: 11px; }
.top-actions { display: flex; align-items: center; gap: 22px; min-width: 0; }
.network { background: transparent; border: 0; padding: 0; color: #8791a3; gap: 7px; font-size: 0.875rem; font-weight: 500; }
.account-link { display: flex; align-items: center; gap: 9px; min-width: 0; color: #46516a; font-size: 0.875rem; font-weight: 600; }
.account-link:hover { color: var(--green); }
#account-label { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-initial { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; background: #edf1f7; color: #556b8c; font-size: 0.875rem; font-weight: 670; }
.content { max-width: 1490px; padding: 34px clamp(24px, 3.1vw, 48px) 8px; }
.page-heading h1, .diary-heading h1 { font: 710 clamp(2rem, 3vw, 2.625rem)/1.15 Inter, "Segoe UI", sans-serif; letter-spacing: -.065em; }
.page-heading p { max-width: 62ch; font-size: 1rem; color: var(--muted); margin-top: 8px; line-height: 1.65; }
.button { border-radius: 9px; min-height: 42px; font-size: 1rem; padding: 10px 15px; font-weight: 650; }
.primary { box-shadow: 0 3px 7px #245eea12; }
.primary:hover { background: #174bd0; }
.secondary { background: white; border-color: #dfe5ee; color: #4b5870; box-shadow: none; }
.secondary:hover { border-color: #b9c9e3; background: #f7f9fc; }
.text-link { font-size: .875rem; font-weight: 600; }
.text-link:is(button) { background: transparent; border: 0; padding: 0; }
.icon-button { background: #f8fafd; border-color: #e5eaf2; color: #79869a; }
.icon-button:hover { color: var(--green); background: #edf3ff; }
.compact { min-height: 34px; padding: 6px 10px; font-size: .875rem; }
.card { box-shadow: var(--shadow); }
.card-title h2, .day-card-heading h2, .profile-card h2 { font-size: 1.125rem; letter-spacing: -.025em; font-weight: 670; }
.card-title p { font-size: 0.875rem; }
.card-heading { padding: 19px 21px 17px; }
.icon-box { background: #eff4fd; color: var(--green); width: 35px; flex-basis: 35px; height: 35px; border-radius: 10px; }
.icon-box .icon { width: 18px; }
.footer { font-size: 0.875rem; border-top-color: var(--line); color: #919bab; margin-top: 30px; padding-top: 16px; }
.footer a:hover { color: var(--green); }

.access { min-height: 100svh; display: grid; grid-template-columns: minmax(440px, 1fr) minmax(400px, 1fr); background: white; }
.access-photo { order: 2; position: relative; overflow: hidden; margin: 18px 18px 18px 0; border-radius: 19px; background: #183a33; min-height: min(780px, calc(100svh - 36px)); }
.access-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 54% 50%; }
.access-photo::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, #0b2334c9); pointer-events: none; }
.access-photo-copy { position: absolute; left: clamp(24px, 3.6vw, 52px); bottom: 58px; right: 30px; z-index: 1; color: white; }
.access-photo-copy h2 { font-size: clamp(1.875rem, 3vw, 2.875rem); line-height: 1.14; font-weight: 650; letter-spacing: -.055em; max-width: 12ch; }
.access-photo-copy p { margin-top: 14px; max-width: 31ch; font-size: 1rem; line-height: 1.7; color: #e7f1ed; }
.photo-credit { position: absolute; z-index: 2; right: 20px; bottom: 18px; color: #e0e5eb; font-size: 0.875rem; background: #192a4833; padding: 4px 6px; border-radius: 4px; }
.photo-credit:hover { text-decoration: underline; }
.access-main { display: flex; flex-direction: column; min-width: 0; padding: 36px clamp(30px, 4.5vw, 70px); }
.access-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.access-top .brand { padding: 0; }
.access-top .access-switch { background: #f3f6fb; border: 1px solid #e6ebf3; border-radius: 8px; padding: 8px 15px; color: #536783; font-size: 0.875rem; white-space: nowrap; }
.access-top .access-switch:hover { background: #eaf0fc; text-decoration: none; }
.access-body { flex: 1; display: grid; align-items: center; width: min(100%, 440px); margin: 0 auto; padding: 56px 0; }
.account-form { display: grid; gap: 18px; min-width: 0; }
.access-intro { margin-bottom: 10px; }
.access-intro .caption { color: #71829b; margin-bottom: 12px; }
.access-intro h1 { font: 700 clamp(2.125rem, 3.35vw, 2.875rem)/1.09 Inter, "Segoe UI", sans-serif; letter-spacing: -.06em; }
.access-intro p:last-child { max-width: 38ch; margin-top: 14px; color: #8b95a5; font-size: 1rem; line-height: 1.8; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span { font-size: .875rem; font-weight: 620; color: #4f5d75; }
.field input, .field select { width: 100%; min-width: 0; min-height: 49px; padding: 11px 13px; border: 1px solid #e0e6ef; border-radius: 9px; background: #fbfcfe; color: var(--ink); font: inherit; font-size: 1rem; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus { outline: 0; border-color: #8cabea; box-shadow: 0 0 0 3px #245eea09; background: white; }
.field input::placeholder { color: #a2acbb; }
.field select { padding-right: 25px; text-overflow: ellipsis; }
.access-submit { justify-content: space-between; margin-top: 4px; min-height: 47px; padding-inline: 15px; }
.access-footnote { color: #929caa; font-size: 0.875rem; line-height: 1.65; text-align: center; margin-top: -3px; }
.form-error { background: #fff5f1; border: 1px solid #f5e0d7; border-radius: 8px; padding: 8px 10px; color: #9b5742; }

.diary-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.diary-heading .caption { margin-bottom: 8px; color: #8a97aa; font-size: 0.875rem; }
.diary-heading .button { font-size: 1rem; margin-bottom: 2px; }
.day-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-bottom: 20px; }
.day-picker { display: flex; align-items: center; padding: 3px; gap: 2px; background: white; border: 1px solid var(--line); border-radius: 9px; }
.day-picker input { height: 38px; max-width: 160px; min-width: 124px; border: 0; border-radius: 6px; padding: 0 7px; background: transparent; font-size: 1rem; color: #5b6a83; }
.day-picker .icon-button { border: 0; background: transparent; width: 34px; height: 38px; border-radius: 6px; }
.day-picker .icon-button .icon { width: 14px; }
.day-picker .icon-button:hover { background: #f0f4fd; }
.day-picker .icon-button:disabled { opacity: .27; }
#jump-today { font-size: 0.875rem; color: #7b8ca7; }
.diary-summary, .diary-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 19px; }
.day-energy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; min-height: 228px; padding: 26px clamp(20px, 2.1vw, 32px); border-radius: var(--radius); color: white; background: #192a48; border: 1px solid #192a48; }
.daily-copy { display: grid; gap: 17px; min-width: 0; }
.day-energy .caption { color: #8fa9d6; font-size: 0.875rem; }
.energy-number { color: #b1c2dd; font-size: 1rem; white-space: nowrap; }
.energy-number strong { color: white; font: 600 clamp(3rem, 4.8vw, 4.5rem)/1.08 Inter, "Segoe UI", sans-serif; letter-spacing: -.07em; margin-right: 6px; font-variant-numeric: lining-nums tabular-nums; }
.energy-goal { color: #b5c5de; font-size: 1rem; line-height: 1.6; margin-top: 8px; max-width: 32ch; }
.energy-remaining { color: #e1e9f8; font-size: 1rem; }
.day-meter { width: clamp(107px, 11.4vw, 150px); display: grid; place-items: center; border-radius: 50%; aspect-ratio: 1; background: conic-gradient(#8db4ff var(--progress, 0%), #324464 0); }
.meter-center { display: flex; flex-direction: column; justify-content: center; align-items: center; width: calc(100% - 12px); aspect-ratio: 1; background: #192a48; border-radius: 50%; }
.meter-center strong { font: 590 clamp(1.75rem, 2.9vw, 2.5rem)/1.08 Inter, "Segoe UI", sans-serif; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.meter-center span { margin-top: 5px; color: #92a9cc; font-size: 0.875rem; }
.macros-card, .diary-week, .diary-entries, .profile-card, .device-card { padding: 23px; }
.day-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.day-card-heading > [data-icon] { display: grid; place-items: center; height: 26px; width: 26px; border-radius: 7px; color: #8094b5; background: #f2f5fa; margin-top: -4px; }
.day-card-heading > [data-icon] .icon { width: 14px; }
.day-card-heading .text-link { font-size: .875rem; color: #7990b4; padding-top: 3px; white-space: nowrap; gap: 3px; }
.day-portion { display: flex; align-items: baseline; gap: 7px; margin-top: 9px; }
.day-portion strong { font: 580 clamp(2.25rem, 3.2vw, 3rem)/1.04 Inter, "Segoe UI", sans-serif; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.day-portion > span { font-size: 1rem; color: #8896ac; }
.day-count { font-size: .875rem; color: #94a0b2; margin: 5px 0 20px; }
.day-macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px solid #eef1f6; padding-top: 14px; }
.day-macros div > span { display: flex; align-items: center; gap: 5px; color: #8b97aa; font-size: .875rem; white-space: nowrap; }
.day-macros i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; }
.day-macros strong { display: block; font-size: 1.25rem; font-weight: 650; margin-top: 4px; white-space: nowrap; }
.day-macros small { display: block; color: #99a5b7; font-size: 0.875rem; margin-top: 2px; white-space: nowrap; }
.day-macros div > .macro-meter { display: block; background: #edf1f7; width: 100%; height: 3px; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.day-macros .macro-meter i { display: block; width: var(--macro-progress, 0%); height: 100%; border-radius: inherit; }
.day-macros div:nth-child(1) .macro-meter i { background: #78a18b; }
.day-macros div:nth-child(2) .macro-meter i { background: #d7a570; }
.day-macros div:nth-child(3) .macro-meter i { background: #83a4dd; }
.macro-protein { background: #78a18b; }
.macro-fat { background: #d7a570; }
.macro-carbs { background: #83a4dd; }
.daily-notice { display: flex; align-items: start; gap: 8px; color: #997651; background: #fcf7f0; border: 1px solid #efe5d5; border-radius: 9px; padding: 10px 13px; margin-top: 14px; font-size: 0.875rem; }
.daily-notice .icon { width: 14px; height: 14px; margin-top: 1px; }
.diary-grid { margin-top: 20px; align-items: start; }
.diary-entries, .diary-week { min-height: 272px; }
.diary-empty { display: grid; justify-items: start; gap: 8px; color: #919caf; padding: 31px 0 10px; }
.diary-empty .icon-box { margin-bottom: 4px; width: 38px; height: 38px; background: #f3f6fc; color: #8ca2c7; }
.diary-empty h3 { font-size: 1rem; font-weight: 600; color: #61718b; }
.diary-empty p { font-size: 1rem; max-width: 42ch; line-height: 1.7; }
.diary-empty .text-link { font-size: .875rem; margin-top: 4px; }
.entry-list { list-style: none; margin: 15px 0 0; padding: 0; }
.entry-list li + li { border-top: 1px solid #f0f3f8; }
.entry-open { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto auto; gap: 10px; width: 100%; padding: 12px 0; align-items: center; background: transparent; border: 0; border-radius: 7px; text-align: left; color: var(--ink); }
.entry-open:hover { background: #f8faff; }
.entry-thumb, .entry-thumb img { width: 46px; height: 46px; object-fit: cover; border-radius: 9px; display: grid; place-items: center; background: #f0f4fb; color: #8da3c4; }
.entry-name { min-width: 0; }
.entry-name strong, .entry-name small, .entry-totals > * { display: block; }
.entry-name strong { font-size: 1rem; font-weight: 590; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.entry-name small, .entry-totals small { color: #8c98ab; font-size: 0.875rem; margin-top: 4px; }
.entry-arrow .icon { width: 13px; color: #a3afc0; }
.entry-totals { white-space: nowrap; font-size: 1rem; text-align: right; }
.entry-totals strong { font-weight: 630; }
.entry-totals .incomplete { color: #a88662; }
.week-chart { margin: 24px 0 10px; }
.diary-week .muted { margin-top: 4px; font-size: 0.875rem; color: #99a4b4; }
.week-plot { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative; align-items: end; min-width: 0; gap: 7px; height: 120px; padding: 0 6px; border-bottom: 1px solid #e5eaf3; background: repeating-linear-gradient(to top, transparent 0 38px, #eff3f8 38px 39px); }
.week-target { position: absolute; inset: auto 0 var(--target) 0; border-top: 1px dashed #cbab87; pointer-events: none; }
.week-day { position: relative; z-index: 1; height: 100%; display: grid; justify-items: center; }
.week-day button { position: absolute; inset: 0; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: end; background: transparent; color: #96a2b4; }
.week-bar { width: min(57%, 24px); height: var(--bar); min-height: 2px; background: #cfdbef; border-radius: 5px 5px 0 0; }
.week-day [aria-current="date"] .week-bar, .week-day button:hover .week-bar { background: #5486ee; }
.week-day-name { position: absolute; top: calc(100% + 9px); font-size: 0.875rem; white-space: nowrap; }
.week-day [aria-current="date"] .week-day-name { color: #5177be; font-weight: 700; }
.week-legend { display: flex; flex-wrap: wrap; gap: 5px 17px; margin-top: 37px; font-size: 0.875rem; color: #99a3b3; }
.week-legend span { display: flex; align-items: center; gap: 5px; }
.week-legend i { display: inline-block; width: 8px; height: 6px; border-radius: 2px; background: #cfdbef; }
.week-legend span:last-child i { height: 0; width: 12px; border-top: 1px dashed #cbab87; border-radius: 0; background: none; }

.profile-layout { display: grid; grid-template-columns: minmax(0, 800px); gap: 20px; align-items: start; }
.scales-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.scale-connection { padding: 23px; }
.scale-connection h2 { font-size: 1.125rem; line-height: 1.4; }
.scale-connection p { margin-top: 12px; line-height: 1.65; }
.scale-connection .field { margin-top: 18px; }
.scale-connection .connection-note { font-size: .875rem; color: var(--muted); }
.scale-connection .text-link { margin-top: 16px; }
.profile-card > p { font-size: 1rem; margin-top: 7px; color: #8a96a9; line-height: 1.7; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 14px; margin: 23px 0 25px; }
.full-field { grid-column: 1 / -1; }
.goal-field { padding: 0; margin: 0; min-width: 0; border: 0; }
.goal-field legend { font-size: 0.875rem; font-weight: 620; color: #4f5d75; padding: 0; margin-bottom: 10px; }
.goal-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.goal-options label { position: relative; min-width: 0; cursor: pointer; }
.goal-options input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.goal-options label > span { display: grid; align-content: center; justify-items: start; gap: 7px; min-height: 80px; padding: 11px; border: 1px solid #e4e9f1; border-radius: 10px; color: #7f8ea5; background: #fcfdff; font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }
.goal-options label > span .icon { width: 17px; height: 17px; }
.goal-options input:checked + span { background: #f0f5ff; color: #245eea; border-color: #94b4f4; }
.goal-options input:focus-visible + span { outline: 2px solid #245eea; outline-offset: 2px; }
.goal-options label:hover > span { border-color: #a8c1f0; }
.profile-target { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 9px 16px; background: #f0f5ff; border: 1px solid #e2ebfc; border-radius: 11px; color: #365a94; padding: 17px 18px; margin-top: 18px; }
.profile-target .caption { color: #6f8dbd; font-size: 0.875rem; }
.profile-target .energy-number { font-size: 1rem; color: #7893bc; }
.profile-target .energy-number strong { font-size: 2.375rem; font-weight: 650; color: #2459c8; }
#profile-target-description { color: #7591bb; font-size: 0.875rem; margin-top: 4px; }
.profile-target a { color: #7d95b6; font-size: 0.875rem; margin-bottom: 2px; }
.profile-target a:hover { text-decoration: underline; }
.profile-target a .icon { width: 10px; margin-left: 4px; }
.profile-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 20px; }
.profile-submit > p { font-size: 0.875rem; }
#profile-error { margin-top: 12px; }
.device-card > p { font-size: 1rem; margin-top: 10px; line-height: 1.7; color: #8b97a9; }
.device-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.device-actions .text-link { font-size: .875rem; }
.device-secret { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px; margin-top: 15px; }
.device-secret input { min-height: 35px; height: 35px; font-size: .875rem; font-family: Consolas, monospace; padding: 7px; }
body[data-onboarding="true"] .navigation, body[data-onboarding="true"] .sidebar-footer,
body[data-onboarding="true"] #app-footer { display: none; }
body[data-onboarding="true"] .profile-layout { grid-template-columns: minmax(0, 800px); margin-bottom: 24px; }

.full-nutrition { margin-top: 20px; }
.full-nutrition summary { display: flex; gap: 9px; align-items: center; padding: 17px 22px; list-style: none; font-size: 1rem; font-weight: 650; color: #596983; cursor: pointer; }
.full-nutrition summary::-webkit-details-marker { display: none; }
.full-nutrition summary::after { content: "+"; color: #8b9cb6; font-size: 1.0625rem; font-weight: 400; margin-left: auto; }
.full-nutrition[open] summary::after { content: "−"; }
.full-nutrition summary .icon { width: 15px; height: 15px; color: #7b96c1; }
.nutrition-content { padding: 0 22px 20px; }
.nutrient-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 19px 27px; }
.nutrient-groups h3 { font-size: 1rem; font-weight: 650; color: #6e809c; margin: 5px 0 8px; }
.nutrient-groups dl { margin: 0; }
.nutrient-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 7px 0; border-bottom: 1px solid #f0f3f7; font-size: .875rem; color: #7a879c; }
.nutrient-row dd { margin: 0; text-align: right; }
.nutrient-row strong { font-weight: 600; color: #41526e; }
.nutrient-row dd small { display: block; font-size: 0.875rem; color: #9aa5b6; margin-top: 1px; }
.nutrient-row .nutrient-partial { color: #b28e65; }
.nutrition-note { font-size: 0.875rem; color: #97a2b3; margin-top: 13px; line-height: 1.7; }
.nutrition-note a { font-size: inherit; }
.portion-nutrition { border: 1px solid #e6ecf4; border-radius: 10px; background: #fcfdff; }
.portion-nutrition summary { padding: 10px 12px; font-size: .875rem; }
.portion-nutrition .nutrition-content { padding: 0 12px 12px; }

.analysis-grid { gap: 19px; }
.photo-stage { background: #f3f6fb; border: 1px dashed #dbe3ef; border-radius: 11px; }
.photo-stage img { background: #eff3f8; }
.photo-stage.dragging { border-color: #7ba4ef; box-shadow: inset 0 0 0 2px #7ba4ef; background: #edf3ff; }
.empty-camera { width: 49px; height: 49px; color: #89a2c8; background: #e8effb; border-radius: 13px; }
.empty-photo strong, .empty-results strong { font-size: 1rem; color: #61738d; }
.empty-photo > span:last-child, .empty-results p { color: #94a1b5; font-size: .875rem; line-height: 1.7; }
.view-chip, .photo-tools { background: #192a48eb; }
.photo-tools button[aria-pressed="true"] { background: #f2f6ff; }
.analysis-form { padding: 18px 20px 21px; gap: 13px; }
.weight-field label { font-size: .875rem; color: #64758d; }
.weight-input, .search-input { min-height: 43px; border-color: #e3e9f2; border-radius: 8px; background: #f9fbfe; }
.weight-input .icon, .search-input .icon { color: #8fa4c4; }
.weight-input:focus-within, .search-input:focus-within { outline-color: #91b2f5; }
.weight-input input { font-size: 1.0625rem; font-weight: 650; }
.angle-check { font-size: .875rem; color: #8b99ae; }
#mixed-version { font-size: .875rem; background: #f9fbfe; border-radius: 7px; }
#mixed-version:focus-visible { outline-color: #91b2f5; }
.pill { background: #f0f5ff; color: #6484b9; font-weight: 600; font-size: 0.875rem; }
.summary-card { background: #eff4fc; border: 1px solid #e9effa; box-shadow: none; border-radius: 11px; padding: 15px; }
.energy > span, .energy div > span { color: #6984ab; font-size: .875rem; }
.energy > span { font-size: .875rem; }
.energy strong { font-weight: 650; }
.macros { border-color: #dfe8f5; }
.macros div { color: #7d8fa9; font-size: .875rem; }
.macros strong { font-weight: 620; }
.ingredient-head { color: #95a1b3; font-size: .875rem; }
.ingredient-row { border-color: #eef2f7; font-size: .875rem; padding-block: 7px; }
.ingredient-name strong { font-weight: 570; }
.ingredient-grams { font-weight: 610; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: end; }
.result-actions .text-link { white-space: nowrap; font-size: .875rem; }
.result-diary { font-size: 0.875rem; color: #719481; margin-top: 11px; }
.result-footer p { color: #91a0b3; font-size: 0.875rem; }
.truth-metric { background: #f4f7fc; }
.truth-content { gap: 18px; }
.example { border-radius: 12px; }
.example:hover { border-color: #acc3ee; box-shadow: 0 4px 15px #245eea09; }
.example.selected { border-color: #87abea; }
.example-meta b { color: #748db7; }
.example-text strong { font-size: 1rem; font-weight: 620; }
.example-meta { color: #9aa5b5; font-size: 0.875rem; }
.section-heading h2 { font-size: 1.1875rem; font-weight: 650; letter-spacing: -.04em; }
.section-heading p { font-size: .875rem; color: #8e9bae; }
.table-card { padding: 21px; }
th { color: #92a0b4; font-size: 0.875rem; font-weight: 580; padding: 12px 10px; background: #fafbfd; }
td { color: #63738d; font-size: 0.875rem; padding: 12px 10px; border-color: #eef2f7; }
.history-title strong { font-weight: 590; color: #50627f; }
.history-title small { color: #9aa7ba; font-size: 0.875rem; }
.history-icon { color: #91a8cc; background: #f1f5fc; }
.metric-card strong { font-weight: 650; }
.metric-card span, .metric-card small, .table-note { color: #94a0b2; font-size: .875rem; }
.catalog-source { color: #7d94b9; font-size: .8125rem; }
.benchmark-note { color: #8696ae; font-size: .875rem; }
dialog { border-color: #e2e8f2; border-radius: 16px; box-shadow: 0 24px 90px #12213f33; }
dialog::backdrop { background: #1729466b; backdrop-filter: blur(3px); }
#edit-form, #weigh-form { padding: 24px; }
.dialog-heading h2 { font-size: 1.3125rem; font-weight: 670; letter-spacing: -.045em; }
.dialog-heading p { color: #8c9aaf; font-size: .875rem; line-height: 1.65; }
.edit-total { background: #edf3ff; color: #7390bd; border-radius: 8px; font-size: .875rem; margin-block: 16px 12px; padding: 9px 11px; }
.edit-row { gap: 9px; }
.edit-row input { background: #fbfcfe; border-color: #e3e9f2; border-radius: 7px; font-size: 1rem; }
.food-choices button { background: #f2f6fc; color: #607da9; font-size: .875rem; line-height: 1.55; }
.food-choices button:hover { background: #e7effd; }
.edit-row .chosen { color: #6f7d94; font-size: .8125rem; }
.step-delta { font-size: .875rem; }
.view-chip, .photo-tools button { font-size: .875rem; }

.field > span, .goal-field legend { color: #52627c; }
.access-intro p:last-child, .access-footnote, .profile-card > p, .device-card > p,
.day-count, .day-macros div > span, .day-macros small,
.entry-name small, .entry-totals small, .diary-week .muted, .week-legend,
.nutrition-note, .nutrient-row, .nutrient-row dd small,
.result-footer p, .empty-photo > span:last-child, .empty-results p,
.example-meta, .section-heading p, .table-note { color: #6f7d94; }
.day-macros small, .day-macros div > span, .entry-name small, .entry-totals small,
.week-legend, .nutrition-note, .nutrient-row dd small { font-size: 0.875rem; }
.nutrient-row { font-size: .875rem; }
.nutrient-row .nutrient-partial { color: #967246; }
.day-card-heading .text-link, .week-day-name { color: #6b82a6; }
.profile-target a, #profile-target-description { color: #607da8; }
.footer { color: #78869d; }

@media (max-width: 1120px) {
  .sidebar { width: 218px; padding-inline: 12px; }
  .sidebar .brand { padding-inline: 7px; }
  .brand strong { font-size: 1.5rem; }
  .workspace { margin-left: 218px; }
  .content, .topbar { padding-inline: 24px; }
  .navigation a { gap: 9px; font-size: 0.875rem; }
  .diary-summary, .diary-grid, .profile-layout { gap: 15px; }
  .macros-card, .diary-week, .diary-entries, .profile-card, .device-card { padding: 19px; }
  .day-energy { gap: 13px; }
  .day-meter { width: 113px; }
  .energy-number strong { font-size: 3.25rem; }
}
@media (max-width: 935px) {
  .access { grid-template-columns: minmax(380px, 1fr) minmax(0, .85fr); }
  .access-main { padding-inline: 32px; }
  .access-body { padding-block: 42px; }
  .day-energy { padding: 22px 19px; }
  .day-meter { width: 92px; }
  .energy-number strong { font-size: 2.8125rem; }
  .meter-center strong { font-size: 1.6875rem; }
  .day-macros { gap: 4px; }
  .day-macros strong { font-size: 1.25rem; }
  .day-macros div > span { font-size: .875rem; }
  .profile-layout { grid-template-columns: minmax(0, 1fr); }
  .diary-summary, .diary-grid, .scales-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 740px) {
  .access { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100svh; }
  .access-main { padding: 24px 24px 30px; }
  .access-body { padding: 42px 0 20px; }
  .access-photo { min-height: 0; height: 220px; margin: 0 16px 16px; border-radius: 16px; }
  .access-photo img { object-position: center 53%; }
  .access-photo::after { inset: 0; background: linear-gradient(transparent, #0b23349c); }
  .access-photo-copy { bottom: 31px; left: 21px; }
  .access-photo-copy h2 { font-size: 1.5625rem; max-width: 18ch; }
  .access-photo-copy p { font-size: 1rem; display: none; }
  .photo-credit { right: 10px; bottom: 10px; font-size: 0.875rem; }
  .access-intro h1 { font-size: 2.25rem; }
  .account-form { gap: 17px; }
  .sidebar { position: relative; width: 100%; padding: 17px 20px; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0; }
  .sidebar .brand strong { font-size: 1.4375rem; }
  .sidebar .brand small { font-size: 0.875rem; }
  .sidebar .brand-mark { width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; }
  .sidebar .brand-mark .icon { width: 19px; }
  .sidebar-footer { display: none; }
  .navigation { position: fixed; inset: auto 0 0; z-index: 10; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; background: #fffffffa; border-top: 1px solid var(--line); margin: 0; padding: 8px 9px max(9px, env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px #162a4605; }
  .navigation a { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 7px 2px; min-height: 48px; font-size: 0.875rem; border-radius: 9px; }
  .navigation .icon { width: 17px; height: 17px; }
  .workspace { margin: 0; }
  .topbar { min-height: 48px; padding: 8px 20px; background: var(--page); border: 0; }
  .breadcrumb { font-size: 0.875rem; gap: 5px; min-width: 0; flex: 1; }
  .breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-actions { gap: 11px; flex-shrink: 0; }
  .network { font-size: 0.875rem; }
  .account-initial { width: 27px; height: 27px; flex-basis: 27px; font-size: 0.875rem; background: #e9eff8; }
  #account-label { display: none; }
  .content { padding: 20px 20px calc(150px + env(safe-area-inset-bottom)); }
  .diary-heading { margin-bottom: 20px; gap: 12px; }
  .page-heading h1, .diary-heading h1 { font-size: 1.875rem; }
  .diary-heading .caption { font-size: 0.875rem; }
  .diary-heading .button { min-height: 44px; padding: 8px 11px; font-size: 1rem; }
  .page-heading .button { min-height: 44px; font-size: 1rem; }
  .day-tools { margin-bottom: 17px; }
  .diary-summary, .diary-grid { gap: 14px; }
  .day-energy { min-height: 212px; padding: 22px; }
  .daily-copy { gap: 18px; }
  .day-meter { width: 110px; }
  .energy-number strong { font-size: 3rem; }
  .diary-grid { margin-top: 14px; }
  .card-heading { padding: 17px; }
  .analysis-grid { grid-template-columns: minmax(0, 1fr); }
  .photo-stage { margin-inline: 17px; }
  .analysis-form { padding: 15px 17px 17px; }
  .result-body { padding-inline: 17px; }
  .footer { row-gap: 10px; padding-block: 15px 8px; }
  .profile-fields { margin-top: 20px; }
  body[data-onboarding="true"] .content { padding-bottom: 25px; }
}
@media (max-width: 600px) {
  .crumb-root, .breadcrumb > [data-icon] { display: none; }
  .diary-heading { flex-direction: column; align-items: flex-start; }
  .diary-summary, .diary-grid { grid-template-columns: minmax(0, 1fr); }
  .analysis-form, .summary-card { grid-template-columns: minmax(0, 1fr); }
  .macros { border-left: 0; border-top: 1px solid #dfe8f5; padding: 12px 0 0; }
  .day-energy { min-height: 210px; }
  .energy-number strong { font-size: clamp(3rem, 13vw, 4.125rem); }
  .day-meter { width: clamp(105px, 29vw, 140px); }
  .meter-center strong { font-size: 1.875rem; }
  .day-macros strong { font-size: 1.25rem; }
  .day-macros div > span { font-size: .875rem; }
  .macros-card { padding: 20px; }
  .diary-entries { min-height: 236px; }
  .diary-week { min-height: 252px; }
  .day-portion strong { font-size: 2.4375rem; }
  .day-count { font-size: .875rem; margin-bottom: 18px; }
  .day-macros { gap: 10px; padding-top: 13px; }
  .daily-notice { font-size: 0.875rem; line-height: 1.65; }
  .profile-target .energy-number strong { font-size: 2.25rem; }
  .full-nutrition summary { font-size: 1rem; padding: 15px 18px; }
  .nutrition-content { padding-inline: 18px; }
  .portion-nutrition summary { font-size: .875rem; padding: 10px 12px; }
}
@media (max-width: 390px) {
  .content { padding-inline: 14px; }
  .sidebar, .topbar { padding-inline: 14px; }
  .crumb-root, .breadcrumb > [data-icon] { display: none; }
  .page-heading h1, .diary-heading h1 { font-size: 1.75rem; }
  .diary-heading { flex-wrap: wrap; align-items: start; gap: 12px; }
  #page-profile .diary-heading { flex-wrap: wrap; align-items: center; }
  #page-profile .diary-heading > div { min-width: 0; overflow-wrap: anywhere; }
  .day-energy { padding: 19px 17px; gap: 10px; }
  .energy-number strong { font-size: 2.9375rem; }
  .day-meter { width: 98px; }
  .meter-center strong { font-size: 1.6875rem; }
  .energy-goal { font-size: 1rem; }
  .entry-open { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; }
  .entry-thumb, .entry-thumb img { width: 40px; height: 40px; }
  .entry-name strong { font-size: 1rem; }
  .entry-arrow { display: none; }
  .macros-card, .diary-week, .diary-entries, .profile-card, .device-card { padding: 17px; }
  .goal-options { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .goal-options label > span { font-size: .875rem; padding: 9px 7px; }
  .profile-fields { gap: 14px 10px; }
  .access-main { padding-inline: 21px; }
  .access-intro h1 { font-size: 2.0625rem; }
  .field input, .field select { font-size: 1rem; padding-inline: 10px; }
  #edit-form, #weigh-form { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
