:root {
  --accent: #b8ff3d;
  --accent-rgb: 184 255 61;
  --on-accent: #080b0e;
  --night: #080b0e;
  --surface: #11161b;
  --surface-raised: #171d22;
  --surface-soft: #0d1216;
  --line: #2a3138;
  --line-soft: rgb(244 241 232 / 10%);
  --text: #f4f1e8;
  --muted: #8d949d;
  --subtle: #626a72;
  --success: #39d98a;
  --error: #ff5d68;
  --warning: #ffbd4a;
  --glow-alpha: .18;
  --shell-width: 520px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(140deg, transparent 0 76%, rgb(var(--accent-rgb) / 8%) 76% 77%, transparent 77% 83%, rgb(var(--accent-rgb) / 14%) 83% 84%, transparent 84%),
    var(--night);
  color: var(--text);
  font-family: Manrope, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:active {
  transform: scale(.98);
}

.icon-sprite {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  width: min(100%, var(--shell-width));
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(rgb(244 241 232 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(244 241 232 / 3%) 1px, transparent 1px),
    var(--night);
  background-size: 32px 32px, 32px 32px, auto;
  border-inline: 1px solid var(--line-soft);
}

.app-shell::before {
  content: "";
  position: fixed;
  z-index: -1;
  top: 100px;
  left: calc(50% + 80px);
  width: 420px;
  height: 20px;
  background: rgb(var(--accent-rgb) / 16%);
  transform: rotate(-40deg);
  transform-origin: left center;
  box-shadow: 0 44px 0 rgb(var(--accent-rgb) / 7%);
  pointer-events: none;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 76px;
  padding: max(14px, env(safe-area-inset-top)) 16px 12px;
  display: grid;
  grid-template-columns: 1fr auto 44px;
  align-items: center;
  gap: 8px;
  background: rgb(8 11 14 / 90%);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(18px);
}

.brand {
  min-width: 0;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: baseline;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  text-align: left;
  transform: skewX(-7deg);
}

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

.brand b {
  color: var(--accent);
}

.sync-chip {
  min-height: 44px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.sync-chip .icon {
  width: 15px;
  height: 15px;
  color: var(--success);
}

.icon-button {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  cursor: pointer;
}

.notification-button i {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / 70%);
}

main {
  padding: 22px 16px 124px;
}

.view {
  animation: view-in 220ms ease-out both;
}

.view[hidden] {
  display: none;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  margin-bottom: 20px;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.page-heading h1 {
  margin: 3px 0 8px;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 42px;
  font-weight: 700;
  line-height: .98;
  text-transform: uppercase;
}

.page-heading > p:last-child,
.section-description {
  max-width: 43ch;
  margin: 0;
  color: var(--muted);
}

.accent-outline {
  border-color: rgb(var(--accent-rgb) / 68%) !important;
  box-shadow: 0 0 34px rgb(var(--accent-rgb) / var(--glow-alpha));
}

.goal-card {
  min-height: 158px;
  padding: 20px;
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.goal-card::after,
.workout-card::after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: 12px;
  width: 190px;
  height: 11px;
  background: var(--accent);
  opacity: .22;
  transform: rotate(-42deg);
  box-shadow: 0 30px 0 rgb(var(--accent-rgb) / 16%);
}

.goal-main {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.goal-main > div:last-child {
  min-width: 0;
}

.goal-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgb(var(--accent-rgb) / 68%);
  border-radius: 50%;
  color: var(--accent);
}

.goal-icon .icon {
  width: 34px;
  height: 34px;
}

.goal-main strong {
  display: block;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  overflow-wrap: anywhere;
  font-size: 30px;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.goal-main p {
  margin: 2px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.goal-progress {
  position: relative;
  z-index: 1;
}

.goal-progress-copy {
  margin-bottom: 7px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.goal-progress-copy b {
  color: var(--accent);
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 24px;
}

.goal-progress-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress-track,
.mini-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #31373b;
}

.progress-track i,
.mini-progress i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / 58%);
  transition: width 600ms cubic-bezier(.2,.8,.2,1);
}

.streak-row {
  min-height: 80px;
  margin: 12px 0 24px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.streak-copy {
  display: flex;
  align-items: center;
  gap: 8px;
}

.streak-copy .icon {
  color: var(--accent);
  fill: var(--accent);
  stroke: var(--accent);
}

.streak-copy strong {
  color: var(--accent);
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 40px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.streak-copy span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.streak-dots {
  max-width: 112px;
  display: grid;
  grid-template-columns: repeat(6, 10px);
  gap: 8px;
}

.streak-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgb(var(--accent-rgb) / 40%);
}

.streak-row.is-empty .streak-dots i {
  background: #31373b;
  box-shadow: none;
}

.section-heading {
  margin-bottom: 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2,
.advice-card h2,
.workout-card h2,
.modal-header h2 {
  margin: 2px 0 0;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
}

.compact-heading {
  align-items: center;
}

.text-button {
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.text-button .icon {
  width: 18px;
  height: 18px;
}

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

.metric-card {
  min-width: 0;
  min-height: 188px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.metric-card.is-interactive {
  cursor: pointer;
  transition: border-color 180ms ease-out, background-color 180ms ease-out, transform 180ms ease-out;
}

.metric-card.is-interactive:hover,
.metric-card.is-interactive:focus-visible {
  border-color: rgb(var(--accent-rgb) / 58%);
  background: rgb(var(--accent-rgb) / 5%);
}

.metric-card.is-interactive:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.metric-top {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-icon,
.advice-icon,
.integration-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgb(var(--accent-rgb) / 42%);
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / 7%);
  color: var(--accent);
}

.source-badge,
.status-chip,
.trend {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.source-badge {
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.mini-add {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgb(var(--accent-rgb) / 55%);
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 8%);
  color: var(--accent);
  cursor: pointer;
}

.mini-add .icon {
  width: 19px;
  height: 19px;
}

.metric-card > strong {
  min-height: 48px;
  margin-top: 12px;
  display: flex;
  align-items: end;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 34px;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric-card > p {
  min-height: 21px;
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.metric-card small {
  display: block;
  margin-top: 10px;
  color: var(--subtle);
  font-size: 10px;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

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

.sync-chip.is-syncing .icon {
  animation: sync-spin 800ms linear infinite;
}

@keyframes sync-spin {
  to { transform: rotate(360deg); }
}

.primary-button {
  padding: 0 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 28px rgb(var(--accent-rgb) / var(--glow-alpha));
}

.secondary-button {
  padding: 0 16px;
  border: 1px solid rgb(var(--accent-rgb) / 55%);
  background: rgb(var(--accent-rgb) / 6%);
  color: var(--accent);
}

.full-width {
  width: 100%;
}

.workout-cta {
  width: 100%;
  min-height: 70px;
  margin: 14px 0 24px;
  justify-content: space-between;
  text-align: left;
}

.workout-cta span {
  min-width: 0;
}

.workout-cta small {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  text-transform: uppercase;
}

.workout-cta b {
  display: block;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 21px;
  line-height: 1.15;
}

.advice-card {
  margin-bottom: 24px;
  padding: 18px;
  display: flex;
  align-items: start;
  gap: 14px;
  border: 1px solid rgb(var(--accent-rgb) / 38%);
  border-left: 3px solid var(--accent);
  border-radius: 18px;
  background: rgb(var(--accent-rgb) / 6%);
}

.data-source-prompt {
  min-height: 82px;
  margin: 14px 0;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: 10px;
  border-block: 1px solid rgb(var(--accent-rgb) / 34%);
  background: rgb(var(--accent-rgb) / 5%);
}

.data-source-prompt[hidden] {
  display: none;
}

.data-source-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / 12%);
  color: var(--accent);
}

.data-source-prompt > span:nth-child(2) {
  min-width: 0;
}

.data-source-prompt b,
.data-source-prompt small {
  display: block;
}

.data-source-prompt small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.data-source-prompt .secondary-button {
  min-height: 44px;
  padding-inline: 12px;
}

.advice-card h2 {
  font-size: 21px;
}

.advice-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.content-section,
.settings-section {
  margin-top: 16px;
  padding: 20px 0 4px;
  border-top: 1px solid var(--line);
}

.section-kpi {
  color: var(--accent);
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 24px;
}

.week-chart {
  height: 176px;
  padding: 14px 10px 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.week-chart > div {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr 28px;
  align-items: end;
  justify-items: center;
}

.week-chart i {
  width: min(20px, 70%);
  height: var(--value);
  min-height: 8px;
  border-radius: 8px 8px 2px 2px;
  background: #31373b;
}

.week-chart .is-today i,
.week-chart > div:nth-child(-n+5) i {
  background: var(--accent);
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / 35%);
}

.week-chart span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.segmented-control {
  min-height: 54px;
  margin-bottom: 14px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented-control button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.segmented-control button.is-active {
  background: var(--accent);
  color: var(--on-accent);
}

.quick-actions {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-actions .secondary-button {
  min-width: 0;
  padding-inline: 10px;
  font-size: 13px;
}

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

.tracker-card {
  min-height: 120px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.tracker-card-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tracker-card-main > div {
  min-width: 0;
}

.tracker-card-main strong {
  display: block;
  margin-top: 4px;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 29px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.tracker-card-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.tracker-card-side {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.tracker-card-action,
.history-row-action {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
}

.tracker-card-action:hover,
.history-row-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tracker-card-action .icon,
.history-row-action .icon {
  width: 18px;
  height: 18px;
}

.sparkline {
  width: 86px;
  height: 62px;
  display: flex;
  align-items: end;
  gap: 4px;
  flex: 0 0 auto;
}

.sparkline i {
  width: 8px;
  height: var(--h);
  border-radius: 4px 4px 1px 1px;
  background: var(--accent);
}

.ring-chart {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--value), #31373b 0);
}

.ring-chart::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--surface);
}

.ring-chart span {
  position: relative;
  z-index: 1;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 16px;
}

.trend {
  min-height: 28px;
  padding: 0 9px;
}

.trend.good {
  background: rgb(57 217 138 / 11%);
  color: var(--success);
}

.history-list {
  border-block: 1px solid var(--line);
}

.history-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.history-row-copy {
  min-width: 0;
}

.history-row-tail {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-row-actions {
  display: flex;
  gap: 4px;
}

.history-row-action {
  width: 44px;
  height: 44px;
  border-color: transparent;
  background: transparent;
}

.history-row-action.is-delete:hover {
  border-color: var(--error);
  color: var(--error);
}

.history-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.period-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.history-row:last-child {
  border-bottom: 0;
}

.history-row span {
  min-width: 0;
}

.history-row b,
.history-row small {
  display: block;
}

.history-row small {
  color: var(--muted);
  font-size: 10px;
}

.history-row strong {
  flex: 0 0 auto;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.day-selector {
  margin: 0 -16px 16px;
  padding: 0 16px 6px;
  display: grid;
  grid-template-columns: repeat(7, minmax(52px, 1fr));
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.day-selector::-webkit-scrollbar {
  display: none;
}

.day-selector button {
  min-height: 72px;
  padding: 8px 4px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
}

.day-selector button.is-active {
  border-color: var(--accent);
  background: rgb(var(--accent-rgb) / 9%);
  color: var(--text);
}

.day-selector span {
  font-size: 10px;
  font-weight: 800;
}

.day-selector b {
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 19px;
}

.day-selector i.done {
  position: absolute;
  bottom: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
}

.workout-card {
  padding: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.workout-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-chip {
  min-height: 28px;
  padding: 0 10px;
  background: rgb(var(--accent-rgb) / 10%);
  color: var(--accent);
}

.workout-card h2 {
  margin-top: 18px;
  font-size: 34px;
}

.workout-card > p {
  margin: 6px 0 0;
  color: var(--muted);
}

.workout-meta {
  margin: 18px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.workout-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.workout-meta .icon {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.workout-card .primary-button {
  width: 100%;
  position: relative;
  z-index: 1;
}

.exercise-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.exercise-list li {
  min-height: 76px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.exercise-list li > span {
  color: var(--accent);
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 18px;
}

.exercise-list b,
.exercise-list small {
  display: block;
}

.exercise-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.exercise-list li > i {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.profile-card {
  min-height: 92px;
  padding: 16px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 26px;
}

.profile-card strong {
  display: block;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 23px;
  text-transform: uppercase;
}

.profile-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.account-sync-state {
  min-height: 62px;
  margin-top: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.account-sync-state > i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 5px rgb(141 148 157 / 9%);
}

.account-sync-state.is-online > i {
  background: var(--success);
  box-shadow: 0 0 0 5px rgb(74 222 128 / 10%);
}

.account-sync-state b,
.account-sync-state small {
  display: block;
}

.account-sync-state b {
  font-size: 12px;
}

.account-sync-state small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.settings-section {
  padding-bottom: 10px;
}

.section-icon {
  color: var(--accent);
}

.section-description {
  margin-bottom: 16px;
  font-size: 12px;
}

.swatch-grid {
  margin: 16px 0 18px;
  display: grid;
  grid-template-columns: repeat(5, 44px);
  gap: 12px;
}

.color-swatch {
  width: 44px;
  height: 44px;
  padding: 0;
  position: relative;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: inset 0 0 0 5px var(--night);
}

.color-swatch.is-active::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid var(--text);
  border-radius: 50%;
}

.field-label {
  margin: 14px 0 7px;
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.field-label span {
  color: var(--muted);
  font-weight: 500;
}

.color-field {
  min-height: 56px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 40px auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.color-field input {
  width: 40px;
  height: 40px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.color-field output {
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 18px;
}

.color-field span {
  color: var(--success);
  font-size: 10px;
  text-align: right;
}

.range-field,
.toggle-row {
  min-height: 68px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
}

.range-field {
  grid-template-columns: auto minmax(100px, 1fr) 42px;
  gap: 12px;
  font-size: 12px;
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.range-field output {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.toggle-row {
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 14px;
  cursor: pointer;
}

.toggle-row b,
.toggle-row small {
  display: block;
}

.toggle-row small {
  color: var(--muted);
  font-size: 10px;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-row i {
  width: 48px;
  height: 28px;
  padding: 3px;
  position: relative;
  border-radius: 999px;
  background: #31373b;
  transition: background 150ms ease-out;
}

.toggle-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 150ms ease-out;
}

.toggle-row input:checked + i {
  background: var(--accent);
}

.toggle-row input:checked + i::after {
  transform: translateX(20px);
  background: var(--on-accent);
}

.toggle-row input:focus-visible + i {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.integration-state {
  margin-bottom: 14px;
  padding: 16px;
  display: flex;
  align-items: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.integration-state b {
  display: block;
  font-size: 13px;
}

.integration-state p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.integration-state.is-connected {
  border-color: rgb(var(--accent-rgb) / 48%);
  background: rgb(var(--accent-rgb) / 5%);
}

.settings-list {
  margin-top: 20px;
  border-block: 1px solid var(--line);
}

.settings-list button {
  width: 100%;
  min-height: 64px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  cursor: pointer;
}

.settings-list button:last-child {
  border-bottom: 0;
}

.settings-list button > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.settings-list button > span .icon {
  color: var(--accent);
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 496px);
  min-height: 72px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(13 18 22 / 94%);
  box-shadow: 0 16px 50px rgb(0 0 0 / 48%);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  min-width: 0;
  min-height: 58px;
  padding: 5px 2px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.bottom-nav button .icon {
  width: 23px;
  height: 23px;
}

.bottom-nav button span {
  max-width: 100%;
  font-size: 10px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.bottom-nav button.is-active {
  background: rgb(var(--accent-rgb) / 8%);
  color: var(--accent);
}

.modal {
  width: min(calc(100% - 24px), 480px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--text);
}

.modal::backdrop {
  background: rgb(0 0 0 / 74%);
  backdrop-filter: blur(6px);
}

html:has(dialog[open]),
body:has(dialog[open]) {
  overflow: hidden;
}

.modal-card {
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgb(0 0 0 / 64%);
}

.modal-header {
  margin-bottom: 18px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.number-input,
.text-input,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.entry-grid {
  display: grid;
  gap: 10px;
}

.entry-field {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.entry-field select,
.entry-field input {
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  color-scheme: dark;
}

.entry-value-field {
  position: relative;
}

.entry-value-field .number-input {
  padding-right: 72px;
}

.entry-value-field > span {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.entry-hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.text-input {
  font-size: 15px;
}

.number-input {
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

.form-help {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 10px;
}

.form-error {
  margin: 12px 0 0;
  color: var(--error);
  font-size: 11px;
  font-weight: 700;
}

.auth-context {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 2px solid var(--accent);
  background: rgb(var(--accent-rgb) / 6%);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.auth-forgot {
  min-height: 36px;
  margin: 2px 0 0 auto;
  padding: 0;
  display: block;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.mail-code-copy {
  margin-bottom: 16px;
  padding: 12px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-left: 2px solid var(--accent);
  background: rgb(var(--accent-rgb) / 6%);
}

.mail-code-copy > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / 12%);
  color: var(--accent);
}

.mail-code-copy p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.mail-code-copy b {
  color: var(--text);
}

.code-input {
  text-align: center;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .18em;
}

.reset-intro {
  margin-top: 0;
  font-size: 12px;
}

.auth-tabs {
  min-height: 48px;
  margin-bottom: 18px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--night);
}

.auth-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.auth-tabs button.is-active {
  background: rgb(var(--accent-rgb) / 12%);
  color: var(--accent);
}

.account-identity {
  min-height: 78px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-identity b {
  display: block;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 24px;
  text-transform: uppercase;
}

.account-identity p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.sync-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgb(var(--accent-rgb) / 42%);
  border-radius: 12px;
  background: rgb(var(--accent-rgb) / 5%);
}

.sync-panel b,
.sync-panel small {
  display: block;
}

.sync-panel b {
  font-size: 12px;
}

.sync-panel small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.account-panel .primary-button {
  width: 100%;
  margin-bottom: 10px;
}

.danger-button {
  border-color: rgb(255 82 82 / 45%);
  background: rgb(255 82 82 / 6%);
  color: var(--error);
}

.goal-profile-section {
  border-color: rgb(var(--accent-rgb) / 32%);
}

.profile-goal-state,
.result-plan-band {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-goal-state {
  margin-bottom: 14px;
}

.goal-state-icon,
.goal-choice-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgb(var(--accent-rgb) / 48%);
  background: rgb(var(--accent-rgb) / 8%);
  color: var(--accent);
}

.goal-state-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.profile-goal-state b,
.profile-goal-state p {
  display: block;
}

.profile-goal-state b {
  font-size: 13px;
}

.profile-goal-state p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.profile-goal-kpis {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.profile-goal-kpis > span {
  min-width: 0;
  padding: 12px 8px;
  text-align: center;
}

.profile-goal-kpis > span + span {
  border-left: 1px solid var(--line);
}

.profile-goal-kpis small,
.profile-goal-kpis b {
  display: block;
}

.profile-goal-kpis small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-goal-kpis b {
  margin-top: 4px;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.1;
}

.onboarding-modal {
  width: min(100%, 520px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: var(--night);
  color: var(--text);
}

.onboarding-modal::backdrop {
  background: rgb(0 0 0 / 84%);
}

.onboarding-shell {
  min-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(135deg, transparent 0 70%, rgb(var(--accent-rgb) / 7%) 70% 72%, transparent 72%),
    var(--night);
}

.onboarding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.onboarding-brand {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 21px;
  font-style: italic;
  line-height: 1;
  text-transform: uppercase;
}

.onboarding-brand i {
  color: var(--accent);
  font-style: normal;
}

.onboarding-step-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.onboarding-progress {
  height: 3px;
  margin: 14px 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.onboarding-progress i {
  border-radius: 2px;
  background: var(--line-strong);
  transition: background 180ms ease-out, box-shadow 180ms ease-out;
}

.onboarding-progress i.is-active {
  background: var(--accent);
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / var(--glow-alpha));
}

.onboarding-step {
  flex: 1;
  width: 100%;
  animation: view-in 220ms ease-out both;
}

.onboarding-step[hidden] {
  display: none;
}

.onboarding-heading {
  margin-bottom: 20px;
}

.onboarding-heading h2 {
  max-width: 420px;
  margin: 5px 0 9px;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: clamp(34px, 10vw, 48px);
  line-height: 1;
  text-transform: uppercase;
}

.onboarding-heading > p:last-child {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.goal-choice-list {
  display: grid;
  gap: 10px;
}

.goal-choice {
  width: 100%;
  min-height: 136px;
  padding: 16px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease-out, background 180ms ease-out;
}

.goal-choice:hover,
.goal-choice.is-active {
  border-color: var(--accent);
  background: rgb(var(--accent-rgb) / 7%);
}

.goal-choice-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.goal-choice-icon .icon {
  width: 25px;
  height: 25px;
}

.goal-choice b,
.goal-choice small,
.goal-choice i {
  display: block;
}

.goal-choice b {
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 22px;
  line-height: 1.05;
  text-transform: uppercase;
}

.goal-choice small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.goal-choice i {
  margin-top: 8px;
  color: var(--accent);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.choice-arrow {
  color: var(--muted);
}

.goal-choice.is-active .choice-arrow {
  color: var(--accent);
}

.onboarding-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 10px;
}

.vertical-actions {
  grid-template-columns: 1fr;
}

.vertical-actions .primary-button {
  width: 100%;
}

.plain-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.primary-button:disabled {
  opacity: .42;
  cursor: not-allowed;
  box-shadow: none;
}

.goal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;
}

.goal-field {
  position: relative;
  min-width: 0;
}

.goal-field > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

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

.goal-field > small {
  position: absolute;
  right: 12px;
  bottom: 15px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  pointer-events: none;
}

.full-field {
  grid-column: 1 / -1;
}

.goal-field select {
  width: 100%;
  appearance: auto;
  color-scheme: dark;
}

.compact-segments {
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080b0e;
}

.compact-segments.four-segments {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-segments button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.compact-segments button.is-active {
  background: rgb(var(--accent-rgb) / 14%);
  color: var(--accent);
}

.back-icon {
  transform: rotate(180deg);
}

.goal-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
}

.goal-result-grid article {
  min-width: 0;
  padding: 15px;
  background: var(--surface-soft);
}

.goal-result-grid article:nth-child(even) {
  border-left: 1px solid var(--line);
}

.goal-result-grid article:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.goal-result-grid small,
.goal-result-grid b,
.goal-result-grid p {
  display: block;
}

.goal-result-grid small {
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.goal-result-grid b {
  margin-top: 5px;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 27px;
  line-height: 1;
}

.goal-result-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.result-plan-band {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgb(var(--accent-rgb) / 35%);
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 5%);
}

.result-plan-band small,
.result-plan-band b,
.result-plan-band p {
  display: block;
}

.result-plan-band small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.result-plan-band b {
  margin-top: 2px;
  font-size: 13px;
}

.result-plan-band p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.result-deadline {
  margin-top: 10px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.result-deadline > span {
  min-width: 0;
  padding: 0 10px;
}

.result-deadline > span + span {
  border-left: 1px solid var(--line);
}

.result-deadline small,
.result-deadline b {
  display: block;
}

.result-deadline small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.result-deadline b {
  margin-top: 3px;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 17px;
}

.calculation-note {
  margin: 12px 0 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.calculation-note .icon {
  flex: 0 0 auto;
  color: var(--accent);
}

.modal-card > .primary-button {
  width: 100%;
}

.workout-session {
  max-height: calc(100dvh - 24px);
  text-align: center;
}

.workout-session .modal-header {
  text-align: left;
}

.session-status-line {
  margin: 2px 0 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.session-status-line > span {
  padding-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.timer {
  color: var(--accent);
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgb(var(--accent-rgb) / var(--glow-alpha));
}

.session-progress {
  margin-bottom: 12px;
  text-align: left;
}

.session-progress > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.current-exercise {
  min-height: 64px;
  padding: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.current-exercise h3 {
  margin: 3px 0;
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 22px;
  line-height: 1.1;
  text-transform: uppercase;
}

.current-exercise p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.exercise-guide {
  margin: 12px 0 0;
  overflow: hidden;
  border: 1px solid rgb(var(--accent-rgb) / 35%);
  border-radius: 8px;
  background: #0a0f13;
  text-align: left;
}

.exercise-guide img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  background: #0a0f13;
}

.exercise-guide figcaption {
  min-height: 0;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 5px;
  border-top: 1px solid var(--line);
  background: rgb(var(--accent-rgb) / 5%);
}

.exercise-guide figcaption > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.exercise-guide figcaption .icon {
  width: 15px;
  height: 15px;
}

.exercise-guide figcaption p {
  margin: 0;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.exercise-guide figcaption small {
  display: block;
  padding-top: 5px;
  border-top: 1px solid var(--line);
  color: var(--warning);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.35;
}

.set-markers {
  min-height: 34px;
  margin: 12px 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
}

.set-markers i {
  min-width: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.set-markers i.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.set-markers i.is-done {
  border-color: rgb(var(--accent-rgb) / 38%);
  background: rgb(var(--accent-rgb) / 12%);
  color: var(--accent);
}

.workout-steppers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.workout-stepper {
  min-width: 0;
  text-align: left;
}

.workout-stepper > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.workout-stepper > div {
  min-height: 52px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-soft);
}

.workout-stepper button {
  min-width: 44px;
  min-height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  background: rgb(var(--accent-rgb) / 6%);
  color: var(--accent);
  cursor: pointer;
}

.workout-stepper button:first-child {
  border-right: 1px solid var(--line);
}

.workout-stepper button:last-child {
  border-left: 1px solid var(--line);
}

.workout-stepper output {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.workout-stepper output b {
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}

.workout-stepper output small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.complete-set-button {
  width: 100%;
  margin-top: 12px;
}

.session-actions {
  margin-top: 9px;
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 8px;
}

.finish-session-button {
  border-color: var(--line-strong);
  color: var(--muted);
  font-size: 10px;
}

.workout-help {
  margin-bottom: 0;
  text-align: left;
}

.nutrition-snapshot {
  width: 100%;
  min-height: 82px;
  margin: 16px 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  overflow: hidden;
}

.nutrition-snapshot:hover {
  border-color: rgb(var(--accent-rgb) / 48%);
}

.nutrition-snapshot-main {
  min-width: 0;
  min-height: 82px;
  padding: 12px 10px 12px 12px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.nutrition-snapshot-ring {
  --value: 0%;
  position: relative;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--value), #263035 var(--value));
  color: var(--accent);
}

.nutrition-snapshot-ring::before {
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: var(--surface);
  content: "";
}

.nutrition-snapshot-ring .icon {
  position: relative;
  z-index: 1;
  width: 21px;
  height: 21px;
}

.nutrition-snapshot-main > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.nutrition-snapshot small,
.nutrition-snapshot i {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.nutrition-snapshot b {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.nutrition-snapshot-arrow {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.nutrition-quick-add {
  min-width: 82px;
  padding: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 0;
  border-left: 1px solid var(--line);
  background: rgb(var(--accent-rgb) / 8%);
  color: var(--accent);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.nutrition-quick-add .icon {
  width: 20px;
  height: 20px;
}

.section-switcher {
  min-height: 48px;
  margin-bottom: 16px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--night);
}

.section-switcher button {
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.section-switcher button.is-active {
  background: rgb(var(--accent-rgb) / 12%);
  color: var(--accent);
}

.nutrition-summary {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgb(var(--accent-rgb) / 40%);
  border-radius: 8px;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 5%), transparent 55%), var(--surface);
}

.nutrition-energy {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
}

.nutrition-energy h2 {
  margin: 3px 0 6px;
  font-size: 22px;
  line-height: 1.12;
}

.nutrition-energy > div:last-child > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.calorie-ring {
  --value: 0%;
  position: relative;
  width: 124px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--value), #263035 var(--value));
  box-shadow: 0 0 24px rgb(var(--accent-rgb) / var(--glow-alpha));
}

.calorie-ring::before {
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: var(--surface);
  content: "";
}

.calorie-ring > span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.calorie-ring b {
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 33px;
  line-height: 1;
}

.calorie-ring small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.macro-grid {
  margin-top: 18px;
  padding-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.macro-card {
  min-width: 0;
  padding: 0 10px;
  display: grid;
  gap: 7px;
}

.macro-card + .macro-card {
  border-left: 1px solid var(--line);
}

.macro-card > span,
.macro-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 10px;
}

.macro-card > span {
  color: var(--muted);
  font-weight: 800;
}

.macro-card > span b {
  color: var(--text);
}

.macro-card > div {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #273136;
}

.macro-card > div i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--macro-color, var(--accent));
  transition: width 260ms ease-out;
}

.macro-card.protein { --macro-color: #35d7ff; }
.macro-card.fat { --macro-color: #ffb347; }
.macro-card.carbs { --macro-color: var(--accent); }

.nutrition-actions {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 8px;
}

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

.meal-log-empty {
  min-height: 92px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
}

.meal-log-empty > span {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / 10%);
  color: var(--accent);
}

.meal-log-empty b {
  color: var(--text);
  font-size: 13px;
}

.meal-log-empty p {
  margin: 3px 0 0;
  font-size: 10px;
}

.meal-log-row {
  min-width: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.meal-log-row > img {
  width: 78px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
}

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

.meal-log-copy b,
.meal-log-copy small,
.meal-log-copy p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.meal-log-copy b {
  font-size: 12px;
}

.meal-log-copy small,
.meal-log-copy p {
  color: var(--muted);
  font-size: 8px;
}

.meal-log-copy p {
  margin: 2px 0 0;
  font-weight: 700;
}

.meal-log-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.meal-log-side > strong {
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 16px;
  white-space: nowrap;
}

.meal-serving-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meal-serving-controls > span {
  min-width: 48px;
  color: var(--muted);
  text-align: center;
  font-size: 8px;
  font-weight: 800;
}

.meal-stepper-button,
.meal-delete-button,
.dish-add-button {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.meal-stepper-button:disabled {
  opacity: .35;
  cursor: default;
}

.meal-delete-button {
  color: var(--error);
}

.meal-stepper-button .icon,
.meal-delete-button .icon,
.dish-add-button .icon {
  width: 15px;
  height: 15px;
}

.recommendation-copy {
  margin: -5px 0 12px;
  color: var(--muted);
  font-size: 10px;
}

.dish-recommendations {
  margin-inline: -16px;
  padding: 0 16px 4px;
  display: grid;
  grid-auto-columns: minmax(235px, 76%);
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.dish-recommendations::-webkit-scrollbar {
  display: none;
}

.dish-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  scroll-snap-align: start;
}

.dish-card > img {
  width: 100%;
  height: auto;
  aspect-ratio: 12 / 7;
  display: block;
  object-fit: cover;
  background: var(--night);
}

.dish-card > div {
  padding: 12px;
}

.dish-card-top {
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.dish-card h3 {
  margin: 5px 0 4px;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.2;
}

.dish-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.dish-card-footer {
  margin-top: 10px;
  padding-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.dish-card-footer small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.dish-add-button {
  width: 34px;
  height: 34px;
  border-color: rgb(var(--accent-rgb) / 50%);
  background: var(--accent);
  color: var(--on-accent);
}

.nutrition-disclaimer {
  margin: 14px 0 0;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-left: 2px solid var(--accent);
  background: rgb(var(--accent-rgb) / 5%);
  color: var(--muted);
  font-size: 9px;
}

.nutrition-disclaimer .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--accent);
}

.modal-wide {
  width: min(calc(100% - 24px), 760px);
}

.catalog-shell {
  max-height: calc(100dvh - 24px);
}

.catalog-search {
  position: relative;
  margin-bottom: 10px;
}

.catalog-search .icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.catalog-search input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px 10px 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
}

.catalog-filters {
  margin: 0 -2px 12px;
  padding: 2px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.catalog-filters::-webkit-scrollbar {
  display: none;
}

.catalog-filters button {
  min-height: 34px;
  padding: 7px 11px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.catalog-filters button.is-active {
  border-color: rgb(var(--accent-rgb) / 55%);
  background: rgb(var(--accent-rgb) / 10%);
  color: var(--accent);
}

.catalog-result-line {
  margin: 12px 0 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.catalog-result-line b {
  font-size: 12px;
}

.catalog-result-line span {
  color: var(--muted);
  text-align: right;
  font-size: 9px;
}

.exercise-preview {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, .7fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--night);
}

.exercise-preview > img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
}

.exercise-preview > div {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.exercise-preview h3 {
  margin: 9px 0 4px;
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.1;
}

.exercise-preview p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
}

.exercise-preview > div > b {
  margin-top: 5px;
  color: var(--accent);
  font-size: 9px;
  text-transform: uppercase;
}

.exercise-preview > div > small {
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--warning);
  font-size: 9px;
}

.exercise-catalog-list,
.dish-catalog-list {
  display: grid;
  gap: 7px;
}

.exercise-catalog-row {
  width: 100%;
  min-height: 62px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.exercise-catalog-row.is-active {
  border-color: rgb(var(--accent-rgb) / 60%);
  background: rgb(var(--accent-rgb) / 7%);
}

.exercise-catalog-row > span {
  color: var(--accent);
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 17px;
}

.exercise-catalog-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.exercise-catalog-row b,
.exercise-catalog-row small {
  overflow-wrap: anywhere;
}

.exercise-catalog-row b {
  font-size: 12px;
}

.exercise-catalog-row small {
  color: var(--muted);
  font-size: 8px;
}

.exercise-catalog-row > i {
  color: var(--accent);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.exercise-catalog-row > .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.dish-catalog-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.nutrition-entry-grid {
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nutrition-macro-inputs {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nutrition-macro-inputs label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.nutrition-macro-inputs input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-size: 22px;
}

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

  .exercise-preview > img {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 430px) {
  .workout-modal {
    width: min(calc(100% - 16px), 480px);
    max-height: calc(100dvh - 12px);
  }

  .workout-session {
    max-height: calc(100dvh - 12px);
    padding: 14px;
    border-radius: 16px;
  }

  .workout-session .modal-header {
    margin-bottom: 10px;
  }

  .workout-session .modal-header h2 {
    font-size: 24px;
  }

  .session-status-line {
    margin: 0 0 8px;
  }

  .timer {
    font-size: 34px;
  }

  .session-progress {
    margin-bottom: 8px;
  }

  .session-progress > span {
    margin-bottom: 5px;
    font-size: 9px;
  }

  .current-exercise {
    min-height: 54px;
    padding-bottom: 8px;
    gap: 9px;
  }

  .current-exercise .metric-icon {
    width: 42px;
    height: 42px;
  }

  .current-exercise h3 {
    margin-block: 2px;
    font-size: 20px;
  }

  .current-exercise p {
    font-size: 9px;
  }

  .exercise-guide {
    margin-top: 8px;
  }

  .exercise-guide img {
    height: clamp(126px, 19dvh, 154px);
    aspect-ratio: auto;
    object-fit: contain;
  }

  .exercise-guide figcaption {
    padding: 8px 10px;
    gap: 4px;
  }

  .exercise-guide figcaption p {
    font-size: 9px;
    line-height: 1.3;
  }

  .exercise-guide figcaption small {
    padding-top: 4px;
    font-size: 7px;
  }

  .set-markers {
    min-height: 30px;
    margin: 8px 0;
  }

  .workout-stepper > span {
    margin-bottom: 4px;
    font-size: 8px;
  }

  .workout-stepper > div,
  .workout-stepper button {
    min-height: 48px;
  }

  .complete-set-button {
    margin-top: 8px;
  }

  .session-actions {
    margin-top: 7px;
  }

  .workout-help {
    display: none;
  }

  .nutrition-summary {
    padding: 14px;
  }

  .nutrition-energy {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
  }

  .calorie-ring {
    width: 104px;
  }

  .calorie-ring b {
    font-size: 28px;
  }

  .nutrition-energy h2 {
    font-size: 18px;
  }

  .macro-card {
    padding-inline: 7px;
  }

  .meal-log-row {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .meal-log-row > img {
    width: 60px;
    height: 52px;
  }

  .meal-log-side {
    grid-column: 1 / -1;
    padding-top: 7px;
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: start;
    border-top: 1px solid var(--line);
  }

  .dish-catalog-list {
    grid-template-columns: 1fr;
  }

  .catalog-result-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-result-line span {
    text-align: left;
  }
}

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 104px;
  width: min(calc(100% - 32px), 440px);
  min-height: 48px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border: 1px solid rgb(var(--accent-rgb) / 48%);
  border-radius: 8px;
  background: #171d22;
  color: var(--text);
  box-shadow: 0 18px 48px rgb(0 0 0 / 56%);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 220ms ease-out, transform 220ms ease-out;
  font-size: 12px;
  font-weight: 700;
}

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

@media (min-width: 521px) {
  .app-shell {
    box-shadow: 0 0 80px rgb(0 0 0 / 55%);
  }

  main {
    padding-inline: 22px;
  }
}

@media (min-width: 700px) {
  :root {
    --shell-width: 100%;
  }

  .app-shell {
    width: 100%;
    border-inline: 0;
    box-shadow: none;
  }

  .app-header {
    min-height: 82px;
    padding-inline: 28px;
  }

  main {
    width: 100%;
    max-width: 980px;
    margin-inline: auto;
    padding: 30px 28px 124px;
  }

  .page-heading h1 {
    font-size: 52px;
  }

  .metric-grid,
  .tracker-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    width: min(calc(100% - 48px), 760px);
  }

  .dish-recommendations {
    margin-inline: 0;
    padding-inline: 0;
    grid-auto-columns: minmax(240px, 42%);
  }
}

@media (min-width: 1100px) {
  .app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 214px minmax(0, 1fr);
    grid-template-rows: 82px minmax(calc(100vh - 82px), auto);
  }

  .app-shell::before {
    left: 58%;
    width: 680px;
  }

  .app-header {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-inline: 30px;
  }

  main {
    grid-column: 2;
    grid-row: 2;
    max-width: none;
    margin: 0;
    padding: 34px 40px 70px;
  }

  .bottom-nav {
    position: sticky;
    z-index: 12;
    top: 106px;
    left: auto;
    bottom: auto;
    grid-column: 1;
    grid-row: 2;
    width: auto;
    min-height: 0;
    margin: 24px 14px;
    padding: 0 12px 0 0;
    align-self: start;
    grid-template-columns: 1fr;
    gap: 5px;
    transform: none;
    border: 0;
    border-right: 1px solid var(--line-soft);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .bottom-nav button {
    min-height: 54px;
    padding: 0 14px;
    grid-template-columns: 28px minmax(0, 1fr);
    justify-items: start;
    align-content: center;
    gap: 10px;
    border-radius: 8px;
  }

  .bottom-nav button span {
    font-size: 12px;
  }

  .bottom-nav button.is-active {
    box-shadow: inset 3px 0 0 var(--accent);
  }

  [data-view="today"] {
    display: grid;
    grid-template-columns: minmax(470px, 1.08fr) minmax(390px, .92fr);
    gap: 18px 26px;
    align-items: start;
  }

  [data-view="today"] > .page-heading {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
  }

  [data-view="today"] > .goal-card {
    grid-column: 1;
    grid-row: 2;
  }

  [data-view="today"] > .streak-row {
    grid-column: 1;
    grid-row: 3;
    margin-block: 0;
  }

  [data-view="today"] > .metric-section {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  [data-view="today"] > .data-source-prompt {
    grid-column: 2;
    grid-row: 4;
    margin: 0;
  }

  [data-view="today"] > .nutrition-snapshot {
    grid-column: 2;
    grid-row: 4;
    margin: 0;
  }

  [data-view="today"] > .data-source-prompt:not([hidden]) + .nutrition-snapshot {
    grid-row: 5;
  }

  [data-view="today"] > .workout-cta {
    grid-column: 1;
    grid-row: 4;
    margin: 0;
  }

  [data-view="today"] > .advice-card {
    grid-column: 1;
    grid-row: 5;
    margin: 0;
  }

  [data-view="today"] > .content-section {
    grid-column: 2;
    grid-row: 5;
    margin-top: 0;
  }

  [data-view="today"] > .data-source-prompt:not([hidden]) ~ .content-section {
    grid-row: 6;
  }

  [data-view="trackers"] .tracker-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-view="trackers"] .tracker-card {
    min-height: 138px;
  }

  [data-view="nutrition"] {
    display: grid;
    grid-template-columns: minmax(420px, .9fr) minmax(460px, 1.1fr);
    gap: 16px 28px;
    align-items: start;
  }

  [data-view="nutrition"] > .page-heading,
  [data-view="nutrition"] > .section-switcher,
  [data-view="nutrition"] > .nutrition-disclaimer {
    grid-column: 1 / -1;
  }

  [data-view="nutrition"] > .nutrition-summary,
  [data-view="nutrition"] > .nutrition-actions,
  [data-view="nutrition"] > .content-section[aria-labelledby="meal-log-title"] {
    grid-column: 1;
  }

  [data-view="nutrition"] > .recommendation-section {
    grid-column: 2;
    grid-row: 3 / span 3;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  [data-view="nutrition"] .dish-recommendations {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  [data-view="plan"] {
    display: grid;
    grid-template-columns: minmax(390px, .8fr) minmax(500px, 1.2fr);
    gap: 20px 30px;
    align-items: start;
  }

  [data-view="plan"] > .page-heading,
  [data-view="plan"] > .day-selector {
    grid-column: 1 / -1;
  }

  [data-view="plan"] > .workout-card {
    grid-column: 1;
  }

  [data-view="plan"] > .exercise-section {
    grid-column: 2;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  [data-view="profile"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 28px;
    align-items: start;
  }

  [data-view="profile"] > .page-heading {
    grid-column: 1 / -1;
  }

  [data-view="profile"] > .account-sync-state,
  [data-view="profile"] > .settings-section,
  [data-view="profile"] > .settings-list {
    margin-top: 0;
  }

  .toast {
    left: calc(50% + 107px);
  }
}

@media (max-width: 370px) {
  .app-header {
    padding-inline: 12px;
  }

  .sync-chip span {
    display: none;
  }

  .sync-chip {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  main {
    padding-inline: 12px;
  }

  .metric-card {
    padding: 13px;
  }

  .metric-card > strong {
    font-size: 25px;
  }

  .streak-row {
    padding-inline: 12px;
  }

  .streak-dots {
    grid-template-columns: repeat(4, 9px);
    gap: 6px;
  }

  .streak-dots i {
    width: 9px;
    height: 9px;
  }

  .swatch-grid {
    grid-template-columns: repeat(5, 40px);
    gap: 8px;
  }

  .color-swatch {
    width: 40px;
    height: 40px;
  }

  .tracker-card {
    padding: 13px;
  }

  .tracker-card-main .metric-icon {
    width: 38px;
    height: 38px;
  }

  .onboarding-shell {
    padding-inline: 12px;
  }

  .onboarding-heading h2 {
    font-size: 32px;
  }

  .goal-choice {
    min-height: 128px;
    padding: 13px;
    grid-template-columns: 42px minmax(0, 1fr) 16px;
    gap: 10px;
  }

  .goal-choice-icon {
    width: 42px;
    height: 42px;
  }

  .goal-choice b {
    font-size: 19px;
  }

  .goal-result-grid article {
    padding: 13px 11px;
  }

  .goal-result-grid b {
    font-size: 24px;
  }
}

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

html.reduced-motion *,
html.reduced-motion *::before,
html.reduced-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}
