:root {
  --ink: #101b2a;
  --ink-soft: #1b2b3d;
  --ink-muted: #667789;
  --paper: #f4f1e9;
  --paper-strong: #fbfaf6;
  --line: #d9d9d0;
  --line-dark: rgba(244, 241, 233, 0.16);
  --lime: #c9f36a;
  --lime-dark: #8bb541;
  --orange: #f07d4f;
  --blue: #8ac9f2;
  --red: #d95f55;
  --shadow: 0 18px 45px rgba(16, 27, 42, 0.08);
  --display: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.app-shell {
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1440px);
  min-height: 76px;
  margin: 0 auto;
  padding: 0 52px;
  color: var(--paper);
  background: var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border: 1px solid var(--lime);
  color: var(--lime);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1;
  white-space: nowrap;
}

.brand-mark span {
  color: var(--orange);
}

.brand-name,
.section-kicker,
.eyebrow,
.date-caption,
.metric-unit,
.metric-foot,
.field-label,
.title-field > span,
.card-description,
.status-caption,
.footer-note,
.integration-row,
.save-note {
  letter-spacing: 0.08em;
}

.brand-name {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.brand-name i {
  margin: 0 3px;
  color: var(--orange);
  font-style: normal;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 22px;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b9c7d3;
  font-size: 12px;
}

.connection-dot,
.mini-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #778797;
}

.connection-dot.active,
.mini-dot.active {
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(201, 243, 106, 0.13);
}

.connection-dot.warning {
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(240, 125, 79, 0.12);
}

.mini-dot.warning {
  background: var(--orange);
}

.quiet-button {
  padding: 6px 0;
  border: 0;
  color: var(--paper);
  background: transparent;
  font-size: 12px;
}

.quiet-button:hover {
  color: var(--lime);
}

.dashboard {
  width: min(100%, 1440px);
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  background: var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
  gap: 45px;
  padding: 78px 8.5% 66px;
  color: var(--paper);
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
}

.hero-copy {
  align-self: center;
  max-width: 720px;
}

.eyebrow,
.section-kicker,
.date-caption,
.field-label,
.title-field > span {
  margin: 0;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow {
  color: #9eb0c1;
}

.eyebrow span,
.section-kicker span {
  color: var(--orange);
}

.hero-copy h1 {
  max-width: 640px;
  margin: 22px 0 19px;
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.hero-copy h1 em {
  color: var(--lime);
  font-style: normal;
  white-space: nowrap;
}

.hero-intro {
  max-width: 430px;
  margin: 0;
  color: #a7b6c2;
  font-size: 15px;
  line-height: 1.75;
}

.date-switcher {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 48px;
}

.round-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #46586b;
  border-radius: 50%;
  color: var(--paper);
  background: transparent;
  font-size: 18px;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.round-button:hover {
  border-color: var(--lime);
  color: var(--lime);
  transform: translateY(-2px);
}

.selected-date-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 135px;
}

.date-caption {
  color: #879aac;
}

.selected-date-wrap strong {
  color: var(--paper);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.hero-metric {
  position: relative;
  min-height: 280px;
  padding: 28px 29px 24px;
  align-self: end;
  overflow: hidden;
  color: var(--ink);
  background: var(--lime);
}

.hero-metric::after {
  position: absolute;
  right: -45px;
  bottom: -80px;
  width: 205px;
  height: 205px;
  border: 1px solid rgba(16, 27, 42, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 20px rgba(16, 27, 42, 0.03), 0 0 0 40px rgba(16, 27, 42, 0.03);
  content: "";
}

.metric-header,
.metric-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-header .section-kicker {
  color: var(--ink);
}

.metric-date {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.metric-number {
  position: relative;
  z-index: 1;
  margin-top: 41px;
  font-family: var(--display);
  font-size: clamp(58px, 7vw, 94px);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 0.8;
}

.metric-unit {
  position: relative;
  z-index: 1;
  margin-top: 13px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.metric-foot {
  position: absolute;
  right: 29px;
  bottom: 23px;
  left: 29px;
  justify-content: flex-start;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.metric-rule {
  width: 33px;
  height: 1px;
  background: rgba(16, 27, 42, 0.45);
}

.metric-bars {
  position: absolute;
  right: 27px;
  bottom: 57px;
  display: flex;
  align-items: end;
  gap: 4px;
  width: 118px;
  height: 48px;
  opacity: 0.65;
}

.metric-bars i {
  display: block;
  width: 9px;
  height: var(--bar);
  background: var(--ink);
}

.week-strip {
  display: flex;
  gap: 7px;
  padding: 24px 8.5% 21px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.week-strip::-webkit-scrollbar {
  display: none;
}

.day-chip {
  display: grid;
  grid-template-columns: 34px minmax(76px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 168px;
  padding: 9px 13px 9px 10px;
  border: 1px solid transparent;
  color: var(--ink-muted);
  background: transparent;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.day-chip:hover {
  border-color: var(--line);
  color: var(--ink);
}

.day-chip.is-selected {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.day-chip.is-empty {
  opacity: 0.52;
}

.day-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
}

.day-chip.is-selected .day-number {
  color: var(--ink);
  background: var(--lime);
}

.day-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.day-weekday {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.day-label {
  overflow: hidden;
  max-width: 100px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
}

.day-chip.has-record .day-dot {
  background: var(--orange);
}

.assistant-panel {
  position: relative;
  margin: 34px 8.5% 0;
  padding: 27px 29px 28px;
  overflow: hidden;
  border: 1px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
}

.assistant-panel::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 7px;
  background: var(--lime);
  content: "";
}

.assistant-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.assistant-panel .section-kicker {
  color: #9eb0c1;
}

.assistant-panel h2 {
  margin: 8px 0 5px;
  color: var(--paper);
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
}

.assistant-lede {
  max-width: 570px;
  margin: 0;
  color: #a7b6c2;
  font-size: 13px;
  line-height: 1.65;
}

.assistant-signal {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding-top: 3px;
  color: #9eb0c1;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.assistant-signal .mini-dot.active {
  background: var(--lime);
}

.assistant-signal .mini-dot.warning {
  background: var(--orange);
}

.assistant-form {
  margin-top: 22px;
  padding: 16px 17px 14px;
  border: 1px solid rgba(244, 241, 233, 0.22);
  background: rgba(251, 250, 246, 0.05);
}

.assistant-input-label {
  display: block;
}

.assistant-input-label > span {
  display: block;
  margin-bottom: 8px;
  color: #9eb0c1;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.assistant-input-label textarea {
  display: block;
  width: 100%;
  min-height: 70px;
  padding: 0;
  resize: vertical;
  border: 0;
  outline: 0;
  color: var(--paper);
  background: transparent;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

.assistant-input-label textarea::placeholder {
  color: #718396;
}

.assistant-input-label textarea:focus {
  outline: 0;
}

.assistant-form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(244, 241, 233, 0.14);
}

.assistant-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.assistant-examples button {
  padding: 5px 8px;
  border: 1px solid rgba(244, 241, 233, 0.22);
  color: #afbfcc;
  background: transparent;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.assistant-examples button:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.assistant-submit {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--lime);
  color: var(--ink);
  background: var(--lime);
  font-size: 12px;
  font-weight: 700;
  transition: background 160ms ease, transform 160ms ease;
}

.assistant-submit:hover {
  background: #d6fb7b;
  transform: translateY(-2px);
}

.assistant-submit span {
  margin-left: 9px;
  color: var(--orange);
  font-size: 15px;
}

.assistant-preview {
  margin-top: 17px;
  padding: 16px 17px;
  border-left: 3px solid var(--orange);
  color: var(--ink);
  background: var(--paper-strong);
}

.assistant-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.assistant-preview-head strong {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.045em;
}

.assistant-preview-date {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.assistant-preview-message {
  margin: 12px 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.assistant-draft-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.assistant-draft-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.assistant-draft-row strong {
  overflow: hidden;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-draft-row span {
  align-self: center;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}

.assistant-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 15px;
}

.assistant-clarification {
  padding: 12px 13px;
  color: #9a3f37;
  background: #fbe4df;
  font-size: 13px;
  line-height: 1.6;
}

.food-panel {
  position: relative;
  margin: 28px 8.5% 0;
  padding: 28px 29px 29px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
}

.food-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 74px;
  height: 5px;
  background: var(--orange);
  content: "";
}

.food-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
}

.food-panel h2 {
  margin: 8px 0 6px;
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
}

.food-lede {
  max-width: 650px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.65;
}

.food-caution,
.food-preview-badge {
  flex: 0 0 auto;
  padding: 6px 8px;
  color: #9a3f37;
  background: #fbe4df;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.food-capture-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.94fr) minmax(290px, 1.06fr);
  gap: 22px;
  margin-top: 23px;
}

.food-photo-column {
  min-width: 0;
}

.food-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 238px;
  padding: 25px;
  border: 1px dashed #abb3ad;
  color: var(--ink);
  background: #f1f0e8;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.food-dropzone:hover {
  border-color: var(--ink);
  background: #e9e9df;
  transform: translateY(-2px);
}

.food-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.food-drop-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border: 1px solid var(--ink);
  color: var(--orange);
  font-size: 25px;
  line-height: 1;
}

.food-dropzone strong {
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: -0.035em;
}

.food-dropzone small {
  max-width: 270px;
  margin-top: 7px;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.6;
}

.food-image-frame {
  position: relative;
  aspect-ratio: 1.35;
  overflow: hidden;
  background: var(--ink);
}

.food-image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.food-image-clear {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(251, 250, 246, 0.55);
  color: var(--paper);
  background: rgba(16, 27, 42, 0.72);
  font-size: 20px;
  line-height: 1;
}

.food-capture-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 17px 18px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.food-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.food-field > span,
.food-item-fields label {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.food-field select,
.food-field textarea,
.food-item-fields input,
.food-item-title input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper-strong);
}

.food-field select {
  min-height: 39px;
  padding: 0 10px;
}

.food-field textarea {
  min-height: 83px;
  padding: 9px 10px;
  resize: vertical;
  line-height: 1.55;
}

.food-field select:focus,
.food-field textarea:focus,
.food-item-fields input:focus,
.food-item-title input:focus {
  border-color: var(--ink);
  outline: 2px solid rgba(240, 125, 79, 0.35);
  outline-offset: 1px;
}

.food-form-note {
  margin: -2px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.55;
}

.food-analyze-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
  font-size: 12px;
  font-weight: 700;
  transition: background 160ms ease, transform 160ms ease;
}

.food-analyze-button:hover {
  background: var(--ink-soft);
  transform: translateY(-2px);
}

.food-analyze-button span,
.food-preview-actions span {
  margin-left: 9px;
  color: var(--lime);
  font-size: 15px;
}

.food-preview {
  margin-top: 21px;
  padding: 18px 18px 17px;
  border-top: 3px solid var(--lime-dark);
  background: #eef1e6;
}

.food-preview-head,
.food-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.food-preview-head h3 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -0.045em;
}

.food-preview-message {
  margin: 12px 0 15px;
  color: var(--ink-muted);
  font-size: 13px;
}

.food-macro-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 14px;
}

.food-macro-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid #d1d9c7;
  background: rgba(251, 250, 246, 0.68);
}

.food-macro-grid span {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.food-macro-grid strong {
  font-family: var(--display);
  font-size: 23px;
  letter-spacing: -0.04em;
}

.food-item-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.food-item-row {
  padding: 12px 13px;
  border: 1px solid #d1d9c7;
  background: rgba(251, 250, 246, 0.78);
}

.food-item-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.food-item-index {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
}

.food-item-title input {
  max-width: 250px;
  padding: 6px 8px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.food-confidence {
  margin-left: auto;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.food-item-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(84px, 1fr));
  gap: 7px;
  margin-top: 11px;
}

.food-item-fields label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.food-item-fields input {
  min-height: 33px;
  padding: 5px 7px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0;
}

.food-item-fields small {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.food-item-assumption {
  margin: 9px 0 0;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.45;
}

.food-assumptions {
  margin-top: 13px;
  padding: 10px 12px;
  color: #6e5734;
  background: #fbf2df;
  font-size: 12px;
}

.food-assumptions strong {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.food-assumptions ul {
  margin: 6px 0 0;
  padding-left: 17px;
}

.food-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 15px;
}

.food-history {
  margin-top: 21px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.food-history-head {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.food-history-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 9px;
}

.food-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border-left: 3px solid var(--lime-dark);
  background: #f1f0e8;
}

.food-history-row > div:first-child,
.food-history-total {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.food-history-row strong {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -0.03em;
}

.food-history-row span {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
}

.food-history-total {
  align-items: flex-end;
  text-align: right;
}

.food-history-total strong {
  color: var(--ink);
  font-size: 19px;
}

.energy-summary {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid rgba(244, 241, 233, 0.24);
}

.energy-summary-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #9eb0c1;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.energy-summary-top span:last-child {
  color: var(--lime);
}

.energy-summary strong {
  display: block;
  margin-top: 7px;
  color: var(--paper);
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.05em;
}

.energy-summary p {
  margin: 4px 0 0;
  color: #899bab;
  font-size: 11px;
  line-height: 1.5;
}

.session-fields {
  margin-top: 24px;
  padding: 16px 17px 15px;
  border: 1px solid var(--line);
  background: #eef0e7;
}

.session-fields-heading,
.session-field-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.session-fields-heading > span {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.session-fields-heading strong {
  display: block;
  margin-top: 4px;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.035em;
}

.session-field-grid {
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 16px;
}

.session-field {
  display: flex;
  flex: 1 1 145px;
  flex-direction: column;
  gap: 6px;
  min-width: 125px;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.session-field input,
.session-field select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #c8cec4;
  outline: 0;
  color: var(--ink);
  background: var(--paper-strong);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0;
}

.session-field input:focus,
.session-field select:focus {
  border-color: var(--ink);
}

.session-field > div {
  position: relative;
}

.session-field > div input {
  padding-right: 40px;
}

.session-field small {
  color: var(--ink-muted);
  font-size: 9px;
  letter-spacing: 0;
  text-transform: none;
}

.session-field > div small {
  position: absolute;
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
}

.session-field > span small {
  margin-left: 4px;
  font-family: var(--body);
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.exercise-energy {
  margin-top: 7px;
  color: var(--orange) !important;
  font-family: var(--mono);
  font-size: 9px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap;
}

.food-item-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 0 28px;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
}

.food-item-match > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.small-action-button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #b4bcb2;
  color: var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 9px;
}

.small-action-button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.food-preview-actions .sync-button:disabled {
  cursor: not-allowed;
  color: #87908b;
  background: #d7dcd1;
  border-color: #d7dcd1;
}

.food-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.food-search-form {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

.food-search-form input {
  min-width: 0;
  flex: 1;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  outline: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
}

.food-search-form input:focus {
  border-color: var(--ink);
}

.food-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 17px;
}

.food-search-choice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  text-align: left;
}

.food-search-choice:hover {
  border-color: var(--ink);
  background: #eef0e7;
}

.food-search-choice strong {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -0.03em;
}

.food-search-choice span,
.food-search-empty {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
}

.body-panel {
  position: relative;
  margin: 28px 8.5% 0;
  padding: 28px 29px 29px;
  border: 1px solid #cfd8c0;
  background: #e8eedb;
}

.body-panel::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 74px;
  height: 5px;
  background: var(--lime-dark);
  content: "";
}

.body-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
}

.body-panel h2 {
  margin: 8px 0 6px;
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: -0.055em;
  line-height: 1;
}

.body-lede {
  max-width: 680px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.65;
}

.body-caution {
  flex: 0 0 auto;
  padding: 6px 8px;
  color: #6e5734;
  background: #fbf2df;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 23px;
  margin-top: 22px;
}

.body-read-column,
.body-write-column {
  min-width: 0;
  padding: 16px;
  border: 1px solid #cdd6c1;
  background: rgba(251, 250, 246, 0.62);
}

.body-section-label {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.body-read-toolbar {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-top: 13px;
}

.body-field {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.body-field.compact {
  min-width: 118px;
}

.body-field input,
.body-field select {
  min-height: 35px;
  padding: 7px 8px;
  border: 1px solid #c8cec4;
  outline: 0;
  color: var(--ink);
  background: var(--paper-strong);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
}

.body-field input:focus,
.body-field select:focus {
  border-color: var(--ink);
}

.body-field > span small {
  color: var(--ink-muted);
  font-family: var(--body);
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.body-read-toolbar > button {
  flex: 0 0 auto;
  min-height: 35px;
}

.body-readout {
  margin-top: 18px;
}

.body-empty {
  padding: 23px 15px;
  border: 1px dashed #b7c2ac;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.6;
}

.body-latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.body-metric-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #cdd6c1;
  background: var(--paper-strong);
}

.body-metric-card span,
.body-metric-card em {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
}

.body-metric-card strong {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -0.045em;
}

.body-metric-card strong small {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0;
}

.body-record-list {
  margin-top: 17px;
}

.body-record-list .body-section-label {
  padding-bottom: 8px;
  border-bottom: 1px solid #cdd6c1;
}

.body-record-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr auto;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #d8dfcf;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
}

.body-record-row strong,
.body-record-row b {
  color: var(--ink);
  font-weight: 500;
}

.body-form-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 8px;
  margin-top: 12px;
}

.body-write-column > .body-field {
  margin-top: 12px;
}

.body-form-note {
  margin: 14px 0 15px;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.55;
}

.body-preview-button {
  width: 100%;
}

.body-preview {
  margin-top: 15px;
  padding: 13px;
  border-left: 3px solid var(--orange);
  background: var(--paper-strong);
}

.body-preview-head,
.body-preview-record {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.body-preview-head {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.body-preview-head strong {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.035em;
}

.body-preview-head span {
  color: #9a3f37;
  font-family: var(--mono);
  font-size: 9px;
}

.body-preview-record {
  margin-top: 12px;
}

.body-preview-record strong {
  font-family: var(--display);
  font-size: 20px;
}

.body-preview-record span,
.body-preview p {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
}

.body-preview p {
  margin: 11px 0 0;
  line-height: 1.6;
}

.body-external-summary {
  margin-top: 10px;
  padding: 9px;
  color: #6e5734;
  background: #fbf2df;
  font-size: 11px;
  line-height: 1.5;
}

.body-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 13px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(275px, 0.45fr);
  gap: 32px;
  padding: 48px 8.5% 80px;
}

.log-panel {
  min-width: 0;
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  color: var(--ink-muted);
}

.panel-heading h2 {
  margin: 7px 0 0;
  font-family: var(--display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
}

.panel-actions,
.footer-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.primary-button,
.secondary-button,
.sync-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 650;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.primary-button {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}

.secondary-button {
  color: var(--ink);
  background: transparent;
}

.secondary-button:hover,
.primary-button:hover,
.sync-button:hover {
  transform: translateY(-2px);
}

.secondary-button:hover {
  color: var(--paper);
  background: var(--ink);
}

.primary-button:hover {
  background: #d6fb7b;
}

.sync-button {
  color: var(--paper);
  background: var(--ink);
}

.sync-button:hover {
  background: var(--ink-soft);
}

.sync-button span {
  margin-left: 8px;
  color: var(--lime);
}

.button-icon {
  margin-right: 6px;
  color: var(--orange);
  font-size: 15px;
}

.title-field-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 5px;
}

.title-field {
  display: flex;
  align-items: center;
  gap: 13px;
  width: min(100%, 430px);
}

.title-field > span {
  flex: 0 0 auto;
}

.title-field input {
  width: 100%;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.title-field input:focus {
  border-color: var(--ink);
}

.dirty-indicator {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 10px;
}

.exercise-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-top: 18px;
}

.exercise-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 112px 34px;
  align-items: center;
  gap: 15px;
  min-height: 113px;
  padding: 16px 17px 16px 14px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.exercise-card:hover {
  border-color: #bfc3bd;
  box-shadow: var(--shadow);
  transform: translateX(2px);
}

.exercise-index {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-height: 80px;
  border-right: 1px solid var(--line);
  color: var(--orange);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.exercise-main {
  min-width: 0;
}

.exercise-name-input {
  width: 100%;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.exercise-name-input:focus {
  border-color: var(--ink);
}

.exercise-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-top: 9px;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.field-label input,
.field-label select {
  width: 51px;
  padding: 1px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
  text-align: center;
}

.field-label select {
  width: 44px;
  text-align: left;
}

.field-label input:focus,
.field-label select:focus {
  border-color: var(--ink);
}

.exercise-capacity {
  align-self: center;
  padding-left: 15px;
  border-left: 1px solid var(--line);
}

.exercise-capacity span,
.exercise-capacity small {
  display: block;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.exercise-capacity strong {
  display: block;
  margin: 3px 0 2px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.delete-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  color: #a5aaa8;
  background: transparent;
  font-size: 20px;
}

.delete-button:hover {
  color: var(--red);
}

.empty-state {
  padding: 42px 24px;
  border: 1px dashed #b8bdb5;
  color: var(--ink-muted);
  text-align: center;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border: 1px solid var(--line);
  color: var(--orange);
  font-size: 20px;
}

.empty-state h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.empty-state p {
  margin: 6px 0 20px;
  font-size: 13px;
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 26px;
}

.footer-note {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
}

.side-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-card {
  padding: 22px 22px 23px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-index {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 10px;
}

.side-card h3 {
  margin: 25px 0 6px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.side-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.7;
}

.status-track {
  height: 6px;
  margin-top: 25px;
  background: #e4e4dc;
}

.status-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--orange);
  transition: width 220ms ease;
}

.status-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9px;
}

.integration-card {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.integration-card .section-kicker,
.integration-card h3 {
  color: var(--paper);
}

.integration-card .card-description {
  color: #9eafbf;
}

.integration-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}

.integration-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--line-dark);
  color: #d5dee6;
  font-size: 11px;
  text-transform: uppercase;
}

.integration-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.integration-row strong {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
}

.muted-row {
  color: #8798a8;
}

.muted-row strong {
  color: #8798a8;
}

.formula-card {
  background: #e5edcf;
  border-color: #d2ddba;
}

.formula {
  margin: 29px 0 9px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.modal-layer {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 27, 42, 0.65);
  backdrop-filter: blur(7px);
}

.modal-layer[hidden] {
  display: none;
}

.modal {
  width: min(100%, 620px);
  max-height: min(750px, calc(100vh - 48px));
  overflow: auto;
  padding: 30px;
  color: var(--ink);
  background: var(--paper-strong);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.25);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 7px 0 0;
  font-family: var(--display);
  font-size: 35px;
  letter-spacing: -0.06em;
  line-height: 1;
}

.modal-close {
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid var(--line);
  color: var(--ink-muted);
  background: transparent;
  font-size: 18px;
}

.modal-close:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.modal-lede {
  margin: 18px 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.7;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 18px 0;
}

.summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.summary-row strong {
  overflow: hidden;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-row span {
  align-self: center;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 13px 0 4px;
  border-top: 1px solid var(--ink);
}

.summary-total span {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-total strong {
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: -0.06em;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
}

.remote-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 19px;
}

.remote-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 15px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  text-align: left;
}

.remote-choice:hover {
  border-color: var(--ink);
}

.remote-choice strong {
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: -0.04em;
}

.remote-choice span {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
}

.modal-error {
  padding: 13px 15px;
  color: #9a3f37;
  background: #fbe4df;
  font-size: 13px;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 22px;
  bottom: 22px;
  max-width: min(380px, calc(100vw - 44px));
  padding: 13px 16px;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 15px 35px rgba(16, 27, 42, 0.18);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1040px) {
  .topbar,
  .dashboard {
    width: 100%;
  }

  .hero-grid,
  .workspace-grid,
  .week-strip {
    padding-right: 5.5%;
    padding-left: 5.5%;
  }

  .assistant-panel {
    margin-right: 5.5%;
    margin-left: 5.5%;
  }

  .food-panel {
    margin-right: 5.5%;
    margin-left: 5.5%;
  }

  .body-panel {
    margin-right: 5.5%;
    margin-left: 5.5%;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-column {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 65px;
    padding: 0 20px;
  }

  .topbar-tools {
    gap: 13px;
  }

  .connection-pill {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 39px;
    padding: 49px 20px 38px;
  }

  .hero-copy h1 {
    font-size: clamp(48px, 15vw, 72px);
  }

  .date-switcher {
    margin-top: 34px;
  }

  .hero-metric {
    min-height: 230px;
  }

  .metric-number {
    margin-top: 34px;
    font-size: 76px;
  }

  .week-strip {
    padding: 17px 20px;
  }

  .assistant-panel {
    margin: 24px 20px 0;
    padding: 23px 18px 20px;
  }

  .food-panel {
    margin: 20px 20px 0;
    padding: 23px 18px 20px;
  }

  .body-panel {
    margin: 20px 20px 0;
    padding: 23px 18px 20px;
  }

  .body-panel-header {
    flex-direction: column;
    gap: 13px;
  }

  .body-panel h2 {
    font-size: 29px;
  }

  .body-grid {
    grid-template-columns: 1fr;
  }

  .body-read-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .body-read-toolbar > button {
    width: 100%;
  }

  .body-latest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .session-fields-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .session-field-grid {
    gap: 9px;
  }

  .food-panel-header {
    flex-direction: column;
    gap: 13px;
  }

  .food-panel h2 {
    font-size: 29px;
  }

  .food-capture-grid {
    grid-template-columns: 1fr;
  }

  .food-dropzone {
    min-height: 190px;
  }

  .food-capture-form {
    padding: 15px;
  }

  .food-macro-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .food-item-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .food-preview-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .food-confidence {
    margin-left: auto;
  }

  .food-preview-actions {
    flex-direction: column-reverse;
  }

  .food-preview-actions button {
    width: 100%;
  }

  .food-history-row {
    align-items: flex-start;
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 10px;
  }

  .food-history-row > .small-action-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .food-item-match {
    align-items: flex-start;
    flex-direction: column;
    margin-left: 0;
  }

  .food-item-match > span {
    white-space: normal;
  }

  .food-search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .food-search-form button {
    width: 100%;
  }

  .assistant-panel-top {
    flex-direction: column;
    gap: 13px;
  }

  .assistant-panel h2 {
    font-size: 29px;
  }

  .assistant-form-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .assistant-submit {
    justify-content: center;
    width: 100%;
  }

  .assistant-preview-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .assistant-draft-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .assistant-draft-row span {
    align-self: auto;
  }

  .assistant-preview-actions {
    flex-direction: column-reverse;
  }

  .assistant-preview-actions button {
    width: 100%;
  }

  .workspace-grid {
    gap: 25px;
    padding: 35px 20px 55px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 19px;
  }

  .panel-actions {
    width: 100%;
  }

  .panel-actions button {
    flex: 1;
  }

  .title-field-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .title-field {
    width: 100%;
  }

  .exercise-card {
    grid-template-columns: 31px minmax(0, 1fr) 30px;
    gap: 11px;
    padding-right: 10px;
  }

  .exercise-index {
    min-height: 123px;
  }

  .exercise-capacity {
    display: none;
  }

  .exercise-meta {
    gap: 8px;
    flex-wrap: wrap;
  }

  .session-field {
    flex-basis: calc(50% - 9px);
  }

  .body-form-row {
    grid-template-columns: 1fr;
  }

  .body-preview-actions {
    flex-direction: column-reverse;
  }

  .body-preview-actions button {
    width: 100%;
  }

  .field-label {
    font-size: 9px;
  }

  .panel-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-actions {
    width: 100%;
  }

  .footer-actions button {
    flex: 1;
  }

  .side-column {
    display: flex;
  }

  .modal-layer {
    align-items: end;
    padding: 0;
  }

  .modal {
    max-height: calc(100vh - 17px);
    padding: 24px 20px 28px;
  }
}

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