:root {
  color-scheme: dark;
  --navy: #0b1f4d;
  --navy-deep: #071735;
  --navy-soft: #172f59;
  --navy-raised: #1d3863;
  --white: #ffffff;
  --text: #f7f9ff;
  --muted: #c1cce0;
  --faint: #8fa2c3;
  --line: rgba(230,240,255,.14);
  --accent: #f9fbff;
  --shadow: 0 16px 36px rgba(0,0,0,.13);
}
* {box-sizing:border-box}
html {background:var(--navy-deep); scroll-behavior:smooth}
body {margin:0; background:var(--navy-deep); color:var(--text); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; -webkit-font-smoothing:antialiased}
button,input,textarea,select {font:inherit}
button {cursor:pointer}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {outline:2px solid #fff;outline-offset:3px}
[hidden] {display:none!important}
.app-shell {max-width:570px; margin:0 auto; min-height:100dvh; padding-bottom:180px; background:linear-gradient(165deg,#0d2451 0%,#0b1f4d 40%,#081c41 100%)}
.topbar {min-height:106px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:25px 30px 15px}
.brand-name {font-size:25px;letter-spacing:-1.1px;font-weight:750;line-height:1.2}
.brand-period {color:var(--muted)}
.brand-sub {font-size:9px;font-weight:650;letter-spacing:1.3px;color:var(--faint);margin-top:6px}
.privacy-indicator {color:var(--muted);font-size:11px;white-space:nowrap}
.lock-symbol {font-size:13px;margin-right:3px}
.view {padding:0 29px}
.hero {padding:50px 2px 29px;min-height:214px}
.eyebrow,.section-kicker {font-size:10px;letter-spacing:1.65px;color:var(--faint);font-weight:700}
.hero h1 {font-size:34px;line-height:1.17;letter-spacing:-1.5px;font-weight:750;margin:15px 0 9px}
.hero p {max-width:330px;font-size:14px;line-height:1.7;color:var(--muted);margin:0}
.section-block {margin:30px 0 0}
.section-title-row {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px}
.section-title-row h2 {font-size:18px;letter-spacing:-.5px;margin:0;font-weight:700}
.date-tag {font-size:12px;color:var(--muted)}
.summary-grid {display:flex;flex-direction:column;gap:36px}
.panel {background:linear-gradient(125deg,rgba(255,255,255,.125),rgba(255,255,255,.055));border:none;border-radius:24px;box-shadow:var(--shadow)}
.summary-panel {padding:24px 25px;position:relative;overflow:hidden;min-height:170px}
.summary-label {font-size:12px;color:var(--muted)}
.summary-number-row {display:flex;align-items:baseline;gap:17px;margin-top:3px}
.big-number {font-size:64px;line-height:1.17;font-weight:710;letter-spacing:-3px}
.summary-foot {color:var(--faint);font-size:12px;line-height:1.5}
.summary-graphic {margin-top:16px}
.summary-graphic span {display:block;height:4px;width:74px;background:#f7f9ff;border-radius:10px}
.next-panel {padding:3px 1px 0}
.next-time {font-size:24px;letter-spacing:-.7px;font-weight:680;margin-top:10px;margin-bottom:6px}
.insight-panel {margin-top:49px;padding:0 2px}
.insight-panel h2 {font-size:23px;line-height:1.25;letter-spacing:-.65px;margin:11px 0 11px;font-weight:700}
.insight-panel p {font-size:13px;line-height:1.75;color:var(--muted);max-width:400px;margin:0}
.insight-note {font-size:11px;color:var(--faint);margin-top:14px}
.journal-preview {margin-top:52px}
.text-button {background:none;border:0;color:var(--muted);padding:7px 0 7px 12px;font-size:12px;font-weight:600}
.entry-list {display:grid;gap:0}
.entry {display:flex;align-items:center;gap:15px;padding:14px 0;min-height:82px;border-bottom:1px solid var(--line)}
.entry-thumb {display:grid;place-items:center;width:54px;height:54px;flex:0 0 54px;object-fit:cover;border-radius:13px;background:var(--navy-soft);color:var(--text);font-size:24px}
.entry-content {min-width:0;flex:1}
.entry-title {font-size:14px;font-weight:700}
.entry-time {font-size:11px;color:var(--faint);margin-top:5px}
.entry-description {font-size:12px;color:var(--muted);margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.entry-delete {border:0;background:none;color:var(--faint);font-size:23px;padding:9px}
.empty-state {padding:23px 0;color:var(--muted);font-size:13px;line-height:1.7}
.journal-date {font-size:12px;font-weight:700;color:var(--faint);padding-top:20px}
.page-heading {padding:52px 0 38px}
.page-heading h1 {font-size:34px;letter-spacing:-1.2px;font-weight:750;margin:16px 0 11px}
.page-heading p {font-size:14px;line-height:1.7;color:var(--muted);max-width:390px;margin:0}
.settings-panel {background:rgba(255,255,255,.065);border-radius:24px;padding:24px;margin-bottom:19px}
.settings-title {margin-bottom:25px}
.settings-title h2 {font-size:18px;letter-spacing:-.3px;margin:0 0 6px}
.settings-title p,.control-row p {font-size:12px;line-height:1.6;color:var(--muted);margin:0}
.settings-panel label {display:block;font-size:12px;font-weight:650;margin:18px 0 9px;color:var(--text)}
.settings-panel select,.settings-panel input {display:block;width:100%;color:var(--text);background:#21385f;border:1px solid var(--line);border-radius:12px;padding:14px 13px;min-height:48px;font-size:14px}
.settings-panel select option {background:var(--navy-deep)}
.hint {font-size:11px;color:var(--faint);line-height:1.6;margin:11px 0 0}
.control-row {border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:15px;padding-top:23px;margin-top:26px}
.control-row strong {display:block;font-size:13px;margin-bottom:5px}
.small-button {color:var(--navy);background:var(--white);border:0;border-radius:11px;font-size:12px;font-weight:750;padding:12px 18px}
.small-button.is-on {color:var(--text);background:#344b70}
.status-text {font-size:11px;color:var(--faint);line-height:1.6;margin-bottom:0}
.privacy-points p {font-size:12px;color:var(--muted);line-height:1.7;display:flex;gap:11px;margin:14px 0}
.privacy-points p strong {color:var(--text)}
.privacy-points span {color:var(--white);font-size:14px;font-weight:800}
.danger-button {margin-top:18px;color:#ffe2e2;background:transparent;border:1px solid rgba(255,200,200,.35);border-radius:11px;padding:12px 15px;font-size:12px;font-weight:650}
.end-note {font-size:11px;color:var(--faint);line-height:1.7;text-align:center;margin:24px auto;max-width:340px}
.fab {position:fixed;z-index:3;left:50%;transform:translateX(-50%);bottom:97px;width:min(506px,calc(100vw - 58px));padding:16px 20px;border:0;border-radius:17px;display:flex;align-items:center;justify-content:center;gap:11px;background:var(--white);color:var(--navy-deep);font-size:15px;font-weight:750;box-shadow:0 9px 26px #0003}
.fab-plus {font-size:26px;line-height:13px;font-weight:450}
.tabbar {position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:min(570px,100%);height:86px;padding:8px 20px calc(10px + env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:space-around;gap:12px;background:rgba(7,23,53,.96);backdrop-filter:blur(18px);z-index:3}
.tab {border:0;background:none;color:var(--faint);font-size:10px;display:flex;align-items:center;flex-direction:column;gap:3px;min-width:65px;padding:3px 10px;font-weight:650}
.tab span {font-size:24px;line-height:26px}
.tab.active {color:var(--white)}
.meal-dialog {color:var(--text);background:var(--navy-deep);border:0;border-radius:25px;width:min(530px,calc(100vw - 20px));max-height:94dvh;padding:0;box-shadow:0 28px 80px #0009}
.meal-dialog::backdrop {background:#020d24b9;backdrop-filter:blur(5px)}
.meal-form {overflow:auto;padding:27px 25px 30px;max-height:94dvh}
.dialog-top {display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:23px}
.dialog-top h2 {font-size:27px;letter-spacing:-.8px;margin:10px 0 0}
.close-button {width:35px;height:35px;border:0;background:#263b60;color:var(--white);font-size:25px;border-radius:50%}
.meal-form label {display:block;font-size:12px;font-weight:700;margin:26px 0 11px}
.optional {font-weight:400;color:var(--faint)}
.camera-surface {background:linear-gradient(135deg,#273f68,#183158);padding:27px 22px;border-radius:22px;text-align:center}
.camera-heading {display:flex;flex-direction:column;align-items:center;gap:8px}
.camera-heading strong {font-size:17px}
.camera-heading p {font-size:11px;color:var(--muted);margin:0 0 11px}
.camera-icon {font-size:45px;line-height:1;color:#fff;font-weight:300}
.outline-button {border:1px solid rgba(255,255,255,.5);border-radius:13px;padding:12px 20px;color:var(--white);background:transparent;font-size:12px;font-weight:700}
.camera-region {padding:17px 0 0}
.camera-region video {width:100%;max-height:280px;background:#061229;border-radius:14px;object-fit:cover}
.camera-actions {display:flex;align-items:center;gap:10px;margin-top:11px}
.flat-button {border:0;background:none;color:var(--muted);font-size:12px;font-weight:700;padding:11px 8px}
.photo-preview {display:block;max-width:100%;max-height:220px;object-fit:contain;border-radius:13px;margin-top:14px}
.meal-types,.food-flags {display:flex;flex-wrap:wrap;gap:8px}
.meal-type,.food-flag {border:0;border-radius:25px;background:#1d345a;color:var(--muted);padding:11px 14px;font-size:12px;font-weight:650}
.meal-type.selected,.food-flag.selected {background:var(--white);color:var(--navy-deep)}
.meal-form textarea {background:#1d345a;border:1px solid transparent;border-radius:13px;width:100%;min-height:86px;padding:14px;resize:vertical;color:var(--white);font-size:13px;line-height:1.55}
.meal-form textarea::placeholder {color:#a6b6d0}
.primary-button {width:100%;border:0;border-radius:16px;background:var(--white);color:var(--navy-deep);padding:17px 14px;font-size:14px;font-weight:750;margin-top:31px}
.toast {position:fixed;z-index:10;left:50%;transform:translateX(-50%) translateY(14px);bottom:185px;min-width:240px;max-width:85vw;text-align:center;padding:13px 18px;background:#f7f9ff;color:#081b40;border-radius:12px;font-size:12px;box-shadow:0 9px 25px #0005;opacity:0;pointer-events:none;transition:.2s}
.toast.show {transform:translateX(-50%) translateY(0);opacity:1}
@media (min-width:740px) {body {background:#061431}.app-shell {box-shadow:0 0 90px #0004}}
@media (max-width:370px) {.topbar{padding-left:18px;padding-right:18px}.view{padding:0 19px}.hero h1{font-size:29px}.fab{width:calc(100vw - 38px)}.summary-panel{padding:20px}.brand-sub{font-size:8px}.privacy-indicator{font-size:10px}}
@media (prefers-reduced-motion:reduce) {*{scroll-behavior:auto!important;transition-duration:0s!important}}

/* v1.2: calm, unscored food-group notes */
.nutrition-peek {margin-top:45px;padding:0 1px}
.nutrient-chips {display:flex;flex-wrap:wrap;gap:9px}
.nutrient-chip {border-radius:99px;background:rgba(255,255,255,.07);color:#aebfd9;padding:9px 14px;font-size:12px;letter-spacing:.1px}
.nutrient-chip.included {background:rgba(255,255,255,.18);color:white}
.subtle-note {font-size:11px;color:var(--faint);line-height:1.7;margin:17px 0 0}
.nutrition-layout {margin:2px 0 50px}
.nutrition-breakdown {margin:17px 0 48px;display:grid;gap:8px}
.food-group-row {display:flex;align-items:flex-start;gap:16px;padding:17px 0;border-bottom:1px solid rgba(255,255,255,.11)}
.food-group-icon {flex:0 0 30px;height:30px;width:30px;border-radius:50%;background:rgba(255,255,255,.14);display:grid;place-items:center;font-size:15px;font-weight:700}
.food-group-copy strong {font-size:14px;font-weight:700}
.food-group-copy p {color:var(--muted);font-size:12px;line-height:1.7;margin:6px 0 0}
.note-kicker {margin-bottom:10px}
.nutrition-idea-title {font-size:23px;letter-spacing:-.6px;margin:0 0 11px}
.nutrition-idea-text {font-size:13px;line-height:1.8;color:var(--muted);margin:0 0 16px}
.entry-flags {color:var(--faint);font-size:11px;margin-top:5px}
.auto-tags-header {margin-top:23px}
.auto-tags-header label {margin:0 0 8px}
.suggest-button {border:0;background:transparent;color:var(--white);font-size:12px;text-decoration:underline;text-underline-offset:3px;padding:8px 0;text-align:left}
.auto-tags-header + .hint {margin:0 0 15px}
@media(max-width:370px){.tab {min-width:0;padding:3px 6px}}

/* v1.3: sparse, on-device profile UI with independent journals */
.profile-small-line {color:#d6e0f0;font-size:11px;letter-spacing:.25px;margin-top:21px}
.profile-picker-section {margin:0 0 36px}
.profile-picker-row {display:flex;gap:10px;margin-top:12px}
.profile-picker-row select,.profile-form input,.profile-form select,.profile-form textarea {
  background:#1a335c;border:1px solid rgba(255,255,255,.13);border-radius:13px;color:white;padding:14px;font-size:14px;width:100%;min-height:48px
}
.profile-picker-row select {flex:1;min-width:0}
.profile-picker-row option,.profile-form option {background:#12284e}
.profile-add-button {background:white;color:#0b1f4d;border:0;border-radius:13px;font-size:13px;font-weight:750;padding:0 19px;min-height:48px}
.profile-add-button:disabled {opacity:.45}
.profile-form {padding:0 0 31px;border-bottom:1px solid rgba(255,255,255,.13)}
.profile-form-kicker {margin-bottom:22px}
.profile-form label {display:block;margin:19px 0 10px;font-size:12px;font-weight:700}
.profile-form textarea {resize:vertical;min-height:72px;line-height:1.6}
.profile-form textarea::placeholder,.profile-form input::placeholder {color:#9eacc4}
.profile-form-actions {display:flex;gap:12px;align-items:center}
.profile-form-actions .primary-button {flex:1}
.profile-why {padding:48px 0 20px}
.profile-why h2 {margin:14px 0 10px;font-size:22px;letter-spacing:-.5px}
.profile-why p {color:var(--muted);font-size:13px;line-height:1.8;max-width:420px}
.tabbar {padding-left:9px;padding-right:9px;gap:0}
.tab {flex:1;min-width:0;padding:3px 1px;font-size:10px}
.tab span {font-size:22px}
@media(max-width:370px){.tab {font-size:9px}.tab span {font-size:20px}}

/* v1.4 — optional, broad, per-meal energy reference; minimalist and unscored */
.energy-tool {margin-top:25px;padding:18px 0 20px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.energy-intro {color:var(--muted);font-size:12px;line-height:1.7;margin:12px 0 17px}
.energy-tool .outline-button {background:var(--white);color:var(--navy-deep);border:0}
.energy-estimate-output {padding:15px 0 5px;font-size:12px;line-height:1.7;color:var(--muted)}
.energy-estimate-heading {font-size:10px;font-weight:700;letter-spacing:1.2px;color:var(--faint);text-transform:uppercase}
.energy-estimate-value {font-size:21px;color:white;font-weight:730;letter-spacing:-.6px;margin:5px 0}
.energy-estimate-detail {font-size:11px;line-height:1.7;color:var(--muted);margin:0}
.entry-energy {font-size:11px;color:#dbe6f7;margin-top:8px}
