:root {
  color-scheme: light;
  --ink: #101820;
  --muted: #66736d;
  --line: #dfe5dd;
  --paper: #ffffff;
  --bg: #f5f6f2;
  --green: #2f6f4e;
  --red: #d94b3d;
  --gold: #d6a441;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

.hero {
  min-height: 188px;
  padding: 28px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
}

.eyebrow {
  margin: 0 0 8px;
  color: rgba(255,255,255,.68);
  font-size: 14px;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

.subtitle {
  max-width: 620px;
  margin: 16px 0 0;
  color: rgba(255,255,255,.72);
  font-size: 17px;
  line-height: 1.6;
}

.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stats span {
  min-width: 112px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  color: rgba(255,255,255,.72);
}

.stats strong {
  display: block;
  color: #fff;
  font-size: 28px;
}

.toolbar {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0 12px;
}

.selects {
  display: grid;
  grid-template-columns: 160px 180px;
  gap: 12px;
}

.layout {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 16px;
  align-items: start;
}

.list-panel,
.detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.list-panel {
  height: calc(100vh - 308px);
  min-height: 520px;
  overflow: auto;
}

.exercise-button {
  width: 100%;
  min-height: 88px;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.exercise-button:hover,
.exercise-button.active {
  background: #edf5ef;
}

.exercise-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.exercise-meta {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.detail {
  min-height: 520px;
  padding: 18px;
}

.detail-empty {
  min-height: 480px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.gif-wrap {
  background: #f0f3ed;
  border-radius: 8px;
  overflow: hidden;
}

.gif-wrap img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.detail h2 {
  margin: 20px 0 0;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0;
}

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

.tag {
  padding: 7px 10px;
  border-radius: 8px;
  background: #eaf2ec;
  color: var(--green);
  font-size: 13px;
  font-weight: 650;
}

.section {
  margin-top: 24px;
}

.section h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  margin-top: 12px;
  color: #303a35;
  line-height: 1.7;
}

.steps strong {
  height: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.plain {
  color: #303a35;
  line-height: 1.7;
}

.empty-list {
  padding: 48px 16px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .hero,
  .toolbar,
  .layout {
    grid-template-columns: 1fr;
  }

  .hero {
    display: grid;
    align-items: start;
  }

  .stats {
    justify-content: flex-start;
  }

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

  .list-panel {
    height: 360px;
    min-height: 360px;
  }
}
