:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, .82);
  --surface-strong: #ffffff;
  --surface-soft: rgba(255, 255, 255, .58);
  --line: rgba(60, 60, 67, .16);
  --text: #111114;
  --muted: rgba(60, 60, 67, .68);
  --muted-2: rgba(60, 60, 67, .48);
  --blue: #007aff;
  --green: #34c759;
  --orange: #ff9500;
  --red: #ff3b30;
  --shadow: 0 18px 52px rgba(16, 24, 40, .12);
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(0, 122, 255, .16), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(52, 199, 89, .14), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.pressable {
  transform: translateZ(0);
  transition: transform .24s cubic-bezier(.16, 1, .3, 1), filter .18s ease, box-shadow .18s ease;
}

.pressable:active,
.pressable.is-pressing {
  transform: scale(.94);
  filter: brightness(.98);
}

.done-button.pressable:active,
.complete-choice.pressable:active {
  transform: scale(.97);
}

.spring-back {
  animation: springBack .58s cubic-bezier(.18, 1.12, .24, 1);
}

@keyframes springBack {
  0% { transform: scale(.97); }
  64% { transform: scale(1.012); }
  86% { transform: scale(.998); }
  100% { transform: scale(1); }
}

svg {
  display: block;
}

.app-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(36px + env(safe-area-inset-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -18px;
  padding: 14px 18px 12px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(24px) saturate(180%);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.date-label,
.section-label {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .01em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -.02em;
}

.icon-button,
.primary-action,
.secondary-action,
.segmented,
.metric-card,
.notes,
.dialog-card {
  border: 1px solid var(--line);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 10px 24px rgba(16, 24, 40, .08);
  cursor: pointer;
}

.icon-button svg,
.pill svg,
.primary-action svg,
.secondary-action svg,
.metric-card svg,
.notes svg,
.status-chip svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.35;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .62));
  border: 1px solid rgba(255, 255, 255, .66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(160%);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(0, 122, 255, .1);
  color: var(--blue);
  padding: 0 11px;
  font-size: 14px;
  font-weight: 750;
}

.hero-card h2 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1.03;
  letter-spacing: -.03em;
}

.next-desc {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.42;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 15px;
  font-weight: 760;
}

.primary-action {
  border: 0;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}

.secondary-action {
  background: rgba(118, 118, 128, .12);
  color: var(--text);
  cursor: pointer;
}

.progress-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  justify-self: end;
}

.progress-orb svg {
  width: 154px;
  height: 154px;
  transform: rotate(-90deg);
}

.ring-track,
.ring-fill {
  fill: none;
  stroke-width: 10;
}

.ring-track {
  stroke: rgba(118, 118, 128, .16);
}

.ring-fill {
  stroke: var(--green);
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset .35s ease, stroke .35s ease;
}

.progress-orb > div {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.progress-orb strong {
  display: block;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.progress-orb small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.metric-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 82px;
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 14px;
  backdrop-filter: blur(22px) saturate(160%);
}

.metric-card svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 13px;
  background: rgba(0, 122, 255, .1);
  color: var(--blue);
}

.metric-card p {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.metric-card strong {
  grid-column: 1 / -1;
  font-size: 22px;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(118, 118, 128, .12);
  padding: 4px;
}

.segmented button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 760;
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 3px 12px rgba(16, 24, 40, .08);
}

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

.meal-card {
  --swipe-action-width: 82px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  transform: translateZ(0);
}

.meal-swipe-content {
  position: relative;
  z-index: 2;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: inherit;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(16, 24, 40, .07);
  backdrop-filter: blur(22px) saturate(160%);
  transition: transform .38s cubic-bezier(.34, 1.38, .64, 1), border-color .2s ease;
  will-change: transform;
}

.meal-card.swiped .meal-swipe-content {
  transform: translateX(calc(-1 * var(--swipe-action-width)));
}

.swipe-delete {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--swipe-action-width);
  height: 100%;
  border: 0;
  border-radius: inherit;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: translateX(100%);
  transition: transform .34s cubic-bezier(.34, 1.24, .64, 1), opacity .2s ease;
}

.meal-card.swiped .swipe-delete {
  opacity: 1;
  transform: translateX(0);
}

.swipe-delete svg {
  width: 26px;
  height: 26px;
  stroke-width: 2.6;
}

.meal-card.is-next .meal-swipe-content {
  border-color: rgba(0, 122, 255, .32);
}

.meal-card.done .meal-swipe-content {
  border-color: rgba(52, 199, 89, .32);
}

.meal-card.skipped .meal-swipe-content {
  border-color: rgba(255, 59, 48, .3);
}

.meal-button {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  border: 0;
  background: transparent;
  padding: 14px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.meal-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 17px;
  background: rgba(0, 122, 255, .1);
  color: var(--blue);
}

.meal-icon svg {
  width: 23px;
  height: 23px;
}

.meal-title {
  min-width: 0;
}

.meal-title h3 {
  margin: 0 0 5px;
  font-size: 20px;
  letter-spacing: -.01em;
}

.meal-title p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.meal-title .item-count {
  margin-bottom: 6px;
  color: var(--blue);
  font-weight: 800;
}

.meal-summary {
  display: block;
  line-height: 1.34;
}

.meal-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(0, 122, 255, .1);
  color: var(--blue);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.meal-card.done .status-chip {
  background: rgba(52, 199, 89, .12);
  color: var(--green);
}

.meal-card.partial .status-chip {
  background: rgba(0, 122, 255, .12);
  color: var(--blue);
}

.meal-card.skipped .status-chip {
  background: rgba(255, 59, 48, .12);
  color: var(--red);
}

.meal-card.missed .status-chip {
  background: rgba(255, 149, 0, .12);
  color: var(--orange);
}

.chevron {
  color: var(--muted-2);
  transition: transform .22s ease;
}

.meal-card.expanded .chevron {
  transform: rotate(90deg);
}

.meal-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .24s ease;
}

.meal-card.expanded .meal-details {
  grid-template-rows: 1fr;
}

.meal-details > div {
  overflow: hidden;
}

.meal-items {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.food-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(118, 118, 128, .08);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .16s ease, background .16s ease;
}

.food-row:active {
  transform: scale(.985);
  background: rgba(0, 122, 255, .1);
}

.food-row.item-done {
  background: rgba(52, 199, 89, .1);
}

.food-row.item-skipped {
  background: rgba(255, 59, 48, .08);
}

.food-row svg {
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--blue);
}

.food-row.item-done > svg {
  color: var(--green);
}

.food-row h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.food-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.method {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 14px;
}

.item-check {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: rgba(118, 118, 128, .12);
  color: var(--muted);
  cursor: pointer;
}

.item-check svg {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: currentColor;
}

.food-row.item-done .item-check {
  background: rgba(52, 199, 89, .16);
  color: var(--green);
}

.food-row.item-skipped .item-check {
  background: rgba(255, 59, 48, .14);
  color: var(--red);
}

.meal-footer {
  display: flex;
  gap: 10px;
  padding: 0 14px 14px;
}

.add-meal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(118, 118, 128, .08);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.add-meal-button svg {
  width: 18px;
  height: 18px;
}

.add-meal-button {
  width: 100%;
  margin-top: 12px;
  border-style: dashed;
  color: var(--blue);
}

.complete-wrap {
  position: relative;
  flex: 1;
}

.edit-wrap {
  position: relative;
  flex: 1;
}

.done-button,
.edit-button {
  min-height: 44px;
  border: 0;
  border-radius: 15px;
  font-weight: 800;
  cursor: pointer;
}

.done-button,
.edit-button {
  width: 100%;
}

.done-button {
  background: var(--blue);
  color: #fff;
}

.meal-card.done .done-button {
  background: rgba(52, 199, 89, .12);
  color: var(--green);
}

.meal-card.partial .done-button {
  background: rgba(0, 122, 255, .12);
  color: var(--blue);
}

.meal-card.skipped .done-button {
  background: rgba(255, 59, 48, .12);
  color: var(--red);
}

.edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(118, 118, 128, .12);
  color: var(--text);
}

.edit-button svg {
  width: 18px;
  height: 18px;
}

.complete-menu,
.edit-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  z-index: 5;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  box-shadow: 0 18px 44px rgba(16, 24, 40, .18);
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px) scale(.98);
  transform-origin: 28px 100%;
  transition: opacity .18s ease, transform .38s cubic-bezier(.22, 1.18, .36, 1);
  backdrop-filter: blur(24px) saturate(160%);
}

.complete-menu {
  left: 0;
  grid-template-columns: 1fr 1fr;
  min-width: min(280px, calc(100vw - 64px));
}

.edit-menu {
  right: 0;
  grid-template-columns: 1fr;
  width: min(100%, 220px);
  min-width: 0;
  transform-origin: calc(100% - 28px) 100%;
}

.complete-menu::after,
.edit-menu::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}

.edit-menu::after {
  left: auto;
  right: 28px;
}

.complete-wrap.menu-open .complete-menu,
.edit-wrap.menu-open .edit-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.complete-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

.complete-choice.success {
  background: var(--green);
}

.complete-choice.danger {
  background: var(--red);
}

.complete-choice span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .26);
  font-size: 18px;
  line-height: 1;
}

.edit-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  background: rgba(118, 118, 128, .12);
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
}

.edit-choice svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.notes {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 14px;
  color: var(--muted);
}

.notes > svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 13px;
  background: rgba(52, 199, 89, .12);
  color: var(--green);
}

.notes h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 17px;
}

.notes p {
  margin-bottom: 0;
  line-height: 1.55;
}

dialog {
  width: min(420px, calc(100vw - 32px));
  border: 0;
  background: transparent;
  color: var(--text);
}

dialog::backdrop {
  background: rgba(0, 0, 0, .28);
  backdrop-filter: blur(10px);
}

.dialog-card {
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow);
}

.dialog-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
  border-radius: 20px;
  background: rgba(0, 122, 255, .1);
  color: var(--blue);
}

.dialog-icon svg {
  width: 28px;
  height: 28px;
}

.dialog-card h2 {
  margin-bottom: 8px;
}

.dialog-card p:not(.section-label) {
  color: var(--muted);
  line-height: 1.55;
}

.dialog-card button:not(.icon-button):not(.plain-icon-button) {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.plain-button {
  background: rgba(118, 118, 128, .12) !important;
  color: var(--text) !important;
}

.edit-card {
  text-align: left;
}

.edit-card label {
  display: block;
  margin-top: 12px;
}

.edit-card label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.edit-card input,
.edit-card textarea,
.edit-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(118, 118, 128, .1);
  color: var(--text);
  padding: 11px 12px;
  resize: vertical;
}

.edit-card select {
  appearance: none;
}

.edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.danger-button {
  margin-top: 10px;
  background: rgba(255, 59, 48, .12) !important;
  color: var(--red) !important;
}

.week-card {
  text-align: left;
}

.week-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.week-header h2 {
  margin-bottom: 4px;
}

.week-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.week-nav {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.week-nav .icon-button {
  width: 38px;
  height: 38px;
  box-shadow: none;
}

.week-nav .icon-button svg {
  width: 20px;
  height: 20px;
}

.week-stats {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.week-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: rgba(118, 118, 128, .08);
  color: var(--text);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.week-stats .week-row,
.week-stats .week-row:not(.today),
.week-stats .week-row.spring-back {
  background: rgba(118, 118, 128, .08) !important;
}

.week-stats .week-row.pressable:active {
  background: rgba(118, 118, 128, .12) !important;
}

.week-stats .week-row:not(.today) strong {
  color: var(--text);
}

.week-stats .week-row:not(.today) span,
.week-stats .week-row:not(.today) em {
  color: var(--muted);
}

.week-stats .week-row.today strong,
.week-stats .week-row.today span {
  color: var(--blue);
}

.week-stats .week-row.selected {
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, .34);
}

.week-row strong,
.week-row span,
.week-row em {
  display: block;
}

.week-row strong {
  font-size: 15px;
}

.week-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.week-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.week-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(118, 118, 128, .16);
}

.week-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width .48s cubic-bezier(.22, 1, .36, 1);
}

.week-day-panel {
  overflow: hidden;
  margin: -4px 0 2px;
  border-radius: 22px;
  background: rgba(118, 118, 128, .08);
  padding: 14px;
  animation: dayPanelIn .28s cubic-bezier(.22, 1, .36, 1);
}

.week-day-panel[hidden] {
  display: none;
}

.week-day-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.week-day-panel-head h3 {
  margin: 2px 0 4px;
  font-size: 20px;
}

.plain-icon-button {
  display: grid;
  place-items: center;
  width: 38px !important;
  min-height: 38px !important;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: rgba(118, 118, 128, .14) !important;
  color: var(--muted) !important;
  padding: 0;
  cursor: pointer;
}

.plain-icon-button svg {
  width: 20px;
  height: 20px;
}

@keyframes dayPanelIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.day-summary {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.day-details {
  display: grid;
  gap: 10px;
  max-height: min(42vh, 420px);
  overflow: auto;
  padding-right: 2px;
}

.day-meal {
  border-radius: 18px;
  background: rgba(0, 0, 0, .05);
  padding: 12px;
}

.day-meal-title {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.day-meal-title .meal-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}

.day-meal-title h3 {
  margin: 0 0 3px;
  font-size: 17px;
}

.day-meal-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.day-meal-title strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(118, 118, 128, .12);
  color: var(--blue);
  font-size: 13px;
  white-space: nowrap;
  padding: 0 7px;
}

.day-meal-title strong svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.6;
}

.day-items {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.day-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 13px;
  background: rgba(0, 0, 0, .05);
  padding: 8px 10px;
  color: var(--muted);
}

.day-item.done {
  color: var(--green);
}

.day-item.skipped {
  color: var(--red);
}

.day-item em {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(118, 118, 128, .12);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.day-item em svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.6;
}

.day-item.done em {
  background: rgba(52, 199, 89, .14);
}

.day-item.skipped em {
  background: rgba(255, 59, 48, .14);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 20;
  max-width: calc(100vw - 36px);
  border-radius: 999px;
  background: rgba(17, 17, 20, .9);
  color: #fff;
  padding: 11px 15px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .22s ease, transform .22s ease;
  backdrop-filter: blur(18px);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.compat-hidden {
  display: none !important;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 122, 255, .35);
  outline-offset: 2px;
}

@media (max-width: 620px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .progress-orb {
    width: 138px;
    height: 138px;
    justify-self: start;
  }

  .progress-orb svg {
    width: 138px;
    height: 138px;
  }

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

  .meal-button {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .meal-meta {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-left: 58px;
  }

  .next-desc {
    display: grid;
    gap: 2px;
  }

  .next-desc {
    white-space: normal;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #000000;
    --surface: rgba(28, 28, 30, .78);
    --surface-strong: #1c1c1e;
    --surface-soft: rgba(44, 44, 46, .78);
    --line: rgba(235, 235, 245, .13);
    --text: #f5f5f7;
    --muted: rgba(235, 235, 245, .66);
    --muted-2: rgba(235, 235, 245, .44);
    --shadow: 0 18px 52px rgba(0, 0, 0, .26);
  }

  body {
    background: var(--bg);
  }

  .hero-card {
    background:
      radial-gradient(circle at 18% 12%, rgba(0, 122, 255, .12), transparent 16rem),
      radial-gradient(circle at 92% 6%, rgba(52, 199, 89, .1), transparent 18rem),
      rgba(255, 255, 255, .025);
    border-color: rgba(235, 235, 245, .06);
    box-shadow: none;
  }

  .app-header {
    background: transparent;
  }
}
