:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: #080d18; color: #eaf1ff; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% -20%, #172d50 0, #0c1527 35%, #080d18 75%); }
.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 32px; }
.masthead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.eyebrow, .label { color: #7f9cc8; font-size: 10px; letter-spacing: .19em; font-weight: 700; }
h1 { font-size: clamp(34px, 5vw, 52px); letter-spacing: -.06em; margin: 8px 0; }
.subtitle { color: #91a3bf; margin: 0; font-size: 14px; }
.connection { color: #98aeca; display: flex; align-items: center; gap: 9px; font-size: 12px; white-space: nowrap; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #4de3b2; box-shadow: 0 0 14px #4de3b2; }
.pulse.offline { background: #e2a850; box-shadow: 0 0 10px #e2a850; }
.status-panel, .audit-panel { border: 1px solid #213351; background: linear-gradient(120deg, #111c2e, #0d1728); border-radius: 12px; padding: 20px 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; box-shadow: 0 18px 50px #02071255; }
.status-panel strong { display: block; margin-top: 8px; font-size: 15px; font-weight: 600; }
.streams { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0; }
.stream-card { min-width: 0; padding: 20px; border-radius: 12px; border: 1px solid #213351; background: linear-gradient(160deg, #101b2e, #0b1321); box-shadow: 0 18px 48px #02071255; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.stream-card:hover { border-color: #43658f; }
.stream-card.selected { border-color: #60ddb3; box-shadow: 0 0 0 1px #60ddb344, 0 18px 48px #02071255; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.select-chain-button { border: 1px solid #2a4263; border-radius: 7px; padding: 8px 11px; color: #b7c9e4; background: #172942; cursor: pointer; font: inherit; font-size: 11px; }
.select-chain-button:hover { border-color: #60ddb3; color: #fff; }
.select-chain-button[aria-pressed="true"] { border-color: #60ddb3; color: #8ff1cf; background: #153b35; }
.stream-card button:focus-visible, .history-controls :is(input, select, button):focus-visible, .history-pagination button:focus-visible { outline: 2px solid #8bbdff; outline-offset: 3px; }
.card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.chain-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-weight: 800; font-size: 18px; background: #1a2b45; }
.chain-icon.eth { color: #9aaeff; }.chain-icon.bsc { color: #f4c849; }.chain-icon.tron { color: #ff6378; }
h2 { font-size: 15px; margin: 0 0 4px; }
.card-top h2 { font-size: 13px; margin: 0; }
.draw-meta { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid #213351; }
.draw-meta strong { display: block; margin-top: 7px; font-family: ui-monospace, Consolas, monospace; font-size: 18px; font-variant-numeric: tabular-nums; }
.draw-meta > div:last-child { text-align: right; }
.draw-meta .draw-countdown { color: #60ddb3; }
.tag { margin-left: auto; border: 1px solid #256955; color: #60ddb3; background: #12332e; border-radius: 20px; font-size: 9px; letter-spacing: .11em; padding: 5px 8px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.stream-card code { display: block; min-height: 70px; color: #9cd8ff; font-size: 12px; line-height: 1.8; word-break: break-all; }
.chain-update-state { display: block; min-height: 16px; margin: 0 0 14px; color: #7f91ad; font-size: 10px; }
.copy-button { margin-top: 16px; background: #172942; border: 1px solid #2a4263; color: #b7c9e4; border-radius: 7px; padding: 8px 11px; cursor: pointer; font: inherit; font-size: 11px; }
.copy-button:hover { border-color: #5ba7ff; color: #fff; }
.card-actions .copy-button { margin-top: 0; }
.audit-panel { grid-template-columns: 1fr auto; align-items: center; margin-top: 18px; }
.audit-panel code { display: block; margin-top: 7px; color: #b3a3ff; font-size: 12px; overflow-wrap: anywhere; }
.audit-panel p { color: #8294af; font-size: 11px; margin: 0; text-align: right; }
.membership-panel { display: grid; grid-template-columns: 1fr minmax(320px, 440px); gap: 28px; align-items: center; margin-top: 18px; padding: 22px 24px; border: 1px solid #213351; border-radius: 12px; background: linear-gradient(120deg, #111c2e, #0d1728); }
.membership-panel h2 { margin: 7px 0 8px; font-size: 18px; }
.membership-panel p { color: #8294af; font-size: 11px; line-height: 1.7; margin: 0; }
.membership-panel label { display: block; margin-bottom: 7px; color: #aebed5; font-size: 11px; font-weight: 700; }
.key-entry { display: flex; gap: 8px; }
.key-entry input { min-width: 0; flex: 1; border: 1px solid #2a4263; border-radius: 7px; padding: 10px 11px; color: #eaf1ff; background: #080f1c; font: inherit; font-size: 12px; outline: none; }
.key-entry input:focus { border-color: #5ba7ff; box-shadow: 0 0 0 3px #5ba7ff22; }
.key-entry button, .disconnect-button { border: 1px solid #376db3; border-radius: 7px; padding: 9px 14px; color: #fff; background: #1e4e86; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; }
.key-entry button:hover { background: #2865a9; }
.membership-panel #membership-status { margin-top: 8px; min-height: 18px; }
.disconnect-button { margin-top: 9px; color: #ffb4bd; border-color: #71414a; background: #321b24; }
[hidden] { display: none !important; }
.copy-button:disabled { opacity: .45; cursor: not-allowed; }
.history-panel { margin-top: 18px; padding: 22px 24px; border: 1px solid #213351; border-radius: 12px; background: linear-gradient(120deg, #111c2e, #0d1728); box-shadow: 0 18px 50px #02071255; }
.history-heading h2 { margin: 7px 0 8px; font-size: 18px; }
.history-heading p { color: #8294af; font-size: 11px; line-height: 1.7; margin: 0; }
.history-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.history-controls { display: grid; grid-template-columns: minmax(300px, 1fr) repeat(3, max-content); align-items: center; gap: 12px; margin-top: 18px; color: #9eb1cd; font-size: 11px; }
.history-control { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; }
.history-control > label { white-space: nowrap; }
.history-chain-field { grid-template-columns: max-content minmax(132px, 1fr); }
.history-rows-field { grid-template-columns: max-content minmax(80px, 1fr); }
.history-controls input, .history-controls select, .history-controls button, .history-pagination button { min-height: 34px; border: 1px solid #2a4263; border-radius: 7px; padding: 8px 10px; color: #dce8fb; background: #0a1424; font: inherit; font-size: 11px; }
.history-controls input, .history-controls select { width: 100%; min-width: 0; }
.history-controls input:focus, .history-controls select:focus { border-color: #5ba7ff; }
.history-search-actions { display: flex; gap: 8px; }
.history-controls button { cursor: pointer; }
.history-controls button:hover { border-color: #5ba7ff; color: #fff; }
.history-table-wrap { overflow: auto; margin-top: 18px; border: 1px solid #213351; border-radius: 9px; }
.history-panel table { width: 100%; border-collapse: separate; border-spacing: 0; }
.history-panel th, .history-panel td { padding: 16px; text-align: center; border-bottom: 1px solid #1d2d47; vertical-align: middle; white-space: nowrap; }
.history-panel th { padding-top: 12px; padding-bottom: 12px; color: #7f9cc8; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; background: #0b1423; }
.history-panel td { color: #b9c9df; font-size: 12px; font-variant-numeric: tabular-nums; }
.history-panel tbody tr:last-child td { border-bottom: 0; }
.history-panel tbody tr:hover { background: #172a4444; }
.history-panel tbody tr.history-match { background: #234d514d; }
.history-panel tbody tr.history-match:hover { background: #2e65645c; }
.history-panel tr.history-match td:first-child { box-shadow: inset 3px 0 0 #60ddb3; }
.history-match-text { background: #e9c75d; color: #111c2e; border-radius: 2px; padding: 0; font: inherit; }
.history-panel .period-cell { color: #edf4ff; font-weight: 600; font-family: ui-monospace, Consolas, monospace; }
.history-panel .time-cell { color: #94a7c2; font-family: ui-monospace, Consolas, monospace; }
.history-panel td code { color: #9cd8ff; font-size: 12px; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.history-panel .chain-cell { font-weight: 600; }
.history-panel .chain-eth { color: #9aaeff; }
.history-panel .chain-bsc { color: #f4c849; }
.history-panel .chain-tron { color: #ff8b9a; }
.history-empty, .history-state { color: #8294af; font-size: 11px; }
.history-state { margin: 10px 0 0; }
.history-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-top: 14px; }
.history-footer .history-state { margin: 0; }
.history-pagination { display: flex; align-items: center; gap: 9px; color: #9eb1cd; font-size: 11px; white-space: nowrap; }
.history-pagination button { cursor: pointer; }
.history-pagination button:hover:not(:disabled) { border-color: #5ba7ff; color: #fff; }
.history-pagination button:disabled { opacity: .4; cursor: not-allowed; }
footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; color: #697b96; font-size: 10px; line-height: 1.7; margin-top: 24px; }
footer p { max-width: 760px; margin: 0; } footer a { color: #86baff; text-decoration: none; white-space: nowrap; }
@media (max-width: 980px) { .history-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }.history-search-field { grid-column: 1 / -1; } }
@media (max-width: 820px) { .streams { grid-template-columns: 1fr; }.stream-card code { min-height: auto; }.status-panel { grid-template-columns: 1fr; }.masthead { align-items: flex-start; flex-direction: column; }.audit-panel { grid-template-columns: 1fr; }.audit-panel p { text-align: left; }.membership-panel { grid-template-columns: 1fr; gap: 18px; }.history-panel { padding: 18px; }.history-heading, .history-footer { align-items: flex-start; flex-direction: column; }.history-controls { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }.history-search-field { grid-column: 1 / -1; } }
@media (max-width: 600px) { .history-controls { grid-template-columns: minmax(0, 1fr) max-content; }.history-chain-field { grid-column: 1 / -1; } }
@media (max-width: 440px) { .history-search-actions { flex-wrap: wrap; }.card-top { gap: 8px; }.chain-icon { flex-shrink: 0; }.tag { letter-spacing: .04em; padding: 5px 6px; } }
 .intervention-marker{display:inline-block;margin-left:10px;color:#a33f32;font-size:11px;font-weight:700;white-space:nowrap}
