/* Cube builder — layered on cube.css tokens. */
.b-wrap { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }

.b-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.b-h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.b-h2 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.b-lede {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 4px 0 16px;
  line-height: 1.45;
}

.b-block {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.b-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.b-count { font-weight: 400; color: var(--faint); font-size: 0.82rem; }

.b-optional {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.b-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.b-text-btn {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--info);
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  text-decoration: underline;
}

.b-text-btn:hover { color: var(--ink); }

textarea.b-mini-input {
  resize: vertical;
  line-height: 1.6;
  border-radius: var(--radius-sm);
}

.b-paste-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

/* Add-ons editor */
.b-addon {
  border: var(--outline);
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 10px;
  margin-bottom: 8px;
}

.b-addon-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.b-addon-head .b-addon-title { font-weight: 700; }

.b-addon-items { margin-bottom: 6px; }

.b-addon .b-add-row-btn { font-size: 0.72rem; padding: 4px 8px; }

.b-addon .pc-toggle-chip {
  margin: 0 0 8px;
  font-size: 0.76rem;
}

/* Save */
.b-save-bar {
  border-top: var(--outline);
  padding-top: 14px;
}

.b-save-bar .pc-btn { width: 100%; }

.b-validation {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
  text-align: center;
}

.b-toast {
  display: none;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border: var(--outline);
  text-align: center;
}

.b-toast.ok { display: block; background: var(--accent-soft); color: var(--ink); border-color: var(--accent); }
.b-toast.err { display: block; background: var(--danger-soft); color: var(--ink); border-color: var(--danger); }

.b-signin {
  font-weight: 700;
  color: var(--muted);
  padding: 24px 0;
}

.b-signin a { color: var(--info); }

/* Inline modal — tighter */
.pc-builder-modal .b-h1 { font-size: 1.05rem; }
.pc-builder-modal .b-lede { margin-bottom: 12px; }
.pc-builder-modal .b-block { margin-bottom: 16px; }
.pc-builder-modal .pc-preview-close { width: 28px; height: 28px; }

.hidden { display: none !important; }
