:root {
  --bg: #f4efe5;
  --ink: #201b16;
  --muted: #766b5f;
  --card: rgba(255, 252, 245, 0.88);
  --line: rgba(32, 27, 22, 0.13);
  --accent: #d94b2b;
  --accent-ink: #fff8ee;
  --sage: #7f9d79;
  --coal: #26231f;
  --shadow: 0 24px 80px rgba(56, 41, 25, 0.16);
  font-family: "Trebuchet MS", "Avenir Next", Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(217, 75, 43, 0.2), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(127, 157, 121, 0.28), transparent 30rem),
    linear-gradient(135deg, #f7f0df, #eee4d2 52%, #f8f3e8);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
}

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

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

.app-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

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

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: var(--coal);
  color: #fff1dd;
  box-shadow: 0 10px 26px rgba(32, 27, 22, 0.22);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--muted);
  font-size: 13px;
}

.dev-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
}

.dev-switch button {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dev-switch button.active {
  background: var(--coal);
  color: #fff4e5;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 18px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 190px;
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 190px;
  height: 190px;
  border-radius: 42% 58% 53% 47%;
  background: linear-gradient(135deg, var(--accent), #f0a35a);
  opacity: 0.22;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

h1 {
  max-width: 700px;
  font-size: clamp(38px, 10vw, 78px);
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 19px;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 15px;
  border-radius: 16px;
  background: var(--coal);
  color: #fff4e5;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled,
.form.is-pending .btn {
  cursor: wait;
  opacity: 0.72;
}

.btn.secondary {
  background: rgba(32, 27, 22, 0.08);
  color: var(--ink);
}

.btn.accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn.danger {
  background: #c9351f;
  color: #fff8ee;
}

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

.form.is-pending {
  opacity: 0.82;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  padding: 0 13px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(217, 75, 43, 0.65);
  box-shadow: 0 0 0 4px rgba(217, 75, 43, 0.12);
}

textarea {
  min-height: 140px;
  padding: 12px 13px;
  resize: vertical;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.quick-start-section {
  display: grid;
  gap: 14px;
}

.quick-start-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(217, 75, 43, 0.2);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(217, 75, 43, 0.13), transparent 54%),
    rgba(255, 255, 255, 0.3);
}

.quick-start-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.quick-start-kicker,
.quick-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.quick-start-kicker {
  margin-bottom: 10px;
}

.quick-start-card h3 {
  font-size: clamp(24px, 7vw, 42px);
}

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

.quick-start-stats span {
  display: grid;
  gap: 2px;
  min-width: 74px;
  padding: 10px;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 16px;
  background: rgba(255, 252, 245, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.quick-start-stats strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.quick-start-reason {
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(32, 27, 22, 0.045);
  font-size: 13px;
  font-weight: 800;
}

.quick-start-actions .btn {
  flex: 1 1 180px;
}

.quick-start-session {
  margin-top: 0;
}

.quick-start-picker {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.quick-start-program-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.24);
}

.quick-start-program-head p {
  margin: 4px 0 0;
}

.quick-start-day-list {
  display: grid;
  gap: 8px;
}

.quick-start-day {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 18px;
  background: rgba(255, 252, 245, 0.74);
  color: var(--ink);
  text-align: left;
}

.quick-start-day span:first-child {
  display: grid;
  gap: 4px;
}

.quick-start-day small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.quick-start-day.recommended {
  border-color: rgba(217, 75, 43, 0.32);
  background: rgba(217, 75, 43, 0.07);
}

.quick-start-day.selected {
  box-shadow: inset 0 0 0 2px rgba(32, 27, 22, 0.14);
}

.free-workout-card {
  border-color: rgba(127, 157, 121, 0.24);
  background:
    radial-gradient(circle at top right, rgba(127, 157, 121, 0.16), transparent 58%),
    rgba(255, 255, 255, 0.32);
}

.free-workout-live {
  display: grid;
  gap: 10px;
}

.free-workout-session {
  border-color: rgba(127, 157, 121, 0.26);
}

.pill.is-live {
  border-color: rgba(217, 75, 43, 0.28);
  color: var(--accent);
  background: rgba(217, 75, 43, 0.08);
}

.pill.is-done {
  border-color: rgba(127, 157, 121, 0.34);
  color: #476244;
  background: rgba(127, 157, 121, 0.12);
}

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

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.trainer-screen,
.client-screen {
  display: flex;
  min-height: calc(100vh - 86px);
  flex-direction: column;
  gap: 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

.trainer-screen-stack,
.client-screen-stack {
  display: grid;
  gap: 14px;
}

.bottom-nav {
  position: sticky;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(560px, 100%);
  margin: auto auto 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.96);
  box-shadow: 0 18px 40px rgba(56, 41, 25, 0.18);
  backdrop-filter: blur(18px);
}

.bottom-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.bottom-nav-button.active {
  background: var(--coal);
  color: #fff4e5;
  box-shadow: 0 10px 24px rgba(32, 27, 22, 0.18);
}

.hero-compact {
  min-height: 0;
}

.hero-compact h1 {
  max-width: 11ch;
  font-size: clamp(34px, 7vw, 64px);
}

.hero-compact .muted {
  max-width: 760px;
}

.trainer-tabs {
  display: grid;
  gap: 16px;
}

.tab-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
}

.compact-tabs {
  margin: 4px 0 14px;
}

.tab-button {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.tab-button.active {
  background: var(--coal);
  color: #fff4e5;
  box-shadow: 0 8px 20px rgba(32, 27, 22, 0.14);
}

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

.section-head {
  margin-bottom: 4px;
}

.section-head p {
  margin: 8px 0 0;
}

.summary-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
}

.summary-card strong {
  font-size: 34px;
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.summary-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric {
  display: grid;
  gap: 5px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid rgba(217, 75, 43, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(217, 75, 43, 0.16), transparent 70%),
    rgba(255, 255, 255, 0.44);
}

.metric.empty {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.26);
  opacity: 0.72;
}

.metric-name {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.metric strong {
  font-size: 36px;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.item {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
  padding: 13px;
}

.client-list-item,
.client-detail,
.client-trainer-card,
.self-program-card,
.client-program-preview,
.exercise-outline {
  display: grid;
  gap: 12px;
}

.client-list-main,
.detail-back {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.client-summary-grid {
  margin-top: 16px;
}

.compact-list {
  margin-top: 0;
}

.workout-outline {
  display: grid;
  gap: 10px;
}

.client-load {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.26);
}

.client-load p {
  margin: 0;
}

.settings-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.26);
}

.settings-row p {
  margin: 4px 0 0;
}

.settings-stack {
  display: grid;
  gap: 10px;
}

.profile-settings-card {
  gap: 16px;
}

.profile-settings-card .settings-row {
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.profile-settings-card .settings-row:first-child {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.profile-settings-card .settings-row:last-child {
  padding-bottom: 14px;
}

.load-period-head {
  align-items: center;
}

.load-period-head p {
  margin: 6px 0 0;
}

.period-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin: 10px 0 14px;
}

.period-form label {
  display: grid;
  min-width: 142px;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.period-form input {
  min-height: 36px;
}

.profile-form textarea {
  min-height: 112px;
}

.profile-overview {
  gap: 16px;
}

.profile-card-head {
  align-items: center;
}

.profile-card-head .trainer-profile-header {
  flex: 1 1 260px;
}

.profile-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.profile-fact {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.28);
}

.profile-fact strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.trainer-profile-hero h1 {
  max-width: 12ch;
}

.trainer-public-card {
  display: grid;
  gap: 14px;
}

.trainer-profile-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

.trainer-avatar {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(32, 27, 22, 0.1);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(217, 75, 43, 0.22), transparent 68%),
    rgba(32, 27, 22, 0.08);
  color: var(--coal);
  font-size: 24px;
  font-weight: 900;
}

.trainer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trainer-profile-header .eyebrow,
.trainer-profile-header .muted {
  margin: 0;
}

.trainer-profile-block {
  padding: 12px;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.26);
}

.trainer-profile-block p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.trainer-summary-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.trainer-summary-main .trainer-profile-header {
  flex: 1 1 240px;
}

.trainer-summary-copy {
  margin: 0;
}

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

.trainer-workout-launch .load-chip-list {
  margin-top: 10px;
}

.trainer-workout-layout {
  display: grid;
  gap: 12px;
}

.trainer-workout-clients {
  display: grid;
  gap: 8px;
}

.trainer-workout-client {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 18px;
  background: rgba(255, 252, 245, 0.68);
  color: var(--ink);
  text-align: left;
}

.trainer-workout-client.active {
  border-color: rgba(217, 75, 43, 0.3);
  background: rgba(217, 75, 43, 0.08);
}

.trainer-workout-client span:first-child {
  display: grid;
  gap: 4px;
}

.trainer-workout-client small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.trainer-workout-panel,
.trainer-workout-program {
  display: grid;
  gap: 12px;
}

.trainer-workout-selected {
  margin-top: 2px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(32, 27, 22, 0.34);
  backdrop-filter: blur(12px);
}

.modal-card {
  width: min(460px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(217, 75, 43, 0.12), transparent 48%),
    rgba(255, 252, 245, 0.98);
  box-shadow: 0 28px 80px rgba(32, 27, 22, 0.26);
}

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

.workout-modal-backdrop {
  z-index: 64;
}

.workout-session-modal {
  display: grid;
  gap: 12px;
  max-height: min(92vh, 820px);
}

.workout-session-modal-head {
  align-items: start;
  margin-bottom: 0;
}

.workout-modal-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workout-modal-session {
  gap: 0;
}

.workout-session.in-modal {
  border-radius: 22px;
  background: rgba(255, 252, 245, 0.64);
}

.workout-session.in-modal > .item-head {
  padding-bottom: 4px;
}

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

.workout-summary-grid .summary-card {
  min-height: 86px;
  padding: 12px;
  border-radius: 18px;
  box-shadow: none;
}

.workout-summary-grid .summary-card strong {
  font-size: 24px;
}

.workout-summary-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.workout-summary-exercise {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.workout-summary-exercise p {
  margin: 4px 0 0;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.workout-session.started {
  border-color: rgba(217, 75, 43, 0.24);
  box-shadow: inset 0 0 0 1px rgba(217, 75, 43, 0.08);
}

.workout-session.completed-today {
  border-color: rgba(127, 157, 121, 0.24);
  background: rgba(127, 157, 121, 0.055);
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.status {
  color: var(--sage);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status.pending {
  color: var(--accent);
}

.status.request {
  color: var(--accent);
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.program {
  display: grid;
  gap: 12px;
}

.program.editing,
.program.viewing {
  border-color: rgba(217, 75, 43, 0.28);
}

.program-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.program-actions p,
.program .item-head p,
.workout-head p {
  margin: 8px 0 0;
}

.program-editor {
  display: grid;
  gap: 12px;
}

.program-view {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.program-view-day {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.26);
}

.program-view-day h3 {
  margin: 0;
}

.program-view-toggle {
  flex: 0 0 auto;
}

.routine-preview {
  margin: 0;
}

.program-editor-toolbar {
  display: flex;
  justify-content: flex-start;
}

.surface-form {
  padding: 12px;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
}

.workout {
  border-left: 4px solid rgba(217, 75, 43, 0.55);
  padding-left: 12px;
}

.workout-editor {
  display: grid;
  gap: 10px;
}

.workout-head {
  align-items: center;
}

.routine-config-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px dashed rgba(32, 27, 22, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  opacity: 0.78;
}

.routine-config-row.is-enabled {
  border-style: solid;
  border-color: rgba(217, 75, 43, 0.18);
  background: rgba(217, 75, 43, 0.045);
  opacity: 1;
}

.routine-toggle {
  display: flex;
  flex: 1;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.routine-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.routine-toggle span {
  display: grid;
  gap: 2px;
}

.routine-toggle strong {
  font-size: 14px;
}

.routine-toggle small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.78);
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.add-exercise-button {
  justify-content: center;
  width: 100%;
}

.exercise-modal-form {
  gap: 10px;
}

.field-label {
  display: grid;
  gap: 6px;
}

.field-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field-label-full {
  width: 100%;
}

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

.exercise-modal-form .modal-actions {
  justify-content: space-between;
}

.exercise-search-field input[type="search"] {
  min-height: 46px;
}

.exercise-combobox {
  display: grid;
  position: relative;
  gap: 8px;
}

.exercise-combobox-field {
  cursor: text;
}

.exercise-combobox-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 0 10px 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 252, 245, 0.68);
  box-shadow: inset 0 -12px 28px rgba(36, 25, 21, 0.035);
}

.exercise-combobox-control input[type="search"] {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  box-shadow: none;
  outline: 0;
}

.exercise-combobox-control input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.exercise-combobox-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: rgba(217, 75, 43, 0.08);
  color: var(--accent);
}

.exercise-combobox-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.exercise-picker-dropdown {
  display: none;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 252, 245, 0.74);
}

.exercise-combobox:focus-within .exercise-picker-dropdown,
.exercise-combobox.is-open .exercise-picker-dropdown {
  display: block;
}

.exercise-sheet-modal.is-exercise-searching {
  scroll-padding-block: 120px calc(260px + env(safe-area-inset-bottom));
}

.exercise-sheet-modal.is-exercise-searching .modal-actions {
  display: none;
}

.exercise-source-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 252, 245, 0.56);
}

.exercise-source-tab {
  min-height: 38px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.exercise-source-tab.active {
  background: var(--coal);
  color: #fff4e5;
}

.exercise-picker {
  max-height: min(34vh, 280px);
  overflow: auto;
  padding-right: 2px;
}

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

.exercise-result {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 252, 245, 0.58);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.exercise-result span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.exercise-result strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.15;
}

.exercise-result small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.exercise-result em {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(36, 25, 21, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.exercise-result.selected {
  border-color: rgba(217, 75, 43, 0.36);
  background: linear-gradient(135deg, rgba(255, 224, 214, 0.72), rgba(255, 252, 245, 0.74));
  box-shadow: inset 0 0 0 1px rgba(217, 75, 43, 0.1);
}

.exercise-result.selected em {
  background: var(--coal);
  color: #fff4e5;
}

.exercise-result-hint {
  margin: 8px 0 0;
  font-size: 12px;
}

.exercise-selected-empty,
.exercise-empty-state {
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
}

.exercise-selected-empty {
  margin: 0;
}

.exercise-selected-card {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid rgba(217, 75, 43, 0.22);
  border-radius: 16px;
  background: rgba(217, 75, 43, 0.06);
}

.exercise-selected-card span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.exercise-selected-card strong {
  color: var(--ink);
}

.exercise-selected-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.exercise-empty-state {
  color: var(--muted);
  font-weight: 700;
}

.custom-exercise-fields {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed rgba(217, 75, 43, 0.28);
  border-radius: 18px;
  background: rgba(217, 75, 43, 0.055);
}

.create-custom-exercise {
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-style: dashed;
}

.exercise {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

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

.program-exercise-row > div {
  display: grid;
  gap: 4px;
}

.program-exercise-row strong {
  color: var(--ink);
}

.workout-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.workout-start-actions {
  display: flex;
  flex: 1 1 220px;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.workout-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.workout-timer.live {
  border-color: rgba(217, 75, 43, 0.28);
  color: var(--accent);
  background: rgba(217, 75, 43, 0.08);
}

.rest-timer.live {
  border-color: rgba(127, 157, 121, 0.34);
  color: #476244;
  background: rgba(127, 157, 121, 0.12);
}

.rest-timer.is-ready {
  border-color: rgba(217, 75, 43, 0.3);
  color: var(--accent);
  background: rgba(217, 75, 43, 0.1);
}

.workout-progress {
  font-size: 13px;
  font-weight: 800;
}

.editing-session {
  border-color: rgba(217, 75, 43, 0.34);
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.94), rgba(255, 248, 240, 0.82));
  box-shadow: 0 14px 38px rgba(56, 41, 25, 0.1);
}

.workout-session > .item-head {
  flex-wrap: wrap;
  align-items: center;
}

.workout-session > .item-head h3 {
  flex: 1 1 220px;
  margin: 0;
}

.workout-session > .item-head .pill {
  order: 2;
}

.session-edit-toggle {
  order: 3;
  margin-left: auto;
}

.edit-mode-copy {
  order: 4;
  width: 100%;
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
}

.set-hint {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  opacity: 0.72;
}

.set-exercise > .set-hint {
  display: none;
}

.session-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: -2px;
}

.completed-today:not(.editing-session) .routine-check {
  display: none;
}

.completed-today:not(.editing-session) .workout-fieldset {
  display: none;
}

.helper-copy {
  margin: 0;
  font-size: 13px;
}

.workout-session .helper-copy {
  display: none;
}

.workout-session.started .helper-copy,
.workout-session.editing-session .helper-copy {
  display: block;
  opacity: 0.78;
}

.workout-fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.workout-fieldset:disabled {
  opacity: 0.56;
}

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

.set-exercise {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.24);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.set-exercise.complete {
  border-color: rgba(127, 157, 121, 0.34);
  background: rgba(127, 157, 121, 0.075);
}

.set-exercise-head {
  align-items: center;
  gap: 10px;
}

.set-exercise-head h3 {
  margin: 0 0 2px;
  font-size: 16px;
}

.set-exercise-head .muted {
  font-size: 12px;
  line-height: 1.35;
}

.set-exercise-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.exercise-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(32, 27, 22, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.exercise-status.complete {
  background: rgba(127, 157, 121, 0.18);
  color: #476244;
}

.btn.compact {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.set-header,
.set-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 104px;
  gap: 6px;
  align-items: center;
}

.set-header {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  opacity: 0.72;
}

.set-row input {
  min-height: 36px;
  border-radius: 11px;
  padding: 0 8px;
}

.set-row.is-complete {
  padding: 5px 6px;
  border-radius: 13px;
  background: rgba(127, 157, 121, 0.08);
}

.set-title {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 12px;
  background: rgba(32, 27, 22, 0.08);
  font-size: 13px;
  font-weight: 900;
}

.check {
  display: flex;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.check input {
  width: 16px;
  min-height: 16px;
}

.notice {
  border: 1px dashed rgba(217, 75, 43, 0.5);
  border-radius: 20px;
  padding: 12px;
  color: var(--muted);
  background: rgba(217, 75, 43, 0.06);
  word-break: break-word;
}

.notice-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.invite-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.invite-panel strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

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

.text-button {
  display: inline-flex;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.onboarding-hero {
  min-height: 300px;
}

.onboarding-card {
  display: grid;
  gap: 18px;
}

.onboarding-steps {
  display: grid;
  gap: 12px;
}

.onboarding-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(226, 70, 38, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.48);
}

.onboarding-step > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  background: var(--ink);
  color: var(--accent-ink);
  font-weight: 900;
}

.onboarding-step h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.035em;
}

.onboarding-step p {
  margin: 4px 0 0;
}

.onboarding-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 10px;
}

.onboarding-skip {
  justify-self: center;
}

.legal-hero {
  min-height: 220px;
}

.legal-card,
.legal-profile-card {
  display: grid;
  gap: 16px;
}

.legal-form {
  gap: 18px;
}

.legal-check-list,
.legal-optional,
.legal-doc-grid,
.legal-document-body {
  display: grid;
  gap: 10px;
}

.legal-optional {
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.legal-check {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(32, 27, 22, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
}

.legal-check-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.legal-check input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.legal-check-copy {
  display: grid;
  gap: 5px;
}

.legal-check-copy small,
.legal-doc-card small,
.legal-section p {
  color: var(--muted);
  line-height: 1.45;
}

.legal-doc-link {
  margin-top: 2px;
  font-size: 13px;
}

.legal-actions {
  margin-top: 0;
}

.legal-doc-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.legal-doc-card {
  display: grid;
  gap: 6px;
  min-height: 122px;
  padding: 14px;
  border: 1px solid rgba(32, 27, 22, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  text-align: left;
}

.legal-doc-card span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-document-modal {
  width: min(100%, 680px);
}

.legal-section {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.38);
}

.legal-section p {
  margin: 0;
}

.legal-delete-row {
  margin-top: 2px;
}

.load-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.load-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(32, 27, 22, 0.08);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.empty-state {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.24);
}

.empty-state p {
  margin: 8px 0 0;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.fade-in {
  animation: fade-in 0.28s ease both;
}

.compact-form,
.extra-exercise-builder {
  margin-top: 12px;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form input {
  max-width: 96px;
}

.routine-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: start;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid rgba(32, 27, 22, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.28);
}

.routine-check small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.45;
}

.extra-exercise-builder {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(217, 75, 43, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.completed-today button[type="submit"][disabled] {
  display: none;
}

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

@media (min-width: 760px) {
  .split {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .trainer-workout-layout {
    grid-template-columns: minmax(220px, 0.44fr) minmax(0, 1fr);
    align-items: start;
  }

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

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

  .quick-start-main {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

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

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

@media (max-width: 420px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    max-width: 190px;
  }

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

  .workout-toolbar {
    align-items: stretch;
  }

  .workout-start-actions .btn {
    flex: 1 1 100%;
  }

  .trainer-summary-actions .btn {
    flex: 1 1 100%;
  }

  .workout-meta,
  .set-exercise-actions {
    justify-items: stretch;
  }

  .set-header,
  .set-row {
    grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) 30px;
  }

  .set-header span:last-child,
  .check span {
    display: none;
  }

  .check {
    justify-content: center;
  }
}

/* Stitch "Kinetic Calm" visual pass. Kept as an override layer so the app logic
   can continue using the existing component classes. */
:root {
  --bg: #fff8f6;
  --ink: #241915;
  --muted: #57423b;
  --card: #ffffff;
  --card-soft: #fff1ec;
  --card-warm: #ffe9e3;
  --card-high: #fae4dd;
  --line: rgba(36, 25, 21, 0.08);
  --line-strong: #dec0b6;
  --accent: #a43c12;
  --accent-bright: #ff7f50;
  --accent-ink: #ffffff;
  --sage: #006970;
  --coal: #241915;
  --shadow: 0 10px 30px rgba(26, 26, 26, 0.05);
  --soft-shadow: 0 12px 40px rgba(36, 25, 21, 0.07);
  --radius-card: 16px;
  --radius-control: 12px;
  font-family: Inter, "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 127, 80, 0.13), transparent 24rem),
    radial-gradient(circle at 0% 88%, rgba(0, 105, 112, 0.08), transparent 22rem),
    var(--bg);
}

body {
  background: transparent;
  font-family: Inter, "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 560px);
  padding: 0 20px calc(104px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 58px;
  margin: 0 -20px 22px;
  padding: calc(8px + env(safe-area-inset-top)) 20px 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 248, 246, 0.9);
  backdrop-filter: blur(18px);
}

.topbar-actions {
  gap: 6px;
}

.brand {
  min-width: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.07em;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}

.brand-mark svg,
.nav-icon svg,
.quick-action-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.dev-switch {
  gap: 3px;
  padding: 4px;
  border: 0;
  background: #e2dfde;
}

.dev-switch button {
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  color: rgba(36, 25, 21, 0.56);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.dev-switch button.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 3px 12px rgba(36, 25, 21, 0.1);
}

.app-mode-switch button {
  min-width: 68px;
}

.pill,
.load-chip,
.exercise-status {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: none;
  padding: 20px;
}

.beta-feedback-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  border-color: rgba(164, 60, 18, 0.16);
  background:
    radial-gradient(circle at 96% 6%, rgba(255, 127, 80, 0.18), transparent 7rem),
    var(--card);
}

.beta-feedback-card h2,
.beta-feedback-card p {
  margin-bottom: 0;
}

.beta-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.beta-promo-row code {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px dashed rgba(164, 60, 18, 0.34);
  border-radius: 14px;
  background: rgba(164, 60, 18, 0.08);
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.compact-check {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.32);
}

.hero {
  overflow: hidden;
  min-height: 0;
  padding: 30px;
  border-color: rgba(164, 60, 18, 0.14);
  background:
    radial-gradient(circle at 110% 88%, rgba(36, 25, 21, 0.08), transparent 5rem),
    var(--card-high);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero::after {
  right: 4px;
  bottom: 2px;
  width: 116px;
  height: 116px;
  border-radius: 20px;
  background:
    linear-gradient(90deg, transparent 18%, rgba(36, 25, 21, 0.08) 18% 28%, transparent 28% 72%, rgba(36, 25, 21, 0.08) 72% 82%, transparent 82%),
    radial-gradient(circle at 50% 42%, transparent 0 12px, rgba(36, 25, 21, 0.08) 13px 23px, transparent 24px),
    rgba(36, 25, 21, 0.08);
  clip-path: polygon(10% 18%, 90% 18%, 90% 96%, 50% 74%, 10% 96%);
  opacity: 1;
}

.hero-compact h1,
.hero h1 {
  max-width: 12ch;
  font-size: clamp(32px, 9vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero .muted,
.hero-compact .muted {
  max-width: 84%;
  color: rgba(87, 66, 59, 0.9);
  font-size: 16px;
  font-weight: 500;
}

.eyebrow,
.summary-label,
.field-label span,
.period-form label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

h1,
h2,
h3 {
  letter-spacing: -0.045em;
  line-height: 1.08;
}

h2 {
  font-size: 26px;
}

h3 {
  font-size: 18px;
}

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

.btn {
  min-height: 44px;
  border-radius: var(--radius-control);
  background: var(--coal);
  color: #ffffff;
  font-weight: 800;
  box-shadow: none;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn.accent {
  background: var(--coal);
  color: #ffffff;
}

.btn.secondary {
  border: 1px solid rgba(36, 25, 21, 0.72);
  background: transparent;
  color: var(--ink);
}

.btn.danger {
  background: #ba1a1a;
}

.btn.primary-wide {
  width: 100%;
}

input,
select,
textarea {
  border-width: 0 0 1px;
  border-color: var(--line-strong);
  border-radius: 0;
  background: transparent;
  padding: 0 2px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-bright);
  box-shadow: 0 4px 0 -2px rgba(255, 127, 80, 0.32);
}

.trainer-screen,
.client-screen {
  min-height: calc(100dvh - 92px);
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

.trainer-screen-stack,
.client-screen-stack {
  gap: 18px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 45;
  width: min(100%, 560px);
  margin: 0;
  padding: 7px 20px calc(8px + env(safe-area-inset-bottom));
  border-width: 1px 0 0;
  border-radius: 0;
  background: rgba(255, 248, 246, 0.94);
  box-shadow: 0 -12px 34px rgba(36, 25, 21, 0.06);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.bottom-nav-button {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 6px 8px;
  border-radius: 16px;
  color: rgba(36, 25, 21, 0.42);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bottom-nav-button.active {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.nav-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  justify-self: center;
}

.bottom-nav-button.active .nav-icon {
  color: var(--ink);
}

.quick-action-card {
  display: grid;
  gap: 16px;
  background: #ffffff;
}

.quick-action-card .section-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 0;
}

.quick-action-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 999px;
  background: #ffdbcf;
  color: #6c2000;
}

.quick-action-card h2 {
  font-size: 25px;
}

.quick-action-card .muted {
  margin-top: 4px;
}

.quick-action-card .load-chip-list {
  margin-top: 0;
}

.calendar-card {
  display: grid;
  gap: 14px;
}

.calendar-modal .modal-card,
.calendar-form {
  gap: 16px;
}

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

.calendar-pick-row {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 12px;
}

.calendar-form-grid .field-label:first-child {
  grid-column: 1 / -1;
}

.calendar-edit-modal .calendar-form-grid .field-label:first-child {
  grid-column: auto;
}

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

.calendar-list.compact {
  gap: 8px;
}

.calendar-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.calendar-event-card {
  grid-template-columns: 74px 54px minmax(0, 1fr) 42px;
  gap: 12px;
  padding: 12px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(226, 70, 38, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.58);
}

.calendar-event-time {
  display: grid;
  gap: 2px;
  place-items: center;
  min-height: 58px;
  border-radius: 18px;
  background: rgba(226, 70, 38, 0.1);
  color: var(--accent);
}

.calendar-event-time strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.calendar-event-time span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-event-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(226, 70, 38, 0.18), rgba(102, 135, 116, 0.18));
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.calendar-event-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.calendar-event-main {
  min-width: 0;
}

.calendar-event-main h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.035em;
}

.calendar-event-main .muted,
.calendar-event-program {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.calendar-event-program {
  color: var(--muted);
  font-weight: 800;
}

.calendar-edit-button {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: rgba(36, 25, 21, 0.08);
  color: var(--ink);
}

.calendar-edit-preview {
  display: grid;
  grid-template-columns: 74px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
}

.calendar-edit-preview h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.calendar-cancel-workout-button {
  width: 100%;
  min-height: 52px;
}

.calendar-time {
  margin-bottom: 4px;
}

.calendar-empty {
  margin: 0;
}

.calendar-reminder-form {
  display: flex;
  align-items: end;
  gap: 8px;
}

.calendar-reminder-label {
  min-width: 150px;
}

.tab-nav {
  display: flex;
  gap: 18px;
  padding: 0;
  border-width: 0 0 1px;
  border-color: var(--line-strong);
  border-radius: 0;
  background: transparent;
}

.compact-tabs {
  margin: 0 0 14px;
}

.tab-button {
  min-height: 38px;
  padding: 0 0 10px;
  border-radius: 0;
  color: rgba(87, 66, 59, 0.62);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tab-button.active {
  border-bottom: 2px solid var(--accent);
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.item {
  border-color: var(--line);
  border-radius: var(--radius-card);
  background: var(--card-soft);
  padding: 16px;
}

.client-list-item {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  background: #fff1ec;
}

.client-list-item .btn {
  grid-column: 2;
  justify-self: end;
}

.client-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(36, 25, 21, 0.08);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.85), transparent 0 22%),
    linear-gradient(135deg, #ffdbcf, #7af4ff);
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.client-list-main {
  min-width: 0;
}

.client-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.client-title-row h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--sage);
}

.status-dot.pending,
.status-dot.request {
  background: var(--accent);
}

.client-meta {
  margin: 6px 0 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.client-list-main .status {
  align-self: start;
}

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

.summary-card {
  min-height: 156px;
  border-radius: var(--radius-card);
  background: var(--card-high);
  box-shadow: none;
}

.summary-card strong {
  font-size: 38px;
  letter-spacing: -0.055em;
}

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

.metric {
  min-height: 126px;
  border-color: rgba(164, 60, 18, 0.12);
  border-radius: var(--radius-card);
  background: #fff1ec;
}

.metric::after {
  content: "";
  display: block;
  width: min(100%, calc(18% + var(--load, 0) * 1%));
  height: 4px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--accent-bright);
}

.metric.empty::after {
  background: rgba(36, 25, 21, 0.12);
}

.metric strong {
  font-size: 38px;
}

.modal-backdrop {
  align-items: end;
  place-items: end center;
  padding: 0;
  background: rgba(36, 25, 21, 0.28);
}

.modal-card {
  width: min(100%, 560px);
  max-height: min(86vh, 760px);
  padding: 20px;
  border-radius: 24px 24px 0 0;
  background: rgba(255, 248, 246, 0.98);
  box-shadow: 0 -20px 50px rgba(36, 25, 21, 0.18);
}

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

.sheet-modal {
  display: grid;
  gap: 18px;
  width: min(100%, 620px);
  max-height: min(90vh, 820px);
  padding: 28px 24px calc(20px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 34px 34px 0 0;
  background:
    radial-gradient(circle at 88% 4%, rgba(217, 75, 43, 0.11), transparent 34%),
    #fff8f6;
  box-shadow: 0 -26px 70px rgba(20, 18, 17, 0.28);
  overscroll-behavior: contain;
  will-change: transform;
  transition: transform 0.18s ease;
}

.sheet-handle {
  justify-self: center;
  width: 86px;
  height: 9px;
  border-radius: 999px;
  background: #ead9d4;
  cursor: grab;
  touch-action: none;
}

.sheet-modal.is-dragging {
  transition: none;
}

.sheet-modal.is-dismissing {
  transform: translateY(110%) !important;
  transition: transform 0.14s ease-in;
}

.sheet-modal .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 16px;
  align-items: start;
  margin-bottom: 0;
  touch-action: none;
}

.sheet-modal .section-head .eyebrow {
  color: #ad2c0d;
  font-size: 14px;
  letter-spacing: 0.13em;
}

.sheet-modal .section-head h2 {
  margin-top: 6px;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.sheet-modal .section-head .muted {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.55;
}

.sheet-modal .section-head > .btn.compact {
  display: grid;
  width: 58px;
  min-width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #f8e5df;
  color: #65433a;
  font-size: 0;
  box-shadow: none;
}

.sheet-modal .section-head > .btn.compact::before {
  content: "\00d7";
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.sheet-modal .form,
.sheet-modal .extra-exercise-builder {
  gap: 16px;
}

.sheet-modal input,
.sheet-modal select,
.sheet-modal textarea {
  min-height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.sheet-modal textarea {
  min-height: 128px;
}

.sheet-modal .modal-actions {
  position: sticky;
  bottom: calc(-20px - env(safe-area-inset-bottom));
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 10px;
  align-items: stretch;
  margin: 0 -2px;
  padding: 18px 0 0;
  background: linear-gradient(180deg, rgba(255, 248, 246, 0), #fff8f6 42%);
}

.sheet-modal .modal-actions > span:empty {
  display: none;
}

.sheet-modal .modal-actions .btn:only-child,
.sheet-modal .modal-actions > span:empty + .btn {
  grid-column: 1 / -1;
}

.sheet-modal .modal-actions .btn {
  min-height: 58px;
  border-radius: 16px;
}

.sheet-modal .modal-actions .btn.accent {
  border-color: #171717;
  background: #171717;
  color: #fff;
}

.sheet-modal .modal-actions .btn.secondary {
  background: #eee8e3;
  color: #241915;
}

.sheet-modal .modal-actions .btn.danger {
  background: #ffe5e0;
  color: #9b1c1c;
}

.sheet-modal .exercise-source-tabs {
  border-radius: 20px;
  background: #efe7e2;
}

.sheet-modal .exercise-search-field input[type="search"] {
  min-height: 56px;
  font-size: 16px;
}

.sheet-modal .exercise-combobox-control {
  min-height: 60px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
}

.sheet-modal .exercise-combobox-control input[type="search"] {
  min-height: 0;
  background: transparent;
}

.sheet-modal .exercise-picker {
  max-height: 210px;
  border-radius: 20px;
}

.sheet-modal .exercise-result,
.sheet-modal .exercise-selected-card {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

.sheet-modal .exercise-fields-grid {
  gap: 14px;
}

.sheet-modal .field-label {
  gap: 8px;
}

.sheet-modal .field-label span {
  font-size: 12px;
  letter-spacing: 0.09em;
}

.sheet-modal .helper-copy {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(238, 232, 227, 0.64);
}

.sheet-modal.trainer-workout-modal {
  width: min(100%, 760px);
}

@media (min-width: 760px) {
  .app-shell,
  .bottom-nav {
    width: min(100%, 980px);
  }

  .app-shell {
    padding-inline: 28px;
  }

  .topbar {
    margin-inline: -28px;
    padding-inline: 28px;
  }

  .hero-compact h1,
  .hero h1 {
    font-size: clamp(42px, 7vw, 72px);
  }

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

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

  .client-list-item {
    grid-template-columns: 64px minmax(0, 1fr) auto;
  }

  .client-list-item .btn {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .sheet-modal {
    width: 100vw;
    max-width: 100vw;
    max-height: min(90vh, 820px);
    padding: 24px 22px calc(18px + env(safe-area-inset-bottom));
    border-radius: 30px 30px 0 0;
  }

  .sheet-modal .section-head {
    grid-template-columns: minmax(0, 1fr) 54px;
    gap: 12px;
  }

  .sheet-modal .section-head > .btn.compact {
    width: 54px;
    min-width: 54px;
    height: 54px;
    min-height: 54px;
  }

  .sheet-modal .section-head h2 {
    font-size: clamp(28px, 8vw, 36px);
  }

  .sheet-modal .modal-actions {
    bottom: calc(-18px - env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
  }

  .exercise-sheet-modal .modal-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  }

  .sheet-modal .exercise-fields-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .sheet-modal.trainer-workout-modal {
    width: 100vw;
  }

  .onboarding-hero {
    min-height: 240px;
  }

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

@media (max-width: 420px) {
  .app-shell {
    padding-inline: 20px;
  }

  .topbar {
    align-items: center;
  }

  .topbar-actions {
    max-width: 240px;
  }

  .dev-switch:not(.app-mode-switch) {
    display: none;
  }

  .brand span:last-child {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    padding: 28px 30px;
  }

  .hero .muted,
  .hero-compact .muted {
    max-width: 82%;
  }

  .client-list-item {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .client-list-main {
    display: grid;
    gap: 2px;
  }
}

/* Stitch alignment pass: fixed app bars span the Telegram viewport, while
   content stays in a calm mobile column. This prevents the bottom menu from
   drifting away from the actual WebView center on desktop and mobile. */
.app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 20px calc(102px + env(safe-area-inset-bottom));
}

.topbar {
  width: calc(100% + 40px);
  margin: 0 -20px 22px;
  padding-inline: 20px;
}

.trainer-screen,
.client-screen {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.bottom-nav {
  right: 0;
  left: 0;
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 6px 20px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(36, 25, 21, 0.05);
  background: rgba(255, 248, 246, 0.9);
  transform: none;
}

.bottom-nav-button {
  min-height: 66px;
  border-radius: 0;
  color: rgba(36, 25, 21, 0.36);
  background: transparent;
}

.bottom-nav-button.active {
  color: var(--ink);
  background: transparent;
}

.bottom-nav-button.active .nav-icon {
  color: var(--ink);
  transform: translateY(-1px) scale(1.08);
}

.nav-icon {
  transition: transform 0.16s ease, color 0.16s ease;
}

@media (min-width: 760px) {
  .app-shell {
    width: 100%;
    max-width: none;
    padding-inline: 20px;
  }

  .topbar {
    width: calc(100% + 40px);
    margin-inline: -20px;
    padding-inline: 20px;
  }

  .bottom-nav {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .calendar-form-grid,
  .calendar-item {
    grid-template-columns: 1fr;
  }

  .calendar-pick-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  }

  .calendar-event-card {
    grid-template-columns: 68px 50px minmax(0, 1fr) 40px;
    gap: 10px;
  }

  .calendar-event-time {
    min-height: 54px;
  }

  .calendar-event-time strong {
    font-size: 21px;
  }

  .calendar-event-avatar {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .calendar-edit-preview {
    grid-template-columns: 68px 50px minmax(0, 1fr);
  }

  .calendar-reminder-form {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-reminder-label {
    min-width: 0;
  }

  .beta-feedback-card {
    grid-template-columns: 1fr;
  }

  .beta-feedback-actions {
    justify-content: stretch;
  }

  .beta-feedback-actions .btn {
    flex: 1 1 100%;
  }
}

.dismissible-hero {
  padding-right: 60px;
}

.hero-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  opacity: 0.46;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  appearance: none;
  pointer-events: auto;
}

.hero-close:hover,
.hero-close:focus-visible {
  opacity: 0.78;
}

.hero-close:active {
  transform: scale(0.96);
}

.load-card {
  background: #ffffff;
}

.load-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.load-title-row h2 {
  margin: 0;
}

.period-change-button {
  min-height: 34px;
  padding: 7px 12px;
  border-color: rgba(36, 25, 21, 0.12);
  background: rgba(255, 241, 236, 0.72);
  color: var(--ink);
  font-size: 12px;
}

.program .item-head {
  align-items: center;
}

.program-actions {
  align-items: center;
}

.program-view-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  margin-left: 2px;
  place-items: center;
  border: 1px solid rgba(36, 25, 21, 0.08);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.82), transparent 0 30%),
    #fff8f6;
  color: var(--ink);
  box-shadow: inset 0 -8px 20px rgba(36, 25, 21, 0.04);
}

.program-view-toggle svg {
  width: 22px;
  height: 22px;
  transition: transform 0.18s ease;
}

.program-view-toggle.active {
  border-color: rgba(164, 60, 18, 0.2);
  background: #ffdbcf;
  color: #6c2000;
}

.program-view-toggle svg.is-open {
  transform: rotate(180deg);
}

.athlete-profile-card .profile-card-head {
  gap: 14px;
}

.athlete-profile-card .btn {
  justify-self: end;
}

.client-profile-header .trainer-avatar {
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.8), transparent 0 24%),
    linear-gradient(135deg, #ffdbcf, #7af4ff);
}

@media (max-width: 560px) {
  .topbar {
    gap: 8px;
  }

  .brand {
    gap: 6px;
    font-size: 16px;
  }

  .brand span:last-child {
    max-width: none;
  }

  .topbar-actions {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .app-mode-switch {
    flex: 1 1 144px;
    max-width: 170px;
  }

  .app-mode-switch button {
    min-width: 0;
    flex: 1 1 0;
    padding-inline: 8px;
  }

  .user-badge {
    max-width: 154px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .program .item-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .program .program-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 10px;
    justify-items: stretch;
  }

  .program .program-actions .pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .program .program-actions .btn {
    grid-column: 1;
    width: 100%;
    min-width: 0;
  }

  .program-view-toggle {
    grid-column: 2;
    width: 48px;
    height: 48px;
  }

  .profile-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .profile-card-head .trainer-profile-header {
    min-width: 0;
  }

  .profile-card-head .btn {
    width: 100%;
    justify-self: stretch;
  }

  .trainer-profile-header {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .trainer-avatar {
    width: 68px;
    height: 68px;
    border-radius: 22px;
  }

  .trainer-profile-header h2,
  .summary-card strong {
    overflow-wrap: anywhere;
  }

  .trainer-profile-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .trainer-profile-summary .summary-card {
    min-height: 124px;
  }

  .athlete-profile-card .profile-card-head {
    display: grid;
  }

  .athlete-profile-card .btn {
    width: 100%;
  }

}

.program-editor-backdrop {
  align-items: end;
  place-items: end center;
  padding: 0;
  background: rgba(14, 13, 13, 0.66);
}

.program-editor-sheet {
  display: grid;
  gap: 18px;
  width: min(100%, 704px);
  max-height: min(92vh, 840px);
  padding: 30px 36px 28px;
  border: 0;
  border-radius: 40px 40px 0 0;
  background: #fff8f6;
  box-shadow: 0 -26px 70px rgba(20, 18, 17, 0.34);
  will-change: transform;
  transition: transform 0.18s ease;
}

.program-editor-handle {
  justify-self: center;
  width: 86px;
  height: 10px;
  border-radius: 999px;
  background: #ead9d4;
  cursor: grab;
  touch-action: none;
}

.program-editor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  touch-action: none;
}

.program-editor-sheet.is-dragging {
  transition: none;
}

.program-editor-sheet.is-dragging .program-editor-handle {
  cursor: grabbing;
}

.program-editor-sheet.is-dismissing {
  transform: translateY(110%) !important;
  transition: transform 0.14s ease-in;
}

.program-editor-head .eyebrow {
  color: #ad2c0d;
  font-size: 18px;
  letter-spacing: 0.09em;
}

.program-editor-head h2 {
  margin-top: 14px;
  font-size: clamp(27px, 5vw, 34px);
  letter-spacing: -0.04em;
}

.program-editor-close {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #f8e5df;
  color: #65433a;
  font-size: 54px;
  font-weight: 300;
  line-height: 1;
}

.program-editor-close svg {
  width: 34px;
  height: 34px;
}

.program-editor {
  gap: 28px;
}

.program-editor-day-list {
  display: grid;
  gap: 28px;
}

.program-editor-day {
  overflow: hidden;
  border: 1px solid rgba(84, 49, 40, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(45, 31, 25, 0.04);
}

.program-editor-day.expanded {
  background: #ffffff;
}

.program-editor-day-head {
  display: grid;
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr) 44px 34px;
  gap: 16px;
  align-items: center;
  padding: 28px 30px;
  border: 0;
  background: rgba(255, 248, 246, 0.72);
  color: #2a201d;
  text-align: left;
  font-size: clamp(22px, 4.8vw, 30px);
  font-weight: 700;
  cursor: pointer;
}

.program-editor-day-icon,
.program-editor-button-icon {
  display: grid;
  place-items: center;
  color: #ad2c0d;
}

.program-editor-day-icon svg,
.program-editor-button-icon svg {
  width: 34px;
  height: 34px;
}

.program-editor-day-chevron {
  display: grid;
  place-items: center;
  color: #8d746d;
  transform: rotate(0deg);
  transition: transform 0.18s ease;
}

.program-editor-day-edit {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: rgba(173, 44, 13, 0.08);
  color: #ad2c0d;
}

.program-editor-day-edit svg {
  width: 28px;
  height: 28px;
}

.program-editor-day-chevron svg {
  width: 28px;
  height: 28px;
}

.program-editor-day.expanded .program-editor-day-chevron {
  transform: rotate(180deg);
}

.program-editor-day-body {
  display: grid;
  gap: 28px;
  padding: 30px;
  border-top: 1px solid rgba(84, 49, 40, 0.06);
}

.program-editor-exercise-list {
  display: grid;
  gap: 16px;
}

.program-editor-exercise-card {
  display: grid;
  gap: 20px;
  padding: 28px 30px;
  border: 1px solid #f1cfc6;
  border-radius: 14px;
  background: #ffe8e3;
}

.program-editor-exercise-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 44px;
  gap: 14px;
  align-items: start;
}

.program-editor-exercise-main {
  display: grid;
  position: relative;
  gap: 14px;
  min-width: 0;
  padding: 0 42px 12px 0;
  border: 0;
  border-bottom: 2px solid #dfaa9e;
  background: transparent;
  color: #1e1715;
  text-align: left;
}

.program-editor-field-caption,
.program-editor-value span {
  color: #876b64;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 500;
}

.program-editor-exercise-main strong {
  overflow: hidden;
  color: #17110f;
  font-size: clamp(22px, 4.8vw, 30px);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-editor-search-icon {
  display: grid;
  position: absolute;
  right: 0;
  bottom: 14px;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #ad2c0d;
}

.program-editor-search-icon svg,
.program-editor-delete svg,
.program-editor-edit svg,
.program-editor-routine-edit svg,
.program-editor-save svg {
  display: block;
  width: 100%;
  height: 100%;
}

.program-editor-delete,
.program-editor-edit {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.program-editor-delete {
  color: #d4565f;
}

.program-editor-edit {
  color: #ad2c0d;
  background: rgba(173, 44, 13, 0.08);
}

.program-editor-delete svg,
.program-editor-edit svg {
  width: 30px;
  height: 30px;
}

.program-editor-muscles {
  margin: -8px 0 0;
  font-size: 14px;
}

.program-editor-exercise-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 30px;
}

.program-editor-value {
  display: grid;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #dfb4aa;
}

.program-editor-value strong {
  color: #68737d;
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 700;
}

.program-editor-routine-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 0 30px;
}

.program-editor-routine {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
}

.program-editor-routine label {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #4c342e;
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 700;
}

.program-editor-routine input {
  width: 28px;
  height: 28px;
  accent-color: #ad2c0d;
}

.program-editor-routine-edit {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: rgba(173, 44, 13, 0.08);
  color: #ad2c0d;
}

.program-editor-routine-edit svg {
  width: 18px;
  height: 18px;
  margin: auto;
}

.program-editor-add-exercise {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 3px dashed #ead9d4;
  border-radius: 14px;
  background: #fffdfc;
  color: #65433a;
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 700;
}

.program-editor-add-exercise span:first-child {
  color: #65433a;
  font-size: 42px;
}

.program-editor-add-day {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: center;
  gap: 22px;
  border: 1px solid #f1d3ca;
  border-radius: 22px;
  background: #fff0ec;
  color: #ad2c0d;
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 900;
}

.program-editor-savebar {
  position: sticky;
  bottom: -28px;
  z-index: 2;
  padding: 20px 0 0;
  background: linear-gradient(180deg, rgba(255, 248, 246, 0), #fff8f6 42%);
}

.program-editor-save {
  min-height: 96px;
  border-radius: 22px;
  background: #171717;
  font-size: clamp(21px, 4.8vw, 29px);
  box-shadow: 0 18px 36px rgba(23, 23, 23, 0.22);
}

.program-editor-save span:first-child {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
}

.program-editor-empty {
  margin: 0;
  padding: 18px;
}

@media (max-width: 560px) {
  .program-editor-sheet {
    width: 100vw;
    max-width: 100vw;
    max-height: min(90vh, 820px);
    padding: 24px 22px calc(18px + env(safe-area-inset-bottom));
    border-radius: 30px 30px 0 0;
  }

  .program-editor-head {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .program-editor-close {
    width: 58px;
    height: 58px;
  }

  .program-editor-close svg {
    width: 28px;
    height: 28px;
  }

  .program-editor-day-head {
    grid-template-columns: 32px minmax(0, 1fr) 40px 28px;
    gap: 12px;
    padding: 20px 18px;
    font-size: clamp(19px, 6vw, 24px);
  }

  .program-editor-day-body {
    gap: 20px;
    padding: 20px 18px;
  }

  .program-editor-exercise-card {
    padding: 22px 18px;
  }

  .program-editor-exercise-grid {
    gap: 22px 20px;
  }

  .program-editor-routine-row {
    gap: 10px;
    padding: 0;
  }

  .program-editor-routine {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 6px;
    min-width: 0;
  }

  .program-editor-routine label {
    min-width: 0;
    gap: 8px;
    font-size: 16px;
  }

  .program-editor-routine input {
    width: 26px;
    height: 26px;
  }

  .program-editor-routine-edit {
    width: 30px;
    height: 30px;
  }

  .program-editor-add-exercise {
    min-height: 82px;
    gap: 12px;
    font-size: clamp(20px, 7vw, 28px);
    text-align: center;
  }

  .program-editor-add-day,
  .program-editor-save {
    min-height: 78px;
  }
}

@media (max-width: 380px) {
  .program-editor-sheet {
    padding: 26px 22px 20px;
  }

  .program-editor-day-head,
  .program-editor-day-body {
    padding-right: 20px;
    padding-left: 20px;
  }

  .program-editor-exercise-card {
    padding: 22px;
  }

  .program-editor-exercise-grid {
    gap: 22px 18px;
  }

  .program-editor-routine-row {
    padding: 0;
  }

  .brand span:last-child {
    display: none;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
  }

  .user-badge {
    max-width: 128px;
  }
}

.theme-toggle {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(36, 25, 21, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  box-shadow: 0 3px 12px rgba(36, 25, 21, 0.06);
}

.theme-toggle svg {
  display: block;
  width: 19px;
  height: 19px;
}

.theme-toggle:active {
  transform: scale(0.96);
}

html[data-theme="dark"] {
  --bg: #12100f;
  --ink: #fff4ee;
  --muted: #ccb8ae;
  --card: #1d1917;
  --card-soft: #251f1d;
  --card-warm: #2b221f;
  --card-high: #34251f;
  --line: rgba(255, 244, 238, 0.1);
  --line-strong: rgba(255, 181, 156, 0.32);
  --accent: #ffb59c;
  --accent-bright: #ff7f50;
  --accent-ink: #2a0f06;
  --sage: #7af4ff;
  --coal: #fff4ee;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  --soft-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 127, 80, 0.12), transparent 24rem),
    radial-gradient(circle at 0% 88%, rgba(0, 181, 192, 0.09), transparent 22rem),
    var(--bg);
}

html[data-theme="dark"] body {
  color: var(--ink);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .bottom-nav {
  border-color: rgba(255, 244, 238, 0.08);
  background: rgba(18, 16, 15, 0.9);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .summary-label,
html[data-theme="dark"] .field-label span,
html[data-theme="dark"] .period-form label,
html[data-theme="dark"] .client-meta {
  color: var(--accent);
}

html[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 244, 238, 0.1);
  background: rgba(255, 244, 238, 0.07);
  color: var(--ink);
  box-shadow: none;
}

html[data-theme="dark"] .dev-switch {
  background: rgba(255, 244, 238, 0.08);
}

html[data-theme="dark"] .dev-switch button {
  color: rgba(255, 244, 238, 0.56);
}

html[data-theme="dark"] .dev-switch button.active {
  background: #fff4ee;
  color: #241915;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .quick-action-card,
html[data-theme="dark"] .load-card,
html[data-theme="dark"] .calendar-card {
  border-color: var(--line);
  background: rgba(29, 25, 23, 0.94);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .beta-feedback-card {
  border-color: rgba(255, 181, 156, 0.16);
  background:
    radial-gradient(circle at 96% 6%, rgba(255, 120, 84, 0.13), transparent 7rem),
    rgba(29, 25, 23, 0.94);
}

html[data-theme="dark"] .beta-promo-row code,
html[data-theme="dark"] .compact-check {
  border-color: rgba(255, 244, 238, 0.1);
  background: rgba(255, 244, 238, 0.055);
}

html[data-theme="dark"] .hero {
  border-color: rgba(255, 181, 156, 0.18);
  background:
    radial-gradient(circle at 110% 88%, rgba(255, 244, 238, 0.08), transparent 5rem),
    linear-gradient(135deg, #34251f, #271d1a);
}

html[data-theme="dark"] .hero::after {
  background:
    linear-gradient(90deg, transparent 18%, rgba(255, 244, 238, 0.08) 18% 28%, transparent 28% 72%, rgba(255, 244, 238, 0.08) 72% 82%, transparent 82%),
    radial-gradient(circle at 50% 42%, transparent 0 12px, rgba(255, 244, 238, 0.08) 13px 23px, transparent 24px),
    rgba(255, 244, 238, 0.08);
}

html[data-theme="dark"] .hero .muted,
html[data-theme="dark"] .hero-compact .muted,
html[data-theme="dark"] .muted {
  color: var(--muted);
}

html[data-theme="dark"] .btn {
  background: var(--coal);
  color: #241915;
}

html[data-theme="dark"] .btn.secondary {
  border-color: rgba(255, 244, 238, 0.28);
  background: transparent;
  color: var(--ink);
}

html[data-theme="dark"] .btn.danger {
  background: #ffb4ab;
  color: #690005;
}

html[data-theme="dark"] .pill,
html[data-theme="dark"] .load-chip,
html[data-theme="dark"] .exercise-status,
html[data-theme="dark"] .status {
  border-color: rgba(255, 244, 238, 0.1);
  background: rgba(255, 244, 238, 0.07);
  color: var(--muted);
}

html[data-theme="dark"] .calendar-event-card,
html[data-theme="dark"] .calendar-edit-preview {
  border-color: rgba(255, 244, 238, 0.1);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 120, 84, 0.14), transparent 42%),
    rgba(255, 244, 238, 0.045);
}

html[data-theme="dark"] .calendar-event-time,
html[data-theme="dark"] .calendar-edit-button {
  background: rgba(255, 244, 238, 0.07);
}

html[data-theme="dark"] .onboarding-step {
  border-color: rgba(255, 244, 238, 0.1);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 120, 84, 0.12), transparent 42%),
    rgba(255, 244, 238, 0.045);
}

html[data-theme="dark"] .onboarding-step > span {
  background: #fff4ee;
  color: #241915;
}

html[data-theme="dark"] .item,
html[data-theme="dark"] .client-list-item,
html[data-theme="dark"] .metric,
html[data-theme="dark"] .settings-row,
html[data-theme="dark"] .program-view-day,
html[data-theme="dark"] .profile-fact,
html[data-theme="dark"] .trainer-profile-block,
html[data-theme="dark"] .quick-start-program-group,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .routine-config-row,
html[data-theme="dark"] .exercise-empty-state,
html[data-theme="dark"] .exercise-selected-empty,
html[data-theme="dark"] .legal-check,
html[data-theme="dark"] .legal-doc-card,
html[data-theme="dark"] .legal-section,
html[data-theme="dark"] .notice {
  border-color: rgba(255, 244, 238, 0.1);
  background: rgba(255, 244, 238, 0.045);
}

html[data-theme="dark"] .exercise-source-tabs {
  border-color: rgba(255, 244, 238, 0.1);
  background: rgba(255, 244, 238, 0.055);
}

html[data-theme="dark"] .exercise-source-tab {
  color: rgba(255, 244, 238, 0.62);
}

html[data-theme="dark"] .exercise-source-tab.active {
  background: #fff4ee;
  color: #241915;
}

html[data-theme="dark"] .exercise-combobox-control,
html[data-theme="dark"] .exercise-picker-dropdown {
  border-color: rgba(255, 244, 238, 0.1);
  background: rgba(255, 244, 238, 0.055);
}

html[data-theme="dark"] .exercise-combobox-control input[type="search"] {
  color: var(--ink);
  background: transparent;
}

html[data-theme="dark"] .exercise-combobox-icon {
  background: rgba(255, 181, 156, 0.12);
  color: var(--accent);
}

html[data-theme="dark"] .exercise-result {
  border-color: rgba(255, 244, 238, 0.1);
  background: rgba(255, 244, 238, 0.055);
}

html[data-theme="dark"] .exercise-result.selected {
  border-color: rgba(255, 181, 156, 0.3);
  background: linear-gradient(135deg, rgba(255, 181, 156, 0.16), rgba(255, 244, 238, 0.06));
}

html[data-theme="dark"] .exercise-result.selected em {
  background: #fff4ee;
  color: #241915;
}

html[data-theme="dark"] .exercise-selected-card {
  border-color: rgba(255, 181, 156, 0.24);
  background: rgba(255, 181, 156, 0.085);
}

html[data-theme="dark"] .routine-config-row.is-enabled {
  border-color: rgba(255, 181, 156, 0.24);
  background: rgba(255, 181, 156, 0.075);
}

html[data-theme="dark"] .summary-card {
  border-color: rgba(255, 244, 238, 0.1);
  background: linear-gradient(135deg, rgba(255, 181, 156, 0.13), rgba(255, 244, 238, 0.045));
}

html[data-theme="dark"] .metric::after {
  background: var(--accent-bright);
}

html[data-theme="dark"] .quick-action-icon {
  background: rgba(255, 181, 156, 0.16);
  color: var(--accent);
}

html[data-theme="dark"] .client-avatar,
html[data-theme="dark"] .trainer-avatar {
  border-color: rgba(255, 244, 238, 0.1);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 244, 238, 0.18), transparent 0 22%),
    linear-gradient(135deg, rgba(255, 181, 156, 0.34), rgba(122, 244, 255, 0.18));
  color: var(--ink);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  border-color: rgba(255, 181, 156, 0.28);
  color: var(--ink);
  background: transparent;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: rgba(255, 244, 238, 0.42);
}

html[data-theme="dark"] option {
  color: #241915;
}

html[data-theme="dark"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.58);
}

html[data-theme="dark"] .modal-card {
  border-color: rgba(255, 244, 238, 0.1);
  background: rgba(24, 21, 20, 0.98);
  box-shadow: 0 -22px 54px rgba(0, 0, 0, 0.44);
}

html[data-theme="dark"] .sheet-modal {
  background:
    radial-gradient(circle at 88% 4%, rgba(255, 120, 84, 0.1), transparent 34%),
    rgba(24, 21, 20, 0.98);
  box-shadow: 0 -26px 70px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .sheet-handle {
  background: rgba(255, 244, 238, 0.12);
}

html[data-theme="dark"] .sheet-modal .section-head > .btn.compact {
  background: rgba(255, 244, 238, 0.08);
  color: var(--ink);
}

html[data-theme="dark"] .sheet-modal .section-head .eyebrow {
  color: var(--accent);
}

html[data-theme="dark"] .sheet-modal input,
html[data-theme="dark"] .sheet-modal select,
html[data-theme="dark"] .sheet-modal textarea,
html[data-theme="dark"] .sheet-modal .exercise-result,
html[data-theme="dark"] .sheet-modal .exercise-selected-card {
  background: rgba(255, 244, 238, 0.055);
}

html[data-theme="dark"] .sheet-modal .exercise-source-tabs,
html[data-theme="dark"] .sheet-modal .helper-copy {
  background: rgba(255, 244, 238, 0.06);
}

html[data-theme="dark"] .sheet-modal .modal-actions {
  background: linear-gradient(180deg, rgba(24, 21, 20, 0), rgba(24, 21, 20, 0.98) 42%);
}

html[data-theme="dark"] .sheet-modal .modal-actions .btn.accent {
  border-color: #fff4ee;
  background: #fff4ee;
  color: #241915;
}

html[data-theme="dark"] .sheet-modal .modal-actions .btn.secondary {
  background: rgba(255, 244, 238, 0.08);
  color: var(--ink);
}

html[data-theme="dark"] .sheet-modal .modal-actions .btn.danger {
  background: rgba(255, 103, 82, 0.14);
  color: #ff9f8c;
}

html[data-theme="dark"] .program-editor-sheet {
  background: rgba(24, 21, 20, 0.98);
}

html[data-theme="dark"] .program-editor-handle {
  background: rgba(255, 244, 238, 0.12);
}

html[data-theme="dark"] .program-editor-close {
  background: rgba(255, 244, 238, 0.08);
  color: var(--ink);
}

html[data-theme="dark"] .program-editor-day {
  border-color: rgba(255, 244, 238, 0.1);
  background: rgba(255, 244, 238, 0.045);
}

html[data-theme="dark"] .program-editor-day.expanded,
html[data-theme="dark"] .program-editor-day-head {
  background: rgba(255, 244, 238, 0.06);
}

html[data-theme="dark"] .program-editor-day-head,
html[data-theme="dark"] .program-editor-exercise-main strong,
html[data-theme="dark"] .program-editor-value span,
html[data-theme="dark"] .program-editor-routine label {
  color: var(--ink);
}

html[data-theme="dark"] .program-editor-exercise-card {
  border-color: rgba(255, 181, 156, 0.2);
  background: rgba(255, 181, 156, 0.12);
}

html[data-theme="dark"] .program-editor-exercise-main,
html[data-theme="dark"] .program-editor-value {
  border-color: rgba(255, 181, 156, 0.24);
}

html[data-theme="dark"] .program-editor-value strong {
  color: rgba(255, 244, 238, 0.72);
}

html[data-theme="dark"] .program-editor-add-exercise,
html[data-theme="dark"] .program-editor-add-day {
  border-color: rgba(255, 181, 156, 0.18);
  background: rgba(255, 181, 156, 0.08);
  color: var(--accent);
}

html[data-theme="dark"] .program-editor-edit {
  background: rgba(255, 181, 156, 0.12);
  color: var(--accent);
}

html[data-theme="dark"] .program-editor-day-edit {
  background: rgba(255, 181, 156, 0.12);
  color: var(--accent);
}

html[data-theme="dark"] .program-editor-savebar {
  background: linear-gradient(180deg, rgba(24, 21, 20, 0), rgba(24, 21, 20, 0.98) 42%);
}

html[data-theme="dark"] .program-editor-save {
  background: #fff4ee;
  color: #241915;
}

html[data-theme="dark"] .tab-nav {
  border-color: rgba(255, 244, 238, 0.12);
}

html[data-theme="dark"] .tab-button {
  color: rgba(255, 244, 238, 0.58);
}

html[data-theme="dark"] .tab-button.active,
html[data-theme="dark"] .bottom-nav-button.active {
  color: var(--ink);
}

html[data-theme="dark"] .bottom-nav-button {
  color: rgba(255, 244, 238, 0.42);
}

html[data-theme="dark"] .program-view-toggle {
  border-color: rgba(255, 244, 238, 0.12);
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 244, 238, 0.14), transparent 0 30%),
    rgba(255, 244, 238, 0.055);
  color: var(--ink);
}

html[data-theme="dark"] .program-view-toggle.active {
  border-color: rgba(255, 181, 156, 0.28);
  background: rgba(255, 181, 156, 0.18);
  color: var(--accent);
}

html[data-theme="dark"] .period-change-button {
  border-color: rgba(255, 244, 238, 0.12);
  background: rgba(255, 244, 238, 0.065);
  color: var(--ink);
}

html[data-theme="dark"] .hero-close {
  color: var(--ink);
  opacity: 0.5;
}

html[data-theme="dark"] .quick-start-section {
  background: rgba(29, 25, 23, 0.78);
}

html[data-theme="dark"] .quick-start-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 181, 156, 0.18);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 127, 80, 0.16), transparent 46%),
    linear-gradient(145deg, rgba(46, 34, 30, 0.96), rgba(27, 23, 21, 0.96));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .quick-start-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 244, 238, 0.08), transparent 42%),
    radial-gradient(circle at 16% 18%, rgba(255, 181, 156, 0.08), transparent 30%);
  pointer-events: none;
}

html[data-theme="dark"] .quick-start-card > * {
  position: relative;
  z-index: 1;
}

html[data-theme="dark"] .quick-start-card h3 {
  color: #fff8f4;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .quick-start-kicker .pill {
  border-color: rgba(255, 244, 238, 0.12);
  background: rgba(255, 244, 238, 0.075);
  color: rgba(255, 244, 238, 0.78);
}

html[data-theme="dark"] .quick-start-kicker .pill.is-live {
  border-color: rgba(255, 181, 156, 0.28);
  background: rgba(255, 127, 80, 0.13);
  color: #ffb59c;
}

html[data-theme="dark"] .quick-start-stats {
  gap: 10px;
}

html[data-theme="dark"] .quick-start-stats span {
  border-color: rgba(255, 244, 238, 0.11);
  background: rgba(255, 244, 238, 0.09);
  color: rgba(255, 244, 238, 0.62);
  box-shadow: inset 0 -10px 24px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .quick-start-stats strong {
  color: #fff8f4;
}

html[data-theme="dark"] .quick-start-reason {
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 244, 238, 0.74);
}

html[data-theme="dark"] .quick-start-actions .btn.accent {
  background: #fff4ee;
  color: #241915;
}

html[data-theme="dark"] .quick-start-actions .btn.secondary {
  border-color: rgba(255, 244, 238, 0.24);
  background: rgba(255, 244, 238, 0.05);
  color: #fff4ee;
}

html[data-theme="dark"] .free-workout-card {
  border-color: rgba(122, 244, 255, 0.16);
  background:
    radial-gradient(circle at 100% 0%, rgba(122, 244, 255, 0.12), transparent 48%),
    linear-gradient(145deg, rgba(31, 38, 35, 0.96), rgba(23, 26, 24, 0.96));
}

html[data-theme="dark"] .free-workout-card .quick-start-kicker .pill {
  border-color: rgba(122, 244, 255, 0.18);
}
