/* ============================================================= */
/* bubble-tuner.css — live bubble control panel (?tune only)     */
/* All rules are namespaced under .bt-* and only ever match      */
/* elements the tuner injects, so the production page is unaffected. */
/* ============================================================= */
.bt-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  width: 288px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 16px 16px 14px;
  border-radius: 14px;
  background: rgba(0, 36, 30, 0.86);
  border: 1px solid rgba(178, 223, 220, 0.22);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #F3F3F3;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  user-select: none;
}

/* second tuner (numbers circles) sits top-left, clear of the bubble panel */
.bt-panel--numbers { left: 18px; right: auto; }

.bt-panel * { box-sizing: border-box; }

.bt-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: #FFFFFF;
}
.bt-title .bt-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4CB6AC;
  margin-right: 7px;
  box-shadow: 0 0 8px #4CB6AC;
}
.bt-title-left { display: flex; align-items: center; }

.bt-hint {
  font-size: 11px;
  color: #8FB7B0;
  margin: 2px 0 12px;
  line-height: 1.45;
}
.bt-hint kbd {
  font: inherit;
  background: rgba(178, 223, 220, 0.16);
  border-radius: 4px;
  padding: 0 4px;
  color: #DFF2EF;
}

/* ---------- card-selector chips (quotes tuner) ---------- */
.bt-chips { display: flex; gap: 6px; margin-bottom: 8px; }
.bt-chip {
  flex: 1;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #C7DEDA;
  background: rgba(178, 223, 220, 0.12);
  border: 1px solid rgba(178, 223, 220, 0.2);
  border-radius: 7px;
  padding: 6px 0;
  cursor: pointer;
}
.bt-chip:hover { background: rgba(178, 223, 220, 0.22); }
.bt-chip.is-active {
  background: #4CB6AC;
  border-color: #4CB6AC;
  color: #00261F;
}
.bt-cardname {
  font-size: 12px;
  color: #8FB7B0;
  margin-bottom: 12px;
  min-height: 14px;
}

/* ---------- slider rows ---------- */
.bt-row { margin-bottom: 11px; }
.bt-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}
.bt-label { color: #C7DEDA; font-weight: 500; }
.bt-val {
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  min-width: 42px;
  text-align: right;
}

.bt-baked-note {
  font-size: 11px;
  line-height: 1.45;
  color: #8FB7B0;
  background: rgba(178, 223, 220, 0.08);
  border-left: 2px solid #4CB6AC;
  border-radius: 0 4px 4px 0;
  padding: 7px 9px;
  margin: 0 0 12px;
}
/* the sliders only reshape a procedural grid, so they are inert when baked */
.bt-panel.bt-baked .bt-row { opacity: 0.42; }
.bt-panel.bt-baked .bt-range,
.bt-panel.bt-baked [data-act="reroll"] { cursor: not-allowed; }

.bt-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(178, 223, 220, 0.2);
  outline: none;
  margin: 0;
}
.bt-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #4CB6AC;
  border: 2px solid #00342A;
  cursor: pointer;
  transition: transform .1s ease;
}
.bt-range::-webkit-slider-thumb:active { transform: scale(1.2); }
.bt-range::-moz-range-thumb {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #4CB6AC;
  border: 2px solid #00342A;
  cursor: pointer;
}

/* ---------- seed row with reroll ---------- */
.bt-seed { display: flex; gap: 8px; align-items: center; }
.bt-seed .bt-range { flex: 1; }
.bt-icon-btn {
  flex: none;
  background: rgba(178, 223, 220, 0.14);
  border: 1px solid rgba(178, 223, 220, 0.22);
  color: #DFF2EF;
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 13px;
  cursor: pointer;
}
.bt-icon-btn:hover { background: rgba(178, 223, 220, 0.26); }

/* ---------- action buttons ---------- */
.bt-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.bt-btn {
  flex: 1;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.bt-btn--primary {
  background: #4CB6AC;
  color: #00261F;
}
.bt-btn--primary:hover { background: #6cc7be; }
.bt-btn--ghost {
  background: transparent;
  border-color: rgba(178, 223, 220, 0.3);
  color: #C7DEDA;
}
.bt-btn--ghost:hover { background: rgba(178, 223, 220, 0.12); }

.bt-divider {
  height: 1px;
  background: rgba(178, 223, 220, 0.16);
  margin: 13px 0 11px;
}

.bt-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7FA8A1;
  margin-bottom: 8px;
}

/* ---------- copy output ---------- */
.bt-out {
  width: 100%;
  margin-top: 10px;
  height: 132px;
  resize: vertical;
  background: rgba(0, 20, 16, 0.7);
  border: 1px solid rgba(178, 223, 220, 0.2);
  border-radius: 8px;
  color: #B2DFDC;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.45;
  padding: 8px;
  white-space: pre;
  display: none;
}
.bt-out.is-shown { display: block; }

.bt-toast {
  font-size: 11px;
  color: #4CB6AC;
  margin-top: 6px;
  min-height: 14px;
}

/* crosshair cursor over the canvas while tuning */
body.bt-active .hero__canvas { cursor: crosshair; }
body.bt-active.bt-dragging .hero__canvas { cursor: grabbing; }
