:root {
  color-scheme: light;
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-soft: #efebe2;
  --text: #1e2422;
  --muted: #6d756f;
  --line: #dad3c5;
  --accent: #0f766e;
  --accent-strong: #0b5d56;
  --rose: #b8576a;
  --amber: #b76d21;
  --green-soft: #dff1ed;
  --rose-soft: #f5e1e6;
  --shadow: 0 18px 50px rgba(52, 45, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), transparent 34%),
    linear-gradient(45deg, rgba(184, 87, 106, 0.12), transparent 40%),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

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

button {
  cursor: pointer;
}

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

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

.eyebrow,
.pill,
.metric-label,
.small-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2.5rem);
}

h2 {
  font-size: clamp(1.75rem, 5vw, 4rem);
  line-height: 1.04;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.85fr);
  gap: 26px;
  align-items: stretch;
  min-height: 430px;
  margin-bottom: 18px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.74)),
    url("data:image/svg+xml,%3Csvg width='900' height='520' viewBox='0 0 900 520' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%230f766e' stroke-opacity='.15' stroke-width='2'%3E%3Cpath d='M80 440 C190 260 300 300 420 170 S680 70 810 170'/%3E%3Cpath d='M100 360 C260 250 360 420 520 270 S690 210 790 300'/%3E%3Ccircle cx='244' cy='232' r='72'/%3E%3Ccircle cx='620' cy='186' r='94'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
}

.hero-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.pill {
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent-strong);
}

.hero-actions,
.action-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.primary-action,
.secondary-action,
.ghost-action,
.danger-action,
.tab,
.icon-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 750;
}

.primary-action {
  background: var(--accent);
  color: white;
}

.primary-action:hover {
  background: var(--accent-strong);
}

.secondary-action,
.ghost-action {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.danger-action {
  color: #8c1d2d;
  background: #fff7f8;
  border-color: #edc8cf;
}

.icon-button {
  width: 44px;
  padding: 0;
  border-color: var(--line);
  background: var(--surface);
  font-size: 1.2rem;
}

.hero-visual {
  display: grid;
  place-items: center;
}

.orbital {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(15, 118, 110, 0.18), transparent 35%),
    conic-gradient(from 35deg, #0f766e, #b8576a, #b76d21, #0f766e);
  box-shadow: inset 0 0 0 42px rgba(255, 255, 255, 0.78);
}

.orbital span {
  position: absolute;
  min-width: 66px;
  text-align: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  font-weight: 800;
}

.orbital span:nth-child(1) {
  top: 8%;
  left: 38%;
}

.orbital span:nth-child(2) {
  top: 40%;
  right: 4%;
}

.orbital span:nth-child(3) {
  bottom: 10%;
  right: 20%;
}

.orbital span:nth-child(4) {
  bottom: 14%;
  left: 14%;
}

.orbital span:nth-child(5) {
  top: 36%;
  left: 0;
}

.tabbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 244, 238, 0.92);
  backdrop-filter: blur(14px);
}

.tab {
  color: var(--muted);
  background: transparent;
}

.tab.active {
  color: white;
  background: var(--accent);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

.panel,
.card,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.panel {
  padding: 22px;
  margin-bottom: 14px;
}

.card {
  padding: 18px;
}

.notice {
  padding: 14px 16px;
  background: #fffaf0;
}

.notice p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.section-head p,
.card p {
  color: var(--muted);
  line-height: 1.65;
}

.metric {
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.metric-value {
  margin: 8px 0 0;
  font-size: 1.6rem;
  font-weight: 850;
}

.exercise-list,
.plain-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.8;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 760;
}

.tag.rose {
  background: var(--rose-soft);
  color: #8d3145;
}

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

.field {
  display: grid;
  gap: 7px;
}

label {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 780;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  padding: 11px 12px;
}

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

.range-row {
  display: grid;
  grid-template-columns: 1fr 58px;
  gap: 10px;
  align-items: center;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}

.profile-summary {
  border-left: 4px solid var(--accent);
  padding-left: 14px;
}

.stage-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.stage {
  min-height: 86px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid transparent;
}

.stage.current {
  background: var(--green-soft);
  border-color: rgba(15, 118, 110, 0.35);
}

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

.calendar {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
}

.day-cell {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 800;
}

.day-cell.done {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.day-cell.current {
  border-color: var(--rose);
  box-shadow: inset 0 0 0 2px rgba(184, 87, 106, 0.18);
}

.coach-note {
  padding: 16px;
  border-radius: 8px;
  background: #eef7f5;
  border: 1px solid rgba(15, 118, 110, 0.22);
  line-height: 1.75;
}

.empty {
  text-align: center;
  padding: 34px 18px;
}

.empty p {
  color: var(--muted);
}

@media (max-width: 820px) {
  .app-shell {
    padding: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .hero-visual {
    display: none;
  }

  .tabbar {
    grid-template-columns: repeat(6, minmax(58px, 1fr));
    overflow-x: auto;
  }

  .grid.two,
  .grid.three,
  .form-grid,
  .stage-track {
    grid-template-columns: 1fr;
  }

  .calendar {
    grid-template-columns: repeat(6, 1fr);
  }

  .section-head {
    display: block;
  }
}
