:root{
  --bg:#05060a;
  --panel:#0b0f16;
  --panel2:#070a10;
  --text:#e7e9ee;
  --muted:#9aa3b2;
  --line:#1b2333;
  --accent:#7cffd0;
  --danger:#ff4d6d;
  --warn:#ffcc66;
  --shadow: 0 20px 60px rgba(0,0,0,.55);
  --radius:18px;
}
*{box-sizing:border-box}
body{
  margin:0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 800px at 20% 10%, rgba(124,255,208,.08), transparent 55%),
              radial-gradient(900px 700px at 80% 20%, rgba(255,77,109,.06), transparent 60%),
              linear-gradient(180deg, #04050a, #05060a 30%, #03040a);
  color:var(--text);
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
}
.wrap{width:min(980px, 100%); display:grid; gap:16px;}
.top{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border:1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding:18px 18px 14px;
  position:relative;
  overflow:hidden;
}
.top:before{
  content:"";
  position:absolute; inset:-120px -120px auto auto;
  width:260px; height:260px;
  background: radial-gradient(circle at 30% 30%, rgba(124,255,208,.16), transparent 60%);
  transform: rotate(15deg);
  pointer-events:none;
}
.brand{display:flex; align-items:center; justify-content:space-between; gap:12px;}
.title{display:flex; align-items:center; gap:12px;}
.sigil{
  width:42px; height:42px; border-radius:14px;
  background: linear-gradient(135deg, rgba(124,255,208,.18), rgba(255,77,109,.10));
  border:1px solid rgba(124,255,208,.25);
  box-shadow: 0 0 0 6px rgba(124,255,208,.03);
  display:grid; place-items:center;
  font-weight:900; letter-spacing:.8px;
  color:var(--accent);
}
h1{font-size:18px; margin:0; letter-spacing:.6px}
.sub{color:var(--muted); font-size:12.5px; margin-top:2px}
.bal{
  display:flex; align-items:center; gap:10px;
  background: rgba(255,255,255,.02);
  border:1px solid var(--line);
  border-radius: 14px;
  padding:10px 12px;
  min-width:240px;
  justify-content:space-between;
}
.bal .k{color:var(--muted); font-size:12px}
.bal .v{font-weight:800; font-size:16px}
.grid{display:grid; grid-template-columns: 1.25fr .75fr; gap:16px;}
@media (max-width: 860px){ .grid{grid-template-columns:1fr;}}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}
.card h2{margin:0 0 8px; font-size:14px; letter-spacing:.5px}
.muted{color:var(--muted); font-size:12.5px; line-height:1.45}
.row{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}
.btn{
  appearance:none; border:none; cursor:pointer;
  padding:11px 12px;
  border-radius: 14px;
  background: rgba(124,255,208,.10);
  border:1px solid rgba(124,255,208,.25);
  color:var(--text);
  font-weight:700;
  letter-spacing:.2px;
  display:inline-flex; align-items:center; gap:10px;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
  user-select:none;
}
.btn:hover{background: rgba(124,255,208,.14); border-color: rgba(124,255,208,.35)}
.btn:active{transform: translateY(1px)}
.btn:disabled{opacity:.55; cursor:not-allowed}
.btn.secondary{background: rgba(255,255,255,.02); border:1px solid var(--line); color: var(--text);}
.btn.danger{background: rgba(255,77,109,.10); border:1px solid rgba(255,77,109,.30);}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  color:var(--muted);
  font-size:12px;
  margin-top:10px;
}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;}
.list{display:grid; gap:10px; margin-top:12px}
.link{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  text-decoration:none; color:var(--text);
}
.link small{color:var(--muted)}
.right{display:flex; gap:8px; align-items:center}
.tag{
  font-size:11px; color:var(--muted);
  border:1px solid var(--line);
  padding:4px 8px; border-radius: 999px;
  background: rgba(0,0,0,.15);
}
.status{
  margin-top:10px;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  color:var(--muted);
  font-size:12.5px;
  min-height:42px;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.status strong{color:var(--text)}
.bar{
  height:8px; width:190px; border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  overflow:hidden;
}
.fill{height:100%; width:0%; background: rgba(124,255,208,.35)}
footer{color:var(--muted); font-size:11.5px; text-align:center; padding:8px 4px}
.note{color:var(--muted); font-size:11.5px; margin-top:10px}

/* --------------------
   Forge Prep Overlay
-------------------- */
#prepOverlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index:9999;
  display:grid;
  place-items:center;
  padding:18px;
}
.prepBox{
  width:min(520px, 100%);
  border-radius: 20px;
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  box-shadow: 0 30px 90px rgba(0,0,0,.65);
  padding:16px;
}
.prepTitle{
  font-weight:900;
  letter-spacing:.4px;
  margin-bottom:6px;
}
.prepSub{
  color:var(--muted);
  font-size:13px;
  margin-bottom:12px;
}
.prepBar{
  height:10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  overflow:hidden;
}
.prepFill{
  height:100%;
  width:0%;
  background: rgba(124,255,208,.35);
}
.prepActions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:14px;
  flex-wrap:wrap;
}
.prepHint{
  margin-top:10px;
  font-size:11.5px;
  color:var(--muted);
}
/* ===== Forge Preparation Overlay ===== */

.prep {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.prep.hidden {
  display: none;
}

.prep-box {
  background: #0e141b;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 30px 50px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}

.prep-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.prep-time {
  font-size: 48px;
  font-weight: 800;
  color: #4cffc1;
  margin: 10px 0;
}

.prep-sub {
  opacity: 0.6;
  font-size: 14px;
}
