:root {
  --bg: #f3f8f7;
  --panel: #ffffff;
  --ink: #111f22;
  --muted: #46565a;
  --line: #cad9d8;
  --soft: #e7f3f1;
  --accent: #08736a;
  --blue: #315fd8;
  --violet: #7a4db0;
  --red: #d6454f;
  --cyan: #087fa3;
  --shadow: 0 12px 34px rgba(20, 43, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

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

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

button:focus-visible {
  outline: 3px solid rgba(8, 115, 106, 0.32);
  outline-offset: 2px;
}

.app-shell {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}

.top-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: end;
  padding: 18px 0 12px;
}

.eyebrow,
.section-label {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.intro {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.45;
}

.install-note {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

.goal-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.goal-button {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 78px;
  padding: 11px;
  text-align: left;
}

.goal-button span {
  font-weight: 800;
}

.goal-button small {
  color: var(--muted);
  font-size: 0.85rem;
}

.goal-button.active {
  border-color: var(--accent);
  background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.practice-panel,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.practice-panel {
  padding: 18px;
}

.panel-heading {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.panel-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.4;
}

.time-block {
  min-width: 116px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  background: var(--soft);
}

.time-block span {
  display: block;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.time-block small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.session-progress,
.move-progress {
  height: 12px;
  overflow: hidden;
  border-radius: 8px;
  background: #dce8e7;
}

.session-progress {
  margin: 18px 0;
}

#session-progress-bar,
#move-progress-bar {
  width: 0;
  height: 100%;
  border-radius: 8px;
  background: var(--accent);
  transition: width 180ms linear;
}

.practice-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 420px);
  gap: 18px;
  align-items: stretch;
}

.visual-wrap {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(140deg, #102826, #0d4740 52%, #183b63);
}

#movement-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.visual-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 4px;
  color: #ffffff;
}

.visual-caption span {
  color: rgba(255, 255, 255, 0.86);
}

.cue-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

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

.breath-box p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.45;
}

#coaching-list,
.safety-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#coaching-list li,
.safety-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.42;
}

#coaching-list li::before,
.safety-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.move-progress-wrap {
  margin-top: auto;
}

.move-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

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

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.card {
  padding: 18px;
}

.recommendation-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.recommendation-list div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
}

.recommendation-list dt {
  color: var(--muted);
  font-weight: 700;
}

.recommendation-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.focus-copy {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.movement-section {
  margin-top: 20px;
}

.movement-section h2 {
  margin-bottom: 12px;
  font-size: 1.55rem;
}

.movement-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.move-card {
  min-height: 138px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.move-card.active {
  border-color: var(--accent);
  background: var(--soft);
}

.move-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.move-card span {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(8, 115, 106, 0.12);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.move-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 980px) {
  .top-band,
  .dashboard,
  .practice-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .goal-strip,
  .side-stack {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    display: grid;
  }

  .time-block {
    width: 100%;
  }

  .visual-wrap,
  #movement-canvas {
    min-height: 340px;
  }

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

  .recommendation-list div {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}
