:root {
  --bg: #000;
  --panel: #050505;
  --brand: #cfc1b3;
  --brand-soft: #cfc1b31c;
  --hot: #ffb86a;
  --danger: #ff7477;
  --ok: #b8d6b2;
  --fg: #fff;
  --body: #ffffffd9;
  --sub: #ffffffb3;
  --muted: #ffffff82;
  --line: #ffffff1a;
  --line-strong: #ffffff36;
  --ease: cubic-bezier(.215, .61, .355, 1);
  --font: "Onest", "Manrope", "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--fg);
  background-image: radial-gradient(#171717 1.5px, transparent 1.5px);
  background-size: 15px 15px;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible { outline: 1px solid var(--brand); outline-offset: 2px; }
input:focus, input:focus-visible, select:focus, textarea:focus { outline: none !important; box-shadow: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.noise { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .17; mix-blend-mode: soft-light; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E"); }
.glow { position: fixed; z-index: -1; top: -220px; right: -260px; width: 580px; height: 580px; border-radius: 50%; background: var(--hot); filter: blur(190px) grayscale(.72); opacity: .12; pointer-events: none; }
.app { width: 100%; max-width: 520px; min-height: 100vh; margin: auto; }
.app > header { position: fixed; z-index: 60; top: 0; left: 50%; display: flex; align-items: center; justify-content: space-between; width: min(100%, 520px); height: 68px; padding: 9px 15px; transform: translateX(-50%); background: #000; border-bottom: 1px dotted var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; color: #fff; background: none; text-align: left; }
.mark { display: grid; place-items: center; width: 40px; height: 40px; border: 2px dotted var(--line-strong); border-radius: 10px; color: var(--brand); font: italic 700 25px Georgia, serif; }
.brand span:last-child b { display: block; font-size: 14px; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.balance { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 5px 13px; border: 1px dotted var(--line-strong); border-radius: 14px; color: #fff; background: #000; text-align: left; }
.balance svg { width: 16px; color: var(--brand); }
.balance span { display: block; }
.balance b, .balance small { display: block; white-space: nowrap; }
.balance b { font-size: 12px; font-variant-numeric: tabular-nums; }
.balance small { margin-top: 2px; color: var(--brand); font-size: 8px; font-weight: 500; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.admin-launch { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; color: var(--brand); border: 1px dotted var(--brand); border-radius: 12px; background: var(--brand-soft); }
.admin-launch svg { width: 17px; }
main { padding: 82px 14px 104px; }
.screen { display: none; }
.screen.active { display: block; animation: reveal .28s var(--ease); }
.primary, .secondary, .ghost { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 17px; border-radius: 999px; font-size: 12px; transition: .18s var(--ease); }
.primary { width: 100%; color: #000; border: 1px solid #fff; background: #fff; font-weight: 600; }
.primary:hover { border-color: var(--hot); background: var(--hot); }
.primary:disabled, button.busy { opacity: .45; pointer-events: none; }
.secondary { color: #fff; border: 1px dotted var(--line-strong); background: #000; }
.ghost { min-height: 36px; color: var(--brand); border: 1px dotted var(--line); background: transparent; }
.danger { color: var(--danger) !important; }
.compact-button { min-height: 34px; padding-inline: 13px; }
.input { display: flex; align-items: center; gap: 9px; min-height: 49px; padding: 0 14px; border: 1px dotted var(--line-strong); border-radius: 9px; color: var(--muted); background: #000; }
.input:focus-within { color: var(--muted); border-color: var(--line-strong); }
.input svg { width: 17px; }
.input > b { font-size: 14px; font-weight: 500; }
.input input, .input select { width: 100%; min-width: 0; padding: 13px 0; border: 0; outline: 0; color: #fff; background: transparent; font-size: 13px; }
.input input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { width: 100%; min-height: 88px; resize: vertical; padding: 12px; color: #fff; border: 1px dotted var(--line-strong); border-radius: 10px; background: #000; }
.app > nav { position: fixed; z-index: 70; bottom: max(9px, env(safe-area-inset-bottom)); left: 50%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; width: calc(min(100%, 520px) - 20px); height: 69px; padding: 6px; transform: translateX(-50%); border: 2px dotted var(--line-strong); border-radius: 16px; background: #000; }
.app > nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 4px 1px; border: 1px dotted transparent; border-radius: 11px; color: var(--muted); background: transparent; }
.app > nav svg { width: 18px; height: 18px; }
.app > nav span { margin-top: 4px; font-size: 9px; white-space: nowrap; }
.app > nav button.active { color: #000; border-color: var(--brand); background: var(--brand); }
.backdrop { position: fixed; z-index: 100; inset: 0; display: grid; align-items: end; padding: 10px; background: #000000ba; backdrop-filter: blur(8px); }
.backdrop[hidden], .toast[hidden], [hidden] { display: none !important; }
.sheet { width: 100%; max-width: 500px; max-height: 88vh; margin: auto; overflow: auto; padding: 9px 18px calc(18px + env(safe-area-inset-bottom)); border: 2px dotted var(--line-strong); border-radius: 16px; background: #000; box-shadow: 0 25px 50px -12px #000; }
.grip { display: block; width: 38px; height: 3px; margin: 0 auto 17px; border-radius: 999px; background: var(--brand); opacity: .7; }
.sheet > div > i { color: var(--muted); font-size: 9px; font-style: normal; letter-spacing: .1em; text-transform: uppercase; }
.sheet h3 { margin: 4px 0 7px; font-size: 21px; }
.sheet p { color: var(--sub); font-size: 12px; line-height: 1.45; }
.rows { margin: 15px 0; border-block: 1px dotted var(--line); }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dotted var(--line); color: var(--muted); font-size: 12px; }
.row:last-child { border: 0; }
.row b { max-width: 64%; color: #fff; text-align: right; overflow-wrap: anywhere; }
.actions { display: grid; grid-template-columns: .68fr 1.32fr; gap: 7px; margin-top: 14px; }
.stack-actions { display: grid; gap: 7px; margin-top: 12px; }
.toast { position: fixed; z-index: 140; right: 16px; bottom: 92px; left: 16px; max-width: 480px; margin: auto; padding: 14px 15px; border: 2px dotted var(--line-strong); border-radius: 12px; color: #fff; background: #000; box-shadow: 0 25px 50px -12px #000; font-size: 12px; }
.blocked { padding-top: 50px; }
.blocked i { color: var(--muted); font-size: 10px; font-style: normal; text-transform: uppercase; }
.blocked h1 { margin: 8px 0; font-size: 36px; }
.blocked h1 em { color: var(--brand); font-style: normal; }
.blocked p { color: var(--sub); font-size: 13px; line-height: 1.5; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 370px) { main { padding-inline: 10px; } .app > nav { width: calc(100% - 12px); gap: 0; padding-inline: 3px; } .app > nav span { font-size: 8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
