@import url("/fonts.css");
:root {
  color-scheme: dark;
  scrollbar-gutter: stable;
  --bg: #141516;
  --panel: #1e2021;
  --panel2: #252728;
  --line: #323536;
  --text: #f3f4ef;
  --muted: #9b9e9e;
  --lime: #d1f780;
  --violet: #b7a4ee;
  --coral: #efad94;
  --blue: #91c8ee;
  --radius: 23px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  letter-spacing: -0.2px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
  color: inherit;
  background: none;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 5px;
}
a {
  color: var(--lime);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 34px;
  font-weight: 550;
  letter-spacing: -1.4px;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.5px;
  font-weight: 550;
}
h3 {
  font-size: 15px;
  font-weight: 550;
}
p {
  line-height: 1.65;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--muted);
}
.brand {
  font-size: 33px;
  font-weight: 600;
  letter-spacing: -1.7px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand span {
  font-size: 37px;
  color: var(--lime);
  font-weight: 400;
  line-height: 1;
}
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 228px;
  background: #191a1b;
  border-right: 1px solid #2b2d2e;
  padding: 38px 23px 24px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.sidebar .brand {
  padding-left: 15px;
}
.tagline {
  font-size: 11px;
  color: var(--muted);
  padding: 9px 15px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 57px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 17px;
  text-align: left;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.nav button.active {
  background: #2b3025;
  color: var(--lime);
}
.nav button:hover {
  background: #262828;
}
.sidebar-bottom {
  margin-top: auto;
}
.shortcut-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 14px;
  margin-bottom: 23px;
}
.shortcut-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 10px 0;
}
.shortcut-card button {
  font-size: 11px;
  padding: 0;
  color: var(--lime);
}
.account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 8px;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #393c34;
  color: var(--lime);
  font-size: 12px;
}
.main {
  margin-left: 228px;
  max-width: 1600px;
  padding: 36px 45px 80px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
}
.breadcrumb {
  color: var(--muted);
  font-size: 12px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.keycap {
  border: 1px solid #3b3d3e;
  border-radius: 5px;
  padding: 3px 5px;
  font-size: 10px;
  color: var(--muted);
}
.circle-button {
  width: 36px;
  height: 36px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.heading p {
  color: var(--muted);
  margin-top: 9px;
  font-size: 13px;
}
.date-control {
  display: flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  gap: 12px;
  padding: 6px 9px;
  font-size: 12px;
  white-space: nowrap;
}
.date-control input {
  background: none;
  color: var(--text);
  border: 0;
  padding: 3px;
  width: 115px;
  font-size: 11px;
}
.date-control button {
  padding: 5px;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(285px, 1fr);
  gap: 23px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 23px;
  min-width: 0;
}
.panel,
.target-studio,
.profile-studio,
.connection-studio,
.journal-preferences {
  background: var(--panel);
  border: 1px solid #2d3031;
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 7px;
  padding: 5px 8px;
  background: #2b3025;
  color: var(--lime);
  font-size: 10px;
  font-weight: 500;
}
.pill.neutral {
  background: #2b2d2e;
  color: var(--muted);
}
.pill.violet {
  background: #302b3b;
  color: var(--violet);
}
.nutrition-main {
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 26px 0 28px;
}
.ring {
  position: relative;
  width: 206px;
  height: 206px;
  flex-shrink: 0;
}
.ring > svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring circle {
  fill: none;
  stroke-width: 11;
}
.ring .center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.ring strong {
  font-size: 43px;
  letter-spacing: -2.5px;
  font-weight: 550;
}
.ring .center .muted {
  font-size: 11px;
  margin-top: 3px;
}
.ring .center .icon {
  width: 17px;
  color: var(--lime);
  margin-bottom: 8px;
}
.calorie-stat {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.stat-mark {
  width: 3px;
  height: 32px;
  background: var(--lime);
  border-radius: 8px;
}
.stat-mark.gray {
  background: #555958;
}
.calorie-stat strong {
  font-size: 23px;
  letter-spacing: -0.7px;
  font-weight: 500;
}
.calorie-stat small {
  color: var(--muted);
  font-size: 11px;
}
.calorie-stat p {
  font-size: 10px;
  color: var(--muted);
}
.macro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.macro-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.dot {
  height: 6px;
  width: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--accent);
}
.macro strong {
  display: block;
  font-size: 21px;
  font-weight: 500;
  margin: 10px 0;
}
.macro strong span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.track {
  height: 4px;
  border-radius: 9px;
  background: #353839;
  overflow: hidden;
}
.track div {
  height: 100%;
  border-radius: 9px;
  background: var(--accent);
}
.capture-panel {
  background: linear-gradient(135deg, #272d23 0%, #222521 65%, #232523 100%);
  border-color: #3a4232;
}
.capture-panel h2 {
  font-size: 23px;
  margin-top: 15px;
  letter-spacing: -0.8px;
}
.capture-panel p {
  font-size: 12px;
  color: #aeb5a6;
  margin-top: 9px;
  max-width: 265px;
}
.spark {
  color: var(--lime);
  background: #37422b;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
}
.capture-box {
  position: relative;
  background: #191d18;
  border: 1px solid #3a4234;
  border-radius: 14px;
  margin-top: 20px;
  padding: 12px;
}
.capture-box textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  line-height: 1.65;
  padding: 0;
}
.capture-box textarea::placeholder {
  color: #91998a;
}
.capture-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.capture-footer span {
  font-size: 9px;
  color: #929b8b;
}
.primary {
  background: var(--lime);
  color: #222a17;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary .icon {
  width: 16px;
  height: 16px;
}
.secondary {
  background: #2a2d2e;
  border: 1px solid #3b3e3f;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.text-button {
  color: var(--muted);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
}
.text-button:hover {
  color: var(--lime);
}
.capture-options {
  display: flex;
  gap: 20px;
  margin-top: 12px;
}
.capture-options button {
  font-size: 10px;
  color: #b4bcab;
  display: flex;
  gap: 6px;
  align-items: center;
}
.capture-options .icon {
  width: 15px;
}
.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.meal-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  width: 100%;
  text-align: left;
}
.meal-row:first-of-type {
  border-top: 0;
}
.meal-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #343126;
  color: #dec997;
}
.meal-icon.lunch {
  background: #2c3531;
  color: #a7cbaa;
}
.meal-icon.snack {
  background: #342e3d;
  color: var(--violet);
}
.meal-icon.dinner {
  background: #30363f;
  color: var(--blue);
}
.meal-details {
  flex: 1;
  min-width: 0;
}
.meal-details h3 {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meal-meta {
  display: flex;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
  text-transform: capitalize;
}
.meal-macros {
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
}
.meal-cal {
  font-size: 16px;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.meal-cal small {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.add-meal {
  width: 100%;
  border: 1px dashed #454943;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 14px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 9px;
}
.add-meal:hover {
  border-color: var(--lime);
  color: var(--lime);
}
.chart-tabs {
  display: flex;
  background: #17191a;
  padding: 3px;
  border-radius: 7px;
  gap: 2px;
}
.chart-tabs button {
  padding: 5px 9px;
  font-size: 10px;
  color: var(--muted);
  border-radius: 5px;
}
.chart-tabs button.active {
  background: #383b3b;
  color: var(--text);
}
.chart-stats {
  margin-top: 22px;
}
.chart-stats strong {
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -1px;
}
.chart-stats span {
  font-size: 11px;
  color: var(--muted);
}
.chart {
  height: 164px;
  margin-top: 10px;
  width: 100%;
}
.chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart text {
  font-family: inherit;
  font-size: 10px;
  fill: #8b9090;
}
.chart-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 13px;
}
.saved-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 19px;
}
.saved-mini .meal-icon {
  width: 37px;
  height: 37px;
  border-radius: 11px;
}
.saved-mini h3 {
  font-size: 12px;
}
.saved-mini p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.saved-mini .circle-button {
  width: 28px;
  height: 28px;
  margin-left: auto;
}
.saved-mini .icon {
  width: 15px;
}
.bottom-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7e8480;
  font-size: 10px;
  padding: 27px;
}
.mobile-nav {
  display: none;
}
.sample-banner {
  font-size: 10px;
  color: #b8b8a5;
  border: 1px solid #414336;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 18px;
  background: #25271f;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.empty {
  padding: 30px 15px;
  text-align: center;
  color: var(--muted);
  line-height: 1.8;
}
.consent {
  max-width: 460px;
  margin: 10vh auto;
}
.consent h1 {
  margin: 30px 0 15px;
}
.consent p {
  margin-bottom: 20px;
}
.consent input {
  width: 100%;
  margin-bottom: 15px;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login .panel {
  max-width: 460px;
  padding: 38px;
}
.login h1 {
  font-size: 44px;
  margin: 35px 0 18px;
}
.login p {
  color: var(--muted);
  margin-bottom: 20px;
}
.login form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
input,
textarea,
select {
  background: #17191a;
  border: 1px solid #414546;
  color: var(--text);
  padding: 12px;
  border-radius: 9px;
  outline: none;
  min-width: 0;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--lime);
}
label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
dialog {
  background: #202223;
  border: 1px solid #434747;
  border-radius: 25px;
  color: var(--text);
  width: min(540px, calc(100% - 28px));
  padding: 28px;
  max-height: 88vh;
  box-shadow: 0 30px 100px #0008;
}
dialog::backdrop {
  background: #070909b8;
  backdrop-filter: blur(7px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-head h2 {
  font-size: 24px;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.form textarea {
  min-height: 115px;
  resize: vertical;
}
.form .primary {
  width: 100%;
  padding: 15px;
}
.field-help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.ingredient {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.ingredient-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}
.ingredient input {
  width: 85px;
  padding: 8px;
}
.ingredient-source {
  font-size: 10px;
  color: var(--muted);
}
.ingredient-numbers {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  flex-wrap: wrap;
}
.ingredient-numbers label {
  font-size: 9px;
}
.assumptions {
  padding: 13px;
  background: #2a2d26;
  border-radius: 12px;
  font-size: 11px;
  color: #b5bfaa;
  line-height: 1.7;
}
.detail-total {
  font-size: 36px;
  color: var(--lime);
  letter-spacing: -1px;
}
.detail-total span {
  font-size: 13px;
  color: var(--muted);
}
.danger {
  color: #f5a89e;
}
.pending {
  border: 1px solid #524635;
  background: #30291f;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 12px;
}
.pending p {
  font-size: 11px;
  color: #b8b1a5;
  margin-top: 7px;
}
.pending button {
  color: var(--lime);
  font-size: 11px;
  padding: 8px 12px 0 0;
}
.saved-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.saved-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.saved-card .meal-icon {
  width: 60px;
  height: 60px;
}
.saved-card h2 {
  font-size: 18px;
}
.saved-card .primary {
  margin-top: auto;
}
.saved-card .meal-cal {
  text-align: left;
  font-size: 30px;
}
.saved-card .meal-cal small {
  display: inline;
  font-size: 11px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.settings-grid .form {
  margin-top: 23px;
}
.connection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  margin-top: 15px;
}
.connection code {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.weight-value {
  font-size: 44px;
  letter-spacing: -1.8px;
  margin: 20px 0 5px;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 12px;
  background: #303334;
}
.photo-grid p {
  font-size: 10px;
  margin-top: 7px;
  color: var(--muted);
}
.photo-grid button {
  font-size: 10px;
}
.food-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.food-result h3 {
  font-size: 12px;
}
.food-result p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
#toast {
  position: fixed;
  bottom: 35px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--lime);
  color: #253018;
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: 0 5px 30px #0005;
  font-size: 12px;
  z-index: 100;
  max-width: 90vw;
  transition: 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.mobile-brand {
  display: none;
}
.error {
  color: #efad94;
  font-size: 12px;
}
.wide {
  grid-column: 1/-1;
}
.keyhint {
  font-size: 10px;
  color: var(--muted);
}
@media (min-width: 1550px) {
  .main {
    margin-left: 228px;
    padding-left: 65px;
    padding-right: 65px;
  }
  .nutrition-main {
    gap: 55px;
  }
  .ring {
    width: 230px;
    height: 230px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 190px;
    padding: 30px 15px;
  }
  .main {
    margin-left: 190px;
    padding: 30px 28px;
  }
  .grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(275px, 1fr);
    gap: 18px;
  }
  .panel {
    padding: 20px;
  }
  .ring {
    width: 175px;
    height: 175px;
  }
  .nutrition-main {
    gap: 22px;
  }
  .ring strong {
    font-size: 37px;
  }
  .saved-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .heading h1 {
    font-size: 30px;
  }
}
@media (max-width: 950px) {
  .sidebar {
    width: 78px;
    padding: 30px 10px;
  }
  .sidebar .brand {
    font-size: 0;
    padding: 0;
    justify-content: center;
  }
  .sidebar .brand span {
    font-size: 33px;
  }
  .sidebar .tagline,
  .sidebar .nav span,
  .sidebar-bottom {
    display: none;
  }
  .sidebar .nav button {
    padding: 16px;
    justify-content: center;
  }
  .main {
    margin-left: 78px;
    padding: 27px 24px;
  }
  .nutrition-main {
    gap: 20px;
  }
  .ring {
    width: 150px;
    height: 150px;
  }
  .ring strong {
    font-size: 32px;
  }
  .macro-grid {
    gap: 10px;
  }
  .macro strong {
    font-size: 18px;
  }
  .calorie-stat strong {
    font-size: 20px;
  }
  .grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr);
  }
  .panel {
    padding: 18px;
  }
  .heading {
    align-items: start;
  }
  .heading p {
    font-size: 12px;
  }
  .date-control {
    gap: 0;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 730px) {
  body {
    font-size: 14px;
  }
  .sidebar {
    display: none;
  }
  .main {
    margin-left: 0;
    padding: 23px 20px 100px;
  }
  .topbar {
    margin-bottom: 29px;
  }
  .breadcrumb {
    display: none;
  }
  .mobile-brand {
    display: block;
    font-size: 28px;
  }
  .mobile-brand span {
    font-size: 29px;
  }
  .top-actions .keyhint,
  .top-actions .keycap {
    display: none;
  }
  .top-actions {
    gap: 12px;
  }
  .heading {
    display: block;
    margin-bottom: 22px;
  }
  .heading h1 {
    font-size: 31px;
  }
  .heading p {
    margin-top: 7px;
  }
  .date-control {
    margin-top: 20px;
    display: inline-flex;
    padding: 5px 10px;
    gap: 12px;
  }
  .grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .stack {
    display: contents;
  }
  .nutrition {
    order: 0;
  }
  .capture-panel {
    order: 1;
  }
  .meal-log {
    order: 2;
  }
  .trend-panel {
    order: 3;
  }
  .saved-panel {
    order: 4;
  }
  .panel {
    padding: 22px;
    border-radius: 23px;
  }
  .nutrition-main {
    justify-content: center;
    gap: 33px;
    padding: 25px 0;
  }
  .ring {
    width: 190px;
    height: 190px;
  }
  .ring strong {
    font-size: 41px;
  }
  .calorie-stat strong {
    font-size: 24px;
  }
  .macro-grid {
    gap: 20px;
  }
  .macro strong {
    font-size: 21px;
  }
  .capture-panel h2 {
    font-size: 24px;
  }
  .capture-panel p {
    max-width: none;
  }
  .capture-box textarea {
    min-height: 68px;
    font-size: 14px;
  }
  .capture-footer .primary {
    padding: 11px 16px;
  }
  .capture-footer span {
    font-size: 10px;
  }
  .capture-options button {
    font-size: 11px;
  }
  .mobile-nav {
    position: fixed;
    display: flex;
    justify-content: space-around;
    align-items: center;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1b1d1eee;
    border-top: 1px solid #36393a;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    z-index: 40;
    backdrop-filter: blur(20px);
  }
  .mobile-nav button {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    font-size: 9px;
    color: var(--muted);
    min-width: 50px;
    padding: 4px;
  }
  .mobile-nav button.active {
    color: var(--lime);
  }
  .mobile-nav .quick-add {
    background: var(--lime);
    color: #253018;
    border-radius: 16px;
    width: 46px;
    height: 43px;
    display: grid;
    place-items: center;
    min-width: 0;
    transform: translateY(-6px);
  }
  .saved-grid {
    grid-template-columns: 1fr;
  }
  .sample-banner {
    font-size: 9px;
  }
  .bottom-message {
    font-size: 9px;
  }
  .chart {
    height: 185px;
  }
  .heading > .primary {
    margin-top: 18px;
  }
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .settings-grid {
    display: flex;
    flex-direction: column;
  }
  .form-row {
    gap: 10px;
  }
  .keycap {
    display: none;
  }
  #toast {
    bottom: 95px;
  }
  .consent {
    margin: 40px 20px;
  }
  .meal-details h3 {
    font-size: 13px;
  }
  .meal-row {
    gap: 12px;
  }
  .meal-icon {
    width: 42px;
    height: 42px;
  }
  .modal-head h2 {
    font-size: 22px;
  }
  dialog {
    padding: 22px;
  }
  .nutrition .panel-title h2 {
    font-size: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Logging workspace: input first, nutrition alongside it. */
.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;
}
button {
  transition:
    background-color 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}
button:disabled {
  cursor: default;
}
input,
textarea,
select {
  font-size: 16px;
  line-height: 1.5;
  border-radius: 12px;
  border-color: #3b3f40;
  background: #191b1c;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}
input:hover,
textarea:hover,
select:hover {
  border-color: #626966;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px #d1f78012;
}
input::placeholder,
textarea::placeholder {
  color: #858b89;
}
label {
  font-size: 12px;
  gap: 9px;
}
.primary,
.secondary {
  min-height: 44px;
  border-radius: 12px;
  font-size: 13px;
}
.primary:hover:not(:disabled) {
  background: #defaa4;
}
.secondary:hover {
  background: #363b3b;
}
.circle-button {
  min-width: 40px;
  min-height: 40px;
}
.main {
  padding-top: 26px;
}
.topbar {
  margin-bottom: 28px;
}
.quick-log-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  background: var(--panel);
}
.quick-log-button:hover {
  background: #30352b;
  color: var(--lime);
}
.quick-log-button .icon {
  width: 16px;
}
.log-heading {
  align-items: center;
}
.log-heading h1 {
  font-size: 32px;
}
.log-heading p {
  margin-top: 5px;
}
.day-navigation {
  display: flex;
  gap: 10px;
  align-items: center;
}
.date-control {
  padding: 3px;
  gap: 0;
  border-radius: 14px;
  margin: 0;
}
.date-control button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  min-width: 38px;
  border-radius: 10px;
  padding: 8px;
}
.date-control button:hover {
  background: #343838;
}
.date-control .icon {
  width: 16px;
  height: 16px;
}
.date-control .date-label {
  min-width: 102px;
  gap: 12px;
  font-size: 13px;
  font-weight: 550;
  padding: 8px 10px;
}
.date-caret {
  color: var(--muted);
}
.today-button {
  color: var(--lime);
  font-size: 12px;
  min-height: 44px;
  padding: 8px;
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr);
  gap: 24px;
  align-items: start;
}
.home-grid > .composer {
  grid-column: 1;
  grid-row: 1;
}
.home-summary {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.home-diary {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}
.composer {
  padding: 28px;
  background: #202423;
  border-color: #41483c;
}
.composer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.composer .eyebrow {
  color: #b7c5a6;
  letter-spacing: 1.7px;
  font-size: 9px;
}
.composer h2 {
  margin-top: 9px;
  font-size: 29px;
  letter-spacing: -1px;
}
.composer-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #303a29;
  color: var(--lime);
}
.composer-mark .icon {
  width: 25px;
  height: 25px;
}
.composer .capture-box {
  background: #171a18;
  border: 1px solid #49523f;
  padding: 18px;
  margin-top: 25px;
  border-radius: 18px;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}
.composer .capture-box:focus-within {
  border-color: var(--lime);
  box-shadow: 0 0 0 4px #d1f78009;
}
.composer textarea {
  font-size: 19px;
  line-height: 1.6;
  min-height: 106px;
  max-height: 240px;
  resize: none;
  padding: 0;
  box-shadow: none;
}
.composer textarea:focus {
  box-shadow: none;
}
.composer textarea::placeholder {
  color: #8a9389;
}
.composer .capture-footer {
  margin-top: 12px;
  gap: 12px;
}
.meal-select-label select {
  border: 0;
  background-color: #262d25;
  color: #c7cfbd;
  font-size: 12px;
  padding: 10px 26px 10px 12px;
  min-height: 42px;
  cursor: pointer;
}
.composer .primary {
  padding: 12px 20px;
  font-size: 13px;
  min-height: 44px;
}
.composer-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
}
.submit-hint {
  white-space: nowrap;
  color: #7f8780;
}
.composer .capture-options {
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.composer .capture-options button {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #3e453c;
  background: #292e28;
  border-radius: 10px;
  font-size: 12px;
  color: #c6cec1;
  gap: 7px;
}
.composer .capture-options button:hover {
  background: #363e30;
  color: var(--lime);
}
.composer .capture-options .icon {
  width: 16px;
}
.composer p.estimate-note {
  font-size: 11px;
  line-height: 1.6;
  max-width: none;
  color: #a2aaa0;
  margin-top: 13px;
}
.meal-shortcuts {
  margin-top: 25px;
  border-top: 1px solid #3a4138;
  padding-top: 20px;
}
.shortcut-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}
.shortcut-header > span {
  font-size: 10px;
}
.segmented {
  display: inline-flex;
  background: #181b19;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.segmented button {
  padding: 8px 14px;
  min-height: 36px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
}
.segmented button[aria-selected="true"] {
  color: var(--text);
  background: #3b4237;
  box-shadow: 0 2px 5px #0002;
}
.reuse-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #343b33;
  padding: 5px 0;
}
.reuse-row:last-child {
  border-bottom: 0;
}
.reuse-details {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  text-align: left;
  padding: 8px 0;
  min-width: 0;
  border-radius: 8px;
}
.reuse-details:hover strong {
  color: var(--lime);
}
.reuse-details > span:last-child {
  min-width: 0;
}
.reuse-details strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reuse-details small {
  display: block;
  font-size: 11px;
  color: #bdc5b6;
  margin-top: 5px;
}
.reuse-details small span {
  color: #8e9889;
}
.reuse-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #30382c;
  border-radius: 11px;
  color: var(--lime);
}
.reuse-icon.breakfast {
  color: var(--coral);
  background: #393029;
}
.reuse-icon.lunch {
  color: var(--violet);
  background: #34303e;
}
.reuse-icon.snack {
  color: var(--blue);
  background: #29353b;
}
.reuse-icon .icon {
  width: 18px;
}
.reuse-add {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #444c3e;
  color: var(--lime);
}
.reuse-add:hover {
  background: #3b4830;
  border-color: #7a915f;
}
.shortcut-empty {
  padding: 18px 0;
  font-size: 12px;
}
.home-summary .nutrition-main {
  gap: 20px;
  justify-content: center;
  padding: 23px 0;
}
.home-summary .ring {
  width: 154px;
  height: 154px;
}
.home-summary .ring strong {
  font-size: 32px;
}
.home-summary .ring .center .icon {
  margin-bottom: 3px;
}
.home-summary .calorie-stat strong {
  font-size: 21px;
}
.home-summary .macro-grid {
  gap: 10px;
  padding-top: 18px;
}
.home-summary .macro strong {
  font-size: 19px;
}
.home-summary .macro strong span {
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
.home-summary .panel {
  padding: 21px;
}
.home-summary .chart {
  height: 160px;
}
.home-diary .sample-banner {
  margin: 0 0 12px;
  font-size: 11px;
}
.home-diary .log-header .eyebrow {
  display: none;
}
.loading-panel {
  color: var(--muted);
  padding: 32px;
}
body:has(dialog[open]) {
  overflow: hidden;
}
dialog {
  max-height: min(88dvh, 900px);
  overscroll-behavior: contain;
  padding: 28px;
}
.modal-head .circle-button {
  flex-shrink: 0;
}
.modal-head {
  gap: 20px;
}
.form textarea {
  min-height: 145px;
  line-height: 1.7;
}
.form input,
.form select {
  min-height: 48px;
}
.calendar-modal {
  width: min(380px, calc(100% - 28px));
}
.calendar-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.calendar-heading h3 {
  font-size: 16px;
}
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  text-align: center;
}
.calendar-weekdays {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.calendar-grid button {
  min-height: 40px;
  border-radius: 10px;
  font-size: 13px;
  padding: 0;
}
.calendar-grid button.outside {
  color: #757c79;
}
.calendar-grid button.is-today {
  box-shadow: inset 0 0 0 1px #657350;
}
.calendar-grid button:hover {
  background: #41483b;
}
.calendar-grid button.selected {
  background: var(--lime);
  color: #1b2411;
  font-weight: 650;
}
.calendar-today {
  width: 100%;
  justify-content: center;
  margin-top: 18px;
}
.repeat-heading h3 {
  font-size: 21px;
  line-height: 1.4;
}
.repeat-heading p {
  margin-top: 6px;
}
.portion-options {
  display: flex;
  gap: 8px;
}
.portion-options button {
  flex: 1;
  min-height: 46px;
  background: #2b3029;
  border: 1px solid #424b3b;
  border-radius: 12px;
}
.portion-options button[aria-pressed="true"] {
  background: var(--lime);
  color: #202719;
  border-color: var(--lime);
}
.repeat-total strong {
  font-size: 36px;
  color: var(--lime);
  font-weight: 550;
  letter-spacing: -1px;
}
.repeat-total small {
  font-size: 15px;
  color: var(--muted);
}
.repeat-total p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
#toast {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: calc(100% - 32px);
  line-height: 1.5;
}
#toast button {
  color: var(--lime);
  min-height: 36px;
  font-weight: 600;
  padding: 5px;
}
@media (min-width: 731px) and (max-width: 1120px) {
  .home-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr);
    gap: 16px;
  }
  .composer {
    padding: 22px;
  }
  .home-summary .nutrition-main {
    gap: 12px;
  }
  .home-summary .ring {
    width: 128px;
    height: 128px;
  }
  .home-summary .ring strong {
    font-size: 28px;
  }
  .home-summary .ring .center .muted {
    font-size: 9px;
  }
  .submit-hint {
    display: none;
  }
}
@media (max-width: 900px) and (min-width: 731px) {
  .home-grid {
    display: flex;
    flex-direction: column;
  }
  .home-grid > * {
    width: 100%;
  }
  .home-summary {
    flex-direction: row;
  }
  .home-summary > * {
    width: 50%;
  }
}
@media (max-width: 730px) {
  .main {
    padding: 18px 16px 100px;
  }
  .topbar {
    margin-bottom: 22px;
  }
  .quick-log-button {
    display: none;
  }
  .log-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
  }
  .log-heading h1 {
    font-size: 26px;
    letter-spacing: -0.9px;
  }
  .log-heading p {
    font-size: 11px;
    max-width: 150px;
    line-height: 1.4;
  }
  .day-navigation {
    gap: 2px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .day-navigation .date-control {
    gap: 0;
    padding: 2px;
    margin: 0;
  }
  .date-control .date-label {
    min-width: 78px;
    font-size: 12px;
    gap: 5px;
    padding: 6px;
  }
  .date-control button {
    min-width: 32px;
    min-height: 40px;
    padding: 6px;
  }
  .date-control .icon {
    width: 14px;
  }
  .today-button {
    min-height: 32px;
    padding: 4px 8px;
  }
  .home-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .home-grid > * {
    width: 100%;
  }
  .home-grid > .composer {
    order: 0;
    padding: 20px;
    border-radius: 22px;
  }
  .home-diary {
    order: 2;
  }
  .home-summary {
    order: 1;
    display: flex;
    gap: 18px;
  }
  .home-summary .trend-panel {
    display: none;
  }
  .composer h2 {
    font-size: 25px;
    margin-top: 7px;
  }
  .composer-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .composer .capture-box {
    margin-top: 19px;
    padding: 14px;
  }
  .composer textarea {
    font-size: 17px;
    min-height: 100px;
  }
  .composer .capture-footer {
    gap: 8px;
  }
  .composer .primary {
    padding: 10px 16px;
  }
  .composer .capture-options {
    gap: 6px;
  }
  .composer .capture-options button {
    font-size: 11px;
    padding: 8px;
    flex: 1 1 auto;
    justify-content: center;
  }
  .composer .capture-options .icon {
    width: 15px;
  }
  .submit-hint {
    display: none;
  }
  .composer .estimate-note {
    font-size: 10px;
  }
  .meal-shortcuts {
    margin-top: 21px;
    padding-top: 16px;
  }
  .reuse-details strong {
    font-size: 12px;
  }
  .home-summary .nutrition-main {
    padding: 15px 0;
    gap: 35px;
  }
  .home-summary .ring {
    width: 142px;
    height: 142px;
  }
  .home-summary .macro-grid {
    padding-top: 15px;
  }
  .home-summary .macro strong span {
    display: inline;
  }
  dialog:not(.calendar-modal) {
    margin: auto auto 0;
    width: 100%;
    max-height: 92dvh;
    border-radius: 24px 24px 0 0;
    padding: 24px 22px calc(24px + env(safe-area-inset-bottom));
  }
  .calendar-modal {
    margin: auto;
  }
  .mobile-nav .quick-add {
    width: 54px;
    height: 48px;
  }

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

.show-shortcuts {
  min-height: 42px;
  margin-top: 4px;
  color: #bdc6b5;
}

@media (max-width: 730px) {
  .composer .capture-options {
    flex-wrap: nowrap;
  }
  .composer .capture-options button {
    padding: 8px 6px;
    white-space: nowrap;
  }
  .composer .capture-options .icon {
    width: 13px;
  }
  .composer .capture-box textarea {
    min-height: 86px;
  }
}

#toast {
  background: #2c3328;
  border: 1px solid #606e51;
  color: #eff5e6;
}
#toast.show {
  pointer-events: auto;
}

/* Shared custom selectors, including forms inside dialogs. */
select[data-custom] { display: none !important; }
.custom-select { display: block; min-width: 0; width: 100%; }
.select-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  width: 100%; min-height: 46px; padding: 10px 13px;
  border: 1px solid #3b3f40; border-radius: 12px;
  background: #191b1c; color: var(--text); font: inherit; font-size: 16px;
  text-align: left;
}
.select-trigger:hover { border-color: #626966; background: #242829; }
.select-trigger:focus-visible, .select-trigger[aria-expanded=true] {
  outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px #d1f78012;
}
.select-caret { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); transition: transform 160ms ease; }
.select-trigger[aria-expanded=true] .select-caret { transform: rotate(180deg); }
.select-menu {
  position: fixed; inset: auto; margin: 0; padding: 6px; box-sizing: border-box;
  color: var(--text); background: #272b2c; border: 1px solid #484e4d;
  border-radius: 14px; box-shadow: 0 16px 40px #0008; overflow-y: auto;
  overscroll-behavior: contain; z-index: 1000;
}
.select-menu:popover-open { animation: select-reveal 130ms ease-out; }
.select-menu [role=option] {
  min-height: 44px; padding: 10px 12px; display: flex; align-items: center;
  justify-content: space-between; gap: 14px; border-radius: 9px; cursor: pointer; font-size: 15px;
}
.select-menu [role=option]:hover, .select-menu [role=option].active { background: #3b4140; }
.select-menu [aria-selected=true] { color: var(--lime); }
.select-menu [aria-disabled=true] { opacity: .4; cursor: default; }
.select-menu .icon { width: 16px; height: 16px; }
.capture-footer .select-trigger { font-size: 13px; min-height: 44px; background: #262b28; }
@keyframes select-reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
/* A fixed slot for Today and an SVG caret prevent date-dependent jumps. */
.day-navigation { flex-wrap: nowrap; flex-shrink: 0; }
.date-control { display: grid; grid-template-columns: 38px 190px 38px; }
.date-control .date-label { min-width: 0; justify-content: space-between; line-height: 20px; }
.date-control .date-caret { display: block; width: 14px; height: 14px; flex-shrink: 0; }
.today-button { width: 54px; flex-shrink: 0; }
.today-button:disabled { color: var(--muted); opacity: .45; }
@media (max-width: 700px) {
  .log-heading { flex-wrap: wrap; }
  .day-navigation { gap: 4px; justify-content: flex-start; }
  .day-navigation .date-control { grid-template-columns: 32px 150px 32px; }
  .date-control .date-label { gap: 6px; }
  .today-button { min-height: 44px; width: 48px; padding: 4px; }
}

.capture-footer .select-trigger > span { font-size: 13px; color: var(--text); }
.today-button:disabled { visibility: visible; }

/* A food row is one generous target, with stable columns at phone widths. */
.food-search-field { display:flex; gap:8px; align-items:stretch; }
.food-search-field input { min-width:0; flex:1; }
.food-search-field button { flex-shrink:0; }
.food-search-meta { display:flex; gap:12px; align-items:center; margin:16px 0 6px; }
.food-search-meta p { flex:1; font-size:11px; line-height:1.5; color:var(--muted); }
.food-search-meta button { flex-shrink:0; font-size:11px; }
button.food-result { width:100%; display:grid; grid-template-columns:42px minmax(0,1fr) auto 20px; gap:12px; text-align:left; color:var(--text); background:transparent; border:0; border-bottom:1px solid var(--line); padding:14px 8px; border-radius:10px; transition:background .15s,transform .15s; }
button.food-result:hover, button.food-result:focus-visible { background:rgba(255,255,255,.055); }
button.food-result:active { transform:scale(.99); }
.food-emoji { font-size:26px; background:rgba(255,255,255,.04); border-radius:12px; width:42px; height:46px; display:grid; place-items:center; }
.food-result-copy { min-width:0; display:grid; gap:4px; }
.food-result-copy strong { font-size:13px; font-weight:550; line-height:1.4; overflow-wrap:anywhere; }
.food-result-copy span,.food-result-copy small { font-size:10px; color:var(--muted); line-height:1.35; }
.food-result-energy { display:grid; text-align:right; gap:4px; }
.food-result-energy strong { font-size:15px; font-variant-numeric:tabular-nums; font-weight:550; }
.food-result-energy small { font-size:9px; color:var(--muted); white-space:nowrap; }
.food-result-add { color:var(--lime); }
.food-attribution { color:var(--muted); font-size:10px; line-height:1.6; margin-top:18px; }
.food-portions > div { display:flex; flex-wrap:wrap; gap:7px; margin-top:8px; }
.portion-chip { background:rgba(255,255,255,.04); border:1px solid var(--line); color:var(--text); border-radius:10px; padding:10px 12px; text-align:left; }
.portion-chip:hover { border-color:var(--lime); }
.portion-chip small { color:var(--muted); margin-left:4px; }
.meal-icon,.reuse-icon { font-size:23px; }
@media(max-width:420px) { button.food-result {grid-template-columns:36px minmax(0,1fr) auto;gap:9px;padding:13px 2px;} .food-result-add{display:none;} .food-emoji{width:36px;height:42px;font-size:23px;} }
.form .food-search-field .primary { width:auto; flex:0 0 auto; padding:12px 16px; }
.form .food-search-field input { width:0; flex:1 1 0; }
@media(max-width:600px) { dialog:not(.calendar-modal) { max-width:100%; } }

/* Today: a quiet writing surface, with context above and the day below. */
.today-workspace { max-width:900px; margin:0 auto; }
.today-topline { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:22px; }
.today-topline h1 { font-size:18px; font-weight:550; display:flex; align-items:center; gap:12px; }
.today-topline h1 > span { font-size:12px; font-weight:400; color:var(--muted); }
.today-overview { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.today-overview .panel { padding:22px; border-radius:20px; min-width:0; }
.today-overview .panel-title h2 { font-size:13px; font-weight:550; }
.today-overview .panel-title { gap:8px; }
.nutrition-balance { display:flex; align-items:baseline; gap:8px; margin:12px 0 9px; }
.nutrition-balance strong { font-size:33px; letter-spacing:-1.5px; font-weight:550; }
.nutrition-balance > span { font-size:11px; color:var(--muted); }
.daily-energy-track { height:5px; background:#353938; border-radius:5px; overflow:hidden; }
.daily-energy-track span { display:block; background:var(--lime); height:100%; border-radius:inherit; }
.daily-energy-caption { font-size:11px; margin:8px 0 0; }
.daily-energy-caption span { color:var(--muted); }
.today-nutrition .macro-grid { padding-top:17px; margin-top:13px; gap:15px; }
.today-nutrition .macro strong { font-size:16px; }
.today-nutrition .macro strong span { font-size:10px; display:inline; }
.today-nutrition .macro-label { font-size:10px; }
.today-nutrition .track { height:3px; margin-top:7px; }
.today-overview .chart { height:111px; margin:8px 0 0; }
.today-overview .chart svg { width:100%; height:100%; }
.today-overview .chart-stats { margin:12px 0 0; }
.today-overview .chart-stats strong { font-size:28px; }
.today-overview .chart-note { font-size:9px; margin-top:4px; }
.today-overview .chart-tabs button { padding:4px 6px; font-size:10px; }
.journal-composer { margin:42px auto 30px; max-width:740px; }
.journal-greeting { text-align:center; margin-bottom:23px; }
.journal-greeting p { font-size:14px; color:var(--muted); margin-bottom:9px; }
.journal-greeting p span { color:var(--lime); margin-left:5px; }
.journal-greeting h2 { font-size:32px; font-weight:500; letter-spacing:-1.2px; }
.journal-composer .capture-box { border:1px solid #4a4e48; background:#212424; border-radius:23px; overflow:hidden; box-shadow:0 8px 30px #0002; }
.journal-composer .capture-box:focus-within { border-color:#9ab66b; box-shadow:0 0 0 3px #d1f7800b,0 8px 30px #0002; }
.journal-composer :is(#quick-description, .startup-input) { min-height:86px; height:86px; padding:20px 21px 8px; font-size:16px; font-weight:400; line-height:1.6; background:transparent; border:0; border-radius:0; box-shadow:none; resize:none; }
.journal-composer .capture-footer { display:flex; align-items:center; justify-content:space-between; padding:4px 13px 12px; gap:10px; }
.journal-composer .capture-options { display:flex; gap:3px; margin:0; padding:0; border:0; }
.journal-composer .capture-options button { display:inline-flex; gap:6px; align-items:center; font-size:11px; color:#bec2bd; background:none; border:0; padding:8px; border-radius:9px; }
.journal-composer .capture-options button:hover { background:#ffffff09; color:var(--text); }
.journal-composer .capture-options svg { width:16px; height:16px; }
.composer-send { display:grid; place-items:center; flex-shrink:0; width:38px; height:38px; border-radius:50%; border:0; background:var(--lime); color:#26301a; }
.composer-send:disabled { opacity:.35; }
.journal-composer .composer-meta { font-size:10px; padding:10px 8px 0; gap:12px; }
.journal-composer .estimate-note { font-size:10px; text-align:center; margin-top:8px; color:#858a86; }
.journal-composer .meal-shortcuts { padding:0; margin:0 0 14px; border:0; }
.journal-composer .shortcut-header { margin-bottom:8px; }
.journal-composer .shortcut-header > span { display:none; }
.journal-composer .segmented { background:none; border:0; gap:10px; }
.journal-composer .segmented button { padding:3px 0; font-size:10px; color:var(--muted); border-radius:0; border:0; background:none; }
.journal-composer .segmented button[aria-selected=true] { color:var(--text); border-bottom:1px solid var(--lime); box-shadow:none; }
.journal-composer #shortcut-results { display:flex; gap:8px; overflow-x:auto; padding-bottom:5px; scrollbar-width:thin; }
.journal-composer .reuse-row { display:flex; flex:0 0 auto; min-width:0; width:220px; background:#1c1e1e; border:1px solid var(--line); border-radius:13px; padding:9px 10px; gap:5px; }
.journal-composer .reuse-details { min-width:0; gap:8px; padding:0; }
.journal-composer .reuse-details > span:last-child { min-width:0; }
.journal-composer .reuse-details strong { font-size:11px; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; display:block; max-width:139px; }
.journal-composer .reuse-details small { font-size:10px; }
.journal-composer .reuse-details small span { display:none; }
.journal-composer .reuse-icon { width:28px; height:30px; background:none; font-size:21px; }
.journal-composer .reuse-add { width:27px; min-width:27px; height:29px; padding:5px; background:none; border:0; }
.journal-composer .show-shortcuts { flex:0 0 auto; font-size:10px; width:75px; }
.journal-diary { max-width:740px; margin:0 auto; }
.journal-diary .sample-banner { padding:9px 12px; font-size:10px; margin:0 0 23px; background:#d1f78006; border-color:#d1f7801a; }
.day-journal .log-header { margin:0 0 20px; }
.day-journal .log-header h2 { font-size:16px; font-weight:500; }
.meal-timeline { position:relative; }
.timeline-entry { display:grid; grid-template-columns:65px 12px minmax(0,1fr); gap:12px; align-items:start; position:relative; padding-bottom:12px; }
.timeline-entry > time { color:#999e99; font-size:10px; padding-top:23px; text-align:right; white-space:nowrap; }
.timeline-dot { width:7px; height:7px; border-radius:50%; background:#777e6e; margin-top:26px; position:relative; }
.timeline-entry:not(:last-child)::before { content:""; position:absolute; top:31px; bottom:-27px; left:80px; width:1px; background:var(--line); }
.day-journal .meal-row { padding:15px; border:1px solid #303333; border-radius:15px; background:#1c1f1f; min-width:0; gap:12px; width:100%; }
.day-journal .meal-row:hover { background:#252929; }
.day-journal .meal-meta > :not(:first-child) { display:none; }
.day-journal .meal-meta { font-size:9px; }
.day-journal .meal-details h3 { font-size:13px; margin:5px 0; line-height:1.4; }
.day-journal .meal-macros { font-size:10px; }
.day-journal .meal-icon { width:33px; min-width:33px; height:36px; font-size:25px; background:none; }
.day-journal .meal-cal { font-size:19px; }
.day-journal .meal-cal small { font-size:9px; }
.timeline-empty { text-align:center; padding:32px 12px; color:var(--muted); }
.timeline-empty > span { font-size:27px; }
.timeline-empty h3 { font-size:15px; font-weight:500; margin:12px 0 5px; color:var(--text); }
.timeline-empty p { font-size:12px; }
.progress-nutrition { display:grid; grid-template-columns:1fr 1fr; gap:22px; margin-bottom:22px; }
.progress-context p { font-size:13px; line-height:1.8; color:var(--muted); margin:18px 0; }
.progress-date { margin-top:22px; }
@media(max-width:700px) {
 .today-topline { margin-bottom:16px; }
 .today-topline h1 { font-size:15px; }
 .today-topline h1 > span { display:none; }
 .today-overview { gap:9px; }
 .today-overview .panel { padding:14px 12px; border-radius:16px; }
 .today-overview .panel-title h2 { font-size:11px; }
 .nutrition-balance { display:block; margin:9px 0 8px; }
 .nutrition-balance strong { font-size:29px; }
 .nutrition-balance > span { display:block; font-size:9px; margin-top:1px; }
 .daily-energy-caption { font-size:9px; }
 .today-nutrition .macro-grid { gap:7px; padding-top:10px; margin-top:10px; }
 .today-nutrition .macro-label { font-size:8px; gap:3px; }
 .today-nutrition .macro .dot { width:4px; height:4px; }
 .today-nutrition .macro strong { font-size:12px; }
 .today-nutrition .macro strong span { display:none; }
 .today-overview .chart-stats strong { font-size:24px; }
 .today-overview .chart-stats span { display:block; font-size:9px; margin-top:2px; }
 .today-overview .chart-tabs { display:none; }
 .today-overview .chart { height:87px; margin-top:4px; }
 .today-overview .chart-note { display:none; }
 .journal-composer { margin-top:28px; margin-bottom:26px; }
 .journal-greeting { margin-bottom:20px; }
 .journal-greeting p { font-size:12px; margin-bottom:6px; }
 .journal-greeting h2 { font-size:26px; letter-spacing:-.8px; }
 .journal-composer .reuse-row { width:194px; }
 .journal-composer .reuse-details strong { max-width:115px; }
 .journal-composer :is(#quick-description, .startup-input) { padding:15px 15px 8px; min-height:80px; height:80px; }
 .journal-composer .capture-footer { padding:3px 9px 9px; gap:4px; }
 .journal-composer .capture-options { gap:0; }
 .journal-composer .capture-options button { padding:7px; font-size:10px; gap:4px; }
 .journal-composer .composer-meta { font-size:9px; }
 .journal-composer .submit-hint { display:none; }
 .timeline-entry { grid-template-columns:44px 7px minmax(0,1fr); gap:8px; }
 .timeline-entry > time { font-size:8px; }
 .timeline-entry:not(:last-child)::before { left:55px; }
 .day-journal .meal-row { padding:12px 10px; gap:8px; }
 .day-journal .meal-row > svg { display:none; }
 .day-journal .meal-macros { display:none; }
 .day-journal .meal-details h3 { font-size:12px; }
 .day-journal .meal-cal { font-size:16px; }
 .day-journal .meal-icon { min-width:24px; width:24px; font-size:22px; }
 .progress-nutrition { grid-template-columns:1fr; }
 .top-actions > .avatar { display:none; }
 .mobile-nav { display:flex; bottom:var(--keyboard-inset,0px); transition:none; }
 .main { padding-bottom:110px; }
}
@media(max-width:360px) {
 .journal-composer .capture-options button { padding:6px 4px; }
 .composer-send { width:33px; height:33px; }
 .today-overview .panel { padding:13px 10px; }
 .today-nutrition .macro-grid { gap:4px; }
}
@media(max-width:700px) {
 .today-overview .chart svg text { font-size:18px; }
 .today-nutrition .macro strong::after { content:" g"; font-size:8px; font-weight:400; color:var(--muted); }
}
@media(max-width:360px) {
 .today-topline .day-navigation .date-control { grid-template-columns:30px 112px 30px; }
 .today-topline .date-control .date-label { font-size:10px; padding-left:7px; padding-right:7px; }
}
@media(max-width:360px) {
 .today-topline { justify-content:flex-end; }
 .today-topline > h1 { position:absolute; width:1px; height:1px; margin:0; padding:0; overflow:hidden; clip-path:inset(50%); }
}

/* Home keeps its greeting, context cards and conversation on one reading width. */
.home-workspace { max-width:740px; margin:25px auto 0; }
.home-workspace > .journal-greeting { margin:0 0 27px; }
.home-workspace .journal-greeting h1 { font-size:32px; font-weight:500; letter-spacing:-1.2px; }
.journal-greeting time { display:block; color:var(--muted); font-size:12px; margin-top:13px; }
.home-overview { gap:12px; }
.home-overview .panel { padding:17px 20px; }
.home-overview .nutrition-balance { margin:8px 0; }
.home-overview .nutrition-balance strong { font-size:29px; }
.home-overview .today-nutrition .macro-grid { margin-top:10px; padding-top:11px; }
.home-overview .chart { height:94px; }
.home-overview .chart-stats { margin-top:8px; }
.home-overview .chart-stats strong { font-size:24px; }
.home-workspace .journal-composer { margin:25px 0 0; }
.chat-turn { margin:24px 0 28px; font-size:14px; line-height:1.7; }
.chat-user { margin-left:auto; max-width:88%; width:fit-content; background:#303533; border:1px solid #414742; border-radius:18px 18px 5px 18px; padding:12px 17px; white-space:pre-wrap; overflow-wrap:anywhere; }
.chat-assistant { margin:17px 7px 0; }
.chat-reply { white-space:pre-wrap; overflow-wrap:anywhere; }
.chat-error { color:var(--coral); }
.chat-working { display:flex; align-items:center; gap:9px; color:var(--muted); font-size:12px; }
.working-dot { width:7px; height:7px; background:var(--lime); border-radius:50%; animation:chat-pulse 1.5s ease-in-out infinite; }
@keyframes chat-pulse { 50% { opacity:.3; } }
@media(prefers-reduced-motion:reduce) { .working-dot { animation:none; } }
.chat-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.chat-meal-link { display:inline-flex; align-items:center; gap:7px; border:1px solid #586447; background:#c7ed7410; border-radius:10px; color:var(--text); padding:8px 12px; font-size:11px; }
.chat-meal-link svg { width:13px; height:13px; color:var(--lime); }
.log-summary { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:15px 0 25px; }
.log-summary > span { font-size:24px; font-variant-numeric:tabular-nums; }
.log-summary small { color:var(--muted); font-size:12px; }
@media(max-width:700px) {
 .home-workspace { margin-top:10px; }
 .home-workspace .journal-greeting h1 { font-size:26px; letter-spacing:-.8px; }
 .home-workspace > .journal-greeting { margin-bottom:22px; }
 .journal-greeting time { font-size:11px; margin-top:10px; }
 .home-overview { gap:9px; }
 .home-overview .panel { padding:12px; }
 .home-overview .nutrition-balance strong { font-size:26px; }
 .home-overview .chart { height:85px; }
 .home-overview .chart-stats strong { font-size:23px; }
 .home-workspace .journal-composer { margin-top:20px; }
 .chat-turn { font-size:13px; margin-top:20px; }
 .chat-user { padding:10px 14px; }
 .log-summary > span { font-size:21px; }
 .log-summary small { font-size:10px; }
 .log-summary button { font-size:11px; }
}
#chat-transcript { max-height:420px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.chat-reply a { color:var(--lime); text-decoration:underline; text-underline-offset:3px; }
@media(max-width:730px) { #chat-transcript { max-height:240px; } }
/* Logging surface: one input, then records that can be corrected in place. */
#entry-results { margin-top:27px; }
.logged-heading { display:flex; align-items:center; justify-content:space-between; margin:22px 2px 12px; }
.logged-heading h2 { font-size:13px; font-weight:500; color:var(--muted); }
.logged-heading button { font-size:11px; }
.logged-cards { display:grid; gap:10px; }
.logged-card { border:1px solid var(--line); background:#1b1e1d; border-radius:17px; padding:16px; }
.logged-card-main { display:flex; align-items:center; gap:12px; }
.logged-emoji { font-size:27px; width:34px; flex-shrink:0; }
.logged-card-copy { flex:1; min-width:0; }
.logged-meta { color:var(--muted); font-size:10px; margin-bottom:5px; }
.logged-card h3 { overflow-wrap:anywhere; font-weight:500; font-size:14px; line-height:1.4; }
.logged-ingredients { color:var(--muted); font-size:11px; margin-top:5px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.logged-calories { font-size:24px; font-variant-numeric:tabular-nums; text-align:right; }
.logged-calories span { display:block; font-size:10px; color:var(--muted); margin-top:2px; }
.logged-card-bottom { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:13px; border-top:1px solid var(--line); padding-top:10px; }
.logged-card-bottom > p { display:flex; gap:12px; font-size:10px; }
.logged-card-bottom > p span:nth-child(1) { color:var(--violet); }
.logged-card-bottom > p span:nth-child(2) { color:var(--coral); }
.logged-card-bottom > p span:nth-child(3) { color:var(--blue); }
.logged-card-bottom > div { display:flex; gap:14px; }
.logged-card-bottom button { font-size:11px; padding:6px 0; }
.logged-card-bottom button[data-describe-change] { color:var(--lime); }
.logged-card-bottom button svg { width:13px; height:13px; }
.edit-target { display:flex; justify-content:space-between; align-items:center; gap:10px; margin:12px 13px 0; padding:8px 11px; border-radius:10px; background:#c7ed7410; color:#c5cdbd; font-size:11px; }
.edit-target strong { font-weight:550; color:var(--lime); }
.edit-target button { display:grid; place-items:center; border:0; color:var(--muted); background:none; padding:4px; }
.edit-target svg { width:15px; height:15px; }
.entry-notice { display:flex; align-items:flex-start; gap:10px; padding:14px 16px; margin-bottom:12px; border:1px solid var(--line); border-radius:13px; font-size:12px; line-height:1.6; }
.entry-notice .working-dot { margin-top:6px; flex-shrink:0; }
.entry-notice strong { font-size:12px; font-weight:500; }
.entry-notice p { color:var(--muted); white-space:pre-wrap; overflow-wrap:anywhere; }
.entry-notice a { color:var(--lime); }
.entry-error { border-color:#dc8c6844; }
.entry-error strong { color:var(--coral); }
.entry-empty { color:var(--muted); font-size:11px; text-align:center; margin:25px 0; }
@media(max-width:500px) {
 .logged-card { padding:13px; }
 .logged-card-bottom { align-items:flex-start; flex-direction:column; gap:5px; }
 .logged-card-bottom > div { width:100%; justify-content:space-between; }
 .logged-card-bottom button { padding:9px 0 2px; }
 .logged-card h3 { font-size:13px; }
 .logged-calories { font-size:21px; }
 .logged-emoji { font-size:24px; width:27px; }
}
/* Home is a capture surface. History and inspection belong in Log. */
.entry-home .top-actions, .entry-home .sidebar .shortcut-card { display:none; }
.home-workspace { max-width:680px; margin:0 auto; }
.today-glance { display:flex; align-items:center; gap:7px; padding:10px 13px; border:1px solid var(--line); border-radius:99px; background:transparent; color:var(--muted); font-size:12px; min-height:44px; }
.today-glance strong { color:var(--text); font-weight:500; }
.today-glance svg { width:14px; height:14px; margin-left:3px; }
.home-entry { margin-top:clamp(45px,12vh,130px); }
.home-entry .journal-greeting { text-align:left; margin:0 0 25px 4px; }
.home-entry .journal-greeting time { margin:0 0 13px; font-size:13px; color:#a1a59f; }
.home-entry .journal-greeting h1 { font-size:clamp(30px,3.5vw,40px); font-weight:500; letter-spacing:-1.4px; line-height:1.15; }
.home-entry .journal-composer { margin:0; }
.home-entry .capture-box { border-radius:24px; background:#202321; border:1px solid #42483e; box-shadow:0 16px 45px #00000018; overflow:hidden; }
.home-entry .capture-box:focus-within { border-color:#829260; box-shadow:0 0 0 3px #c7ed7408; }
.home-entry :is(#quick-description, .startup-input) { min-height:140px; height:140px; padding:24px 25px 10px; font-size:20px; line-height:1.55; background:transparent; border:0; border-radius:0; box-shadow:none; resize:none; }
.home-entry :is(#quick-description, .startup-input)::placeholder { color:#939a8d; opacity:1; }
.home-entry .capture-footer { padding:6px 16px 14px; display:flex; gap:12px; align-items:center; }
.entry-options-button { width:44px; height:44px; display:grid; place-items:center; border-radius:50%; background:#ffffff05; border:1px solid #ffffff12; color:#b7bdb3; }
.entry-options-button:hover { background:#ffffff0c; color:var(--text); }
.capture-spacer { flex:1; }
.home-entry .composer-send { display:flex; gap:14px; align-items:center; justify-content:center; padding:0 18px; width:auto; height:44px; border-radius:30px; font-size:14px; font-weight:550; }
.home-entry .composer-send:disabled { opacity:.42; }
.home-entry .composer-send svg { width:17px; height:17px; }
.composer-receipt { min-height:42px; border-top:1px solid #ffffff08; padding:10px 20px; display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--muted); font-size:12px; }
.composer-receipt:has(.input-hint) { border:0; padding-top:0; min-height:28px; }
.composer-receipt button { white-space:nowrap; min-height:24px; font-size:12px; }
.receipt { display:flex; align-items:center; gap:7px; line-height:1.5; }
.receipt svg { width:15px; height:15px; flex-shrink:0; }
.receipt.saved { color:var(--lime); }
.receipt.error { color:var(--coral); }
.input-hint { font-size:12px; color:#838a80; }
.composer-error:empty { display:none; }
.composer-error { color:var(--coral); margin:12px 4px; font-size:13px; }
.home-entry .edit-target { font-size:13px; margin:14px 16px 0; }
.edit-target span { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.edit-target button { min-width:32px; min-height:32px; }
.entry-options { display:grid; margin:4px 0 25px; }
.entry-options > button { display:flex; align-items:center; gap:13px; background:none; border:0; color:var(--text); padding:16px 4px; font-size:15px; text-align:left; }
.entry-options > button > svg:last-child { margin-left:auto; color:var(--muted); width:17px; }
#modal .meal-shortcuts { margin:0; }
#modal .shortcut-header { display:flex; gap:10px; }
#modal .shortcut-header > span { display:none; }
#modal #shortcut-results { display:grid; gap:9px; overflow:visible; }
#modal .reuse-row { width:100%; min-width:0; }
#modal .reuse-details { flex:1; }
#modal .reuse-details strong { max-width:260px; font-size:14px; }
#modal .reuse-add { min-width:44px; min-height:44px; }
.entry-row { display:flex; gap:13px; align-items:center; width:100%; text-align:left; padding:17px 14px; background:#ffffff03; border:1px solid var(--line); border-radius:16px; margin-bottom:12px; color:var(--text); }
.entry-row > span:nth-child(2) { flex:1; min-width:0; }
.entry-row strong { display:block; font-size:14px; font-weight:450; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.entry-row small { display:block; margin-top:6px; font-size:12px; color:var(--muted); }
.entry-row > svg { color:var(--muted); width:16px; }
.entry-row-icon { color:var(--lime); }
.entry-row-with-dismiss { padding:0; gap:0; }
.entry-row-open { display:flex; align-items:center; gap:13px; flex:1; min-width:0; padding:17px 14px; text-align:left; background:none; border:0; border-radius:inherit; color:inherit; }
.entry-row-open>span:nth-child(2) { flex:1; min-width:0; }
.entry-row-open>svg { width:16px; flex:none; color:var(--muted); }
.entry-row-open .entry-row-icon { flex:none; }
.entry-row-dismiss { display:grid; place-items:center; flex:none; width:44px; height:44px; margin-right:8px; padding:0; border:0; border-radius:10px; background:none; color:var(--muted); }
.entry-row-dismiss:hover { color:var(--text); background:var(--panel2); }
.entry-row-dismiss .icon { width:17px; height:17px; }
.entry-detail-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.entry-detail-actions>.primary { flex:1; }
.entry-detail-actions>.text-button { min-height:44px; padding:0 12px; }
.entry-original { padding:15px; background:#ffffff05; border-radius:12px; font-size:16px; line-height:1.6; margin-bottom:18px; }
.entry-explanation { font-size:15px; line-height:1.65; color:var(--muted); margin-bottom:22px; white-space:pre-wrap; }
@media(max-width:730px) {
 .entry-home .topbar { margin-bottom:0; }
 .today-glance { font-size:11px; gap:4px; padding:8px 10px; border:0; }
 .today-glance > span:first-child { display:none; }
 .home-entry { margin-top:clamp(36px,10vh,85px); }
 .home-entry .journal-greeting { margin-bottom:22px; }
 .home-entry .journal-greeting h1 { font-size:31px; letter-spacing:-1px; }
 .home-entry .journal-greeting time { font-size:12px; }
 .home-entry :is(#quick-description, .startup-input) { min-height:132px; height:132px; padding:21px 20px 12px; font-size:18px; }
 .home-entry .capture-footer { padding:0 13px 13px; }
 .home-entry .composer-send { min-height:44px; }
 .composer-receipt:has(.input-hint) { display:none; }
 .composer-receipt { padding:10px 14px; flex-wrap:wrap; }

}
@media(max-width:360px) { .home-entry .journal-greeting h1 { font-size:28px; } .today-glance { font-size:10px; } }
@media(max-height:550px) and (min-width:731px) { .home-entry { margin-top:24px; } }
.home-entry .capture-box { padding:0; margin-top:0; }
.home-entry .composer-send > span { font-size:14px; color:inherit; }
@media(max-width:730px) {
 .keyboard-open .entry-home .topbar, .keyboard-open .home-entry .journal-greeting { display:none; }
 .keyboard-open .entry-home .main { padding-top:12px; }
 .keyboard-open .home-entry { margin-top:0; }
 .keyboard-open .home-entry .capture-box { display:flex; flex-direction:column; max-height:calc(100vh - var(--keyboard-inset) - 84px); border-radius:18px; }
 .keyboard-open .home-entry :is(#quick-description, .startup-input) { flex:1 1 auto; min-height:40px; height:72px !important; padding:12px 15px; font-size:16px; }
 .keyboard-open .home-entry .capture-footer { flex-shrink:0; padding:0 10px 8px; }
 .keyboard-open .home-entry .composer-receipt { flex-shrink:0; padding:6px 12px; font-size:11px; min-height:0; }
 .keyboard-open .home-entry .edit-target { margin:8px 12px 0; padding:0 7px; height:24px; flex-shrink:0; font-size:12px; }
 .keyboard-open .home-entry .edit-target button { min-height:24px; }
}
.log-nutrition { margin:0 0 24px; }
.log-nutrition summary { display:flex; align-items:center; justify-content:space-between; min-height:44px; font-size:14px; color:var(--muted); cursor:pointer; list-style:none; }
.log-nutrition summary::-webkit-details-marker { display:none; }
.log-nutrition summary svg { width:15px; height:15px; }
.log-nutrition[open] summary { margin-bottom:12px; }
.log-nutrition[open] summary svg { transform:rotate(180deg); }
.meal-photo-preview { display:flex; gap:12px; align-items:center; margin:14px 15px 0; font-size:13px; }
.meal-photo-preview img { width:64px; height:64px; object-fit:cover; border-radius:12px; }
.meal-photo-preview span { flex:1; }
.meal-photo-preview small { display:block; margin-top:5px; font-size:11px; color:var(--muted); }
.meal-photo-preview button { min-width:44px; min-height:44px; border:0; background:none; color:var(--muted); }
.entry-photo-detail { width:100%; max-height:320px; object-fit:contain; border-radius:14px; margin-bottom:18px; }
[data-action=dictateMeal][aria-pressed=true] { color:var(--lime); border-color:var(--lime); background:#c7ed7415; }
@media(max-width:730px) { .keyboard-open .meal-photo-preview { margin:6px 12px; } .keyboard-open .meal-photo-preview img { width:32px; height:32px; } .keyboard-open .meal-photo-preview small { display:none; } }

/* Fields must shrink with small phones, including long timezone values. */
.form-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
.form-row > label, .form-row input, .custom-select { min-width:0; }
.select-trigger { overflow:hidden; }
.select-trigger > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.progress-nutrition .day-navigation { width:100%; min-width:0; gap:4px; }
.progress-nutrition .date-control { flex:1; min-width:0; grid-template-columns:30px minmax(0,1fr) 30px; }
.progress-nutrition .date-label { padding-left:4px; padding-right:4px; }
@media(max-height:550px) and (min-width:731px) {
 .entry-home .topbar { margin-bottom:8px; }
 .home-entry { margin-top:8px; }
 .home-entry .journal-greeting { margin-bottom:12px; }
 .home-entry .journal-greeting time { margin-bottom:5px; }
 .home-entry .journal-greeting h1 { font-size:27px; }
 .home-entry :is(#quick-description, .startup-input) { min-height:80px; height:80px; padding-top:14px; }
}

/* Quick capture: small, factual feedback lives above the writing surface. */
.home-entry .journal-greeting { margin-bottom:22px; }
.today-so-far { margin:0 4px 0; min-width:0; }
.so-far-label { color:#b2b8ac; font-size:12px; display:flex; gap:10px; align-items:center; }
.so-far-label > span { font-size:11px; color:#7e8879; }
.so-far-list { display:flex; gap:8px; overflow-x:auto; padding:11px 0 5px; scrollbar-width:thin; scrollbar-color:#444b40 transparent; }
.so-far-meal { flex:0 0 auto; display:flex; align-items:center; gap:8px; min-height:38px; max-width:240px; padding:7px 12px; border:1px solid #ffffff0b; border-radius:12px; background:#ffffff03; color:#c6cdbf; font-size:12px; text-align:left; }
.so-far-meal:hover { background:#ffffff09; border-color:#ffffff20; }
.so-far-meal > span:last-child { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.so-far-meal > span:first-child { font-size:17px; }
.so-far-empty { color:#747d6d; font-size:12px; padding:7px 0; }
.entry-surface { margin-top:30px; }
.entry-activity:empty { display:none; }
.entry-activity { margin-bottom:12px; }
.entry-task { display:flex; align-items:center; gap:12px; min-height:64px; padding:12px 16px; border:1px solid #ffffff10; border-radius:18px; background:#1b1e1b; }
.entry-task.is-working { border-color:#aec87530; }
.food-reel { flex-shrink:0; width:32px; height:32px; overflow:hidden; display:grid; place-items:center; color:var(--lime); font-size:21px; }
.food-reel > span { display:block; width:max-content; white-space:pre; word-spacing:15px; font-size:23px; animation:food-reel 7s linear infinite; justify-self:start; }
@keyframes food-reel { from {transform:translateX(-50%);} to {transform:translateX(0);} }
.entry-task-copy { min-width:0; flex:1; }
.entry-task-copy strong { display:block; font-size:13px; font-weight:500; line-height:1.4; color:#d1d9c9; }
.entry-task-copy small { display:block; margin-top:3px; font-size:11px; color:#7d8975; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.task-open { flex-shrink:0; display:grid; place-items:center; min-width:40px; min-height:40px; background:transparent; border:0; color:var(--muted); border-radius:10px; }
.task-open:hover { background:#ffffff08; }
.needs-attention { border-color:#e1b26c38; }
.needs-attention .food-reel { color:#e1b26c; }
.activity-details { padding:0 16px; color:var(--muted); font-size:11px; }
.activity-details summary { cursor:pointer; padding:8px 0; min-height:30px; }
.activity-details summary > span { margin-left:8px; opacity:.6; }
.activity-details ol { list-style:none; padding:3px 0 10px; margin:0; }
.activity-details li { display:flex; align-items:center; gap:9px; padding:5px 0; }
.activity-details li > span { width:12px; color:var(--lime); }
.activity-details li small { margin-left:auto; color:var(--coral); }
@media(prefers-reduced-motion:reduce) { .food-reel > span { animation:none; } }

/* A scrollable day with real clock positions; meal handles work with touch and keys. */
.log-nutrition-strip { margin:22px 0 28px; }
.log-nutrition-strip .today-nutrition { display:grid; grid-template-columns:1fr 1.4fr; column-gap:32px; padding:20px 24px; border-radius:20px; }
.log-nutrition-strip .panel-title { grid-column:1/-1; margin-bottom:12px; }
.log-nutrition-strip .panel-title h2 { font-size:13px; color:#adb5a6; font-weight:500; }
.log-nutrition-strip .nutrition-balance { margin:0; grid-column:1; grid-row:2; align-self:end; }
.log-nutrition-strip .nutrition-balance strong { font-size:32px; }
.log-nutrition-strip .nutrition-balance span { font-size:11px; }
.log-nutrition-strip .daily-energy-track { grid-row:3; grid-column:1; margin-top:12px; }
.log-nutrition-strip .daily-energy-caption { grid-row:4; grid-column:1; font-size:11px; margin:6px 0 0; }
.log-nutrition-strip .macro-grid { grid-column:2; grid-row:2/5; margin:0; align-self:center; }
.calendar-hint { font-size:11px; color:#7f8978; }
.day-calendar { height:560px; overflow-y:auto; overscroll-behavior:contain; border:1px solid #ffffff0c; border-radius:18px; background:#181b18; scrollbar-width:thin; scrollbar-color:#46513d transparent; }
.calendar-canvas { position:relative; margin-top:14px; }
.calendar-hour { position:absolute; left:0; right:0; display:flex; align-items:flex-start; pointer-events:none; }
.calendar-hour > time { width:48px; text-align:right; padding-right:11px; transform:translateY(-6px); color:#8c9783; font-size:11px; }
.calendar-hour > time small { font-size:9px; margin-left:2px; color:#626d5c; }
.calendar-hour > span { height:1px; background:#ffffff09; flex:1; }
.calendar-meal { position:absolute; display:flex; touch-action:none; cursor:grab; user-select:none; height:52px; border:1px solid #91ad6940; background:#252d23; border-radius:12px; z-index:2; transition:box-shadow .15s,border-color .15s; }
.calendar-meal:hover { background:#2a3527; border-color:#a9c57880; }
.calendar-meal.is-dragging { z-index:5; border-color:var(--lime); box-shadow:0 12px 24px #0008; background:#34402d; }
.calendar-grip { width:32px; flex-shrink:0; touch-action:none; user-select:none; cursor:grab; border:0; background:none; color:#8b9a7f; font-size:20px; padding:0; border-radius:11px 0 0 11px; }
.calendar-grip:active { cursor:grabbing; }
.calendar-meal-body { display:flex; gap:10px; align-items:center; flex:1; min-width:0; border:0; border-radius:0 11px 11px 0; background:transparent; color:#d8e2cf; text-align:left; padding:5px 10px 5px 0; }
.calendar-emoji { font-size:21px; }
.calendar-meal-name { min-width:0; }
.calendar-meal-name strong { font-size:13px; font-weight:500; display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.calendar-meal-name small { display:block; margin-top:5px; color:#97a68b; font-size:11px; white-space:nowrap; }
.calendar-now { position:absolute; left:48px; right:0; height:1px; background:#dbeea360; pointer-events:none; z-index:3; }
.calendar-now > span { position:absolute; top:-3px; left:-3px; width:7px; height:7px; border-radius:50%; background:#dbeea3; }
.calendar-empty { position:sticky; top:180px; padding:35px 15px 35px 60px; text-align:center; color:#a9b59f; font-size:15px; pointer-events:none; }
.calendar-empty span { font-size:12px; color:#76826c; display:block; margin-top:7px; }

/* Ingredient edits stay in one sheet, including adding/removing individual items. */
.ingredient .ingredient-head { display:flex; align-items:center; gap:10px; }
.ingredient-head .ingredient-name { flex:1; min-width:0; }
.ingredient-name input { width:100%; font-size:15px; font-weight:500; padding:10px 12px; }
.remove-ingredient { display:grid; place-items:center; width:40px; height:40px; flex-shrink:0; border:0; background:#ffffff04; border-radius:10px; color:#939c8c; }
.remove-ingredient:hover { color:var(--coral); background:#f4998012; }
.ingredient-portion { display:flex; align-items:center; gap:14px; margin:14px 0; }
.ingredient-portion > label { width:125px; font-size:11px; flex-shrink:0; }
.ingredient-portion > span { font-size:11px; line-height:1.6; color:var(--muted); }
.ingredient .ingredient-numbers { gap:9px; }
.ingredient .ingredient-source { font-size:11px; margin:12px 0 0; }
.ingredient-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; }
#ingredient-notice { font-size:12px; color:var(--muted); }
#ingredient-notice button { color:var(--lime); }
@media(max-width:730px) {
 .entry-surface { margin-top:26px; }
 .home-entry .journal-greeting { margin-bottom:20px; }
 .so-far-meal { min-height:40px; max-width:195px; }
 .entry-task { padding:10px 12px; border-radius:16px; min-height:62px; gap:10px; }
 .entry-task-copy strong { font-size:12px; }
 .day-calendar { height:490px; }
 .calendar-grip { width:30px; }
 .calendar-meal-body { gap:5px; padding-right:5px; }
 .calendar-emoji { font-size:17px; }
 .calendar-meal-name strong { font-size:12px; }
 .calendar-meal-name small { font-size:10px; }
 .calendar-hint { font-size:10px; max-width:115px; text-align:right; }
 .log-nutrition-strip .today-nutrition { padding:16px; column-gap:20px; }
 .log-nutrition-strip .nutrition-balance strong { font-size:27px; }
 .log-nutrition-strip .macro-grid { gap:12px; }
 .log-nutrition-strip .macro-grid .macro { padding:0; }
 .ingredient .ingredient-numbers { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .ingredient-head .ingredient-name input { min-height:44px; }
 .keyboard-open .today-so-far { display:none; }
 .keyboard-open .entry-surface { margin-top:0; }
 .keyboard-open .entry-task { min-height:44px; padding:7px 10px; }
 .keyboard-open .entry-task-copy small, .keyboard-open .activity-details { display:none; }
}
@media(max-width:420px) {
 .log-nutrition-strip .today-nutrition { grid-template-columns:1fr; }
 .log-nutrition-strip .macro-grid { grid-column:1; grid-row:5; margin-top:16px; }

}
.food-reel:has(>span) { mask-image:linear-gradient(to right,transparent,#000 15%,#000 85%,transparent); }
.food-reel > span { display:flex; width:320px; word-spacing:normal; }
.food-reel i { flex:0 0 32px; width:32px; text-align:center; font-style:normal; }
.ingredient .ingredient-numbers { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.ingredient .ingredient-numbers input, .ingredient .ingredient-portion input { width:100%; }
.ingredient input[type=number] { appearance:textfield; }
.ingredient input[type=number]::-webkit-inner-spin-button, .ingredient input[type=number]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.log-workspace .today-topline h1 { font-size:24px; }
@media(max-width:730px) { .ingredient .ingredient-numbers { grid-template-columns:repeat(2,minmax(0,1fr)); } .log-workspace .today-topline h1 { font-size:22px; } }
@media(max-width:730px) {
 .keyboard-open .home-entry:has(.entry-task) .capture-box { max-height:calc(100vh - var(--keyboard-inset) - 144px); }
}
@media(max-height:550px) and (min-width:731px) {
 .home-entry .journal-greeting time, .home-entry .so-far-label, .home-entry .activity-details { display:none; }
 .home-entry { margin-top:0; }
 .home-entry .journal-greeting { margin-bottom:12px; }
 .home-entry .journal-greeting h1 { font-size:25px; }
 .so-far-list { padding:0; }
 .so-far-meal { min-height:30px; padding-top:5px; padding-bottom:5px; }
 .entry-surface { margin-top:14px; }
 .entry-task { min-height:44px; padding:7px 12px; }
 .entry-task-copy small { display:none; }
 .home-entry :is(#quick-description, .startup-input) { height:76px!important; min-height:64px; padding-top:14px; }
 .home-entry .capture-footer { padding:4px 13px 10px; }
}

.calendar-meal-name small { overflow:hidden; text-overflow:ellipsis; }
.calendar-meal-name time { display:inline-block; width:8.5ch; font-variant-numeric:tabular-nums; }
/* Save room inside Home on short landscape screens, without moving its header. */
@media(max-height:420px) and (min-width:731px) {
 .home-entry .journal-greeting { margin-bottom:4px; }
 .home-entry .so-far-list { padding-top:0; }
 .home-entry .entry-surface { margin-top:10px; }
}
/* On the smallest keyboard viewport, prioritize the attachment and send button.
   Activity returns as soon as the keyboard closes; no entry state is discarded. */
@media(max-width:730px) {
 .keyboard-compact .entry-activity { display:none; }
 .keyboard-compact .home-entry:has(.entry-task) .capture-box { max-height:calc(100vh - var(--keyboard-inset) - 84px); }
 .keyboard-compact .meal-photo-preview { margin:0 12px; flex-shrink:0; }
 .keyboard-compact .home-entry .edit-target { margin:0 12px; }
 .keyboard-compact .home-entry :is(#quick-description, .startup-input) { padding:7px 15px; }
}

/* Nibb: the calendar is the page, with one quiet toolbar. */
.log-workspace { width:100%; max-width:none; margin:0; }
.log-workspace .journal-diary { width:100%; max-width:none; margin:0; }
.log-page-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; gap:16px; }
.log-page-heading h1 { font-size:30px; font-weight:500; letter-spacing:-.9px; }
.log-add-button { display:flex; align-items:center; gap:8px; border:1px solid #ffffff17; border-radius:12px; padding:0 13px; height:42px; background:#ffffff04; color:var(--text); font-size:12px; }
.log-add-button:hover { background:#ffffff0a; }
.log-date-actions { display:flex; align-items:center; gap:12px; min-width:0; }
.log-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:44px; margin-bottom:16px; }
.log-toolbar .day-navigation { gap:8px; }
.log-toolbar .date-control { grid-template-columns:38px minmax(130px,170px) 38px; border:0; background:none; padding:0; }
.log-toolbar .date-label { justify-content:center; gap:9px; padding:0 5px; font-size:13px; }
.log-toolbar .date-control button, .log-toolbar .today-button { height:40px; min-height:40px; }
.log-toolbar .today-button { margin:0; min-width:62px; border:1px solid #ffffff18; border-radius:10px; background:#ffffff04; color:#cbd3c4; }
.log-toolbar .today-button:disabled { opacity:.5; }
.log-day-total { white-space:nowrap; font-size:12px; color:var(--muted); }
.log-day-total strong { color:var(--text); font-weight:500; font-size:15px; }
.log-workspace .day-calendar { width:100%; height:clamp(320px,calc(100dvh - 245px),900px); border-radius:18px; }
.entry-needs-attention { border-color:#df887840; }
.entry-row-icon b { display:grid; place-items:center; width:21px; height:21px; border:1px solid currentColor; border-radius:50%; font:600 12px/1 system-ui; }
.entry-needs-attention .entry-row-icon { color:#e58c80; }
.entry-needs-attention small { color:#d3a69d; }
.food-reel > span { position:relative; display:block; width:32px; height:32px; animation:none; }
.food-reel i { position:absolute; inset:0; display:grid; place-items:center; width:32px; height:32px; opacity:0; animation:nibb-food-swipe 10s cubic-bezier(.4,0,.2,1) -.6s infinite; will-change:transform,opacity; }
.food-reel i:nth-child(2) { animation-delay:-8.6s; }
.food-reel i:nth-child(3) { animation-delay:-6.6s; }
.food-reel i:nth-child(4) { animation-delay:-4.6s; }
.food-reel i:nth-child(5) { animation-delay:-2.6s; }
@keyframes nibb-food-swipe {
 0% {transform:translateX(36px) rotate(8deg);opacity:0;}
 6%,20% {transform:translateX(0) rotate(0);opacity:1;}
 26%,100% {transform:translateX(-36px) rotate(-8deg);opacity:0;}
}
@media(prefers-reduced-motion:reduce) {
 .food-reel i { animation:none; opacity:0; }
 .food-reel i:first-child { opacity:1; }
}
@media(max-width:730px) {
 .log-page-heading { margin-bottom:17px; }
 .log-page-heading h1 { font-size:27px; }
 .log-toolbar { flex-wrap:wrap; gap:8px; margin-bottom:12px; }
 .log-toolbar .day-navigation { flex:1; justify-content:space-between; gap:5px; }
 .log-toolbar .date-control { grid-template-columns:36px minmax(105px,1fr) 36px; flex:1; }
 .log-toolbar .date-label { font-size:12px; gap:6px; }
 .log-day-total { width:100%; padding-left:3px; font-size:11px; }
 .log-day-total strong { font-size:13px; }
 .log-workspace .day-calendar { height:clamp(280px,calc(100dvh - 290px),780px); border-radius:14px; }
}

/* Today's saved food is the receipt: newest first, two wrapping rows. */
.so-far-label { gap:8px; min-height:16px; flex-wrap:wrap; }
.so-far-label .so-far-heading { color:#b2b8ac; font-size:12px; }
.so-far-macros { display:inline-flex; align-items:center; gap:5px; height:14px; }
.mini-macro { display:inline-block; position:relative; width:44px; height:14px; overflow:hidden; border-radius:4px; background:#ffffff08; }
.mini-macro i { position:absolute; inset:0 auto 0 0; background:var(--macro-color); opacity:.28; transition:width .25s ease; }
.mini-macro b { position:relative; display:block; text-align:center; font-size:9px; line-height:14px; font-weight:500; color:var(--macro-color); }
.so-far-list { position:relative; flex-wrap:wrap; align-content:flex-start; overflow:visible; gap:7px; padding:12px 0 0; }
.so-far-meal { max-width:min(260px,100%); min-height:38px; padding:7px 11px; border-radius:12px; }
.so-far-meal[hidden], .so-far-toggle[hidden] { display:none; }
.so-far-toggle { min-height:36px; display:flex; align-items:center; margin-top:3px; padding:0 2px; border:0; background:none; color:#a7b39c; font-size:11px; }
.so-far-toggle:hover { color:var(--lime); }
@media(max-width:730px) {
 .entry-home .main { padding-bottom:calc(var(--entry-dock-height,220px) + var(--mobile-nav-height,65px) + 45px); }
 .entry-home .entry-surface { position:fixed; left:16px; right:16px; bottom:calc(var(--mobile-nav-height,65px) + var(--keyboard-inset,0px) + 12px); z-index:30; margin:0; display:flex; flex-direction:column; max-height:calc(100dvh - var(--keyboard-inset,0px) - var(--mobile-nav-height,65px) - 24px); }
 .entry-home .entry-surface::before { content:""; position:absolute; z-index:-1; inset:-16px -16px -12px; background:linear-gradient(transparent,#131615 20px); pointer-events:none; }
 .entry-home .entry-surface .journal-composer, .entry-home #quick-capture { display:flex; flex-direction:column; min-height:0; }
 .entry-home .entry-surface .capture-box { display:flex; flex-direction:column; min-height:0; max-height:none!important; }
 .entry-home .entry-surface :is(#quick-description, .startup-input) { flex:1 1 auto; min-height:44px; }
 .entry-home .entry-surface .capture-footer, .entry-home .entry-activity, .entry-home .meal-photo-preview, .entry-home .edit-target { flex-shrink:0; }
 .entry-home .entry-activity { margin-bottom:10px; }
 .so-far-label { gap:6px; }
 .so-far-label .so-far-heading { font-size:11px; }
 .mini-macro { width:42px; }
 .so-far-meal { max-width:100%; }
}
@media(max-width:730px) and (max-height:700px) {
 .entry-home .home-entry { margin-top:24px; }
 .entry-home .journal-greeting { margin-bottom:16px; }
 .entry-home .entry-surface :is(#quick-description, .startup-input) { height:100px; min-height:44px; }
}
@media(prefers-reduced-motion:reduce) { .mini-macro i { transition:none; } }

/* Keep the direct photo action a full touch target on narrow phones. */
.home-entry .entry-options-button { flex:0 0 44px; }
@media(max-width:730px) { .home-entry .capture-footer { gap:6px; } }

/* A single thumbnail row keeps multiple attachments out of the writing area. */
.meal-photo-preview { overflow-x:auto; gap:8px; padding:0 0 4px; align-items:flex-start; scrollbar-width:thin; }
.meal-photo-thumb { position:relative; width:72px; height:72px; flex:0 0 72px; }
.meal-photo-thumb img { display:block; width:72px; height:72px; border-radius:12px; object-fit:cover; }
.meal-photo-thumb button { position:absolute; right:-3px; top:-3px; display:grid; place-items:center; width:44px; height:44px; padding:0; }
.meal-photo-thumb button svg { width:24px; height:24px; border-radius:50%; padding:4px; background:#181b18e8; color:#eef3e7; border:1px solid #ffffff25; }
.entry-photo-gallery { display:flex; gap:10px; overflow:auto; margin-bottom:18px; }
.entry-photo-gallery .entry-photo-detail { flex:0 0 auto; width:auto; max-width:100%; max-height:280px; margin:0; }
@media(max-width:730px) {
 .keyboard-open .meal-photo-thumb { width:48px; height:44px; flex-basis:48px; }
 .keyboard-open .meal-photo-thumb img { width:44px; height:44px; }
 .keyboard-open .meal-photo-preview { padding-bottom:0; }
}

/* The first HTTP response includes the Home loading shell; no private data is embedded. */
.startup-status { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.skeleton { display:block; background:#292c29; border-radius:7px; }
.startup-slash { margin:0 12px; color:#4b4f4d; }
.startup-nav { gap:20px; }
.startup-nav > span { width:75%; height:32px; margin:6px 12px; }
.startup-nav > span:first-child { width:100%; margin-left:0; height:44px; background:#2b3025; }
.startup-account { width:130px; height:36px; }
.startup-total { width:196px; height:44px; border-radius:24px; }
.startup-date { width:150px; height:13px; }
.startup-screen .journal-greeting time { height:1lh; }
.startup-meals { margin:0 4px 32px; }
.startup-label { width:200px; height:13px; margin-bottom:14px; }
.startup-meal-row { display:flex; gap:8px; }
.startup-meal-row > span { flex:1; min-width:0; height:42px; border-radius:13px; }
.startup-composer { padding:0 !important; }
.startup-input { width:100%; }
.startup-placeholder { width:65%; max-width:340px; height:18px; }
.startup-tools { margin:0; }
.startup-tools > span { width:44px; height:44px; border-radius:50%; }
.startup-tools .startup-send { width:92px; margin-left:auto; border-radius:24px; background:#39432b; }
.startup-mobile-nav > span { width:28px; height:28px; margin:8px auto; }
@media(max-width:730px) {
 .startup-total { width:160px; height:32px; }
 .startup-meal-row > span:last-child { display:none; }


}


/* A single bite silhouette, shared by the wordmark, favicon and wait states. */
.brand { gap:9px; }
.brand .nibb-mark { width:30px; height:30px; flex:0 0 30px; }
.nibb-mark { display:inline-block; vertical-align:middle; object-fit:contain; }
.nibb-spinner { animation:nibb-turn 1.8s cubic-bezier(.45,0,.2,1) infinite; }
.loading-panel .nibb-mark { margin-right:8px; }
@keyframes nibb-turn { 0%,12% { transform:rotate(0deg); } 88%,100% { transform:rotate(360deg); } }
@media(max-width:730px) { .mobile-brand { display:flex; } .brand .nibb-mark { width:25px; height:25px; flex-basis:25px; } }
@media(prefers-reduced-motion:reduce) { .nibb-spinner { animation:none; } }
/* Consistent workspace controls, charts and editable forms. */
.workspace-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:14px 0 30px; }
.workspace-heading p { color:var(--muted); margin-top:8px; }
.range-control { display:flex; gap:4px; padding:4px; background:#202320; border:1px solid var(--line); border-radius:15px; }
.range-control button { min-width:48px; min-height:44px; border-radius:10px; font-weight:550; color:var(--muted); }
.range-control button[aria-pressed=true] { color:var(--lime); background:#35402b; }
.progress-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.progress-grid .panel { min-width:0; }
.progress-stat { margin:25px 0 6px; font-size:38px; letter-spacing:-1.5px; font-weight:550; }
.progress-stat small { color:var(--muted); font-size:13px; letter-spacing:0; font-weight:400; }
.progress-chart svg { display:block; width:100%; height:auto; overflow:visible; }
.progress-chart text { fill:#a6afa2; font-size:11px; }
.graph-skeleton,.chart-empty { min-height:200px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:14px; color:var(--muted); text-align:center; }
.progress-macros { display:flex; gap:14px; flex-wrap:wrap; border-top:1px solid var(--line); padding-top:18px; margin-top:18px; font-size:12px; }
.progress-macros span { display:flex; align-items:center; gap:6px; }
.progress-macros i { width:6px; height:6px; border-radius:50%; }
.progress-photos { grid-column:1/-1; }
.progress-photo-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:16px; margin-top:20px; }
.progress-photo { min-width:0; padding:0; text-align:left; }
.progress-photo>span:last-child { display:block; padding:10px 2px; font-size:12px; }
.progress-photo small { display:block; color:var(--muted); margin-top:4px; overflow-wrap:anywhere; }
.photo-frame { position:relative; display:block; aspect-ratio:3/4; border-radius:16px; overflow:hidden; background:#292d28; }
.photo-frame img { width:100%; height:100%; object-fit:cover; }
.photo-loading { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:18px; font-size:12px; color:var(--muted); text-align:center; }
.photo-empty { grid-column:1/-1; display:flex; align-items:center; flex-direction:column; padding:36px; gap:12px; color:var(--muted); }
.photo-viewer img { max-height:65vh; width:100%; object-fit:contain; border-radius:16px; }
.photo-picker { min-height:190px; border:1px dashed #68745c; border-radius:18px; background:#252b23; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:20px; }
.photo-picker span { font-size:12px; color:var(--muted); }
.photo-picker.is-over { background:#34422c; border-color:var(--lime); }
.photo-picker img { max-height:260px; max-width:100%; border-radius:12px; }
.weight-entry { display:flex; align-items:center; border:1px solid #637451; border-radius:20px; padding:8px 18px; gap:10px; background:#22281f; }
.weight-entry input { width:100%; min-width:0; border:0; background:none; box-shadow:none; font-size:46px; padding:15px 0; letter-spacing:-1px; }
.weight-entry>span { font-size:20px; color:var(--muted); }
.weight-entry:focus-within { outline:2px solid var(--lime); outline-offset:3px; }
.weight-entry input:focus { outline:0; box-shadow:none; }
.checkin-row { width:100%; display:flex; justify-content:space-between; align-items:center; gap:16px; min-height:64px; border-bottom:1px solid var(--line); text-align:left; }
.checkin-row small { display:block; color:var(--muted); margin-top:5px; }
.saved-search { display:flex; gap:12px; align-items:center; margin-bottom:24px; max-width:440px; }
.saved-search input { width:100%; }
.saved-emoji { font-size:32px; }
.saved-card .saved-ingredients { margin:12px 0 22px; min-height:40px; color:var(--muted); font-size:13px; line-height:1.6; }
.saved-nutrition { margin:0 0 20px; color:var(--muted); }
.saved-nutrition strong { color:var(--text); font-size:28px; }
.saved-nutrition>span { display:block; margin-top:8px; font-size:12px; }
.saved-card>.text-button { margin-top:10px; width:100%; justify-content:center; }
.saved-empty { grid-column:1/-1; display:flex; flex-direction:column; align-items:center; gap:18px; text-align:center; padding:50px 24px; }
.saved-empty p { max-width:340px; color:var(--muted); }
.builder-choice { display:flex; gap:14px; align-items:center; margin:15px 0 22px; flex-wrap:wrap; }
.builder-choice>span { font-size:12px; }
.ingredient-search { display:flex; gap:10px; align-items:flex-end; }
.ingredient-search label { flex:1; min-width:0; }
.ingredient-search .secondary { min-height:46px; }
#builder-items .ingredient-numbers { grid-template-columns:repeat(5,minmax(0,1fr)); }
.builder-total { padding:16px; background:#283021; border-radius:12px; font-size:13px; }
.dialog-actions { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:18px; }
.dialog-actions .primary { margin-left:auto; }
.form-error { color:#f0a8a0; line-height:1.5; font-size:13px; }
.form-error:empty { display:none; }
.form-error:focus { outline:none; }
.onboarding-steps { display:flex; gap:6px; margin:8px 0 24px; }
.onboarding-steps i { height:4px; flex:1; background:var(--line); border-radius:3px; }
.onboarding-steps i.active { background:var(--lime); }
.health-context { border:0; border-top:1px solid var(--line); margin:8px 0 0; padding:18px 0 0; display:grid; gap:16px; }
.health-context legend { padding:0 0 12px; font-weight:550; }
.plan-calories { display:flex; flex-direction:column; align-items:center; gap:4px; padding:24px; background:#2b3424; border-radius:20px; }
.plan-calories strong { font-size:48px; color:var(--lime); letter-spacing:-2px; }
.plan-calories span { color:var(--muted); }
.plan-macros { display:flex; justify-content:space-around; gap:12px; margin:8px 0; }
.plan-macros div { display:flex; flex-direction:column; align-items:center; gap:8px; }
.plan-macros strong { font-size:22px; }
.plan-macros span { font-size:12px; color:var(--muted); text-transform:capitalize; }
.plan-review p { margin-top:16px; }
/* The energy rail signals an overage in words as well as color. */
.today-glance.nutrition-glance { display:flex; flex-direction:column; align-items:stretch; gap:8px; width:290px; max-width:100%; border-radius:18px; padding:12px 15px; height:auto; }
.glance-heading { display:flex; align-items:center; justify-content:flex-end; gap:6px; font-size:12px; }
.glance-heading>span:first-child { margin-right:auto; }
.glance-energy { height:4px; background:#343a30; border-radius:5px; overflow:hidden; }
.glance-energy i { display:block; height:100%; border-radius:inherit; background:var(--lime); transition:width .25s ease; }
.nutrition-glance.is-over .glance-energy i { background:#ee8d83; }
.glance-macros { display:flex; justify-content:space-between; gap:8px; font-size:11px; }
.glance-macros b { color:var(--macro-color); font-weight:600; }
.glance-macro-goal { color:#8f988b; font-size:10px; }
.glance-over { font-size:10px; color:#efaaa2; text-align:right; }
.calendar-grip { min-width:44px; width:44px; touch-action:none; }
.calendar-meal-body { cursor:grab; user-select:none; }
.calendar-meal.is-saving { border-style:dashed; }
.calendar-meal.is-saving::after { content:''; position:absolute; right:7px; top:-4px; width:7px; height:7px; border-radius:50%; background:var(--lime); box-shadow:0 0 0 3px var(--bg); }
.calendar-meal.is-dragging { z-index:15; cursor:grabbing; will-change:top,left; }
.calendar-meal.is-dragging .calendar-meal-body { cursor:grabbing; }
.calendar-meal-body { overflow:hidden; }
button:focus-visible,input:focus-visible,textarea:focus-visible { outline:2px solid var(--lime); outline-offset:3px; }
.text-button { min-height:44px; }
@media(max-width:900px) { .progress-grid { grid-template-columns:1fr; } }
@media(max-width:730px) {
 .workspace-heading { align-items:flex-start; flex-wrap:wrap; gap:18px; margin-top:8px; }
 .workspace-heading h1 { font-size:29px; }
 .workspace-heading .range-control { width:100%; }
 .range-control button { flex:1; }
 .progress-grid { gap:16px; }
 .progress-stat { font-size:34px; }
 .progress-photo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .progress-macros { gap:10px; font-size:11px; }
 .today-glance.nutrition-glance { width:220px; padding:9px 10px; gap:6px; border-radius:14px; }
 .glance-heading { font-size:10px; gap:4px; }
 .glance-macro-goal { display:none; }
 .glance-macros { font-size:10px; }
 .entry-home .home-entry { margin-top:60px; }
 .calendar-grip { min-width:44px; width:44px; }
 #builder-items .ingredient-numbers { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .weight-entry input { font-size:40px; }
 .dialog-actions { flex-wrap:wrap; }
 .ingredient-search { flex-wrap:wrap; }
}
@media(max-width:360px) { .today-glance.nutrition-glance { width:190px; } .glance-heading .icon { display:none; } }
@media(prefers-reduced-motion:reduce) { .glance-energy i { transition:none; } .calendar-meal.is-dragging { transform:none; } }
.saved-search { flex-direction:row; }
.saved-grid { align-items:start; }
.saved-card { gap:8px; }
.saved-card .saved-ingredients { margin:4px 0 10px; min-height:0; }
.saved-card .saved-nutrition { margin-bottom:12px; }
.saved-card .primary { margin-top:0; }
.photo-frame .photo-loading .nibb-mark { width:22px; height:22px; }
:is(#quick-description, .startup-input):focus-visible { outline:none; }
.confirmation-dialog { max-width:420px; }
.confirmation-dialog>p { margin:16px 0; color:var(--muted); }
@media(max-width:730px) {
 .today-glance.nutrition-glance>.glance-heading { display:flex; }
 .today-glance.nutrition-glance { border:1px solid #323b2b; background:#1c211b; }
 .glance-heading>span:first-child { display:none; }
 .saved-card { padding:22px; }
}
.progress-grid>.panel>.panel-title:first-child { min-height:44px; }
.select-error { display:block; color:#efaaa2; font-size:12px; margin-top:6px; }
.select-trigger[aria-invalid=true] { border-color:#efaaa2; }
.template-activity { display:flex; align-items:center; gap:12px; padding:16px 18px; margin-bottom:16px; border:1px solid var(--line); border-radius:16px; background:#242b21; }
.template-activity>span { flex:1; font-size:13px; }
.template-activity .nibb-mark { flex:0 0 22px; }
#toast:not(:has(button)) { pointer-events:none; }
@media(max-width:730px) {
 body:has(.entry-home) #toast { bottom:calc(var(--entry-dock-height,220px) + var(--mobile-nav-height,65px) + var(--keyboard-inset,0px) + 24px); width:max-content; max-width:calc(100vw - 32px); }
 .keyboard-compact body:has(.entry-home) #toast { top:8px; bottom:auto; }
}
.startup-total { width:290px; height:76px; border-radius:18px; }
@media(max-width:730px) { .startup-total { width:220px; height:62px; border-radius:14px; } }
@media(max-width:360px) { .startup-total { width:190px; } }

/* Shared, quiet nutrition header. Its height is independent of calorie totals. */
.global-glance { min-width:0; }
.nutrition-glance { display:flex; align-items:center; gap:22px; min-height:48px; width:440px; max-width:100%; padding:8px 0; border:0; border-radius:8px; background:transparent; text-align:left; color:var(--text); }
.nutrition-glance:hover { background:#ffffff03; }
.glance-calories { flex:1; min-width:0; }
.glance-heading { display:flex; justify-content:flex-start; gap:5px; font-size:12px; white-space:nowrap; }
.glance-heading>span:first-child { display:inline; margin-right:6px; color:#b7bcb2; }
.glance-heading strong { font-size:14px; color:#f0f2eb; font-weight:600; }
.glance-heading>span:last-child { color:#91988b; font-size:11px; }
.glance-energy { display:block; height:3px; margin-top:7px; background:#ffffff0d; overflow:hidden; border-radius:4px; }
.glance-energy i { display:block; height:100%; background:var(--lime); border-radius:inherit; }
.nutrition-glance.is-over .glance-energy i { background:#ee8d83; }
.glance-macros { display:flex; flex:none; gap:13px; }
.glance-macro { display:flex; flex-direction:column; min-width:42px; gap:7px; }
.glance-macro>span:first-child { display:flex; justify-content:space-between; gap:5px; align-items:baseline; font-size:11px; }
.glance-macro b { color:var(--macro-color); font-weight:500; }
.glance-macro strong { font-weight:500; color:#cbd0c5; }
.glance-macro small { font-size:9px; color:#8c9585; margin-left:1px; }
.glance-macro-track { display:block; height:3px; background:#ffffff0d; border-radius:3px; overflow:hidden; }
.glance-macro-track i { display:block; height:100%; background:var(--macro-color); border-radius:inherit; }
.nutrition-glance>.icon { width:14px; height:14px; color:#737e6c; flex:none; }
.global-glance .startup-total { width:440px; max-width:100%; height:48px; border-radius:8px; }
.topbar { gap:24px; }
.topbar>.mobile-brand { order:-1; }
@media(max-width:1000px) and (min-width:731px) { .top-actions .quick-log-button { display:none; } .nutrition-glance { width:390px; gap:14px; } }
@media(max-width:730px) {
 .topbar { display:flex; flex-wrap:wrap; gap:16px; margin-bottom:28px; }
 .topbar>.mobile-brand { display:flex; font-size:25px; }
 .topbar>.top-actions { margin-left:auto; }
 .global-glance { order:2; flex:0 0 100%; }
 .nutrition-glance { width:100%; min-height:44px; gap:15px; }
 .glance-heading { font-size:11px; gap:4px; }
 .glance-heading>span:first-child { display:inline; margin-right:4px; }
 .glance-heading strong { font-size:13px; }
 .glance-heading>span:last-child { font-size:10px; }
 .glance-macros { gap:9px; }
 .glance-macro { min-width:35px; }
 .glance-macro>span:first-child { font-size:10px; gap:3px; }
 .global-glance .startup-total { width:100%; height:44px; }
 .entry-home .home-entry { margin-top:30px; }
}
@media(max-width:360px) { .nutrition-glance { gap:10px; } .nutrition-glance>.icon { display:none; } .glance-macro { min-width:31px; } .glance-macros { gap:7px; } .glance-heading>span:first-child { font-size:10px; margin-right:0; } }
/* Inputs get one focus treatment, not an outline plus a second shadow ring. */
input:focus-visible,textarea:focus-visible,.select-trigger:focus-visible { outline:none; border-color:var(--lime); box-shadow:none; }

/* Onboarding is its own page, with no dashboard or dialog chrome. */
body.is-onboarding { background:#121512; }
body.is-onboarding #app { display:none; }
.onboarding-screen { min-height:100svh; color:var(--text); padding:30px 40px max(40px,env(safe-area-inset-bottom)); background:radial-gradient(ellipse at 50% -250px,#b5d9700b,transparent 75%); }
.setup-header { max-width:1280px; margin:auto; display:flex; justify-content:space-between; align-items:center; }
.setup-header .brand { font-size:30px; }
.setup-later { display:flex; align-items:center; gap:12px; min-height:44px; border:0; background:none; color:#90998a; font-size:12px; }
.setup-later .icon { width:16px; }
.setup-content { max-width:540px; margin:64px auto 0; }
.setup-progress { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; margin-bottom:32px; color:#829077; font-size:10px; letter-spacing:1.5px; }
.setup-progress>div { width:100%; height:3px; background:#262d24; border-radius:3px; overflow:hidden; }
.setup-progress i { display:block; height:100%; background:#c7e88c; }
.setup-content h1 { font-size:38px; line-height:1.12; letter-spacing:-1.4px; max-width:510px; font-weight:600; outline:0; }
.setup-subtitle { color:#939d8d; font-size:14px; line-height:1.65; margin:16px 0 30px; max-width:460px; }
.setup-choices { border:0; padding:0; margin:0; display:grid; gap:10px; min-width:0; }
.setup-choice { position:relative; display:flex; flex-direction:row; align-items:center; gap:18px; min-height:88px; padding:18px; border:1px solid #323a2e; border-radius:16px; background:#1a2018; cursor:pointer; transition:background .15s,border-color .15s; }
.setup-choice:has(:checked) { border-color:#b6d982; background:#252f20; }
.setup-choice:hover { border-color:#71825b; }
.setup-choice input,.setup-units input,.setup-health-row input { position:absolute; width:1px; height:1px; opacity:0; padding:0; margin:0; }
.setup-choice:has(:focus-visible),.setup-units label:has(:focus-visible),.setup-health-row label:has(:focus-visible) { outline:2px solid var(--lime); outline-offset:3px; }
.setup-choice-icon { width:38px; height:38px; display:grid; place-items:center; color:#a8b89a; flex:none; }
.setup-choice-icon .icon { width:26px; height:26px; }
.setup-choice:has(:checked) .setup-choice-icon { color:#d0efa4; }
.setup-choice-copy { flex:1; }
.setup-choice-copy strong { display:block; font-size:15px; font-weight:500; color:#e6eadf; }
.setup-choice-copy small { display:block; margin-top:6px; color:#929f86; font-size:12px; line-height:1.5; }
.setup-choice-check { width:20px; height:20px; border:1px solid #4d5844; border-radius:50%; flex:none; display:grid; place-items:center; }
.setup-choice-check .icon { width:13px; height:13px; opacity:0; }
.setup-choice:has(:checked) .setup-choice-check { background:var(--lime); color:#283319; border-color:var(--lime); }
.setup-choice:has(:checked) .setup-choice-check .icon { opacity:1; }
.setup-footer { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-top:30px; padding-top:22px; border-top:1px solid #ffffff0b; }
.setup-continue { min-width:190px; min-height:50px; border-radius:13px; font-size:14px; justify-content:center; }
.setup-back { border:0; background:none; color:#b7c2ab; display:flex; align-items:center; gap:6px; min-height:48px; font-size:13px; }
.setup-back .icon { width:16px; }
.setup-time { font-size:11px; color:#7f8b73; }
.setup-field { display:flex; flex-direction:column; gap:10px; font-size:12px; color:#b4bfaa; margin-top:24px; }
.setup-field .select-trigger { min-height:54px; border-radius:12px; background:#1e241b; border-color:#3b4633; padding:15px 17px; }
.setup-field .select-trigger:focus-visible { outline:none; border-color:var(--lime); box-shadow:none; }
.setup-hint { font-size:12px; color:#85917c; line-height:1.65; margin:14px 0 0; }
.setup-measure { padding:8px 0 20px; }
.setup-units { display:flex; width:max-content; border:1px solid #394330; border-radius:12px; padding:4px; margin:0 auto 26px; gap:4px; }
.setup-units label { position:relative; cursor:pointer; border-radius:8px; }
.setup-units span { display:grid; place-items:center; width:62px; height:36px; font-size:12px; color:#99a68d; border-radius:8px; }
.setup-units label:has(:checked) span { background:#39462d; color:#e5f5cc; }
.setup-number { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:26px auto 34px; }
.setup-number>label { display:flex; flex-direction:row; align-items:baseline; justify-content:center; gap:8px; min-width:0; }
.setup-number input { width:210px; max-width:100%; min-width:0; text-align:center; font-size:72px; line-height:1.2; font-weight:500; letter-spacing:-3px; color:#eef4e4; font-variant-numeric:tabular-nums; border:0; background:transparent; padding:0; box-shadow:none; appearance:textfield; -moz-appearance:textfield; border-radius:8px; }
.setup-number input::-webkit-inner-spin-button,.setup-number input::-webkit-outer-spin-button { appearance:none; margin:0; }
.setup-number input:focus-visible { box-shadow:none; outline:2px solid #b6d982; outline-offset:4px; }
.setup-number label>span:last-child { color:#9aa78c; font-size:16px; }
.setup-number>button { border:1px solid #3e4935; width:44px; height:44px; flex:none; border-radius:50%; background:#1f271a; color:#c4d6ad; font-size:22px; }
.setup-ruler { position:relative; height:68px; margin:0 4px; }
.setup-ruler-ticks { position:absolute; inset:12px 0; background:repeating-linear-gradient(90deg,#647453 0 1px,transparent 1px 10px); mask-image:linear-gradient(90deg,transparent,#000 15% 85%,transparent); }
.setup-ruler input { position:relative; appearance:none; display:block; margin:0; width:100%; height:68px; padding:0; background:transparent; cursor:ew-resize; border:0; box-shadow:none; accent-color:var(--lime); }
.setup-ruler input::-webkit-slider-runnable-track { height:3px; background:#566846; border-radius:3px; }
.setup-ruler input::-webkit-slider-thumb { appearance:none; width:16px; height:56px; margin-top:-26px; background:#c9ec95; border:5px solid #121512; border-radius:8px; box-shadow:none; }
.setup-ruler input::-moz-range-track { height:3px; background:#566846; }
.setup-ruler input::-moz-range-thumb { width:6px; height:46px; background:#c9ec95; border:5px solid #121512; border-radius:8px; }
.setup-measure>.setup-hint { text-align:center; }
.setup-height-note { text-align:center; color:#b0bf9e; font-size:14px; }
.setup-health { border:0; border-top:1px solid #30382a; padding:24px 0 0; margin:28px 0 0; min-width:0; }
.setup-health>legend { float:left; width:100%; font-size:15px; font-weight:500; margin-bottom:8px; }
.setup-health>p { color:#839176; font-size:12px; line-height:1.6; clear:both; }
.setup-health-row { border:0; border-top:1px solid #ffffff09; padding:18px 0; margin:0; display:flex; justify-content:space-between; gap:20px; min-width:0; }
.setup-health-row legend { float:left; max-width:65%; font-size:13px; color:#c7d0be; line-height:1.5; }
.setup-health-row>div { display:flex; gap:5px; }
.setup-health-row label { position:relative; cursor:pointer; border-radius:9px; }
.setup-health-row span { display:grid; place-items:center; width:44px; height:40px; border:1px solid #3a4432; border-radius:9px; color:#9aa98c; font-size:12px; }
.setup-health-row label:has(:checked) span { border-color:#b6d982; color:#ddf2bc; background:#293820; }
.setup-plan { border:1px solid #526342; border-radius:24px; background:#222d1b; padding:32px; text-align:center; }
.setup-plan-label { font-size:12px; color:#aabc96; }
.setup-plan-energy { display:flex; justify-content:center; align-items:baseline; gap:10px; margin:18px 0 30px; }
.setup-plan-energy strong { font-size:68px; letter-spacing:-3px; line-height:1; color:#e6facb; font-weight:500; }
.setup-plan-energy>span { font-size:13px; color:#acbf96; }
.setup-plan-macros { display:flex; justify-content:space-around; padding-top:22px; border-top:1px solid #bde29020; }
.setup-plan-macros>div { display:flex; flex-direction:column; align-items:center; gap:8px; }
.setup-plan-macros i { width:24px; height:3px; background:var(--macro-color); border-radius:4px; }
.setup-plan-macros strong { font-size:23px; font-weight:500; }
.setup-plan-macros small { font-size:13px; margin-left:2px; color:#a3b593; }
.setup-plan-macros span { font-size:11px; color:#a3b593; }
.setup-plan-note { font-size:14px; color:#b0bfa3; line-height:1.7; margin:26px 0 0; }
.setup-plan-review { border-top:1px solid #394631; padding-top:24px; }
.setup-plan-review h2 { font-size:24px; margin:16px 0; }
.setup-plan-review p { line-height:1.7; color:#a9b79c; }
@media(max-width:730px) {
 .onboarding-screen { padding:20px 22px max(26px,env(safe-area-inset-bottom)); }
 .setup-header .brand { font-size:26px; }
 .setup-content { margin-top:44px; }
 .setup-content h1 { font-size:32px; letter-spacing:-1px; }
 .setup-subtitle { font-size:13px; margin:14px 0 24px; }
 .setup-progress { margin-bottom:26px; }
 .setup-choice { padding:14px 12px; gap:10px; min-height:83px; }
 .setup-choice-icon { width:28px; }
 .setup-choice-copy strong { font-size:14px; }
 .setup-choice-copy small { font-size:11px; }
 .setup-footer { gap:12px; margin-top:24px; }
 .setup-continue { min-width:164px; }
 .setup-time { max-width:100px; line-height:1.5; }
 .setup-number { gap:10px; }
 .setup-number input { width:155px; font-size:58px; letter-spacing:-2px; }
 .setup-number label>span:last-child { font-size:14px; }
 .setup-health-row { gap:10px; }
 .setup-health-row legend { max-width:60%; font-size:12px; }
 .setup-plan { padding:28px 18px; }
}
@media(max-width:360px) { .onboarding-screen { padding-left:18px; padding-right:18px; } .setup-number input { width:128px; font-size:50px; } .setup-number label>span:last-child { font-size:12px; } .setup-continue { min-width:152px; } }
@media(prefers-reduced-motion:reduce) { .setup-choice { transition:none; } }

.setup-ruler input:focus-visible { outline:2px solid var(--lime); outline-offset:4px; border-radius:8px; }

.setup-feet-inches { display:flex; align-items:baseline; justify-content:center; gap:20px; min-width:0; }
.setup-feet-inches label { display:flex; flex-direction:row; align-items:baseline; gap:10px; min-width:0; }
.setup-feet-inches input { width:110px; }
.setup-feet-inches label:first-child input { width:70px; }
.setup-feet-inches label>span:last-child { font-size:16px; color:#9aa78c; }
@media(max-width:730px) { .setup-height-imperial { gap:8px; } .setup-feet-inches { gap:9px; } .setup-feet-inches input { width:88px; font-size:46px; } .setup-feet-inches label:first-child input { width:44px; } .setup-feet-inches label>span:last-child { font-size:13px; } }
@media(max-width:360px) { .setup-feet-inches { gap:10px; } .setup-feet-inches input { width:75px; font-size:40px; } .setup-feet-inches label:first-child input { width:34px; } .setup-height-imperial>button { width:40px; height:44px; } }

/* One two-bar summary at every size; smaller beside the mobile wordmark. */
.nutrition-glance { width:280px; min-height:56px; padding:0; }
.glance-bars { display:flex; flex-direction:column; gap:5px; width:100%; min-width:0; }
.glance-summary-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; line-height:18px; white-space:nowrap; }
.glance-summary-heading strong { font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; }
.glance-summary-heading small { font-size:11px; color:var(--muted); }
.glance-summary-heading>.icon { width:12px; height:12px; flex:none; color:var(--muted); }
.glance-caloriebar { width:100%; height:4px; margin:0; flex:none; }
.glance-macrobar { display:flex; gap:3px; width:100%; height:4px; border-radius:4px; overflow:hidden; background:#ffffff0d; }
.glance-macrobar i { flex-basis:0; min-width:0; height:100%; background:var(--macro-color); border-radius:4px; }
.glance-macrobar i[data-empty=true] { display:none; }
.glance-labels { display:flex; justify-content:space-between; align-items:center; gap:9px; line-height:14px; }
.glance-labels>span { display:flex; align-items:baseline; gap:4px; white-space:nowrap; font-size:11px; }
.glance-labels b { color:var(--macro-color); font-weight:500; }
.glance-labels strong { color:var(--text); font-weight:500; font-variant-numeric:tabular-nums; }
.glance-labels small { margin-left:1px; color:var(--muted); font-size:10px; }
.global-glance .startup-total { width:280px; height:56px; }
.topbar,.entry-home .topbar { margin-bottom:30px; }
.topbar>.header-avatar { display:grid; place-items:center; flex:none; margin-left:auto; width:44px; height:44px; padding:0; border:1px solid var(--line); border-radius:50%; background-color:var(--panel2); color:var(--text); font-size:14px; font-weight:550; }
.topbar>button.header-avatar:hover { background-color:#303334; border-color:#484b4c; }
.topbar>button.header-avatar:focus-visible { outline:2px solid var(--lime); outline-offset:3px; }
@media(max-width:730px) { .topbar>.header-avatar { display:none; } }
@media(max-width:730px) {
 .topbar,.entry-home .topbar { display:flex; flex-wrap:nowrap; gap:12px; align-items:center; margin-bottom:28px; }
 .topbar>.mobile-brand { display:flex; flex:none; gap:6px; font-size:25px; letter-spacing:-1px; }
 .topbar>.mobile-brand .nibb-mark { width:23px; height:23px; flex-basis:23px; }
 .global-glance { order:0; flex:0 1 180px; width:180px; margin-left:auto; }
 .nutrition-glance { width:100%; padding:0; min-height:44px; }
 .glance-bars { gap:3px; }
 .glance-summary-heading { gap:6px; line-height:14px; }
 .glance-summary-heading strong { font-size:12px; }
 .glance-summary-heading small { font-size:10px; }
 .glance-summary-heading>.icon { width:10px; height:10px; }
 .glance-caloriebar { height:3px; }
 .glance-macrobar { gap:2px; height:3px; }
 .glance-labels { gap:7px; line-height:11px; }
 .glance-labels>span { font-size:10px; }
 .glance-labels small { font-size:9px; }
 .global-glance .startup-total { width:180px; height:44px; }

}
@media(max-width:360px) { .topbar,.entry-home .topbar { gap:8px; } .glance-labels { gap:5px; } .glance-labels>span { gap:3px; } .topbar>.mobile-brand { font-size:23px; } }
/* Keep the header for ordinary short screens; make room only for an open keyboard. */
@media(max-height:560px) and (max-width:730px) { .entry-home .topbar { display:flex; } .keyboard-open .entry-home .topbar { display:none; } }

/* Desktop and tablet keep today's summary in the shared sidebar. */
@media(min-width:731px) {
 .sidebar { overflow-y:auto; }
 .sidebar-bottom { flex-shrink:0; }
 .topbar { min-height:56px; }
 .topbar .global-glance, .entry-home .topbar { display:none; }
 .sidebar-glance { width:100%; margin:16px 0; padding:0 8px; }
 .sidebar-glance .nutrition-glance { width:100%; min-height:44px; }
 .sidebar-glance .glance-summary-heading { gap:6px; line-height:14px; }
 .sidebar-glance .glance-summary-heading strong { font-size:12px; }
 .sidebar-glance .glance-summary-heading small { font-size:10px; }
 .sidebar-glance .glance-caloriebar { height:3px; }
 .sidebar-glance .glance-macrobar { gap:2px; height:3px; }
 .sidebar-glance .glance-labels { gap:7px; line-height:11px; }
 .sidebar-glance .glance-labels>span { font-size:10px; }
 .sidebar-glance .glance-labels small { font-size:9px; }
 .sidebar-glance .startup-total { width:100%; height:44px; }
}
@media(min-width:731px) and (max-width:950px) {
 .sidebar { width:190px; padding:30px 15px; }
 .sidebar .brand { justify-content:flex-start; padding-left:15px; font-size:32px; }
 .sidebar .tagline, .sidebar .nav span, .sidebar-bottom { display:block; }
 .sidebar .nav button { justify-content:flex-start; padding:14px 17px; }
 .main { margin-left:190px; }
}

/* Settings starts with the plan; exact fields appear when requested. */
.mobile-page-title { display:none; }
.saved-toolbar { display:flex; align-items:center; gap:12px; margin-bottom:24px; }
.saved-toolbar .saved-search { flex:1; min-width:0; margin:0; }
.saved-toolbar .saved-create { flex:none; min-height:44px; }
@media(max-width:730px) {
 .topbar>.mobile-page-title { display:flex; align-items:center; gap:6px; order:-1; flex:1; min-width:0; margin:0; font-size:26px; line-height:44px; letter-spacing:-.8px; font-weight:600; }
 .mobile-page-title .nibb-mark { width:23px; height:23px; flex:none; }
 .desktop-page-heading { display:none; }
 .topbar .global-glance { flex:0 0 180px; }
 .log-toolbar { flex-wrap:nowrap; }
 .log-date-actions { width:100%; gap:6px; }
 .log-date-actions .day-navigation { min-width:0; gap:2px; }
 .log-date-actions .date-control { grid-template-columns:32px minmax(0,1fr) 32px; min-width:0; }
 .log-date-actions .date-label { white-space:nowrap; gap:4px; }
 .log-date-actions .today-button { min-width:48px; padding:0 5px; }
 .log-date-actions .date-control button, .log-date-actions .today-button { height:44px; min-height:44px; }
 .log-date-actions .log-add-button { flex:none; width:44px; height:44px; padding:0; justify-content:center; }
 .log-date-actions .log-add-button span, .log-day-total { display:none; }
 .log-workspace .day-calendar { height:clamp(280px,calc(100dvh - 223px),900px); }
 .stats-heading { flex-direction:column-reverse; gap:10px; margin:0 0 20px; }
 .stats-heading p { margin:0; font-size:12px; }
 .saved-toolbar { gap:8px; margin-bottom:20px; }
 .saved-toolbar .saved-search { max-width:none; gap:8px; }
 .saved-create { width:44px; height:44px; padding:0; justify-content:center; }
 .saved-create span { display:none; }
}
@media(max-width:360px) {
 .topbar>.mobile-page-title { font-size:20px; letter-spacing:-.7px; gap:5px; }
 .mobile-page-title .nibb-mark, .topbar>.mobile-brand .nibb-mark { width:20px; height:20px; flex-basis:20px; }
 .topbar .global-glance { width:160px; flex-basis:160px; }
 .global-glance .startup-total { width:160px; }
}
.settings-heading { margin-bottom:26px; }
.preferences-layout { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(250px,1fr); gap:20px; max-width:1100px; }
.target-studio { padding:28px; }
.targets-topline { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:26px; }
.settings-eyebrow { font-size:10px; letter-spacing:1.6px; color:var(--muted); }
.target-method { font-size:10px; color:var(--muted); }
.targets-head { display:flex; justify-content:space-between; gap:20px; align-items:center; }
.targets-head h2,.target-studio>h2,.targets-topline h2 { font-size:25px; font-weight:500; line-height:1.25; letter-spacing:-.6px; }
.targets-head p { margin:8px 0 0; color:var(--muted); font-size:12px; }
.target-mark { display:grid; place-items:center; width:54px; height:54px; flex:none; border:1px solid var(--line); border-radius:18px; transform:rotate(7deg); }
.target-mark img { width:34px; height:34px; transform:rotate(-7deg); }
.target-calories { display:flex; align-items:baseline; gap:9px; flex-wrap:wrap; margin:28px 0 20px; }
.target-calories>strong { font-size:58px; line-height:1; font-weight:500; letter-spacing:-2px; color:var(--text); }
.target-calories>span { font-size:12px; color:var(--muted); }
.target-edit-link { margin-left:auto; display:flex; align-items:center; gap:5px; background:none; border:0; font-size:12px; color:var(--lime); min-height:44px; }
.target-edit-link .icon { width:15px; }
.target-distribution { display:flex; gap:4px; height:7px; width:100%; overflow:hidden; border-radius:5px; }
.target-distribution i { display:block; height:100%; background:var(--macro-color); border-radius:4px; }
.target-macro-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:20px 0 26px; }
.target-macro { min-width:0; border:0; border-radius:12px; background:#ffffff04; padding:14px; text-align:left; }
.target-macro:hover { background:#ffffff09; }
.target-macro>span { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:11px; }
.target-macro i,.target-macro-inputs label>span>i { width:5px; height:5px; border-radius:50%; background:var(--macro-color); display:inline-block; }
.target-macro>strong { display:block; margin-top:12px; font-size:28px; font-weight:500; line-height:1; }
.target-macro small { font-size:12px; color:var(--muted); margin-left:3px; }
.target-plan-footer { border-top:1px solid var(--line); padding-top:17px; display:flex; justify-content:flex-end; align-items:center; gap:20px; }
.target-plan-footer>span { font-size:11px; line-height:1.6; color:var(--muted); max-width:230px; }
.target-plan-footer>button { flex:none; min-height:44px; display:flex; align-items:center; gap:6px; color:var(--lime); background:transparent; border:0; font-size:12px; }
.target-plan-footer .icon { width:14px; }
.profile-studio,.connection-studio,.journal-preferences { padding:26px; }
.profile-monogram { width:50px; height:50px; display:grid; place-items:center; border-radius:17px; background:var(--panel2); color:var(--text); font-size:24px; margin-bottom:18px; }
.profile-studio h2 { font-size:23px; font-weight:500; }
.profile-studio>p { font-size:12px; color:var(--muted); margin:8px 0 24px; }
.profile-facts { display:grid; gap:18px; margin:24px 0 26px; }
.preference-row { display:grid; gap:6px; }
.preference-row>span { font-size:11px; color:var(--muted); }
.preference-row strong { color:var(--text); font-size:12px; font-weight:400; overflow-wrap:anywhere; }
.profile-studio>.secondary { width:100%; justify-content:space-between; min-height:44px; font-size:12px; border-radius:12px; }
.settings-section-head { display:flex; align-items:flex-start; gap:13px; margin-bottom:24px; }
.settings-section-head h2 { font-size:16px; font-weight:500; letter-spacing:-.2px; }
.settings-section-head p { font-size:11px; color:var(--muted); margin:8px 0 0; line-height:1.6; }
.settings-section-icon { width:34px; height:34px; display:grid; place-items:center; background:#ffffff04; border-radius:10px; flex:none; color:var(--muted); }
.settings-section-icon .icon { width:18px; }
.connection-address { display:flex; align-items:center; gap:14px; border:1px solid var(--line); border-radius:12px; padding:10px 13px; background:var(--bg); }
.connection-address code { min-width:0; flex:1; overflow-wrap:anywhere; font-size:11px; color:var(--muted); }
.connection-address button { flex:none; border:0; background:none; color:var(--lime); font-size:11px; min-height:34px; }
.connection-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-top:14px; }
.connection-footer .text-button { font-size:11px; }
.connection-footer>span { font-size:9px; color:var(--muted); }
.linked-client { display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-top:1px solid #ffffff0b; margin-top:12px; }
.linked-client span { display:flex; align-items:center; gap:7px; font-size:11px; }
.linked-client .icon { width:14px; color:var(--lime); }
.linked-client button { border:0; background:none; color:var(--muted); font-size:10px; min-height:44px; }
.connection-error { font-size:11px; color:#c3a07b; line-height:1.5; }
.settings-action-row { display:flex; align-items:center; gap:12px; padding:16px 0; border:0; border-top:1px solid #ffffff0b; background:none; width:100%; text-align:left; color:var(--text); }
.settings-action-row>span { flex:1; font-size:12px; }
.settings-action-row small { display:block; margin-top:7px; color:var(--muted); font-size:10px; line-height:1.5; }
.settings-action-row>.icon { width:16px; flex:none; }
.target-edit-description { color:var(--muted); font-size:12px; line-height:1.6; margin:12px 0 24px; }
.target-energy-editor>label { font-size:11px; color:var(--muted); margin-bottom:12px; }
.target-energy-editor>div { display:flex; align-items:center; gap:12px; }
.target-energy-editor input { width:150px; min-width:0; flex:1; border:0; background:none; font-size:48px; font-variant-numeric:tabular-nums; color:var(--text); padding:0; box-shadow:none; letter-spacing:-1px; }
.target-energy-editor>div>span { color:var(--muted); font-size:13px; margin-right:auto; }
.target-energy-editor button { width:38px; height:44px; flex:none; border-radius:12px; border:1px solid var(--line); background:none; color:var(--text); font-size:20px; }
.target-macro-inputs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:24px 0; }
.target-macro-inputs>label { min-width:0; border:1px solid #ffffff10; background:#ffffff03; padding:13px; border-radius:13px; }
.target-macro-inputs label>span:first-child { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:11px; }
.macro-input-value { display:flex; align-items:baseline; gap:3px; }
.macro-input-value input { width:100%; min-width:0; padding:0; background:none; border:0; font-size:28px; color:var(--text); box-shadow:none; }
.macro-input-value>span { font-size:12px; color:var(--muted); }
.macro-step-buttons { display:flex; justify-content:space-between; gap:6px; }
.macro-step-buttons button { flex:1; min-height:32px; color:var(--text); background:#ffffff04; border:1px solid #ffffff0a; border-radius:7px; font-size:17px; }
.target-energy-note { font-size:11px; color:var(--muted); margin:14px 0; line-height:1.5; }
.target-editor-actions { display:flex; justify-content:flex-end; margin-top:20px; }
.target-editor-actions .primary { min-height:46px; }
#target-editor input { appearance:textfield; -moz-appearance:textfield; }
#target-editor input::-webkit-inner-spin-button,#target-editor input::-webkit-outer-spin-button { appearance:none; }
#target-editor input:focus-visible { outline:2px solid var(--lime); outline-offset:3px; border-radius:5px; }
@media(max-width:1050px) { .preferences-layout { grid-template-columns:1fr; max-width:700px; } .profile-studio { display:grid; grid-template-columns:auto 1fr auto; column-gap:18px; align-items:center; } .profile-monogram { grid-row:1; margin:0; } .profile-facts { grid-column:1/-1; display:flex; gap:32px; margin:24px 0 0; grid-row:2; } .profile-studio>.secondary { grid-column:3; grid-row:1; width:auto; gap:18px; } }
@media(max-width:730px) {
 .preferences-layout { gap:16px; }
 .target-studio,.profile-studio,.connection-studio,.journal-preferences { padding:18px; border-radius:20px; }
 .targets-topline { margin-bottom:16px; gap:10px; }
 .settings-eyebrow,.target-method { font-size:10px; }
 .targets-head h2,.targets-topline h2 { font-size:23px; }
 .targets-head>div { min-width:0; }
 .targets-head h2 { overflow-wrap:anywhere; }
 .target-mark { display:none; }
 .target-calories { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 8px; margin:20px 0 18px; }
 .target-calories>strong { grid-column:1; grid-row:1; font-size:44px; }
 .target-calories>span { grid-column:1; grid-row:2; }
 .target-edit-link { grid-column:2; grid-row:1/3; margin:0; align-self:center; font-size:12px; white-space:nowrap; }
 .target-macro-grid { gap:8px; margin:16px 0; }
 .target-macro { padding:12px 8px; min-height:78px; }
 .target-macro>strong { margin-top:10px; font-size:clamp(20px,6vw,25px); }
 .target-macro small { font-size:10px; margin-left:2px; }
 .target-plan-footer { padding-top:8px; }
 .target-plan-footer>button { width:100%; justify-content:space-between; font-size:13px; }
 .target-energy-editor>div { gap:8px; }
 .target-energy-editor input { width:0; font-size:clamp(32px,10vw,40px); }
 .target-energy-editor button { width:44px; }
 .target-macro-inputs { grid-template-columns:1fr; gap:0; margin:16px 0; }
 .target-macro-inputs>label { display:grid; grid-template-columns:minmax(0,1fr) 88px 92px; gap:8px; align-items:center; padding:12px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:none; }
 .target-macro-inputs label>span:first-child { gap:5px; font-size:12px; }
 .macro-input-value { gap:3px; }
 .macro-input-value input { min-height:44px; font-size:24px; letter-spacing:-.5px; }
 .macro-input-value>span { font-size:11px; }
 .macro-step-buttons { gap:4px; }
 .macro-step-buttons button { flex:none; width:44px; min-height:44px; border-color:var(--line); border-radius:10px; }
 .targets-topline [data-cancel-targets],#target-editor [data-latest-targets] { min-height:44px; font-size:13px; }
 .target-energy-note { font-size:12px; }
 .target-editor-actions .primary { width:100%; min-height:48px; }
 .profile-studio { grid-template-columns:44px minmax(0,1fr); column-gap:12px; }
 .profile-studio .profile-monogram { width:44px; height:44px; border-radius:14px; font-size:21px; }
 .profile-studio h2 { min-width:0; font-size:20px; overflow-wrap:anywhere; }
 .profile-facts { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr); gap:16px; margin:18px 0; }
 .profile-studio>.secondary { grid-column:1/-1; grid-row:3; width:100%; font-size:13px; white-space:nowrap; }
 .preference-row>span { font-size:12px; }
 .preference-row strong { font-size:13px; line-height:1.5; }
 .settings-section-head { margin-bottom:16px; gap:10px; }
 .settings-section-head>div { min-width:0; }
 .settings-section-head p { font-size:12px; }
 .connection-address { gap:8px; padding:8px 10px; }
 .connection-address button { min-width:72px; min-height:44px; font-size:12px; }
 .connection-footer { margin-top:8px; }
 .connection-footer .text-button { width:100%; min-height:44px; justify-content:space-between; font-size:13px; }
 .linked-client { gap:12px; }
 .linked-client>span { min-width:0; font-size:12px; overflow-wrap:anywhere; }
 .linked-client .icon { flex:none; }
 .linked-client button { flex:none; min-width:80px; font-size:12px; }
 .settings-action-row { min-height:52px; }
 .settings-action-row>span { font-size:14px; }
}
@media(max-width:360px) {
 .target-macro-inputs>label { grid-template-columns:minmax(0,1fr) 80px 92px; gap:7px; }
 .target-macro-inputs label>span:first-child { font-size:11px; }
 .macro-input-value input { font-size:22px; }
}

/* Setup: a personal plan taking shape, not an intake sheet. */
.onboarding-screen { background:#121512; padding:30px 40px 50px; }
.setup-layout { display:grid; grid-template-columns:minmax(280px,390px) minmax(0,540px); gap:clamp(40px,7vw,110px); max-width:1100px; margin:50px auto 0; align-items:start; }
.setup-content { margin:0; width:100%; max-width:540px; }
.setup-story { position:sticky; top:30px; border:1px solid #384330; background:#1d2618; border-radius:30px; padding:32px 28px 24px; overflow:hidden; }
.story-eyebrow { font-size:9px; letter-spacing:1.4px; color:#a5b592; margin:0 0 24px; }
.setup-story>h2 { font-size:42px; line-height:1.08; letter-spacing:-1.4px; font-weight:500; color:#e0edcf; }
.story-art { height:250px; position:relative; max-width:320px; margin:12px auto 0; }
.story-orbit { position:absolute; width:270px; height:185px; border:1px dashed #bbd39f40; border-radius:50%; top:28px; left:50%; transform:translateX(-50%) rotate(-20deg); }
.story-plate { width:154px; height:154px; border-radius:50%; background:#dfe8d1; position:absolute; top:48px; left:50%; transform:translateX(-50%) rotate(-14deg); box-shadow:6px 12px 0 #10180c40; display:grid; place-items:center; }
.story-plate-inner { width:124px; height:124px; border:2px solid #bcc9aa; border-radius:50%; display:grid; place-items:center; }
.story-plate img { width:78px; height:78px; filter:brightness(.64) saturate(.6); }
.story-food { position:absolute; width:53px; height:53px; border-radius:17px; display:grid; place-items:center; font-size:29px; z-index:2; }
.food-one { top:15px; left:14px; background:#718d52; transform:rotate(-12deg); }
.food-two { top:24px; right:9px; background:#9c6157; transform:rotate(14deg); }
.food-three { bottom:27px; left:14px; background:#af976d; transform:rotate(8deg); }
.food-four { bottom:22px; right:12px; background:#7785a3; transform:rotate(-10deg); }
.story-spark { position:absolute; color:#cde2b0; font-size:26px; }
.spark-one { left:70px; top:5px; }.spark-two { right:74px; bottom:7px; }
.story-caption { font-size:12px; text-align:center; color:#abb99d; line-height:1.6; margin:0 0 22px; }
.story-recap { display:grid; gap:0; }
.story-recap>button { display:grid; grid-template-columns:1fr auto; padding:13px 0; gap:6px; background:none; border:0; border-top:1px solid #bfd4a51a; text-align:left; }
.story-recap>button>span { font-size:9px; color:#869d72; }
.story-recap strong { font-size:12px; color:#cedfc0; font-weight:400; }
.story-recap .icon { width:13px; color:#a5be8d; grid-column:2; grid-row:1/3; align-self:center; }
.setup-progress { margin-bottom:24px; font-size:9px; justify-content:flex-end; }
.setup-content h1 + form { margin-top:28px; }
.setup-footer .setup-continue { margin-left:auto; }
.setup-content h1 { font-size:35px; max-width:490px; }
.setup-content:has([name=goalChoice]) .setup-choices { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.setup-content:has([name=goalChoice]) .setup-choice { display:grid; grid-template-columns:1fr auto; align-items:start; gap:12px; min-height:173px; padding:20px; }
.setup-content:has([name=goalChoice]) .setup-choice-icon { width:42px; height:42px; border-radius:13px; background:#ffffff06; }
.setup-content:has([name=goalChoice]) .setup-choice-copy { grid-row:2; grid-column:1/3; }
.setup-content:has([name=goalChoice]) .setup-choice-check { grid-column:2; grid-row:1; margin-top:8px; }
.setup-choice:has([value=steady]) .setup-choice-icon { color:#cbe699; background:#b7d88913; }
.setup-choice:has([value=faster]) .setup-choice-icon { color:#efc18c; background:#eabd8813; }
.setup-choice:has([value=maintain]) .setup-choice-icon { color:#aac4ec; background:#90b0e713; }
.setup-choice:has([value=muscle]) .setup-choice-icon { color:#c8b5e9; background:#be9ce013; }
.setup-footer { margin-top:25px; }
@media(max-width:1100px) and (min-width:851px) { .setup-layout { gap:32px; grid-template-columns:290px minmax(0,1fr); } .setup-story { padding:26px 22px; } .setup-story>h2 { font-size:35px; } .story-art { transform:scale(.88); margin-left:-15px; margin-right:-15px; } .setup-content h1 { font-size:31px; } }
@media(max-width:850px) { .setup-layout { display:block; margin:36px auto 0; max-width:540px; } .setup-story { display:none; } .setup-content { margin:0; } }
@media(max-width:730px) { .onboarding-screen { padding:20px 22px 32px; } .setup-layout { margin-top:32px; } .setup-content h1 { font-size:31px; } .setup-content:has([name=goalChoice]) .setup-choice { min-height:165px; padding:15px; gap:10px; } .setup-content:has([name=goalChoice]) .setup-choices { gap:10px; } .setup-content:has([name=goalChoice]) .setup-choice-copy strong { font-size:13px; } .setup-content:has([name=goalChoice]) .setup-choice-copy small { font-size:11px; } .setup-content:has([name=goalChoice]) .setup-choice-icon { width:36px; height:36px; } .setup-content:has([name=goalChoice]) .setup-choice-icon .icon { width:22px; } }
@media(max-width:360px) { .onboarding-screen { padding-left:18px; padding-right:18px; } .setup-content:has([name=goalChoice]) .setup-choice { padding:13px; min-height:180px; } }

#target-editor [hidden] { display:none!important; }

.setup-progress>div { height:4px; overflow:visible; }
.setup-progress i { position:relative; border-radius:4px; }
.setup-progress i::after { content:''; position:absolute; right:-8px; top:-7px; width:18px; height:18px; background:url('/logo.svg?v=corner-bite') center/contain no-repeat; }

/* A light sweep across active status text, without changing its layout. */
@supports ((background-clip:text) or (-webkit-background-clip:text)) {
 .entry-task.is-working .entry-task-copy strong {
  width:fit-content;
  max-width:100%;
  background:linear-gradient(90deg,#b1bca7 38%,#f4f8ec 50%,#b1bca7 62%);
  background-color:#b1bca7;
  background-size:200% 100%;
  background-repeat:no-repeat;
  background-clip:text;
  -webkit-background-clip:text;
  color:transparent;
  animation:nibb-status-shimmer 2.4s linear infinite;
 }
}
@keyframes nibb-status-shimmer {
 0%,12% { background-position:150% 0; }
 88%,100% { background-position:-50% 0; }
}
@media(prefers-reduced-motion:reduce) {
 .entry-task.is-working .entry-task-copy strong { animation:none; background:none; color:#d1d9c9; }
}

/* Meal editor: only the food area scrolls; the actions always stay in reach. */
#modal.meal-editor { width:min(700px,calc(100% - 32px)); max-height:min(850px,calc(100dvh - 48px)); padding:0; overflow:hidden; border-color:#393c3d; background:var(--panel); border-radius:24px; }
#modal.meal-editor[open] { display:flex; flex-direction:column; }
.meal-editor>.modal-head { flex:none; padding:12px 22px 12px 26px; margin:0; border-bottom:1px solid var(--line); }
.meal-editor>.modal-head h2 { font-size:15px; font-weight:550; letter-spacing:-.2px; }
.meal-editor>.modal-head .circle-button { width:44px; height:44px; border:0; background:none; color:var(--muted); }
.meal-editor-form { display:flex; flex-direction:column; flex:0 1 auto; min-height:0; overflow:hidden; }
.meal-editor-body { flex:1 1 auto; min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#464b49 transparent; scroll-padding:20px; padding:22px 26px 24px; margin:0; border:0; }
.meal-editor-title { display:block; }
.meal-editor-title textarea { width:100%; display:block; min-height:30px; max-height:120px; padding:0 0 7px; border:0; border-bottom:1px solid transparent; border-radius:0; background:none; resize:none; overflow:auto; font-size:24px; line-height:1.25; font-weight:550; letter-spacing:-.6px; }
.meal-editor-title textarea:hover { border-bottom-color:var(--line); }
.meal-editor-title textarea:focus { border-bottom-color:var(--lime); }
.meal-editor-summary { display:flex; justify-content:space-between; align-items:center; gap:20px; margin:17px 0; font-variant-numeric:tabular-nums; }
.meal-editor-energy { display:flex; align-items:baseline; gap:6px; }
.meal-editor-energy>strong { font-size:38px; line-height:1; font-weight:550; letter-spacing:-1.4px; }
.meal-editor-energy>span { font-size:12px; color:var(--muted); }
.meal-editor-macros { display:flex; gap:24px; }
.meal-editor-macros>span { display:flex; flex-direction:column; gap:5px; min-width:44px; }
.meal-editor-macros small { font-size:11px; color:var(--nutrient-color); }
.meal-editor-macros strong { font-size:18px; font-weight:500; }
.meal-editor-macros strong>span { margin-left:2px; font-size:11px; color:var(--muted); }
.meal-timing { border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.meal-timing summary,.meal-notes summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:9px; min-height:44px; font-size:12px; color:var(--muted); }
.meal-timing summary::-webkit-details-marker,.meal-notes summary::-webkit-details-marker { display:none; }
.meal-timing summary>.icon { width:15px; height:15px; flex:none; }
.meal-time-copy { flex:1; }
.meal-timing summary>.icon:last-child,.meal-notes summary>.icon { margin-left:auto; transition:transform .15s ease; }
.meal-timing[open] summary>.icon:last-child,.meal-notes[open] summary>.icon { transform:rotate(180deg); }
.meal-timing-fields { display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:10px; padding:6px 0 16px; }
.meal-timing-fields input,.meal-timing-fields .select-trigger { width:100%; min-height:44px; font-size:14px; padding:9px 10px; border-color:var(--line); }
.meal-timing-fields label { min-width:0; }
.meal-food-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:16px 0 8px; }
.meal-food-heading h3 { display:flex; align-items:center; gap:8px; font-size:14px; font-weight:550; }
#meal-item-count { display:inline-grid; place-items:center; background:var(--panel2); color:var(--muted); border-radius:6px; min-width:22px; height:22px; font-size:11px; font-weight:400; }
.meal-food-heading button { min-height:44px; padding:0 5px; font-size:12px; }
.meal-food-heading .icon { width:16px; }
.meal-editor #meal-ingredients { display:grid; gap:12px; }
.meal-editor .meal-food-card { border:1px solid #343839; border-radius:16px; padding:12px 14px 13px; background:#1a1c1d; min-width:0; }
.meal-editor .ingredient-head { margin:0 0 9px; gap:7px; }
.meal-food-emoji { font-size:23px; flex:none; width:29px; }
.meal-editor .ingredient-name input { font-size:16px; font-weight:500; line-height:1.35; padding:8px 3px; min-height:44px; border:1px solid transparent; background:none; border-radius:6px; text-overflow:ellipsis; }
.meal-editor .ingredient-name input:hover { border-color:var(--line); }
.meal-editor .ingredient-name input:focus { border-color:var(--lime); }
.meal-editor .remove-ingredient { flex:none; width:44px; height:44px; min-width:44px; margin-right:-6px; background:none; border:0; color:#969d99; border-radius:10px; }
.meal-editor .remove-ingredient:hover { background:#ffffff08; color:var(--text); }
.meal-food-amount { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:16px; }
.meal-weight-field { width:136px; }
.meal-input-unit { display:flex; align-items:center; border:1px solid #363b3d; border-radius:10px; background:#222526; min-width:0; overflow:hidden; }
.meal-input-unit:focus-within { border-color:var(--lime); }
.meal-input-unit>span:last-child { padding-right:10px; color:var(--muted); font-size:11px; flex:none; }
.meal-editor .meal-input-unit input { width:100%; min-width:0; min-height:44px; padding:9px 10px; background:none; border:0; border-radius:0; font-size:17px; box-shadow:none; font-variant-numeric:tabular-nums; }
.meal-editor .meal-weight-field input { font-size:15px; }
.meal-editor .meal-weight-field input::placeholder { font-size:13px; color:#89908c; }
.meal-editor .meal-input-unit input:focus-visible { border:0; outline:none; box-shadow:none; }
.meal-editor .meal-input-unit:has(input:user-invalid) { border-color:#ed9e91; }
.meal-portion-buttons { display:flex; align-items:center; gap:6px; }
.meal-portion-buttons button { display:flex; align-items:center; justify-content:center; gap:5px; min-width:70px; min-height:44px; padding:0 11px; border:1px solid #363b3d; border-radius:10px; font-size:15px; }
.meal-portion-buttons button>span { font-size:11px; color:var(--muted); }
.meal-portion-buttons button:hover { border-color:#737e68; background:#ffffff04; }
.meal-editor .ingredient-numbers { grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.meal-editor .ingredient-numbers label { font-size:11px; gap:7px; color:var(--nutrient-color); }
.meal-editor .ingredient-source { margin:11px 0 0; font-size:10px; color:#8e9692; overflow-wrap:anywhere; }
.meal-editor .ingredient-source a { color:#bec8b0; }
.meal-editor #ingredient-notice:not(:empty) { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:44px; margin-top:10px; font-size:12px; color:var(--muted); }
.meal-editor #ingredient-notice button { min-height:44px; }
.meal-food-empty { padding:28px 12px; border:1px dashed var(--line); border-radius:14px; text-align:center; color:var(--text); font-size:14px; line-height:1.7; }
.meal-food-empty>span { font-size:12px; color:var(--muted); }
.meal-notes { margin-top:12px; }
.meal-notes .icon { width:15px; height:15px; }
.meal-notes ul { padding:0 0 0 18px; margin:0; font-size:12px; line-height:1.7; color:var(--muted); }
.meal-editor-footer { flex:none; padding:8px 26px 20px; border-top:1px solid var(--line); background:var(--panel); }
.meal-editor-tools { display:grid; grid-template-columns:1fr 1fr 44px; align-items:center; gap:8px; margin-bottom:8px; }
.meal-editor-tools button { display:flex; align-items:center; justify-content:center; gap:7px; min-height:44px; padding:0 6px; font-size:12px; color:var(--muted); border-radius:9px; }
.meal-editor-tools button:hover { background:#ffffff05; color:var(--text); }
.meal-editor-tools .icon { flex:none; width:16px; height:16px; }
.meal-editor-tools .danger { color:#d5a09b; }
.meal-editor-actions { display:flex; align-items:center; gap:10px; }
.meal-editor-actions>.secondary { min-height:48px; min-width:100px; padding:0 18px; border-radius:12px; }
.meal-editor-actions>.primary { flex:1; min-height:48px; padding:0 18px; border-radius:12px; font-size:14px; font-weight:550; }
#meal-save-error { font-size:12px; margin:0 0 10px; max-height:60px; overflow:auto; }
#meal-save-error[hidden] { display:none; }
.meal-editor summary:focus-visible { outline:2px solid var(--lime); outline-offset:2px; border-radius:6px; }
@media(max-width:730px) {
 #modal.meal-editor { width:calc(100% - 20px); max-height:calc(100dvh - 24px - var(--keyboard-inset,0px)); margin:12px auto; border-radius:20px; }
 .meal-editor>.modal-head { padding:8px 12px 8px 18px; }
 .meal-editor-body { padding:16px 18px 18px; }
 .meal-editor-title textarea { font-size:21px; }
 .meal-editor-energy>strong { font-size:32px; }
 .meal-editor-summary { gap:12px; margin:14px 0; }
 .meal-editor-macros { gap:14px; }
 .meal-editor-macros>span { min-width:32px; }
 .meal-editor-macros strong { font-size:16px; }
 .meal-editor-macros small { font-size:10px; }
 .meal-editor .meal-food-card { padding:9px 10px 12px; }
 .meal-editor .meal-weight-field input { font-size:16px; }
 .meal-timing-fields { grid-template-columns:1fr 1fr; }
 .meal-timing-fields label:last-child { grid-column:1/-1; }
 .meal-timing-fields input { font-size:16px; }
 .meal-editor-footer { padding:6px 16px max(14px,env(safe-area-inset-bottom)); }
 .meal-editor-tools { gap:2px; margin-bottom:6px; }
 .meal-editor-tools button { font-size:11px; gap:5px; padding:0 2px; }
 .meal-editor-actions>.secondary { min-width:86px; }
}
@media(max-width:520px) {
 .meal-editor .ingredient-numbers { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .meal-food-amount { gap:8px; }
 .meal-weight-field { width:115px; }
 .meal-portion-buttons button { min-width:55px; padding:0 7px; }
}
@media(prefers-reduced-motion:reduce) { .meal-timing summary>.icon:last-child,.meal-notes summary>.icon { transition:none; } }
.meal-editor-tools button.is-saved { color:var(--lime); opacity:1; }
@media(max-width:360px) {
 .meal-editor-tools>button:not(.danger)>.icon { display:none; }
 .meal-editor-tools button>span { white-space:nowrap; }
}
/* Exact nutrients are one step down from the usual portion adjustment. */
.meal-food-nutrition { border-top:1px solid #303536; }
.meal-food-nutrition>summary { display:flex; align-items:center; gap:12px; min-height:44px; cursor:pointer; list-style:none; font-variant-numeric:tabular-nums; }
.meal-food-nutrition>summary::-webkit-details-marker { display:none; }
.meal-item-calories { flex:none; color:var(--muted); font-size:11px; }
.meal-item-calories strong { font-size:15px; font-weight:550; color:var(--text); }
.meal-item-macros { display:flex; flex-wrap:wrap; gap:12px; font-size:11px; color:#c5cbc8; }
.meal-item-macros b { color:var(--nutrient-color); font-weight:500; }
.meal-item-macros small { color:var(--muted); margin-left:1px; font-size:9px; }
.meal-nutrition-edit { display:flex; align-items:center; gap:3px; flex:none; margin-left:auto; font-size:11px; color:var(--muted); }
.meal-nutrition-edit .icon { width:13px; height:13px; }
.meal-food-nutrition[open] .meal-nutrition-edit .icon { transform:rotate(180deg); }
.meal-food-nutrition .ingredient-numbers { margin:4px 0 6px; }
.meal-editor .meal-food-card .ingredient-source { margin-top:2px; }
@media(max-width:520px) {
 .meal-food-nutrition>summary { gap:7px; }
 .meal-item-macros { gap:6px; font-size:10px; }
 .meal-item-calories { font-size:10px; }
 .meal-item-calories strong { font-size:14px; }
 .meal-nutrition-edit { font-size:10px; }
}
.meal-editor-fields { margin:0; padding:0; border:0; min-width:0; min-inline-size:0; }

/* Home: two equally sized cards, with the next card visible at the edge. */
.home-overview { min-width:0; }
.overview-track { display:flex; gap:12px; overflow-x:auto; padding:2px 18px 2px 0; scroll-snap-type:x mandatory; scrollbar-width:none; overscroll-behavior-x:contain; }
.overview-track::-webkit-scrollbar { display:none; }
.overview-card { box-sizing:border-box; position:relative; flex:0 0 100%; min-width:0; height:240px; padding:16px 18px 8px; display:flex; flex-direction:column; border:1px solid var(--line); border-radius:21px; background:#1b1e1d; scroll-snap-align:start; scroll-snap-stop:always; }
.overview-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; height:24px; flex-shrink:0; margin-bottom:8px; }
.overview-heading h2 { font-size:15px; font-weight:550; letter-spacing:-.2px; margin:0; }
.overview-heading > span { color:var(--muted); font-size:11px; white-space:nowrap; }
.overview-meals { flex:1; min-height:0; }
.overview-meal { display:flex; width:100%; min-height:44px; gap:10px; align-items:center; text-align:left; padding:3px 0; border-radius:9px; }
.overview-meal + .overview-meal { border-top:1px solid #ffffff07; }
.overview-meal:hover { background:#ffffff05; }
.overview-emoji { width:28px; flex-shrink:0; text-align:center; font-size:22px; }
.overview-meal-title { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#e3e7df; font-size:13px; }
.overview-meal-calories { flex-shrink:0; display:flex; flex-direction:column; gap:1px; text-align:right; font-size:12px; font-variant-numeric:tabular-nums; color:#d7decf; }
.overview-meal-calories small { color:var(--muted); font-size:9px; font-weight:400; }
.overview-footer { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:40px; padding:0; color:#b4c49e; font-size:11px; }
.overview-footer svg { width:14px; height:14px; }
.overview-empty { height:100%; display:flex; flex-direction:column; justify-content:center; gap:6px; font-size:15px; color:#d9dfd1; }
.overview-empty > span { font-size:12px; color:var(--muted); }
.overview-placeholder, .overview-placeholder-content { display:flex; flex-direction:column; flex:1; min-height:0; }
.overview-placeholder .skeleton { background:#303430; }
.overview-placeholder-meta { width:56px; height:10px; }
.overview-placeholder-meal { display:flex; align-items:center; gap:10px; height:44px; }
.overview-placeholder-emoji { width:28px; height:28px; flex-shrink:0; }
.overview-placeholder-name { flex:1; min-width:0; }
.overview-placeholder-name .skeleton { height:12px; }
.overview-placeholder-calories { width:28px; height:18px; flex-shrink:0; }
.overview-placeholder-footer { display:flex; align-items:center; height:40px; flex-shrink:0; }
.overview-placeholder-footer .skeleton { height:10px; }
.overview-placeholder .overview-placeholder-chart { flex:1; min-height:0; }
.overview-placeholder-bar { width:100%; max-width:38px; }
.overview-placeholder .overview-day-label .skeleton { width:10px; height:8px; }
.overview-pages { display:flex; align-items:center; justify-content:center; height:32px; gap:0; }
.overview-pages button { display:grid; place-items:center; width:36px; height:32px; padding:0; }
.overview-pages button > span, .startup-page-dot { width:5px; height:5px; border-radius:5px; background:#50584c; transition:width .2s, background .2s; }
.overview-pages button[aria-pressed=true] > span { width:17px; background:#c8e99b; }
.overview-pages button:focus-visible { outline-offset:-3px; border-radius:10px; }
.startup-page-dot { margin:0 15px; }
.startup-page-dot.is-current { width:17px; background:#c8e99b; }
.overview-target { display:flex; gap:5px; align-items:center; }
.overview-target i { display:block; width:13px; border-top:1px dashed #929b88; }
.overview-chart { position:relative; display:flex; align-items:stretch; gap:10px; height:136px; margin-top:4px; }
.overview-day { display:flex; flex:1; flex-direction:column; min-width:0; align-items:center; padding:0; border-radius:6px; }
.overview-bar-space { display:flex; flex:1; width:100%; align-items:flex-end; justify-content:center; }
.overview-bar { width:100%; max-width:38px; border-radius:5px 5px 2px 2px; background:#657851; transition:height .25s ease; }
.overview-day:hover .overview-bar, .overview-day:focus-visible .overview-bar { background:#b0c98d; }
.overview-day.is-today .overview-bar { background:var(--lime); }
.overview-day-label { display:flex; align-items:center; justify-content:center; height:24px; flex-shrink:0; font-size:10px; color:var(--muted); }
.overview-day.is-today .overview-day-label { color:var(--lime); }
.overview-bar.is-empty { background:transparent; border:1px solid #505649; border-radius:4px; }
.overview-day:disabled { opacity:.3; cursor:default; }
.overview-target-line { position:absolute; left:0; right:0; z-index:1; border-top:1px dashed #a8b59470; pointer-events:none; }
.overview-week-caption { display:flex; align-items:center; gap:4px; min-height:40px; margin-top:auto; color:var(--muted); font-size:11px; }
.overview-week-caption strong { font-size:14px; font-weight:550; color:#e3e7df; }
@media(max-width:730px) {
 .overview-card { padding-left:14px; padding-right:14px; }
 .keyboard-open .home-overview, .keyboard-compact .home-overview { display:none; }
}
@media(prefers-reduced-motion:reduce) {
 .overview-pages button > span, .overview-bar { transition:none; }
}
@media(max-width:730px) and (max-height:700px) {
 .overview-card { height:208px; }
 .overview-meal:nth-child(3) { display:none; }
 .overview-placeholder-meal:nth-child(3) { display:none; }
 .overview-chart { height:110px; }
}
.home-overview.is-single .overview-track { padding-right:0; }

/* Tap the summary to swap calories and macros without changing its footprint. */
.glance-switch { position:relative; display:block; width:100%; height:28px; }
.glance-face { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:space-between; gap:6px; transition:opacity .18s ease; pointer-events:none; }
.glance-face .glance-labels { min-height:18px; }
.glance-macro-face { opacity:0; }
[data-glance-mode=macros] .glance-calorie-face { opacity:0; }
[data-glance-mode=macros] .glance-macro-face { opacity:1; }
.mobile-nav { touch-action:pan-y; user-select:none; -webkit-user-select:none; }
@media(max-width:730px) {
 .glance-switch { height:25px; }
 .glance-face .glance-labels { min-height:16px; }
}
@media(min-width:731px) {
 .sidebar-glance .glance-switch { height:25px; }
 .sidebar-glance .glance-face .glance-labels { min-height:16px; }
}
@media(prefers-reduced-motion:reduce) { .glance-face { transition:none; } }
/* First meal and account entry share the app's composer and neutral surfaces. */
.guest-screen { min-height:100svh; display:flex; flex-direction:column; padding:28px 40px 20px; }
.guest-header { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.guest-header .brand { margin:0; gap:10px; }
.guest-main { width:100%; max-width:680px; margin:auto; padding:70px 0 48px; }
.guest-main .journal-greeting { margin:0 4px 32px; }
.guest-main .journal-greeting p { margin-bottom:14px; }
.guest-main .journal-composer { position:static; width:100%; }
.guest-main textarea { width:100%; resize:none; min-height:132px; font-size:20px; line-height:1.5; }
.guest-main .composer-error:empty { display:none; }
.guest-footer { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:8px 22px; color:var(--muted); font-size:12px; padding-top:16px; }
.guest-footer a { color:inherit; }
.guest-account { max-width:420px; }
.guest-account h1 { font-size:32px; letter-spacing:-1px; margin:18px 0 12px; }
.guest-account p { color:var(--muted); line-height:1.5; }
.guest-account form { display:grid; gap:20px; margin-top:28px; }
.guest-account label { display:grid; gap:8px; }
.guest-account input { width:100%; min-height:50px; }
.guest-account .field-help { margin:-12px 0 0; font-size:12px; }
.guest-account .form-error:empty { display:none; }
.guest-account .primary { width:100%; min-height:48px; justify-content:center; }
.guest-switch { display:block; margin:22px auto 0; min-height:36px; }
.guest-back { display:flex; align-items:center; gap:6px; min-height:44px; }
@media(max-width:730px) {
  .guest-screen { padding:20px 16px max(20px,env(safe-area-inset-bottom)); }
  .guest-main { padding:58px 0 24px; }
  .guest-main .journal-greeting { margin-bottom:30px; }
  .guest-main .journal-greeting h1 { font-size:32px; }
  .guest-main textarea { font-size:18px; }
  .guest-account { padding-top:28px; }
  .guest-footer { font-size:11px; }
}

.guest-main .composer-send { display:flex; align-items:center; justify-content:center; gap:14px; width:auto; height:44px; padding:0 18px; border-radius:28px; font-size:14px; }
.guest-main .composer-send svg { width:17px; height:17px; }
.guest-main #guest-description { min-height:140px; padding:24px 25px 10px; font-size:20px; line-height:1.55; background:transparent; border:0; border-radius:0; box-shadow:none; }
.guest-main #guest-description:focus-visible { outline:none; }
.guest-header .text-button { min-height:44px; font-size:14px; }
@media(max-width:730px) {
 .guest-main #guest-description { min-height:132px; padding:21px 20px 12px; font-size:18px; }
}

.guest-main .composer-send > span { font-size:14px; color:inherit; }
.social-signin { display: grid; gap: 10px; margin-top: 24px; }
.social-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; width: 100%; border: 1px solid #454a47; border-radius: 12px; background: #f7f8f6; color: #171b18; font-size: 15px; font-weight: 600; }
.social-button img { width: 20px; height: 20px; flex: 0 0 20px; }
.social-button:hover:not(:disabled) { background: #e8ebe5; }
.social-button:disabled { opacity: .55; cursor: wait; }
.social-button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.signin-divider { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--muted); font-size: 12px; }
.signin-divider::before, .signin-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }

/* Public links stay in the guest view, away from the signed-in composer. */
.guest-footer nav{display:flex;gap:16px;flex-wrap:wrap;justify-content:center}.guest-footer{flex-wrap:wrap}.guest-account .field-help a{color:var(--lime, #d2f78b)}
