:root{
  --bg:#070a12;
  --card: rgba(255,255,255,.08);
  --card2: rgba(255,255,255,.12);
  --text:#e8eefc;
  --muted:#a8b3cf;
  --line: rgba(255,255,255,.14);
  --brand:#38bdf8;
  --good:#22c55e;
  --bad:#ef4444;
  --r:16px;
}

*{box-sizing:border-box}
html,body{height:100%; margin:0; background:var(--bg); color:var(--text); font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial}
#app{position:fixed; inset:0}
#c{width:100%; height:100%; display:block; outline:none}

.hud{
  position:fixed; left:12px; right:12px; top:12px;
  display:flex; justify-content:space-between; gap:12px;
  pointer-events:none;
}
.hud-left{display:flex; gap:10px; flex-wrap:wrap}
.badge{
  pointer-events:none;
  display:flex; align-items:center; gap:8px;
  padding:10px 12px; border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
  border-radius:999px; backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.hud-right{pointer-events:auto}
.btn{
  appearance:none; border:1px solid var(--line); color:var(--text);
  background:linear-gradient(180deg, rgba(56,189,248,.28), rgba(56,189,248,.10));
  padding:10px 14px; border-radius:12px; cursor:pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.btn:hover{filter:brightness(1.08)}
.power[disabled]{opacity:.45; cursor:not-allowed}
.power{font-weight:800; letter-spacing:.6px}

.checklist{
  position:fixed; left:12px; bottom:12px;
  width:min(520px, calc(100% - 24px));
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  border-radius: var(--r);
  backdrop-filter: blur(8px);
  padding:10px;
  box-shadow: 0 18px 45px rgba(0,0,0,.38);
}
.check-item{
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 10px; border-radius:12px;
  border:1px dashed rgba(255,255,255,.10);
  margin:6px 0;
}
.check-item.done{border-style:solid; border-color: rgba(34,197,94,.45)}
.check-item b{font-size:14px}
.check-item span{color:var(--muted); font-size:12px}

.ctx{
  position:fixed;
  min-width: 320px;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  border-radius: var(--r);
  padding:10px;
  box-shadow: 0 18px 55px rgba(0,0,0,.42);
  backdrop-filter: blur(10px);
  display:none;
  z-index: 20;
}
.ctx-title{font-weight:800; margin-bottom:8px}
.ctx-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:8px;
}
.ctx-card{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.22);
  border-radius: 14px;
  padding:10px;
  cursor:pointer;
  user-select:none;
}
.ctx-card:hover{border-color: rgba(56,189,248,.55)}
.ctx-card .t{font-weight:700; font-size:13px}
.ctx-card .s{color:var(--muted); font-size:12px; margin-top:2px}
.ctx-tip{color:var(--muted); font-size:12px; margin-top:8px}

.modal{
  position:fixed; inset:0; display:none;
  align-items:center; justify-content:center;
  background: rgba(0,0,0,.55);
  z-index: 30;
}
.modal-card{
  width:min(560px, calc(100% - 28px));
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  border-radius: 22px;
  padding:14px;
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 65px rgba(0,0,0,.55);
}
.modal-h{display:flex; align-items:center; justify-content:space-between}
.modal-title{font-weight:900}
.modal-timer{color:var(--muted)}
.modal-q{margin:10px 0 12px; font-size:16px; font-weight:700}
.modal-opts{display:grid; gap:8px}
.opt{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.25);
  border-radius: 14px;
  padding:10px;
  cursor:pointer;
}
.opt:hover{border-color: rgba(56,189,248,.55)}
.opt.good{border-color: rgba(34,197,94,.65)}
.opt.bad{border-color: rgba(239,68,68,.65)}
.modal-note{margin-top:10px; color:var(--muted); font-size:12px}

.boot{
  position:fixed; inset:0; display:none;
  align-items:center; justify-content:center;
  background: radial-gradient(1200px 800px at 50% 50%, rgba(56,189,248,.10), rgba(0,0,0,.92));
  z-index: 40;
}
.boot-inner{text-align:center}
.boot-logo{font-size:44px; font-weight:900; letter-spacing:.5px}
.boot-spin{
  width:44px; height:44px; border-radius:50%;
  border:3px solid rgba(255,255,255,.15);
  border-top-color: rgba(56,189,248,.9);
  margin:18px auto 10px;
  animation: spin 1s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
.boot-text{color:var(--muted)}

.gate{
  position:fixed; inset:0; display:flex; align-items:center; justify-content:center;
  background: radial-gradient(900px 600px at 50% 30%, rgba(56,189,248,.12), rgba(0,0,0,.80));
  z-index: 50;
}
.gate-card{
  width:min(560px, calc(100% - 28px));
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.05));
  border-radius: 24px;
  padding:16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 65px rgba(0,0,0,.55);
}
.gate-card h1{margin:0 0 6px}
.gate-card p{margin:0 0 12px; color:var(--muted)}
.gate-row{display:flex; gap:10px; margin:10px 0}
.gate-row input{
  flex:1; padding:10px 12px; border-radius: 14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.25); color:var(--text);
  outline:none;
}