/* Shared maker-form field styling. Deliberately neutral so it inherits each page's look;
 * only lays out the injected optional fields + the /start "Customize (optional)" panel. */
.mf-field { display: flex; flex-direction: column; gap: 0.3rem; margin: 0.55rem 0; font-size: 0.9rem; }
.mf-field > span { font-weight: 700; opacity: 0.92; font-size: 0.94rem; }
.mf-field input, .mf-field textarea, .mf-field select {
  font: inherit; padding: 0.6rem 0.7rem; border-radius: 11px; border: 1px solid currentColor;
  border-color: rgba(127, 127, 127, 0.35); background: rgba(127, 127, 127, 0.06); color: inherit; width: 100%;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.mf-field input:hover, .mf-field textarea:hover, .mf-field select:hover { border-color: rgba(52, 224, 179, 0.55); }
.mf-field input:focus, .mf-field textarea:focus, .mf-field select:focus {
  outline: none; border-color: #34e0b3; box-shadow: 0 0 0 3px rgba(52, 224, 179, 0.20); background: rgba(52, 224, 179, 0.04);
}
.mf-field input[type="color"] { padding: 2px; height: 38px; width: 56px; cursor: pointer; }
.mf-field textarea { resize: vertical; min-height: 2.4rem; }
.mf-inline { flex-direction: row; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.mf-inline > span { white-space: nowrap; }
.mf-inline input:not([type="color"]), .mf-inline select { width: auto; flex: 1; min-width: 8rem; }
.mf-hint { font-size: 0.78rem; font-style: normal; opacity: 0.7; margin: -0.05rem 0 0.1rem; display: block; }
/* Sectioned layout — groups the unified field set under quiet headers so the rich form
 * reads as a few short sections instead of one long wall of inputs. */
.mf-section { margin: 0.9rem 0; padding-top: 0.75rem; border-top: 1px solid rgba(127, 127, 127, 0.18); }
.mf-section:first-child { border-top: 0; padding-top: 0; margin-top: 0.3rem; }
.mf-section-h { font-size: 1rem; font-weight: 800; letter-spacing: 0; text-transform: none; opacity: 0.96; margin: 0 0 0.55rem; display: flex; align-items: center; gap: 0.4rem; }
.mf-row { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: flex-end; }
.mf-row .mf-field { margin: 0.2rem 0; }
/* Live mini-preview — a compact mock of the bot header in the theme it'll actually serve.
   Leads the form, captioned + sticky so it stays in view (and visibly "live") while editing. */
.mf-previewwrap { position: sticky; top: 0.5rem; z-index: 3; margin: 0 0 1rem; }
.mf-pv-cap { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; font-weight: 700; opacity: 0.85; margin: 0 0 0.4rem; }
.mf-pv-live { color: #06131e; background: #34e0b3; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em; padding: 0.12rem 0.5rem; border-radius: 999px; }
@media (prefers-reduced-motion: no-preference) { .mf-pv-live { animation: mf-pulse 1.8s ease-in-out infinite; } }
@keyframes mf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.mf-preview { display: flex; flex-direction: column; gap: 0.45rem; margin: 0;
  padding: 0.85rem 1rem; border-radius: 16px; border: 1px solid #e2e8f0; background: #fff; color: #16202b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28); transition: background .15s, color .15s, border-color .15s; }
.mf-pv-head { display: flex; align-items: center; gap: 0.5rem; }
.mf-pv-dot { width: 22px; height: 22px; border-radius: 999px; background: #34e0b3; flex: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25); }
.mf-pv-name { font-weight: 800; font-size: 0.9rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-pv-chip { font-weight: 700; font-size: 0.72rem; padding: 0.28rem 0.7rem; border-radius: 999px; background: #34e0b3; color: #16202b; flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-pv-tag { font-size: 0.76rem; opacity: 0.9; margin-top: -0.15rem; }
.mf-pv-bubble { align-self: flex-start; max-width: 92%; font-size: 0.82rem; padding: 0.45rem 0.7rem; border-radius: 12px 12px 12px 4px; background: #eef2f8; }
.mf-pv-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.mf-pv-q { font-size: 0.72rem; padding: 0.25rem 0.6rem; border-radius: 999px; border: 1px solid #34e0b3; opacity: 0.95; }
/* /start collapsible "Customize (optional)" */
.mf-customize { margin: 0.75rem 0; border: 1px solid rgba(127, 127, 127, 0.25); border-radius: 12px; padding: 0 0.9rem; }
.mf-customize > summary { cursor: pointer; font-weight: 700; padding: 0.7rem 0; list-style: none; opacity: 0.9; }
.mf-customize > summary::-webkit-details-marker { display: none; }
.mf-customize > summary::before { content: "▸ "; }
.mf-customize[open] > summary::before { content: "▾ "; }
.mf-customize[open] { padding-bottom: 0.6rem; }
