/* The launch form and bridge keep a short reading measure within the shared ledger shell. */
body[data-view="create"] > main,
body[data-view="bridge"] > main {
  width: 100%;
  padding: 28px 24px 46px;
}
body[data-view="create"] > main { max-width: 804px; }
body[data-view="bridge"] > main { max-width: 620px; }

.create-card,
.bridge-card {
  --form-inset: clamp(18px, 3.5vw, 30px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.create-card > .card-head,
.bridge-card > .card-head {
  margin: 0;
  padding: 24px var(--form-inset) 0;
  border-radius: 7px 7px 0 0;
  background: #181819;
}
#createTitle, #bridgeTitle {
  font-size: clamp(31px, 4vw, 42px);
  font-weight: 630;
  letter-spacing: -.05em;
  line-height: 1.1;
}
.create-card > p,
#bridgeNote {
  padding: 8px var(--form-inset) 22px;
  background: #181819;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}
#createForm { gap: 19px; padding: 22px var(--form-inset); }
#createForm .field { margin: 0; }
#createForm .field > span, #createForm .field-title {
  margin-bottom: 6px;
  font: 550 13px/1.5 var(--font);
  color: var(--text);
}
#createForm .field-title small { margin-left: 4px; font-size: 12px; }
#createForm .field-pair { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 14px; }
#createForm .field input,
#createForm .field textarea {
  display: block;
  min-width: 0;
  min-height: 42px;
  background: var(--bg);
  border: 1px solid #4c4c4f;
  color: var(--text);
  border-radius: 5px;
  padding: 9px 12px;
  line-height: 1.45;
}
#createForm textarea { resize: vertical; }
#createForm .field input::placeholder,
#createForm .field textarea::placeholder { color: var(--text-muted); }
#createForm .field :is(input, textarea):enabled:hover { border-color: #818184; }
#createForm .field [aria-invalid="true"] { border-color: var(--bad); }
#createForm .hint:not(.err) { color: var(--text-muted); }
#cHintDesc { text-align: right; font: 11px/1.5 var(--mono); }
#createForm .drop-zone {
  border: 1px dashed #717174;
  border-radius: 6px;
  background: #19191a;
  gap: 4px;
  padding: 20px 16px;
}
#createForm .drop-zone:focus-within, #createForm .drop-zone:hover, #createForm .drop-zone.dragging {
  background: #222223;
  border-color: var(--accent);
}
#createForm .drop-zone:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
#createForm .drop-zone strong { color: var(--accent-text); font-size: 14px; }
#createForm .drop-zone span { max-width: 58ch; font-size: 12px; }
#createForm .image-preview { font: 12px/1.5 var(--mono); }
#createForm .image-preview img { border-radius: 5px; }

#createForm .advanced-launch,
#createForm .launch-review {
  padding: 0;
  border-top: 1px solid var(--border);
}
#createForm .launch-review { margin-top: -19px; border-bottom: 1px solid var(--border); }
#createForm details > summary,
.col-create .create-side summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}
.col-create summary::-webkit-details-marker { display: none; }
.col-create summary::after {
  content: "+";
  margin-left: auto;
  padding-right: 2px;
  color: var(--text-muted);
  font: 18px/1 var(--mono);
}
.col-create details[open] > summary::after { content: "−"; }
.col-create summary:hover { color: var(--accent-text); }
#createForm .advanced-launch summary span {
  margin: 0;
  font: 11px/1.4 var(--mono);
  color: var(--text-muted);
}
#createForm .advanced-body {
  gap: 12px;
  padding: 0 0 16px;
}
#createForm .advanced-confirm { font-size: 13px; }
#createForm .advanced-confirm input { width: 16px; height: 16px; min-height: 0; accent-color: var(--accent); flex: none; }
#createForm .advanced-body fieldset { margin: 0; padding: 14px; }
#createForm .advanced-body .curve-set { margin-top: 14px; }
#createForm .curve-set .field-pair + .field-pair { margin-top: 12px; }
#createForm .advanced-body legend { padding: 0 5px; color: var(--text-muted); font: 12px/1.4 var(--mono); text-transform: none; letter-spacing: 0; }
#createForm .advanced-body .field input, #createReview dd { font-family: var(--mono); }
#createReview { margin: 0 0 12px; }
#createForm .handoff { margin: 0; }
#createGo {
  margin: 0;
  min-height: 42px;
  border-radius: 5px;
  font-size: 14px;
}
#createGoNote { margin-top: 6px; }
.col-create .create-side .disclosure {
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.col-create .create-side .disclosure ul { padding-bottom: 18px; margin-top: 0; }
.col-create #createStatus { padding: 18px; border-radius: 6px; }

.bridge-card .tag { border-radius: 4px; font: 11px/1.5 var(--mono); letter-spacing: 0; }
.bridge-card .bridge-stage { margin: var(--form-inset); }
.bridge-card .bridge-leg { border-radius: 5px; background: var(--bg); padding: 12px; }
.bridge-card .bridge-select, .bridge-card .bridge-go, .bridge-card .bridge-soon { border-radius: 5px; }
.bridge-card .bridge-amount, .bridge-card .bridge-quote dd { font-family: var(--mono); }
.bridge-card .bridge-overlay {
  border-radius: 5px;
  background: rgb(25 28 23 / 26%);
}
.bridge-card .bridge-soon {
  border: 1px solid #6d6d70;
  padding: 10px 18px;
  color: var(--text);
  background: #202021;
  font: 550 16px/1.35 var(--font);
  letter-spacing: -.02em;
}

@media (max-width: 759px) {
  body[data-view="create"] > main, body[data-view="bridge"] > main { padding: 16px var(--edge, 16px) 28px; }
}
@media (max-width: 460px) {
  .create-card, .bridge-card { --form-inset: 16px; }
  #createForm .field-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #createForm .advanced-body .field-pair { grid-template-columns: minmax(0, 1fr); }
  #createForm .drop-zone { padding: 16px 10px; }
  .create-card > .card-head, .bridge-card > .card-head { padding-top: 18px; }
}

/* Faucet: one field, one button, one status line. */
body:not([data-view="faucet"]) .col-faucet { display: none !important; }
body[data-view="faucet"] main > .col:not(.col-faucet) { display: none !important; }
body[data-view="faucet"] > main {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 620px;
  padding: 28px 24px 46px;
}
.faucet-card {
  --form-inset: clamp(18px, 3.5vw, 30px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.faucet-card > .card-head {
  margin: 0;
  padding: 24px var(--form-inset) 0;
  border-radius: 7px 7px 0 0;
  background: #181819;
}
#faucetTitle {
  font-size: clamp(31px, 4vw, 42px);
  font-weight: 630;
  letter-spacing: -.05em;
  line-height: 1.1;
}
#faucetNote {
  padding: 8px var(--form-inset) 22px;
  background: #181819;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}
.faucet-body { display: grid; gap: 16px; padding: 22px var(--form-inset); }
.faucet-body .field { margin: 0; }
.faucet-body .field > span { display: block; margin-bottom: 6px; font: 550 13px/1.5 var(--font); color: var(--text); }
.faucet-body textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 84px;
  background: var(--bg);
  border: 1px solid #4c4c4f;
  color: var(--text);
  border-radius: 5px;
  padding: 9px 12px;
  font: 13px/1.5 var(--mono);
  overflow-wrap: anywhere;
  resize: vertical;
}
.faucet-body textarea::placeholder { color: var(--text-muted); }
.faucet-body textarea:enabled:hover { border-color: #818184; }
.faucet-body textarea[aria-invalid="true"] { border-color: var(--bad); }
#faucetGo { margin: 0; min-height: 42px; border-radius: 5px; font-size: 14px; }
.faucet-status { margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 5px; font-size: 14px; overflow-wrap: anywhere; }
.faucet-status:empty { display: none; }
.faucet-status[data-state="ok"], .faucet-status[data-state="queued"] { border-color: var(--accent); color: var(--accent-text); }
.faucet-status[data-state="error"] { border-color: var(--bad); color: var(--bad); }
.faucet-status[data-state="busy"] { color: var(--text-muted); }
.faucet-quote { margin: 0; }
.faucet-quote dd { font-family: var(--mono); }
#faucetHelp a { color: var(--accent-text); }
@media (max-width: 759px) {
  body[data-view="faucet"] > main { padding: 16px var(--edge, 16px) 28px; }
}
@media (max-width: 460px) {
  .faucet-card { --form-inset: 16px; }
  .faucet-card > .card-head { padding-top: 18px; }
}
