:root {
  color-scheme: dark;
  --bg: #061014; --panel: #0b171b; --panel-2: #102126; --line: #20363b;
  --ink: #e6eee9; --muted: #789096; --acid: #b9f227; --cyan: #4bd6d0;
  --red: #ff5a4e; --green: #54e08d; --amber: #f1ba55;
  --tg-bg: var(--bg); --stable-height: 100vh;
  --safe-top: env(safe-area-inset-top, 0px); --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px); --safe-left: env(safe-area-inset-left, 0px);
  font-family: "Bahnschrift", "DIN Alternate", "Aptos Narrow", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); overscroll-behavior: none; }
body { margin: 0; min-width: 280px; min-height: var(--stable-height); background: var(--bg); color: var(--ink); -webkit-tap-highlight-color: transparent; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .22; background-image: repeating-linear-gradient(0deg, transparent 0 3px, #fff 4px); background-size: 100% 4px; mix-blend-mode: overlay; z-index: 20; }
button, input { font: inherit; }
button, a, input[type="range"] { min-height: 44px; }
button { color: inherit; border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
input { width: 100%; border: 1px solid var(--line); border-radius: 2px; background: #071216; color: var(--ink); padding: 13px; outline: none; }
input:focus { border-color: var(--acid); box-shadow: 0 0 0 1px var(--acid); }
label, dt, .field-head, .range-labels { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong, b { font-family: "Agency FB", "Bahnschrift Condensed", "DIN Condensed", sans-serif; }
h2 { font-size: 32px; line-height: .98; text-transform: uppercase; letter-spacing: .02em; }
code { font: 11px/1.45 "Cascadia Mono", "Lucida Console", monospace; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sonar { position: fixed; width: 72vw; aspect-ratio: 1; right: -28vw; top: 4vh; border: 1px solid #174049; border-radius: 50%; opacity: .35; pointer-events: none; }
.sonar::before, .sonar::after { content: ""; position: absolute; border: inherit; border-radius: inherit; inset: 18%; }
.sonar::after { inset: 36%; background: conic-gradient(from 0deg, transparent 0 84%, rgba(75,214,208,.25)); animation: sonar 6s linear infinite; }
.kicker { margin-bottom: 6px; color: var(--cyan); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.boot { min-height: var(--stable-height); display: grid; align-content: center; justify-items: center; padding: calc(24px + var(--safe-top)) calc(24px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(24px + var(--safe-left)); text-align: center; }
.boot-mark { display: grid; place-items: center; width: 78px; height: 78px; margin-bottom: 28px; border: 1px solid var(--cyan); transform: rotate(45deg); box-shadow: 0 0 34px #4bd6d02b; }
.boot-mark span { color: var(--acid); font: 56px/.8 "Agency FB", sans-serif; transform: rotate(-45deg); }
.boot h1 { margin: 0; font-size: clamp(64px, 22vw, 98px); line-height: .72; letter-spacing: -.04em; }
.boot #boot-message { color: var(--muted); font-size: 13px; margin-top: 32px; }
.app-shell { width: min(100%, 760px); min-height: var(--stable-height); margin: auto; padding: calc(14px + var(--safe-top)) calc(16px + var(--safe-right)) calc(94px + var(--safe-bottom)) calc(16px + var(--safe-left)); }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; min-height: 67px; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 29px; line-height: 1; text-transform: uppercase; }
.signal { display: flex; align-items: center; gap: 7px; padding-top: 10px; color: var(--green); font-size: 10px; letter-spacing: .12em; }
.signal i { width: 6px; height: 6px; background: currentColor; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.notice { position: sticky; top: var(--safe-top); z-index: 12; display: flex; align-items: center; gap: 8px; margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--amber); background: #261e10; font-size: 12px; }
.notice span { flex: 1; }.notice button { min-height: 32px; background: transparent; color: var(--amber); }
.view { display: none; padding: 18px 0 24px; animation: surface .3s ease both; }.view.active { display: block; }
.wallet-strip { display: grid; grid-template-columns: 1.15fr 1fr .9fr; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.wallet-strip div { padding: 9px 10px 13px 0; }.wallet-strip div + div { padding-left: 10px; border-left: 1px solid var(--line); }
.wallet-strip span, .chart-head span, .proof-card > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; letter-spacing: .13em; }
.wallet-strip strong { font-size: 18px; }.wallet-strip .depth strong { color: var(--cyan); font-size: 13px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 12px; padding: 3px; background: #071216; border: 1px solid var(--line); }
.segmented button { min-height: 38px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.segmented button.active { background: var(--acid); color: #071014; }
.chart-card { position: relative; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(160deg,#0c1c21,#061014 65%); }
.chart-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg,transparent 49.8%,#20363b44 50%,transparent 50.2%),linear-gradient(transparent 49.8%,#20363b44 50%,transparent 50.2%); background-size: 58px 58px; }
.chart-head { position: relative; z-index: 1; display: flex; justify-content: space-between; padding: 14px; }.chart-head strong { display: block; font-size: 24px; }
#live-pnl { align-self: center; font: 18px "Agency FB", sans-serif; }.positive { color: var(--green)!important; }.negative { color: var(--red)!important; }.neutral { color: var(--muted)!important; }
#market-canvas { display: block; width: 100%; height: 220px; }
.chart-scale { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: var(--muted); font-size: 8px; letter-spacing: .18em; }
.chart-scale b { flex: 1; height: 2px; background: linear-gradient(90deg,var(--cyan),var(--red)); }
.trade-console { padding-top: 17px; }
.field-head, .leverage-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.amount-field { display: flex; align-items: center; border: 1px solid var(--line); background: #071216; }
.amount-field:focus-within { border-color: var(--acid); box-shadow: 0 0 0 1px var(--acid); }
.amount-field > span { padding-left: 13px; color: var(--acid); font-weight: 700; }.amount-field input { border: 0; box-shadow: none; font-size: 19px; }
.amount-field button { background: transparent; color: var(--acid); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.chips { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin: 8px 0 17px; }.chips button { min-height: 36px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.chips button:active { color: var(--acid); border-color: var(--acid); }
.leverage-head output { color: var(--acid); font: 25px "Agency FB", sans-serif; }
input[type="range"] { appearance: none; height: 44px; padding: 0; border: 0; background: transparent; box-shadow: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(90deg,var(--cyan),var(--acid),var(--red)); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; margin-top: -8px; border: 4px solid #081318; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 1px var(--acid); }
.range-labels { display: flex; justify-content: space-between; margin-top: -8px; }
.commitment { margin: 18px 0 10px; padding: 11px; border-left: 2px solid var(--cyan); background: #0b1b20; }
.commitment div { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 9px; letter-spacing: .13em; color: var(--muted); }.commitment b { color: var(--cyan); }
.commitment code { display: block; color: #aac0c3; }
.position-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.position { min-height: 76px; display: grid; grid-template-columns: 24px 1fr; grid-template-rows: 1fr 1fr; align-items: center; padding: 11px 14px; text-align: left; color: #071014; clip-path: polygon(0 0,calc(100% - 11px) 0,100% 11px,100% 100%,11px 100%,0 calc(100% - 11px)); }
.position > span { grid-row: 1/3; font-size: 22px; }.position b { font-size: 27px; line-height: 1; }.position small { font-size: 9px; font-weight: 800; letter-spacing: .17em; }
.position.long { background: var(--green); }.position.short { background: var(--red); }
.panel, .proof-card, .identity-card, .manifest, .records { margin-bottom: 12px; border: 1px solid var(--line); background: var(--panel); padding: 15px; }
.panel-title { display: flex; gap: 12px; margin-bottom: 15px; }.panel-title > span { color: var(--acid); font-size: 27px; }.panel-title p { margin: 0; color: var(--muted); font-size: 9px; letter-spacing: .14em; }.panel-title h3 { margin: 2px 0 0; font-size: 22px; text-transform: uppercase; }
.panel form { display: grid; gap: 8px; }.primary-button, .secondary-button { width: 100%; padding: 12px; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.primary-button { background: var(--acid); color: #071014; }.secondary-button { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.empty-panel { padding: 40px 22px; text-align: center; border: 1px dashed var(--line); color: var(--muted); }.empty-panel h3 { color: var(--ink); text-transform: uppercase; }.empty-icon { color: var(--acid); font-size: 48px; }
.wallet-cards { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin-bottom: 12px; }.wallet-card { padding: 15px; border-top: 2px solid var(--cyan); background: var(--panel); }.wallet-card.active { border-color: var(--acid); }.wallet-card span { font-size: 9px; letter-spacing: .13em; color: var(--muted); }.wallet-card strong { display: block; margin: 8px 0 4px; font-size: 24px; }.wallet-card small { color: var(--muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }.section-heading h2,.section-heading h3 { margin: 0; text-transform: uppercase; }.section-heading button { background: transparent; color: var(--cyan); font-size: 10px; letter-spacing: .12em; }
.record, .round-card, .admin-user, .withdrawal-card { padding: 13px 0; border-bottom: 1px solid var(--line); }.record:last-child,.round-card:last-child { border: 0; }
.record-row, .round-top { display: flex; justify-content: space-between; gap: 10px; }.record p,.round-card p { margin: 4px 0; color: var(--muted); font-size: 11px; }
.status-chip { align-self: flex-start; padding: 4px 6px; border: 1px solid currentColor; font-size: 8px; letter-spacing: .1em; }
.round-card { width: 100%; text-align: left; background: transparent; }.round-card strong { font-size: 20px; }.round-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 9px; }.round-meta span { color: var(--muted); font-size: 9px; }.round-meta b { display: block; margin-top: 3px; font-size: 14px; }
.fair-flow { margin: 24px 0; }.fair-flow div { padding-left: 15px; border-left: 2px solid var(--line); }.fair-flow div b { color: var(--acid); font-size: 22px; }.fair-flow div h3 { display: inline; margin-left: 8px; text-transform: uppercase; }.fair-flow div p { margin: 5px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }.fair-flow i { display: block; height: 21px; margin-left: 0; border-left: 1px dashed var(--cyan); }
.proof-card code { display: block; margin: 8px 0 13px; padding: 10px; background: #061014; color: var(--cyan); }.proof-card small { color: var(--muted); }.proof-status { display: flex; justify-content: space-between; }.proof-status b { color: var(--amber); font-size: 11px; letter-spacing: .1em; }
.identity-card { display: flex; gap: 15px; align-items: center; background: linear-gradient(135deg,#10252a,#0a1519); }.identity-card > div:first-child { display: grid; place-items: center; width: 70px; aspect-ratio: 1; border: 1px solid var(--cyan); color: var(--acid); font: 43px "Agency FB",sans-serif; }.identity-card h2 { margin: 0 0 3px; }.identity-card span { color: var(--muted); }
.manifest { margin: 0 0 12px; padding: 0 15px; }.manifest div { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); }.manifest div:last-child { border: 0; }.manifest dd { margin: 0; font-size: 12px; }
.danger-text { color: var(--red); }.admin-divider { display: flex; align-items: center; gap: 10px; margin: 30px 0 17px; color: var(--red); font-size: 10px; letter-spacing: .18em; }.admin-divider::before,.admin-divider::after { content:""; flex:1; height:1px; background:var(--red); }
.metric-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }.metric { padding: 13px; background: var(--panel); border-left: 2px solid var(--cyan); }.metric span { color:var(--muted);font-size:9px;letter-spacing:.1em; }.metric strong { display:block;margin-top:5px;font-size:25px; }
details { margin-top: 12px; border: 1px solid var(--line); background: #081418; }summary { min-height: 48px; padding: 16px; color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .13em; cursor: pointer; }details > div,details > form,details > p { margin: 0; padding: 0 15px 15px; }
.admin-user h4 { margin: 0; }.admin-user p { color:var(--muted);font-size:11px; }.admin-actions { display:flex;flex-wrap:wrap;gap:5px; }.admin-actions button { min-height:35px;padding:7px 9px;background:var(--panel-2);color:var(--cyan);font-size:9px;letter-spacing:.08em; }.admin-actions input { min-height:35px;width:86px;padding:7px; }
.warning-copy { color:var(--amber);font-size:12px;line-height:1.45; }.withdrawal-card code { display:block;color:var(--muted); }.settings-grid { display:grid;grid-template-columns:1fr 1fr;gap:9px; }.settings-grid label { display:grid;gap:5px; }.settings-grid .primary-button { grid-column:1/-1; }
.bottom-nav { position: fixed; z-index: 15; left: 50%; bottom: 0; width: min(100%,760px); display: grid; grid-template-columns: repeat(5,1fr); padding: 7px max(8px,var(--safe-right)) calc(7px + var(--safe-bottom)) max(8px,var(--safe-left)); transform: translateX(-50%); border-top: 1px solid var(--line); background: rgba(5,15,18,.94); backdrop-filter: blur(14px); }
.bottom-nav a { display: grid; place-items: center; align-content: center; gap: 3px; min-height: 51px; color: var(--muted); text-decoration: none; }.bottom-nav span { font-size: 18px; }.bottom-nav b { font-size: 8px; letter-spacing: .09em; }.bottom-nav a.active { color: var(--acid); }
.result-sheet { width: min(calc(100% - 16px),500px); margin: auto auto 0; padding: 15px 20px calc(20px + var(--safe-bottom)); border: 1px solid var(--line); border-radius: 0; background: #0b171b; color:var(--ink); text-align:center; }.result-sheet::backdrop { background:rgba(0,5,7,.8);backdrop-filter:blur(4px); }.sheet-grip { width:42px;height:3px;margin:0 auto 22px;background:var(--muted); }.result-sheet h2 { font-size:45px;margin:5px 0 18px; }.result-numbers { display:grid;grid-template-columns:1fr 1fr;margin-bottom:12px;border:1px solid var(--line); }.result-numbers div { padding:13px; }.result-numbers div+div { border-left:1px solid var(--line); }.result-numbers span { display:block;color:var(--muted);font-size:9px;letter-spacing:.12em; }.result-numbers strong { font-size:23px; }.result-sheet code { display:block;margin:12px 0;color:var(--muted); }
.toast-region { position:fixed;z-index:30;left:50%;bottom:calc(82px + var(--safe-bottom));width:min(calc(100% - 32px),500px);transform:translateX(-50%); }.toast { margin-top:7px;padding:12px;border-left:3px solid var(--cyan);background:#102126;box-shadow:0 8px 30px #0008;font-size:12px;animation:surface .25s ease both; }
@keyframes sonar { to { transform:rotate(360deg); } } @keyframes surface { from { opacity:0;transform:translateY(8px); } }
@media (min-width: 620px) { .app-shell{padding-left:24px;padding-right:24px}.view[data-view="wallet"] #payment-panels{display:grid;grid-template-columns:1fr 1fr;gap:12px}.chart-card{margin-top:18px}#market-canvas{height:260px}.fair-flow{display:grid;grid-template-columns:1fr 35px 1fr 35px 1fr}.fair-flow i{height:auto;border-left:0;border-top:1px dashed var(--cyan);margin-top:18px} }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important; } }
