:root{
  --bg:#0b1220; --card:#0f172a; --text:#e5e7eb; --muted:#94a3b8; --border:#1e293b;
  --primary:#4e067f; --primary-600:#3c0563; --accent:#4CAF50;
}
:root.light{
  --bg:#f7fafc; --card:#ffffff; --text:#0f172a; --muted:#475569; --border:#e2e8f0;
  --primary:#4e067f; --primary-600:#3c0563; --accent:#22a35a;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;}
.container{max-width:920px;margin:0 auto;padding:16px;}
.site-header{position:sticky;top:0;z-index:10;border-bottom:1px solid var(--border);
  background:linear-gradient(180deg, rgba(78,6,127,.12), rgba(78,6,127,0));backdrop-filter:blur(6px) saturate(120%);}
.header-inner{display:flex;align-items:center;justify-content:space-between;}
h1{font-size:clamp(22px,2.8vw,32px);margin:8px 0;color:#fff;text-shadow:0 6px 26px rgba(0,0,0,.35)}
h2{font-size:clamp(18px,2.2vw,24px);margin:0 0 10px 0;}

.card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:16px;margin:16px 0;box-shadow:0 6px 20px rgba(0,0,0,.08);}
.muted{color:var(--muted);} .small{font-size:12px;}
.grid.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:720px){.grid.two{grid-template-columns:1fr}}
.form-group label{display:block;font-weight:600;margin-bottom:6px;}
.hstack{display:flex;gap:10px;align-items:center;}
.btn-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px;}

input,select,button{font:inherit}
input[type="text"], input[type="number"], input[type="range"]{
  width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--card);color:var(--text);
}
input[type="range"]{flex:1}
input:focus{outline:3px solid rgba(78,6,127,.35);outline-offset:2px;}
button{cursor:pointer;border-radius:10px;border:1px solid var(--border);padding:10px 14px;background:var(--card);color:var(--text);min-height:44px;}
button.primary{background:linear-gradient(90deg,var(--primary),var(--primary-600));color:#fff;border:none;}
button.ghost{background:transparent;border-color:var(--border);}
button:disabled{opacity:.55;cursor:not-allowed;}
.header-actions .ghost{width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--border);}

.checks{display:flex;flex-wrap:wrap;gap:8px}
.check-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;border:2px solid var(--accent);color:var(--accent);background:#fff0;transition:all .2s}
:root.light .check-btn{background:#fff}
.check-btn.active{background:var(--accent);color:#fff}
.check-btn:focus{outline:3px solid rgba(76,175,80,.4);outline-offset:2px}
.inline{display:flex;align-items:center;gap:8px;margin-left:6px}
.inline input{width:auto}

.result-box{display:flex;flex-direction:column;gap:10px}
.output{width:100%;font-size:18px;padding:12px;border:1px solid var(--border);border-radius:10px;background:rgba(2,6,23,.25);color:var(--text);text-align:center}
.meter{height:10px;background:rgba(255,255,255,.08);border:1px solid var(--border);border-radius:999px}
.meter .bar{height:100%;width:0%;border-radius:999px;background:linear-gradient(90deg,#ef4444,#f59e0b,#eab308,#22c55e,#16a34a)}

.tips ul{margin:0;padding-left:18px}
