.setup { width: min(100%, 960px); margin: 8px auto; }
.workspace-content:has(#setup:not([hidden])) { overflow: auto; }
.workspace:has(#setup:not([hidden])) { background: var(--color-surface); }
#get-started[aria-current] { background: var(--color-surface); color: var(--color-text); box-shadow: 0 1px 2px #0000000f; font-weight: var(--font-weight-medium); }
.setup-intro { max-width: 590px; margin-bottom: 24px; }
.setup-intro .section-label { letter-spacing: .08em; }
.setup-intro h2 { margin: 12px 0; font-size: 32px; line-height: 1.2; font-weight: var(--font-weight-medium); }
.setup-intro > p { max-width: 470px; line-height: 1.6; }
.setup-layout { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 1.8fr); gap: 24px; align-items: start; }
.setup-steps { list-style: none; padding: 8px 0; margin: 0; }
.setup-steps li { display: flex; gap: 14px; padding-bottom: 24px; color: var(--color-text-muted); }
.step-number { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border: 1px solid var(--color-border); border-radius: 50%; font-size: var(--text-sm); background: var(--color-surface); }
.setup-steps strong { display: block; font-size: var(--text-base); font-weight: var(--font-weight-medium); line-height: 20px; padding-top: 4px; }
.setup-steps p { color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.6; margin-top: 5px; max-width: 175px; }
.step-state { display: inline-block; font-size: var(--text-xs); margin-top: 6px; }
.setup-steps [aria-current] { color: var(--color-text); }
.setup-steps [aria-current] .step-number { background: var(--color-ink); color: var(--color-white); border-color: var(--color-ink); }
.setup-steps [data-complete=true] .step-number { color: var(--color-success); border-color: var(--color-success); background: var(--color-success-soft); }
.setup-steps [data-complete=true] .step-state { color: var(--color-success); }
.setup-card { min-width: 0; padding: 24px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.setup-mark { display: inline-flex; width: 44px; height: 44px; flex: 0 0 44px; align-items: center; justify-content: center; border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 24px; }
.setup-mark > .icon { width: 22px; height: 22px; }
.setup-card h3 { font-size: 22px; line-height: 1.3; font-weight: var(--font-weight-medium); overflow-wrap: anywhere; }
.setup-description { margin: 10px 0 24px; font-size: var(--text-base); line-height: 1.6; }
.setup-card label { margin-top: 20px; }
.setup-card label .muted { display: inline; font-size: var(--text-xs); }
.setup-card label[for=setup-username] { margin-bottom: 6px; }
.address-input { display: flex; align-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; background: var(--color-surface-subtle); }
.address-input:focus-within { outline: 2px solid var(--color-ink); outline-offset: 2px; }
.address-input input { flex: 1; border: 0; border-radius: 0; box-shadow: none; }
.address-input span { flex: 0 1 auto; max-width: 65%; overflow-wrap: anywhere; padding: 10px 12px; font-size: var(--text-sm); }
.setup-caption { font-size: var(--text-xs); line-height: 1.6; color: var(--color-text-muted); margin-top: 10px; overflow-wrap: anywhere; }
#setup-create { margin-top: 24px; min-height: 40px; width: 100%; }
.setup-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.setup-address { color: var(--color-text-secondary); margin-top: 6px; overflow-wrap: anywhere; }
.setup-option { border-top: 1px solid var(--color-border); padding-top: 24px; margin-top: 24px; }
.setup-option h4 { font-size: var(--text-base); line-height: 1.4; font-weight: var(--font-weight-medium); margin: 0 0 6px; }
.setup-option > div > p { font-size: var(--text-sm); line-height: 1.6; margin-bottom: 14px; }
.setup-option > button { margin: 0 4px 6px 0; }
.setup-footer { display: flex; gap: 24px; justify-content: space-between; align-items: center; margin-top: 24px; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.6; }
.setup-footer > button { flex-shrink: 0; }
#setup-error { margin-top: 16px; }
#credentials-dialog { width: min(580px, calc(100vw - 32px)); }
.connection-guide { border-top: 1px solid var(--color-border); margin-top: 24px; padding-top: 24px; }
.connection-guide h3 { font-size: var(--text-base); margin-bottom: 8px; }
.connection-guide p { font-size: var(--text-sm); line-height: 1.6; }
.connection-guide pre { padding: 16px; background: var(--color-surface-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: var(--text-xs); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.connection-check { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.connection-check p { flex: 1; min-width: 140px; }
@media (max-width: 1023px) {
  .setup { margin-top: 12px; }
  .setup-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .setup-steps { display: flex; gap: 16px; }
  .setup-steps li { flex: 1; gap: 8px; padding-bottom: 16px; }
  .setup-steps p { display: none; }
  .setup-steps strong { font-size: var(--text-sm); }
}
@media (max-width: 767px) {
  .workspace:has(#setup:not([hidden])) .topbar { min-height: 64px; }
  .setup-intro { margin-bottom: 24px; }
  .setup-intro h2 { font-size: 28px; }
  .setup-card { padding: 24px; }
  .setup-steps { gap: 8px; }
  .setup-steps li { flex-direction: column; gap: 6px; }
  .step-state { font-size: 10px; }
  .setup-footer { align-items: flex-start; flex-direction: column-reverse; gap: 12px; }
  .setup-footer > button { align-self: flex-end; }
}
