:root {
  color-scheme: light;
  --font-sans: "Satoshi", "Geist", "Outfit", "MiSans", "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  --font-number: "Geist Mono", "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --bg: #f4f6f2;
  --surface: #ffffff;
  --surface-soft: #f8faf6;
  --ink: #171a18;
  --muted: #68716b;
  --line: rgba(31, 49, 43, 0.12);
  --green: #168f68;
  --green-dark: #0f5d4a;
  --blue: #2b6b7f;
  --coral: #c65b45;
  --amber: #c99a3f;
  --violet: #6f58b5;
  --shadow: 0 18px 50px rgba(35, 47, 41, 0.09);
  --radius: 8px;
  --radius-sm: 6px;
  --gx-primary: #22c984;
  --gx-primary-deep: #126a57;
  --gx-accent: #f0d96d;
  --gx-ink: #111916;
  --gx-button-shadow: 0 12px 24px rgba(18, 106, 87, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  --gx-button-shadow-strong: 0 16px 34px rgba(18, 106, 87, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-family: var(--font-sans);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(47, 143, 111, 0.08), transparent 30%),
    linear-gradient(180deg, #fbfaf7, var(--bg));
  color: var(--ink);
}

body.onboarding-open {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body.onboarding-open .app-shell {
  visibility: hidden;
  pointer-events: none;
}

body.plan-editor-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  padding-bottom: 106px;
}

.side-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100vh;
  padding: 22px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 6px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #cdd7ce;
  border-radius: var(--radius);
  background: #f0f8f3;
}

.brand-mark svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--green-dark);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-block h1,
.brand-block p,
.top-bar h1,
.top-bar p,
.profile-panel h2,
.metric-card h3,
.mini-card h3,
.section-header h3,
.hero-stats p,
.hero-stats strong {
  margin: 0;
}

.brand-block h1 {
  font-size: clamp(1.45rem, 4vw, 2.25rem);
  letter-spacing: 0;
}

.brand-block p,
.eyebrow,
.date-picker span,
.profile-panel label span,
.muted,
.meta-text {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 30;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(680px, calc(100% - 24px));
  padding: 8px;
  border: 1px solid rgba(222, 219, 210, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 60px rgba(32, 33, 36, 0.16);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.bottom-nav .nav-tab {
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 6px 4px;
  font-size: 0.78rem;
  text-align: center;
}

.nav-tab:hover,
.nav-tab.active {
  border-color: #cfe0d7;
  background: #eef7f2;
  color: var(--green-dark);
}

.tab-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: rgba(47, 143, 111, 0.1);
  font-weight: 700;
}

.profile-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-title-row,
.section-header,
.metric-header,
.top-actions,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title-row h2,
.section-header h3 {
  font-size: 1rem;
}

.stacked-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.stacked-form label,
.date-picker {
  display: grid;
  gap: 6px;
}

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

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

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d9d6cc;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(53, 103, 200, 0.22);
  outline-offset: 2px;
}

.main-stage {
  min-width: 0;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px 22px 0;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.top-bar h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.date-picker {
  min-width: 168px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid #d7d4ca;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}

.icon-button:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.wide-grid,
.metric-grid,
.mini-grid,
.diary-grid,
.plan-grid,
.progress-grid {
  display: grid;
  gap: 16px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.mini-grid {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.diary-grid {
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
}

.plan-grid {
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  overflow-x: auto;
  padding-bottom: 4px;
}

.progress-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
}

.metric-card,
.mini-card,
.panel,
.plan-day,
.log-item,
.advice-item,
.badge-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.metric-card,
.mini-card {
  padding: 16px;
}

.metric-card h3,
.mini-card h3 {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.metric-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 12px;
  font-size: 1.9rem;
  font-weight: 800;
}

.metric-value small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.delta-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1.1fr);
  gap: 16px;
  align-items: stretch;
  min-height: 360px;
}

.avatar-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 340px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 48% 30%, rgba(47, 143, 111, 0.18), transparent 32%),
    linear-gradient(180deg, #fff, #f5f1ea);
  overflow: hidden;
}

.avatar-stage svg {
  width: min(72%, 310px);
  max-height: 320px;
  filter: drop-shadow(0 18px 18px rgba(32, 33, 36, 0.12));
}

.growth-avatar {
  overflow: visible;
}

.growth-avatar .avatar-ground {
  fill: rgba(32, 33, 36, 0.15);
}

.growth-avatar .avatar-energy-field,
.growth-avatar .avatar-glow {
  fill: #2f8f6f;
  filter: url("#appGameGlow");
}

.growth-avatar .avatar-glow {
  opacity: 0.16;
}

.growth-avatar .avatar-energy-field,
.growth-avatar .avatar-energy-ring,
.growth-avatar .avatar-spark,
.growth-avatar .avatar-limb,
.growth-avatar .avatar-feedback,
.growth-avatar .avatar-zip,
.growth-avatar .avatar-face {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.growth-avatar .avatar-energy-field {
  stroke: rgba(47, 143, 111, 0.3);
  stroke-width: 14px;
}

.growth-avatar .avatar-energy-ring {
  opacity: 0.58;
  stroke-width: 4px;
}

.growth-avatar .avatar-energy-ring.warm {
  opacity: 0.68;
}

.growth-avatar .avatar-spark {
  stroke: rgba(32, 33, 36, 0.18);
  stroke-width: 3px;
}

.growth-avatar .avatar-limb.outline {
  stroke: #202124;
}

.growth-avatar .avatar-limb.arm {
  stroke: url("#appGameSkin");
}

.growth-avatar .avatar-limb.leg {
  stroke: url("#appGameLeggings");
}

.growth-avatar .avatar-head,
.growth-avatar .avatar-ear,
.growth-avatar .avatar-skin,
.growth-avatar .avatar-hood,
.growth-avatar .avatar-torso,
.growth-avatar .avatar-shoulder-pad,
.growth-avatar .avatar-core-gem,
.growth-avatar .avatar-shorts,
.growth-avatar .avatar-glove,
.growth-avatar .avatar-shoe,
.growth-avatar .avatar-knee {
  stroke: #202124;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3px;
}

.growth-avatar .avatar-head,
.growth-avatar .avatar-skin,
.growth-avatar .avatar-ear {
  fill: url("#appGameSkin");
}

.growth-avatar .avatar-hood,
.growth-avatar .avatar-glove {
  fill: #263053;
}

.growth-avatar .avatar-torso.shell {
  fill: url("#appGameTop");
}

.growth-avatar .avatar-torso.panel {
  fill: rgba(216, 255, 231, 0.78);
}

.growth-avatar .avatar-zip {
  stroke: rgba(12, 68, 52, 0.42);
  stroke-width: 3px;
}

.growth-avatar .avatar-shoulder-pad,
.growth-avatar .avatar-knee {
  filter: drop-shadow(0 0 7px rgba(201, 137, 33, 0.32));
}

.growth-avatar .avatar-core-gem {
  fill: url("#appGameCore");
  filter: drop-shadow(0 0 8px rgba(47, 143, 111, 0.38));
}

.growth-avatar .avatar-shorts {
  fill: url("#appGameShorts");
}

.growth-avatar .avatar-shoe {
  fill: #fbfaf5;
}

.growth-avatar .avatar-hair {
  fill: #1d1a34;
}

.growth-avatar .avatar-hair-front {
  fill: #2d2a63;
}

.growth-avatar .avatar-eye {
  fill: #21170f;
}

.growth-avatar .avatar-face {
  stroke: rgba(35, 23, 19, 0.76);
  stroke-width: 2.5px;
}

.growth-avatar .avatar-feedback {
  filter: drop-shadow(0 0 7px rgba(47, 143, 111, 0.28));
  stroke-width: 4.5px;
}

.growth-avatar .avatar-feedback.core {
  stroke-width: 4px;
}

.growth-avatar .avatar-node {
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 2px;
  filter: drop-shadow(0 0 8px rgba(47, 143, 111, 0.32));
}

.body-part {
  stroke: #26312d;
  stroke-width: 2.2;
  transition: fill 180ms ease, transform 180ms ease;
}

.body-part:hover {
  transform: translateY(-1px);
}

.avatar-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
}

.avatar-caption strong {
  display: block;
}

.level-pill {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: #21352e;
  color: #fff;
  font-weight: 800;
}

.panel {
  padding: 18px;
}

.profile-hero {
  align-self: start;
  display: grid;
  gap: 16px;
  min-height: 260px;
  background:
    linear-gradient(135deg, rgba(47, 143, 111, 0.12), rgba(53, 103, 200, 0.08)),
    #ffffff;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-identity h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  background: #21352e;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 800;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.profile-actions .text-button,
.profile-actions .danger-button {
  flex: 1 1 150px;
}

.estimate-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e2da;
  border-radius: var(--radius);
  background: #f7fcf9;
}

.estimate-preview {
  display: none;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--muted);
  font-size: 0.82rem;
}

.estimate-preview.active {
  display: grid;
}

.estimate-preview strong {
  color: var(--ink);
}

.diet-guide-panel {
  display: grid;
  gap: 14px;
}

.diet-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.guide-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf7;
}

.guide-card strong {
  display: block;
  margin-bottom: 6px;
}

.guide-card .metric-value {
  margin-top: 4px;
  font-size: 1.45rem;
}

.guide-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-list li {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #f8f6f1;
  color: #4f5754;
  font-size: 0.9rem;
  line-height: 1.45;
}

.feedback-panel {
  display: grid;
  gap: 16px;
}

.xp-track,
.bar-track,
.mini-track {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: #ece8de;
}

.xp-track {
  height: 14px;
}

.bar-track {
  height: 10px;
}

.mini-track {
  height: 7px;
}

.track-fill {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #72b892);
}

.track-fill.blue {
  background: linear-gradient(90deg, var(--blue), #6ba7df);
}

.track-fill.coral {
  background: linear-gradient(90deg, var(--coral), #ea9b6d);
}

.attribute-list,
.body-load-list,
.advice-list,
.log-list,
.badge-list,
.habit-grid {
  display: grid;
  gap: 10px;
}

.attribute-row,
.body-row {
  display: grid;
  gap: 7px;
}

.attribute-top,
.body-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
}

.advice-list {
  margin-top: 12px;
}

.advice-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  box-shadow: none;
}

.advice-item::before {
  content: "";
  width: 8px;
  border-radius: 999px;
  background: var(--green);
}

.advice-item.warn::before {
  background: var(--amber);
}

.advice-item.alert::before {
  background: var(--coral);
}

.advice-item strong {
  display: block;
  margin-bottom: 3px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.text-button,
.small-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-weight: 700;
}

.text-button {
  background: var(--green-dark);
  color: #fff;
}

.text-button.secondary {
  border-color: #c9d8d0;
  background: #eef7f2;
  color: var(--green-dark);
}

.small-button {
  min-height: 34px;
  padding: 6px 10px;
  background: #f8f6f1;
  color: var(--ink);
  border-color: var(--line);
  font-size: 0.86rem;
}

.danger-button {
  background: #fff3ee;
  color: #9a2f1c;
  border-color: #f2c8b9;
}

.panel + .panel,
.wide-grid + .wide-grid {
  margin-top: 16px;
}

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

.log-list {
  margin-top: 14px;
}

.log-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  box-shadow: none;
}

.log-item strong {
  display: block;
  margin-bottom: 4px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #f0eee7;
  color: #4f5754;
  font-size: 0.76rem;
}

.plan-day {
  min-width: 180px;
  padding: 14px;
  box-shadow: none;
}

.plan-day.today {
  border-color: var(--green);
  background: #f7fcf9;
}

.plan-day h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.plan-focus {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.8rem;
}

.task-list {
  display: grid;
  gap: 9px;
  margin: 12px 0;
}

.task-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: #f8f6f1;
}

.task-item input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.task-item span {
  font-size: 0.85rem;
  line-height: 1.35;
}

.task-item.done span {
  color: var(--muted);
  text-decoration: line-through;
}

.chart-wrap {
  display: grid;
  gap: 12px;
}

.habit-grid {
  grid-template-columns: repeat(14, minmax(20px, 1fr));
}

.habit-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: #e8e4da;
  border: 1px solid #d9d4c8;
}

.habit-cell.low {
  background: #dcebdd;
}

.habit-cell.mid {
  background: #9dcc9e;
}

.habit-cell.high {
  background: #3b9a6f;
}

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

.badge-item {
  padding: 12px;
  box-shadow: none;
}

.badge-item.locked {
  opacity: 0.48;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px dashed #cfcabe;
  border-radius: var(--radius);
  background: #faf8f2;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: calc(104px + env(safe-area-inset-bottom));
  z-index: 20;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid #cdd7ce;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  animation: rise 220ms ease;
}

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

@media (max-width: 1180px) {
  .dashboard-grid,
  .diary-grid,
  .progress-grid,
  .profile-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 800px) {
  .main-stage {
    padding: 18px;
  }

  .top-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .date-picker {
    min-width: min(100%, 220px);
  }

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

@media (max-width: 560px) {
  .metric-grid,
  .mini-grid,
  .form-grid.two,
  .badge-list,
  .diet-guide-grid {
    grid-template-columns: 1fr;
  }

  .habit-grid {
    grid-template-columns: repeat(7, minmax(20px, 1fr));
  }

  .profile-panel {
    padding: 14px;
  }

  .avatar-stage {
    min-height: 300px;
  }
}

/* UI concept implementation */
body {
  background:
    linear-gradient(135deg, rgba(47, 143, 111, 0.1), rgba(53, 103, 200, 0.06)),
    #eef1ed;
}

.app-shell {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 98px;
  background: #f7f8f5;
  box-shadow: 0 28px 90px rgba(32, 33, 36, 0.16);
}

.main-stage {
  width: 100%;
  padding: 24px 18px 0;
}

.top-bar {
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 16px;
}

.brand-block {
  gap: 10px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 0;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(32, 33, 36, 0.08);
}

.brand-block h1,
.top-bar h1 {
  font-size: 1.75rem;
  line-height: 1.12;
}

.date-picker {
  position: relative;
  min-width: 44px;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(32, 33, 36, 0.08);
}

.date-picker span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.date-picker::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 13px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--green-dark);
  border-radius: 4px;
  pointer-events: none;
}

.date-picker::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 20px;
  height: 2px;
  background: var(--green-dark);
  pointer-events: none;
}

.date-picker input {
  width: 44px;
  min-height: 44px;
  opacity: 0;
  cursor: pointer;
}

.bottom-nav {
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(390px, calc(100% - 28px));
  gap: 5px;
  padding: 8px;
  border-color: rgba(217, 222, 216, 0.92);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 36px rgba(32, 33, 36, 0.12);
}

.bottom-nav .nav-tab {
  gap: 4px;
  min-height: 54px;
  border: 0;
  color: #5e6763;
  font-size: 0.75rem;
}

.bottom-nav .nav-tab.active,
.bottom-nav .nav-tab:hover {
  background: #eaf5ef;
  color: var(--green-dark);
}

.tab-icon {
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 6px;
  background: transparent;
  font-size: 0;
}

.bottom-nav [data-view="profile"] .tab-icon {
  border-radius: 50%;
}

.panel,
.metric-card,
.mini-card,
.plan-day,
.log-item,
.advice-item,
.badge-item,
.quick-panel,
.today-list,
.coach-strip,
.hero-balance,
.estimate-box,
.estimate-preview {
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.today-loop,
.diary-grid,
.progress-grid,
.profile-grid,
.wide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

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

.plan-grid {
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  margin-inline: -2px;
  overflow-x: auto;
}

.hero-balance {
  display: grid;
  grid-template-columns: 134px 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: #ffffff;
}

.ring-wrap {
  display: grid;
  place-items: center;
}

.energy-ring {
  display: grid;
  place-items: center;
  align-content: center;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 56%, transparent 57%),
    conic-gradient(var(--green) 0 var(--ring, 0%), #dce5df var(--ring, 0%) 100%);
}

.energy-ring strong {
  font-size: 1.9rem;
  line-height: 1;
}

.energy-ring span,
.metric-row span,
.metric-row small,
.compact-log small,
.coach-strip p,
.quick-panel span,
.today-list .section-title span {
  color: var(--muted);
  font-size: 0.75rem;
}

.hero-balance-copy h3 {
  margin: 8px 0 10px;
  color: #173f33;
  font-size: 1.25rem;
  line-height: 1.22;
}

.hero-balance-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

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

.metric-row article {
  min-height: 90px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.metric-row strong {
  display: block;
  margin-top: 8px;
  color: #1f493b;
  font-size: 1.75rem;
  line-height: 1;
}

.coach-strip {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
  padding: 14px;
  background: #f8fcfa;
}

.signal-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--coral);
}

.coach-strip strong {
  display: block;
  font-size: 0.95rem;
}

.coach-strip p {
  margin: 4px 0 0;
  line-height: 1.45;
}

.quick-panel,
.today-list {
  padding: 16px;
  background: #ffffff;
}

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

.section-title h3 {
  margin: 0;
  font-size: 1.05rem;
}

.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.primary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: #20342d;
  color: #ffffff;
  font-weight: 700;
}

.plus-glyph {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
}

.plus-glyph::before,
.plus-glyph::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.plus-glyph::before {
  left: 0;
  right: 0;
  top: 5px;
  height: 2px;
}

.plus-glyph::after {
  left: 5px;
  top: 0;
  width: 2px;
  height: 13px;
}

.compact-log-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.compact-log {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
  align-items: start;
}

.compact-log strong {
  display: block;
  font-size: 0.9rem;
}

.compact-log small {
  display: block;
  margin-top: 4px;
}

.item-mark {
  width: 10px;
  height: 38px;
  border-radius: 8px;
}

.item-mark.meal {
  background: var(--amber);
}

.item-mark.workout {
  background: var(--blue);
}

.estimate-box {
  padding: 18px;
  background: #ffffff;
}

.estimate-box textarea {
  min-height: 76px;
  padding: 14px;
  background: #f9fbfa;
  line-height: 1.55;
}

.estimate-box .row-between {
  align-items: stretch;
  flex-direction: column;
}

#estimateMealButton {
  width: 100%;
  min-height: 46px;
  border: 0;
  background: var(--green-dark);
  color: #ffffff;
}

.estimate-preview {
  padding: 16px;
  border-color: #ccd8e8;
  background: #ffffff;
}

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

.macro-grid article {
  min-height: 76px;
  padding: 10px 7px;
  border: 1px solid #dbe2de;
  border-radius: var(--radius);
  background: #f8fbfa;
  text-align: center;
}

.macro-grid strong {
  display: block;
  color: #12382f;
  font-size: 1.2rem;
  line-height: 1.1;
}

.macro-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.meal-plan-panel {
  border-color: #ccd8e8;
}

.meal-timeline {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.meal-timeline div {
  display: grid;
  grid-template-columns: 44px 1fr 46px;
  align-items: center;
  gap: 10px;
  color: #2d3733;
  font-size: 0.82rem;
}

.meal-timeline b {
  position: relative;
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--green), #7cc69c);
}

.meal-timeline b::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.22);
}

.meal-timeline strong {
  color: #12382f;
  text-align: right;
}

[data-current-view="diary"] .brand-block h1,
[data-current-view="diary"] .top-bar h1 {
  color: #12382f;
}

.growth-screen {
  display: grid;
  gap: 12px;
  margin: 0 -4px;
  padding: 0 0 4px;
  color: #f8f4ea;
}

body[data-current-view="progress"],
body[data-current-view="progress"] .app-shell {
  background: #151816;
}

body[data-current-view="progress"] .app-shell {
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
}

body[data-current-view="progress"] .top-bar,
body[data-current-view="progress"] .eyebrow,
body[data-current-view="progress"] .brand-block h1 {
  color: #f8f4ea;
}

body[data-current-view="progress"] .brand-mark,
body[data-current-view="progress"] .date-picker {
  background: #24342f;
}

body[data-current-view="progress"] .bottom-nav {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(22, 24, 22, 0.96);
}

body[data-current-view="progress"] .bottom-nav .nav-tab {
  color: #a9a498;
}

body[data-current-view="progress"] .bottom-nav .nav-tab.active {
  background: #253e34;
  color: #d9f7c7;
}

.growth-hero,
.xp-panel,
.body-load-panel,
.mission-panel,
.growth-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: #20241f;
}

.growth-hero {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.growth-hero h3 {
  margin: 4px 0 0;
  font-size: 1.7rem;
  line-height: 1.12;
}

.level-chip {
  display: grid;
  place-items: center;
  min-width: 52px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: #24342f;
  color: #c9f2dc;
  font-weight: 800;
}

.growth-avatar-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 304px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 53% 42%, rgba(85, 214, 147, 0.24), transparent 30%),
    radial-gradient(circle at 72% 76%, rgba(232, 111, 86, 0.18), transparent 24%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    #20241f;
  background-size: auto, auto, 34px 34px, 34px 34px, auto;
}

.growth-avatar-stage svg {
  width: min(74%, 250px);
  max-height: 300px;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.34));
}

.growth-avatar-stage .body-part {
  stroke: #121711;
  stroke-width: 3px;
}

.physique-badge,
.shape-callout {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(16, 19, 17, 0.78);
  color: #ecfbe7;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.physique-badge {
  left: 12px;
  top: 12px;
  padding: 8px 10px;
  color: #f0d96d;
}

.shape-callout {
  padding: 6px 8px;
}

.shape-callout.upper {
  right: 14px;
  top: 58px;
}

.shape-callout.core {
  left: 18px;
  top: 152px;
  color: #95e9bc;
}

.shape-callout.lower {
  right: 18px;
  bottom: 24px;
  color: #f4a28e;
}

.physique-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.physique-strip article {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  column-gap: 8px;
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: #20241f;
}

.physique-strip article.active {
  border-color: rgba(85, 214, 147, 0.55);
  background: #25372f;
}

.physique-strip strong,
.physique-strip small {
  grid-column: 2;
}

.physique-strip strong {
  color: #f8f4ea;
  font-size: 0.75rem;
}

.physique-strip small {
  color: #c9c3b8;
  font-size: 0.64rem;
}

.mini-body {
  grid-row: 1 / span 2;
  position: relative;
  width: 31px;
  height: 43px;
}

.mini-body::before,
.mini-body::after,
.mini-body span,
.mini-body span::before,
.mini-body span::after {
  content: "";
  position: absolute;
  display: block;
  border-radius: 999px;
  background: #5fdc99;
}

.mini-body::before {
  left: 10px;
  top: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f6e7b2;
}

.mini-body span {
  left: 8px;
  top: 13px;
  width: 15px;
  height: 19px;
}

.mini-body span::before,
.mini-body span::after {
  top: 4px;
  width: 5px;
  height: 17px;
  background: #d4aa66;
}

.mini-body span::before {
  left: -5px;
  transform: rotate(11deg);
}

.mini-body span::after {
  right: -5px;
  transform: rotate(-11deg);
}

.mini-body::after {
  left: 8px;
  top: 30px;
  width: 16px;
  height: 13px;
  background:
    linear-gradient(90deg, #e86f56 0 42%, transparent 42% 58%, #e86f56 58% 100%);
}

.mini-body.base span {
  width: 13px;
  left: 9px;
  background: #789181;
}

.mini-body.current span {
  width: 17px;
  left: 7px;
}

.mini-body.next span {
  width: 20px;
  left: 5px;
  background: #77ebb0;
}

.xp-panel,
.body-load-panel,
.mission-panel {
  padding: 16px;
}

.xp-panel .row-between {
  color: #f8f4ea;
}

.track {
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #55d693, #f0d96d, #e86f56);
}

.xp-panel p {
  margin: 10px 0 0;
  color: #c9c3b8;
  font-size: 0.82rem;
  line-height: 1.45;
}

.body-load-panel .section-title h3,
.mission-panel .section-title h3,
.growth-panel .section-header h3 {
  color: #f8f4ea;
}

.body-load-panel .section-title span,
.mission-panel .section-title span,
.growth-panel .meta-text {
  color: #c9c3b8;
}

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

.body-load-grid article {
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: #252a25;
}

.body-load-grid span {
  color: #c9c3b8;
  font-size: 0.7rem;
}

.body-load-grid strong {
  display: block;
  margin-top: 2px;
  color: #f8f4ea;
  font-size: 0.88rem;
}

.body-load-grid b {
  display: block;
  height: 6px;
  margin-top: 8px;
  border-radius: 8px;
  background: #55d693;
}

.body-load-grid .warm b {
  background: #e86f56;
}

.body-load-grid .mid b,
.body-load-grid .core b {
  background: #f0d96d;
}

.morph-goal {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.goal-icon {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #55d693, #f0d96d);
}

.goal-icon::before,
.goal-icon::after {
  content: "";
  position: absolute;
  background: #172018;
}

.goal-icon::before {
  left: 11px;
  top: 18px;
  width: 16px;
  height: 3px;
}

.goal-icon::after {
  left: 18px;
  top: 11px;
  width: 3px;
  height: 16px;
}

.morph-goal strong {
  display: block;
  color: #f8f4ea;
  font-size: 0.9rem;
}

.morph-goal small {
  display: block;
  margin-top: 4px;
  color: #c9c3b8;
  font-size: 0.72rem;
  line-height: 1.35;
}

.growth-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
  width: 100%;
}

.growth-panel {
  width: 100%;
  min-width: 0;
  padding: 14px;
}

.growth-panel .section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.growth-panel .section-header h3 {
  min-width: 0;
  line-height: 1.25;
}

.growth-panel .section-header .meta-text {
  flex: 0 0 auto;
  max-width: 116px;
  text-align: right;
  line-height: 1.35;
}

.growth-panel .habit-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.growth-panel .badge-list {
  grid-template-columns: 1fr;
}

.growth-panel .attribute-top,
.growth-panel .body-top,
.growth-panel .badge-item strong {
  color: #f8f4ea;
}

.growth-panel .badge-item {
  border-color: rgba(255, 255, 255, 0.12);
  background: #252a25;
}

.growth-panel .habit-cell {
  border-color: rgba(255, 255, 255, 0.08);
  background: #30332e;
}

.growth-panel .habit-cell.low {
  background: #294236;
}

.growth-panel .habit-cell.mid {
  background: #3e7658;
}

.growth-panel .habit-cell.high {
  background: #55d693;
}

@media (min-width: 520px) {
  body {
    padding: 28px 0;
  }

  .app-shell {
    min-height: 896px;
    border: 14px solid #1e2522;
    border-radius: 34px;
    overflow: hidden;
  }

  body[data-current-view="progress"] .app-shell {
    border-color: #0d0f0e;
  }
}

@media (max-width: 430px) {
  .app-shell {
    box-shadow: none;
  }

  .hero-balance {
    grid-template-columns: 116px 1fr;
    gap: 14px;
    padding: 14px;
  }

  .energy-ring {
    width: 104px;
    height: 104px;
  }

  .hero-balance-copy h3 {
    font-size: 1.12rem;
  }

  .main-stage {
    padding-inline: 14px;
  }
}

/* Galaxy-inspired controls */
.primary-action,
.text-button,
.small-button,
.danger-button,
.icon-button,
.level-chip,
.date-picker,
.bottom-nav .nav-tab,
.file-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.primary-action::after,
.text-button::after,
.small-button::after,
.danger-button::after,
.icon-button::after,
.level-chip::after,
.date-picker::after,
.bottom-nav .nav-tab::after,
.file-button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(120deg, transparent 0 22%, rgba(255, 255, 255, 0.42) 36%, transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 45%);
  opacity: 0;
  transform: translateX(-36%);
  transition: opacity 180ms ease, transform 260ms ease;
}

.primary-action:hover,
.text-button:hover,
.small-button:hover,
.danger-button:hover,
.icon-button:hover,
.level-chip:hover,
.date-picker:hover,
.bottom-nav .nav-tab:hover,
.file-button:hover {
  transform: translateY(-1px);
}

.primary-action:hover::after,
.text-button:hover::after,
.small-button:hover::after,
.danger-button:hover::after,
.icon-button:hover::after,
.level-chip:hover::after,
.date-picker:hover::after,
.bottom-nav .nav-tab:hover::after,
.file-button:hover::after {
  opacity: 1;
  transform: translateX(24%);
}

.primary-action:active,
.text-button:active,
.small-button:active,
.danger-button:active,
.icon-button:active,
.level-chip:active,
.date-picker:active,
.bottom-nav .nav-tab:active,
.file-button:active {
  transform: translateY(1px) scale(0.98);
}

.primary-action,
.text-button {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background:
    radial-gradient(circle at 18% 0%, rgba(240, 217, 109, 0.6), transparent 34%),
    linear-gradient(135deg, var(--gx-primary), var(--gx-primary-deep) 58%, #0f5d4a);
  color: #ffffff;
  box-shadow: var(--gx-button-shadow);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}

.primary-action:hover,
.text-button:hover {
  box-shadow: var(--gx-button-shadow-strong);
}

.text-button.secondary,
.file-button {
  border-color: rgba(18, 106, 87, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 242, 0.95)),
    #eef7f2;
  color: var(--gx-primary-deep);
  box-shadow: 0 10px 24px rgba(32, 33, 36, 0.08), inset 0 1px 0 #ffffff;
  text-shadow: none;
}

.small-button {
  min-height: 36px;
  border-color: rgba(18, 106, 87, 0.14);
  background:
    linear-gradient(180deg, #ffffff, #f5f7f1),
    #f8f6f1;
  color: #20342d;
  box-shadow: 0 8px 18px rgba(32, 33, 36, 0.07), inset 0 1px 0 #ffffff;
}

.danger-button {
  border-color: rgba(216, 93, 66, 0.3);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 210, 179, 0.9), transparent 34%),
    linear-gradient(135deg, #f17d61, #d85d42 62%, #9a2f1c);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(216, 93, 66, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.icon-button,
.level-chip,
.date-picker {
  border: 1px solid rgba(18, 106, 87, 0.14);
  background:
    radial-gradient(circle at 30% 0%, rgba(240, 217, 109, 0.28), transparent 38%),
    linear-gradient(180deg, #ffffff, #eff7f2);
  color: var(--gx-primary-deep);
  box-shadow: 0 10px 22px rgba(32, 33, 36, 0.1), inset 0 1px 0 #ffffff;
}

.date-picker::before {
  border-color: currentColor;
}

.date-picker::after {
  left: 16px;
  right: 16px;
  top: 20px;
  height: 2px;
  background: currentColor;
  opacity: 1;
  transform: none;
}

.primary-action .plus-glyph {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.primary-action .plus-glyph::before {
  left: 5px;
  right: 5px;
  top: 10px;
}

.primary-action .plus-glyph::after {
  left: 10px;
  top: 5px;
  height: 12px;
}

#estimateMealButton {
  background:
    radial-gradient(circle at 18% 0%, rgba(128, 239, 181, 0.45), transparent 34%),
    linear-gradient(135deg, #1fbf7a, #12845f 62%, #0b3029);
  box-shadow: 0 12px 24px rgba(18, 106, 87, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.bottom-nav {
  gap: 6px;
  padding: 8px;
  border-color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 248, 245, 0.9)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(32, 33, 36, 0.16), inset 0 1px 0 #ffffff;
}

.bottom-nav .nav-tab {
  min-height: 58px;
  border: 1px solid transparent;
  color: #59625e;
  font-weight: 700;
}

.bottom-nav .nav-tab.active,
.bottom-nav .nav-tab:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 217, 109, 0.44), transparent 42%),
    linear-gradient(135deg, var(--gx-primary), var(--gx-primary-deep));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(18, 106, 87, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.tab-icon {
  display: grid;
  place-items: center;
  border-width: 2px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.bottom-nav .nav-tab.active .tab-icon,
.bottom-nav .nav-tab:hover .tab-icon {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.22);
}

body[data-current-view="progress"] .icon-button,
body[data-current-view="progress"] .level-chip,
body[data-current-view="progress"] .date-picker {
  border-color: rgba(149, 235, 185, 0.22);
  background:
    radial-gradient(circle at 26% 0%, rgba(240, 217, 109, 0.24), transparent 38%),
    linear-gradient(180deg, #263a32, #1b2823);
  color: #d9f7c7;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body[data-current-view="progress"] .bottom-nav {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(34, 39, 35, 0.96), rgba(18, 21, 19, 0.96)),
    #151816;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-current-view="progress"] .bottom-nav .nav-tab {
  color: #b9b1a5;
}

body[data-current-view="progress"] .bottom-nav .nav-tab.active,
body[data-current-view="progress"] .bottom-nav .nav-tab:hover {
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 217, 109, 0.38), transparent 42%),
    linear-gradient(135deg, #2f8f6f, #1b5d4a);
  color: #f3fff4;
}

@media (min-width: 520px) {
  .bottom-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    transform: none;
  }
}

/* Taste-skill polish: typography, restraint, and a single product accent */
html {
  background: #eef2ed;
}

body {
  background:
    radial-gradient(circle at 16% -8%, rgba(22, 143, 104, 0.1), transparent 28%),
    radial-gradient(circle at 100% 12%, rgba(201, 154, 63, 0.09), transparent 24%),
    linear-gradient(180deg, #f8faf6, #eef2ed);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "kern" 1, "tnum" 1;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

input,
select,
textarea {
  border-color: rgba(31, 49, 43, 0.14);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(31, 49, 43, 0.04);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline-color: rgba(22, 143, 104, 0.26);
}

.app-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(248, 250, 246, 0.9)),
    var(--bg);
}

.side-rail,
.bottom-nav {
  border-color: rgba(31, 49, 43, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 244, 0.9)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(35, 47, 41, 0.12), inset 0 1px 0 #ffffff;
}

.brand-block h1,
.top-bar h1,
.hero-balance-copy h3,
.growth-hero h3,
.section-title h3,
.section-header h3,
.profile-identity h3,
.diet-guide h3 {
  color: #14241f;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-block h1,
.top-bar h1 {
  line-height: 1.04;
}

.top-bar h1 {
  font-size: clamp(1.54rem, 5.5vw, 2rem);
}

.eyebrow,
.micro-label,
.brand-block p,
.date-picker span,
.profile-panel label span,
.muted,
.meta-text {
  color: var(--muted);
  font-weight: 650;
}

.metric-value,
.energy-ring strong,
.macro-grid strong,
.body-load-grid strong,
.xp-panel strong,
.attribute-top strong,
.body-top strong,
.level-chip,
.tag {
  font-family: var(--font-number);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.metric-card,
.mini-card,
.panel,
.profile-panel,
.plan-day,
.log-item,
.advice-item,
.badge-item,
.quick-panel,
.today-list,
.coach-strip,
.hero-balance,
.estimate-box,
.estimate-preview,
.guide-card {
  border-color: rgba(31, 49, 43, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 247, 0.86)),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 42px rgba(35, 47, 41, 0.075);
}

.metric-card h3,
.mini-card h3 {
  color: #667069;
  font-size: 0.78rem;
  font-weight: 700;
}

.metric-value {
  color: #14241f;
  font-size: 1.82rem;
  line-height: 1;
}

.hero-balance {
  border-color: rgba(22, 143, 104, 0.13);
  background:
    radial-gradient(circle at 0% 0%, rgba(31, 191, 122, 0.14), transparent 36%),
    radial-gradient(circle at 95% 12%, rgba(201, 154, 63, 0.14), transparent 28%),
    linear-gradient(180deg, #ffffff, #f5f8f3);
}

.energy-ring {
  background:
    radial-gradient(circle at center, #ffffff 0 55%, transparent 56%),
    conic-gradient(var(--green) 0 var(--ring, 0%), rgba(22, 143, 104, 0.14) var(--ring, 0%) 100%);
  box-shadow:
    0 14px 28px rgba(22, 143, 104, 0.12),
    inset 0 0 0 1px rgba(22, 143, 104, 0.08);
}

.energy-ring strong {
  color: #12382f;
  font-weight: 850;
}

.hero-balance-copy h3 {
  margin-top: 6px;
  font-size: 1.22rem;
  line-height: 1.22;
}

.metric-row article {
  border-color: rgba(31, 49, 43, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.metric-row strong {
  color: #12382f;
  font-weight: 850;
}

.coach-strip {
  grid-template-columns: 5px 1fr;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 246, 0.9)),
    #ffffff;
}

.signal-dot {
  align-self: stretch;
  width: 5px;
  height: auto;
  min-height: 44px;
  margin-top: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--green), #7cc69c);
  box-shadow: 0 0 0 4px rgba(22, 143, 104, 0.08);
}

.today-list,
.quick-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 247, 0.92)),
    #ffffff;
}

.primary-action,
.text-button,
#estimateMealButton {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background:
    radial-gradient(circle at 18% 0%, rgba(240, 217, 109, 0.48), transparent 34%),
    linear-gradient(135deg, #1fbf7a, #12845f 58%, #0f5d4a);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(18, 106, 87, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
}

.primary-action:hover,
.text-button:hover,
#estimateMealButton:hover {
  box-shadow: 0 18px 36px rgba(18, 106, 87, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.text-button.secondary,
.file-button,
.small-button,
.icon-button,
.level-chip,
.date-picker {
  border-color: rgba(31, 49, 43, 0.12);
  background:
    linear-gradient(180deg, #ffffff, #f3f7f1),
    #ffffff;
  color: #143d32;
  box-shadow: 0 10px 24px rgba(35, 47, 41, 0.08), inset 0 1px 0 #ffffff;
  text-shadow: none;
}

.danger-button {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 210, 179, 0.78), transparent 34%),
    linear-gradient(135deg, #e97b61, var(--coral) 62%, #933624);
}

.bottom-nav .nav-tab {
  color: #5e6763;
  font-weight: 750;
}

.bottom-nav .nav-tab.active,
.bottom-nav .nav-tab:hover {
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 217, 109, 0.36), transparent 42%),
    linear-gradient(135deg, #1fbf7a, #0f6f57);
  color: #ffffff;
}

.tab-icon {
  background: rgba(255, 255, 255, 0.16);
}

.bottom-nav .nav-tab:not(.active) .tab-icon {
  background: rgba(22, 143, 104, 0.08);
}

.estimate-box textarea {
  border-color: rgba(31, 49, 43, 0.1);
  background: #fbfcfa;
}

.estimate-preview,
.meal-plan-panel,
.macro-grid article {
  border-color: rgba(22, 143, 104, 0.12);
}

.macro-grid strong,
.meal-timeline strong,
[data-current-view="diary"] .brand-block h1,
[data-current-view="diary"] .top-bar h1 {
  color: #12382f;
}

.meal-timeline b,
.track-fill,
.track-fill.blue {
  background: linear-gradient(90deg, #168f68, #7cc69c);
}

.item-mark.workout {
  background: var(--green-dark);
}

.track-fill.coral {
  background: linear-gradient(90deg, var(--coral), #e99a73);
}

body[data-current-view="progress"],
body[data-current-view="progress"] .app-shell {
  background:
    radial-gradient(circle at 48% 10%, rgba(31, 191, 122, 0.12), transparent 32%),
    linear-gradient(180deg, #161a17, #111411);
}

body[data-current-view="progress"] .growth-hero,
body[data-current-view="progress"] .xp-panel,
body[data-current-view="progress"] .body-load-panel,
body[data-current-view="progress"] .mission-panel,
body[data-current-view="progress"] .growth-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(37, 45, 39, 0.96), rgba(26, 31, 27, 0.96)),
    #1d241f;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
}

body[data-current-view="progress"] .growth-avatar-stage {
  background:
    radial-gradient(circle at 50% 40%, rgba(85, 214, 147, 0.22), transparent 31%),
    radial-gradient(circle at 72% 74%, rgba(201, 154, 63, 0.18), transparent 24%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    #20261f;
}

body[data-current-view="progress"] .growth-hero h3,
body[data-current-view="progress"] .section-title h3,
body[data-current-view="progress"] .section-header h3 {
  color: #f7faef;
}

body[data-current-view="progress"] .bottom-nav .nav-tab.active,
body[data-current-view="progress"] .bottom-nav .nav-tab:hover {
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 217, 109, 0.35), transparent 42%),
    linear-gradient(135deg, #1fbf7a, #0f6f57);
}

.growth-avatar .avatar-hair {
  fill: #201b19;
}

.growth-avatar .avatar-hair-front {
  fill: #3a2c24;
}

.growth-avatar .avatar-face.nose {
  stroke-width: 1.8px;
}

/* Icon surfaces: give navigation and utility glyphs a deliberate visual home. */
.brand-mark {
  border: 1px solid rgba(22, 143, 104, 0.16);
  background:
    radial-gradient(circle at 24% 16%, rgba(240, 217, 109, 0.48), transparent 34%),
    linear-gradient(145deg, #f7fff9, #dceee4);
  box-shadow:
    0 10px 24px rgba(22, 106, 82, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(22, 143, 104, 0.08);
}

.icon-button {
  background:
    radial-gradient(circle at 28% 12%, rgba(240, 217, 109, 0.3), transparent 34%),
    linear-gradient(145deg, #ffffff, #eaf3ed);
  box-shadow:
    0 9px 20px rgba(35, 47, 41, 0.1),
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(22, 143, 104, 0.08);
}

.tab-icon {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(31, 49, 43, 0.1);
  border-radius: 8px;
  background: linear-gradient(145deg, #f9fbf8, #e9eeea);
  color: #375148;
  box-shadow:
    0 6px 12px rgba(35, 47, 41, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(31, 49, 43, 0.05);
  font-size: 0.92rem;
  line-height: 1;
}

.bottom-nav .nav-tab:nth-child(1) .tab-icon {
  border-color: rgba(22, 143, 104, 0.16);
  background: linear-gradient(145deg, #effbf4, #dcefe5);
  color: #116d50;
}

.bottom-nav .nav-tab:nth-child(2) .tab-icon {
  border-color: rgba(204, 102, 77, 0.14);
  background: linear-gradient(145deg, #fff7f3, #f5e3dc);
  color: #9a4b39;
}

.bottom-nav .nav-tab:nth-child(3) .tab-icon {
  border-color: rgba(177, 132, 38, 0.16);
  background: linear-gradient(145deg, #fffbee, #f2e8c8);
  color: #816221;
}

.bottom-nav .nav-tab:nth-child(4) .tab-icon {
  border-color: rgba(24, 111, 91, 0.18);
  background: linear-gradient(145deg, #eef9f5, #d5e9e1);
  color: #155c4c;
}

.bottom-nav .nav-tab:nth-child(5) .tab-icon {
  border-color: rgba(55, 69, 63, 0.14);
  background: linear-gradient(145deg, #f7f8f6, #e3e7e3);
  color: #43514b;
}

.bottom-nav .nav-tab.active .tab-icon,
.bottom-nav .nav-tab:hover .tab-icon {
  border-color: rgba(255, 255, 255, 0.62);
  background:
    radial-gradient(circle at 28% 12%, rgba(240, 217, 109, 0.34), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.12));
  color: #ffffff;
  box-shadow:
    0 7px 14px rgba(5, 55, 41, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.primary-action .plus-glyph {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background:
    radial-gradient(circle at 30% 12%, rgba(240, 217, 109, 0.42), transparent 38%),
    rgba(255, 255, 255, 0.16);
  box-shadow:
    0 5px 10px rgba(4, 58, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

body[data-current-view="progress"] .brand-mark {
  border-color: rgba(149, 235, 185, 0.2);
  background:
    radial-gradient(circle at 26% 10%, rgba(240, 217, 109, 0.25), transparent 38%),
    linear-gradient(145deg, #2d4439, #19251f);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body[data-current-view="progress"] .bottom-nav .nav-tab:not(.active) .tab-icon {
  border-color: rgba(191, 221, 204, 0.13);
  background: linear-gradient(145deg, #2d3932, #202822);
  color: #c7d6ce;
  box-shadow:
    0 7px 14px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Responsive progress charts inspired by compact GitHub-style SVG dashboards. */
.growth-chart-grid,
.growth-panel,
.fitness-chart {
  min-width: 0;
}

.chart-wrap {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.fitness-chart {
  display: grid;
  gap: 10px;
  width: 100%;
}

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

.chart-metric {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(9, 16, 12, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chart-metric span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #aeb9b1;
  font-size: 0.68rem;
  font-weight: 700;
}

.chart-metric i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #55d693;
  box-shadow: 0 0 0 3px rgba(85, 214, 147, 0.1);
}

.chart-metric.coral i {
  background: #f28768;
  box-shadow: 0 0 0 3px rgba(242, 135, 104, 0.1);
}

.chart-metric strong {
  display: block;
  margin-top: 5px;
  color: #f8f4ea;
  font-family: var(--font-number);
  font-size: 1.08rem;
  line-height: 1;
  white-space: nowrap;
}

.chart-metric small {
  color: #95a29a;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 650;
}

.trend-chart-frame {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(30, 43, 36, 0.86), rgba(17, 24, 20, 0.92)),
    #151b17;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.14);
}

.trend-chart-frame svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 138px;
  aspect-ratio: 2.15 / 1;
}

.chart-grid-line {
  stroke: rgba(225, 236, 228, 0.1);
  stroke-width: 1;
  stroke-dasharray: 4 7;
}

.chart-axis-label,
.chart-date-label {
  fill: #839188;
  font-family: var(--font-number);
  font-size: 15px;
}

.chart-date-label {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 650;
}

.chart-area.intake {
  fill: url("#intakeArea");
}

.chart-area.burn {
  fill: url("#burnArea");
}

.chart-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chart-line.intake {
  stroke: #f28768;
}

.chart-line.burn {
  stroke: #55d693;
}

.chart-point {
  stroke: #18211c;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.chart-point.intake {
  fill: #ff9b7d;
}

.chart-point.burn {
  fill: #71e5a8;
}

.chart-empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 158px;
  padding: 18px;
  color: #8f9b93;
  text-align: center;
}

.chart-empty-state strong {
  margin-top: 9px;
  color: #e9f0ea;
  font-size: 0.84rem;
}

.chart-empty-state small {
  margin-top: 4px;
  font-size: 0.68rem;
}

.empty-chart-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(85, 214, 147, 0.22);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(85, 214, 147, 0.14), rgba(85, 214, 147, 0.03));
}

.empty-chart-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 8px;
  height: 12px;
  border-bottom: 2px solid #55d693;
  border-left: 2px solid #55d693;
  transform: skewY(-22deg);
}

.capacity-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(85, 214, 147, 0.11), transparent 58%),
    rgba(9, 16, 12, 0.24);
}

.capacity-summary span,
.capacity-summary small {
  color: #9aa79f;
  font-size: 0.68rem;
  font-weight: 650;
}

.capacity-summary strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: #dff8e8;
  font-family: var(--font-number);
  font-size: 0.9rem;
}

.capacity-list {
  display: grid;
  gap: 7px;
}

.capacity-row {
  display: grid;
  grid-template-columns: 62px minmax(76px, 1fr) 38px;
  gap: 9px;
  align-items: center;
  min-height: 34px;
}

.capacity-label {
  min-width: 0;
}

.capacity-label strong,
.capacity-label small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capacity-label strong {
  color: #eef4ee;
  font-size: 0.74rem;
}

.capacity-label small {
  margin-top: 2px;
  color: #7f8d84;
  font-family: var(--font-number);
  font-size: 0.57rem;
}

.capacity-track {
  position: relative;
  height: 8px;
  overflow: visible;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.24);
}

.capacity-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #168f68, #65daa0);
  box-shadow: 0 0 12px rgba(85, 214, 147, 0.16);
}

.capacity-row.legs .capacity-fill {
  background: linear-gradient(90deg, #d96049, #f18b6d);
  box-shadow: 0 0 12px rgba(242, 135, 104, 0.15);
}

.capacity-row.core .capacity-fill,
.capacity-row.arms .capacity-fill {
  background: linear-gradient(90deg, #b9912e, #f0d96d);
  box-shadow: 0 0 12px rgba(240, 217, 109, 0.12);
}

.capacity-target {
  position: absolute;
  left: 75%;
  top: 50%;
  width: 2px;
  height: 14px;
  border-radius: 2px;
  background: rgba(240, 217, 109, 0.74);
  box-shadow: 0 0 0 2px rgba(30, 36, 31, 0.7);
  transform: translate(-1px, -50%);
}

.capacity-row > b {
  color: #dbe8df;
  font-family: var(--font-number);
  font-size: 0.7rem;
  text-align: right;
}

@media (max-width: 380px) {
  .capacity-summary {
    grid-template-columns: 1fr;
  }

  .capacity-summary strong {
    grid-row: auto;
    grid-column: auto;
  }

  .capacity-row {
    grid-template-columns: 52px minmax(70px, 1fr) 34px;
    gap: 7px;
  }
}

/* Training plan: action-first mobile view inspired by the daily-loop concept. */
.plan-screen {
  display: grid;
  gap: 14px;
}

.plan-hero,
.plan-focus-card,
.week-overview,
.plan-insight-grid article {
  border: 1px solid rgba(31, 49, 43, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 16px 42px rgba(35, 47, 41, 0.075);
}

.plan-hero {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 0% 0%, rgba(31, 191, 122, 0.16), transparent 38%),
    radial-gradient(circle at 100% 18%, rgba(240, 217, 109, 0.18), transparent 32%),
    linear-gradient(180deg, #ffffff, #f3f8f4);
}

.plan-progress-ring {
  display: grid;
  place-items: center;
  align-content: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 55%, transparent 56%),
    conic-gradient(var(--green) 0 var(--plan-ring, 0%), rgba(22, 143, 104, 0.14) var(--plan-ring, 0%) 100%);
  box-shadow: 0 14px 28px rgba(22, 143, 104, 0.12), inset 0 0 0 1px rgba(22, 143, 104, 0.08);
}

.plan-progress-ring strong,
.plan-insight-grid strong,
.week-day strong,
.plan-count {
  font-family: var(--font-number);
  font-variant-numeric: tabular-nums;
}

.plan-progress-ring strong {
  color: #12382f;
  font-size: 1.55rem;
  line-height: 1;
}

.plan-progress-ring span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.68rem;
}

.plan-hero-copy {
  min-width: 0;
}

.plan-hero-copy h3 {
  margin: 5px 0 7px;
  color: #14241f;
  font-size: 1.2rem;
  line-height: 1.22;
}

.plan-hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.plan-hero-copy small {
  display: block;
  margin-top: 7px;
  color: #52615b;
  font-size: 0.7rem;
}

.plan-hero-track,
.insight-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 143, 104, 0.12);
}

.plan-hero-track {
  margin-top: 12px;
}

.plan-hero-track span,
.insight-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #168f68, #63c68f);
}

.plan-focus-card,
.week-overview {
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 247, 0.92));
}

.goal-roadmap {
  padding: 17px 2px;
  border-top: 1px solid rgba(31, 49, 43, 0.1);
  border-bottom: 1px solid rgba(31, 49, 43, 0.1);
}

.goal-roadmap .section-title {
  align-items: flex-start;
}

.goal-roadmap .section-title h3 {
  margin-top: 5px;
  color: #14241f;
  font-size: 1.08rem;
}

.goal-roadmap .section-title > span {
  flex: 0 0 auto;
  color: #0f6f57;
  font-family: var(--font-number);
  font-size: 0.78rem;
  font-weight: 800;
}

.goal-phase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.goal-phase-grid article {
  min-width: 0;
  padding: 12px 10px;
  border-left: 3px solid #8db9a5;
  background: #f4f8f5;
}

.goal-phase-grid article > span {
  color: #7b9186;
  font-family: var(--font-number);
  font-size: 0.66rem;
  font-weight: 800;
}

.goal-phase-grid strong {
  display: block;
  margin-top: 5px;
  color: #18372e;
  font-size: 0.76rem;
  line-height: 1.35;
}

.goal-phase-grid p,
.timeline-warning {
  margin: 6px 0 0;
  color: #657069;
  font-size: 0.69rem;
  line-height: 1.48;
}

.timeline-warning {
  padding: 9px 10px;
  border-left: 3px solid #d27555;
  background: #fff4ee;
  color: #79442f;
}

.plan-focus-card .section-title {
  align-items: flex-start;
}

.plan-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.plan-edit-button {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(22, 143, 104, 0.2);
  border-radius: var(--radius);
  background: #ffffff;
  color: #0f6f57;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.plan-focus-card .section-title h3 {
  margin-top: 5px;
  color: #14241f;
  font-size: 1.15rem;
}

.plan-count {
  display: grid;
  place-items: center;
  min-width: 48px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(22, 143, 104, 0.14);
  border-radius: var(--radius);
  background: #edf7f1;
  color: #0f6f57;
  font-weight: 800;
}

.plan-count.complete {
  border-color: rgba(201, 154, 63, 0.24);
  background: #fff8dc;
  color: #755718;
}

.focus-task-list {
  display: grid;
  gap: 9px;
  margin: 16px 0;
}

.focus-task {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 49, 43, 0.09);
  border-radius: var(--radius);
  background: #f8faf7;
  color: #26332e;
  cursor: pointer;
}

.focus-task input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.task-check {
  position: relative;
  width: 26px;
  height: 26px;
  border: 2px solid #afbbb5;
  border-radius: 50%;
  background: #ffffff;
}

.focus-task.done {
  border-color: rgba(22, 143, 104, 0.14);
  background: #eef8f2;
  color: #617068;
}

.focus-task.done .task-check {
  border-color: var(--green);
  background: var(--green);
}

.focus-task.done .task-check::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 7px;
  height: 12px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.focus-task.done > span:last-child {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.plan-complete-button {
  width: 100%;
}

.plan-complete-button.cancel-record {
  border-color: rgba(191, 88, 58, 0.22);
  background: #fff1eb;
  color: #9b4c34;
}

.plan-balance-panel {
  padding: 16px 2px;
  border-top: 1px solid rgba(31, 49, 43, 0.1);
  border-bottom: 1px solid rgba(31, 49, 43, 0.1);
}

.plan-balance-panel .section-title {
  align-items: flex-start;
}

.plan-balance-panel h3 {
  margin-top: 4px;
  color: #173c31;
  font-size: 1rem;
}

.plan-balance-panel.high h3,
.plan-balance-panel.low h3 {
  color: #90492f;
}

.balance-score {
  flex: 0 0 auto;
  color: #0f6f57;
  font-family: var(--font-number);
  font-size: 0.8rem;
  font-weight: 850;
}

.plan-balance-panel > p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.plan-coverage-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-top: 13px;
}

.plan-coverage-list span {
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 46px;
  padding: 6px 2px;
  border: 1px solid rgba(22, 143, 104, 0.12);
  border-radius: var(--radius-sm);
  background: #f1f7f3;
  color: #245b4a;
}

.plan-coverage-list span.thin {
  border-color: rgba(198, 139, 48, 0.22);
  background: #fff8df;
  color: #805e20;
}

.plan-coverage-list span.dominant {
  border-color: rgba(210, 117, 85, 0.2);
  background: #fff1eb;
  color: #944b34;
}

.plan-coverage-list b {
  font-size: 0.68rem;
}

.plan-coverage-list small {
  font-family: var(--font-number);
  font-size: 0.66rem;
}

.plan-balance-panel ul {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.plan-balance-panel li {
  position: relative;
  padding-left: 13px;
  color: #52615b;
  font-size: 0.74rem;
  line-height: 1.48;
}

.plan-balance-panel li::before {
  content: "";
  position: absolute;
  top: 0.54em;
  left: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3fad7b;
}

.plan-editor-dialog {
  width: min(420px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 49, 43, 0.14);
  border-radius: var(--radius);
  background: #fbfcf9;
  box-shadow: 0 28px 80px rgba(35, 47, 41, 0.24);
}

.plan-editor-dialog:not([open]) {
  display: none;
}

.plan-editor-dialog.fallback-open {
  position: fixed;
  inset: 14px;
  z-index: 500;
  margin: auto;
  box-shadow:
    0 0 0 100vmax rgba(20, 31, 27, 0.48),
    0 28px 80px rgba(35, 47, 41, 0.24);
}

.plan-editor-dialog::backdrop {
  background: rgba(20, 31, 27, 0.48);
}

.plan-editor-form {
  display: grid;
  gap: 14px;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  padding: 18px;
}

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

.plan-editor-header h3 {
  margin: 4px 0 0;
  color: #14241f;
  font-size: 1.18rem;
}

.dialog-close-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(31, 49, 43, 0.12);
  border-radius: var(--radius);
  background: #ffffff;
  color: #40504a;
  font-size: 1.25rem;
  cursor: pointer;
}

.plan-editor-form label,
.plan-editor-form label > span {
  display: grid;
  gap: 7px;
}

.plan-editor-form label > span {
  color: #52615b;
  font-size: 0.76rem;
  font-weight: 750;
}

.plan-editor-form input,
.plan-editor-form select,
.plan-editor-form textarea {
  width: 100%;
  min-width: 0;
}

.plan-editor-form textarea {
  min-height: 190px;
  resize: vertical;
  line-height: 1.55;
}

.exercise-picker-section,
.selected-exercise-section {
  display: grid;
  gap: 10px;
}

.plan-builder-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-builder-title strong {
  color: #18372e;
  font-size: 0.82rem;
}

.plan-builder-title span {
  color: var(--muted);
  font-size: 0.7rem;
}

.exercise-part-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: none;
}

.exercise-part-tabs::-webkit-scrollbar {
  display: none;
}

.exercise-part-tabs button {
  flex: 0 0 48px;
  min-height: 38px;
  padding: 0 7px;
  border: 1px solid rgba(31, 49, 43, 0.11);
  border-radius: var(--radius-sm);
  background: #f5f8f5;
  color: #5e6c66;
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
}

.exercise-part-tabs button.active {
  border-color: rgba(22, 143, 104, 0.4);
  background: #e8f5ed;
  color: #0f6f57;
}

.exercise-picker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.exercise-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 54px;
  padding: 8px 8px 8px 10px;
  border: 1px solid rgba(31, 49, 43, 0.1);
  border-radius: var(--radius);
  background: #ffffff;
  color: #27362f;
  text-align: left;
  cursor: pointer;
}

.exercise-option > span,
.selected-exercise-heading > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.exercise-option strong,
.selected-exercise-heading strong {
  overflow-wrap: anywhere;
  font-size: 0.75rem;
  line-height: 1.3;
}

.exercise-option small,
.selected-exercise-heading small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.3;
}

.exercise-option i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: #eaf6ef;
  color: #0f6f57;
  font-size: 1rem;
  font-style: normal;
  font-weight: 800;
}

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

.selected-exercise-row {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(31, 49, 43, 0.1);
  border-radius: var(--radius);
  background: #f8faf7;
}

.selected-exercise-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.selected-exercise-heading button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(190, 79, 49, 0.14);
  border-radius: var(--radius-sm);
  background: #fff1eb;
  color: #9b4c34;
  font-size: 1rem;
  cursor: pointer;
}

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

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

.exercise-parameter-grid.cardio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.exercise-parameter-grid label > span {
  font-size: 0.66rem;
}

.exercise-parameter-grid input {
  min-height: 40px;
  padding: 8px;
  font-size: 0.84rem;
}

.exercise-progression-hint {
  padding: 7px 8px;
  border-left: 3px solid #42a87b;
  background: #edf7f1;
  color: #2f6652;
  font-size: 0.68rem;
  line-height: 1.4;
}

.exercise-list-empty {
  padding: 18px 12px;
  border: 1px dashed rgba(31, 49, 43, 0.16);
  color: var(--muted);
  font-size: 0.74rem;
  text-align: center;
}

.plan-editor-feedback {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-left: 3px solid var(--green);
  background: #edf7f1;
}

.plan-editor-feedback strong {
  color: #164536;
  font-size: 0.78rem;
}

.plan-editor-feedback span {
  color: #52615b;
  font-size: 0.72rem;
  line-height: 1.45;
}

.plan-editor-actions {
  display: grid;
  grid-template-columns: minmax(90px, 0.45fr) minmax(0, 1fr);
  gap: 9px;
}

.plan-editor-actions button {
  width: 100%;
  min-height: 46px;
}

.week-overview .section-title > span {
  color: var(--muted);
  font-size: 0.74rem;
}

.week-day-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.week-day {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 112px;
  padding: 9px 3px;
  border: 1px solid rgba(31, 49, 43, 0.09);
  border-radius: var(--radius);
  background: #f8faf7;
  color: #66716b;
  cursor: pointer;
}

.week-day > span,
.week-day small {
  font-size: 0.64rem;
}

.week-day strong {
  color: #26332e;
  font-size: 0.82rem;
}

.week-day i {
  position: relative;
  display: block;
  width: 7px;
  height: 34px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 143, 104, 0.12);
}

.week-day i b {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  background: #9eb7aa;
}

.week-day.active {
  border-color: rgba(22, 143, 104, 0.4);
  background: #eaf6ef;
  color: #0f6f57;
  box-shadow: 0 8px 18px rgba(22, 143, 104, 0.12);
}

.week-day.active i b,
.week-day.complete i b {
  background: linear-gradient(180deg, #4ac48a, #0f6f57);
}

.week-day.complete strong::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 3px;
  border-radius: 50%;
  background: #c99a3f;
  vertical-align: middle;
}

.plan-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.plan-insight-grid article {
  min-width: 0;
  min-height: 104px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.84);
}

.plan-insight-grid article > span,
.plan-insight-grid p {
  color: var(--muted);
  font-size: 0.68rem;
}

.plan-insight-grid strong {
  display: block;
  margin-top: 9px;
  overflow-wrap: anywhere;
  color: #12382f;
  font-size: 1.23rem;
  line-height: 1;
}

.plan-insight-grid strong small {
  color: var(--muted);
  font-size: 0.68rem;
}

.plan-insight-grid p {
  margin: 11px 0 0;
}

.insight-track {
  margin-top: 14px;
}

@media (max-width: 370px) {
  .plan-hero {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .plan-progress-ring {
    width: 88px;
    height: 88px;
  }

  .plan-progress-ring strong {
    font-size: 1.3rem;
  }

  .plan-hero-copy h3 {
    font-size: 1.05rem;
  }

  .plan-insight-grid article {
    padding: 10px 8px;
  }

  .plan-focus-card .section-title {
    gap: 9px;
  }

  .plan-header-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
  }

  .plan-edit-button {
    min-height: 34px;
    padding: 0 8px;
  }
}

[hidden] {
  display: none !important;
}

.profile-goal-details {
  padding: 0;
  overflow: hidden;
}

.profile-goal-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 78px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.profile-goal-details summary::-webkit-details-marker {
  display: none;
}

.profile-goal-details summary::after {
  content: "+";
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(22, 143, 104, 0.16);
  border-radius: var(--radius);
  background: #edf7f1;
  color: #0f6f57;
  font-size: 1.1rem;
  font-weight: 800;
}

.profile-goal-details[open] summary::after {
  content: "−";
}

.profile-goal-details summary h2 {
  margin: 4px 0 0;
  color: #14241f;
  font-size: 1rem;
}

.profile-goal-details summary > .meta-text {
  margin-left: auto;
  text-align: right;
}

.profile-goal-details .stacked-form {
  padding: 0 18px 18px;
  border-top: 1px solid rgba(31, 49, 43, 0.08);
}

.profile-goal-details .stacked-form > label:first-child {
  margin-top: 16px;
}

.optional-metrics-card {
  display: grid;
  gap: 12px;
  margin: 2px -18px;
  padding: 14px 18px;
  border-top: 1px solid rgba(31, 49, 43, 0.09);
  border-bottom: 1px solid rgba(31, 49, 43, 0.09);
  background: #f4f7f3;
}

.strength-goal-card {
  display: grid;
  gap: 12px;
  margin: 2px -18px;
  padding: 14px 18px;
  border-top: 1px solid rgba(31, 49, 43, 0.09);
  border-bottom: 1px solid rgba(31, 49, 43, 0.09);
  background: #f2f7f5;
}

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

.strength-goal-grid label,
.strength-goal-grid label > span {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.strength-goal-grid label > span {
  color: #52615b;
  font-size: 0.7rem;
  font-weight: 700;
}

.strength-progress-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.strength-progress-list article {
  display: grid;
  gap: 7px;
}

.strength-progress-list article > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.strength-progress-list strong {
  color: #18372e;
  font-size: 0.8rem;
}

.strength-progress-list article > div:first-child span,
.strength-progress-list small {
  color: var(--muted);
  font-size: 0.7rem;
}

.strength-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 143, 104, 0.12);
}

.strength-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #168f68, #63c68f);
}

.strength-goal-empty {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 13px;
  border-left: 3px solid #86b9a3;
  background: #f1f7f3;
}

.strength-goal-empty strong {
  color: #234a3d;
  font-size: 0.8rem;
}

.strength-goal-empty span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.goal-timeline-card {
  display: grid;
  gap: 12px;
  margin: 2px -18px;
  padding: 14px 18px;
  border-top: 1px solid rgba(31, 49, 43, 0.09);
  border-bottom: 1px solid rgba(31, 49, 43, 0.09);
  background: #f7f8f3;
}

.goal-timeline-heading,
.timeline-recommendation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.goal-timeline-heading > div {
  display: grid;
  gap: 3px;
}

.goal-timeline-heading strong {
  color: #18372e;
  font-size: 0.9rem;
}

.timeline-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(22, 143, 104, 0.18);
  border-radius: var(--radius-sm);
  background: #e9f5ed;
  color: #0f6f57;
  font-size: 0.7rem;
  font-weight: 800;
}

.timeline-status.tight {
  border-color: rgba(210, 117, 85, 0.25);
  background: #fff0e9;
  color: #984d33;
}

.timeline-status.relaxed {
  border-color: rgba(65, 118, 151, 0.22);
  background: #edf5f8;
  color: #35647f;
}

.timeline-recommendation-row > span {
  min-width: 0;
  color: #657069;
  font-size: 0.72rem;
  line-height: 1.45;
}

.optional-metrics-header,
.metric-estimate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.optional-metrics-header > div {
  display: grid;
  gap: 3px;
}

.optional-metrics-header strong {
  color: #18372e;
  font-size: 0.9rem;
}

.optional-pill,
.onboarding-step-chip {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(22, 143, 104, 0.18);
  border-radius: var(--radius-sm);
  background: #e9f5ed;
  color: #0f6f57;
  font-size: 0.7rem;
  font-weight: 800;
}

.metric-estimate-row > span {
  color: #657069;
  font-size: 0.72rem;
  line-height: 1.45;
}

.estimate-metrics-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(22, 143, 104, 0.24);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #0f6f57;
  font-size: 0.74rem;
  font-weight: 800;
}

.estimate-metrics-button:hover {
  background: #e9f5ed;
}

.health-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 2px;
}

.health-metric {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(31, 49, 43, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.health-metric > span,
.health-metric small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.68rem;
}

.health-metric strong {
  overflow-wrap: anywhere;
  color: #173f33;
  font-family: var(--font-number);
  font-size: 1rem;
}

@media (max-width: 520px) {
  .profile-goal-details summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    grid-template-areas:
      "title toggle"
      "meta toggle";
    column-gap: 12px;
    row-gap: 5px;
  }

  .profile-goal-details summary > div {
    grid-area: title;
    min-width: 0;
  }

  .profile-goal-details summary::after {
    grid-area: toggle;
  }

  .profile-goal-details summary > .meta-text {
    grid-area: meta;
    margin-left: 0;
    text-align: left;
  }

  .profile-goal-details summary h2 {
    font-size: 0.98rem;
  }
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 24px;
  background: #edf2ed;
}

.onboarding-shell {
  display: grid;
  grid-template-rows: auto auto auto auto;
  width: min(430px, 100%);
  min-height: min(760px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid rgba(31, 49, 43, 0.12);
  border-radius: var(--radius);
  background: rgba(252, 253, 250, 0.98);
  box-shadow: 0 28px 80px rgba(35, 47, 41, 0.18);
}

.onboarding-header {
  display: flex;
  align-items: center;
  gap: 13px;
}

.onboarding-header > div:nth-child(2) {
  min-width: 0;
}

.onboarding-step-chip {
  margin-left: auto;
}

.onboarding-header h2 {
  margin: 4px 0 0;
  color: #14241f;
  font-size: 1.34rem;
  line-height: 1.18;
}

.onboarding-mark {
  flex: 0 0 auto;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 22px 0 18px;
}

.onboarding-progress span {
  height: 5px;
  border-radius: 999px;
  background: #dce4df;
  transition: background 180ms ease;
}

.onboarding-progress span.active {
  background: linear-gradient(90deg, #168f68, #63c68f);
}

.onboarding-step {
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.onboarding-step legend {
  width: 100%;
  margin-bottom: 4px;
  color: #14241f;
  font-size: 1.55rem;
  font-weight: 850;
}

.onboarding-step > p {
  margin: -4px 0 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.onboarding-step label,
.onboarding-step label > span {
  display: grid;
  gap: 7px;
}

.onboarding-step label > span {
  color: #52615b;
  font-size: 0.76rem;
  font-weight: 700;
}

.onboarding-step input,
.onboarding-step select,
.onboarding-step textarea {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  font-size: 1rem;
}

.onboarding-step .optional-metrics-card {
  margin: 2px 0 0;
  padding: 14px;
  border: 1px solid rgba(31, 49, 43, 0.1);
  border-radius: var(--radius);
}

.onboarding-step .goal-timeline-card {
  margin: 2px 0 0;
  padding: 14px;
  border: 1px solid rgba(31, 49, 43, 0.1);
  border-radius: var(--radius);
}

.onboarding-step .strength-goal-card {
  margin: 2px 0 0;
  padding: 14px;
  border: 1px solid rgba(31, 49, 43, 0.1);
  border-radius: var(--radius);
}

.goal-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.goal-option-grid label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(31, 49, 43, 0.12);
  border-radius: var(--radius);
  background: #f7faf7;
  cursor: pointer;
}

.goal-option-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  opacity: 0;
}

.goal-option-grid label:has(input:checked) {
  border-color: rgba(22, 143, 104, 0.55);
  background: #e9f6ee;
  box-shadow: inset 0 0 0 1px rgba(22, 143, 104, 0.12);
}

.goal-option-grid label:has(input:checked) span {
  color: #0f6f57;
}

.science-note {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-left: 4px solid var(--green);
  background: #eff7f2;
}

.science-note strong {
  color: #173f33;
  font-size: 0.8rem;
}

.science-note span {
  color: #52615b;
  font-size: 0.76rem;
  line-height: 1.5;
}

.onboarding-actions {
  display: grid;
  grid-template-columns: minmax(90px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 20px;
}

#onboardingBack[hidden] + #onboardingNext {
  grid-column: 1 / -1;
}

.onboarding-actions .small-button,
.onboarding-actions .text-button {
  width: 100%;
  min-height: 48px;
}

@media (max-width: 520px) {
  .onboarding-overlay {
    align-items: stretch;
    min-height: 100%;
    padding: 0;
  }

  .onboarding-shell {
    width: 100%;
    min-height: 100dvh;
    max-height: none;
    padding: calc(20px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .onboarding-header h2 {
    font-size: 1.16rem;
  }

  .onboarding-step .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-estimate-row {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-recommendation-row {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-recommendation-row .estimate-metrics-button {
    width: 100%;
    min-height: 40px;
  }

  .estimate-metrics-button {
    width: 100%;
    min-height: 40px;
  }
}

/* FitForge launch sequence */
.launch-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  min-width: 320px;
  min-height: 100dvh;
  overflow: hidden;
  background: #0c120f;
  color: #f4f8f4;
  isolation: isolate;
  cursor: pointer;
}

.launch-screen::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(107, 237, 165, 0.78), #f0d96d, transparent);
  box-shadow: 0 0 16px rgba(85, 214, 147, 0.34);
  animation: launch-scan 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.16s both;
}

.launch-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(190, 225, 204, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 225, 204, 0.045) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0.58;
  mask-image: linear-gradient(180deg, transparent 4%, #000 28%, #000 74%, transparent 98%);
  animation: launch-grid-in 1.1s ease-out both;
}

.launch-edition {
  position: absolute;
  top: calc(22px + env(safe-area-inset-top));
  right: 22px;
  color: rgba(210, 228, 217, 0.54);
  font-family: var(--font-number);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0;
  animation: launch-fade-in 0.5s ease-out 0.9s both;
}

.launch-stage {
  display: grid;
  justify-items: center;
  width: min(360px, calc(100% - 40px));
  transform: translateY(-2vh);
}

.launch-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 166px;
  height: 166px;
  animation: launch-emblem-in 0.75s cubic-bezier(0.2, 0.9, 0.25, 1) 0.08s both;
}

.launch-emblem::before,
.launch-emblem::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(160, 222, 184, 0.12);
  border-radius: 50%;
}

.launch-emblem::before {
  inset: 0;
}

.launch-emblem::after {
  inset: 18px;
  border-color: rgba(240, 217, 109, 0.12);
}

.launch-logo {
  position: relative;
  z-index: 2;
  width: 160px;
  height: 160px;
  overflow: visible;
}

.launch-ring {
  fill: none;
  stroke-linecap: round;
}

.launch-ring.outer {
  stroke: rgba(98, 224, 155, 0.88);
  stroke-width: 1.5;
  stroke-dasharray: 415;
  stroke-dashoffset: 415;
  animation: launch-ring-draw 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.18s forwards;
}

.launch-ring.inner {
  stroke: rgba(240, 217, 109, 0.26);
  stroke-width: 1;
  stroke-dasharray: 327;
  stroke-dashoffset: -327;
  animation: launch-ring-draw-reverse 0.85s cubic-bezier(0.65, 0, 0.35, 1) 0.28s forwards;
}

.launch-dumbbell {
  fill: #e8f6ed;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.28));
  transform-box: fill-box;
  transform-origin: center;
  animation: launch-mark-forge 0.72s cubic-bezier(0.16, 1, 0.3, 1) 0.54s both;
}

.launch-spark {
  fill: none;
  stroke: #f0d96d;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  filter: drop-shadow(0 0 7px rgba(240, 217, 109, 0.52));
  animation: launch-spark-draw 0.42s ease-out 0.92s forwards;
}

.launch-core {
  position: absolute;
  z-index: 1;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #173b2f;
  box-shadow:
    0 0 0 14px rgba(37, 138, 98, 0.09),
    0 0 46px rgba(70, 214, 137, 0.22),
    inset 0 0 24px rgba(103, 235, 164, 0.12);
  animation: launch-core-pulse 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.launch-cross-line {
  position: absolute;
  z-index: 3;
  background: rgba(111, 231, 165, 0.32);
  transform-origin: center;
}

.launch-cross-line.horizontal {
  width: min(86vw, 430px);
  height: 1px;
  animation: launch-line-horizontal 0.72s cubic-bezier(0.65, 0, 0.35, 1) 0.12s both;
}

.launch-cross-line.vertical {
  width: 1px;
  height: min(56vh, 520px);
  animation: launch-line-vertical 0.72s cubic-bezier(0.65, 0, 0.35, 1) 0.12s both;
}

.launch-copy {
  display: grid;
  justify-items: center;
  margin-top: 20px;
  text-align: center;
}

.launch-kicker {
  color: #72dba5;
  font-family: var(--font-number);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0;
  animation: launch-copy-in 0.55s ease-out 0.94s both;
}

.launch-copy h1 {
  display: flex;
  margin: 7px 0 0;
  overflow: hidden;
  color: #f5f8f5;
  font-family: var(--font-sans);
  font-size: 2.7rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.launch-copy h1 span {
  display: inline-block;
  animation: launch-word-in 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.launch-copy h1 span:first-child {
  color: #eef8f1;
  animation-delay: 0.78s;
}

.launch-copy h1 span:last-child {
  color: #55d693;
  animation-delay: 0.88s;
}

.launch-copy p {
  margin: 11px 0 0;
  color: rgba(222, 234, 226, 0.66);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.5;
  animation: launch-copy-in 0.55s ease-out 1.08s both;
}

.launch-loader {
  position: relative;
  width: min(214px, 68vw);
  height: 2px;
  margin-top: 30px;
  overflow: hidden;
  background: rgba(211, 231, 218, 0.1);
  animation: launch-fade-in 0.35s ease-out 0.96s both;
}

.launch-loader span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #48cc8a, #f0d96d 72%, #ed8068);
  box-shadow: 0 0 12px rgba(85, 214, 147, 0.3);
  transform-origin: left;
  animation: launch-load 0.82s cubic-bezier(0.65, 0, 0.35, 1) 1.08s both;
}

.launch-meta {
  display: flex;
  justify-content: space-between;
  width: min(214px, 68vw);
  margin-top: 8px;
  color: rgba(200, 220, 208, 0.4);
  font-size: 0.56rem;
  font-weight: 700;
  animation: launch-fade-in 0.45s ease-out 1.2s both;
}

.launch-screen.is-leaving {
  animation: launch-screen-out 0.72s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.app-shell.launch-revealed {
  animation: launch-app-in 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes launch-grid-in {
  from { opacity: 0; transform: scale(1.08); }
  to { opacity: 0.58; transform: scale(1); }
}

@keyframes launch-scan {
  0% { opacity: 0; transform: translateY(8vh); }
  18% { opacity: 1; }
  82% { opacity: 0.82; }
  100% { opacity: 0; transform: translateY(84vh); }
}

@keyframes launch-emblem-in {
  from { opacity: 0; transform: scale(0.78) rotate(-7deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes launch-ring-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes launch-ring-draw-reverse {
  to { stroke-dashoffset: 0; }
}

@keyframes launch-mark-forge {
  0% { opacity: 0; transform: scaleX(0.25) scaleY(0.76); }
  62% { opacity: 1; transform: scaleX(1.06) scaleY(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes launch-spark-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes launch-core-pulse {
  0% { opacity: 0; transform: scale(0.5); }
  48% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes launch-line-horizontal {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}

@keyframes launch-line-vertical {
  from { opacity: 0; transform: scaleY(0); }
  to { opacity: 1; transform: scaleY(1); }
}

@keyframes launch-word-in {
  from { opacity: 0; transform: translateY(112%); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes launch-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes launch-load {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes launch-screen-out {
  0% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 100% 0); visibility: hidden; }
}

@keyframes launch-app-in {
  from { opacity: 0.62; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 380px) {
  .launch-emblem {
    width: 146px;
    height: 146px;
  }

  .launch-logo {
    width: 142px;
    height: 142px;
  }

  .launch-copy h1 {
    font-size: 2.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .launch-screen *,
  .launch-screen::after,
  .launch-screen.is-leaving,
  .app-shell.launch-revealed {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}
