:root {
  --bg: #fbfbfd;
  --card: #fff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --panel-soft: rgba(16, 22, 47, 0.035);
  --ink: #10162f;
  --muted: #677085;
  --soft: #a5adbb;
  --line: #eef0f4;
  --button: #161616;
  --hot: #ff5a48;
  --meal: #31c7c9;
  --carb: #36c783;
  --fat: #3f7df6;
  --protein: #ffa43a;
  --move: #3fc47a;
  --sleep: #8d5cf6;
  --water: #3f7df6;
  --radius: 22px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0d0e10;
  --card: #1a1b1f;
  --panel: rgba(28, 29, 34, 0.9);
  --panel-strong: rgba(35, 36, 42, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.055);
  --ink: #f5f6f4;
  --muted: #a7abb5;
  --soft: #777d8b;
  --line: rgba(255, 255, 255, 0.1);
  --button: #b8ff42;
  --hot: #ff3b32;
  --meal: #8eff3e;
  --carb: #9bff45;
  --fat: #8f63ff;
  --protein: #ffb13d;
  --move: #43e886;
  --sleep: #a06bff;
  --water: #4b8dff;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 183, 211, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 0%, rgba(188, 219, 255, 0.25), transparent 30rem),
    #f5f6f8;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-view {
  width: min(390px, 100%);
}

.auth-card {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 70px rgba(16, 22, 47, 0.08);
  backdrop-filter: blur(24px);
}

.brand-mark {
  font-size: 38px;
  font-weight: 850;
  letter-spacing: 0;
}

.auth-kicker {
  margin: 8px 0 28px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label,
.form-card,
.settings-list label {
  display: grid;
  gap: 8px;
}

.auth-form span,
.form-card span,
.settings-list label span {
  color: var(--muted);
  font-size: 13px;
}

.auth-form input,
.form-card input,
.form-card select,
.settings-list input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 15px 16px;
}

.auth-form button,
.save-button,
.settings-save {
  border: 0;
  border-radius: 17px;
  background: linear-gradient(#242424, #111);
  color: #fff;
  font-weight: 750;
  padding: 16px 18px;
}

.phone-view {
  position: relative;
  width: min(390px, 100%);
  height: min(844px, calc(100vh - 28px));
  min-height: 720px;
  overflow: hidden;
  border: 1px solid rgba(16, 22, 47, 0.08);
  border-radius: 38px;
  background: var(--bg);
  box-shadow: 0 28px 80px rgba(16, 22, 47, 0.12);
}

.is-hidden {
  display: none;
}

.statusbar {
  display: none;
}

.screen {
  position: absolute;
  inset: 0;
  overflow: auto;
  padding: 34px 22px 154px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.screen.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0;
  line-height: 1;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.header-actions button,
.date-switch button,
.settings-secondary button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.header-actions button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 0 -2px 18px;
}

.day {
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 0;
  min-height: 56px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.day b {
  color: var(--ink);
  font-size: 16px;
}

.day.is-current {
  border-color: rgba(238, 240, 244, 0.96);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(16, 22, 47, 0.07);
}

.calorie-hero,
.food-summary,
.save-feedback-card,
.card,
.structure-card,
.correction-card,
.form-card,
.settings-list,
.move-hero,
.move-panel,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(16, 22, 47, 0.035);
}

.calorie-hero {
  position: relative;
  padding: 25px 20px 24px;
  margin-bottom: 18px;
  border-radius: 25px;
  overflow: hidden;
}

.calorie-hero::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -28px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(114, 184, 255, 0.16), transparent 66%);
  pointer-events: none;
}

.calorie-hero strong,
.food-summary strong {
  font-size: 39px;
  font-weight: 850;
}

.calorie-hero span,
.food-summary span {
  font-weight: 750;
}

.calorie-hero p,
.food-summary p {
  margin: 5px 0 0;
  color: var(--muted);
}

.rainbow-track {
  position: relative;
  height: 12px;
  margin-top: 24px;
  border-radius: 999px;
  background: #f0f1f5;
  box-shadow: inset 0 1px 2px rgba(16, 22, 47, 0.04);
}

.rainbow-track i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff5948, #ff9d38, #f15bc6, #72b8ff);
  box-shadow: 0 8px 22px rgba(241, 91, 198, 0.16);
}

.rainbow-track b {
  position: absolute;
  top: 50%;
  width: 25px;
  height: 25px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: #6da5ff;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 24px rgba(92, 133, 245, 0.3);
}

.health-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 236px;
  gap: 14px;
}

.card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 0;
  padding: 17px 16px 15px;
  overflow: hidden;
  border-radius: 23px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.card.has-data {
  box-shadow: 0 16px 42px rgba(16, 22, 47, 0.055);
}

.card.is-empty-card {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(16, 22, 47, 0.026);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.metric-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 800;
}

.metric-title span {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.05;
}

.metric-title i,
.action-sheet i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 9px;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

.hot { background: var(--hot); }
.meal { background: var(--meal); }
.sleep { background: var(--sleep); }
.move { background: var(--move); }
.water { background: var(--water); }
.weight { background: var(--protein); }

.mini-ring,
.ring {
  display: inline-block;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: conic-gradient(currentColor var(--ring, 0%), #edf0f5 0);
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.68);
}

.card-hot .metric-title span,
.card-meal .metric-title span,
.card-weight .metric-title span,
.card-water .metric-title span,
.card-move .metric-title span {
  font-size: 14px;
}

.card-sleep .metric-title span {
  font-size: 16px;
}

.card small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 58px;
  margin-top: 15px;
  padding-top: 4px;
  border-bottom: 1px dashed rgba(207, 213, 223, 0.8);
}

.bar-chart i {
  flex: 1;
  min-width: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, currentColor, color-mix(in srgb, currentColor 78%, white));
  opacity: 0.9;
}

.card-hot .bar-chart {
  height: 80px;
  margin-top: 16px;
}

.card-empty {
  display: grid;
  place-items: center;
  min-height: 86px;
  margin-top: 16px;
  border: 1px dashed rgba(207, 213, 223, 0.72);
  border-radius: 18px;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(248, 249, 252, 0.62)),
    radial-gradient(circle at center, currentColor 0 2px, transparent 3px) 12px 13px / 34px 28px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.macro-lines {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

.macro-lines p {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.macro-lines i {
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  min-width: 5px;
}

.card-meal .macro-lines {
  gap: 23px;
  margin-top: 24px;
}

.card-meal .macro-lines i {
  height: 5px;
}

.sleep-dots {
  display: grid;
  place-items: center;
  height: 72px;
  margin-top: 24px;
  color: var(--muted);
  background: radial-gradient(circle, rgba(141, 92, 246, 0.12) 0 8%, transparent 9%) 0 0 / 34px 28px;
}

.manual-card-body {
  display: grid;
  grid-template-rows: 1fr auto auto;
  min-height: 0;
  gap: 6px;
  margin-top: 8px;
}

.sleep-bars {
  display: flex;
  align-items: end;
  gap: 7px;
  height: 50px;
  padding: 4px 0 0;
  border-bottom: 1px dashed rgba(141, 92, 246, 0.24);
}

.sleep-bars i {
  flex: 1;
  min-width: 5px;
  border-radius: 999px 999px 4px 4px;
  background: rgba(141, 92, 246, 0.13);
}

.sleep-bars i.is-active {
  background: linear-gradient(180deg, rgba(186, 139, 255, 0.9), rgba(111, 76, 228, 0.88));
}

.step-track {
  position: relative;
  align-self: end;
  height: 48px;
  border: 1px dashed rgba(63, 196, 122, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 72%, rgba(63, 196, 122, 0.16) 0 7px, transparent 8px),
    radial-gradient(circle at 49% 50%, rgba(63, 196, 122, 0.11) 0 10px, transparent 11px),
    radial-gradient(circle at 78% 67%, rgba(63, 196, 122, 0.14) 0 8px, transparent 9px);
}

.step-track i {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  height: 7px;
  border-radius: 999px;
  background: var(--move);
  box-shadow: 0 10px 22px rgba(63, 196, 122, 0.18);
}

.card-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.card-action-row small {
  margin-top: 0;
  min-width: 0;
}

.ghost-action {
  flex: 0 0 auto;
  min-width: 42px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 22, 47, 0.045);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.manual-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
}

.manual-actions .ghost-action:empty,
.manual-actions .ghost-action:not(:first-child) {
  display: none;
}

.manual-actions .primary-action:first-child {
  grid-column: 1 / -1;
}

.primary-action {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(16, 22, 47, 0.06);
  border-radius: 999px;
  background: rgba(16, 22, 47, 0.035);
  color: currentColor;
  font-size: 12px;
  font-weight: 850;
}

.water-scale {
  position: relative;
  overflow: hidden;
  height: 46px;
  margin-top: 10px;
  border-bottom: 1px solid var(--water);
  background: repeating-linear-gradient(180deg, transparent 0 11px, rgba(63, 125, 246, 0.28) 12px 13px);
}

.water-scale i {
  position: absolute;
  inset: auto 0 0;
  height: var(--water-fill, 0%);
  min-height: 2px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(114, 184, 255, 0.06), rgba(63, 125, 246, 0.26));
}

.water-card-body small {
  margin-top: 5px;
}

.water-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.water-actions button {
  min-width: 0;
  min-height: 32px;
  padding: 0 4px;
  border: 1px solid rgba(63, 125, 246, 0.14);
  border-radius: 999px;
  background: rgba(63, 125, 246, 0.08);
  color: var(--water);
  font-size: 11px;
  font-weight: 850;
}

.arc {
  position: relative;
  height: 45px;
  margin-top: 10px;
  border-top: 10px solid rgba(255, 162, 59, 0.42);
  border-radius: 110px 110px 0 0;
}

.arc i {
  position: absolute;
  left: var(--weight-dot, 12%);
  top: -12px;
  width: 16px;
  height: 16px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: var(--protein);
  box-shadow: 0 8px 20px rgba(255, 164, 58, 0.24);
}

.weight-card-body .primary-action {
  width: 100%;
  min-height: 32px;
  margin-top: 7px;
  border: 1px solid rgba(255, 164, 58, 0.18);
  border-radius: 999px;
  background: rgba(255, 164, 58, 0.1);
  color: var(--protein);
  font-size: 12px;
  font-weight: 850;
}

.date-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin: 6px 0 20px;
}

.date-switch button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 26px;
}

.food-summary {
  position: relative;
  padding: 22px 18px;
  margin-bottom: 24px;
}

.food-summary .donut,
.structure-main .donut {
  position: absolute;
  top: 22px;
  right: 20px;
}

.donut {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: conic-gradient(var(--carb) 0 var(--carb-share, 50%), var(--fat) 0 var(--fat-share, 72%), var(--protein) 0 100%);
  -webkit-mask: radial-gradient(circle, transparent 48%, #000 50%);
  mask: radial-gradient(circle, transparent 48%, #000 50%);
}

.macro-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 26px;
}

.macro-row div {
  display: grid;
  gap: 4px;
}

.macro-row b {
  font-size: 18px;
}

.macro-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.ring {
  width: 18px;
  height: 18px;
}

.carb { color: var(--carb); }
.fat { color: var(--fat); }
.protein { color: var(--protein); }

.ai-note {
  margin-top: 22px !important;
  line-height: 1.5;
}

.recommendation-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.recommendation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.recommendation-head span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.recommendation-head button {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  min-width: 78px;
  min-height: 32px;
  border: 1px solid rgba(63, 125, 246, 0.14);
  border-radius: 999px;
  background: #edf4ff;
  color: var(--water);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  box-shadow: none;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.recommendation-head button:disabled {
  cursor: wait;
  opacity: 1;
}

.recommendation-head button.is-loading {
  border-color: rgba(63, 125, 246, 0.22);
  background: #e7f0ff;
  color: var(--water);
}

.recommendation-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid rgba(238, 240, 244, 0.96);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  color: inherit;
  text-align: left;
}

.recommendation-card i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  color: #fff;
  font-style: normal;
  font-size: 14px;
  font-weight: 850;
}

.recommendation-card b,
.recommendation-card span {
  display: block;
  min-width: 0;
}

.recommendation-card b {
  color: var(--ink);
  font-size: 14px;
}

.recommendation-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.recommendation-card small {
  display: block;
  margin-top: 5px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.3;
}

.recommendation-card.protein i { background: var(--protein); }
.recommendation-card.carb i { background: var(--carb); }
.recommendation-card.light i { background: var(--move); }
.recommendation-card.water i { background: var(--water); }

.frequent-section {
  display: grid;
  gap: 12px;
  margin: 4px 0 22px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.section-title span {
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.section-title small {
  color: var(--muted);
  font-size: 12px;
}

.frequent-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(138px, 43%);
  gap: 12px;
  margin: 0 -18px;
  padding: 0 18px 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.frequent-list::-webkit-scrollbar {
  display: none;
}

.frequent-chip {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  min-height: 132px;
  border: 1px solid rgba(238, 240, 244, 0.9);
  border-radius: 20px;
  background:
    radial-gradient(circle at 82% 10%, rgba(16, 22, 47, 0.07), transparent 42%),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 38px rgba(16, 22, 47, 0.06);
  padding: 12px;
  color: var(--ink);
  text-align: left;
}

.frequent-chip.is-breakfast { background: radial-gradient(circle at 82% 10%, rgba(248, 165, 65, 0.16), transparent 42%), rgba(255, 255, 255, 0.9); }
.frequent-chip.is-lunch { background: radial-gradient(circle at 82% 10%, rgba(240, 96, 80, 0.14), transparent 42%), rgba(255, 255, 255, 0.9); }
.frequent-chip.is-dinner { background: radial-gradient(circle at 82% 10%, rgba(49, 199, 201, 0.14), transparent 42%), rgba(255, 255, 255, 0.9); }
.frequent-chip.is-snack { background: radial-gradient(circle at 82% 10%, rgba(132, 86, 236, 0.14), transparent 42%), rgba(255, 255, 255, 0.9); }

.frequent-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #f4f5f8;
  font-size: 21px;
}

.frequent-chip b {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  line-height: 1.25;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frequent-chip small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.3;
  font-size: 12px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.frequent-chip i {
  align-self: end;
  width: fit-content;
  margin-top: 11px;
  border-radius: 999px;
  background: rgba(16, 22, 47, 0.055);
  color: var(--ink);
  padding: 5px 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.frequent-chip em {
  position: absolute;
  top: 11px;
  right: 11px;
  border-radius: 999px;
  background: rgba(16, 22, 47, 0.06);
  color: var(--muted);
  padding: 3px 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.frequent-empty {
  min-height: 64px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(207, 213, 223, 0.9);
  border-radius: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.frequent-section.is-nudged .frequent-list {
  animation: frequentNudge 620ms ease;
}

@keyframes frequentNudge {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(8px); }
  70% { transform: translateX(-4px); }
}

.meal-list {
  display: grid;
  gap: 18px;
}

.save-feedback-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  margin: -2px 0 18px;
  padding: 12px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 8% 12%, rgba(54, 199, 131, 0.14), transparent 40%),
    rgba(255, 255, 255, 0.94);
}

.save-feedback-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(54, 199, 131, 0.14);
  color: var(--carb);
  font-size: 20px;
  font-weight: 950;
}

.save-feedback-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.save-feedback-copy b {
  color: var(--ink);
  font-size: 15px;
  font-weight: 920;
}

.save-feedback-copy span,
.save-feedback-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.35;
}

.save-feedback-card button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(238, 240, 244, 0.76);
  color: var(--muted);
  font-size: 18px;
  font-weight: 760;
}

.meal-group {
  display: grid;
  gap: 8px;
}

.meal-group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.meal-group-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.meal-group-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.meal-group-head strong {
  color: var(--hot);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.meal-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 1px solid rgba(238, 240, 244, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(16, 22, 47, 0.04);
  color: var(--ink);
  padding: 11px 12px;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.meal-item + .meal-item {
  margin-top: 2px;
}

.meal-item.is-just-saved {
  border-color: rgba(63, 125, 246, 0.32);
  background:
    radial-gradient(circle at 92% 16%, rgba(63, 125, 246, 0.12), transparent 38%),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(63, 125, 246, 0.13);
  transform: translateY(-1px);
}

.sticker {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #f5f6f8;
  font-size: 27px;
}

.meal-item.is-breakfast .sticker { background: rgba(248, 165, 65, 0.14); }
.meal-item.is-lunch .sticker { background: rgba(240, 96, 80, 0.12); }
.meal-item.is-dinner .sticker { background: rgba(49, 199, 201, 0.13); }
.meal-item.is-snack .sticker { background: rgba(132, 86, 236, 0.13); }

.meal-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.meal-line {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.meal-copy b {
  min-width: 0;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
  color: var(--ink);
  font-size: 15px;
}

.meal-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meal-copy em {
  flex: 0 0 auto;
  width: fit-content;
  border-radius: 999px;
  background: rgba(16, 22, 47, 0.06);
  color: var(--muted);
  padding: 2px 6px;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.meal-macros {
  color: #8b93a5;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meal-energy {
  display: grid;
  justify-items: end;
  gap: 1px;
  white-space: nowrap;
}

.meal-energy strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.meal-energy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.meal-chevron {
  color: #c4cad5;
  font-size: 22px;
  line-height: 1;
}

.tabbar {
  position: absolute;
  z-index: 35;
  left: 17px;
  right: 17px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr) 58px;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(238, 240, 244, 0.92);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(16, 22, 47, 0.11);
  backdrop-filter: blur(24px);
}

.tab,
.add-button {
  border: 0;
  background: transparent;
  color: #0e1328;
}

.tab {
  display: grid;
  place-items: center;
  gap: 1px;
  min-height: 50px;
  border-radius: 25px;
  font-size: 12px;
  font-weight: 750;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.tab i {
  font-style: normal;
  font-size: 19px;
}

.tab.is-active {
  background: rgba(16, 22, 47, 0.075);
  box-shadow: inset 0 0 0 1px rgba(16, 22, 47, 0.02);
}

.add-button {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(16, 22, 47, 0.1);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 252, 0.94));
  font-size: 31px;
  line-height: 1;
  box-shadow: 0 10px 26px rgba(16, 22, 47, 0.08);
  transition: transform 160ms ease;
}

.phone-view.menu-open .add-button {
  transform: rotate(45deg);
}

.action-scrim {
  position: absolute;
  z-index: 30;
  inset: 0;
  opacity: 0;
  background: rgba(18, 20, 28, 0.22);
  backdrop-filter: blur(5px);
  pointer-events: none;
  transition: opacity 160ms ease;
}

.action-sheet {
  position: absolute;
  z-index: 36;
  right: 28px;
  bottom: 96px;
  width: 250px;
  padding: 12px;
  border: 1px solid rgba(238, 240, 244, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 54px rgba(16, 22, 47, 0.16);
  backdrop-filter: blur(24px);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.phone-view.menu-open .action-scrim,
.phone-view.menu-open .action-sheet {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.action-sheet button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 18px;
  background: transparent;
  padding: 14px 10px;
  color: var(--ink);
  font-weight: 800;
}

.action-sheet span {
  color: var(--ink);
}

.app-toast {
  position: absolute;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 80;
  width: max-content;
  max-width: min(320px, calc(100% - 48px));
  border: 1px solid rgba(238, 240, 244, 0.9);
  border-radius: 999px;
  background: rgba(22, 22, 22, 0.9);
  color: #fff;
  box-shadow: 0 18px 52px rgba(16, 22, 47, 0.16);
  padding: 11px 15px;
  font-size: 13px;
  font-weight: 820;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.98);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(18px);
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.analysis-view,
.detail-view,
.share-view {
  position: absolute;
  inset: 0;
  z-index: 50;
  width: min(390px, 100%);
  height: min(844px, calc(100vh - 28px));
  min-height: 720px;
  margin: auto;
  overflow: hidden auto;
  overflow-x: hidden;
  border-radius: 38px;
  background: var(--bg);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.analysis-view.is-active,
.detail-view.is-active,
.share-view.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.float-close,
.float-pill {
  position: absolute;
  z-index: 4;
  top: 58px;
  border: 1px solid rgba(238, 240, 244, 0.88);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(16, 22, 47, 0.06);
  backdrop-filter: blur(18px);
}

.float-close {
  left: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 28px;
}

.float-pill {
  right: 22px;
  height: 44px;
  border-radius: 999px;
  padding: 0 18px;
}

.analysis-wash,
.detail-hero {
  position: relative;
  min-height: 278px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 203, 177, 0.36), transparent 38%),
    radial-gradient(circle at 76% 12%, rgba(239, 196, 255, 0.38), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), #fbfbfd);
}

.scan-food,
.food-sticker {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 58px;
  box-shadow: 0 18px 44px rgba(16, 22, 47, 0.08);
}

.scan-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 124px;
  height: 124px;
}

.scan-food.has-image {
  background-color: rgba(255, 255, 255, 0.82);
  background-position: center;
  background-size: cover;
  font-size: 0;
}

.scan-frame {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 111, 150, 0.23);
  border-radius: 34px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
  animation: scanPulse 1.8s ease-in-out infinite;
}

.analysis-wash p {
  margin: 0;
  color: var(--muted);
}

.analysis-wash p i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 2px;
  border-radius: 50%;
  background: var(--protein);
}

.analysis-wash p i:nth-child(2) { background: var(--sleep); }
.analysis-wash p i:nth-child(3) { background: var(--meal); }

@keyframes scanPulse {
  0%, 100% {
    transform: scale(0.98);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.95;
  }
}

.skeletons {
  display: grid;
  gap: 14px;
  padding: 0 22px 30px;
}

.skeletons span,
.skeletons div {
  min-height: 78px;
  border: 1px solid rgba(238, 240, 244, 0.66);
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.86), rgba(239, 196, 255, 0.14), rgba(255, 255, 255, 0.8));
  filter: blur(0.2px);
}

.skeletons div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  border: 0;
  background: transparent;
}

.share-view {
  background:
    radial-gradient(circle at 28% 12%, rgba(255, 203, 177, 0.26), transparent 38%),
    radial-gradient(circle at 78% 0%, rgba(239, 196, 255, 0.32), transparent 44%),
    #fbfbfd;
}

.share-stage {
  min-height: 100%;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 92px 22px 30px;
}

.share-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 22px;
  border: 1px solid rgba(238, 240, 244, 0.94);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(16, 22, 47, 0.1);
}

.share-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 14px;
  background:
    radial-gradient(circle at 8px 0, transparent 8px, #fff 8.5px) 0 0 / 18px 14px repeat-x;
}

.share-printer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  margin: -4px -4px 22px;
  padding: 0 12px;
  border-radius: 12px;
  background: #f7f8fa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.share-printer i {
  width: 8px;
  height: 24px;
  border-radius: 999px;
  background: var(--move);
  box-shadow: 0 0 18px rgba(63, 196, 122, 0.45);
}

.share-card header {
  position: relative;
  padding-bottom: 18px;
}

.share-card header p {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
}

.share-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0;
}

.share-card h2 span {
  font-size: 18px;
}

.share-card header small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.share-macros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px 0 18px;
  border-top: 1px dashed #d9dde6;
  border-bottom: 1px dashed #d9dde6;
}

.share-macros div {
  display: grid;
  gap: 3px;
}

.share-macros b {
  color: var(--ink);
  font-size: 17px;
}

.share-macros span {
  color: var(--muted);
  font-size: 12px;
}

.share-meals {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.share-meals li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.share-food-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #f4f5f8;
  font-size: 22px;
}

.share-meals b,
.share-meals small {
  display: block;
  min-width: 0;
}

.share-meals b {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.share-meals small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.share-meals strong {
  color: var(--ink);
  white-space: nowrap;
  font-size: 14px;
}

.share-empty {
  grid-template-columns: 1fr !important;
  min-height: 80px;
  place-items: center;
  border: 1px dashed rgba(207, 213, 223, 0.9);
  border-radius: 16px;
  color: var(--muted);
  font-weight: 750;
}

.share-card footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed #d9dde6;
  color: var(--muted);
  font-size: 12px;
}

.share-card footer b {
  color: var(--ink);
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.share-actions button {
  min-height: 48px;
  border: 1px solid rgba(238, 240, 244, 0.94);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 12px 34px rgba(16, 22, 47, 0.08);
}

.share-actions button:first-child {
  background: linear-gradient(#242424, #111);
  color: #fff;
}

.food-title {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  width: min(310px, calc(100% - 86px));
}

.food-title textarea {
  width: 100%;
  min-width: 0;
  max-height: 82px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: clamp(22px, 6.3vw, 31px);
  font-weight: 850;
  text-align: center;
  line-height: 1.22;
  resize: none;
  overflow: hidden;
  outline: 0;
}

.food-title span {
  color: var(--fat);
}

.detail-source {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  max-width: calc(100% - 112px);
  border: 1px solid rgba(238, 240, 244, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 6px 11px;
  color: var(--muted);
  box-shadow: 0 12px 30px rgba(16, 22, 47, 0.05);
  backdrop-filter: blur(18px);
}

.detail-source b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 880;
  white-space: nowrap;
}

.detail-source span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-source.source-recommendation {
  background: rgba(255, 248, 238, 0.78);
  border-color: rgba(247, 163, 58, 0.18);
}

.detail-source.source-recommendation b {
  color: var(--protein);
}

.detail-source.source-photo,
.detail-source.source-upload {
  background: rgba(239, 248, 255, 0.78);
  border-color: rgba(86, 159, 247, 0.18);
}

.detail-source.source-photo b,
.detail-source.source-upload b {
  color: var(--water);
}

.detail-source.source-text,
.detail-source.source-template {
  background: rgba(246, 242, 255, 0.78);
  border-color: rgba(132, 86, 239, 0.16);
}

.detail-source.source-text b,
.detail-source.source-template b {
  color: var(--sleep);
}

.detail-form {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  padding: 0 22px calc(104px + env(safe-area-inset-bottom));
}

.detail-form > * {
  min-width: 0;
  max-width: 100%;
}

.recognition-insight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(247, 163, 58, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 12%, rgba(247, 163, 58, 0.12), transparent 34%),
    rgba(255, 249, 241, 0.78);
  box-shadow: 0 14px 36px rgba(16, 22, 47, 0.045);
  padding: 12px 14px;
}

.recognition-insight::before {
  content: "!";
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgba(247, 163, 58, 0.16);
  color: var(--protein);
  font-size: 14px;
  font-weight: 900;
}

.recognition-insight div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.recognition-insight b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.recognition-insight span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 690;
  line-height: 1.45;
}

.structure-card {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 24px;
  box-shadow: 0 16px 46px rgba(16, 22, 47, 0.06);
}

.structure-main {
  position: relative;
  min-height: 92px;
  padding-top: 14px;
}

.structure-main label {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: baseline;
  gap: 8px;
  max-width: calc(100% - 78px);
}

.structure-main input,
.macro-edit input {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 850;
  outline: 0;
}

.structure-main input {
  box-sizing: content-box;
  width: 5.8ch;
  min-width: 160px;
  max-width: 188px;
  padding: 0 8px 0 0;
  font-size: clamp(36px, 10.5vw, 43px);
  letter-spacing: 0;
  text-align: left;
  -moz-appearance: textfield;
}

.structure-main input::-webkit-outer-spin-button,
.structure-main input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.structure-main small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}

.macro-edit {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}

.macro-edit label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 3px;
  row-gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.macro-edit label span {
  flex: 0 0 100%;
}

.macro-edit input {
  box-sizing: content-box;
  width: 2.6ch;
  min-height: 32px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  text-align: left;
  -moz-appearance: textfield;
}

.macro-edit input::-webkit-outer-spin-button,
.macro-edit input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.macro-edit b {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.form-card {
  padding: 15px 16px;
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(16, 22, 47, 0.045);
}

.form-card input,
.form-card select,
.form-card textarea {
  border: 0;
  border-radius: 0;
  min-height: 36px;
  padding: 6px 0;
  font-weight: 750;
}

.form-card textarea {
  width: 100%;
  min-height: 88px;
  overflow: hidden;
  resize: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  line-height: 1.5;
  outline: 0;
}

.note-card {
  background: rgba(255, 255, 255, 0.9);
}

.note-card textarea {
  color: var(--muted);
  font-weight: 650;
}

.recognition-feedback-card {
  display: grid;
  gap: 12px;
}

.recognition-feedback-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.recognition-feedback-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.recognition-feedback-actions button.is-sent {
  border-color: rgba(63, 125, 246, 0.2);
  background: rgba(63, 125, 246, 0.08);
  color: var(--fat);
}

.candidate-card {
  padding: 14px 0 16px 16px;
  overflow: hidden;
  border: 1px solid rgba(238, 240, 244, 0.94);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 8%, rgba(63, 125, 246, 0.1), transparent 38%),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 34px rgba(16, 22, 47, 0.05);
}

.candidate-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px 12px 0;
}

.candidate-head span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.candidate-head small {
  color: var(--muted);
  font-size: 12px;
}

.candidate-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 2px 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.candidate-option {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  align-items: start;
  column-gap: 10px;
  flex: 0 0 252px;
  min-height: 122px;
  border: 1px solid rgba(238, 240, 244, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  padding: 12px;
  color: var(--ink);
  text-align: left;
  scroll-snap-align: start;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.candidate-option.is-selected {
  border-color: rgba(63, 125, 246, 0.36);
  box-shadow: 0 14px 34px rgba(63, 125, 246, 0.12);
  transform: translateY(-1px);
}

.candidate-option span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: #f4f5f8;
  font-size: 21px;
}

.candidate-option b {
  min-width: 0;
  color: var(--ink);
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.candidate-title {
  grid-column: 2 / 3;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}

.candidate-title b {
  flex: 1 1 auto;
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.candidate-option small {
  grid-column: 2 / 3;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.candidate-option em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(16, 22, 47, 0.06);
  color: var(--muted);
  padding: 3px 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.candidate-option p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.candidate-status {
  margin: 10px 16px 0 0;
  border: 1px solid rgba(238, 240, 244, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.serving-card {
  display: grid;
  gap: 8px;
}

.serving-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.serving-quick button {
  min-height: 38px;
  border: 1px solid rgba(238, 240, 244, 0.92);
  border-radius: 14px;
  background: rgba(16, 22, 47, 0.035);
  color: var(--ink);
  font-weight: 780;
}

.correction-card {
  display: grid;
  gap: 12px;
  padding: 15px 16px;
  max-width: 100%;
  min-width: 0;
}

.correction-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.correction-head span {
  color: var(--muted);
  font-size: 13px;
}

.correction-head small {
  color: var(--soft);
  font-size: 11px;
  text-align: right;
}

.correction-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.recommendation-action-card {
  gap: 12px;
}

.recommendation-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.recommendation-action-buttons button {
  min-height: 40px;
  border: 1px solid rgba(63, 125, 246, 0.14);
  border-radius: 15px;
  background: rgba(63, 125, 246, 0.08);
  color: var(--water);
  font-weight: 850;
}

.recommendation-action-buttons button:disabled {
  opacity: 1;
}

.recommendation-action-buttons button.is-loading {
  background: rgba(63, 125, 246, 0.12);
  color: var(--water);
}

#takeoutKeywords {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

#cookingMethod {
  margin: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.035);
  color: var(--ink);
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.5;
}

.replacement-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.replacement-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.replacement-list b {
  border-radius: 999px;
  background: rgba(255, 168, 46, 0.1);
  color: var(--weight);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 820;
}

.takeout-results {
  display: grid;
  gap: 8px;
}

.takeout-results > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
}

.takeout-list {
  display: grid;
  gap: 8px;
}

.takeout-item {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
}

.takeout-item b {
  color: var(--water);
  font-size: 11px;
}

.takeout-item strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.takeout-item span,
.takeout-item small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.38;
}

.takeout-item em {
  justify-self: start;
  border-radius: 999px;
  background: rgba(63, 125, 246, 0.08);
  color: var(--water);
  padding: 5px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
}

#shoppingList {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#shoppingList li {
  border-radius: 999px;
  background: rgba(54, 199, 131, 0.1);
  color: var(--carb);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 820;
}

.correction-actions button,
.per100-row button {
  min-height: 38px;
  border: 1px solid rgba(238, 240, 244, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 780;
}

.correction-actions button:nth-child(1) {
  color: var(--meal);
  background: rgba(49, 199, 201, 0.08);
}

.correction-actions button:nth-child(2) {
  color: var(--hot);
  background: rgba(255, 90, 72, 0.08);
}

.correction-actions button:nth-child(3) {
  color: var(--protein);
  background: rgba(255, 164, 58, 0.1);
}

.correction-actions button:nth-child(4) {
  color: var(--fat);
  background: rgba(63, 125, 246, 0.08);
}

.serving-estimate-card {
  gap: 12px;
}

.estimate-breakdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.estimate-breakdown div {
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid rgba(238, 240, 244, 0.92);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.74);
}

.estimate-breakdown b,
.estimate-breakdown span,
.estimate-breakdown small {
  display: inline-block;
}

.estimate-breakdown b {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.estimate-breakdown span {
  margin-left: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.estimate-breakdown small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.15;
}

#estimateSource {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
}

.nutrition-grid label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 3px 8px;
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid rgba(238, 240, 244, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.nutrition-grid span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.nutrition-grid input {
  min-width: 0;
  width: 100%;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  outline: 0;
}

.nutrition-grid b {
  color: var(--muted);
  font-size: 12px;
}

.per100-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
}

.per100-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.per100-row button {
  padding: 0 12px;
  width: 100%;
}

.date-card input {
  color-scheme: light;
}

.date-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.date-quick button {
  min-height: 38px;
  border: 1px solid rgba(238, 240, 244, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 780;
}

.date-quick button:nth-child(2) {
  color: var(--ink);
  background: rgba(16, 22, 47, 0.06);
}

.form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.save-button {
  margin-top: 0;
  box-shadow: 0 16px 36px rgba(16, 22, 47, 0.12);
}

.detail-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: grid;
  justify-items: center;
  margin: 10px 0 0;
  padding: 14px 0 calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(251, 251, 253, 0), rgba(251, 251, 253, 0.92) 24%, rgba(251, 251, 253, 0.98));
  backdrop-filter: blur(18px);
}

.detail-save-bar p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-align: center;
}

.detail-save-bar .save-button {
  width: 100%;
  max-width: 100%;
  min-height: 56px;
  border-radius: 19px;
}

.empty-state,
.settings-list {
  padding: 18px;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(63, 196, 122, 0.1);
  color: var(--move);
  font-weight: 850;
}

.empty-state h2 {
  margin: 20px 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.move-hero,
.move-panel {
  padding: 20px;
}

.move-hero {
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
  border-radius: 28px;
  overflow: hidden;
}

.move-hero-top,
.move-meta,
.move-panel-title,
.move-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.move-hero-top span,
.move-panel-title small,
.move-log-item span,
.move-meta {
  color: var(--muted);
}

.move-hero-top strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 23px;
  font-weight: 850;
}

.move-hero-top strong b {
  font-size: 48px;
  line-height: 0.96;
  letter-spacing: 0;
}

.move-hero-top i {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 21px;
  background: rgba(63, 196, 122, 0.12);
  color: var(--move);
  font-style: normal;
  font-weight: 850;
}

.move-progress {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f5;
}

.move-progress i {
  display: block;
  width: 0;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(63, 196, 122, 0.95), rgba(63, 125, 246, 0.86));
  transition: width 240ms ease;
}

.move-meta {
  font-size: 13px;
  font-weight: 720;
}

.move-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

.move-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.move-activity-total {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.move-stats div {
  min-height: 70px;
  padding: 13px 14px;
  border: 1px solid rgba(229, 232, 238, 0.86);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.66);
}

.move-activity-total div {
  min-height: 86px;
  padding: 15px 16px;
  border: 1px solid rgba(229, 232, 238, 0.86);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 10%, rgba(63, 196, 122, 0.12), transparent 34%),
    rgba(248, 250, 252, 0.66);
}

.move-stats b {
  display: block;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.05;
}

.move-activity-total strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.05;
  font-weight: 900;
}

.move-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.move-activity-total span,
.move-footnote {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.move-footnote {
  margin: -4px 0 0;
  line-height: 1.45;
}

.move-actions .ghost-action {
  min-width: 72px;
}

.move-panel {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.move-panel-title span {
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.move-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.move-intensity {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 82px;
  padding: 10px 4px 0;
  border-bottom: 1px dashed rgba(63, 196, 122, 0.28);
}

.move-intensity i {
  flex: 1;
  min-width: 12px;
  border-radius: 999px 999px 4px 4px;
  background: rgba(63, 196, 122, 0.12);
}

.move-intensity i.is-active {
  background: linear-gradient(180deg, rgba(94, 214, 144, 0.94), rgba(44, 179, 105, 0.9));
  box-shadow: 0 14px 28px rgba(63, 196, 122, 0.18);
}

.move-log-list {
  display: grid;
  gap: 10px;
}

.move-log-item {
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid rgba(229, 232, 238, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.move-log-item strong,
.move-empty-log {
  color: var(--ink);
  font-weight: 850;
}

.move-log-item span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 720;
}

.move-log-item small {
  color: var(--muted);
  font-weight: 760;
}

.move-empty-log {
  display: grid;
  place-items: center;
  min-height: 82px;
  border: 1px dashed rgba(207, 213, 223, 0.78);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

.settings-list {
  display: grid;
  gap: 14px;
}

.settings-panel {
  overflow: hidden;
  padding: 0;
}

.settings-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(63, 125, 246, 0.1), transparent 13rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 255, 0.88));
}

.settings-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(180deg, #191f36, #080b15);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(16, 22, 47, 0.14);
}

.settings-hero div:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.settings-hero span,
.settings-hero small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.settings-hero strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1.05;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-group {
  display: grid;
  gap: 13px;
  padding: 17px 18px 18px;
  border-top: 1px solid var(--line);
}

.settings-group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.settings-group-head b {
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.settings-group-head span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 760;
  text-align: right;
}

.settings-target-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settings-goal-main {
  grid-column: 1 / -1;
}

.settings-theme {
  display: grid;
  gap: 8px;
}

.settings-theme > span {
  color: var(--muted);
  font-size: 13px;
}

.theme-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-height: 48px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(16, 22, 47, 0.035);
}

.theme-toggle button {
  min-width: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.theme-toggle button.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(16, 22, 47, 0.08);
}

.settings-list input {
  min-height: 48px;
  padding: 12px 14px;
  font-weight: 750;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.settings-secondary button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  padding: 0 14px;
  color: var(--ink);
  font-weight: 850;
}

.settings-secondary .settings-group-head {
  padding: 17px 18px 0;
}

.settings-secondary button {
  margin: 0 18px;
}

.settings-secondary button:last-child {
  margin-bottom: 18px;
}

.settings-list b {
  color: var(--muted);
}

.ai-status-panel .ai-usage-grid b,
.ai-status-panel .ai-recent b,
.ai-status-panel .settings-group-head b {
  color: var(--ink);
}

.settings-secondary {
  margin-top: 14px;
}

.settings-save {
  margin: 0 18px 18px;
  min-height: 50px;
}

.ai-status-panel {
  margin-top: 14px;
  padding: 17px 18px 18px;
}

.ai-status-card {
  display: grid;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 8%, rgba(63, 125, 246, 0.14), transparent 8rem),
    rgba(255, 255, 255, 0.62);
}

.ai-status-main {
  display: grid;
  gap: 5px;
}

.ai-status-main span {
  justify-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(105, 155, 246, 0.12);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.ai-status-card.is-enabled .ai-status-main span {
  background: rgba(255, 90, 72, 0.12);
  color: var(--hot);
}

.ai-status-card.is-failed .ai-status-main span {
  background: rgba(255, 169, 64, 0.14);
  color: var(--orange);
}

.ai-status-main strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.18;
  font-weight: 900;
}

.ai-status-main small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 720;
}

.ai-usage-meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 22, 47, 0.06);
}

.ai-usage-meter i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60c786, #6aa1ff);
  transition: width 220ms ease;
}

.ai-status-card.is-enabled .ai-usage-meter i {
  background: linear-gradient(90deg, #ff6b57, #ffa940);
}

.ai-usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.ai-usage-grid div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.54);
}

.ai-usage-grid span,
.ai-recent span,
.ai-recent p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 720;
}

.ai-usage-grid b,
.ai-recent b {
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-recent {
  display: grid;
  gap: 8px;
}

.ai-recent div,
.ai-recent p {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
}

.ai-recent div {
  display: grid;
  gap: 3px;
}

.ai-refresh-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-weight: 900;
}

.ai-refresh-button:disabled {
  color: var(--soft);
}

.delete-button {
  min-height: 50px;
  border: 1px solid rgba(255, 90, 72, 0.16);
  border-radius: 17px;
  background: rgba(255, 90, 72, 0.06);
  color: var(--hot);
  font-weight: 750;
}

@media (max-width: 520px) {
  html,
  body {
    min-height: 100%;
    overflow-x: hidden;
  }

  body {
    min-height: 100dvh;
    background: var(--bg);
    -webkit-overflow-scrolling: touch;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
    padding: 0;
    background: var(--bg);
  }

  .phone-view {
    width: 100vw;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    display: none;
    position: relative;
    inset: auto;
    min-height: 100dvh;
    overflow: visible;
    padding: 34px 22px calc(126px + env(safe-area-inset-bottom));
    opacity: 1;
    transform: none;
    transition: none;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
  }

  .screen.is-active {
    display: block;
    transform: none;
  }

  .tabbar {
    position: fixed;
    left: max(14px, env(safe-area-inset-left));
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 70;
    padding: 7px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .action-scrim {
    position: fixed;
    z-index: 75;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .action-sheet {
    position: fixed;
    z-index: 80;
    right: max(24px, env(safe-area-inset-right));
    bottom: calc(88px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .app-toast {
    position: fixed;
    bottom: calc(90px + env(safe-area-inset-bottom));
  }

  .analysis-view,
  .detail-view,
  .share-view {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    -webkit-overflow-scrolling: touch;
  }

  .auth-view {
    width: 100%;
    padding: 18px;
  }
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 2%, rgba(143, 255, 62, 0.16), transparent 25rem),
    radial-gradient(circle at 88% 94%, rgba(143, 99, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 4%, rgba(255, 59, 50, 0.08), transparent 20rem),
    #090a0b;
}

/* Dark report-inspired skin. Keeps the current Orea-like structure, changes only the visual system. */
html[data-theme="dark"] body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  background:
    linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, 0.035) 39% 40%, transparent 41%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 12px);
  mix-blend-mode: screen;
}

html[data-theme="dark"] .auth-card,


html[data-theme="dark"] .calorie-hero,


html[data-theme="dark"] .food-summary,


html[data-theme="dark"] .save-feedback-card,


html[data-theme="dark"] .card,


html[data-theme="dark"] .structure-card,


html[data-theme="dark"] .correction-card,


html[data-theme="dark"] .form-card,


html[data-theme="dark"] .settings-list,


html[data-theme="dark"] .move-hero,


html[data-theme="dark"] .move-panel,


html[data-theme="dark"] .empty-state,


html[data-theme="dark"] .recommendation-card,


html[data-theme="dark"] .frequent-chip,


html[data-theme="dark"] .meal-item,


html[data-theme="dark"] .tabbar,


html[data-theme="dark"] .action-sheet,


html[data-theme="dark"] .share-card,


html[data-theme="dark"] .detail-source,


html[data-theme="dark"] .recognition-insight,


html[data-theme="dark"] .candidate-card,


html[data-theme="dark"] .candidate-option,


html[data-theme="dark"] .candidate-status,


html[data-theme="dark"] .estimate-breakdown div,


html[data-theme="dark"] .nutrition-grid label{
  border-color: var(--line);
  background: var(--panel);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .phone-view,


html[data-theme="dark"] .analysis-view,


html[data-theme="dark"] .detail-view,


html[data-theme="dark"] .share-view{
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 14% 0%, rgba(143, 255, 62, 0.08), transparent 17rem),
    radial-gradient(circle at 88% 100%, rgba(143, 99, 255, 0.12), transparent 22rem),
    var(--bg);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.52);
}

html[data-theme="dark"] .screen,


html[data-theme="dark"] .detail-form,


html[data-theme="dark"] .share-stage{
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

html[data-theme="dark"] .auth-form input,


html[data-theme="dark"] .form-card input,


html[data-theme="dark"] .form-card select,


html[data-theme="dark"] .settings-list input,


html[data-theme="dark"] .form-card textarea,


html[data-theme="dark"] .food-title textarea,


html[data-theme="dark"] .structure-main input,


html[data-theme="dark"] .macro-edit input,


html[data-theme="dark"] .nutrition-grid input{
  color: var(--ink);
  background: transparent;
}

html[data-theme="dark"] .auth-form input,


html[data-theme="dark"] .form-card input,


html[data-theme="dark"] .form-card select,


html[data-theme="dark"] .settings-list input{
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .form-card input,


html[data-theme="dark"] .form-card select{
  border: 0;
  background: transparent;
}

html[data-theme="dark"] .auth-form button,


html[data-theme="dark"] .save-button,


html[data-theme="dark"] .settings-save,


html[data-theme="dark"] .share-actions button:first-child{
  background: linear-gradient(180deg, #c9ff62, #89e936);
  color: #081008;
  box-shadow: 0 18px 42px rgba(143, 255, 62, 0.18);
}

html[data-theme="dark"] .header-actions button,


html[data-theme="dark"] .date-switch button,


html[data-theme="dark"] .settings-secondary button,


html[data-theme="dark"] .float-close,


html[data-theme="dark"] .float-pill,


html[data-theme="dark"] .serving-quick button,


html[data-theme="dark"] .correction-actions button,
html[data-theme="dark"] .recognition-feedback-actions button,


html[data-theme="dark"] .per100-row button,


html[data-theme="dark"] .date-quick button,


html[data-theme="dark"] .share-actions button{
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.065);
  color: var(--ink);
}

html[data-theme="dark"] .day.is-current,


html[data-theme="dark"] .card.is-empty-card,


html[data-theme="dark"] .note-card,


html[data-theme="dark"] .detail-source,


html[data-theme="dark"] .share-actions button,


html[data-theme="dark"] .candidate-status{
  background: rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .calorie-hero::after{
  background: radial-gradient(circle, rgba(184, 255, 66, 0.18), transparent 66%);
}

html[data-theme="dark"] .move-progress {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .move-log-item {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .move-stats div {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

html[data-theme="dark"] .move-activity-total div {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 92% 10%, rgba(184, 255, 66, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.045);
}

html[data-theme="dark"] .move-empty-log {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

html[data-theme="dark"] .rainbow-track{
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .rainbow-track i{
  background: linear-gradient(90deg, #ff3b32, #ffb13d, #8f63ff, #b8ff42);
  box-shadow: 0 10px 28px rgba(184, 255, 66, 0.2);
}

html[data-theme="dark"] .rainbow-track b,


html[data-theme="dark"] .arc i{
  border-color: rgba(13, 14, 16, 0.92);
}

html[data-theme="dark"] .rainbow-track b{
  background: #b8ff42;
  box-shadow: 0 0 0 5px rgba(184, 255, 66, 0.12), 0 10px 28px rgba(184, 255, 66, 0.28);
}

html[data-theme="dark"] .mini-ring,


html[data-theme="dark"] .ring{
  background: conic-gradient(currentColor var(--ring, 0%), rgba(255, 255, 255, 0.12) 0);
  box-shadow: inset 0 0 0 7px rgba(13, 14, 16, 0.62);
}

html[data-theme="dark"] .card-empty{
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
    radial-gradient(circle at center, currentColor 0 2px, transparent 3px) 12px 13px / 34px 28px;
}

html[data-theme="dark"] .bar-chart,


html[data-theme="dark"] .sleep-bars,


html[data-theme="dark"] .macro-edit,


html[data-theme="dark"] .share-macros,


html[data-theme="dark"] .share-card footer{
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .ghost-action,


html[data-theme="dark"] .primary-action,


html[data-theme="dark"] .frequent-chip i,


html[data-theme="dark"] .frequent-chip em,


html[data-theme="dark"] .meal-copy em,


html[data-theme="dark"] .candidate-option em,


html[data-theme="dark"] .date-quick button:nth-child(2){
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

html[data-theme="dark"] .card-action-row .primary-action,


html[data-theme="dark"] .manual-actions .primary-action{
  background: rgba(184, 255, 66, 0.1);
}

html[data-theme="dark"] .frequent-chip.is-breakfast{ background: radial-gradient(circle at 82% 10%, rgba(255, 177, 61, 0.16), transparent 42%), var(--panel); }
html[data-theme="dark"] .frequent-chip.is-lunch{ background: radial-gradient(circle at 82% 10%, rgba(255, 59, 50, 0.14), transparent 42%), var(--panel); }
html[data-theme="dark"] .frequent-chip.is-dinner{ background: radial-gradient(circle at 82% 10%, rgba(142, 255, 62, 0.14), transparent 42%), var(--panel); }
html[data-theme="dark"] .frequent-chip.is-snack{ background: radial-gradient(circle at 82% 10%, rgba(143, 99, 255, 0.16), transparent 42%), var(--panel); }

html[data-theme="dark"] .frequent-icon,


html[data-theme="dark"] .sticker,


html[data-theme="dark"] .candidate-option span,


html[data-theme="dark"] .share-food-icon{
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .meal-item.is-just-saved{
  border-color: rgba(184, 255, 66, 0.32);
  background:
    radial-gradient(circle at 92% 16%, rgba(184, 255, 66, 0.14), transparent 38%),
    var(--panel-strong);
  box-shadow: 0 16px 38px rgba(184, 255, 66, 0.13);
}

html[data-theme="dark"] .tab,


html[data-theme="dark"] .add-button{
  color: var(--ink);
}

html[data-theme="dark"] .tabbar{
  background: rgba(22, 23, 27, 0.82);
  backdrop-filter: blur(28px);
}

html[data-theme="dark"] .tab.is-active{
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .add-button{
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.055));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .action-scrim{
  background: rgba(2, 3, 5, 0.48);
}

html[data-theme="dark"] .app-toast{
  border-color: rgba(184, 255, 66, 0.18);
  background: rgba(16, 18, 14, 0.94);
  color: var(--ink);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] .analysis-wash,


html[data-theme="dark"] .detail-hero{
  background:
    radial-gradient(circle at 22% 10%, rgba(184, 255, 66, 0.13), transparent 34%),
    radial-gradient(circle at 76% 8%, rgba(143, 99, 255, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(13, 14, 16, 0));
}

html[data-theme="dark"] .scan-food,


html[data-theme="dark"] .food-sticker{
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .scan-food.has-image{
  background-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .scan-frame{
  border-color: rgba(184, 255, 66, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 34px rgba(184, 255, 66, 0.12);
}

html[data-theme="dark"] .skeletons span,


html[data-theme="dark"] .skeletons div{
  border-color: var(--line);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.055), rgba(184, 255, 66, 0.08), rgba(255, 255, 255, 0.04));
}

html[data-theme="dark"] .share-view{
  background:
    radial-gradient(circle at 18% 10%, rgba(184, 255, 66, 0.14), transparent 34%),
    radial-gradient(circle at 88% 90%, rgba(143, 99, 255, 0.18), transparent 42%),
    var(--bg);
}

html[data-theme="dark"] .share-card::after{
  background:
    radial-gradient(circle at 8px 0, transparent 8px, #1a1b1f 8.5px) 0 0 / 18px 14px repeat-x;
}

html[data-theme="dark"] .share-printer{
  background: rgba(255, 255, 255, 0.065);
}

html[data-theme="dark"] .detail-source.source-recommendation,


html[data-theme="dark"] .detail-source.source-photo,


html[data-theme="dark"] .detail-source.source-upload,


html[data-theme="dark"] .detail-source.source-text,


html[data-theme="dark"] .detail-source.source-template{
  background: rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .recognition-insight{
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 177, 61, 0.14), transparent 34%),
    rgba(255, 177, 61, 0.07);
}

html[data-theme="dark"] .candidate-card{
  background:
    radial-gradient(circle at 92% 8%, rgba(184, 255, 66, 0.1), transparent 38%),
    var(--panel);
}

html[data-theme="dark"] .candidate-option.is-selected{
  border-color: rgba(184, 255, 66, 0.36);
  box-shadow: 0 14px 34px rgba(184, 255, 66, 0.12);
}

html[data-theme="dark"] .correction-actions button:nth-child(1),


html[data-theme="dark"] .correction-actions button:nth-child(2),


html[data-theme="dark"] .correction-actions button:nth-child(3),


html[data-theme="dark"] .correction-actions button:nth-child(4),


html[data-theme="dark"] .recommendation-action-buttons button,
html[data-theme="dark"] .recognition-feedback-actions button,


html[data-theme="dark"] .water-actions button,


html[data-theme="dark"] .weight-card-body .primary-action{
  background: rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .recommendation-action-buttons button {
  border-color: rgba(184, 255, 66, 0.16);
  color: var(--meal);
}

html[data-theme="dark"] .recognition-feedback-actions button.is-sent {
  border-color: rgba(84, 150, 255, 0.3);
  background: rgba(84, 150, 255, 0.12);
  color: #8db8ff;
}

html[data-theme="dark"] #shoppingList li {
  background: rgba(184, 255, 66, 0.1);
  color: var(--meal);
}

html[data-theme="dark"] .replacement-list b {
  background: rgba(255, 168, 46, 0.12);
}

html[data-theme="dark"] #cookingMethod {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .takeout-item {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .takeout-item b,
html[data-theme="dark"] .takeout-item em {
  color: var(--meal);
}

html[data-theme="dark"] .takeout-item em {
  background: rgba(184, 255, 66, 0.1);
}

html[data-theme="dark"] .save-feedback-icon {
  background: rgba(184, 255, 66, 0.12);
  color: var(--meal);
}

html[data-theme="dark"] .save-feedback-card button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

html[data-theme="dark"] .estimate-breakdown div,


html[data-theme="dark"] .nutrition-grid label{
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .date-card input{
  color-scheme: dark;
}

html[data-theme="dark"] .delete-button{
  background: rgba(255, 59, 50, 0.08);
}

html[data-theme="dark"] .detail-save-bar{
  background: linear-gradient(180deg, rgba(13, 14, 16, 0), rgba(13, 14, 16, 0.9) 24%, rgba(13, 14, 16, 0.98));
}

html[data-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .settings-hero {
  background:
    radial-gradient(circle at 10% 0%, rgba(184, 255, 66, 0.16), transparent 13rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
}

html[data-theme="dark"] .settings-avatar {
  background: linear-gradient(180deg, #c9ff62, #89e936);
  color: #081008;
  box-shadow: 0 18px 42px rgba(143, 255, 62, 0.16);
}

html[data-theme="dark"] .theme-toggle button.is-active {
  background: linear-gradient(180deg, rgba(184, 255, 66, 0.22), rgba(184, 255, 66, 0.11));
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(184, 255, 66, 0.12);
}

html[data-theme="dark"] .recommendation-head button {
  border-color: rgba(184, 255, 66, 0.18);
  background: rgba(184, 255, 66, 0.16);
  color: var(--meal);
}

html[data-theme="dark"] .recommendation-head button.is-loading {
  border-color: rgba(184, 255, 66, 0.28);
  background: rgba(184, 255, 66, 0.2);
}

html[data-theme="dark"] .ai-status-card {
  background:
    radial-gradient(circle at 90% 8%, rgba(184, 255, 66, 0.13), transparent 8rem),
    rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .ai-status-main span {
  background: rgba(184, 255, 66, 0.13);
  color: var(--meal);
}

html[data-theme="dark"] .ai-status-card.is-enabled .ai-status-main span {
  background: rgba(255, 90, 72, 0.16);
  color: #ff7c6d;
}

html[data-theme="dark"] .ai-usage-meter {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .ai-usage-meter i {
  background: linear-gradient(90deg, #b8ff42, #8f63ff);
}

html[data-theme="dark"] .ai-usage-grid div,
html[data-theme="dark"] .ai-recent div,
html[data-theme="dark"] .ai-recent p,
html[data-theme="dark"] .ai-refresh-button {
  background: rgba(255, 255, 255, 0.055);
}
