/* GRAPI — same look as telegram.gamerovel.com (night blue, star gold, Unbounded + Manrope). No inline styles (CSP). */
@font-face { font-family: "Unbounded"; src: url("/unbounded-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
:root { --night:#14163A; --dusk:#1E2152; --dusk2:#272B63; --line:#363B7A; --star:#FFC53D; --star-deep:#F29F05; --sky:#7CC4FF; --text:#EEF0FF; --muted:#A6AAD6; --ok:#5FD69A; --bad:#FF7A85;
  --display:"Unbounded",system-ui,sans-serif; --body:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif; --mono:ui-monospace,Menlo,Consolas,monospace; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--night); color: var(--text); font: 15px/1.55 var(--body); font-weight: 500; }
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(1.5px 1.5px at 12% 18%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 72% 9%, #fff7 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 88% 38%, #fff6 50%, transparent 51%), radial-gradient(1px 1px at 33% 62%, #fff5 50%, transparent 51%),
  radial-gradient(1px 1px at 58% 82%, #fff5 50%, transparent 51%), radial-gradient(60% 45% at 50% -8%, #3A3F9E 0%, transparent 70%); }
a { color: var(--sky); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
h1 { font: 700 clamp(32px, 5vw, 48px)/1.08 var(--display); letter-spacing: -.03em; margin: 0 0 16px; }
h2 { font: 700 clamp(20px, 3vw, 26px)/1.2 var(--display); letter-spacing: -.02em; margin: 0 0 14px; }
h3 { font: 700 16px/1.3 var(--display); margin: 0 0 8px; }
p { margin: 0 0 12px; }
code, .mono { font-family: var(--mono); font-size: 13px; }
pre { margin: 0; font: 13px/1.7 var(--mono); white-space: pre-wrap; word-break: break-word; }
.muted { color: var(--muted); } .gold { color: var(--star); } .ok { color: var(--ok); } .bad { color: var(--bad); } .small { font-size: 13px; }
.tag { font: 800 11px/1 var(--body); letter-spacing: .1em; color: var(--star); text-transform: uppercase; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(16px, 4vw, 40px); max-width: 1200px; margin: 0 auto; flex-wrap: wrap; }
.top.wide { max-width: none; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 17px/1 var(--display); }
.brand svg { width: 26px; height: 26px; fill: var(--star); }
.badge { font: 800 10px/1 var(--body); letter-spacing: .14em; color: var(--star); border: 1px solid #FFC53D55; border-radius: 6px; padding: 4px 6px; }
.nav { display: flex; gap: clamp(12px, 2vw, 26px); align-items: center; flex-wrap: wrap; }
.nav a { color: var(--muted); font-weight: 600; text-decoration: none; } .nav a:hover, .nav a.on { color: var(--text); }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 12px; background: var(--star); color: var(--night) !important;
  font: 700 15px/1 var(--body); border: 0; cursor: pointer; text-decoration: none; }
.btn:hover { background: #ffd366; } .btn:disabled { opacity: .5; cursor: default; }
.btn.q { background: transparent; color: var(--text) !important; border: 1px solid var(--line); } .btn.q:hover { border-color: var(--muted); }
.btn.s { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn.danger { background: transparent; color: var(--bad) !important; border: 1px solid #FF7A8566; }
.btn.full { width: 100%; }
label { display: block; font-weight: 700; font-size: 13px; margin: 0 0 6px; }
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], textarea, select {
  width: 100%; min-height: 46px; border-radius: 12px; background: var(--dusk2); border: 1px solid var(--line); color: var(--text); padding: 0 14px; font: 500 14px var(--body); }
textarea { padding: 12px 14px; min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--sky); }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 160px; }
.msg { margin-top: 10px; font-size: 14px; } .msg.err { color: var(--bad); } .msg.okm { color: var(--ok); }

/* panels, grids, tables */
.panel { background: var(--dusk); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.panel.tight { padding: 14px 8px 6px; } .panel.gold { border-color: #FFC53D66; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } .g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.stat .tag { margin-bottom: 6px; display: block; } .stat .big { font: 700 28px/1.3 var(--display); }
.stat .big small { font-size: 14px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { font: 800 11px/1 var(--body); letter-spacing: .08em; color: var(--muted); text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); text-transform: uppercase; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid #363B7A88; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; } .nowrap { white-space: nowrap; }
.pill { display: inline-block; font: 800 11px/1 var(--body); letter-spacing: .06em; padding: 6px 9px; border-radius: 999px; text-transform: uppercase; white-space: nowrap; }
.p-ok { background: #5FD69A22; color: var(--ok); } .p-run { background: #7CC4FF22; color: var(--sky); } .p-bad { background: #FF7A8522; color: var(--bad); } .p-wait { background: #FFC53D22; color: var(--star); } .p-mute { background: #A6AAD622; color: var(--muted); }
.empty { color: var(--muted); padding: 18px 14px; }
.sub { font-size: 12px; color: var(--muted); }

/* landing */
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 60px; }
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 40px; align-items: center; }
.lede { font-size: 17px; color: var(--muted); max-width: 48ch; }
.code { background: #10122E; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.c-k { color: var(--sky); } .c-s { color: var(--star); } .c-c { color: var(--muted); }
.feat h3 { font-size: 15px; } .feat p { color: var(--muted); margin: 0; }
.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 30px 16px 40px; }

/* portal / admin layout */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 80px); }
.side { padding: 20px 12px; border-right: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.side button { all: unset; cursor: pointer; padding: 11px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; }
.side button.on { background: var(--dusk); color: var(--text); font-weight: 700; }
.main { padding: 26px clamp(16px, 3vw, 36px) 60px; min-width: 0; }
@media (max-width: 760px) { .app { grid-template-columns: 1fr; } .side { grid-auto-flow: column; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); } .side button { white-space: nowrap; } }
.auth { max-width: 460px; margin: 40px auto; padding: 0 16px; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs button { all: unset; cursor: pointer; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; color: var(--muted); }
.tabs button.on { color: var(--night); background: var(--star); border-color: var(--star); }

/* top-up */
.coins { display: grid; gap: 8px; }
.coin { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--dusk2); font-weight: 700; }
.coin.on { border-color: var(--star); box-shadow: 0 0 0 1px var(--star) inset; }
.coin i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; color: #fff; background: #26A17B; }
.coin i.btc { background: #F7931A; } .coin i.ltc { background: #345D9D; }
.coin small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
.amts { display: flex; gap: 8px; margin: 10px 0 8px; flex-wrap: wrap; }
.amts button { all: unset; cursor: pointer; flex: 1; min-width: 52px; text-align: center; padding: 10px 0; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; }
.amts button.on { border-color: var(--star); color: var(--star); }
.pay { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; }
.pay img { width: 150px; height: 150px; border-radius: 14px; background: #fff; padding: 8px; image-rendering: pixelated; }
@media (max-width: 480px) { .pay { grid-template-columns: 1fr; } }
.amount { font: 700 26px/1.2 var(--display); color: var(--star); word-break: break-all; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--dusk2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; margin-top: 8px; }
.kv .mono { word-break: break-all; }
.copy { all: unset; cursor: pointer; color: var(--star); font-weight: 800; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--star); box-shadow: 0 0 0 6px #FFC53D33; display: inline-block; margin-right: 8px; }
.dot.blue { background: var(--sky); box-shadow: 0 0 0 6px #7CC4FF33; } .dot.green { background: var(--ok); box-shadow: 0 0 0 6px #5FD69A33; }
.bar { height: 8px; border-radius: 9px; background: var(--dusk2); overflow: hidden; margin: 10px 0 6px; } .bar b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--star), var(--star-deep)); transition: width .4s; }
.newkey { background: #10122E; border: 1px dashed var(--star); border-radius: 12px; padding: 12px 14px; word-break: break-all; }
.switch { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; font: 700 24px/1.3 var(--display); }
.switch span { width: 46px; height: 26px; border-radius: 99px; background: var(--line); position: relative; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch.on span { background: var(--ok); } .switch.on span::after { left: 23px; }
.modal { position: fixed; inset: 0; background: #0009; display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal .panel { width: min(760px, 100%); max-height: 90vh; overflow: auto; }
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 34px; }
.docs nav { display: grid; gap: 6px; align-content: start; position: sticky; top: 16px; font-weight: 600; }
.docs nav a { color: var(--muted); text-decoration: none; } .docs nav .tag { margin-top: 12px; }
.docs section { margin-bottom: 36px; scroll-margin-top: 16px; }
@media (max-width: 760px) { .docs { grid-template-columns: 1fr; } .docs nav { position: static; } }
.mt { margin-top: 14px; }
.wrap > section { margin-bottom: 44px; }
.amount { font-size: 22px; }
.amount small { font-size: 13px; }
.amount { word-break: normal; overflow-wrap: anywhere; }
.amount small { display: block; font-size: 13px; margin-top: 2px; }
