:root{
  --bg0:#05070a;
  --glass: rgba(12,18,26,.55);
  --glass2: rgba(12,18,26,.72);
  --stroke: rgba(140,255,210,.18);
  --stroke2: rgba(160,210,255,.18);
  --txt: #eaf3ff;
  --muted: rgba(234,243,255,.72);
  --acc: #8dffd6;
  --acc2:#8dbbff;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: radial-gradient(1200px 700px at 50% 20%, rgba(141,255,214,.06), transparent 60%),
              radial-gradient(900px 600px at 20% 80%, rgba(141,187,255,.05), transparent 60%),
              var(--bg0);
  color:var(--txt);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  overflow:hidden;
  touch-action:none;
}
canvas{display:block; width:100vw; height:100vh;}

.hud{
  position:fixed; left:12px; top:12px; z-index:10;
  display:flex; gap:10px; flex-wrap:wrap;
  pointer-events:none;
}
.chip{
  display:flex; align-items:baseline; gap:8px;
  padding:9px 12px;
  border-radius:999px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
.chip span{font-size:12px; color:var(--muted)}
.chip b{font-weight:900; font-size:15px}
.chip i{font-style:normal; color:rgba(234,243,255,.45); font-size:12px}

.overlay{
  position:fixed; inset:0; z-index:30;
  display:flex; align-items:center; justify-content:center;
  padding:16px;
  background:
    radial-gradient(800px 600px at 50% 35%, rgba(141,255,214,.12), transparent 60%),
    radial-gradient(900px 700px at 30% 70%, rgba(141,187,255,.10), transparent 60%),
    rgba(0,0,0,.65);
}
.overlay.hidden{display:none}

.modal{
  width:min(560px, 92vw);
  border-radius:22px;
  background: linear-gradient(180deg, rgba(18,26,38,.78), rgba(10,14,20,.78));
  border:1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 90px rgba(0,0,0,.65);
  padding:16px;
}
.brand{display:flex; gap:12px; align-items:center; margin-bottom:10px;}
.logo{
  width:44px; height:44px; border-radius:14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(141,255,214,.85), rgba(141,187,255,.25) 55%, rgba(0,0,0,0) 70%),
    rgba(255,255,255,.08);
  border:1px solid rgba(141,255,214,.35);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.title{font-weight:950; font-size:20px; letter-spacing:.2px}
.sub{font-size:12px; color:rgba(234,243,255,.60); margin-top:2px}
.text{
  margin-top:12px;
  padding:12px;
  border-radius:16px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color:rgba(234,243,255,.86);
  line-height:1.45;
}
.buttons{display:flex; gap:10px; margin-top:12px;}
.btn{
  flex:1;
  border-radius:16px;
  padding:12px 12px;
  font-weight:900;
  color:var(--txt);
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
}
.btn.primary{
  background: linear-gradient(135deg, rgba(141,255,214,.26), rgba(141,187,255,.22));
  border:1px solid rgba(141,255,214,.38);
}
.hint{
  margin-top:10px;
  font-size:12px;
  color:rgba(234,243,255,.55);
  padding:0 2px;
}

.mobile{
  position:fixed; inset:0; z-index:20;
  pointer-events:none;
}
.joy{
  position:absolute; left:16px; bottom:18px;
  width:132px; height:132px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(141,255,214,.18);
  backdrop-filter: blur(12px);
  pointer-events:auto;
  touch-action:none;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.joyRing{
  position:absolute; inset:10px;
  border-radius:999px;
  border:1px dashed rgba(141,255,214,.22);
  opacity:.7;
}
.joyKnob{
  position:absolute; left:50%; top:50%;
  width:60px; height:60px; border-radius:999px;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle at 30% 30%, rgba(141,255,214,.35), rgba(141,187,255,.18));
  border:1px solid rgba(141,255,214,.32);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.mBtns{
  position:absolute; right:16px; bottom:18px;
  display:flex; flex-direction:column; gap:10px;
  pointer-events:auto;
}
.mBtn{
  width:148px; height:56px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:var(--txt);
  font-weight:950;
  letter-spacing:.2px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.mBtn.primary{
  background: linear-gradient(135deg, rgba(141,255,214,.22), rgba(141,187,255,.16));
  border:1px solid rgba(141,255,214,.30);
}
.mBtn.ghost{
  border:1px solid rgba(141,187,255,.22);
}

@media (pointer:fine){
  .mobile{opacity:.95}
}
