:root {
  --bg: #fff4f7;
  --surface: #fffafb;
  --surface-strong: #ffffff;
  --ink: #2c1b25;
  --muted: #856b78;
  --line: #efd4de;
  --accent: #e86f9a;
  --accent-dark: #a83d66;
  --green: #6f9b7c;
  --blue: #7c70b8;
  --gold: #d6a64f;
  --shadow: 0 10px 24px rgba(118, 55, 83, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 248, 251, 0.98), rgba(255, 244, 247, 0) 240px),
    var(--bg);
  padding-bottom: 24px;
}

button,
input,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.app-header,
.page-shell {
  width: min(100%, 720px);
  margin: 0 auto;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 18px 10px;
}

.eyebrow,
.muted,
.meta {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 5px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-dark);
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.9rem, 8vw, 2.5rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 0;
  font-size: 1.3rem;
}

h3 {
  margin-bottom: 5px;
  font-size: 1.02rem;
}

.page-shell {
  display: grid;
  gap: 14px;
  padding: 0 14px 24px;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 4px 0 8px;
  background: rgba(255, 244, 247, 0.94);
  backdrop-filter: blur(12px);
}

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

.tab-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.tab-button {
  padding: 9px 6px;
}

.tab-button.active {
  border-color: transparent;
  background: var(--accent);
  color: #fffafb;
}

.exercise-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.exercise-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 8px 18px rgba(118, 55, 83, 0.06);
}

.exercise-card {
  padding: 14px;
}

.exercise-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.exercise-title {
  min-width: 0;
}

.exercise-title p {
  margin-bottom: 0;
}

.inline-video {
  margin-top: 12px;
}

.inline-video summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
  list-style: none;
}

.inline-video summary::-webkit-details-marker {
  display: none;
}

.inline-video summary::after {
  content: "+";
  float: right;
}

.inline-video[open] summary {
  margin-bottom: 8px;
}

.inline-video[open] summary::after {
  content: "x";
}

.video-frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(232, 111, 154, 0.34), rgba(124, 112, 184, 0.28)),
    #3a2430;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-empty {
  display: grid;
  height: 100%;
  place-items: center;
  padding: 20px;
  color: #fffdf8;
  text-align: center;
}

.play-symbol {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  place-items: center;
  border: 2px solid rgba(255, 253, 248, 0.72);
  border-radius: 50%;
  font-size: 1.35rem;
}

@media (min-width: 680px) {
  .app-header {
    padding-top: 30px;
  }

  .page-shell {
    padding-inline: 18px;
  }

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