.heart-workspace {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 270px;
  height: calc(100dvh - 80px);
  min-height: 0;
}
.heart-sidebar,
.heart-controls {
  padding: 30px 24px;
  overflow: auto;
  border-right: 1px solid var(--line);
}
.heart-sidebar h1 {
  font: 32px/1.15 var(--serif);
  margin: 18px 0;
}
.heart-controls h2 {
  font: 27px var(--serif);
}
.heart-stage {
  position: relative;
  min-height: 0;
  background: radial-gradient(ellipse at center, #f7f5ef, #e4ece7);
  overflow: hidden;
}
#heart-canvas {
  position: absolute;
  inset: 0;
}
#heart-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.heart-caption {
  position: absolute;
  top: 30px;
  left: 28px;
  pointer-events: none;
}
.heart-caption h2 {
  font: 30px var(--serif);
  margin: 8px 0;
}
.heart-caption p {
  margin: 0;
  font-style: italic;
}
.heart-hint {
  position: absolute;
  bottom: 24px;
  left: 20px;
  right: 20px;
  text-align: center;
  color: #60736e;
  font-size: 12px;
  pointer-events: none;
}
.heart-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 22px 0;
}
.heart-field select {
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.heart-controls button {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 12px 0;
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 6px;
}
#parts button {
  display: block;
  text-align: left;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 5px;
  font-size: 13px;
}
#parts button[aria-pressed="true"] {
  background: var(--mint);
  border-color: #98b7a8;
  color: var(--green);
  font-weight: 600;
}
#loading {
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  text-align: center;
  background: #fbfcfaee;
  padding: 22px;
  border-radius: 10px;
}
.heart-validation {
  border-left: 3px solid #bc9560;
  padding-left: 12px;
  font-size: 12px;
}
.heart-controls small {
  display: block;
  margin-top: 26px;
  color: var(--muted);
}
@media (max-width: 1100px) {
  .heart-workspace {
    height: auto;
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .heart-controls {
    grid-column: 1/-1;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }
  .heart-controls > * {
    max-width: 260px;
  }
  .heart-stage {
    min-height: 650px;
  }
}
@media (max-width: 650px) {
  .heart-workspace {
    display: flex;
    flex-direction: column;
  }
  .heart-sidebar {
    padding: 20px;
  }
  #parts {
    max-height: 180px;
    overflow: auto;
  }
  .heart-stage {
    min-height: 500px;
  }
  .heart-controls {
    display: block;
  }
  .heart-controls > * {
    max-width: none;
  }
  .heart-caption h2 {
    font-size: 23px;
  }
}
