/* Loaded only by the wallet library, address dossiers and history reader. */
.reader-finder { margin: 32px auto; padding: clamp(18px,3vw,30px); border: 1px solid #454b58; border-radius: 14px; background: #10141e; color: #eee9df; max-width: 1180px; box-sizing: border-box; }
.history-page .reader-finder { width: min(calc(100% - 40px),1180px); }
.reader-finder h2 { margin: 0 0 8px; font: 600 clamp(20px,3vw,26px)/1.3 Inter,system-ui,sans-serif; letter-spacing: -.02em; }
.reader-hint, .reader-result-count, .reader-empty { font: 400 14px/1.6 Inter,system-ui,sans-serif; color: #bcc4d1; }
.reader-filter-form { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.reader-field { flex: 1 1 220px; min-width: 0; }
.reader-field label, .reader-copy-fallback { display: block; font: 500 13px/1.6 Inter,system-ui,sans-serif; color: #eee9df; }
.reader-field :is(input,select), .reader-copy-fallback input { display:block; width:100%; box-sizing:border-box; min-height:46px; margin-top:7px; padding:10px 12px; border:1px solid #697487; border-radius:6px; color:#f2f0e9; background:#0b0f18; font:400 16px/1.4 Inter,system-ui,sans-serif; }
.reader-filter-form button { min-height:46px; padding:10px 16px; border:1px solid #929dad; border-radius:6px; color:#eee9df; background:#202837; font:500 14px/1.5 Inter,system-ui,sans-serif; cursor:pointer; }
.reader-result-count { margin-bottom:0; font-variant-numeric:tabular-nums; }
.reader-empty { padding:14px; border-left:3px solid #e1b969; background:#202837; }
.reader-matches { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 24px; padding-left:22px; max-height:360px; overflow:auto; scrollbar-gutter:stable; }
.reader-matches a { display:block; padding:10px 4px; color:#e1c689; font:400 15px/1.5 Inter,system-ui,sans-serif; text-underline-offset:4px; }
.reader-event-nav { display:flex; flex-wrap:wrap; gap:8px 20px; border-top:1px solid #454b58; margin-top:22px; padding-top:10px; }
.reader-event-nav a, .reader-back { display:inline-flex; align-items:center; min-height:44px; color:#e1c689; font:500 13px/1.5 Inter,system-ui,sans-serif; text-underline-offset:4px; }
.reader-back { margin-top:16px; }
.reader-copy-fallback { margin:14px 0; width:100%; }
.reader-copy-fallback input { font-family:ui-monospace,monospace; }
:is(.wallet-page,.history-page) :is(.reader-finder,.reader-event-nav,.wallet-local-nav,.wallet-library-card,.wallet-address-actions,.reader-copy-fallback) :focus-visible,
:is(.wallet-page,.history-page) .reader-back:focus-visible { outline:3px solid #e1b969; outline-offset:4px; border-radius:3px; }
.wallet-page .wallet-local-nav [aria-current="location"] { color:#f2d58f; text-decoration:underline; text-underline-offset:6px; }
:is(.wallet-page,.history-page) :is(section,article,h1,nav)[id] { scroll-margin-top:110px; }
:is(.wallet-page,.history-page) :target { outline:1px solid #b69861; outline-offset:8px; }
.wallet-page :is(.wallet-address,.wallet-address code,.wallet-record-card,.wallet-local-nav) { min-width:0; overflow-wrap:anywhere; }
.wallet-library-page .wallet-library-card:focus-within { border-color:#e1b969; background:#171d29; }
.wallet-library-page .wallet-library-group[hidden], .wallet-library-page .wallet-library-card[hidden], [hidden].reader-empty, [hidden].reader-copy-fallback { display:none!important; }
@media (max-width:600px) {
  .reader-filter-form { display:grid; grid-template-columns:minmax(0,1fr); }
  .reader-filter-form button { width:100%; }
  .reader-matches { grid-template-columns:minmax(0,1fr); }
  .reader-event-nav { justify-content:space-between; gap:4px 12px; }
}
@media (prefers-reduced-motion:reduce) {
  :is(.wallet-page,.history-page) *, :is(.wallet-page,.history-page) *::before, :is(.wallet-page,.history-page) *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}
@media (forced-colors:active) {
  .reader-finder, .reader-filter-form button, .reader-field :is(input,select) { border:1px solid CanvasText; }
  .wallet-page .wallet-local-nav [aria-current] { outline:2px solid Highlight; }
}
@media print {
  .reader-finder,.reader-event-nav,.reader-back,.reader-copy-fallback,.wallet-address-actions button { display:none!important; }
  .wallet-library-page .wallet-library-group[hidden], .wallet-library-page .wallet-library-card[hidden] { display:block!important; }
  .wallet-page details > *, .history-page details > * { display:block!important; }
  .wallet-page details::details-content, .history-page details::details-content { content-visibility:visible; display:block; }
  :is(.wallet-page,.history-page) :target { outline:none; }
  :is(.wallet-page,.history-page) :is(h2,h3) { break-after:avoid; }
}
/* Keep the complete dossier contents available on phones. */
@media screen and (max-width:760px) {
  body.wallet-page .wallet-local-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); position:static; gap:8px; margin:28px 0; padding:16px; border:1px solid #454b58; border-radius:10px; }
  body.wallet-page .wallet-local-nav > span { display:block; grid-column:1/-1; font-size:12px; }
  body.wallet-page .wallet-local-nav::before, body.wallet-page .wallet-local-nav a::before { display:none; }
  body.wallet-page .wallet-local-nav a { display:flex; align-items:center; justify-content:flex-start; min-height:44px; min-width:0; padding:8px; border:1px solid #454b58; border-radius:5px; font-size:12px; line-height:1.4; letter-spacing:0; }
}
@media screen and (max-width:600px) {
  body.history-page .history-topbar { position:static; display:grid; grid-template-columns:minmax(0,1fr); gap:8px; padding:14px; box-sizing:border-box; }
  body.history-page .history-brand { min-height:44px; white-space:nowrap; }
  body.history-page .history-topnav { display:flex; flex-wrap:wrap; gap:4px 16px; min-width:0; }
  body.history-page .history-topnav a { display:inline-flex; align-items:center; min-height:44px; font-size:11px; letter-spacing:.04em; }
}
