.hb-stage {
  flex: 0 1 520px;
  /* --hb-ratio is the board width / height, set from main.js */
  width: min(100%, 520px, calc((100dvh - 330px) * var(--hb-ratio, 1.1)));
  min-width: 280px;
}

.hb-stat-wide {
  flex: 2 1 0;
}

.hb-flower-name {
  font-size: 1rem;
  min-height: 1.74rem;
}

.hb-tray {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 8px;
}

.hb-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 10px;
  background: var(--gk-surface);
  border: 2px solid var(--gk-primary);
  border-radius: 10px;
  box-shadow: var(--gk-glow);
}

.hb-slot canvas {
  width: 56px;
  height: 56px;
}

.hb-slot-next {
  border: 1px solid var(--gk-line);
  box-shadow: none;
  opacity: 0.8;
}

.hb-actions {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

#prune[aria-pressed="true"] {
  background: var(--gk-danger);
  border-color: var(--gk-danger);
  color: #ffffff;
}

.hb-board {
  position: relative;
  margin-top: 8px;
}

.hb-board canvas {
  display: block;
  width: 100%;
  aspect-ratio: var(--hb-ratio, 1.1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  border-radius: var(--gk-radius);
}

.hb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  color: #ffffff;
  background: rgba(8, 6, 26, 0.78);
  border-radius: var(--gk-radius);
}

.hb-overlay[hidden] {
  display: none;
}

.hb-overlay h1,
.hb-overlay p {
  margin: 0;
  white-space: pre-line;
}

#status {
  min-height: 1.3em;
  font-weight: 600;
  color: var(--gk-ink);
}
