:root {
  --ink: #19201d;
  --muted: #5a625d;
  --paper: #f6f3ec;
  --panel: #fffdfa;
  --line: #ddd6c9;
  --green: #2f7d62;
  --teal: #166c76;
  --coral: #c9674d;
  --shadow: 0 18px 45px rgba(32, 38, 35, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(47, 125, 98, 0.13), transparent 42%),
    linear-gradient(290deg, rgba(201, 103, 77, 0.12), transparent 34%),
    var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

a {
  color: inherit;
}

.landing-page {
  background: var(--paper);
}

.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 5vw, 56px);
  color: #ffffff;
}

.landing-brand,
.landing-nav a {
  text-decoration: none;
  font-weight: 800;
}

.landing-brand {
  font-size: 1.05rem;
}

.landing-nav nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 26px);
}

.landing-nav nav a {
  color: rgba(255, 255, 255, 0.86);
}

.landing-nav .nav-cta {
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(25, 32, 29, 0.28);
  backdrop-filter: blur(10px);
}

.landing-hero {
  min-height: 88vh;
  display: grid;
  align-items: end;
  padding: 110px clamp(18px, 5vw, 64px) 76px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(18, 24, 22, 0.88), rgba(18, 24, 22, 0.44) 48%, rgba(18, 24, 22, 0.2)),
    url("https://images.pexels.com/photos/6815695/pexels-photo-6815695.jpeg?auto=compress&fit=crop&w=1800&q=82");
  background-position: center;
  background-size: cover;
}

.landing-hero-copy {
  width: min(720px, 100%);
}

.landing-hero h1 {
  margin: 8px 0 18px;
  font-size: clamp(3.2rem, 9vw, 7rem);
  line-height: 0.95;
}

.landing-hero p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  line-height: 1.45;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.landing-button {
  min-height: 54px;
  display: inline-grid;
  place-items: center;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.landing-band {
  padding: clamp(44px, 8vw, 86px) clamp(18px, 5vw, 64px);
}

.landing-section-heading {
  max-width: 620px;
  margin-bottom: 24px;
}

.landing-section-heading h2,
.landing-split h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.02;
}

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

.landing-grid article {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.92);
  box-shadow: var(--shadow);
}

.landing-grid strong {
  display: block;
  font-size: 1.25rem;
}

.landing-grid p,
.landing-split p {
  color: var(--muted);
  line-height: 1.55;
}

.landing-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
}

.landing-split > div {
  max-width: 720px;
}

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

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 56px) 0;
}

.auth-panel {
  width: min(560px, 100%);
  border: 1px solid rgba(25, 32, 29, 0.1);
  border-radius: 8px;
  padding: clamp(22px, 5vw, 38px);
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(255, 253, 250, 0.92));
  box-shadow: 0 24px 70px rgba(32, 38, 35, 0.14);
}

.auth-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.auth-brand > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--green);
  font-size: 0.9rem;
  font-weight: 900;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  font-size: 1.15rem;
  line-height: 1.15;
}

.auth-brand small {
  margin-top: 3px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-panel h1 {
  margin-top: 0;
  max-width: 100%;
  font-size: clamp(2.25rem, 5vw, 3.45rem);
  line-height: 1.02;
}

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

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.auth-form input {
  min-height: 54px;
  width: 100%;
  border: 1px solid rgba(25, 32, 29, 0.14);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
}

.auth-form input:focus {
  outline: 3px solid rgba(47, 125, 98, 0.18);
  border-color: rgba(47, 125, 98, 0.55);
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 6px;
}

.auth-actions #forgotPasswordBtn {
  grid-column: 1 / -1;
}

.auth-status {
  color: var(--muted);
  line-height: 1.45;
}

.confirmation-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(47, 125, 98, 0.26);
  border-radius: 8px;
  padding: 14px;
  background: rgba(47, 125, 98, 0.08);
}

.confirmation-card strong,
.confirmation-card p {
  display: block;
}

.confirmation-card strong {
  font-size: 1.05rem;
}

.confirmation-card p {
  color: var(--muted);
  line-height: 1.45;
}

.confirmation-card .compact-button {
  width: fit-content;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.client-bar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(47, 125, 98, 0.22);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 253, 250, 0.88);
  box-shadow: 0 10px 24px rgba(32, 38, 35, 0.08);
}

.client-bar strong,
.client-bar small {
  display: block;
}

.client-bar small {
  margin-top: 2px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.onboarding {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.phone-flow {
  width: min(560px, 100%);
  min-height: min(860px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid rgba(25, 32, 29, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.92);
  box-shadow: var(--shadow);
}

.flow-top {
  display: grid;
  grid-template-columns: 56px 1fr 74px;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.back-btn,
.skip-btn {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
}

.back-btn {
  font-size: 2rem;
  line-height: 1;
}

.skip-btn {
  font-weight: 700;
}

.progress-track {
  height: 8px;
  margin: 18px 0 34px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe4df;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.2s ease;
}

.question-copy h2 {
  font-size: clamp(2rem, 6vw, 3.7rem);
  line-height: 1.05;
}

.question-copy p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.45;
}

.choices {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.choice {
  min-height: 86px;
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 14px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.choice.selected {
  border-color: rgba(47, 125, 98, 0.55);
  background: rgba(47, 125, 98, 0.12);
}

.choice strong,
.choice small {
  display: block;
}

.choice strong {
  font-size: 1.1rem;
}

.choice small {
  margin-top: 5px;
}

.choice b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #aeb8b0;
  border-radius: 7px;
  color: var(--ink);
}

.choice.selected b {
  border-color: var(--green);
  color: #ffffff;
  background: var(--green);
}

.name-input {
  width: 100%;
  min-height: 62px;
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--ink);
  background: #ffffff;
  font-size: 1.3rem;
}

.flow-actions {
  margin-top: auto;
  padding-top: 28px;
}

.flow-next {
  width: 100%;
}

.planner-result {
  min-height: 100vh;
  padding: clamp(18px, 5vw, 56px) 0;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0 16px;
}

.result-grid article {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 253, 250, 0.92);
  box-shadow: var(--shadow);
}

.result-grid strong {
  display: block;
  margin-top: 14px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.hero {
  min-height: 310px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 6vw, 64px) 0;
}

.eyebrow,
.label {
  display: block;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.intro {
  max-width: 560px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.45;
}

.hero-photo {
  min-height: 250px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(25, 32, 29, 0.05), rgba(25, 32, 29, 0.18)),
    url("https://images.pexels.com/photos/6922181/pexels-photo-6922181.jpeg?auto=compress&fit=crop&w=1200&q=80");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 6px 0 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.74);
}

.tab {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.tab.active {
  color: #ffffff;
  background: var(--green);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.status-band,
.workout-panel,
.note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.9);
  box-shadow: var(--shadow);
}

.status-band {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px;
}

.status-band strong {
  display: block;
  margin-top: 6px;
  font-size: 1.4rem;
}

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

.workout-panel {
  margin-top: 16px;
  padding: 24px;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.duration {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 10px 14px;
  color: #ffffff;
  background: var(--teal);
  font-weight: 700;
}

.steps {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding-left: 22px;
}

.steps li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  line-height: 1.4;
  overflow: hidden;
}

.steps li.selected-step {
  border-color: rgba(47, 125, 98, 0.65);
  background: rgba(47, 125, 98, 0.1);
  box-shadow: 0 10px 26px rgba(47, 125, 98, 0.12);
}

.step-select {
  width: 100%;
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 0;
  padding: 14px 16px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.step-select span {
  min-width: 0;
}

.step-select b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: #ece7dc;
  font-size: 0.78rem;
}

.selected-step .step-select b {
  color: #ffffff;
  background: var(--green);
}

.selected-exercise-preview {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  margin: 18px 0;
  border: 1px solid rgba(47, 125, 98, 0.36);
  border-radius: 8px;
  padding: 16px;
  background: rgba(47, 125, 98, 0.08);
}

.mini-video {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 8px;
  padding: 16px;
  color: #ffffff;
  background:
    linear-gradient(rgba(25, 32, 29, 0.05), rgba(25, 32, 29, 0.74)),
    url("https://images.pexels.com/photos/7322452/pexels-photo-7322452.jpeg?auto=compress&fit=crop&w=1000&q=80");
  background-size: cover;
  background-position: center;
}

.mini-video span {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-video strong {
  margin-top: 8px;
  font-size: 1.7rem;
  line-height: 1.05;
}

.mini-guide h2 {
  margin-top: 6px;
}

.mini-guide p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

.mini-guide ul {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.4;
}

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

.primary,
.secondary {
  min-height: 52px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.primary {
  border: 0;
  color: #ffffff;
  background: var(--green);
}

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

.section-title {
  margin: 28px 0 16px;
}

.section-title p {
  max-width: 680px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.week-grid,
.profile-grid,
.week-overview {
  display: grid;
  gap: 12px;
}

.week-grid {
  grid-template-columns: repeat(7, 1fr);
}

.week-overview {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 12px;
}

.week-grid article,
.week-overview article {
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
}

.week-overview article {
  min-height: 120px;
}

.week-overview strong {
  display: block;
  margin: 12px 0 6px;
  font-size: 1.25rem;
  line-height: 1.15;
}

.cadence-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.cadence-card,
.message-rules article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 253, 250, 0.96);
  box-shadow: 0 12px 30px rgba(32, 38, 35, 0.08);
}

.cadence-time {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: #ffffff;
  background: var(--teal);
  font-weight: 800;
}

.cadence-card h3,
.message-rules h3 {
  margin-top: 14px;
  font-size: 1.2rem;
}

.cadence-card p,
.message-rules p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.message-bubble {
  margin-top: 16px;
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  background: #eef6f3;
  font-weight: 700;
  line-height: 1.35;
}

.reply-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.reply-chips button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--teal);
  background: #ffffff;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.reply-chips button.selected {
  border-color: transparent;
  color: #ffffff;
  background: var(--teal);
}

.duration.green {
  background: var(--green);
}

.duration.amber {
  color: var(--ink);
  background: #ffc20f;
}

.duration.red {
  background: var(--coral);
}

.checkin-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.checkin-summary span {
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--teal);
  background: rgba(22, 108, 118, 0.12);
  font-size: 0.88rem;
  font-weight: 800;
}

.checkin-summary .amber {
  color: #6d4d00;
  background: rgba(255, 194, 15, 0.22);
}

.checkin-summary .red {
  color: #8e2b22;
  background: rgba(255, 111, 97, 0.18);
}

.message-rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 14px 0;
}

.week-grid span {
  color: var(--coral);
  font-weight: 700;
}

.week-grid strong {
  display: block;
  margin: 16px 0 8px;
  font-size: 1.15rem;
}

.weekly-plan-shell {
  display: grid;
  gap: 14px;
}

.visual-week article {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.future-calendar {
  grid-auto-rows: minmax(142px, auto);
}

.future-calendar .today-card {
  border-color: rgba(47, 125, 98, 0.62);
  box-shadow: inset 0 0 0 2px rgba(47, 125, 98, 0.12);
}

.visual-week article.active {
  border-color: rgba(47, 125, 98, 0.55);
  background: rgba(47, 125, 98, 0.12);
  transform: translateY(-2px);
}

.intensity {
  display: inline-block;
  margin-top: 14px;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.75rem;
  line-height: 1;
}

.intensity.easy {
  color: #ffffff;
  background: var(--green);
}

.intensity.light {
  color: var(--ink);
  background: #dcead8;
}

.intensity.moderate {
  color: #ffffff;
  background: var(--coral);
}

.intensity.rest {
  color: var(--muted);
  background: #ece7dc;
}

.day-detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 253, 250, 0.92);
  box-shadow: var(--shadow);
}

.video-placeholder {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 8px;
  padding: 18px;
  color: #ffffff;
  background:
    linear-gradient(rgba(25, 32, 29, 0.08), rgba(25, 32, 29, 0.78)),
    url("https://images.pexels.com/photos/8436479/pexels-photo-8436479.jpeg?auto=compress&fit=crop&w=900&q=80");
  background-size: cover;
  background-position: center;
}

.video-placeholder span {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.video-placeholder strong {
  margin-top: 8px;
  font-size: 1.6rem;
}

#daySummary {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.45;
}

.exercise-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.exercise-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #ffffff;
  overflow: hidden;
}

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

.exercise-link {
  width: 100%;
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 0;
  padding: 12px 14px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.exercise-link span {
  min-width: 0;
}

.exercise-link::after {
  content: "Open";
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  color: #ffffff;
  background: var(--teal);
  font-size: 0.78rem;
  font-weight: 700;
}

.exercise-view {
  min-height: 100vh;
  padding: 18px 0 44px;
}

.back-to-plan {
  margin-bottom: 14px;
}

.exercise-player {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) 1fr;
  gap: 18px;
  align-items: stretch;
}

.exercise-video {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 8px;
  padding: 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(180deg, rgba(24, 28, 27, 0.08), rgba(18, 24, 22, 0.86)),
    url("https://images.pexels.com/photos/6815695/pexels-photo-6815695.jpeg?auto=compress&fit=crop&w=1000&q=80");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.youtube-video {
  min-height: 520px;
  padding: 0;
  background: #101615;
}

.youtube-video iframe {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #101615;
}

.youtube-video::before {
  z-index: 1;
  background: linear-gradient(180deg, rgba(11, 15, 14, 0.08), rgba(11, 15, 14, 0.72));
  mix-blend-mode: normal;
}

.youtube-video::after {
  z-index: 2;
}

.youtube-video-overlay {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 520px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  pointer-events: none;
}

.youtube-video-overlay .video-topline,
.youtube-video-overlay .youtube-link {
  pointer-events: auto;
}

.youtube-link {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-width: 132px;
  padding: 0 18px;
  text-decoration: none;
}

.exercise-video::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    rgba(20, 25, 23, 0.12);
  background-size: 56px 56px;
  mix-blend-mode: soft-light;
}

.exercise-video::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 1;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0.02);
}

.video-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(18, 24, 22, 0.44);
  backdrop-filter: blur(10px);
}

.video-topline span,
.video-topline b {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.recording-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6b57;
  box-shadow: 0 0 0 5px rgba(255, 107, 87, 0.18);
}

.exercise-video strong {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.play-button {
  position: relative;
  z-index: 1;
  width: 84px;
  min-height: 48px;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.motion-demo {
  position: absolute;
  right: clamp(22px, 6vw, 72px);
  bottom: 106px;
  z-index: 1;
  width: 214px;
  height: 270px;
  opacity: 0.78;
  filter: drop-shadow(0 28px 32px rgba(0, 0, 0, 0.34));
}

.demo-head,
.demo-body,
.demo-arm,
.demo-leg,
.demo-shin,
.demo-foot,
.demo-hip,
.demo-chair {
  position: absolute;
  background: rgba(255, 248, 238, 0.94);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.studio-floor {
  position: absolute;
  left: -18px;
  right: -18px;
  bottom: 0;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.04) 62%, transparent 70%);
  transform: perspective(280px) rotateX(66deg);
}

.form-line {
  position: absolute;
  z-index: 3;
  width: 3px;
  border-radius: 999px;
  background: rgba(120, 232, 191, 0.7);
  box-shadow: 0 0 16px rgba(120, 232, 191, 0.42);
}

.form-line-back {
  top: 70px;
  left: 104px;
  height: 116px;
  transform: rotate(-7deg);
  transform-origin: bottom;
}

.form-line-knee {
  top: 178px;
  left: 96px;
  width: 68px;
  height: 3px;
}

.rep-counter {
  position: absolute;
  top: 18px;
  right: 2px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(17, 24, 21, 0.5);
  backdrop-filter: blur(8px);
}

.rep-counter span {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rep-counter strong {
  margin: -4px 0 0;
  font-size: 1.55rem;
  line-height: 1;
}

.demo-head {
  top: 28px;
  left: 92px;
  width: 44px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 251, 244, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.72);
}

.demo-body {
  top: 76px;
  left: 86px;
  width: 60px;
  height: 112px;
  border-radius: 30px 30px 22px 22px;
  transform-origin: 50% 94%;
  background:
    linear-gradient(92deg, rgba(40, 95, 115, 0.7), rgba(58, 145, 132, 0.64));
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.demo-arm {
  top: 98px;
  width: 22px;
  height: 96px;
  border-radius: 999px;
  transform-origin: 50% 12%;
  background: rgba(255, 251, 244, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.62);
}

.demo-arm-left {
  left: 67px;
  transform: rotate(24deg);
}

.demo-arm-right {
  left: 142px;
  transform: rotate(-24deg);
}

.demo-hip {
  top: 178px;
  left: 82px;
  z-index: 2;
  width: 72px;
  height: 34px;
  border-radius: 18px;
  background: rgba(38, 63, 88, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.42);
  transform-origin: center;
}

.demo-leg {
  top: 198px;
  width: 25px;
  height: 72px;
  border-radius: 999px;
  transform-origin: 50% 8%;
  background: rgba(38, 63, 88, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.demo-leg-left {
  left: 82px;
  transform: rotate(12deg);
}

.demo-leg-right {
  left: 130px;
  transform: rotate(-12deg);
}

.demo-shin {
  top: 246px;
  width: 22px;
  height: 66px;
  border-radius: 999px;
  transform-origin: 50% 8%;
  background: rgba(45, 74, 103, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.demo-shin-left {
  left: 89px;
  transform: rotate(-8deg);
}

.demo-shin-right {
  left: 134px;
  transform: rotate(8deg);
}

.demo-foot {
  bottom: 0;
  width: 46px;
  height: 15px;
  border-radius: 999px 999px 6px 6px;
  background: rgba(244, 240, 231, 0.76);
}

.demo-foot-left {
  left: 72px;
}

.demo-foot-right {
  left: 128px;
}

.demo-chair {
  right: 8px;
  bottom: 18px;
  width: 86px;
  height: 74px;
  border-radius: 8px 8px 4px 4px;
  background:
    linear-gradient(90deg, transparent 0 13px, rgba(86, 67, 55, 0.9) 13px 20px, transparent 20px 66px, rgba(86, 67, 55, 0.9) 66px 73px, transparent 73px),
    linear-gradient(#d7b389 0 42px, transparent 42px);
  box-shadow: inset 0 -7px 0 rgba(96, 68, 48, 0.28), 0 16px 24px rgba(0, 0, 0, 0.24);
}

.exercise-video:not(.movement-squat) .demo-chair {
  display: none;
}

.exercise-video.movement-mobility .form-line-knee,
.exercise-video.movement-mobility .demo-hip,
.exercise-video.movement-mobility .demo-leg,
.exercise-video.movement-mobility .demo-shin,
.exercise-video.movement-mobility .demo-foot {
  opacity: 0.5;
}

.exercise-video.movement-mobility .demo-arm-left {
  transform: rotate(76deg);
}

.exercise-video.movement-mobility .demo-arm-right {
  transform: rotate(-76deg);
}

.exercise-video.movement-walk .form-line-knee {
  display: none;
}

.exercise-video.movement-balance .demo-foot-left {
  transform: translateY(-12px);
}

.video-cue {
  position: relative;
  z-index: 1;
  max-width: 330px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
  line-height: 1.4;
}

.video-progress {
  position: relative;
  z-index: 1;
  width: min(340px, 100%);
  height: 8px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.video-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
}

.exercise-video.playing .demo-body {
  animation: squat-body 2.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.exercise-video.playing .demo-head {
  animation: squat-head 2.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.exercise-video.playing .demo-arm-left {
  animation: arm-left 2.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.exercise-video.playing .demo-arm-right {
  animation: arm-right 2.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.exercise-video.playing .demo-hip {
  animation: squat-hip 2.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.exercise-video.playing .demo-leg-left {
  animation: thigh-left 2.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.exercise-video.playing .demo-leg-right {
  animation: thigh-right 2.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.exercise-video.playing .demo-shin-left {
  animation: shin-left 2.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.exercise-video.playing .demo-shin-right {
  animation: shin-right 2.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.exercise-video.playing .form-line-back {
  animation: guide-back 2.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.exercise-video.playing .video-progress span {
  animation: video-progress 5.6s linear infinite;
}

@keyframes squat-body {
  0%, 100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translate(-18px, 42px) rotate(-13deg);
  }
}

@keyframes squat-head {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translate(-18px, 42px);
  }
}

@keyframes arm-left {
  0%, 100% {
    transform: rotate(24deg);
  }
  50% {
    transform: translate(-12px, 38px) rotate(76deg);
  }
}

@keyframes arm-right {
  0%, 100% {
    transform: rotate(-24deg);
  }
  50% {
    transform: translate(-24px, 34px) rotate(-8deg);
  }
}

@keyframes squat-hip {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translate(-22px, 34px) rotate(-5deg);
  }
}

@keyframes thigh-left {
  0%, 100% {
    transform: rotate(12deg);
  }
  50% {
    transform: translate(-24px, 30px) rotate(78deg);
  }
}

@keyframes thigh-right {
  0%, 100% {
    transform: rotate(-12deg);
  }
  50% {
    transform: translate(-27px, 30px) rotate(52deg);
  }
}

@keyframes shin-left {
  0%, 100% {
    transform: rotate(-8deg);
  }
  50% {
    transform: translate(-4px, 8px) rotate(-24deg);
  }
}

@keyframes shin-right {
  0%, 100% {
    transform: rotate(8deg);
  }
  50% {
    transform: translate(-4px, 8px) rotate(-10deg);
  }
}

@keyframes guide-back {
  0%, 100% {
    transform: rotate(-7deg);
  }
  50% {
    transform: translate(-18px, 38px) rotate(-17deg);
  }
}

@keyframes video-progress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.exercise-panel,
.guide-grid article,
.safety-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.92);
  box-shadow: var(--shadow);
}

.exercise-panel {
  padding: clamp(20px, 5vw, 42px);
}

.exercise-panel.resting {
  border-color: rgba(47, 125, 98, 0.5);
  background: rgba(255, 253, 250, 0.98);
}

.exercise-panel h1 {
  margin-top: 10px;
}

#exerciseDose {
  margin: 16px 0 22px;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.35;
}

.set-tracker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.set-pill {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.set-pill.active {
  color: #ffffff;
  background: var(--teal);
}

.set-pill.done {
  color: #ffffff;
  background: var(--green);
}

.set-pill.done::before {
  content: "Done: ";
}

.set-status {
  margin: -8px 0 20px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.35;
}

.exercise-feedback {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 253, 250, 0.96);
}

.feedback-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.feedback-options button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.feedback-options button.selected {
  border-color: transparent;
  color: #ffffff;
  background: var(--teal);
}

.rest-timer {
  margin: -4px 0 20px;
  border: 1px solid rgba(47, 125, 98, 0.32);
  border-radius: 8px;
  padding: 16px;
  background: rgba(47, 125, 98, 0.1);
}

.rest-timer strong {
  display: block;
  margin-top: 6px;
  color: var(--teal);
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1;
}

.rest-timer p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
}

.rest-progress {
  height: 8px;
  margin: 14px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(47, 125, 98, 0.18);
}

.rest-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.2s linear;
}

.rest-timer .secondary {
  min-height: 44px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.guide-grid article {
  min-height: 190px;
  padding: 18px;
}

.guide-grid ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 20px;
}

.guide-grid li,
.guide-grid p {
  color: var(--muted);
  line-height: 1.45;
}

.guide-grid p {
  margin-top: 14px;
}

.highlight-guide {
  border-radius: 8px;
  padding: 10px;
  color: var(--ink) !important;
  background: rgba(47, 125, 98, 0.14);
}

.safety-strip {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 18px;
  border-color: rgba(201, 103, 77, 0.45);
}

.safety-strip strong {
  color: var(--coral);
  font-size: 1.1rem;
}

.safety-strip p {
  color: var(--muted);
  line-height: 1.45;
}

.profile-grid {
  grid-template-columns: repeat(4, 1fr);
}

.profile-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
}

.profile-grid article {
  min-height: 116px;
}

.profile-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 1.05rem;
  line-height: 1.3;
}

small {
  color: var(--muted);
  line-height: 1.35;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 28px 0 16px;
}

.settings-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--teal);
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.progress-card {
  min-height: 190px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 253, 250, 0.95);
  box-shadow: 0 12px 30px rgba(32, 38, 35, 0.08);
}

.editable-card {
  cursor: pointer;
}

.card-edit-button {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--teal);
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.progress-card.featured {
  min-height: 230px;
}

.metric-title {
  display: block;
  padding-right: 72px;
  color: var(--muted);
  font-size: 1.12rem;
  font-weight: 800;
}

.progress-card strong {
  display: block;
  margin-top: 18px;
  color: #6b6d6b;
  font-size: clamp(2.05rem, 4vw, 3.1rem);
  line-height: 1;
}

.progress-card em {
  color: var(--muted);
  font-size: 0.42em;
  font-style: normal;
  font-weight: 700;
}

.metric-source {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 800;
}

.sparkline {
  height: 58px;
  margin: 18px -18px -18px;
  opacity: 0.95;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.weight-line {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 360 70' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 38 C55 38 70 38 90 38 C120 39 112 47 150 46 C205 46 220 52 255 61 C290 69 330 68 360 68 L360 70 L0 70 Z' fill='%23fff4ca'/%3E%3Cpath d='M0 38 C55 38 70 38 90 38 C120 39 112 47 150 46 C205 46 220 52 255 61 C290 69 330 68 360 68' fill='none' stroke='%23ffc20f' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.calories-line {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 360 70' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 44 L12 44 L16 39 L23 45 L28 39 L36 44 L42 40 L49 49 L58 42 L68 43 L73 55 L79 45 L86 45 L92 40 L100 43 L112 42 L119 50 L125 43 L132 44 L139 38 L146 42 L152 20 L158 50 L164 32 L170 62 L176 38 L182 43 L192 39 L198 49 L205 36 L212 61 L218 40 L225 44 L260 44 L270 45 L276 50 L284 50 L292 43 L302 41 L310 51 L318 43 L324 45 L330 63 L336 45 L344 42 L352 58 L360 44 L360 70 L0 70 Z' fill='%23fff4ca'/%3E%3Cpath d='M0 44 L12 44 L16 39 L23 45 L28 39 L36 44 L42 40 L49 49 L58 42 L68 43 L73 55 L79 45 L86 45 L92 40 L100 43 L112 42 L119 50 L125 43 L132 44 L139 38 L146 42 L152 20 L158 50 L164 32 L170 62 L176 38 L182 43 L192 39 L198 49 L205 36 L212 61 L218 40 L225 44 L260 44 L270 45 L276 50 L284 50 L292 43 L302 41 L310 51 L318 43 L324 45 L330 63 L336 45 L344 42 L352 58 L360 44' fill='none' stroke='%23ffc20f' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.soft-line {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 360 70' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 48 C70 42 110 44 155 38 C205 30 245 35 360 24' fill='none' stroke='%232f7d62' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.mini-bar {
  height: 10px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece7dc;
}

.mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.mini-bar.sleep span {
  background: var(--teal);
}

.mini-bar.heart span {
  background: var(--coral);
}

.heart-chart {
  width: 100%;
}

.mini-heart-chart {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 82px;
}

.heart-chart svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.heart-area {
  fill: rgba(255, 111, 97, 0.14);
}

.heart-line {
  fill: none;
  stroke: var(--coral);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.heart-dot {
  fill: #ffffff;
  stroke: var(--coral);
  stroke-width: 3;
}

.heart-dot.latest {
  fill: var(--coral);
}

.heart-dot.latest.down {
  fill: var(--green);
  stroke: var(--green);
}

.heart-trend-panel {
  margin-top: 18px;
  border: 1px solid rgba(255, 111, 97, 0.24);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 111, 97, 0.08);
}

.heart-trend-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.heart-trend-heading h3 {
  margin-top: 4px;
  font-size: 1.15rem;
}

.heart-trend-heading strong {
  color: var(--coral);
  white-space: nowrap;
}

.large-heart-chart {
  height: 150px;
  margin-top: 14px;
}

.mini-bar.mobility span,
.mini-bar.balance span {
  background: #ffc20f;
}

.photo-row {
  display: flex;
  gap: 12px;
  margin: 34px 0 14px;
}

.photo-row span {
  width: 64px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #d8dedf;
}

.photo-row .has-photo {
  border: 2px solid #ffffff;
  background-position: center;
  background-size: cover;
  box-shadow: 0 8px 16px rgba(25, 32, 29, 0.18);
}

.photo-row .sample-photo {
  opacity: 0.82;
  filter: saturate(0.85);
}

.bp-tags,
.status-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.bp-tags span {
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--teal);
  background: rgba(22, 108, 118, 0.12);
  font-size: 0.85rem;
  font-weight: 800;
}

.status-dots span {
  width: 34px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.status-dots.calm span {
  background: #ffc20f;
}

.weight-editor {
  position: fixed;
  inset: 22px;
  z-index: 20;
  max-width: 860px;
  max-height: calc(100vh - 44px);
  overflow: auto;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: rgba(255, 253, 250, 0.99);
  box-shadow: 0 30px 80px rgba(25, 32, 29, 0.32);
}

.weight-editor::backdrop {
  background: rgba(25, 32, 29, 0.4);
}

.compact-button {
  min-height: 42px;
  padding: 0 14px;
}

.weight-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.metric-form {
  grid-template-columns: 1fr 1fr 1fr auto;
}

.weight-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.weight-form input {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
}

.integration-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  border: 1px solid rgba(47, 125, 98, 0.22);
  border-radius: 8px;
  padding: 16px;
  background: rgba(47, 125, 98, 0.08);
}

.integration-panel h3 {
  margin-top: 4px;
  font-size: 1.15rem;
}

.integration-panel p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

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

.integration-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.photo-upload-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.photo-upload-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.photo-upload-form input,
.photo-upload-form select {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
}

.file-upload input {
  padding-top: 13px;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.photo-tile,
.empty-gallery {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.photo-tile.sample-tile {
  background: rgba(255, 253, 250, 0.9);
}

.photo-tile img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  object-fit: cover;
  background: #d8dedf;
}

.photo-tile div {
  margin: 10px 0;
}

.photo-tile strong,
.photo-tile small,
.empty-gallery strong,
.empty-gallery p {
  display: block;
}

.photo-tile small,
.empty-gallery p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.empty-gallery {
  grid-column: 1 / -1;
}

.calendar-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.calendar-day {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
}

.calendar-day span,
.calendar-day small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.calendar-day strong {
  display: block;
  margin: 6px 0;
  font-size: 1.4rem;
}

.calendar-day.active {
  border-color: rgba(47, 125, 98, 0.65);
  background: rgba(47, 125, 98, 0.12);
}

.calendar-day.has-entry small {
  color: var(--teal);
  font-weight: 800;
}

.weight-history {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.history-row {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
}

.history-row span {
  color: var(--muted);
}

.note {
  margin-top: 14px;
  padding: 20px;
}

.note p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.profile-summary {
  margin: 18px 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .status-band,
  .result-grid,
  .week-overview,
  .week-grid,
  .profile-grid,
  .progress-grid,
  .cadence-grid,
  .message-rules,
  .selected-exercise-preview,
  .day-detail,
  .exercise-player,
  .guide-grid,
  .safety-strip {
    grid-template-columns: 1fr;
  }

  .week-grid article,
  .progress-card {
    min-height: auto;
  }

  .progress-card.featured {
    min-height: auto;
  }

  .progress-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52%;
    column-gap: 18px;
    align-items: end;
    padding: 18px 18px 16px;
  }

  .progress-card .metric-title,
  .progress-card > small,
  .progress-card > strong,
  .progress-card .metric-source {
    grid-column: 1;
  }

  .progress-card .sparkline,
  .progress-card .mini-bar,
  .progress-card .heart-chart,
  .progress-card .photo-row,
  .progress-card .bp-tags,
  .progress-card .status-dots {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: center;
  }

  .progress-card .sparkline {
    margin: 0;
  }

  .progress-card .mini-heart-chart {
    position: static;
    height: 82px;
  }

  .progress-card .photo-row,
  .progress-card .bp-tags,
  .progress-card .status-dots {
    margin: 0;
  }

  .progress-card strong {
    margin-top: 18px;
  }

  .video-placeholder {
    min-height: 220px;
  }

  .exercise-video {
    min-height: 360px;
  }

  .youtube-video,
  .youtube-video-overlay {
    min-height: 360px;
  }
}

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

  .phone-flow {
    min-height: calc(100vh - 24px);
    padding: 16px;
  }

  .tabs {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .tab {
    min-height: 44px;
    font-size: 0.9rem;
  }

  .progress-header {
    align-items: flex-start;
  }

  .progress-card {
    min-height: 180px;
    display: block;
  }

  .progress-card .sparkline {
    margin: 18px -18px -18px;
  }

  .progress-card .mini-heart-chart {
    position: absolute;
    height: 82px;
  }

  .progress-card .photo-row {
    margin: 34px 0 14px;
  }

  .weight-form,
  .calendar-strip,
  .photo-upload-form,
  .photo-gallery,
  .feedback-options {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .actions,
  .integration-panel,
  .integration-actions,
  .heart-trend-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .primary,
  .secondary {
    width: 100%;
  }

  .landing-nav {
    position: absolute;
    align-items: flex-start;
    padding: 14px;
  }

  .landing-nav nav {
    gap: 8px;
  }

  .landing-nav nav a:not(.nav-cta) {
    display: none;
  }

  .landing-hero {
    min-height: 84vh;
    padding: 94px 18px 48px;
  }

  .landing-actions,
  .landing-split {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-grid {
    grid-template-columns: 1fr;
  }

  .landing-button {
    width: 100%;
  }
}

@media (max-width: 980px) {
  body {
    overflow-x: hidden;
  }

  .app-shell {
    width: 100%;
    padding: 16px;
  }

  .hero,
  .status-band,
  .selected-exercise-preview,
  .day-detail,
  .exercise-player {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 14px;
  }

  .hero-copy {
    padding: 28px 0 0;
  }

  .hero-photo,
  .mini-video,
  .video-placeholder,
  .exercise-video,
  .youtube-video,
  .youtube-video-overlay {
    min-height: clamp(240px, 58vw, 430px);
  }

  .tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

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

  .tab {
    flex: 1 0 min(150px, 42vw);
    white-space: nowrap;
  }

  .week-grid,
  .week-overview,
  .cadence-grid,
  .guide-grid,
  .profile-grid,
  .progress-grid,
  .photo-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exercise-player {
    gap: 14px;
  }

  .exercise-panel {
    padding: 22px;
  }

  .weight-editor {
    inset: 12px;
    max-height: calc(100vh - 24px);
    padding: 16px;
  }

  .landing-split {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    background:
      linear-gradient(150deg, rgba(47, 125, 98, 0.12), transparent 38%),
      var(--paper);
  }

  h1,
  .landing-hero h1 {
    font-size: clamp(2.45rem, 16vw, 4.2rem);
    line-height: 0.98;
  }

  h2,
  .landing-section-heading h2,
  .landing-split h2 {
    font-size: clamp(1.55rem, 9vw, 2.45rem);
  }

  .landing-nav {
    gap: 10px;
  }

  .landing-brand {
    max-width: 58vw;
    line-height: 1.1;
  }

  .landing-nav .nav-cta {
    min-height: 40px;
    padding: 0 12px;
  }

  .landing-hero {
    min-height: 82svh;
    padding: 86px 16px 38px;
    background-position: 58% center;
  }

  .landing-hero p,
  .intro,
  .question-copy p,
  #daySummary,
  #exerciseDose {
    font-size: 1rem;
  }

  .landing-band {
    padding: 42px 16px;
  }

  .landing-grid,
  .result-grid,
  .week-grid,
  .week-overview,
  .cadence-grid,
  .guide-grid,
  .profile-grid,
  .progress-grid,
  .photo-gallery,
  .set-tracker {
    grid-template-columns: 1fr;
  }

  .phone-flow {
    min-height: 100svh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .flow-top {
    grid-template-columns: 48px 1fr 64px;
  }

  .back-btn,
  .skip-btn,
  .primary,
  .secondary,
  .settings-button,
  .compact-button {
    min-height: 48px;
  }

  .choice,
  .step-select,
  .exercise-link {
    min-height: 68px;
  }

  .step-select,
  .exercise-link {
    align-items: flex-start;
    flex-direction: column;
  }

  .step-select b,
  .exercise-link::after {
    align-self: flex-start;
  }

  .status-band,
  .workout-panel,
  .day-detail,
  .selected-exercise-preview,
  .exercise-panel,
  .progress-card,
  .landing-grid article,
  .landing-split {
    padding: 16px;
  }

  .steps {
    padding-left: 0;
    list-style-position: inside;
  }

  .exercise-video,
  .youtube-video,
  .youtube-video-overlay {
    min-height: 300px;
  }

  .youtube-video-overlay {
    padding: 16px;
  }

  .set-pill.done::before {
    content: "";
  }

  .feedback-options {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
  }

  .weight-form,
  .metric-form,
  .photo-upload-form {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    -webkit-text-size-adjust: 100%;
  }

  img,
  iframe,
  video {
    max-width: 100%;
  }

  .landing-page,
  .app-shell,
  .onboarding,
  .planner-result,
  .dashboard-view,
  .exercise-view,
  .view,
  section,
  article,
  form {
    max-width: 100%;
  }

  .landing-nav {
    position: absolute;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
  }

  .landing-nav nav {
    justify-content: flex-end;
    min-width: 0;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 92px;
    padding-bottom: 34px;
  }

  .landing-hero-copy {
    width: 100%;
  }

  .landing-hero h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(2.35rem, 14vw, 3.8rem);
  }

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

  .app-shell {
    padding: 10px;
  }

  .hero,
  .status-band,
  .selected-exercise-preview,
  .day-detail,
  .exercise-player,
  .result-grid,
  .week-grid,
  .week-overview,
  .cadence-grid,
  .profile-grid,
  .progress-grid,
  .photo-gallery,
  .guide-grid,
  .weight-form,
  .metric-form,
  .photo-upload-form,
  .integration-panel,
  .safety-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .phone-flow,
  .workout-panel,
  .status-band,
  .day-detail,
  .exercise-panel,
  .weight-editor {
    width: 100%;
  }

  .phone-flow {
    min-height: calc(100svh - 20px);
    padding: 14px;
  }

  .question-copy h2 {
    overflow-wrap: anywhere;
    font-size: clamp(1.85rem, 10vw, 2.8rem);
  }

  .tabs {
    margin-left: -10px;
    margin-right: -10px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding: 6px 10px;
  }

  .tab {
    flex-basis: 132px;
  }

  .panel-heading,
  .progress-header,
  .client-bar,
  .actions,
  .integration-actions,
  .heart-trend-heading {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .duration,
  .youtube-link {
    width: 100%;
  }

  .week-grid article,
  .week-overview article,
  .cadence-card,
  .profile-grid article,
  .progress-card {
    min-height: auto;
  }

  .progress-card {
    display: block;
  }

  .progress-card .sparkline,
  .progress-card .mini-bar,
  .progress-card .heart-chart,
  .progress-card .photo-row,
  .progress-card .bp-tags,
  .progress-card .status-dots {
    grid-column: auto;
    grid-row: auto;
  }

  .exercise-video,
  .youtube-video,
  .youtube-video-overlay {
    min-height: 260px;
  }

  .exercise-video h1,
  .exercise-panel h1 {
    overflow-wrap: anywhere;
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

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

  .feedback-options button {
    padding: 0;
  }

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

  .calendar-day {
    min-height: 76px;
  }
}

@media (max-width: 390px) {
  .landing-brand {
    font-size: 0.95rem;
  }

  .landing-nav .nav-cta {
    padding: 0 10px;
  }

  .flow-top {
    grid-template-columns: 44px minmax(0, 1fr) 58px;
  }

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

  .calendar-strip {
    grid-template-columns: 1fr;
  }
}
