/* Collector utility dialogs share the application's existing modal owner.
   Only these surfaces dock; checkout, authentication and reveals stay put. */
.modal-backdrop:has(.modal--collector) {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: calc(var(--top, 72px) + 12px) 24px 20px;
  background: rgb(0 0 0 / .64);
  backdrop-filter: none;
}
.modal.modal--collector {
  width: min(420px, 100%);
  max-width: 100%;
  max-height: calc(100dvh - var(--top, 72px) - 32px);
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--pf-line-strong, #353535);
  border-radius: 8px;
  background: var(--pf-surface, #111213);
  color: var(--pf-ink, #f2f0e9);
  box-shadow: 0 24px 70px rgb(0 0 0 / .45);
  transform: none;
  animation: none;
}
.modal-backdrop:has(.modal--collector-account) { padding: 12px; }
.modal.modal--collector-account { width: min(420px, 100%); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); }
.modal.modal--collector-wallet { padding: 24px; }
.collector-panel { min-width: 0; padding: 0 24px 24px; font-family: var(--pf-sans, sans-serif); }
.collector-panel__head {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-inline: -24px;
  padding: 22px 20px 20px 24px;
  border-bottom: 1px solid var(--pf-line, #303133);
  background: var(--pf-surface, #111213);
}
.collector-panel__eyebrow { display: block; margin-bottom: 5px; color: var(--pf-muted, #aaa9a2); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.collector-panel__head h2 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -.045em; line-height: 1.1; }
.collector-panel__close { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; border: 1px solid var(--pf-line, #303133); border-radius: 4px; background: transparent; color: var(--pf-text, #cfceca); cursor: pointer; }
.collector-panel :is(a, button):focus-visible { outline: 2px solid var(--pf-gold, #d9b55c); outline-offset: 3px; }
.collector-panel :is(a, button) { min-height: 44px; }
.collector-panel :is(p, strong, span, small, a, button) { overflow-wrap: anywhere; }
.collector-panel svg { flex-shrink: 0; }
.collector-identity { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 16px; padding-block: 25px; }
.collector-identity img, .collector-passport img { object-fit: contain; }
.collector-identity > div { display: grid; min-width: 0; gap: 6px; }
.collector-identity strong { font-size: 20px; font-weight: 500; letter-spacing: -.03em; }
.collector-identity span { color: var(--pf-muted, #aaa9a2); font-size: 12px; line-height: 1.45; }
.collector-account-stats { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); border-block: 1px solid var(--pf-line, #303133); margin-bottom: 24px; }
.collector-account-stats button { display: grid; min-width: 0; gap: 9px; padding: 19px 0; border: 0; background: transparent; color: var(--pf-ink, #f2f0e9); text-align: left; cursor: pointer; }
.collector-account-stats button + button { border-left: 1px solid var(--pf-line, #303133); padding-left: 18px; }
.collector-account-stats button > span { color: var(--pf-muted, #aaa9a2); font-size: 11px; }
.collector-account-stats button > strong { font-size: 18px; font-weight: 500; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.collector-account-stats button > small { display: flex; gap: 5px; align-items: center; color: var(--pf-gold, #d9b55c); font-size: 11px; }
.collector-account-stats small svg { width: 15px; height: 15px; }
.collector-panel .collector-primary { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 48px; border-radius: 4px; padding: 12px 16px; background: var(--pf-gold, #d9b55c); color: #15130d; box-shadow: none; font-size: 13px; font-weight: 600; text-align: left; }
.collector-primary > svg:last-child { margin-left: auto; }
.collector-nav { display: grid; margin-block: 16px; }
.collector-nav .collector-nav__row { display: grid; width: 100%; min-width: 0; min-height: 62px; grid-template-columns: 20px minmax(0, 1fr) 20px; align-items: center; gap: 13px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--pf-line, #303133); border-radius: 0; background: transparent; color: var(--pf-text, #cfceca); text-decoration: none; font: 500 14px var(--pf-sans, sans-serif); text-align: left; cursor: pointer; }
.collector-nav__row > svg { color: var(--pf-muted, #aaa9a2); }
.collector-nav__row > svg:last-child { width: 16px; }
.collector-nav__row small { display: block; margin-top: 5px; color: var(--pf-muted, #aaa9a2); font-size: 11px; font-weight: 400; line-height: 1.5; }
.collector-panel :is(.collector-nav__row, .collector-logout, .collector-panel__close):hover { color: var(--pf-gold, #d9b55c); }
.collector-panel__footer { padding-top: 6px; }
.collector-panel__footer p, .collector-panel__note { color: var(--pf-muted, #aaa9a2); font-size: 12px; line-height: 1.65; }
.collector-logout { display: inline-flex; align-items: center; gap: 12px; padding: 8px 0; border: 0; background: transparent; color: var(--pf-text, #cfceca); font-size: 13px; cursor: pointer; }
.collector-balance { display: grid; gap: 10px; padding: 28px 0 10px; }
.collector-balance > span { color: var(--pf-text, #cfceca); font-size: 12px; }
.collector-balance strong { font-size: clamp(26px, 7vw, 38px); font-weight: 500; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.collector-balance small { color: var(--pf-muted, #aaa9a2); font-size: 11px; }
.collector-balance + p { margin: 14px 0 24px; }
.collector-restore { padding-top: 6px; }
.collector-restore p { margin: 0 0 10px; color: var(--pf-text, #cfceca); font-size: 12px; }
.collector-panel .outline-button { border: 1px solid var(--pf-line-strong, #353535); border-radius: 4px; background: var(--pf-surface-2, #18191a); color: var(--pf-ink, #f2f0e9); font-size: 12px; box-shadow: none; white-space: normal; line-height: 1.5; }
.collector-restore .outline-button { width: 100%; padding: 10px 12px; }
.collector-restore small { display: block; margin-top: 10px; color: var(--pf-muted, #aaa9a2); font-size: 11px; line-height: 1.6; }
.collector-passport { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding-block: 26px; }
.collector-passport > div { display: grid; gap: 5px; }
.collector-passport span { color: var(--pf-muted, #aaa9a2); font-size: 11px; }
.collector-passport strong { font-size: 24px; font-weight: 500; letter-spacing: -.045em; }
.collector-passport .collector-passport__points { text-align: right; }
.collector-passport__points strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.collector-passport__points span { font-size: 10px; }
.collector-passport-progress { border-bottom: 1px solid var(--pf-line, #303133); padding-bottom: 20px; }
.collector-passport-progress > div { display: flex; gap: 12px; align-items: start; justify-content: space-between; margin-bottom: 13px; font-size: 12px; }
.collector-passport-progress strong { font-weight: 400; color: var(--pf-text, #cfceca); }
.collector-passport-progress > div > span { color: var(--pf-gold, #d9b55c); }
.collector-passport-progress progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 0; background: var(--pf-surface-3, #222426); accent-color: var(--pf-gold, #d9b55c); appearance: none; }
.collector-passport-progress progress::-webkit-progress-bar { background: var(--pf-surface-3, #222426); }
.collector-passport-progress progress::-webkit-progress-value { background: var(--pf-gold, #d9b55c); }
.collector-passport-progress progress::-moz-progress-bar { background: var(--pf-gold, #d9b55c); }
.collector-passport-progress p { margin: 12px 0 0; color: var(--pf-muted, #aaa9a2); font-size: 11px; line-height: 1.5; }
.collector-referral { padding-top: 22px; }
.collector-referral h3, .collector-panel__state h3 { margin: 0 0 10px; font-size: 16px; font-weight: 500; letter-spacing: -.02em; }
.collector-referral > p { color: var(--pf-muted, #aaa9a2); font-size: 11px; line-height: 1.6; }
.collector-panel .collector-copy { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; }
.collector-referral-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 8px; }
.collector-referral-counts div { display: flex; flex-direction: column-reverse; gap: 5px; }
.collector-referral-counts dt { color: var(--pf-muted, #aaa9a2); font-size: 11px; }
.collector-referral-counts dd { margin: 0; font-size: 20px; font-variant-numeric: tabular-nums; }
.collector-referral-rules { margin-top: 8px; border-bottom: 1px solid var(--pf-line, #303133); }
.collector-referral-rules > summary { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; color: var(--pf-text, #cfceca); font-size: 11px; cursor: pointer; list-style: none; }
.collector-referral-rules > summary::-webkit-details-marker { display: none; }
.collector-referral-rules > summary svg { width: 16px; height: 16px; transform: rotate(90deg); }
.collector-referral-rules[open] > summary svg { transform: rotate(-90deg); }
.collector-referral-rules > summary:focus-visible { outline: 2px solid var(--pf-gold, #d9b55c); outline-offset: 3px; }
.collector-referral-rules > p { margin: 0 0 15px; color: var(--pf-muted, #aaa9a2); font-size: 11px; line-height: 1.65; }
.collector-copy-status { margin: 0; }
.collector-copy-status:not(:empty) { margin: 8px 0 0; }
.collector-referral + .collector-primary { margin-top: 20px; }
.collector-rewards-note { margin-bottom: 0; font-size: 11px; }
.collector-panel__state { padding-block: 25px; font-size: 13px; line-height: 1.6; color: var(--pf-muted, #aaa9a2); }
.collector-panel__state .outline-button { margin-top: 6px; }

@media (max-width: 600px) {
  .modal-backdrop:has(.modal--collector) { padding: 8px; }
  .modal.modal--collector { width: 100%; max-height: calc(100dvh - 16px); border-radius: 6px; }
  .modal.modal--collector-account { height: calc(100dvh - 16px); }
  .collector-panel { padding: 0 20px 22px; }
  .collector-panel__head { margin-inline: -20px; padding: 18px 14px 18px 20px; }
}
@media (max-width: 360px) {
  .collector-panel { padding-inline: 16px; }
  .collector-panel__head { margin-inline: -16px; padding-left: 16px; }
  .collector-account-stats { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .collector-account-stats button > strong { font-size: 16px; }
  .collector-account-stats button + button { padding-left: 12px; }
  .collector-passport { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; }
  .collector-passport img { width: 40px; }
  .collector-passport strong { font-size: 22px; }
  .collector-passport__points strong { font-size: 18px; }
}
