:root {
  --bg: #f7f4f0;
  --bg-deep: #f0ebe5;
  --card: #ffffff;
  --ink: #1e1b18;
  --ink-2: #4a443e;
  --muted: #857c74;
  --faint: #a99f96;
  --line: #e7e0d8;
  --line-soft: #f1ece6;
  --accent: #de5f35;
  --accent-deep: #b94823;
  --accent-soft: #fbedE7;
  --green: #2f4f4a;
  --green-soft: #e8efec;
  --amber: #a56b25;
  --amber-soft: #f8eee0;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(45, 34, 26, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 100% -5%, rgba(222, 95, 53, 0.08), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

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

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

button,
a,
input,
summary {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(222, 95, 53, 0.24);
  outline-offset: 2px;
}

.app-shell {
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.boot-screen {
  display: flex;
  min-height: 62vh;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink-2);
}

.boot-copy {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #fff8f3;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(222, 95, 53, 0.2);
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-sub {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.text-button,
.button {
  min-height: 44px;
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink-2);
}

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

.text-button {
  padding: 0 12px;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
}

.page {
  padding: 4px 20px 22px;
  animation: page-in 240ms ease both;
}

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

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.faint {
  color: var(--faint);
}

.tiny {
  font-size: 12px;
}

.numeric {
  font-variant-numeric: tabular-nums;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 22px;
}

.page-title {
  margin: 0;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.page-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.chapter-pill,
.status-pill,
.soft-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}

.chapter-pill {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.status-pill {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.pending {
  background: var(--amber-soft);
  color: var(--amber);
}

.soft-pill {
  background: var(--bg-deep);
  color: var(--muted);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.card-padded {
  padding: 18px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 23px 21px 20px;
  border: 1px solid rgba(222, 95, 53, 0.15);
  border-radius: 22px;
  background:
    radial-gradient(circle at 110% -20%, rgba(222, 95, 53, 0.16), transparent 14rem),
    #fff;
  box-shadow: 0 16px 50px rgba(72, 47, 34, 0.07);
}

.hero-card::after {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(222, 95, 53, 0.18);
  border-radius: 50%;
  content: "";
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
}

.hero-title {
  max-width: 90%;
  margin: 0;
  font-size: clamp(26px, 7.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.16;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin: 13px 0 18px;
  color: var(--ink-2);
  font-size: 13px;
}

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

.hero-focus {
  margin: 15px 0 20px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--accent-soft);
  color: #74371f;
  font-size: 13.5px;
  line-height: 1.55;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 750;
  text-decoration: none;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

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

.button-primary {
  height: 52px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(222, 95, 53, 0.2);
}

.button-primary:hover {
  background: #d5542b;
}

.button-secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.button-ghost {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

.button-danger {
  border: 1px solid #eed4cb;
  background: #fff9f7;
  color: #a6462c;
}

.button-small {
  min-height: 40px;
  width: auto;
  padding: 0 15px;
  border-radius: 12px;
  font-size: 13px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.today-actions {
  display: grid;
  gap: 8px;
}

.today-actions .button-ghost {
  min-height: 38px;
  font-size: 12.5px;
}

.quiet-action {
  color: var(--faint);
  font-weight: 550;
}

.section {
  margin-top: 24px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.section-note {
  color: var(--faint);
  font-size: 11.5px;
}

.week-rhythm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 14px;
}

.rhythm-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rhythm-count {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.rhythm-label {
  color: var(--muted);
  font-size: 11.5px;
}

.rhythm-dots {
  display: flex;
  gap: 7px;
}

.rhythm-dot {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--faint);
  font-size: 10px;
}

.rhythm-dot.done {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.rhythm-dot.short {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.rest-note {
  padding: 18px;
  color: var(--ink-2);
}

.rest-note strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 17px;
}

.phase-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 15px;
  border: 1px solid #e8d6c3;
  border-radius: 14px;
  background: #fffaf5;
  color: #6f4b31;
  font-size: 12.5px;
}

.phase-banner-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: #f6e6d7;
  color: #93552f;
  font-size: 18px;
}

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

.quick-card {
  min-height: 98px;
  padding: 15px;
  text-align: left;
  cursor: pointer;
}

.quick-card strong {
  display: block;
  margin: 7px 0 3px;
  font-size: 14px;
}

.quick-card span {
  color: var(--muted);
  font-size: 11.5px;
}

.quick-icon {
  color: var(--accent);
  font-size: 18px;
}

.tabbar {
  position: fixed;
  z-index: 40;
  right: 14px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(calc(100% - 28px), 592px);
  margin: 0 auto;
  padding: 7px;
  border: 1px solid rgba(214, 204, 194, 0.9);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 15px 45px rgba(46, 34, 26, 0.13);
  backdrop-filter: blur(18px);
}

.tab {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
}

.tab svg {
  width: 19px;
  height: 19px;
}

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

.tab.active svg {
  stroke-width: 2.3;
}

.list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line-soft);
}

.list-row {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 15px;
  border: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.list-row:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.list-row:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

.list-row-main {
  min-width: 0;
  flex: 1;
}

.list-row-title {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

.chevron {
  color: var(--faint);
  font-size: 18px;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.week-cell {
  display: grid;
  min-height: 43px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.week-cell.current {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 750;
}

.week-cell.deload {
  border-style: dashed;
}

.week-cell small {
  display: block;
  margin-top: -4px;
  font-size: 8px;
}

.phase-card {
  padding: 17px;
}

.phase-card-inner {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

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

.phase-name {
  font-size: 17px;
  font-weight: 760;
}

.phase-weeks {
  color: var(--muted);
  font-size: 11.5px;
}

.phase-focus {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 12.8px;
  line-height: 1.6;
}

.week-schedule {
  display: grid;
  gap: 8px;
}

.plan-day-grid {
  display: grid;
  gap: 8px;
}

.plan-day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 9px;
}

.plan-day-picker {
  display: grid;
  min-width: 0;
  min-height: 51px;
  place-items: center;
  gap: 1px;
  padding: 5px 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
}

.plan-day-picker strong {
  font-size: 12px;
  font-weight: 700;
}

.plan-day-picker span {
  color: var(--faint);
  font-size: 8.5px;
  white-space: nowrap;
}

.plan-day-picker.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.plan-day-picker.selected span {
  color: #ffe0d4;
}

.plan-day-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.plan-day-card.today {
  border-color: rgba(222, 95, 53, 0.4);
  background: #fffaf7;
}

.plan-day-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 62px;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
}

.plan-day-summary::-webkit-details-marker {
  display: none;
}

.plan-day-card[open] .plan-day-summary {
  border-bottom: 1px solid var(--line-soft);
}

.plan-day-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
}

.plan-day-title {
  min-width: 0;
}

.plan-day-title strong {
  display: block;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-day-title span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.8px;
}

.plan-today-tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.plan-day-chevron {
  font-size: 12px;
  transition: transform 180ms ease;
}

.plan-day-card[open] .plan-day-chevron {
  transform: rotate(180deg);
}

.plan-day-body {
  padding: 12px 14px 14px;
}

.plan-day-note {
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.plan-day-copy {
  margin-top: 9px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.6;
}

.plan-exercise-list {
  margin-top: 6px;
}

.plan-exercise-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto 14px;
  height: 54px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

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

.plan-exercise-index {
  color: var(--faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.plan-exercise-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
}

.plan-exercise-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-exercise-tag {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 700;
}

.plan-exercise-scheme {
  min-width: 70px;
  color: var(--accent-deep);
  font-size: 10.5px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.plan-exercise-row.upcoming .plan-exercise-label,
.plan-exercise-row.upcoming .plan-exercise-scheme {
  color: var(--faint);
  font-weight: 600;
}

.plan-day-secondary {
  margin-top: 8px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.5;
}

.plan-day-cta {
  min-height: 46px;
  margin-top: 11px;
  font-size: 13px;
}

.plan-day-done {
  margin-top: 11px;
}

.schedule-row {
  display: grid;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 11px 14px;
  border-radius: 13px;
}

.schedule-row.today {
  border-color: rgba(222, 95, 53, 0.35);
  background: var(--accent-soft);
}

.schedule-day {
  color: var(--muted);
  font-size: 11px;
}

.schedule-title {
  font-size: 13px;
  font-weight: 650;
}

.schedule-type {
  color: var(--faint);
  font-size: 10.5px;
}

.schedule-minutes {
  color: var(--ink-2);
  font-size: 11px;
}

.exercise-group + .exercise-group {
  margin-top: 18px;
}

.exercise-library-card + .exercise-library-card {
  margin-top: 9px;
}

.exercise-library-content {
  padding-top: 11px;
}

.exercise-group-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.exercise-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 57px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
}

.exercise-row + .exercise-row {
  margin-top: 7px;
}

.exercise-row-main {
  min-width: 0;
}

.exercise-row-name {
  font-size: 13.5px;
  font-weight: 650;
}

.exercise-row-cue {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.exercise-scheme {
  flex: 0 0 auto;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
}

.details-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.details-card > summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.details-card > summary::-webkit-details-marker {
  display: none;
}

.details-card[open] > summary {
  border-bottom: 1px solid var(--line-soft);
}

.details-content {
  padding: 15px 16px 17px;
}

.info-line {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}

.info-line:last-child {
  border-bottom: 0;
}

.info-line dt {
  color: var(--muted);
}

.info-line dd {
  margin: 0;
  color: var(--ink-2);
}

.detail-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.detail-copy {
  margin: 0;
  color: var(--ink-2);
  font-size: 12.8px;
  line-height: 1.65;
}

.instruction-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  counter-reset: action-step;
  list-style: none;
}

.instruction-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 7px;
  color: var(--ink-2);
  font-size: 12.8px;
  line-height: 1.6;
  counter-increment: action-step;
}

.instruction-list li::before {
  display: grid;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  content: counter(action-step);
  font-size: 10px;
  font-weight: 750;
}

.detail-section + .detail-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.meal-row {
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

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

.meal-name {
  font-size: 13px;
  font-weight: 650;
}

.meal-target {
  margin-left: 7px;
  color: var(--accent-deep);
  font-size: 11.5px;
}

.meal-how {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.ability-hero {
  padding: 20px;
  background:
    radial-gradient(circle at 105% 0%, rgba(47, 79, 74, 0.14), transparent 12rem),
    #eef3f0;
  border-color: #d8e4df;
}

.ability-large {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin-top: 5px;
}

.ability-large strong {
  font-size: 38px;
  font-weight: 820;
  letter-spacing: -0.06em;
  line-height: 1;
}

.ability-large span {
  padding-bottom: 3px;
  color: var(--green);
  font-size: 12px;
  font-weight: 650;
}

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

.ability-stat {
  padding: 10px 8px;
  border: 1px solid rgba(47, 79, 74, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.64);
  text-align: center;
}

.ability-stat strong {
  display: block;
  font-size: 18px;
  font-weight: 760;
}

.ability-stat span {
  color: var(--muted);
  font-size: 10.5px;
}

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

.pr-card,
.achievement-card {
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.pr-card strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.pr-card span {
  color: var(--muted);
  font-size: 10.5px;
}

.pr-name {
  overflow: hidden;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.achievement-card.locked {
  background: #fbf9f7;
  opacity: 0.64;
}

.achievement-icon {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 15px;
}

.achievement-card.locked .achievement-icon {
  background: var(--bg-deep);
  color: var(--faint);
}

.achievement-card strong {
  display: block;
  font-size: 12.5px;
}

.achievement-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.growth-next {
  margin-top: 10px;
  padding: 14px 15px;
  border: 1px dashed #e5cfbc;
  border-radius: 13px;
  background: #fffaf5;
}

.growth-next-label {
  display: block;
  margin-bottom: 4px;
  color: #9c5732;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.growth-next strong {
  display: block;
  font-size: 13px;
}

.growth-next p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.note-card p {
  margin: 8px 0 10px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
}

.note-card > span {
  color: var(--faint);
  font-size: 10.5px;
}

.invite-code {
  margin: 12px 0 8px;
  padding: 13px 10px;
  border: 1px dashed #dfc9b9;
  border-radius: 12px;
  background: #fffaf5;
  color: var(--accent-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-align: center;
  overflow-wrap: anywhere;
}

.empty {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

.empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-2);
  font-size: 14px;
}

.chart-grid {
  display: grid;
  gap: 9px;
}

.chart-card {
  padding: 14px;
}

.chart-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chart-value {
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.04em;
}

.chart-delta {
  color: var(--green);
  font-size: 10.5px;
  font-weight: 650;
}

.sparkline {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 7px;
}

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

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

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

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

.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}

.input::placeholder {
  color: var(--faint);
}

.textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.6;
}

.field-help {
  color: var(--faint);
  font-size: 10.5px;
}

.switch-row {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
}

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

.switch-copy strong {
  display: block;
  font-size: 13px;
}

.switch-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.8px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 28px;
  flex: 0 0 46px;
}

.switch input {
  width: 0;
  height: 0;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d9d2cb;
  cursor: pointer;
  transition: background 160ms ease;
}

.switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform 160ms ease;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.15);
}

.switch input:checked + span {
  background: var(--accent);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.onboarding {
  display: grid;
  min-height: 100vh;
  padding: calc(42px + env(safe-area-inset-top)) 24px 34px;
  place-items: center;
}

.onboarding-inner {
  width: min(100%, 430px);
}

.onboarding-mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 28px;
  place-items: center;
  border-radius: 19px;
  background: var(--accent);
  color: #fff8f3;
  font-size: 30px;
  box-shadow: 0 14px 35px rgba(222, 95, 53, 0.22);
}

.onboarding h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 820;
  letter-spacing: -0.055em;
  line-height: 1.15;
}

.onboarding p {
  margin: 13px 0 30px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.onboarding .input {
  min-height: 54px;
  padding: 0 15px;
  font-size: 17px;
}

.onboarding .button {
  margin-top: 14px;
}

.date-shortcuts {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 7px;
}

.date-shortcuts .button {
  margin-top: 0;
  min-height: 40px;
}

.privacy-note {
  margin-top: 18px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.workout-shell {
  min-height: calc(100vh - 72px);
}

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

.progress-track {
  height: 4px;
  flex: 1;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.workout-focus {
  margin-top: 22px;
}

.workout-exercise-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.exercise-title {
  margin: 5px 0 4px;
  font-size: clamp(34px, 10vw, 48px);
  font-weight: 830;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.exercise-scheme-large {
  color: var(--accent-deep);
  font-size: 15px;
  font-weight: 700;
}

.cue-card {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
}

.cue-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.set-strip {
  display: flex;
  gap: 8px;
  margin: 20px 0 12px;
}

.set-chip {
  display: grid;
  min-width: 62px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--muted);
  font-size: 11.5px;
}

.set-chip.done {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 650;
}

.set-chip.current {
  border-color: var(--accent);
  color: var(--accent-deep);
  font-weight: 700;
}

.rep-control {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.rep-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

.rep-value {
  text-align: center;
}

.rep-value strong {
  display: block;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.rep-value span {
  color: var(--muted);
  font-size: 10.5px;
}

.workout-cta {
  margin-top: 12px;
}

.timer-card {
  margin-top: 12px;
  padding: 17px;
  border: 1px solid #e7d8cc;
  border-radius: 15px;
  background: #fffaf6;
}

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

.timer-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

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

.timer-actions {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.warmup-note {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.exercise-detail-hero {
  margin-bottom: 17px;
}

.exercise-detail-hero h2 {
  margin: 4px 0 5px;
  font-size: 32px;
  letter-spacing: -0.05em;
}

.callout {
  padding: 15px 16px;
  border-radius: 13px;
  font-size: 12.5px;
  line-height: 1.65;
}

.callout.warm {
  background: var(--accent-soft);
  color: #6d321b;
}

.callout.cool {
  background: var(--green-soft);
  color: #29443f;
}

.callout.amber {
  background: var(--amber-soft);
  color: #67451e;
}

.manager-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(38px + env(safe-area-inset-bottom));
}

.manager-grid {
  display: grid;
  gap: 11px;
}

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

.manager-hero {
  padding: 22px;
  color: #f6f3ef;
  border: 0;
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 192, 158, 0.2), transparent 12rem),
    linear-gradient(145deg, #28231f, #3c3029);
  box-shadow: 0 18px 52px rgba(39, 30, 24, 0.18);
}

.manager-hero .muted {
  color: #bfb4aa;
}

.manager-hero h1 {
  margin: 7px 0 5px;
  font-size: 30px;
  letter-spacing: -0.05em;
}

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

.manager-metric {
  padding: 11px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.manager-metric strong {
  display: block;
  font-size: 19px;
  font-weight: 750;
}

.manager-metric span {
  color: #bfb4aa;
  font-size: 10px;
}

.insight-card {
  padding: 19px;
  border: 1px solid #e7d6c5;
  border-radius: 17px;
  background: #fffaf5;
}

.insight-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #9c5732;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.insight-title {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.insight-body {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  padding-left: 20px;
}

.timeline::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 6px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item {
  position: relative;
  padding: 0 0 18px;
}

.timeline-item::before {
  position: absolute;
  top: 4px;
  left: -18px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.timeline-item.short::before {
  background: var(--accent);
}

.timeline-item.rest::before {
  background: var(--faint);
}

.timeline-date {
  color: var(--muted);
  font-size: 10.5px;
}

.timeline-title {
  margin-top: 2px;
  font-size: 13.5px;
  font-weight: 650;
}

.timeline-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

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

.stat-card {
  padding: 15px;
}

.stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.stat-card span {
  color: var(--muted);
  font-size: 10.8px;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgba(34, 28, 24, 0.34);
  backdrop-filter: blur(5px);
  animation: fade-in 180ms ease both;
}

.modal {
  width: min(100%, 560px);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  animation: sheet-up 220ms ease both;
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
}

.modal.center {
  margin: auto;
}

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

.modal-title {
  margin: 0;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.modal-copy {
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
}

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

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.toast {
  position: fixed;
  z-index: 120;
  right: 20px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 20px;
  width: fit-content;
  max-width: min(420px, calc(100% - 40px));
  margin: auto;
  padding: 11px 15px;
  border-radius: 12px;
  background: #29231f;
  color: #fff;
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.offline-bar {
  margin: 0 20px 10px;
  padding: 9px 12px;
  border: 1px solid #ead8c8;
  border-radius: 11px;
  background: #fff9f3;
  color: #7d531f;
  font-size: 11.5px;
  text-align: center;
}

.footer-note {
  margin: 24px 0 4px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 680px) {
  .page {
    padding-right: 24px;
    padding-left: 24px;
  }

  .app-header {
    padding-right: 24px;
    padding-left: 24px;
  }

  .manager-shell {
    padding-top: 8px;
  }

  .manager-grid.two {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

@media (max-width: 370px) {
  .page {
    padding-right: 15px;
    padding-left: 15px;
  }

  .app-header {
    padding-right: 15px;
    padding-left: 15px;
  }

  .tab {
    gap: 3px;
    font-size: 10.5px;
  }

  .tab svg {
    width: 17px;
    height: 17px;
  }

  .rhythm-dot {
    width: 22px;
    height: 22px;
  }

  .hero-card {
    padding-right: 17px;
    padding-left: 17px;
  }
}

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