@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500..800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --forest: #173d25;
  --forest-2: #0f2d1b;
  --growth: #4fa66a;
  --growth-soft: #e4efe6;
  --sage: #81977a;
  --mist: #d8e0cf;
  --cream: #f7f6ec;
  --white: #ffffff;
  --ink: #223021;
  --muted: #7d8976;
  --line: #e1e6d9;
  --track: #e9ede2;
  --sky: #55aeeb;
  --sky-soft: #e7f3fb;
  --sunny: #ffd35a;
  --protein: #f59e3d;
  --protein-soft: #f8ead8;
  --coral: #ef766f;
  --coral-soft: #f9e4e1;
  --gold: #d7b46a;
  --shadow: 0 10px 32px rgba(23, 61, 37, 0.08);
  --small-shadow: 0 2px 8px rgba(23, 61, 37, 0.06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* Share Day extends the existing dialog; no new art or motion. */
.share-day-entry { margin-top:16px; border-top:1px solid var(--line); padding-top:14px; }
.share-day-entry button { min-height:44px; }
.v12-dialog.share-dialog { display:flex; flex-direction:column; overflow:hidden; }
.share-dialog .v12-dialog-heading,.share-dialog>.v12-neutral-note,.share-footer { flex-shrink:0; }
.share-dialog .v12-dialog-heading h2 { overflow-wrap:anywhere; }
.share-report { min-height:60px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; background:white; border:1px solid var(--ui-card-border); border-radius:14px; padding:14px; margin:0; font:13px/1.65 'Inter',system-ui,sans-serif; color:var(--ink); }
.share-report:focus-visible { outline:3px solid var(--forest); outline-offset:-3px; }
.share-footer .button-row { flex-wrap:wrap; }
.share-footer button { min-height:44px; }
.share-footer #share-status { margin:8px 0; min-height:1.5em; }
html { background: var(--cream); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--cream); font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
input, textarea, select { color: var(--ink); }

.wordmark { display: inline-block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 42px; line-height: 1; letter-spacing: -1.8px; color: var(--forest); }
.wordmark--compact { font-size: 24px; letter-spacing: -.8px; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--growth); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.muted { color: var(--muted); line-height: 1.6; }
.version-badge { display: inline-flex; align-items: center; width: fit-content; border: 1px solid rgba(23,61,37,.16); border-radius: 999px; padding: 6px 10px; color: var(--forest); background: rgba(255,255,255,.58); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.version-badge--small { padding: 5px 8px; font-size: 10px; }
.version-badge--tiny { padding: 4px 7px; font-size: 9px; white-space: nowrap; }

/* Splash: build 1.2.8. Keep the approved artwork; refine copy hierarchy and version placement. */
.boot-loading { min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--cream);color:var(--forest);font-weight:700; }
.splash-screen {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #dff1fb 0%, #eef7f7 53%, #dbead5 53%, #bdd6af 100%);
}
.splash-sky { position: absolute; inset: 0 0 42%; pointer-events: none; background: radial-gradient(circle at 75% 14%, rgba(255,255,255,.95) 0 8%, transparent 31%), linear-gradient(180deg, #80c5ef 0%, #d9effa 100%); }
.splash-ground { position: absolute; left: -10%; right: -10%; bottom: -22%; height: 62%; pointer-events: none; border-radius: 50% 50% 0 0; background: linear-gradient(180deg, #8fb87c 0%, #4b8058 80%); box-shadow: inset 0 20px 60px rgba(255,255,255,.22); }
.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 600px);
  padding: 28px 24px 40px;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-right: max(24px, env(safe-area-inset-right));
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  padding-left: max(24px, env(safe-area-inset-left));
  text-align: center;
  animation: rise .7s ease both;
}
.splash-content > * { flex-shrink: 0; }
.splash-mark { line-height: 0; filter: drop-shadow(0 14px 28px rgba(23,61,37,.22)); animation: markPulse 1.2s ease both; }
.splash-wordmark { margin-top: 12px; }
.splash-wordmark .wordmark { color: var(--forest); font-size: 3.375rem; }
.splash-tagline { max-width: 520px; margin: 16px 0 10px; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.25rem; line-height: 1.3; color: var(--forest); text-wrap: balance; }
.splash-subline { max-width: 480px; margin: 0; font-size: 1rem; font-weight: 500; color: #31553a; line-height: 1.5; text-wrap: pretty; }
.splash-mascot { margin-top: 16px; line-height: 0; filter: drop-shadow(0 14px 18px rgba(23,61,37,.18)); }
/* 138px -> 168px: 21.7% larger. The artwork is neither redrawn nor cropped. */
.splash-mascot .tally-mascot { display: block; width: 168px; height: 168px; object-fit: contain; }
.splash-enter-button { min-width: 220px; min-height: 48px; max-width: 100%; margin-top: 16px; font-size: 1rem; }
.splash-enter-button:focus-visible { outline: 3px solid var(--forest); outline-offset: 4px; }

.product-version-meta { color: rgba(49,85,58,.64); font-size: 11px; font-weight: 650; letter-spacing: .02em; text-align: center; }
.product-version-meta--splash { margin-top: 10px; }
.product-version-meta--auth { margin-top: 16px; }
/* Reclaim spacing on shorter screens before reducing the mascot or text. */
@media (max-height: 720px) {
  .splash-content { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .splash-mark .tally-t-mark { width: 76px; height: 76px; }
  .splash-wordmark { margin-top: 10px; }
  .splash-wordmark .wordmark { font-size: 2.875rem; }
  .splash-tagline { margin-top: 12px; margin-bottom: 8px; }
  .splash-mascot { margin-top: 12px; }
  .splash-enter-button { margin-top: 12px; }
}
/* Very short phones: reduce branding/spacing, not reading size or mascot size. */
@media (max-height: 620px) {
  .splash-content { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .splash-mark .tally-t-mark { width: 64px; height: 64px; }
  .splash-wordmark { margin-top: 8px; }
  .splash-wordmark .wordmark { font-size: 2.5rem; }
  .splash-tagline { margin-top: 10px; }
  .splash-mascot { margin-top: 10px; }
  .splash-enter-button { margin-top: 10px; }
}
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes markPulse { 0% { transform: scale(.86); opacity: 0; } 70% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }

/* Auth */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.1fr); background: var(--cream); }
.auth-brand-panel { position: relative; overflow: hidden; min-height: 100vh; padding: clamp(40px, 7vw, 90px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; color: var(--forest); background: linear-gradient(160deg, #dff1fb 0%, #edf6ee 49%, #b9d6ae 100%); }
.auth-brand-panel::after { content: ''; position: absolute; width: 540px; height: 220px; left: -80px; bottom: -110px; border-radius: 50%; background: rgba(23,61,37,.12); }
.auth-brand-panel > * { position: relative; z-index: 1; }
.auth-brand-panel .wordmark { margin-top: 18px; font-size: clamp(48px, 6vw, 76px); }
.auth-brand-panel > p { max-width: 440px; margin: 15px 0 0; font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(20px, 2.5vw, 30px); font-weight: 650; line-height: 1.2; }
.auth-mascot-wrap { margin: 16px 0 2px; }
.brand-promise { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-promise span { border: 1px solid rgba(23,61,37,.15); border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,.55); font-size: 13px; font-weight: 700; }
.auth-card { width: min(510px, calc(100% - 48px)); margin: auto; padding: 42px; border: 1px solid var(--line); border-radius: 28px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.auth-card h1 { margin: 28px 0 8px; font-family: 'Bricolage Grotesque', sans-serif; color: var(--forest); font-size: 32px; letter-spacing: -.8px; }
.auth-invite-note { margin-bottom:20px;padding:14px;border:1px solid #9ab497;border-radius:12px;background:#eff5ed;color:var(--forest);font-size:14px;line-height:1.5; }
.auth-text-button { min-height:44px;margin-top:8px;padding:8px 0;border:0;background:transparent;color:var(--forest);font-weight:750;text-decoration:underline;cursor:pointer; }
.segmented-control { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 15px; background: var(--track); }
.segmented-control button { border: 0; border-radius: 11px; padding: 11px; color: var(--muted); background: transparent; font-weight: 700; }
.segmented-control button.active { color: var(--forest); background: var(--white); box-shadow: var(--small-shadow); }
.auth-form { display: grid; gap: 16px; margin-top: 24px; }
.auth-form label, .field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 700; color: var(--ink); }
.auth-form input, .field input, .field select, .entry-card input { width: 100%; border: 1.5px solid var(--line); border-radius: 13px; padding: 13px 14px; outline: none; background: #fff; font-size: 15px; transition: border-color .18s, box-shadow .18s; }
.auth-form input:focus, .field input:focus, .field select:focus, .entry-card input:focus, textarea:focus { border-color: var(--growth); box-shadow: 0 0 0 4px rgba(79,166,106,.13); }
.form-error { padding: 10px 12px; border-radius: 10px; color: #8c342f; background: var(--coral-soft); font-size: 13px; }
.auth-note { margin: 18px 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.mode-pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 7px 10px; background: var(--growth-soft); color: var(--forest); font-size: 11.5px; font-weight: 700; }
.mode-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--growth); }
.mode-pill--offline { background: var(--coral-soft); color: #8c342f; }
.mode-pill--offline::before { background: var(--coral); }
.mode-pill--demo, .mode-pill--demo-fallback { background: var(--protein-soft); color: #7a4a13; }
.mode-pill--demo::before, .mode-pill--demo-fallback::before { background: var(--protein); }

.primary-button { border: 0; border-radius: 14px; padding: 14px 18px; color: white; background: linear-gradient(145deg, var(--growth), var(--forest)); box-shadow: 0 8px 20px rgba(23,61,37,.16); font-weight: 750; transition: transform .16s, box-shadow .16s; }
.primary-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(23,61,37,.2); }
.primary-button--large { width: 100%; margin-top: 18px; padding: 16px 20px; font-size: 16px; }
.primary-button--compact { min-width: 115px; padding: 11px 18px; }

/* One-time release announcement for returning users. */
.update-page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: radial-gradient(circle at 50% 10%, rgba(255,255,255,.92), transparent 42%), linear-gradient(180deg, #edf4e9 0%, var(--cream) 62%);
}
.update-card {
  width: min(100%, 520px);
  padding: clamp(28px, 7vw, 46px);
  border: 1px solid rgba(23,61,37,.13);
  border-radius: 30px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 24px 70px rgba(23,61,37,.12);
  text-align: center;
  animation: rise .55s ease both;
}
.update-icon { width: 64px; height: 64px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 20px; color: white; background: linear-gradient(145deg, var(--growth), var(--forest)); box-shadow: 0 12px 24px rgba(23,61,37,.18); }
.update-icon svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.update-eyebrow { display: block; margin-bottom: 8px; color: var(--growth); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.update-card h1 { margin: 0; color: var(--forest); font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(32px, 8vw, 46px); line-height: 1.04; letter-spacing: -1.5px; }
.update-copy { margin: 20px auto 0; max-width: 410px; color: #4f624b; font-size: 16px; line-height: 1.65; text-wrap: pretty; }
.update-thanks { margin-top: 28px; color: var(--forest); line-height: 1.45; }
.update-thanks strong { font-size: 15px; }
.update-continue { width: 100%; min-height: 52px; margin-top: 28px; font-size: 16px; }
.update-continue:focus-visible { outline: 3px solid var(--forest); outline-offset: 4px; }
@media (max-height: 620px) {
  .update-card { padding-top: 24px; padding-bottom: 24px; }
  .update-icon { width: 54px; height: 54px; margin-bottom: 14px; border-radius: 17px; }
  .update-copy { margin-top: 14px; line-height: 1.5; }
  .update-thanks, .update-continue { margin-top: 18px; }
}

/* Onboarding */
.onboarding-page { min-height: 100vh; padding: 30px 18px 56px; background: linear-gradient(180deg, #f0f7f0 0%, var(--cream) 40%); }
.onboarding-shell { width: min(880px, 100%); margin: auto; }
.onboarding-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 30px; }
.onboarding-brand .wordmark { font-size: 34px; }
.onboarding-intro { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; margin-bottom: 24px; padding: 26px 30px; border: 1px solid var(--line); border-radius: 26px; background: rgba(255,255,255,.78); box-shadow: var(--small-shadow); }
.onboarding-intro h1 { margin: 0; max-width: 640px; color: var(--forest); font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(28px, 4vw, 45px); line-height: 1.03; letter-spacing: -1.5px; }
.onboarding-intro p { max-width: 650px; color: var(--muted); line-height: 1.65; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-grid--onboarding { padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: var(--small-shadow); }
.field small { margin-top: -3px; color: var(--muted); font-weight: 500; line-height: 1.35; }
.tone-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tone-picker button { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; color: var(--muted); background: white; font-weight: 700; }
.tone-picker button.active { border-color: var(--growth); color: var(--forest); background: var(--growth-soft); }
.approximation-note { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px; color: var(--muted); background: rgba(255,255,255,.76); font-size: 13px; line-height: 1.6; }

/* App shell */
.app-frame { min-height: 100vh; padding-bottom: 92px; background: var(--cream); }
.app-topbar { position: sticky; top: 0; z-index: 30; height: 66px; padding: 0 max(18px, env(safe-area-inset-left)); display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); color: var(--forest); background: rgba(247,246,236,.96); backdrop-filter: blur(14px); }
.app-brand-lockup { display: flex; align-items: center; gap: 10px; }
.app-brand-lockup .wordmark { color: white; }
.icon-button { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: white; background: rgba(255,255,255,.12); font-size: 17px; letter-spacing: 2px; }
.account-menu { position: absolute; top: 58px; right: 14px; width: 220px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: white; box-shadow: var(--shadow); }
.account-menu-email { overflow: hidden; margin-bottom: 9px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu .mode-pill { margin-bottom: 10px; }
.account-menu button { width: 100%; border: 0; border-radius: 10px; padding: 9px; color: #8c342f; background: var(--coral-soft); font-weight: 700; }
.app-main { width: min(660px, 100%); margin: auto; padding: 26px 18px 22px; }
.screen-heading-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.screen-heading-row .wordmark { font-size: 34px; letter-spacing: -1.2px; }
.screen-date { color: var(--muted); font-size: 13px; font-weight: 600; }
.new-day-prompt { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid #cfe5f2; border-radius: 18px; background: var(--sky-soft); }
.new-day-prompt p { margin: 5px 0 9px; color: #567180; font-size: 13px; }

.calories-card, .stat-card, .entry-card, .saved-card { border: 1px solid var(--line); background: white; box-shadow: var(--small-shadow); }
.calories-card { padding: 22px 22px 18px; border-radius: 24px; }
.card-label { color: var(--muted); font-size: 12.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.calories-value { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 18px; }
.calories-value strong { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(50px, 9vw, 72px); line-height: .9; letter-spacing: -2px; color: var(--forest); }
.calories-value span { color: var(--muted); font-size: 16px; font-weight: 650; }
.calorie-track { position: relative; height: 14px; border-radius: 999px; background: var(--track); }
.calorie-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--growth), #8ebc76); transition: width .35s ease; }
.calorie-fill--over { background: linear-gradient(90deg, var(--sunny), var(--coral)); }
.target-tick { position: absolute; top: -5px; bottom: -5px; width: 3px; border-radius: 2px; background: var(--ink); opacity: .52; }
.track-labels { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.two-column-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.stat-card { --tone: var(--growth); --soft: var(--growth-soft); padding: 17px 18px; border-radius: 20px; }
.stat-card--protein { --tone: var(--protein); --soft: var(--protein-soft); }
.stat-card--sky { --tone: var(--sky); --soft: var(--sky-soft); }
.stat-card--coral { --tone: var(--coral); --soft: var(--coral-soft); }
.stat-big { margin: 7px 0 2px; color: var(--forest); font-family: 'Bricolage Grotesque', sans-serif; font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.8px; }
.stat-card--wide .stat-big { font-size: 27px; }
.stat-sub { min-height: 18px; color: var(--muted); font-size: 12.5px; }
.mini-track { height: 8px; margin-top: 11px; overflow: hidden; border-radius: 999px; background: var(--soft); }
.mini-track div { height: 100%; border-radius: 999px; background: var(--tone); transition: width .35s ease; }
.stat-card--wide { margin-top: 12px; }

.log-composer-section, .food-log-section { margin-top: 28px; }
.log-composer-section h2, .food-log-section h2 { margin: 0 0 10px; color: var(--forest); font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; letter-spacing: -.5px; }
.friendly-empty-state { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px; margin-bottom: 10px; padding: 5px 14px 5px 2px; border-radius: 18px; background: linear-gradient(100deg, var(--sky-soft), var(--growth-soft)); }
.friendly-empty-state strong, .friendly-empty-state span { display: block; }
.friendly-empty-state strong { color: var(--forest); font-size: 14px; }
.friendly-empty-state span { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.composer-card { padding: 14px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--small-shadow); }
.composer-card textarea { width: 100%; min-height: 88px; border: 0; outline: none; resize: vertical; background: transparent; color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.composer-card textarea::placeholder { color: #9ca6b3; }
.dictation-hint { display: flex; align-items: center; gap: 7px; margin: 10px 2px 0; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.dictation-mic { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; color: var(--forest); background: var(--growth-soft); }
.dictation-mic svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid #f0f2ec; }
.composer-footer span { color: var(--muted); font-size: 10.8px; }
.quick-actions, .button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.small-button { border: 1px solid var(--line); border-radius: 12px; padding: 9px 13px; color: var(--ink); background: white; font-size: 12.5px; font-weight: 700; }
.small-button--primary { border-color: var(--forest); color: white; background: var(--forest); }

.feedback-card { display: grid; grid-template-columns: 30px 1fr; gap: 10px; margin-top: 14px; padding: 15px 16px; border: 1px solid rgba(79,166,106,.18); border-radius: 18px; background: var(--growth-soft); }
.feedback-card--info { border-color: rgba(85,174,235,.24); background: var(--sky-soft); }
.feedback-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--growth); font-weight: 800; }
.feedback-card--info .feedback-icon { background: var(--sky); }
.feedback-card strong { font-size: 13.5px; }
.feedback-card strong span { color: var(--muted); font-weight: 600; }
.feedback-card p { margin: 5px 0 0; color: #4c5c49; font-size: 12.8px; line-height: 1.5; }
.feedback-card .feedback-note { color: var(--ink); font-style: italic; }
.empty-log { padding: 22px 16px; border: 1px dashed #cfd7c9; border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.6); text-align: center; font-size: 13px; line-height: 1.55; }
.entry-card, .saved-card { margin-bottom: 10px; padding: 15px 16px; border-radius: 18px; }
.entry-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.entry-title-row strong { color: var(--forest); font-size: 15px; text-transform: capitalize; }
.entry-title-row span { color: var(--muted); font-size: 11px; }
.entry-main-macros { display: flex; gap: 9px; margin-top: 7px; font-size: 14px; }
.entry-main-macros b:last-child { color: #b96918; }
.entry-secondary { margin-top: 3px; color: var(--muted); font-size: 12px; }
.text-actions { display: flex; gap: 16px; margin-top: 11px; }
.text-actions button { border: 0; padding: 0; color: var(--growth); background: transparent; font-size: 12px; font-weight: 750; }
.text-actions button.muted-action { color: var(--muted); }
.entry-card--editing { padding: 16px; }
.macro-edit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 9px; }
.macro-edit-grid label { color: var(--muted); font-size: 10px; }
.macro-edit-grid input { margin-top: 4px; padding: 9px 8px; font-size: 13px; }

/* Tabs */
.tab-view { padding-top: 4px; }
.tab-heading { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin-bottom: 10px; }
.tab-heading h1 { margin: 0; color: var(--forest); font-family: 'Bricolage Grotesque', sans-serif; font-size: 31px; letter-spacing: -1px; }
.tab-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.tab-heading--settings { margin-bottom: 24px; }
.week-days { margin-top: 16px; }
.week-day { margin-bottom: 9px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.week-day--today { border-color: #b9d9c1; background: linear-gradient(100deg, var(--growth-soft), #edf6ef); }
.week-day-top { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.week-day-top strong { color: var(--forest); }
.week-day-top span { color: var(--muted); font-variant-numeric: tabular-nums; }
.week-progress { height: 7px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: var(--track); }
.week-progress div { height: 100%; border-radius: 999px; background: var(--growth); }
.week-progress--above div { background: var(--sunny); }
.large-empty-state { padding: 28px 20px 32px; border: 1px dashed #cfd7c9; border-radius: 24px; background: rgba(255,255,255,.62); text-align: center; }
.large-empty-state h2 { margin: 0; color: var(--forest); font-family: 'Bricolage Grotesque', sans-serif; }
.large-empty-state p { max-width: 440px; margin: 8px auto 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.account-settings-card { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 16px; margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.account-settings-card span, .account-settings-card strong { display: block; }
.account-settings-card span { color: var(--muted); font-size: 11px; }
.account-settings-card strong { margin-top: 4px; color: var(--forest); font-size: 13px; }

/* Modal and nav */
.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; padding-top: 40px; background: rgba(15,45,27,.48); backdrop-filter: blur(4px); }
.end-day-modal { width: min(520px, 100%); max-height: calc(100vh - 30px); overflow-y: auto; padding: 20px 22px max(30px, env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: white; box-shadow: 0 -20px 50px rgba(15,45,27,.22); }
.end-day-hero { display: flex; align-items: center; gap: 2px; margin-bottom: 5px; border-radius: 20px; background: linear-gradient(100deg, var(--sky-soft), var(--growth-soft)); }
.end-day-hero h2 { margin: 0; color: var(--forest); font-family: 'Bricolage Grotesque', sans-serif; font-size: 25px; }
.summary-row { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.summary-row span { color: var(--muted); }
.summary-row strong { color: var(--forest); text-align: right; }
.end-day-note { margin: 16px 0; color: var(--ink); font-size: 14px; font-style: italic; line-height: 1.6; }
.end-day-modal .primary-button { width: 100%; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(72px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); }
.bottom-nav button { position: relative; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 650; }
.bottom-nav button::before { content: ''; position: absolute; top: 0; width: 54px; height: 3px; border-radius: 0 0 4px 4px; background: transparent; }
.bottom-nav button.active { color: var(--growth); }
.bottom-nav button.active::before { background: var(--growth); }
.bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 760px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: auto; padding: 34px 24px 24px; align-items: center; text-align: center; }
  .auth-brand-panel .wordmark { font-size: 48px; }
  .auth-brand-panel > p { font-size: 21px; }
  .auth-mascot-wrap { display: none; }
  .auth-card { width: calc(100% - 28px); margin: 14px auto 28px; padding: 25px 20px; }
  .auth-card h1 { margin-top: 22px; font-size: 28px; }
  .onboarding-intro { grid-template-columns: 1fr; padding: 22px; }
  .onboarding-intro > svg { justify-self: center; }
  .settings-grid { grid-template-columns: 1fr; }
  .app-main { padding-top: 20px; }
  .screen-heading-row { margin-bottom: 18px; }
}

@media (max-width: 460px) {
  .wordmark { font-size: 36px; }
  .two-column-stats { grid-template-columns: 1fr 1fr; gap: 9px; }
  .calories-card { padding: 20px 17px 16px; }
  .stat-card { padding: 15px 13px; }
  .stat-big { font-size: 25px; }
  .stat-card--wide .stat-big { font-size: 23px; }
  .composer-footer { align-items: flex-end; }
  .composer-footer span { max-width: 150px; }
  .macro-edit-grid { grid-template-columns: 1fr 1fr; }
  .week-day-top { flex-direction: column; gap: 4px; }
  .tab-heading svg { width: 96px; height: auto; }
  .account-settings-card { grid-template-columns: 1fr; }
  .new-day-prompt { grid-template-columns: 1fr; text-align: center; }
  .new-day-prompt > svg { justify-self: center; }
  .new-day-prompt .button-row { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Standalone runtime additions */
.loading-block { min-height: 100vh; display: grid; place-items: center; background: var(--cream); }
.loading-block p { color: var(--muted); font-weight: 700; }
.notice-banner { margin: 0 0 14px; padding: 11px 13px; border: 1px solid #f1d3cf; border-radius: 13px; color: #843c36; background: var(--coral-soft); font-size: 12.5px; line-height: 1.5; }
.auth-card form { display: grid; gap: 16px; }
.auth-card form label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
.auth-card form input { width: 100%; border: 1.5px solid var(--line); border-radius: 13px; padding: 13px 14px; outline: none; background: white; font-size: 15px; }
.auth-card form input:focus { border-color: var(--growth); box-shadow: 0 0 0 4px rgba(79,166,106,.13); }
.screen-hidden { display: none !important; }
.settings-grid .field { margin-bottom: 0; }
.tab-view .settings-grid { padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--small-shadow); }
.app-main > .screen-heading-row + .tab-view { padding-top: 0; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--growth); }
.status-dot.demo { background: var(--protein); }
.toast { position: fixed; left: 50%; bottom: 92px; z-index: 100; transform: translateX(-50%); max-width: min(420px, calc(100% - 30px)); padding: 11px 14px; border-radius: 13px; color: white; background: var(--forest); box-shadow: var(--shadow); font-size: 12.5px; font-weight: 700; animation: toastIn .2s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.topbar-date { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.app-topbar .icon-button { color: var(--forest); background: var(--white); border: 1px solid var(--line); }
.app-topbar .wordmark--compact { color: var(--forest); }
@media (max-width: 520px) { .topbar-date { display:none; } }

.build-version{font-size:11px;color:var(--sub);padding:8px 12px 2px;}

/* Guided onboarding — Beta 1.1 */
.onboarding-shell--guided { width: min(760px, 100%); }
.onboarding-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.onboarding-brand-row .onboarding-brand { margin-bottom: 0; }
.onboarding-exit { border: 0; padding: 8px 4px; color: var(--forest); background: transparent; font-size: 12px; font-weight: 800; }
.onboarding-exit:hover { text-decoration: underline; text-underline-offset: 3px; }
.onboarding-progress { margin-bottom: 18px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.72); box-shadow: var(--small-shadow); }
.onboarding-progress-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.onboarding-progress-top strong { color: var(--forest); }
.onboarding-progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: var(--track); }
.onboarding-progress-track > div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--growth), var(--forest)); transition: width .2s ease; }
.onboarding-progress-labels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 8px; color: #a2aa9d; font-size: 9.5px; font-weight: 700; text-align: center; }
.onboarding-progress-labels span.active { color: var(--forest); }
.onboarding-progress-labels span.done { color: var(--growth); }
.onboarding-step-card { min-height: 440px; padding: clamp(24px, 5vw, 38px); border: 1px solid var(--line); border-radius: 28px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.onboarding-step h1 { margin: 0; color: var(--forest); font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(30px, 5vw, 44px); line-height: 1.04; letter-spacing: -1.3px; }
.step-copy { max-width: 610px; margin: 10px 0 22px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.onboarding-welcome { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 26px; min-height: 360px; }
.onboarding-step-mascot { align-self: center; filter: drop-shadow(0 14px 18px rgba(23,61,37,.12)); }
.setup-principles { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; }
.setup-principle { display: inline-flex; align-items: center; gap: 7px; color: var(--forest); font-size: 12px; font-weight: 750; }
.setup-principle i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: white; background: var(--growth); font-size: 12px; font-style: normal; line-height: 1; }
.goal-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.goal-choice { min-height: 116px; padding: 17px; border: 1.5px solid var(--line); border-radius: 18px; color: var(--ink); background: white; text-align: left; transition: border-color .16s, background .16s, transform .16s; }
.goal-choice:hover { transform: translateY(-1px); border-color: var(--forest); box-shadow: 0 0 0 1.5px rgba(23,61,37,.18); }
.goal-choice.selected { border-color: var(--growth); background: linear-gradient(145deg, var(--growth-soft), #f2f8f2); box-shadow: inset 0 0 0 1px rgba(79,166,106,.12); }
.goal-choice strong, .goal-choice span { display: block; }
.goal-choice strong { color: var(--forest); font-size: 15px; }
.goal-choice span { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.guided-number-field, .guided-select-field, .helper-grid label, .helper-single-field { display: grid; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
.guided-number-field { max-width: 360px; }
.guided-number-field input, .guided-select-field select, .helper-grid input, .helper-grid select, .helper-single-field input { width: 100%; border: 1.5px solid var(--line); border-radius: 13px; padding: 13px 14px; outline: none; color: var(--ink); background: white; font-size: 15px; }
.guided-number-field input:focus, .guided-select-field select:focus, .helper-grid input:focus, .helper-grid select:focus, .helper-single-field input:focus { border-color: var(--growth); box-shadow: 0 0 0 4px rgba(79,166,106,.13); }
.help-choice-button { display: inline-flex; align-items: center; justify-content: center; margin: 12px 0 0; border: 1.5px solid #b9d3bc; border-radius: 12px; padding: 10px 14px; color: var(--forest); background: var(--growth-soft); font-size: 13px; font-weight: 800; transition: border-color .16s, background .16s, transform .16s, box-shadow .16s; }
.help-choice-button:hover { transform: translateY(-1px); border-color: var(--growth); background: #e4f2e5; box-shadow: 0 6px 14px rgba(23,61,37,.08); }
.helper-panel { margin-top: 16px; padding: 18px; border: 1px solid #cfddca; border-radius: 18px; background: linear-gradient(145deg, #f8fbf5, #edf6ee); }
.helper-panel h3 { margin: 0; color: var(--forest); font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; }
.helper-panel > p { margin: 5px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.helper-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.helper-grid label span, .helper-single-field span { font-size: 11.5px; }
.helper-message { margin-top: 12px; padding: 10px 12px; border-radius: 11px; color: #843c36; background: var(--coral-soft); font-size: 12px; line-height: 1.5; }
.helper-message.success { color: var(--forest); background: var(--growth-soft); }
.teen-helper-note { display: grid; gap: 4px; margin: 2px 0 14px; padding: 11px 12px; border: 1px solid #c7d9c3; border-radius: 12px; color: var(--forest); background: rgba(255,255,255,.72); }
.teen-helper-note strong { font-size: 12px; }
.teen-helper-note span { color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.helper-muted { color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.protein-option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.protein-option { min-height: 155px; padding: 13px 11px; border: 1.5px solid var(--line); border-radius: 16px; color: var(--ink); background: white; text-align: left; }
.protein-option.selected { border-color: var(--growth); background: var(--growth-soft); }
.protein-option > span, .protein-option > strong, .protein-option > b, .protein-option > small { display: block; }
.protein-option > span { color: var(--growth); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.protein-option > strong { margin-top: 6px; color: var(--forest); font-family: 'Bricolage Grotesque', sans-serif; font-size: 27px; }
.protein-option > b { margin-top: 2px; font-size: 12px; }
.protein-option > small { margin-top: 6px; color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.weekly-setup-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; max-width: 590px; margin: 8px 0 20px; padding: 20px; border: 1px solid #cfe0cc; border-radius: 20px; background: linear-gradient(135deg, var(--growth-soft), var(--sky-soft)); }
.weekly-setup-card > div:not(.weekly-times) { text-align: center; }
.weekly-setup-card span, .weekly-setup-card strong { display: block; }
.weekly-setup-card span { color: var(--muted); font-size: 11px; font-weight: 700; }
.weekly-setup-card strong { margin-top: 3px; color: var(--forest); font-family: 'Bricolage Grotesque', sans-serif; font-size: 29px; }
.weekly-times { color: var(--growth); font-size: 20px; font-weight: 800; }
.guided-select-field { max-width: 360px; }
.setup-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 620px; margin: 18px auto 4px; }
.setup-summary > div { padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: #fbfcf8; }
.setup-summary span, .setup-summary strong { display: block; }
.setup-summary span { color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.setup-summary strong { margin-top: 4px; color: var(--forest); font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; }
.onboarding-finish { text-align: center; }
.finish-mascot { margin: -14px 0 -4px; }
.onboarding-finish .step-copy { margin-left: auto; margin-right: auto; }
.onboarding-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 26px; }
.onboarding-nav .primary-button { min-width: 124px; margin-left: auto; }
.onboarding-welcome .primary-button--large:hover:not(:disabled) { background: linear-gradient(145deg, var(--forest), #0f2f1c); }
.secondary-button { border: 1px solid var(--line); border-radius: 14px; padding: 13px 17px; color: var(--forest); background: white; font-weight: 750; }
.onboarding-nav--finish { max-width: 560px; margin-left: auto; margin-right: auto; }

@media (max-width: 620px) {
  .onboarding-page { padding: 18px 12px 34px; }
  .onboarding-brand-row { align-items: flex-start; }
  .onboarding-exit { padding-top: 12px; white-space: nowrap; }
  .onboarding-brand { margin-bottom: 16px; }
  .onboarding-step-card { min-height: 0; padding: 22px 18px; border-radius: 22px; }
  .onboarding-progress-labels { display: none; }
  .onboarding-welcome { grid-template-columns: 1fr; text-align: center; }
  .onboarding-welcome .setup-principles { justify-content: center; }
  .onboarding-step-mascot { order: -1; }
  .goal-choice-grid { grid-template-columns: 1fr; }
  .helper-grid { grid-template-columns: 1fr 1fr; }
  .protein-option-grid { grid-template-columns: 1fr; }
  .protein-option { min-height: 0; }
  .weekly-setup-card { grid-template-columns: 1fr; gap: 7px; }
  .weekly-times { transform: rotate(90deg); }
  .setup-summary { grid-template-columns: 1fr; }
}

/* Today: the brand header scrolls away; compact progress stays pinned. */
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.v12-chat-frame { --today-inline:16px;position:fixed;inset:0;top:var(--tally-viewport-offset,0px);height:var(--tally-viewport-height,100dvh);min-height:0;padding-top:env(safe-area-inset-top);padding-bottom:0;display:flex;flex-direction:column;overflow:hidden; }
.v12-chat-frame .app-topbar { position:relative;flex:0 0 66px;height:66px;padding:0 max(18px, env(safe-area-inset-left)); }
.v12-release { font-size:11px;color:#53664d; }
.v12-chat-frame .bottom-nav { position:relative;flex:0 0 calc(60px + env(safe-area-inset-bottom));height:calc(60px + env(safe-area-inset-bottom)); }
.v12-chat-main { display:flex;flex-direction:column;flex:1;min-height:0;width:100%;margin:0;padding:0!important; }
.v12-today-scroll { display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;outline-offset:-2px; }
.v12-summary { position:sticky;top:0;z-index:20;flex-shrink:0;width:min(680px,100%);margin:0 auto;padding:5px var(--today-inline) 8px;border-bottom:1px solid var(--line);background:var(--cream); }
.v12-today-scroll>.v12-warning { flex-shrink:0;width:min(648px,calc(100% - 32px));margin:8px auto; }
.v12-date-line { display:flex;justify-content:space-between;align-items:center;gap:6px; }
.v12-date-button { flex:1;min-width:0;border:0;background:none;color:var(--forest);display:flex;align-items:center;flex-wrap:wrap;gap:5px;text-align:left;min-height:44px;padding:0; }
.v12-date-button strong { font-size:14px; }
.v12-date-button span { font-size:11px;color:#53664d; }
.v12-link { border:0;background:none;color:var(--forest);font-size:11px;font-weight:650;padding:7px 0 7px 5px;min-height:38px;white-space:nowrap; }
/* Daily nutrition: one structure for simple and all-macro views. */
.nutrition-overview { overflow:hidden;border:1px solid var(--line);border-radius:15px;background:white; }
.nutrition-summary-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr)); }
.nutrition-metric { --metric-color:#4d9f68;min-width:0;padding:11px 13px;color:var(--forest); }
.nutrition-metric--protein,.nutrition-metric--fat,.nutrition-metric--carbs { --metric-color:#bb702a; }
.nutrition-summary-grid .nutrition-metric:nth-child(even) { border-left:1px solid var(--line); }
.nutrition-summary-grid--all .nutrition-metric:nth-child(-n+2) { border-bottom:1px solid var(--line); }
.nutrition-summary-grid .nutrition-metric { display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:7px 4px;padding:9px 10px; }
.nutrition-summary-grid .nutrition-metric-label { color:var(--forest);font-size:11px;text-transform:none;letter-spacing:0; }
.nutrition-summary-grid .nutrition-values { min-width:0;justify-content:flex-end;gap:3px;margin:0; }
.nutrition-summary-grid .nutrition-values strong { font-size:18px;letter-spacing:-.3px; }
.nutrition-summary-grid .nutrition-track { flex:0 0 100%;height:4px; }
.nutrition-summary-grid .nutrition-above,.nutrition-summary-grid .nutrition-unset { flex:0 0 100%;margin:0; }
.nutrition-metric-label { display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:10px;font-weight:700;color:#53664d;text-transform:uppercase;letter-spacing:.025em; }
.nutrition-metric-label small { font-size:10px;letter-spacing:0;text-transform:none;font-weight:500; }
.nutrition-values { display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 6px;margin:4px 0 7px; }
.nutrition-values strong { font-family:'Bricolage Grotesque',system-ui,sans-serif;font-size:25px;line-height:1.1;letter-spacing:-.6px;overflow-wrap:anywhere; }
.nutrition-values>span { display:inline-flex;align-items:center;gap:4px;color:#53664d;font-size:11px;white-space:nowrap; }
.nutrition-goal-check { width:13px;height:13px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.nutrition-track { height:6px;border-radius:6px;background:#e8ede5;overflow:hidden; }
.nutrition-track>span { display:block;height:100%;background:var(--metric-color);border-radius:inherit; }
.nutrition-above,.nutrition-unset { display:block;margin-top:4px;font-size:10px;line-height:1.3;color:#53664d; }
.nutrition-set-goal { border:0;background:none;padding:1px;color:#356a41;font-size:11px;font-weight:700;text-decoration:underline;text-underline-offset:3px; }
.nutrition-summary-actions { flex:none;display:flex;align-items:center;gap:6px;padding-bottom:5px; }
.nutrition-summary-actions button { display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 10px;border:1px solid var(--line);border-radius:11px;background:white;color:var(--forest);font-size:12px;font-weight:750; }
.nutrition-summary-actions #summary-share-day { width:44px;padding:8px; }
.nutrition-summary-actions #summary-details { min-width:70px;background:#edf4e9; }
.nutrition-summary-actions svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.nutrition-summary-actions button:disabled { color:#788570;background:#f4f5f1; }
.nutrition-meal-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0 4px; }
.nutrition-meal-grid>div { min-width:0; }
.nutrition-meal-grid span { display:block;font-size:9px;color:#53664d;font-weight:700;text-transform:uppercase;letter-spacing:.02em; }
.nutrition-meal-grid strong { display:block;margin-top:5px;font-size:21px;line-height:1.2;color:var(--forest);overflow-wrap:anywhere; }
.nutrition-detail-list { display:grid;gap:10px; }
.nutrition-detail-list .nutrition-metric { padding:15px;border:1px solid var(--line);border-radius:17px;background:white; }
.nutrition-detail-list .nutrition-metric-label { font-size:11px; }
.nutrition-detail-list .nutrition-values { justify-content:space-between;margin:8px 0 12px; }
.nutrition-detail-list .nutrition-values strong { font-size:30px; }
.nutrition-detail-list .nutrition-values>span { font-size:13px; }
.nutrition-detail-list .nutrition-track { height:8px; }
.nutrition-week-summary { margin-top:12px;padding:14px;border:1px solid var(--line);border-radius:16px;background:#f1f6ef;color:var(--forest); }
.nutrition-week-summary>strong { display:block;font-size:12px; }
.nutrition-week-summary>div { display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px;margin-top:6px; }
.nutrition-week-summary b { font-size:18px; }
.nutrition-week-summary span { font-size:11px;color:#53664d; }
.nutrition-edit-goals { min-height:44px;background:#edf4e9;border:1px solid #b8cbb0;color:var(--forest); }
.nutrition-detail-actions { display:flex;align-items:center;justify-content:space-between;gap:12px; }
.nutrition-detail-actions .small-button { min-height:44px; }
@media(hover:hover){.nutrition-summary-actions button:hover:not(:disabled){background:#f2f7ef}.nutrition-summary-actions #summary-details:hover{background:#e1eddd}}
.v12-date-picker { padding:8px 0 0;display:flex;flex-wrap:wrap;gap:9px;align-items:center;font-size:12px; }
.v12-return-today { display:block;margin-left:auto; }
.v12-date-picker label { display:flex;flex-direction:column;gap:3px;color:var(--forest); }
.v12-date-picker input { border:1px solid var(--line);border-radius:8px;padding:8px;background:white;font-size:16px; }
.v12-date-picker>span { color:#53664d;font-size:11px;max-width:190px; }
.v12-thread { flex:1 0 auto;min-height:0;width:min(680px,100%);margin:0 auto;padding:14px calc(var(--today-inline) + 2px) 18px;display:flex;flex-direction:column;gap:12px; }
.v12-thread :is(button,input,textarea,select,summary,a) { scroll-margin-top:calc(var(--today-summary-height,160px) + 12px);scroll-margin-bottom:12px; }
.v12-chat-welcome { margin:auto 0;text-align:center;padding:12px 5px 18px; }
.v12-chat-welcome .tally-mascot { width:104px;height:104px;margin:0 auto 10px; }
.v12-chat-welcome h1 { font-size:24px;letter-spacing:-.5px;margin:0 0 7px;color:var(--forest);font-family:'Bricolage Grotesque',sans-serif; }
.v12-chat-welcome p { color:#53664d;font-size:13px;line-height:1.6;margin:0; }
.v12-user-message { max-width:88%;align-self:flex-end;padding:12px 14px;border-radius:17px 17px 4px 17px;background:#e2ecdf;color:var(--forest);font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere; }
.v12-assistant-message { max-width:94%;align-self:flex-start;padding:11px 14px;border:1px solid var(--line);background:white;border-radius:17px 17px 17px 4px; }
.v12-speaker { font-size:10px;font-weight:750;color:#3e7c4f;text-transform:uppercase;letter-spacing:.07em; }
.v12-assistant-message p { margin:5px 0 0;line-height:1.5;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere; }
.v12-question { border-color:#bfd5df;background:#f3f8fa; }
.v12-receipt { background:white;border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:var(--small-shadow); }
.v12-receipt-top { display:flex;justify-content:space-between;font-size:10px;color:#53664d; }
.v12-logged { color:#356a41;font-weight:700; }
.v12-receipt h3 { margin:9px 0 7px;font-size:15px;color:var(--forest);font-weight:700; }
.v12-receipt-macros { display:flex;gap:22px;align-items:center; }
.v12-receipt-macros strong { font-size:23px;color:var(--forest); }
.v12-receipt-macros strong:last-child { color:#9a561a; }
.v12-receipt-macros small { font-size:11px;font-weight:500;color:#53664d; }
.v12-food-details { margin-top:10px;font-size:12px; }
.v12-food-details summary { cursor:pointer;min-height:32px;color:#53664d;display:list-item;padding-top:7px; }
.v12-food-details>div { padding-top:8px;border-top:1px solid var(--line); }
.v12-food-row { display:flex;justify-content:space-between;gap:12px;padding:6px 0; }
.v12-food-row small { display:block;color:#53664d;margin-top:3px; }
.v12-food-row b { white-space:nowrap;font-weight:650; }
.v12-food-details p { font-size:12px;line-height:1.5; }
.v12-food-details small { color:#53664d; }
.v12-entry-actions { display:flex;flex-wrap:wrap;gap:7px;border-top:1px solid #edf0e9;margin-top:9px;padding-top:5px; }
.v12-entry-actions button { border:0;background:none;color:#356a41;min-height:38px;padding:6px;font-size:11.5px;font-weight:650; }
.v12-entry-actions button:last-child { margin-left:auto;color:#63705c; }
.v12-composer { flex-shrink:0;width:min(680px,100%);margin:0 auto;padding:9px var(--today-inline) 6px;background:var(--cream);border-top:1px solid var(--line); }
.v12-composer-label { display:block;margin:0 2px 8px;color:var(--forest);font-size:12px;font-weight:650;line-height:1.4; }
.v12-input-row { display:flex;align-items:flex-end;gap:8px;background:white;border:1.5px solid #c4d4bd;padding:10px;border-radius:18px;box-shadow:0 3px 15px rgba(23,61,37,.04); }
.v12-input-row:focus-within { border-color:var(--growth);box-shadow:0 0 0 3px rgba(79,166,106,.12); }
.v12-input-row textarea { width:100%;flex:1;min-width:0;min-height:44px;max-height:112px;resize:none;border:0;box-shadow:none!important;outline:none;font-size:16px;line-height:1.4;padding:2px 3px;color:var(--ink);background:transparent; }
.v12-input-row textarea::placeholder { color:#687562; }
.v12-send { border:0;flex:0 0 42px;width:42px;height:42px;border-radius:13px;color:white;background:var(--forest);display:grid;place-items:center; }
.v12-send svg { width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.v12-send:disabled { background:#dce5d7;color:#6c7864;opacity:1; }
.v12-composer-foot { display:flex;align-items:center;gap:7px;justify-content:space-between;font-size:10px;min-height:32px;color:#53664d; }
.v12-composer-foot button { white-space:nowrap;flex-shrink:0;border:0;background:none;padding:6px 0;color:var(--forest);font-size:11px;font-weight:650;min-height:32px; }
.v12-save-status { font-size:9px;white-space:nowrap; }
.v12-pending { display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#46606d;margin-bottom:7px; }
.v12-pending button,.v12-pending-date button { border:0;background:none;color:#285d6c;padding:4px;font-size:11px;font-weight:650; }
.v12-pending-date { padding:7px 9px;border-radius:10px;background:#e9f3f9;font-size:11px;margin-bottom:6px;line-height:1.4; }
.v12-date-notice { display:flex;justify-content:space-between;align-items:center;color:#46606d;background:#e9f3f9;border-radius:10px;padding:8px 10px;font-size:11px;line-height:1.4; }
.v12-date-notice button { background:none;border:0;font-size:18px;min-width:30px; }
.v12-day-ended,.v12-history-label,.v12-removed { font-size:11px;color:#53664d;text-align:center; }
.v12-working { padding:7px 10px;color:#53664d;font-size:12px;display:flex;align-items:center;gap:8px; }
.v12-working-dot { height:6px;width:6px;border-radius:50%;background:var(--growth); }
.v12-warning,.v12-send-error { color:#844033;background:#fcf0e8;padding:9px 11px;font-size:12px;border-radius:11px;line-height:1.5; }
.v12-warning button { color:#713529;background:white;border:1px solid #d9ad96;border-radius:8px;padding:7px;margin-left:5px;font-size:11px; }
.v12-retry { display:flex;align-items:center;gap:7px;margin:8px 0;font-size:11px; }
.v12-retry>span { margin-right:auto; }
.v12-saved-hint { margin-top:10px;color:#53664d;font-size:12px; }
.v12-modal-shade { position:fixed;inset:0;z-index:90;background:rgba(17,39,23,.45);display:flex;align-items:center;justify-content:center;padding:16px; }
.v12-dialog { width:min(520px,100%);max-height:calc(var(--tally-viewport-height,100dvh) - 32px);overflow:auto;border-radius:22px;background:var(--cream);padding:20px;box-shadow:var(--shadow); }
.v12-dialog-heading { display:flex;align-items:center;gap:12px;justify-content:space-between;margin-bottom:12px; }
.v12-dialog h2 { margin:0;color:var(--forest);font-size:23px;letter-spacing:-.5px;font-family:'Bricolage Grotesque',sans-serif; }
.v12-dialog p { font-size:13px;line-height:1.5;color:#53664d; }
.v12-dialog .field { margin:12px 0; }
.v12-dialog .field input { font-size:16px; }
.v12-replace { display:flex;gap:8px;font-size:13px; }
.v12-neutral-note { color:#53664d;font-size:12px!important; }
.v12-chat-frame .toast { bottom:150px; }
.week-day[role=button] { cursor:pointer; }
button:focus-visible,summary:focus-visible,.week-day:focus-visible { outline:3px solid #456f57;outline-offset:3px; }
@media (hover:hover) { .v12-send:hover:not(:disabled){background:#366d44}.v12-entry-actions button:hover,.v12-link:hover{background:#e4efe6;border-radius:8px}.v12-summary-share:hover:not(:disabled){background:#f2f7ef}.v12-summary-details:hover{background:#e1eddd} }
@media(max-width:360px){.v12-chat-frame{--today-inline:10px}.v12-summary-card{grid-template-columns:minmax(0,1fr) 82px}.v12-summary-card--share{grid-template-columns:minmax(0,1fr) 44px 82px}.v12-totals{padding:8px 9px;gap:5px}.v12-totals strong{font-size:21px}.v12-totals em{font-size:9px}.v12-summary-share,.v12-summary-details{min-height:54px}.v12-summary-details{padding:7px 6px}.v12-date-button span{font-size:10px}.v12-composer-foot{font-size:9px}}
@media(max-height:610px){.v12-chat-welcome .tally-mascot{width:70px;height:70px}.v12-chat-welcome{padding:5px}.v12-chat-welcome h1{font-size:21px}.v12-summary{padding-top:2px;padding-bottom:6px}.v12-totals{padding:6px 10px}.v12-link{min-height:28px}.v12-chat-frame .bottom-nav{flex-basis:52px;height:52px}}
.tally-keyboard-open .v12-chat-frame .bottom-nav {display:none;}
.tally-keyboard-open .v12-totals {padding:5px 10px;}
.tally-keyboard-open .v12-totals small {width:auto;margin-right:3px;}
.tally-keyboard-open .v12-totals strong {font-size:20px;}
.tally-keyboard-open .v12-summary {padding-top:1px;padding-bottom:5px;}
.tally-keyboard-open .v12-link {min-height:27px;}
.tally-keyboard-open .v12-composer-foot {display:none;}

/* Beta 1.2 / build 1.3.2: visual clarity + header consistency.
   Keep light totals, white receipts, approved art, and the existing layout.
   Utility colors below are darker shades of the existing forest/sage palette;
   bright growth green remains available for decorative accents.
   Scoped to the signed-in app: splash and onboarding are unchanged. */
.app-frame {
  --ui-action: #356a41;
  --ui-secondary: #53664d;
  --ui-control-border: #77896d;
  --ui-card-border: #9eaf98;
  --chat-user: #3f6c4b;
  --muted: var(--ui-secondary);
}
.app-frame .eyebrow { color: var(--ui-action); }
.tab-heading > div { min-width: 0; }
.tab-heading--saved { grid-template-columns: minmax(0, 1fr); }

/* Your words are distinct from Tally's white reply and receipt cards. */
.v12-user-message { background: var(--chat-user); color: var(--cream); }
.v12-receipt { border-color: var(--ui-card-border); }
.v12-assistant-message { border-color: var(--ui-card-border); }
.v12-question { border-color: #8faab0; }

/* Keep the entry box easy to find, including with keyboard navigation. */
.v12-input-row { border: 2px solid var(--ui-control-border); }
.v12-input-row:focus-within {
  border-color: var(--forest);
  outline: 3px solid var(--forest);
  outline-offset: 3px;
  box-shadow: 0 3px 15px rgba(23,61,37,.06);
}
.v12-send { color: var(--cream); }
/* Disabled Send remains intentionally muted; no change to its enabled logic. */
.v12-send:disabled { background: #dce5d7; color: #6c7864; }
.v12-today-scroll:focus-visible { outline: 2px solid var(--forest); outline-offset: -2px; }

/* Small functional text needs more contrast than decorative growth green. */
.app-frame .bottom-nav button.active { color: var(--ui-action); }
.app-frame .bottom-nav button.active::before { background: var(--ui-action); }
.app-frame .text-actions button:not(.muted-action) { color: var(--ui-action); }
.app-frame .text-actions button.muted-action { color: var(--ui-secondary); }
.app-frame .entry-main-macros b:last-child { color: #9a561a; }

/* Apply the same legible treatment to working-app forms and dialogs. */
.app-frame .field input:not([readonly]),
.app-frame .field select,
.app-frame .entry-card input,
.v12-date-picker input { border-color: var(--ui-control-border); }
.app-frame .field input:focus,
.app-frame .field select:focus,
.app-frame .entry-card input:focus { border-color: var(--forest); box-shadow: none; }
.app-frame .tone-picker button.active { border-color: var(--ui-action); }
.nutrition-setting { margin:0 0 16px;padding:20px;border:1px solid var(--line);border-radius:22px;background:white;box-shadow:var(--small-shadow); }
.nutrition-setting h2 { margin:0;color:var(--forest);font-size:18px; }
.nutrition-setting p { margin:5px 0 16px;color:#53664d;font-size:13px;line-height:1.5; }
.nutrition-options { display:grid;grid-template-columns:1fr 1fr;gap:9px; }
.nutrition-options button { min-width:0;min-height:76px;padding:12px;text-align:left;border:1.5px solid var(--line);border-radius:12px;background:white;color:var(--forest); }
.nutrition-options button.active { border-color:var(--ui-action);background:#edf4e9; }
.nutrition-options strong,.nutrition-options span { display:block; }
.nutrition-options strong { font-size:13px; }
.nutrition-options span { margin-top:4px;color:#53664d;font-size:11px; }
.week-extra-macros { margin-top:5px;color:#53664d;font-size:11px;font-variant-numeric:tabular-nums; }
@media(max-width:360px) { .nutrition-options { grid-template-columns:1fr; }.nutrition-options button { min-height:58px; } }
.app-frame .primary-button { background: linear-gradient(145deg, #3e7c4f, var(--forest)); }
.app-frame .small-button--primary { color: white; background: var(--ui-action); border-color: var(--ui-action); }
.v12-dialog .icon-button { color: var(--forest); background: white; border-color: var(--ui-control-border); }
.app-frame button:focus-visible,
.app-frame summary:focus-visible,
.app-frame input:focus-visible,
.app-frame select:focus-visible,
.app-frame .week-day:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
}
@media (hover: hover) {
  .v12-send:hover:not(:disabled) { background: var(--ui-action); }
}
@media (max-width: 375px) {
  .tab-heading--settings > .tally-t-mark { width: 56px; height: 56px; }
}


.nutrition-goal-grid,.nutrition-goal-extras { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px; }
.nutrition-goal-grid .field,.nutrition-goal-extras .field { margin:0;min-width:0; }
.nutrition-goal-grid input,.nutrition-goal-extras input { min-width:0;width:100%;font-size:16px; }
.nutrition-goal-extras { padding-top:16px;margin-top:16px;border-top:1px solid var(--line); }
.nutrition-goal-extras .field>span { font-size:12px; }
.nutrition-goal-extras .field small { font-size:10px; }
.nutrition-goal-footer { display:flex;align-items:center;gap:10px;margin-top:18px; }
.nutrition-goal-footer button { flex:1; }
.nutrition-goal-footer [data-save-status] { font-size:11px;color:#53664d;max-width:110px; }
.nutrition-more-goals { margin-top:8px;white-space:normal;text-align:left; }
.nutrition-setting .nutrition-goal-error { margin-top:12px;color:#844033; }
.nutrition-preferences { margin-top:0; }
/* Connected goals: one calm card, optional controls, and inline feedback. */
.linked-goals { max-width:660px;margin-left:auto;margin-right:auto; }
.linked-help-toggle { display:inline-block;min-height:44px;padding:8px 0;margin-top:-10px; }
.linked-view-options { margin:10px 0 18px;grid-template-columns:1fr 1fr; }
.linked-view-options button { min-height:48px;padding:10px 8px;text-align:center;font-size:13px;font-weight:700; }
.linked-goal-card { padding:18px;border:1px solid var(--line);border-radius:18px;background:white; }
.linked-goal-field { display:block;margin:0 0 14px;min-width:0; }
.linked-goal-field>span:first-child { display:block;margin-bottom:7px;color:var(--forest);font-size:13px;font-weight:700; }
.linked-goal-input { position:relative;display:block; }
.linked-goal-input input { display:block;width:100%;min-width:0;min-height:48px;padding:10px 48px 10px 13px;border:1.5px solid #899b80;border-radius:11px;background:white;color:var(--forest);font-size:18px;font-weight:700;appearance:textfield; }
.linked-goal-input input::-webkit-inner-spin-button,.linked-goal-input input::-webkit-outer-spin-button { appearance:none;margin:0; }
.linked-goal-input>span { position:absolute;right:13px;top:50%;transform:translateY(-50%);color:#53664d;font-size:13px;font-weight:400;pointer-events:none; }
.linked-goal-input input[aria-invalid=true] { border-color:#985638;background:#fff9f4; }
.linked-goals .linked-goal-note { margin:-5px 0 16px;font-size:12px; }
.linked-macro-balance { border-top:1px solid var(--line);padding-top:17px; }
.linked-macro-balance h3 { margin:0;color:var(--forest);font-size:17px; }
.linked-macro-balance>p { margin:5px 0 15px;font-size:12px; }
.linked-goals details summary { cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px;list-style:none;font-size:12px;font-weight:700;color:var(--forest); }
.linked-goals details summary::-webkit-details-marker { display:none; }
.linked-goals details summary:after { content:'⌄';font-size:18px;font-weight:400; }
.linked-goals details[open]>summary:after { transform:rotate(180deg); }
.linked-balance-control { margin-top:8px; }
.linked-balance-label { display:block;margin-bottom:8px;font-size:12px;font-weight:700;color:var(--forest); }
.linked-balance-control p { font-size:12px;margin:0; }
.linked-balance-control input[type=range] { display:block;width:100%;min-height:44px;margin:0;cursor:pointer;accent-color:#356a41;padding:0;border:0;background:transparent; }
.linked-slider-labels { display:flex;justify-content:space-between;font-size:11px;color:#53664d;margin-top:-6px; }
.linked-balance-control .v12-link { min-height:44px;font-size:12px;padding:8px 0; }
.linked-goal-success { display:flex;align-items:flex-start;gap:10px;margin-top:14px;padding:12px;background:#edf4e9;border-radius:12px;color:var(--forest); }
.linked-goal-success>span { display:grid;place-items:center;flex:none;width:22px;height:22px;border-radius:50%;background:#367847;color:white;font-size:14px; }
.linked-goal-success strong { display:block;font-size:12px;line-height:1.5; }
.linked-goal-success small { display:block;margin-top:4px;font-size:11px;color:#53664d;line-height:1.5; }
.linked-goal-error { margin:14px 0 0;padding:13px;border-radius:12px;background:#fff1e7;color:#803e27;font-size:13px;line-height:1.6; }
.linked-restore { min-height:44px;padding:10px 0;font-size:12px;text-align:left;white-space:normal;margin-right:12px; }
.linked-goal-extras { margin-top:12px;padding:0 13px;border:1px solid var(--line);border-radius:12px; }
.linked-goal-extras .nutrition-goal-extras { grid-template-columns:1fr;margin:0;padding:8px 0 14px;border:0; }
.linked-goal-extras input[readonly] { min-width:0;width:100%; }
.linked-goals .nutrition-goal-footer { margin-top:14px; }
.linked-goals .linked-save-note { margin:10px 0 0;font-size:11px;text-align:center; }
.linked-goals [data-goal-save]:disabled { background:#b1bfab;color:#203827;box-shadow:none;cursor:not-allowed; }
.linked-help { margin:4px 0 18px; }
.linked-help .field { margin-bottom:12px; }
.linked-help input,.linked-help select { min-height:44px;font-size:16px;min-width:0;width:100%; }
.linked-goals button:focus-visible,.linked-goals summary:focus-visible,.linked-goals input:focus-visible { outline:3px solid #407a4c;outline-offset:3px; }
.linked-goals [hidden] { display:none!important; }
@media(max-width:380px){
  .linked-goals.nutrition-setting { padding:13px; }
  .linked-goal-card { padding:13px; }
  .linked-view-options { grid-template-columns:1fr 1fr;gap:6px; }
  .linked-view-options button { font-size:11px; }
  .linked-goal-extras .nutrition-goal-extras { grid-template-columns:1fr; }
}
@media(max-width:360px){
  .nutrition-metric { padding:9px 10px; }
  .nutrition-values strong { font-size:23px; }
  .nutrition-summary-grid .nutrition-values { column-gap:4px; }
  .nutrition-summary-grid .nutrition-values>span { font-size:10px;gap:3px; }
  .nutrition-meal-grid strong { font-size:19px; }
  .nutrition-meal-grid { gap:6px; }
  .nutrition-setting { padding:16px; }
  .nutrition-goal-grid,.nutrition-goal-extras { gap:13px 10px; }
}
@media(max-height:610px){
  .nutrition-metric { padding:7px 10px; }
  .nutrition-values { margin:3px 0 5px; }
  .nutrition-values strong { font-size:22px; }
}
@media(max-height:520px) and (min-width:600px){
  .nutrition-summary-grid--all { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .nutrition-summary-grid--all .nutrition-metric { border-bottom:0; }
  .nutrition-summary-grid--all .nutrition-metric+ .nutrition-metric { border-left:1px solid var(--line); }
  .v12-chat-frame .app-topbar { height:40px;flex-basis:40px; }
  .v12-composer-foot { display:none; }
  .v12-thread { min-height:50px; }
  .v12-input-row { padding:6px 10px; }
}

/* Following: activity only, tucked into the familiar Week tab. */
.follow-week { max-width:720px;margin-inline:auto; }
.follow-tabs { display:grid;grid-template-columns:1fr 1fr;padding:4px;margin:0 0 24px;border-radius:14px;background:#e9eee4;gap:4px; }
.follow-tabs button { min-height:45px;border:0;border-radius:11px;background:transparent;color:#50664e;font:700 14px 'Inter',sans-serif;cursor:pointer; }
.follow-tabs button.active { background:white;color:var(--forest);box-shadow:0 2px 8px #173d2517; }
.follow-content { padding:0 2px 26px; }
.follow-heading { margin:8px 0 24px; }
.follow-heading h1 { margin:5px 0 7px;color:var(--forest);font-size:clamp(27px,6vw,35px); }
.follow-heading p,.follow-privacy { color:#5b6c58;line-height:1.5;font-size:14px; }
.follow-content h2 { margin:26px 0 12px;font-size:16px;color:var(--forest); }
.follow-card { display:flex;align-items:center;gap:14px;width:100%;margin:0 0 10px;padding:14px;background:white;border:1px solid var(--line);border-radius:17px;color:var(--forest);text-align:left; }
.follow-person { cursor:pointer;font:inherit;min-height:78px; }
.follow-person>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere;}
.follow-person strong,.follow-person small { display:block; }
.follow-person small { margin-top:3px;color:#60705e;font-size:12px; }
.follow-person>span:last-child { font-size:25px; }
.follow-avatar { flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#e4efe6;color:var(--forest);font-weight:800; }
.follow-request { align-items:flex-start;overflow-wrap:anywhere; }
.follow-request>div:last-child { min-width:0; }
.follow-request p { margin:7px 0;color:#5b6c58;line-height:1.5;font-size:13px; }
.follow-request-actions { display:flex;gap:12px; }
.follow-request-actions button,.follow-pending button { min-height:40px;padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:#f2f6ef;color:var(--forest);font-weight:700;cursor:pointer; }
.follow-request-actions button:first-child { background:var(--forest);color:white; }
.follow-pending { justify-content:space-between;overflow-wrap:anywhere;font-size:13px; }
.follow-pending span { min-width:0; }
.follow-empty { padding:25px 18px;background:#fff;border:1px dashed #b4c4ad;border-radius:17px;color:#5b6c58;line-height:1.5;font-size:14px; }
.follow-add { display:block;width:100%;min-height:52px;margin:18px 0;border:1.5px solid #9ab497;border-radius:13px;background:#eff5ed;color:var(--forest);font-weight:800;cursor:pointer; }
.follow-code-form { margin:18px 0 22px;padding:18px;border:1px solid var(--line);border-radius:16px;background:#fff; }
.follow-code-form label { color:var(--forest);font-weight:800; }
.follow-code-form p { margin:6px 0 12px;color:var(--muted);font-size:13px;line-height:1.4; }
.follow-code-form div { display:flex;gap:8px; }
.follow-code-form input { min-width:0;flex:1;padding:11px 12px;border:1.5px solid #9ab497;border-radius:10px;font-size:16px;letter-spacing:.06em;text-transform:uppercase; }
.follow-code-form button { min-height:44px;padding:0 16px;border:0;border-radius:10px;background:var(--forest);color:#fff;font-weight:800;cursor:pointer; }
.follow-error { padding:12px;background:#fff0e8;border-radius:10px;color:#873b28; }
.follow-back { min-height:44px;margin:-8px 0 12px;padding:0;border:0;background:transparent;color:var(--forest);font-weight:700;cursor:pointer; }
.follow-calendar { padding:16px;background:white;border:1px solid var(--line);border-radius:18px;box-shadow:var(--small-shadow); }
.follow-calendar-head { display:flex;align-items:center;justify-content:space-between;margin-bottom:15px; }
.follow-calendar-head h2 { margin:0;font-size:18px; }
.follow-calendar-head button { width:44px;height:44px;border:0;border-radius:12px;background:#edf4eb;color:var(--forest);font-size:25px;cursor:pointer; }
.follow-grid { display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;text-align:center; }
.follow-weekday { padding:7px 0;color:#677566;font-size:11px;font-weight:700; }
.follow-date { display:flex;flex-direction:column;align-items:center;justify-content:center;aspect-ratio:1;min-height:39px;border-radius:11px;font-size:14px; }
.follow-date.logged { background:#e7f2e6;color:var(--forest);font-weight:800; }
.follow-date b { color:#338b52;font-size:13px;line-height:1; }
.follow-privacy { text-align:center;margin:16px 9px; }
.follow-week button:focus-visible { outline:3px solid #418457;outline-offset:2px; }
.follow-badge { display:inline-grid;place-items:center;min-width:19px;height:19px;margin-left:5px;padding:0 5px;border-radius:999px;background:#b66032;color:white;font:700 11px 'Inter',sans-serif;vertical-align:middle; }
.follow-notice { position:fixed;z-index:40;top:calc(env(safe-area-inset-top, 0px) + 12px);left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;width:min(440px,calc(100vw - 24px));padding:11px 12px;border:1px solid #a3b89c;border-radius:16px;background:#f4f9f1;color:var(--forest);box-shadow:0 8px 30px #203b2540;font-size:13px;line-height:1.3; }
.follow-notice span { flex:1;min-width:0; }
.follow-notice button { flex:none;min-height:38px;padding:0 11px;border:0;border-radius:9px;background:var(--forest);color:white;font-weight:700;cursor:pointer; }
.follow-notice button:last-child { min-width:38px;padding:0;background:transparent;color:var(--forest);font-size:23px; }
.tally-keyboard-open .follow-notice { display:none; }
.follow-dialog { background:#fff; }
.follow-dialog p { font-size:15px; }
.follow-account-note { margin-top:16px;padding:10px 12px;border-radius:10px;background:#eff5ed;color:var(--forest);font-size:13px;line-height:1.5;overflow-wrap:anywhere; }
.follow-account-note button { min-height:32px;border:0;background:transparent;color:var(--forest);font-weight:800;text-decoration:underline;cursor:pointer; }
.follow-code-display { display:flex;align-items:center;gap:10px;margin:8px 0 14px;padding:10px;border-radius:12px;background:#eff5ed; }
.follow-code-display input { min-width:0;flex:1;border:0;background:transparent;color:var(--forest);font-size:19px;font-weight:800;letter-spacing:.1em;text-align:center; }
.follow-code-display button { min-height:40px;padding:0 10px;border:1px solid #9ab497;border-radius:9px;background:#fff;color:var(--forest);font-weight:800;cursor:pointer; }
.follow-invite-fine { color:var(--muted);font-size:12px!important;line-height:1.4; }
.follow-dialog-actions { display:flex;gap:10px;margin-top:20px; }
.follow-dialog-actions button { flex:1;min-height:46px; }
.follow-link-label { display:block;margin:18px 0 7px;font-size:13px;font-weight:800;color:var(--forest); }
#follow-invite-link { width:100%;min-height:44px;padding:10px;border:1px solid #9db39b;border-radius:10px;background:#f6f8f3;color:#263d2d;font-size:13px; }
.follow-cancel-link { display:block;min-height:44px;margin:15px auto 0;border:0;background:transparent;color:#745447;text-decoration:underline;cursor:pointer; }
.follow-active-links p { color:#62705d;font-size:13px; }
@media(max-width:480px){.follow-notice{top:calc(env(safe-area-inset-top, 0px) + 8px)}.follow-dialog-actions{flex-wrap:wrap}}
