.peg-main {
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 80px;
  background: #f6f5fb;
  color: #241f2e;
}
.peg-sheet { width: min(760px, 100%); margin: 24px auto 0; }
.peg-kicker {
  margin: 0 0 8px;
  color: #6d28d9;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.peg-title {
  margin: 0 0 14px;
  color: #241f2e;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
}
.peg-lead, .peg-skip, .peg-read, .peg-dim, .peg-hard, .peg-safe {
  margin: 0 0 12px;
  color: #241f2e;
  font-size: 17px;
  line-height: 1.65;
}
.peg-skip, .peg-safe { color: #5c556b; }
.peg-gates { display: grid; gap: 10px; margin: 22px 0 16px; }
.peg-gate-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #d9d3e8;
  background: #fff;
  color: #241f2e;
  font-size: 16px;
  line-height: 1.5;
}
.peg-gate-row input { width: 22px; height: 22px; margin-top: 2px; accent-color: #6d28d9; }
.peg-start, .peg-actions button, .peg-actions a {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: #6d28d9;
  color: #f6f5fb;
  font-size: 18px;
  font-weight: 700;
}
.peg-start { width: 100%; }
.peg-start:disabled { background: #d9d3e8; color: #6e687c; }
.peg-miss { color: #241f2e; }
#peg-progress {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 72px;
  margin: 0 0 18px;
}
.peg-mini {
  flex: 1;
  border: 2px solid #c9c0e2;
  background: transparent;
}
.peg-mini.is-done { background: #6d28d9; border-color: #6d28d9; }
.peg-mini.is-now { border-color: #6d28d9; background: rgba(109, 40, 217, 0.16); }
#peg-count { margin: 0; color: #5c556b; font-size: 14px; }
#peg-prompt {
  margin: 8px 0 8px;
  color: #241f2e;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.35;
}
#peg-scale { margin: 0 0 10px; color: #6d28d9; font-size: 14px; font-weight: 700; }
#peg-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.peg-stop {
  flex: 1 1 108px;
  min-height: 56px;
  padding: 10px 8px;
  border: 1px solid #d4cce6;
  border-radius: 6px;
  background: #fff;
  color: #241f2e;
  font-size: 16px;
  font-weight: 700;
}
.peg-stop.is-on, .peg-stop:focus-visible { background: #6d28d9; color: #fff; border-color: #6d28d9; }
.peg-figure { margin: 0 0 18px; }
#peg-board {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 16px;
  align-items: end;
}
.peg-track { display: flex; align-items: flex-end; gap: 8px; min-height: 220px; }
.peg-step {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 8px;
  border: 2px solid #6d28d9;
  color: #241f2e;
  background: transparent;
}
.peg-step.is-fill { background: #6d28d9; color: #f6f5fb; }
.peg-step.is-jump { border-style: dashed; background: transparent; }
.peg-step b, .peg-step small { font-size: 13px; line-height: 1.2; }
.peg-flag {
  position: absolute;
  top: -14px;
  left: 6px;
  padding: 2px 6px;
  background: #ffe14a;
  color: #241f2e;
  font-size: 12px;
  font-weight: 800;
}
.peg-flag-ground { position: static; align-self: flex-end; margin-bottom: 8px; }
.peg-bars.is-dim { opacity: 0.38; }
.peg-bar { margin-bottom: 10px; color: #241f2e; font-size: 13px; }
.peg-bar i {
  display: block;
  height: 8px;
  margin: 4px 0;
  background: #e4dff2;
}
.peg-bar em { display: block; height: 8px; background: #b9a8e0; }
.peg-bar.is-hot em { background: #6d28d9; height: 10px; }
#peg-notes p { margin: 8px 0 0; color: #241f2e; font-size: 16px; line-height: 1.5; }
.peg-type { margin: 8px 0 12px; color: #241f2e; font-size: clamp(32px, 5vw, 46px); line-height: 1.2; }
.peg-open { margin: 0 0 12px; padding-left: 1.2em; color: #241f2e; }
.peg-open li { margin: 0 0 8px; font-size: 17px; line-height: 1.5; }
.peg-clip { color: #5c556b; }
.peg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.peg-actions button, .peg-actions a { padding: 0 16px; }
#peg-download[hidden] { display: none !important; }
#peg-canvas { display: none; }
@media (max-width: 720px) {
  #peg-board { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .peg-stop, .peg-step { transition: none; }
}
