/* DreamBridge Paper Wallet Redeem | local sweep flow */
.paper-redeem-body {
  --pr-bg: #080808;
  --pr-panel: #101010;
  --pr-panel-raised: #161616;
  --pr-field: #0b0b0b;
  --pr-line: #343434;
  --pr-line-subtle: #242424;
  --pr-text: #f5f5f5;
  --pr-muted: #b7b7b7;
  --pr-faint: #888;
  --pr-white: #fff;
  min-width: 0;
  overflow-x: hidden;
  background: var(--pr-bg);
  color: var(--pr-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.main-content.paper-redeem-main {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: calc(100vh - 64px);
  background: transparent;
}

.pr-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 1060px;
  min-width: 0;
  margin: 0 auto;
  padding: 32px 28px 64px;
}

.pr-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--pr-muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
}

.pr-back:hover { color: var(--pr-white); text-decoration: underline; }
.pr-back:focus-visible,
.pr-page button:focus-visible,
.pr-page input:focus-visible,
.pr-page select:focus-visible,
.pr-page textarea:focus-visible,
.pr-page a:focus-visible,
.pr-page summary:focus-visible,
.pr-ack input:focus-visible + .pr-ack-box {
  outline: 3px solid var(--pr-white);
  outline-offset: 3px;
}

.pr-hero { margin: 0 0 28px; }
.pr-eyebrow {
  margin: 0 0 8px;
  color: var(--pr-muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .11em;
  line-height: 1.3;
}
.pr-hero h1,
.pr-section-heading h2,
.pr-quote-header h2,
.pr-transfer-header h2 {
  margin: 0;
  color: var(--pr-white);
  font-size: 32px;
  font-weight: 720;
  letter-spacing: -.035em;
  line-height: 1.14;
}
.pr-section-heading h2,
.pr-quote-header h2,
.pr-transfer-header h2 { font-size: 22px; }
.pr-lede {
  margin: 9px 0 0;
  color: var(--pr-text);
  font-size: 16px;
  line-height: 1.5;
}
.pr-local-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--pr-muted);
  font-size: 14px;
  line-height: 1.55;
}
.pr-local-note i { margin-top: .22em; color: var(--pr-white); }

.pr-flow {
  margin: 0 0 13px;
  border: 1px solid var(--pr-line);
  background: var(--pr-panel);
}
.pr-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pr-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 72px;
  padding: 12px 15px;
  border-right: 1px solid var(--pr-line);
  color: var(--pr-muted);
}
.pr-steps li:last-child { border-right: 0; }
.pr-step-number {
  display: inline-flex;
  flex: 0 0 29px;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border: 1px solid #666;
  border-radius: 50%;
  color: var(--pr-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
}
.pr-step-copy { display: grid; min-width: 0; gap: 2px; }
.pr-step-copy strong { color: inherit; font-size: 14px; font-weight: 720; line-height: 1.25; }
.pr-step-copy [data-step-state] { color: var(--pr-faint); font-size: 12px; line-height: 1.2; }
.pr-steps li[data-state="current"] { background: #1a1a1a; color: var(--pr-white); }
.pr-steps li[data-state="current"] .pr-step-number { border: 2px solid var(--pr-white); color: var(--pr-white); }
.pr-steps li[data-state="current"] [data-step-state] { color: var(--pr-white); }
.pr-steps li[data-state="done"] { color: var(--pr-white); }
.pr-steps li[data-state="done"] .pr-step-number { border-color: var(--pr-white); background: var(--pr-white); color: #090909; }
.pr-steps li[data-state="done"] [data-step-state] { color: var(--pr-muted); }
.pr-steps li[data-state="error"] { color: var(--pr-white); background: #202020; }
.pr-steps li[data-state="error"] .pr-step-number { border-color: var(--pr-white); color: var(--pr-white); }
.pr-steps li[data-state="error"] .pr-step-number::before { content: "!"; }
.pr-steps li[data-state="error"] .pr-step-number { font-size: 0; }
.pr-steps li[data-state="error"] .pr-step-number::before { font-size: 15px; font-weight: 800; }

.pr-flow-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 10px 0;
  color: var(--pr-muted);
  font-size: 14px;
  line-height: 1.4;
}
.pr-flow-toolbar p { margin: 0; }

.pr-card,
.pr-guidance {
  box-sizing: border-box;
  min-width: 0;
  border: 1px solid var(--pr-line);
  background: var(--pr-panel);
}
.pr-entry-panel,
.pr-quote-card { padding: 28px; }
.pr-section-heading,
.pr-quote-header,
.pr-transfer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.pr-section-heading { margin-bottom: 24px; }
.pr-quote-header { padding-bottom: 21px; border-bottom: 1px solid var(--pr-line); }
.pr-local-badge,
.pr-network-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid #555;
  border-radius: 999px;
  color: var(--pr-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.pr-fields { display: grid; gap: 19px; }
.pr-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.pr-field,
.pr-private-field { min-width: 0; }
.pr-field > label,
.pr-private-field > label,
.pr-txid-wrap > label {
  display: block;
  margin: 0 0 8px;
  color: var(--pr-text);
  font-size: 14px;
  font-weight: 690;
}
#pr-network,
#pr-fee-priority,
#pr-destination,
#pr-private-key,
#pr-txid {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #555;
  border-radius: 4px;
  outline: 0;
  background: var(--pr-field);
  color: var(--pr-white);
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
}
#pr-network,
#pr-fee-priority,
#pr-destination,
#pr-private-key { padding: 0 13px; }
#pr-destination,
#pr-txid {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
#pr-destination::placeholder,
#pr-private-key::placeholder { color: #898989; opacity: 1; }
#pr-network:disabled,
#pr-fee-priority:disabled,
#pr-destination:disabled,
#pr-private-key:disabled { cursor: not-allowed; border-color: #383838; color: #969696; }
.pr-field-hint {
  margin: 7px 0 0;
  color: var(--pr-muted);
  font-size: 14px;
  line-height: 1.48;
}
.pr-private-warning {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 9px;
  margin: 9px 0 0;
  padding: 11px 12px;
  border-left: 3px solid var(--pr-white);
  background: #1b1b1b;
  color: var(--pr-text);
  font-size: 14px;
  line-height: 1.5;
}
.pr-private-warning i { margin-top: .2em; }
.pr-entry-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 2px; }

.pr-primary,
.pr-secondary {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 730;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease, border-color .14s ease, transform .14s ease;
}
.pr-primary { border-color: var(--pr-white); background: var(--pr-white); color: #090909; }
.pr-primary:hover:not(:disabled) { background: #d8d8d8; border-color: #d8d8d8; transform: translateY(-1px); }
.pr-secondary { border-color: #666; background: transparent; color: var(--pr-white); }
.pr-secondary:hover:not(:disabled) { border-color: var(--pr-white); background: #202020; }
.pr-primary:disabled,
.pr-secondary:disabled { cursor: not-allowed; opacity: .5; }
.pr-clear-button { flex: 0 0 auto; min-width: 74px; }
.pr-status {
  min-height: 21px;
  margin: 0;
  color: var(--pr-muted);
  font-size: 14px;
  line-height: 1.5;
}
.pr-status[role="alert"] {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  border-left: 3px solid var(--pr-white);
  padding-left: 9px;
  color: var(--pr-white);
  font-weight: 650;
}
.pr-status[role="alert"]::before { content: "!"; font-weight: 850; }

.pr-quote-card { margin-top: 18px; }
.pr-quote-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.pr-quote-item {
  box-sizing: border-box;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--pr-line-subtle);
  background: var(--pr-field);
}
.pr-quote-item--receive { grid-column: span 2; border-color: #777; background: #191919; }
.pr-quote-item--address { grid-column: span 2; }
.pr-quote-item span {
  display: block;
  margin-bottom: 7px;
  color: var(--pr-muted);
  font-size: 12px;
  font-weight: 740;
  letter-spacing: .08em;
  line-height: 1.25;
  text-transform: uppercase;
}
.pr-quote-item strong,
.pr-quote-item code {
  display: block;
  min-width: 0;
  color: var(--pr-white);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.45;
}
.pr-quote-item--receive strong { font-size: 18px; }
.pr-quote-item code {
  color: var(--pr-text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.pr-fee-details {
  margin-top: 15px;
  border-top: 1px solid var(--pr-line-subtle);
  border-bottom: 1px solid var(--pr-line-subtle);
}
.pr-fee-details summary,
.pr-guidance summary {
  padding: 13px 0;
  color: var(--pr-text);
  font-size: 14px;
  font-weight: 680;
  cursor: pointer;
}
.pr-fee-details .pr-field-hint { margin: 0 0 14px; }
.pr-review-controls { margin-top: 17px; }
.pr-quote-valid {
  margin: 0;
  color: var(--pr-muted);
  font-size: 14px;
  line-height: 1.5;
}
.pr-quote-valid strong { color: var(--pr-white); font-weight: 730; }
.pr-unconfirmed-note {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 8px;
  margin: 14px 0 0;
  padding: 11px 12px;
  border-left: 3px solid var(--pr-white);
  background: #1b1b1b;
  color: var(--pr-text);
  font-size: 14px;
  font-weight: 630;
  line-height: 1.5;
}
.pr-unconfirmed-note i { margin-top: .17em; }
.pr-ack {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  margin-top: 15px;
  padding: 13px;
  border: 1px solid var(--pr-line);
  background: #151515;
  color: var(--pr-text);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
.pr-ack input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pr-ack-box {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid #858585;
  background: #090909;
}
.pr-ack input:checked + .pr-ack-box { border-color: var(--pr-white); background: var(--pr-white); }
.pr-ack input:checked + .pr-ack-box::after { color: #090909; content: "✓"; font-size: 14px; font-weight: 900; }
.pr-ack input:disabled + .pr-ack-box { opacity: .45; }
.pr-confirm-actions,
.pr-transfer-actions,
.pr-txid-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.pr-confirm-actions { margin-top: 15px; }
.pr-broadcast-status { margin-top: 17px; }

.pr-transfer-panel {
  margin-top: 20px;
  padding-top: 21px;
  border-top: 1px solid var(--pr-line);
}
.pr-transfer-header { align-items: center; justify-content: flex-start; }
.pr-transfer-icon {
  display: inline-flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #777;
  border-radius: 50%;
  color: var(--pr-white);
}
#pr-transfer-description {
  margin: 5px 0 0;
  color: var(--pr-muted);
  font-size: 14px;
  line-height: 1.48;
}
.pr-transfer-events {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--pr-line-subtle);
  list-style: none;
}
.pr-transfer-events li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--pr-line-subtle);
}
.pr-event-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid #777;
  border-radius: 50%;
}
.pr-event-copy { display: grid; min-width: 0; gap: 2px; }
.pr-event-copy strong { color: var(--pr-text); font-size: 14px; line-height: 1.35; }
.pr-event-copy span,
.pr-event-state { color: var(--pr-muted); font-size: 13px; line-height: 1.4; }
.pr-event-state { text-align: right; white-space: nowrap; }
.pr-transfer-events li[data-state="current"] .pr-event-marker { border: 2px solid var(--pr-white); }
.pr-transfer-events li[data-state="current"] .pr-event-marker::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pr-white);
  content: "";
  animation: pr-pulse 1.2s ease-in-out infinite;
}
.pr-transfer-events li[data-state="current"] .pr-event-state { color: var(--pr-white); font-weight: 700; }
.pr-transfer-events li[data-state="done"] .pr-event-marker { border-color: var(--pr-white); background: var(--pr-white); }
.pr-transfer-events li[data-state="done"] .pr-event-marker::after { color: #090909; content: "✓"; font-size: 13px; font-weight: 900; }
.pr-transfer-events li[data-state="done"] .pr-event-state { color: var(--pr-white); }
.pr-transfer-events li[data-state="error"] .pr-event-marker { border-color: var(--pr-white); }
.pr-transfer-events li[data-state="error"] .pr-event-marker::after { color: var(--pr-white); content: "!"; font-size: 14px; font-weight: 900; }
.pr-transfer-events li[data-state="error"] .pr-event-state { color: var(--pr-white); font-weight: 800; }
@keyframes pr-pulse { 50% { transform: scale(.65); opacity: .42; } }

.pr-txid-wrap {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid #555;
  background: #151515;
}
#pr-txid {
  min-height: 60px;
  padding: 10px 11px;
  resize: vertical;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.pr-txid-actions { margin-top: 10px; }
.pr-copy-status { min-height: 20px; color: var(--pr-muted); font-size: 13px; line-height: 1.45; }
.pr-transfer-actions { margin-top: 17px; }
.pr-explorer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  color: var(--pr-white);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pr-explorer-link:hover { color: var(--pr-muted); }
.pr-monitor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 15px;
  color: var(--pr-muted);
  font-size: 13px;
  line-height: 1.5;
}
.pr-monitor-row time { color: var(--pr-text); }
.pr-new-sweep { margin-top: 18px; }

.pr-guidance { margin-top: 18px; padding: 0 20px; }
.pr-guidance summary { padding: 16px 0; }
.pr-guidance p {
  margin: 0 0 17px;
  color: var(--pr-muted);
  font-size: 14px;
  line-height: 1.58;
}

/* Visibility is driven by transaction state; it must win over layout declarations. */
.pr-page [hidden] { display: none !important; }

@media (max-width: 760px) {
  .pr-page { padding: 24px 18px 48px; }
  .pr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-steps li { min-height: 64px; border-bottom: 1px solid var(--pr-line); }
  .pr-steps li:nth-child(2) { border-right: 0; }
  .pr-steps li:nth-child(3),
  .pr-steps li:nth-child(4) { border-bottom: 0; }
  .pr-entry-panel,
  .pr-quote-card { padding: 21px; }
  .pr-entry-grid { grid-template-columns: 1fr; }
  .pr-quote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-quote-item--receive,
  .pr-quote-item--address { grid-column: span 2; }
}

@media (max-width: 520px) {
  .pr-page { padding-right: 12px; padding-left: 12px; }
  .pr-hero h1 { font-size: 30px; }
  .pr-flow-toolbar { align-items: flex-start; flex-direction: column; }
  .pr-clear-button { width: 100%; }
  .pr-entry-panel,
  .pr-quote-card { padding: 17px; }
  .pr-section-heading,
  .pr-quote-header { align-items: stretch; flex-direction: column; }
  .pr-local-badge,
  .pr-network-tag { align-self: flex-start; }
  .pr-quote-grid { grid-template-columns: 1fr; }
  .pr-quote-item--receive,
  .pr-quote-item--address { grid-column: auto; }
  .pr-confirm-actions,
  .pr-transfer-actions,
  .pr-txid-actions { display: grid; grid-template-columns: 1fr; }
  .pr-confirm-actions .pr-primary,
  .pr-confirm-actions .pr-secondary,
  .pr-transfer-actions .pr-secondary,
  .pr-txid-actions .pr-secondary,
  .pr-new-sweep { width: 100%; }
  .pr-transfer-events li { grid-template-columns: 22px minmax(0, 1fr); align-items: start; }
  .pr-event-state { grid-column: 2; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .paper-redeem-body *,
  .paper-redeem-body *::before,
  .paper-redeem-body *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Keep the step context visible as review/status replaces the form. */
.pr-flow { position: sticky; top: 76px; z-index: 5; scroll-margin-top: 80px; }
.pr-quote-card { scroll-margin-top: 176px; }
.pr-transfer-panel { scroll-margin-top: 180px; }
@media(max-width:600px) {
  .pr-flow { top: 68px; scroll-margin-top: 72px; }
  .pr-transfer-panel { scroll-margin-top: 240px; }
}

.pr-flow-anchor { height: 0; scroll-margin-top: 80px; }
.pr-hero { margin-bottom: 22px; }
.pr-back { margin-bottom: 16px; }
.pr-local-note { margin-top: 8px; }
@media(max-width:600px) { .pr-flow-anchor { scroll-margin-top: 72px; } }

@media(min-width:761px) {
  .pr-quote-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .pr-quote-item { grid-column: span 2; }
  .pr-quote-item--network, #pr-review-priority-row,
  .pr-quote-item--address { grid-column: span 3; }
  .pr-quote-grid:has(#pr-review-priority-row[hidden]) .pr-quote-item--network { grid-column: 1 / -1; }
}
@media(max-width:520px) {
  .pr-quote-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pr-quote-item--receive, .pr-quote-item--address, .pr-quote-item--network, #pr-review-priority-row { grid-column: 1 / -1; }
}

#pr-txid { min-height: 84px; resize: none; overflow-y: hidden; }
