/* Public workspace. Scoped so shared backstage components stay unchanged. */
html:has(> body.exchange-app) { min-width: 0; }
.exchange-app { background: var(--bg); }
.exchange-app .shell { width: min(1512px, calc(100% - 48px)); padding: 10px 0 12px; }
.exchange-app .topbar { min-height: 54px; margin: 0 0 10px; padding: 0 4px; }
.exchange-app .brand-mark { width: 42px; height: 38px; flex-basis: 42px; border-radius: 11px; }
.exchange-app .brand-copy b { font-size: 16px; }
.exchange-app .brand-copy small { font-size: 9px; }
.exchange-app .topbar-actions .icon-button { border-radius: 11px; }
.exchange-app .theme-glyph { width: 18px; height: 18px; background: currentColor; mask: url('/assets/icons/moon.svg') center/contain no-repeat; }
html.dark .exchange-app .theme-glyph { mask-image: url('/assets/icons/sun.svg'); }
.exchange-app .ui-icon { display: block; width: 16px; height: 16px; flex: 0 0 16px; background: currentColor; mask: var(--icon) center/contain no-repeat; }
.exchange-app .icon-lock { --icon: url('/assets/icons/lock.svg'); }
.exchange-app .icon-external-link { --icon: url('/assets/icons/external-link.svg'); }
.exchange-app .icon-close { --icon: url('/assets/icons/close.svg'); }
.exchange-app .icon-arrow-right { --icon: url('/assets/icons/arrow-right.svg'); }
.exchange-app .announcement { margin-bottom: 10px; padding: 6px 10px; border-radius: 10px; box-shadow: none; }
.exchange-app #announcementText { max-height: 64px; overflow-y: auto; overflow-wrap: anywhere; }
.exchange-app .workspace { display: grid; grid-template-columns: 184px minmax(0, 1fr); align-items: stretch; overflow: visible; border-radius: 20px; background: var(--surface); backdrop-filter: none; box-shadow: var(--shadow-sm); }
.exchange-app .service-sidebar { position: sticky; top: 12px; align-self: start; display: flex; flex-direction: column; gap: 18px; min-height: 0; padding: 22px 12px; }
.exchange-app .sidebar-label { padding: 0 12px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.exchange-app .tabs { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; overflow: visible; border-radius: 0; background: none; }
.exchange-app .tabs button { position: relative; justify-content: flex-start; min-height: 58px; padding: 10px; gap: 9px; border: 1px solid transparent; border-radius: 12px; }
.exchange-app .tabs button.active { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 12%, var(--line)); background: var(--primary-soft); box-shadow: none; }
.exchange-app .tabs button.active::after { content: ''; position: absolute; top: 19px; right: -13px; width: 3px; height: 20px; border-radius: 3px 0 0 3px; background: var(--primary); }
.exchange-app .tab-number { width: 28px; height: 28px; flex-basis: 28px; background: var(--surface-soft); font-size: 10px; }
.exchange-app .tab-copy b { font-size: 13px; }
.exchange-app .tab-copy small { display: block; margin-top: 3px; font-size: 10px; font-weight: 400; color: var(--muted); }
.exchange-app .queue-strip { display: flex; flex-direction: column; align-items: stretch; gap: 14px; margin: 8px 2px 0; padding: 16px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.exchange-app .queue-label { align-items: flex-start; gap: 9px; }
.exchange-app .queue-dot { margin-top: 5px; }
.exchange-app .queue-label b { font-size: 11px; }
.exchange-app .queue-label small { margin-top: 4px; font-size: 10px; line-height: 1.6; }
.exchange-app .queue-value { display: flex; align-items: baseline; justify-content: flex-start; gap: 7px; font-size: 10px; }
.exchange-app .queue-value strong { font-size: 28px; line-height: 1; font-weight: 650; }
.exchange-app .sidebar-privacy { margin-top: 2px; padding: 16px 10px 0; border-top: 1px solid var(--line); color: var(--muted); }
.exchange-app .sidebar-privacy-heading { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.exchange-app .sidebar-privacy b { font-size: 12px; font-weight: 600; line-height: 20px; }
.exchange-app .sidebar-privacy p { margin: 6px 0 0; font-size: 10px; line-height: 1.8; }
.exchange-app .content-column { min-width: 0; border-left: 1px solid var(--line); border-radius: 0 20px 20px 0; background: color-mix(in srgb, var(--surface-soft) 35%, var(--surface)); }
.exchange-app .view { position: relative; padding: 24px 26px 22px; }
.exchange-app .page-intro { min-height: 0; padding: 0; margin-bottom: 16px; overflow: visible; border: 0; background: none; box-shadow: none; }
.exchange-app .page-intro::before, .exchange-app .page-intro::after { display: none; }
.exchange-app .page-kicker { margin-bottom: 5px; font-size: 10px; letter-spacing: .08em; }
.exchange-app .page-intro h1 { margin: 0; font-size: 25px; line-height: 1.3; letter-spacing: -.035em; }
.exchange-app .page-intro p { margin-top: 6px; font-size: 12px; line-height: 1.7; max-width: 780px; }
.exchange-app .step-badge { display: flex; gap: 6px; align-items: baseline; min-width: 0; min-height: 0; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: none; }
.exchange-app .step-badge small, .exchange-app .step-badge strong { margin: 0; font-size: 11px; line-height: 1.4; }
.exchange-app .step-badge span { display: none; }
.exchange-app .steps { display: flex; max-width: 400px; margin: 0 0 16px; padding: 0; }
.exchange-app .steps li { flex: 0 1 auto; gap: 6px; }
.exchange-app .steps b { width: 20px; height: 20px; flex-basis: 20px; font-size: 10px; box-shadow: none; }
.exchange-app .steps span { display: block; font-size: 12px; white-space: nowrap; }
.exchange-app .steps li:not(:last-child)::after { width: 26px; min-width: 16px; margin: 0 10px; }
.exchange-app .panel { margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 13px; box-shadow: none; background: var(--surface); }
.exchange-app .recharge-editor { display: grid; gap: 14px; }
.exchange-app .section-label { display: flex; align-items: center; min-width: 0; gap: 8px; margin-bottom: 15px; font-size: 14px; }
.exchange-app .panel-index { width: 25px; height: 25px; flex-basis: 25px; border-radius: 7px; font-size: 10px; }
.exchange-app .section-label .text-button, .exchange-app .section-meta { margin-left: auto; font-size: 12px; font-weight: 500; }
.exchange-app .section-meta { color: var(--muted); }
.exchange-app .access-panel { padding: 14px 18px 12px; }
.exchange-app .access-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.exchange-app .access-heading .section-label { margin: 0; }
.exchange-app .verified-plan { display: block; width: auto; margin: 0; padding: 4px 8px; border-radius: 6px; font-size: 10px; line-height: 1.4; background: var(--surface-soft); color: var(--muted); }
.exchange-app .verified-plan.verified { background: var(--primary-soft); color: var(--primary); }
.exchange-app .access-controls { display: grid; grid-template-columns: minmax(0, 1fr) 110px; align-items: start; gap: 10px; }
.exchange-app .access-controls:has(#verifyCdkBtn.hidden) { grid-template-columns: minmax(0, 1fr); }
.exchange-app .access-controls .field { margin: 0; }
.exchange-app .access-panel .field-meta { margin: 7px 0 0; font-size: 11px; }
.exchange-app .recharge-details { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.exchange-app .field { margin-bottom: 13px; }
.exchange-app .field > span, .exchange-app .field-label-row { margin-bottom: 6px; font-size: 13px; line-height: 1.5; }
.exchange-app .field-label-row { flex-wrap: wrap; gap: 4px 10px; }
.exchange-app .field-label-row small { color: var(--muted); font-size: 11px; font-weight: 400; }
.exchange-app input:not([type=radio]):not([type=checkbox]):not([type=hidden]), .exchange-app textarea { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb, var(--surface-soft) 60%, var(--surface)); font-size: 14px; }
.exchange-app input:focus, .exchange-app textarea:focus { background: var(--surface); border-color: var(--primary); }
.exchange-app .field input { height: 44px; }
.exchange-app [aria-invalid=true] { border-color: var(--danger) !important; }
.exchange-app .field-meta { margin: 7px 0 0; gap: 10px; font-size: 11px; line-height: 1.6; }
.exchange-app .session-field { margin-bottom: 0; }
.exchange-app #sessionInput { height: 157px; min-height: 130px; max-height: 330px; resize: vertical; font: 12px/1.7 var(--font-mono); overflow-wrap: anywhere; }
.exchange-app .session-footnote { display: flex; align-items: flex-start; gap: 7px; margin-top: 17px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.exchange-app .payment-card { padding: 0; margin: 0; border: 0; border-radius: 0; background: none; }
.exchange-app .payment-card-grid { gap: 12px; }
.exchange-app .payment-card-grid .field { margin: 0; }
.exchange-app .bill-name-field { margin: 13px 0 0; }
.exchange-app .renewal-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 13px 0 0; min-height: 44px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb, var(--surface-soft) 60%, var(--surface)); cursor: pointer; }
.exchange-app .renewal-switch:hover { border-color: color-mix(in srgb, var(--primary) 28%, var(--line)); }
.exchange-app .renewal-copy { display: grid; gap: 3px; min-width: 0; }
.exchange-app .renewal-switch b { font-size: 13px; font-weight: 650; }
.exchange-app .renewal-switch small { color: var(--muted); font-size: 11px; line-height: 1.6; }
.exchange-app .renewal-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.exchange-app .renewal-switch > i { position: relative; flex: 0 0 42px; width: 42px; height: 24px; border: 1px solid var(--line-strong); border-radius: 99px; background: color-mix(in srgb, var(--muted) 12%, var(--surface)); transition: border-color .18s ease, background .18s ease; }
.exchange-app .renewal-switch > i:after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .16s ease, background .16s ease; }
.exchange-app .renewal-switch input:checked + i { border-color: color-mix(in srgb, var(--primary) 48%, transparent); background: color-mix(in srgb, var(--primary) 20%, var(--surface)); }
.exchange-app .renewal-switch input:checked + i:after { transform: translateX(18px); background: var(--primary); }
.exchange-app .renewal-switch input:focus-visible + i { outline: 3px solid color-mix(in srgb, var(--primary) 22%, transparent); outline-offset: 3px; }
.exchange-app .renewal-switch:has(input:disabled) { opacity: .55; cursor: wait; }
.exchange-app .confirm-renew { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.exchange-app .confirm-renew small { margin: 0; }
.exchange-app .confirm-renew strong { margin: 0; color: var(--primary); }
.exchange-app .confirm-renew.is-off strong { color: var(--muted); font-weight: 500; }
.exchange-app .automatic-card-note { display: flex; align-items: center; gap: 13px; padding: 18px 13px; margin-bottom: 12px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--primary); }
.exchange-app .automatic-card-note b { font-size: 13px; }
.exchange-app .automatic-card-note p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.exchange-app .editor-bottom { display: grid; gap: 10px; }
/* Keep the next action reachable without taking it out of normal document flow. */
.exchange-app .action-dock {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 -4px 18px color-mix(in srgb, var(--text) 5%, transparent);
}
.exchange-app .action-dock .editor-actionbar { padding-top: 8px; }
.exchange-app .action-dock .editor-actionbar > div { min-width: 0; }
.exchange-app #upgradeEditorSummary { font-size: 12px; font-weight: 650; }
.exchange-app #upgradeEditorHint { font-size: 12px; color: var(--muted); }
.exchange-app :is(#validateSessionBtn, #upgradeReviewBtn) { flex-shrink: 0; }
.exchange-app .privacy-note { margin: 0; padding: 0 2px; border: 0; border-radius: 0; background: none; font-size: 11px; line-height: 1.7; gap: 9px; }
.exchange-app .privacy-note b { font-size: inherit; flex-shrink: 0; }
.exchange-app .editor-actionbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.exchange-app .editor-actionbar > div { display: grid; gap: 4px; }
.exchange-app #editorPlanSummary { font-size: 12px; font-weight: 650; }
.exchange-app #editorActionHint { color: var(--muted); font-size: 10px; line-height: 1.5; }
.exchange-app .button { min-height: 44px; padding: 10px 16px; border-radius: 9px; font-size: 13px; white-space: nowrap; }
.exchange-app .text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 5px 8px; border-radius: 7px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.exchange-app .text-button:hover { background: var(--primary-soft); text-decoration: none; }
.exchange-app .field-label-row .text-button { margin-left: auto; }
.exchange-app .recharge-details > .panel > .section-label, .exchange-app .recharge-details .field-label-row { min-height: 32px; }
.exchange-app .payment-card-grid { align-items: start; }
.exchange-app #validateSessionBtn { display: flex; align-items: center; justify-content: center; gap: 22px; min-width: 170px; }
.exchange-app .message { margin: 10px 0 0; padding: 10px 12px; font-size: 12px; line-height: 1.7; border-radius: 8px; overflow-wrap: anywhere; }
.exchange-app .recharge-plan-picker { margin: 0; }
.exchange-app .recharge-plan-options { gap: 9px; }
.exchange-app .recharge-plan-options span { padding: 11px; border-radius: 8px; font-size: 12px; }
.exchange-app .recharge-plan-options input:checked + span::after { content: '✓'; font-size: 10px; margin-left: 9px; }
.exchange-app .recharge-plan-options span { display: flex; justify-content: center; align-items: center; min-height: 42px; }
.exchange-app .business-seats { display: grid; gap: 10px; margin: 14px 0 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--surface-soft) 55%, var(--surface)); }
.exchange-app .business-seats.hidden { display: none; }
.exchange-app .business-seat-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.exchange-app .business-seat-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.exchange-app .business-seat-copy b { font-size: 13px; font-weight: 650; }
.exchange-app .business-seat-copy small { color: var(--muted); font-size: 11px; }
.exchange-app .business-seat-stepper { display: inline-flex; align-items: center; gap: 6px; }
.exchange-app .business-seat-stepper button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 16px; line-height: 1; cursor: pointer; }
.exchange-app .business-seat-stepper button:hover { border-color: color-mix(in srgb, var(--primary) 28%, var(--line)); }
.exchange-app .business-seat-stepper input { width: 64px; min-height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 13px; text-align: center; }
.exchange-app .business-seat-summary { padding-top: 2px; color: var(--muted); font-size: 12px; }
.exchange-app .business-seat-summary.is-error { color: var(--danger, #b42318); font-weight: 600; }
.exchange-app .renewal-note { display: grid; gap: 6px; margin: 13px 0 0; padding: 12px; border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line)); border-radius: 9px; background: var(--primary-soft); font-size: 12px; line-height: 1.7; }
.exchange-app .renewal-note.hidden { display: none; }
.exchange-app .renewal-note b { font-size: 13px; }
.exchange-app .confirm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.exchange-app .confirm-grid > div { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.exchange-app .confirm-grid strong { overflow-wrap: anywhere; font-size: 14px; }
.exchange-app #rechargeSubmitActions { margin-top: 22px; justify-content: flex-end; }
.exchange-app .utility-layout { display: grid; grid-template-columns: minmax(265px, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: stretch; }
.exchange-app .utility-input .panel-heading { margin-bottom: 18px; }
.exchange-app .utility-input .panel-heading p { font-size: 11px; }
.exchange-app .utility-input textarea { min-height: 170px; resize: vertical; font: 12px/1.7 var(--font-mono); }
.exchange-app .utility-input .actions { margin-top: 16px; }
.exchange-app #taskResults { min-width: 0; margin: 0; max-height: max(380px, calc(100dvh - 230px)); overflow: auto; scrollbar-width: thin; scrollbar-gutter: stable; }
.exchange-app .empty-state { display: grid; align-content: center; min-height: 250px; padding: 24px; border: 1px dashed var(--line-strong); border-radius: 13px; background: none; text-align: center; }
.exchange-app .empty-state b { font-size: 15px; }
.exchange-app .empty-state p { font-size: 12px; line-height: 1.7; }
.exchange-app .utility-layout > :has(> .empty-state) { display: grid; }
.exchange-app .empty-state::before { content: ''; display: block; width: 32px; height: 32px; margin: 0 auto 14px; background: color-mix(in srgb, var(--muted) 65%, var(--line)); mask: url('/assets/icons/search.svg') center/contain no-repeat; }
.exchange-app .result-top { flex-wrap: wrap; }
.exchange-app .result-top > div { min-width: 0; }
.exchange-app .status { max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-weight: 600; }
.exchange-app .result-card { padding: 18px; border-radius: 13px; box-shadow: none; }
.exchange-app .result-top h3 { font-size: 13px; overflow-wrap: anywhere; }
.exchange-app .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.exchange-app .detail-grid > div { min-width: 0; overflow-wrap: anywhere; }
.exchange-app footer { margin-top: 12px; padding: 0 6px; font-size: 10px; }
.exchange-app .session-help-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); overflow-y: auto; }
.exchange-app .session-help-dialog::backdrop { background: rgb(10 23 15 / .5); backdrop-filter: blur(3px); }
.exchange-app .help-dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding-bottom: 20px; }
.exchange-app .help-dialog-heading > div { min-width: 0; }
.exchange-app .help-dialog-heading h2 { margin: 5px 0 7px; font-size: 21px; font-weight: 650; line-height: 1.4; letter-spacing: -.025em; }
.exchange-app .help-dialog-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.exchange-app .help-dialog-heading .icon-button { flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border-color: transparent; border-radius: 8px; background: transparent; color: var(--muted); box-shadow: none; }
.exchange-app .help-dialog-heading .icon-button:hover { background: var(--surface-soft); color: var(--text); }
.exchange-app .help-dialog-heading .ui-icon { width: 18px; height: 18px; }
.exchange-app .session-guide-body { padding: 0; border: 0; }
.exchange-app .session-guide-steps { grid-template-columns: 1fr; gap: 20px; margin: 0; padding: 20px 0 22px; border-top: 1px solid var(--line); }
.exchange-app .session-guide-steps li { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 0; }
.exchange-app .session-guide-steps li + li { border: 0; }
.exchange-app .session-guide-number { width: 28px; height: 28px; border-radius: 8px; color: var(--primary); background: var(--primary-soft); font-size: 10px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.exchange-app .session-guide-steps b { font-size: 13px; font-weight: 600; line-height: 22px; }
.exchange-app .session-guide-steps p { margin: 4px 0 0; font-size: 12px; line-height: 1.7; }
.exchange-app .session-guide-link { gap: 9px; width: fit-content; min-height: 38px; max-width: 100%; margin-top: 11px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--primary); font-size: 12px; font-weight: 600; line-height: 20px; }
.exchange-app .session-guide-link:hover { border-color: var(--primary); background: var(--primary-soft); }
.exchange-app .session-guide-tip { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.exchange-app .session-guide-tip > .ui-icon { margin-top: 2px; color: var(--muted); }
.exchange-app .session-guide-tip b { display: block; color: var(--text); font-size: 11px; font-weight: 600; line-height: 20px; }
.exchange-app .session-guide-tip p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.exchange-app .session-help-dialog code { font-family: var(--font-mono); font-size: .95em; }
.exchange-app .sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip-path: inset(50%); white-space: nowrap; border: 0 !important; }
.exchange-app .skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 10px 15px; border-radius: 10px; background: var(--primary); color: var(--on-primary); }
.exchange-app .skip-link:focus { top: 10px; }
.exchange-app :is(input, textarea, button, a) { scroll-margin-block: 24px; }

/* A result is the focal point of the workspace, not another top-edge alert. */
.exchange-app #cardExpInput { font-variant-numeric: tabular-nums; }
.exchange-app #view-recharge.is-tracking { display: flex; flex-direction: column; justify-content: center; min-height: min(760px, calc(100dvh - 116px)); }
.exchange-app .is-tracking > .page-intro.sr-only { position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.exchange-app .is-tracking #rechargeForm { display: flex; justify-content: center; min-width: 0; width: 100%; }
.exchange-app .is-tracking .step-panel { width: 100%; max-width: 880px; padding: 28px 32px 24px; border-radius: 18px; }
.exchange-app .recharge-progress { margin: 0; }
.exchange-app .recharge-progress.neutral { --progress-tone: var(--muted); }
.exchange-app .progress-header { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 244px; padding: 20px 16px 32px; border: 0; text-align: center; }
.exchange-app .progress-state-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 2px; border: 1px solid color-mix(in srgb, var(--progress-tone) 16%, transparent); border-radius: 50%; color: var(--progress-tone); background: color-mix(in srgb, var(--progress-tone) 8%, var(--surface)); }
.exchange-app .progress-state-icon svg { display: block; width: 32px; height: 32px; }
.exchange-app .progress-state-icon svg > * { display: none; }
.exchange-app .pending .progress-icon-clock, .exchange-app .active .progress-icon-spinner, .exchange-app .success .progress-icon-check, .exchange-app :is(.error, .warning) .progress-icon-alert, .exchange-app .neutral .progress-icon-minus { display: block; }
.exchange-app .progress-icon-spinner { transform-origin: 12px 12px; animation: progress-spin 1.2s linear infinite; }
.exchange-app .progress-status { margin: 0; padding: 4px 10px; font-size: 11px; line-height: 1.5; font-weight: 600; }
.exchange-app .progress-status.neutral { color: var(--muted); background: var(--surface-soft); }
.exchange-app .progress-header h2 { margin: 0; font-size: clamp(24px, 2.2vw, 30px); font-weight: 650; line-height: 1.4; letter-spacing: -.025em; }
.exchange-app #progressTitle:focus { outline: none; }
.exchange-app .progress-header p { max-width: 480px; margin: 10px auto 0; font-size: 13px; line-height: 1.8; text-wrap: pretty; }
.exchange-app .progress-task-row { gap: 16px; margin-top: 0; padding: 12px 16px; border-radius: 10px; }
.exchange-app .progress-task-row small { font-size: 10px; letter-spacing: .02em; }
.exchange-app .progress-task-row code { margin-top: 4px; font-size: 12px; font-weight: 500; overflow: visible; white-space: normal; overflow-wrap: anywhere; user-select: all; }
.exchange-app .progress-task-row .button { flex-shrink: 0; min-height: 36px; padding: 7px 12px; font-size: 11px; }
.exchange-app .progress-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; padding: 0; }
.exchange-app .charge-substeps { list-style: none; margin: 0 0 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 88%, var(--bg)); }
.exchange-app .charge-substeps li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 7px 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.exchange-app .charge-substeps li + li { border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.exchange-app .charge-substeps i { display: inline-grid; width: 18px; height: 18px; margin-top: 1px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 10px; font-style: normal; }
.exchange-app .charge-substeps strong { display: block; color: var(--text); font-size: 12px; font-weight: 600; }
.exchange-app .charge-substeps small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.exchange-app .charge-substeps li.done { color: var(--text); }
.exchange-app .charge-substeps li.done i { border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); color: var(--primary); background: var(--primary-soft); }
.exchange-app .charge-substeps li.active { color: var(--progress-tone); }
.exchange-app .charge-substeps li.active i { border-color: var(--progress-tone); color: var(--progress-tone); }
.exchange-app .charge-substeps li.active strong { color: var(--progress-tone); }
.exchange-app .charge-substeps li.error { color: var(--danger); }
.exchange-app .charge-substeps li.error i,
.exchange-app .charge-substeps li.error strong { color: var(--danger); border-color: var(--danger); }
.exchange-app .charge-substeps li.pending i { color: transparent; }
.exchange-app .progress-steps li { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 90px; padding: 0; background: none; border-radius: 0; text-align: center; }
.exchange-app .progress-steps li::before { display: none; }
.exchange-app .progress-steps li:not(:last-child)::after { top: 14px; bottom: auto; left: calc(50% + 22px); width: calc(100% - 32px); height: 1px; }
.exchange-app .progress-steps li.done:not(:last-child)::after { background: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.exchange-app .progress-steps li.done b { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 22%, var(--line)); background: var(--primary-soft); }
.exchange-app .progress-steps li.active.done b { color: var(--primary); }
.exchange-app .progress-steps li.active b { box-shadow: 0 0 0 4px color-mix(in srgb, var(--progress-tone) 8%, transparent); }
.exchange-app .progress-steps li.error { background: none; }
.exchange-app .progress-steps strong { font-size: 12px; font-weight: 600; line-height: 1.5; }
.exchange-app .progress-steps small { margin-top: 5px; font-size: 10px; line-height: 1.6; }
.exchange-app .progress-footer { flex-direction: column; align-items: center; gap: 18px; padding-top: 18px; }
.exchange-app .progress-sync { justify-content: center; gap: 8px; font-size: 11px; line-height: 1.7; text-align: center; }
.exchange-app .progress-sync i { flex-shrink: 0; }
.exchange-app .is-terminal .progress-sync i { animation: none; }
.exchange-app .progress-footer-actions { justify-content: center; gap: 10px; }
.exchange-app .progress-footer-actions .button { min-width: 116px; }
@keyframes progress-spin { to { transform: rotate(360deg); } }

@media (min-width: 981px) {
  .exchange-app .page-intro-copy { max-width: calc(100% - 340px); }
  .exchange-app .steps { position: absolute; top: 34px; right: 26px; margin: 0; }
  .exchange-app .step-badge { display: none; }
}

@media (min-width: 981px) and (max-height: 820px) {
  .exchange-app .shell { padding-bottom: 8px; }
  .exchange-app .topbar { min-height: 48px; margin-bottom: 8px; }
  .exchange-app .announcement { padding-block: 4px; margin-bottom: 8px; }
  .exchange-app .announcement-label { padding-block: 3px; }
  .exchange-app .service-sidebar { padding-block: 20px; }
  .exchange-app .view { padding: 16px 22px; }
  .exchange-app .page-intro { margin-bottom: 8px; }
  .exchange-app .page-intro h1 { font-size: 23px; }
  .exchange-app .steps { top: 27px; right: 22px; margin: 0; }
  .exchange-app .recharge-editor, .exchange-app .recharge-details { gap: 12px; }
  .exchange-app .panel { padding: 15px; }
  .exchange-app .access-panel { padding: 10px 15px; }
  .exchange-app .section-label { margin-bottom: 10px; }
  .exchange-app #sessionInput { height: 152px; }
  .exchange-app .session-footnote { margin-top: 12px; }
  .exchange-app .editor-bottom { gap: 8px; }
  .exchange-app .editor-actionbar { padding-top: 10px; }
  .exchange-app footer { margin-top: 6px; }
}
@media (min-width: 981px) and (max-height: 740px) {
  .exchange-app .shell { padding-top: 6px; }
  .exchange-app .topbar { min-height: 42px; }
  .exchange-app footer { display: none; }
}
@media (max-width: 1150px) {
  .exchange-app .shell { width: calc(100% - 28px); }
  .exchange-app .workspace { grid-template-columns: 168px minmax(0, 1fr); }
  .exchange-app .service-sidebar { padding-inline: 10px; }
  .exchange-app .tabs button { padding-inline: 10px; gap: 8px; }
  .exchange-app .tabs button.active::after { right: -11px; }
  .exchange-app .view { padding-inline: 18px; }
  .exchange-app .utility-layout { grid-template-columns: minmax(245px, .85fr) minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 980px) {
  .exchange-app .workspace { grid-template-columns: 152px minmax(0, 1fr); }
  .exchange-app .tabs button { gap: 7px; padding-inline: 7px; }
  .exchange-app .tab-copy b { font-size: 12px; }
  .exchange-app .tab-copy small { font-size: 9px; }
  .exchange-app .view { padding: 20px 16px; }
  .exchange-app .recharge-details, .exchange-app .utility-layout { grid-template-columns: 1fr; }
  .exchange-app .step-badge { display: none; }
  .exchange-app #sessionInput { height: 150px; }
  .exchange-app #taskResults { max-height: none; overflow: visible; }
  .exchange-app .empty-state { min-height: 180px; }
}
@media (max-width: 640px) {
  .exchange-app .shell { width: calc(100% - 20px); padding-top: 6px; }
  .exchange-app .topbar { min-height: 48px; margin-bottom: 8px; gap: 8px; }
  .exchange-app .brand-copy b { font-size: 14px; }
  .exchange-app .brand-copy small { display: none; }
  .exchange-app .brand-mark { width: 36px; height: 34px; flex-basis: 36px; }
  .exchange-app .brand-mark::before { width: 30px; }
  .exchange-app .service-pill { display: inline-flex; height: 32px; padding: 0 9px; font-size: 10px; gap: 7px; }
  .exchange-app .topbar-actions { gap: 6px; }
  .exchange-app .topbar-actions .icon-button { width: 32px; height: 32px; }
  .exchange-app .announcement { font-size: 11px; }
  .exchange-app .workspace { display: block; border-radius: 14px; }
  .exchange-app .service-sidebar { position: static; min-height: 0; padding: 8px; gap: 10px; }
  .exchange-app .sidebar-label, .exchange-app .sidebar-privacy { display: none; }
  .exchange-app .tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .exchange-app .tabs button { justify-content: center; padding: 10px 3px; min-height: 46px; border-radius: 8px; }
  .exchange-app .tabs button.active::after, .exchange-app .tab-number, .exchange-app .tab-copy small { display: none; }
  .exchange-app .tab-copy b { font-size: 11px; }
  .exchange-app .queue-strip { flex-direction: row; align-items: center; margin: 0; padding: 10px; gap: 8px; border: 0; border-radius: 8px; }
  .exchange-app .queue-label { align-items: center; gap: 8px; }
  .exchange-app .queue-dot { margin: 0; }
  .exchange-app .queue-label b { font-size: 10px; }
  .exchange-app .queue-label small { display: none; }
  .exchange-app .queue-value strong { font-size: 16px; }
  .exchange-app .queue-value { gap: 5px; font-size: 9px; }
  .exchange-app .content-column { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }
  .exchange-app .view { padding: 18px 12px 14px; }
  .exchange-app .page-intro h1 { font-size: 23px; }
  .exchange-app .page-intro p { font-size: 11px; }
  .exchange-app .steps { max-width: 100%; gap: 6px; justify-content: space-between; }
  .exchange-app .steps li { gap: 4px; }
  .exchange-app .steps b { width: 18px; height: 18px; flex-basis: 18px; }
  .exchange-app .steps li:not(:last-child)::after { display: none; }
  .exchange-app .panel { padding: 14px; border-radius: 11px; }
  .exchange-app .access-controls { grid-template-columns: minmax(0, 1fr) 80px; gap: 8px; }
  .exchange-app #verifyCdkBtn { padding-inline: 9px; }
  .exchange-app .recharge-plan-options { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .exchange-app .recharge-plan-options span { padding: 10px 2px; font-size: 11px; }
  .exchange-app .recharge-plan-options input:checked + span::after { margin-left: 3px; }
  .exchange-app .field-meta { font-size: 9px; }
  .exchange-app #cdkLength { white-space: nowrap; }
  .exchange-app .section-label { font-size: 13px; }
  .exchange-app .section-label .text-button, .exchange-app .section-meta { font-size: 10px; }
  .exchange-app input:not([type=radio]):not([type=checkbox]):not([type=hidden]), .exchange-app textarea { font-size: 16px; }
  .exchange-app #sessionInput { font-size: 16px; height: 145px; }
  .exchange-app .payment-card .field-label-row small { display: block; }
  .exchange-app .editor-actionbar { position: relative; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
  .exchange-app .editor-actionbar > div { min-width: 0; }
  .exchange-app #editorActionHint { display: none; }
  .exchange-app #editorPlanSummary { font-size: 11px; }
  .exchange-app #validateSessionBtn { width: auto; min-width: 135px; gap: 10px; padding: 10px 13px; }
  .exchange-app .confirm-grid { gap: 9px; }
  .exchange-app .confirm-grid > div { padding: 12px; }
  .exchange-app .confirm-grid strong { font-size: 12px; }
  .exchange-app .actions { flex-direction: row; flex-wrap: wrap; }
  .exchange-app .actions .button { width: auto; flex: 1; }
  .exchange-app .utility-input textarea { font-size: 16px; }
  .exchange-app .action-dock { bottom: max(8px, env(safe-area-inset-bottom)); padding: 10px; }
  .exchange-app .action-dock .editor-actionbar { padding: 0; border: 0; box-shadow: none; background: none; }
  .exchange-app #upgradeEditorHint { display: none; }
  .exchange-app:has(input:focus, textarea:focus, select:focus) .action-dock { position: static; }
  .exchange-app .session-help-dialog { padding: 18px; }
  .exchange-app .help-dialog-heading { gap: 10px; padding-bottom: 16px; }
  .exchange-app .help-dialog-heading h2 { font-size: 19px; }
  .exchange-app .session-guide-steps { gap: 18px; padding-block: 18px; }
  .exchange-app .session-guide-steps li { gap: 10px; }
  .exchange-app .session-guide-link { min-height: 42px; }
  .exchange-app .session-guide-tip { padding: 11px 12px; }
}

@media (max-width: 980px) {
  .exchange-app .is-tracking .step-panel { padding: 24px 20px; }
  .exchange-app .progress-steps small { max-width: 120px; }
}
@media (max-width: 640px) {
  .exchange-app #view-recharge.is-tracking { min-height: calc(100dvh - 220px); padding: 16px 12px; }
  .exchange-app .is-tracking .step-panel { padding: 20px 14px; border-radius: 13px; }
  .exchange-app .progress-header { min-height: 236px; gap: 12px; padding: 12px 2px 28px; }
  .exchange-app .progress-state-icon { width: 58px; height: 58px; }
  .exchange-app .progress-header h2 { font-size: 24px; }
  .exchange-app .progress-header p { margin-top: 9px; font-size: 12px; }
  .exchange-app .progress-task-row { flex-direction: row; align-items: center; gap: 10px; padding: 12px; }
  .exchange-app .progress-task-row code { font-size: 11px; }
  .exchange-app .progress-task-row .button { align-self: center; min-height: 44px; padding-inline: 10px; }
  .exchange-app .recharge-progress { display: flex; flex-direction: column; }
  .exchange-app .progress-steps { order: 2; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 18px 0 0; }
  .exchange-app .charge-substeps { order: 3; margin-top: 16px; }
  .exchange-app .progress-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; min-height: 64px; padding: 8px 4px; text-align: left; }
  .exchange-app .progress-steps li:not(:last-child)::after { top: 50%; bottom: -1px; left: 17px; width: 1px; height: auto; }
  .exchange-app .progress-steps li:not(:first-child)::before { display: block; top: 0; bottom: 50%; left: 17px; width: 1px; }
  .exchange-app .progress-steps li.done + li::before { background: color-mix(in srgb, var(--primary) 35%, var(--line)); }
  .exchange-app .progress-steps small { max-width: none; margin-top: 3px; font-size: 11px; }
  .exchange-app .progress-footer { order: 1; gap: 14px; margin-top: 16px; padding: 0 0 20px; border-top: 0; border-bottom: 1px solid var(--line); }
  .exchange-app .progress-sync { font-size: 10px; }
  .exchange-app .progress-footer-actions { display: flex; justify-content: center; width: 100%; }
  .exchange-app .progress-footer-actions .button { flex: 1; min-width: 0; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .exchange-app .progress-icon-spinner, .exchange-app .progress-sync i { animation: none; }
  .exchange-app .renewal-switch > i, .exchange-app .renewal-switch > i:after { transition: none; }
}

/* Touch layouts keep secondary information readable rather than shrinking it. */
@media (max-width: 640px) {
  .exchange-app .page-intro p, .exchange-app .field-meta, .exchange-app .access-panel .field-meta,
  .exchange-app .session-footnote, .exchange-app .privacy-note, .exchange-app .renewal-switch small,
  .exchange-app .field-label-row small, .exchange-app .section-meta,
  .exchange-app .queue-label b, .exchange-app .queue-value,
  .exchange-app .utility-input .panel-heading p, .exchange-app .progress-sync,
  .exchange-app .progress-steps small, .exchange-app .progress-task-row small,
  .exchange-app .progress-task-row code, .exchange-app .detail-grid span,
  .exchange-app .result-top small { font-size: 12px; line-height: 1.7; }
  .exchange-app .field > span, .exchange-app .field-label-row, .exchange-app .section-label { font-size: 14px; }
  .exchange-app .section-label .text-button, .exchange-app .text-button { min-height: 44px; padding: 9px 6px; font-size: 12px; }
  .exchange-app .topbar-actions .icon-button, .exchange-app .help-dialog-heading .icon-button { width: 44px; height: 44px; flex-basis: 44px; }
  .exchange-app .tab-copy b { font-size: 12px; }
  .exchange-app .button { min-height: 44px; font-size: 13px; }
  .exchange-app .field-meta { flex-wrap: wrap; align-items: flex-start; gap: 4px 10px; }
  .exchange-app .field-meta > :last-child { margin-left: auto; }
  .exchange-app .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .exchange-app .detail-grid > div { font-size: 14px; line-height: 1.7; }
  .exchange-app .empty-state { min-height: 170px; padding: 22px 18px; }
  .exchange-app .empty-state::before { width: 28px; height: 28px; margin-bottom: 10px; }
  .exchange-app .recharge-plan-options span { min-height: 44px; }
  .exchange-app #editorPlanSummary { font-size: 12px; }
  .exchange-app .editor-actionbar { flex-wrap: wrap; }
  .exchange-app #validateSessionBtn { margin-left: auto; }
}
@media (max-width: 420px) {
  .exchange-app .confirm-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .exchange-app .payment-card-grid .field-label-row { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 2px; min-height: 43px; }
  .exchange-app .payment-card-number .field-label-row { display: flex !important; min-height: 32px; }
}
@media (max-width: 360px) {
  .exchange-app .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 自动续费后台取消状态提示（2026-09-07 队列化） */
.exchange-app .autorenew-note.is-warn { color: var(--warning); font-weight: 600; }
.exchange-app .autorenew-note.is-ok { color: var(--success); }

/* An outcome awaiting confirmation uses warning colors in both result surfaces. */
.exchange-app #taskResults .status.manual_review { color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, transparent); }
.exchange-app .progress-steps li.warning { background: none; }
.exchange-app .progress-steps li.warning b { border-color: var(--warning); color: var(--warning); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 10%, transparent); }
.exchange-app .progress-steps li.warning strong { color: var(--warning); }

.exchange-app .charge-substeps li.warning { color: var(--warning); }
.exchange-app .charge-substeps li.warning i,
.exchange-app .charge-substeps li.warning strong { color: var(--warning); border-color: var(--warning); }

.exchange-app .progress-task-hint { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.exchange-app .recent-tasks { margin: 0 0 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.exchange-app .recent-tasks-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.exchange-app .recent-tasks-heading > b { font-size: 14px; }
.exchange-app .recent-task-list { display: flex; flex-wrap: wrap; gap: 8px; }
.exchange-app .recent-task-button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.exchange-app .recent-tasks > small { display: block; margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }
@media (max-width: 640px) {
  .exchange-app .progress-task-hint { order: 1; }
  .exchange-app .recent-tasks { padding: 14px; }
  .exchange-app .recent-task-button { width: 100%; justify-content: flex-start; text-align: left; }
}

/* A failed connection adds a recovery action without compressing the brand. */
.exchange-app .brand-copy b,.exchange-app .service-pill{white-space:nowrap}
@media(max-width:520px){
  .exchange-app .topbar:has(#retryServiceBtn:not(.hidden)){display:grid;grid-template-columns:minmax(0,1fr) auto;row-gap:6px}
  .exchange-app .topbar:has(#retryServiceBtn:not(.hidden)) .topbar-actions{display:contents}
  .exchange-app .topbar:has(#retryServiceBtn:not(.hidden)) #themeToggle{grid-column:2;grid-row:1;justify-self:end}
  .exchange-app .topbar:has(#retryServiceBtn:not(.hidden)) .service-pill{grid-column:1;grid-row:2;justify-self:start;font-size:12px}
  .exchange-app #retryServiceBtn{grid-column:2;grid-row:2;min-height:44px}
}
@media(max-width:360px){.exchange-app .brand{gap:6px}.exchange-app .brand-copy b{font-size:13px}.exchange-app .brand-mark{width:30px;flex-basis:30px}.exchange-app .service-pill{padding:0 7px;gap:6px}}
