:root {
  font-family: Inter, "Segoe UI", sans-serif;
  color: #eff5f3;
  background: #101719;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
a { color: #a5ead5; }
.address { overflow-wrap: anywhere; font-family: ui-monospace, monospace; }
.wallet-decrease-label { margin: 0 0 6px; }
.wallet-decreases { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.wallet-move-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.wallet-move-row time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.wallet-decreases strong { color: #ffcf94; font-size: .9rem; font-variant-numeric: tabular-nums; }
.wallet-card:has(.wallet-movements[open]) .wallet-preview { display: none; }
.wallet-movements summary { color: #a5ead5; }
.wallet-move-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wallet-movements button { padding: 5px 8px; font-size: .83rem; }
.wallet-movements button[aria-pressed="false"] { background: #223537; color: #e5f1ee; }
.wallet-move-info { margin: 9px 0; }
.wallet-move-list { max-height: 26rem; overflow: auto; }
.wallet-move-list > li { padding: 6px 0; border-bottom: 1px solid #334547; }
.wallet-move-list[data-direction="increase"] strong { color: #a5ead5; }
.wallet-move-list[data-direction="increase"] .wallet-qqpk-funding strong { color: #d9beff; }
.wallet-qqpk-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 5px;
  background: #392b4d;
  font-size: .72rem;
  vertical-align: 1px;
  white-space: nowrap;
}
.wallet-repeat-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 5px;
  background: #20384f;
  color: #bfe0ff;
  font-size: .72rem;
  vertical-align: 1px;
  white-space: nowrap;
}
.wallet-move-list + button { margin-top: 8px; }
details { margin-top: 10px; }
details form { margin-top: 10px; padding: 14px; }
summary { cursor: pointer; }
.message:empty { display: none; }
#balance-history { display: grid; gap: 12px; }
.history-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.history-controls input { flex: 0 1 auto; max-width: 100%; }
.history-controls button, .history-values button { padding: 7px 10px; }
.history-controls button[aria-pressed="false"] { background: #223537; color: #e5f1ee; }
.history-plot { cursor: crosshair; user-select: none; }
.history-mouse-help { margin: 4px 0; }
.history-selection { fill: #a9c2ff; fill-opacity: .22; stroke: #a9c2ff; pointer-events: none; }
.history-chart .history-inflow { fill: #a5ead5; fill-opacity: .82; }
.history-chart .history-missing { fill: currentColor; fill-opacity: .1; }
.history-card[data-metric="inflow"] .balance-context { display: none; }
.history-chart { width: 100%; height: auto; display: block; color: #acc5bf; margin-top: 12px; }
.history-chart text { fill: currentColor; font-size: 13px; }
.history-chart .grid { stroke: currentColor; opacity: .18; }
.history-chart .line { fill: none; stroke: #a5ead5; stroke-width: 2; vector-effect: non-scaling-stroke; }
.history-chart .live { stroke: #a9c2ff; }
.history-event.kyc, .history-event-text.kyc { color: #f0b8ff; }
.history-event line { stroke: currentColor; stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.history-event circle { fill: currentColor; }
.history-events { display: grid; gap: 10px; padding: 0; list-style: none; }
.history-events li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.history-events button { padding: 5px 8px; font-size: .85rem; }
.history-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 0; }
.history-legend .archive { color: #a5ead5; }
.history-legend .observed { color: #a9c2ff; }
.history-values { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 10px; }
.history-values th, .history-values td { text-align: left; padding: 6px 4px; border-bottom: 1px solid #334547; }
.history-values td:last-child, .history-values th:last-child { text-align: right; }
body { margin: 0; }
main { width: min(1120px, calc(100% - 40px)); margin: 72px auto; }
header, .network, .input-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.75rem); letter-spacing: -.055em; }
h2 { font-size: 1rem; margin: 0; }
.eyebrow, .updated, #status, #address-status { color: #a8bbb7; }
.eyebrow { margin: 0 0 8px; font-size: .84rem; font-weight: 650; }
#wallets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); align-items: start; gap: 16px; margin: 26px 0; }
article, form { background: #182224; border: 1px solid #334547; border-radius: 16px; padding: 22px; }
.badge { color: #a5ead5; background: #223a35; border-radius: 7px; font-size: .75rem; padding: 5px 8px; white-space: nowrap; }
.balance { margin: 24px 0 8px; font-size: clamp(1.45rem, 4vw, 2.05rem); font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.balance small { color: #a5ead5; font-size: .8rem; }
.updated, #address-status { font-size: .86rem; min-height: 2.4em; margin: 0 0 12px; }
[data-stale="true"] .updated { color: #ffcf94; }
.explorer { color: #a5ead5; font: .78rem ui-monospace, monospace; overflow-wrap: anywhere; }
form { max-width: 465px; }
label { display: block; margin-bottom: 10px; font-weight: 600; }
button, input { border: 1px solid #4e6563; border-radius: 8px; padding: 10px 13px; font: inherit; }
button { background: #a5ead5; color: #10201c; font-weight: 650; cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
input { flex: 1; min-width: 0; color: inherit; background: #101719; }
#address-status { margin: 10px 0 0; min-height: 0; }
.muted { color: #a8bbb7; font-size: .9rem; }
.journal { margin-top: 35px; }
.journal form { max-width: 650px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 8px 16px; }
.journal input, .journal select { width: 100%; display: block; margin-top: 5px; }
select { border: 1px solid #4e6563; border-radius: 8px; padding: 10px; background: #101719; font: inherit; }
#cashout-status:empty { display: none; }
#entries { display: grid; gap: 8px; margin-top: 14px; max-width: 650px; }
#entries article { padding: 13px 16px; overflow-wrap: anywhere; }
#entries p { margin: 4px 0; }
#entries button { margin-top: 8px; padding: 4px 8px; font-size: .8rem; }
:focus-visible { outline: 2px solid #a5ead5; outline-offset: 3px; }
@media (max-width: 540px) {
  main { margin: 36px auto; }
  header { align-items: flex-start; flex-direction: column; }
}

.history-card > section { position: relative; }
.history-tooltip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  padding: 7px 10px;
  border: 1px solid #5b7774;
  border-radius: 6px;
  background: #101719;
  color: #eff5f3;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}

.history-event.review, .history-event-text.review { color: #ffcf94; }

#cashout-registry { margin: 0 0 24px; }
.register-cashout { width: 100%; font-weight: 700; padding: 18px; margin-bottom: 10px; }
#cashout-registry form { margin: 14px 0; }
#cashout-registry .registry-check { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
#cashout-registry input[type=checkbox] { width: 20px; height: 20px; flex: 0 0 auto; }
.registry-time { display: flex; gap: 6px; align-items: center; }
.registry-time input { width: 3.5em; text-align: center; }
.registry-actions { display: flex; gap: 10px; margin-top: 15px; }
.registry-record { margin: 12px 0; padding: 16px; border: 1px solid #334547; border-radius: 12px; }
.registry-record h3 { margin-top: 0; }
.registry-record p { margin: 8px 0; }
.history-event.paid, .history-event-text.paid { color: #a5ead5; }
.history-event.video, .history-event-text.video { color: #ffcf94; }
.history-event rect { fill: currentColor; }

#cashout-registry form { max-width: 760px; }
#cashout-registry .fields input, #cashout-registry .fields select { width: 100%; display: block; margin-top: 5px; }
#cashout-registry .registry-time input { width: 3.5em; margin: 0; }
#cashout-registry [data-outcomes] { margin-top: 18px; }

.registry-recent { margin: 20px 0; }
.registry-recent h2 { margin-bottom: 12px; }
.registry-recent-item { border-bottom: 1px solid #334547; padding: 10px 0; margin: 0; }
.registry-recent-item summary { display: flex; align-items: baseline; gap: 5px 14px; flex-wrap: wrap; }
.registry-recent-item summary::before { content: '▸'; }
.registry-recent-item[open] summary::before { content: '▾'; }
.registry-recent-item time { margin-left: auto; }
.registry-state { font-size: .85rem; }
.registry-state.kyc { color: #f0b8ff; }
.registry-state.video { color: #ffcf94; }
.registry-state.paid { color: #a5ead5; }
.registry-state.pending { color: #a8bbb7; }
.registry-nickname-reminder { border: 1px solid #4e6563; border-radius: 12px; padding: 16px; margin: 16px 0; }
.registry-nickname-prompt { padding: 10px 0; }
.registry-nickname-prompt p { margin: 6px 0; }
#cashout-registry form.registry-nickname-editor { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 12px 0; padding: 0; }
#cashout-registry form.registry-nickname-editor[hidden] { display: none; }
.registry-nickname-editor label { display: flex; flex-direction: column; gap: 6px; }
.registry-state.rejected, .history-event.rejected, .history-event-text.rejected { color: #ff9999; }
.registry-recent [data-recent-more] { margin-top: 12px; }

#cashout-registry form { margin: 16px auto; padding: 20px; scroll-margin-top: 16px; }
#cashout-registry .registry-nickname { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 360px; margin: 4px auto 28px; text-align: center; }
#cashout-registry .registry-nickname input { width: 100%; min-height: 44px; box-sizing: border-box; text-align: center; }
#cashout-registry .fields { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; gap: 12px; }
#cashout-registry .fields > label { grid-column: span 2; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; margin: 0; }
#cashout-registry .fields > label:nth-child(n+4) { grid-column: span 3; }
#cashout-registry .fields input, #cashout-registry .fields select { margin: 0; min-height: 44px; }
#cashout-registry .registry-time { min-height: 44px; gap: 6px; }
#cashout-registry .registry-time input { width: 3.5em; flex: 0 0 3.5em; }
#cashout-registry .registry-check { margin: 8px 0; font-size: .9rem; font-weight: 500; }
#cashout-registry form > .registry-check:first-of-type { margin-top: 16px; }
#cashout-registry [data-outcomes] { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; margin-top: 12px; }
#cashout-registry [data-outcomes] h3 { width: 100%; font-size: .95rem; margin: 0 0 3px; }
#cashout-registry [data-message]:empty { display: none; }
#cashout-registry .registry-actions { margin-top: 12px; }
@media(max-width: 560px) {
  #cashout-registry .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #cashout-registry .fields > label { grid-column: span 1; }
  #cashout-registry .fields > label:first-child { grid-column: span 2; }
  #cashout-registry .fields > label:nth-child(n+4) { grid-column: span 1; }
  #cashout-registry form { padding: 15px; }
}

.registry-comment { margin: 14px 0 0; }
.registry-comment textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; padding: 10px 13px; border: 1px solid #4e6563; border-radius: 8px; background: #101719; color: inherit; font: inherit; resize: vertical; }
.registry-record p, .history-event-text { overflow-wrap: anywhere; }

.history-event-filters { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0; }
.history-event-filters label { display: flex; align-items: center; gap: 7px; margin: 0; font-weight: 400; }
.history-event-filters input { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }
.history-events + button { margin-top: 10px; }

.history-events .history-comment-toggle { margin-left: auto; }
.history-report-comment { flex-basis: 100%; margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }

#cashout-registry .fields > label:nth-child(n+4) { grid-column: span 2; }
#cashout-registry .registry-zone { position: relative; }
#cashout-registry [data-zone-now] { position: absolute; top: 100%; left: 0; margin-top: 3px; font-size: .75rem; font-weight: 400; }
#cashout-registry .fields { margin-bottom: 24px; }
@media(max-width: 560px) {
  #cashout-registry .fields > label:nth-child(n+4) { grid-column: span 1; }
  #cashout-registry .fields > .registry-zone { grid-column: 1 / -1; }
}
