:root {
  --bg: #f4f6f8;
  --surface: #ffffff;

  --text: #111827;
  --muted: #6b7280;

  --border: #e5e7eb;

  --primary: #111827;
  --primary-soft: #eef0f3;

  --training: #e8f3ff;
  --training-text: #0069c2;

  --success: #ecfdf3;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --shadow:
    0 10px 30px rgba(17, 24, 39, 0.06);
}


* {
  box-sizing: border-box;
}


html {
  -webkit-text-size-adjust: 100%;
}


body {
  margin: 0;

  min-height: 100vh;

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);

  background: var(--bg);
}


button,
select,
input {
  font: inherit;
}


button {
  cursor: pointer;
}


.app-shell {
  width: 100%;
  max-width: 760px;

  min-height: 100vh;

  margin: 0 auto;

  padding-bottom: 100px;
}


.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding:
    calc(22px + env(safe-area-inset-top))
    20px
    14px;

  background: var(--bg);
}


.topbar h1 {
  margin: 2px 0 0;

  font-size: 27px;
  line-height: 1.1;
}


.eyebrow {
  margin: 0;

  font-size: 11px;
  line-height: 1;

  letter-spacing: 0.13em;
  font-weight: 800;

  color: var(--muted);
}


.hidden {
  display: none !important;
}


.icon-button {
  border: 0;

  padding: 9px 13px;

  border-radius: 999px;

  background: var(--surface);

  color: var(--text);

  font-weight: 700;
}


main {
  padding: 6px 16px 30px;
}


.view {
  display: none;
}


.view.active {
  display: block;
}


.setup-notice {
  margin: 6px 0 18px;

  padding: 16px;

  border-radius: var(--radius-md);

  background: #fff8dc;

  font-size: 14px;
  line-height: 1.5;
}


.setup-notice p {
  margin: 6px 0 0;

  color: #625630;
}


.day-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  margin: 8px 4px 20px;
}


.day-header h2 {
  margin: 4px 0 0;

  font-size: 31px;
  line-height: 1;
}


.day-date {
  margin: 0;

  color: var(--muted);

  font-size: 14px;
}


.training-badge {
  padding: 9px 13px;

  border-radius: 999px;

  background: var(--training);

  color: var(--training-text);

  font-size: 12px;
  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: 0.04em;
}


.meals-list {
  display: grid;

  gap: 14px;
}


.meal-card {
  padding: 18px;

  border-radius: var(--radius-lg);

  background: var(--surface);

  box-shadow: var(--shadow);
}


.meal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 14px;
}


.meal-header h3 {
  margin: 0;

  font-size: 17px;
}


.meal-type {
  color: var(--muted);

  font-size: 12px;
  font-weight: 700;
}


.food-list {
  display: grid;

  gap: 9px;
}


.food-item {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  min-height: 54px;

  padding: 11px 12px;

  border: 1px solid var(--border);

  border-radius: var(--radius-sm);

  background: #fbfcfd;
}


.food-info {
  min-width: 0;
}


.food-name {
  margin: 0;

  font-size: 14px;
  font-weight: 750;
}


.food-detail {
  margin: 4px 0 0;

  color: var(--muted);

  font-size: 12px;
}


.food-select {
  width: auto;
  max-width: 48%;

  padding: 8px 28px 8px 10px;

  border: 1px solid var(--border);

  border-radius: 10px;

  background: white;

  color: var(--text);

  font-size: 13px;

  outline: none;
}


.food-select:focus {
  border-color: #aeb6c2;
}


.measure-badge {
  display: inline-flex;

  margin-top: 5px;

  padding: 4px 7px;

  border-radius: 7px;

  background: var(--primary-soft);

  color: var(--muted);

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 0.03em;
}


.section-heading {
  margin: 10px 4px 20px;
}


.section-heading h2 {
  margin: 5px 0 0;

  font-size: 30px;
}


.week-list {
  display: grid;

  gap: 12px;
}


.week-day {
  padding: 17px;

  border-radius: var(--radius-md);

  background: var(--surface);

  box-shadow: var(--shadow);
}


.week-day.is-today {
  outline: 2px solid var(--primary);
}


.week-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 10px;
}


.week-day-header h3 {
  margin: 0;

  font-size: 17px;
}


.week-day-training {
  color: var(--training-text);

  font-size: 11px;
  font-weight: 800;
}


.week-meal-line {
  margin: 5px 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.45;
}


.week-meal-line strong {
  color: var(--text);
}


.settings-card {
  margin-bottom: 14px;

  padding: 19px;

  border-radius: var(--radius-lg);

  background: var(--surface);

  box-shadow: var(--shadow);
}


.settings-card h3 {
  margin: 0 0 8px;

  font-size: 17px;
}


.settings-card p {
  margin: 0 0 15px;

  color: var(--muted);

  font-size: 14px;
  line-height: 1.55;
}


.secondary-button {
  border: 0;

  padding: 10px 14px;

  border-radius: 12px;

  background: var(--primary-soft);

  color: var(--text);

  font-weight: 700;
}


.secondary-button:disabled {
  cursor: default;

  opacity: 0.55;
}


.restriction-list {
  display: flex;
  flex-wrap: wrap;

  gap: 8px;

  margin-top: 12px;
}


.restriction-list span {
  padding: 8px 10px;

  border-radius: 999px;

  background: #f3f4f6;

  color: #4b5563;

  font-size: 12px;
  font-weight: 700;
}


.bottom-nav {
  position: fixed;

  z-index: 20;

  bottom: 0;
  left: 50%;

  display: grid;
  grid-template-columns: repeat(3, 1fr);

  width: min(760px, 100%);

  padding:
    9px
    12px
    calc(9px + env(safe-area-inset-bottom));

  transform: translateX(-50%);

  border-top: 1px solid var(--border);

  background: rgba(255, 255, 255, 0.96);

  backdrop-filter: blur(16px);
}


.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 3px;

  border: 0;

  padding: 6px 8px;

  background: transparent;

  color: #9ca3af;

  font-size: 11px;
  font-weight: 700;
}


.nav-item.active {
  color: var(--text);
}


.nav-icon {
  font-size: 18px;
}


@media (min-width: 700px) {

  main {
    padding-left: 24px;
    padding-right: 24px;
  }

  .topbar {
    padding-left: 28px;
    padding-right: 28px;
  }

}
