/* Config screen (step 5). Site chrome, separate from the editor stylesheet. */
#continue-btn { margin-top: auto; box-shadow: inset 0 0 0 1.6px var(--ink); font-weight: 700; }
#config-root { flex: 1; min-width: 0; padding: 24px clamp(16px, 3vw, 40px) 40px; }
#config-root[hidden], #editor-root[hidden] { display: none; }
/* Opaque surface the clouds pass behind: positioned above .ed-sky (z-index 0), below .side (20). Step 35. */
.cfg-card { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; background: #f6f9fb; border: 1.5px solid var(--line); border-radius: 18px; padding: 24px; }
.cfg-card h1 { margin: 0 0 14px; font-size: 24px; }
.cfg-preview { display: block; width: 100%; height: 160px; background: #fff; border: 1.4px solid var(--line); border-radius: 12px; }
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.cfg-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.cfg-grid input, .cfg-grid select { font: inherit; font-weight: 400; padding: 10px 12px; border: 1.4px solid var(--line); border-radius: 10px; background: #fff; }
.cfg-read { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.cfg-read div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed #c4ccd6; padding: 4px 0; }
.cfg-read dt { font-size: 13px; }
.cfg-read dd { margin: 0; font-weight: 700; }
.cfg-err { min-height: 1.3em; color: var(--down); font-size: 13px; margin: 10px 0 0; }
.cfg-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 8px; }
.cfg-actions .btn { box-shadow: inset 0 0 0 1.6px var(--ink); }
.cfg-actions .btn:disabled { opacity: .45; cursor: not-allowed; }
#cfg-json-wrap pre { margin: 14px 0 0; max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-all; background: #fff; border: 1.4px solid var(--line); border-radius: 10px; padding: 10px; font-size: 11px; }
@media (max-width: 820px) {
  .cfg-grid, .cfg-read { grid-template-columns: 1fr; }
  #config-root { padding-bottom: 90px; }
  /* step 130: three buttons do not fit a phone in one row; wrap them, Confirm keeps its own full row */
  .cfg-actions { flex-wrap: wrap; }
  .cfg-actions .btn { flex: 1 1 auto; }
  .cfg-actions .cfg-go { flex-basis: 100%; }
}
#continue-btn + .side-foot { margin-top: 0; }
/* Launch status (step 27). */
.cfg-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 0; padding: 10px 12px; background: #fff; border: 1.4px solid var(--line); border-radius: 10px; font-size: 13px; }
.cfg-status[hidden], .cfg-spinner[hidden] { display: none; }
.cfg-status.is-error { color: var(--down); border-color: var(--down); }
.cfg-status.is-done { font-weight: 700; }
.cfg-status.is-info { font-weight: 700; }
.cfg-spinner { flex: none; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: cfg-spin .8s linear infinite; }
@keyframes cfg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cfg-spinner { animation-duration: 2.4s; } }
/* Coin form (step 30). */
.cfg-wide { grid-column: 1 / -1; }
.cfg-grid textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1.4px solid var(--line); border-radius: 10px; background: #fff; resize: vertical; }
.cfg-tax { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; }
.cfg-tax input { width: 100%; accent-color: var(--ink); }
.cfg-tax output { min-width: 3.5em; text-align: right; font-variant-numeric: tabular-nums; }
.cfg-logo { margin: 0 0 16px; }
.cfg-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.cfg-logo-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cfg-logo-slot { flex: none; width: 120px; height: 120px; border: 1.4px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.cfg-logo-slot > svg, .cfg-logo-slot > img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Prompt 28 (audit 7.4): the art svg nested inside the logo svg keeps the 132 by 132 box from its own attributes; the rule above must not stretch it. */
.cfg-logo-slot svg svg { width: 132px; height: 132px; }
.cfg-logo-slot img[hidden], .cfg-logo-slot svg[hidden] { display: none; }
.cfg-logo-ctl { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; font-size: 13px; }
.cfg-logo-ctl input[type=file] { max-width: 100%; }
.cfg-logo-ctl .btn[hidden] { display: none; }
.cfg-hint { color: #5b6168; }
.cfg-colors { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.cfg-colors label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #44484e; }
.cfg-colors input[type=color] { width: 30px; height: 26px; padding: 0; border: 1.4px solid var(--line, #2b2d31); border-radius: 6px; background: none; cursor: pointer; }
.cfg-fx { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #44484e; }
.cfg-fx select { font: inherit; font-size: 13px; border: 1.4px solid var(--line, #2b2d31); border-radius: 8px; padding: 3px 8px; }
.cfg-field-err { min-height: 1.1em; margin: 0; color: var(--down); font-size: 12px; font-weight: 400; }
.cfg-socials { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 820px) { .cfg-socials { grid-template-columns: 1fr; } }
/* step 70: the editor as an optional link on the form, after an agent pick */
.cfg-tweak { display: inline-block; margin: -4px 0 10px; font-size: 14px; color: #44484e; }
.cfg-tweak[hidden] { display: none; }
html.agent-pick #editor-root { visibility: hidden; }
/* step 134: Continue only belongs to the editor; Back and Next carry the config screens */
body.cfg-open #continue-btn { display: none; }
/* UX sweep item 1: the wizard link is for the editor only; on the launch screens it is gone */
body.cfg-open #prompt-link { display: none; }
.cfg-agent-name { display: block; margin-top: 4px; font-size: 12px; color: #5b6168; }
.cfg-agent-name[hidden] { display: none; }
.cfg-agent { flex-wrap: wrap; } .cfg-agent-name { flex-basis: 100%; margin-top: -8px; }
.cfg-field-note { margin: 0; color: var(--ink-soft, inherit); font-size: 12px; font-weight: 400; }
.cfg-err-line { display: block; }
.cfg-progress { min-width: 0; flex: 1 1 0; overflow-wrap: break-word; }
/* UX sweep 2026-10-15 */
/* item 140: one h1 size across the create flow and the wizard */
#config-root .cfg-card h1 { font-size: 36px; }
@media (max-width: 480px) { #config-root .cfg-card h1 { font-size: 30px; } }
/* item 48: the candle numbers are a small link under the readouts, not a button in the launch row */
/* !important: css/ui.css styles every button in #config-root as a pill; this one is a text link on purpose */
#config-root .cfg-csv-link { display: inline-block !important; min-height: 0 !important; margin: 10px 0 0 !important; padding: 4px 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; transform: none !important; font: inherit; font-size: 13px !important; font-weight: 400 !important; color: #44484e !important; text-decoration: underline !important; text-underline-offset: 3px; cursor: pointer; }
.cfg-csv-link:hover { color: var(--ui-ink, #2b3550); }
.cfg-csv-link:disabled { opacity: .45; cursor: not-allowed; }
#config-root .cfg-csv-link[hidden] { display: none !important; }
/* item 24: the dev buy box shows its unit */
.cfg-unit { position: relative; display: flex; }
.cfg-unit input { flex: 1 1 auto; min-width: 0; padding-right: 52px !important; }
.cfg-unit-tag { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; font-weight: 700; color: #5a6478; pointer-events: none; }
.cfg-unit input:disabled { background: #eef1f5; }
/* item 3: on the wizard path the drawing preview and the tweak link sit on the token screen */
#cfg-screen-coin .cfg-preview { margin: 0 0 12px; }
/* item 36: a resumed launch is a read-only status view; the form comes back with Start a new launch */
body.cfg-watching #cfg-screen-coin > :not(h1):not(#cfg-status):not(.cfg-watch-head) { display: none !important; }
.cfg-watch-head { margin: 0 0 4px; font-size: 15px; color: #44484e; }
.cfg-watch-head[hidden] { display: none; }
.cfg-watch-new { margin-top: 12px; }
/* item 36: the bar offering a still-running launch without taking over the page */
.cfg-resume-bar { position: fixed; z-index: 9990; left: 50%; top: 12px; transform: translateX(-50%); width: min(560px, calc(100vw - 96px)); box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; background: #fffdf5; color: #13224f; border: 2px solid #2b3550; border-radius: 12px; padding: 10px 12px; font-size: 14px; box-shadow: 3px 4px 0 rgba(30,70,110,.16); }
.cfg-resume-bar span { flex: 1 1 200px; min-width: 0; }
/* the shared button look from css/ui.css (its button scope does not reach this bar) */
.cfg-resume-bar .btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 36px; padding: 6px 14px; font-family: var(--ui-font, inherit); font-size: 14px; font-weight: 700; color: var(--ui-ink, #2b3550); background: #fff; border: 2px solid var(--ui-ink, #2b3550); border-radius: var(--ui-r, 10px); box-shadow: var(--ui-shadow, none); cursor: pointer; }
.cfg-resume-bar .btn:hover { background: var(--ui-hl, #fff1b8); }
.cfg-resume-bar .btn.btn-sm { background: var(--ui-ink, #2b3550); color: var(--ui-yellow, #ffd84a); }
.cfg-resume-bar .btn.btn-quiet { background: transparent; border-color: transparent; box-shadow: none; }
.cfg-resume-bar .btn.btn-quiet:hover { border-color: var(--ui-ink, #2b3550); background: var(--ui-hl, #fff1b8); }
@media (max-width: 820px) { .cfg-resume-bar { width: calc(100vw - 16px); top: 8px; } }
/* Prompt 4: 16px fields on a phone (no iOS zoom). */
@media (max-width: 820px) { .cfg-grid input, .cfg-grid select, .cfg-grid textarea, .cfg-fx select, #config-root input, #config-root select, #config-root textarea { font-size: 16px; } }
/* ---------- UX sweep 2026-10-15, round 2 (create group) ---------- */
/* item 29: the drawing-load message sits below the editor's top hint; on the wizard path Continue is gone with it */
#agent-load-err { position: fixed; left: 50%; top: 96px; transform: translateX(-50%); width: min(560px, calc(100vw - 96px)); z-index: 9990; box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; color: #13224f; font-size: 14px; line-height: 1.4; }
#agent-load-err[hidden] { display: none !important; }
#agent-load-err .msg { flex: 1 1 100%; min-width: 0; }
#agent-load-err .btn[hidden] { display: none !important; }
html.agent-load-wiz #continue-btn { display: none !important; }
@media (max-width: 820px) { #agent-load-err { width: calc(100vw - 16px); top: calc(var(--nl-h, 0px) + 84px); } }
/* item 38: the line that keeps Confirm off after a finished launch is a note, not an error */
#config-root .cfg-err.is-note { color: var(--ui-muted, #5a6478); }
/* item 40: Stop watching is a normal secondary button next to Start a new launch (beats the quiet rule in ui.css) */
#config-root #cfg-status #cfg-stop-watching.btn { background: #fff !important; border-color: var(--ui-ink, #2b3550) !important; box-shadow: var(--ui-shadow) !important; }
#config-root #cfg-status #cfg-stop-watching.btn:hover { background: var(--ui-hl, #fff1b8) !important; }
/* item 42: on a phone the three token buttons stack, so Token page never overflows its button */
@media (max-width: 480px) {
  #config-root #cfg-token div.token-actions.token-actions { grid-template-columns: 1fr !important; }
  #config-root #cfg-token div.token-addr.token-addr { flex-wrap: wrap; }
  #config-root #cfg-token div.token-addr.token-addr > code { flex: 1 1 100% !important; }
  #config-root #cfg-token { padding: 12px !important; }
  #config-root .cfg-status { padding: 12px; }
}
/* the progress line keeps the full width on a phone; Start a new launch goes under it */
@media (max-width: 560px) {
  #config-root .cfg-status .cfg-progress { flex: 1 1 calc(100% - 30px); }
  #config-root .cfg-status .cfg-watch-new { flex: 1 1 100%; margin-top: 0; }
}
/* items 43 and 55: on the launch screens the wallet sits at the top right of the page, inside the screen at every width */
#config-root > .ed-wallet { position: relative; z-index: 2; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; width: 100%; max-width: 760px; margin: 0 auto 12px; box-sizing: border-box; }
#config-root > .ed-wallet #wallet-btn { position: relative; top: auto; right: auto; transform: none; margin: 0; }
#config-root > .ed-wallet #wallet-btn:hover { transform: translateY(-1px); }
#config-root > .ed-wallet .wallet-msg { position: static; max-width: none; flex: 1 1 100%; min-width: 0; text-align: right; order: 9; }
#config-root > .ed-wallet #wallet-balance { position: static; margin: 0 !important; }
/* item 44: the balance is said once, in the summary */
.cfg-balance-note { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--ui-navy, #13224f); }
.cfg-balance-note[hidden] { display: none; }
/* item 47: Edit the drawing by hand is a small outlined button */
#config-root .cfg-tweak.btn { display: inline-flex; min-height: 36px; padding: 6px 14px; margin: 0 0 12px; font-size: 14px; }
#config-root .cfg-tweak[hidden] { display: none; }
@media (max-width: 820px) { #config-root .cfg-tweak.btn { min-height: 40px; } }
/* item 53: Max market cap shows its $ inside the field */
.cfg-unit-pre .cfg-unit-tag { right: auto; left: 12px; }
.cfg-unit-pre input { padding-left: 28px !important; padding-right: 12px !important; }
/* item 54: the small More button at the end of the agent's line */
#config-root .cfg-agent-bubble .cfg-more { display: inline-flex !important; min-height: 0 !important; height: auto !important; padding: 1px 9px !important; margin: 0 0 0 4px !important; font-size: 12px !important; font-weight: 700 !important; border-width: 1.6px !important; border-radius: 999px !important; box-shadow: none !important; vertical-align: baseline; line-height: 1.4 !important; }
/* item 56: the footer sits at the bottom of the window on a short screen */
#config-root:not([hidden]) { display: flex; flex-direction: column; min-height: 100vh; box-sizing: border-box; }
#config-root > .cfg-card { width: 100%; box-sizing: border-box; margin: 0 auto auto; }
/* item 58: the hint is readable, and the part pills are tap sized on a phone */
.cfg-hint { font-size: 12px; }
@media (max-width: 820px) { #config-root .cfg-parts button { min-height: 40px; } }
/* item 29: the message's buttons are one size, Close is a normal secondary button, and no coach mark opens over it */
#agent-load-err.cfg-banner .btn { min-height: 36px !important; padding: 6px 14px !important; font-size: 14px !important; }
#agent-load-err.cfg-banner button.dismiss { background: #fff !important; border-color: var(--ui-ink, #2b3550) !important; box-shadow: var(--ui-shadow) !important; }
#agent-load-err.cfg-banner button.dismiss:hover { background: var(--ui-hl, #fff1b8) !important; }
html.agent-load-failed #editor-root .onb-bubble, html.agent-load-failed #onb-backdrop { visibility: hidden !important; }
