:root{
  --bg:#0f1114;
  --panel:#151a20;
  --panel2:#101419;
  --text:#e9eef3;
  --muted:#a9b4bf;
  --accent:#f4b000;
  --good:#34c759;
  --warn:#ffcc00;
  --bad:#ff3b30;
  --border:#262c35;
  --shadow: 0 10px 30px rgba(0,0,0,0.45);
  --radius: 16px;
  --btnh: 56px;
  --font: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  background: radial-gradient(1200px 500px at 50% -10%, #1b2330 0%, var(--bg) 55%) fixed;
  color:var(--text);
}

.topbar{
  position:sticky; top:0;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  background: linear-gradient(180deg, rgba(15,17,20,0.98) 0%, rgba(15,17,20,0.65) 100%);
  backdrop-filter: blur(8px);
  border-bottom:1px solid var(--border);
  z-index:10;
}
.brand-title{font-weight:900; letter-spacing:1.2px; font-size:15px}
.brand-sub{font-size:12px; color:var(--muted)}
.iconbtn{
  background:transparent; border:1px solid var(--border);
  color:var(--text);
  border-radius:12px;
  height:40px; width:48px;
  font-size:18px;
}

.container{max-width:980px; margin:0 auto; padding:16px}
.screen{display:block}
.hidden{display:none}

.card{
  background: linear-gradient(180deg, rgba(21,26,32,0.9), rgba(16,20,25,0.92));
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
  margin-bottom:14px;
}

h1{margin:0 0 10px 0; font-size:22px}
h2{margin:0 0 10px 0; font-size:18px}
h3{margin:14px 0 8px 0; font-size:15px; color:var(--accent); letter-spacing:0.4px}

.muted{color:var(--muted); line-height:1.35}
.pill-row{display:flex; gap:8px; flex-wrap:wrap; margin:12px 0}
.pill{
  font-size:12px;
  border:1px solid var(--border);
  border-radius:999px;
  padding:6px 10px;
  background:rgba(0,0,0,0.15);
}

.btnrow{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}
button{
  font-family:var(--font);
  cursor:pointer;
}
.primary,.secondary,.ghost{
  height:var(--btnh);
  border-radius:14px;
  padding:0 14px;
  font-weight:800;
  letter-spacing:0.6px;
  border:1px solid var(--border);
}
.primary{
  background: linear-gradient(180deg, #f7c22f, #d79a00);
  color:#151515;
}
.secondary{
  background: linear-gradient(180deg, #1d2633, #141b24);
  color:var(--text);
}
.ghost{
  background: transparent;
  color:var(--text);
}

.steps{padding-left:18px; margin:8px 0 0 0}
.steps li{margin:6px 0}

.drill-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  margin:6px 2px 10px 2px;
}
.drill-title{font-weight:900; letter-spacing:0.8px}
.gauges{
  display:grid;
  gap:12px;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items:stretch;
}
@media (max-width: 860px){
  .gauges{grid-template-columns: 1fr}
  .gaugebox.center canvas{width:100%; height:auto}
}

.gaugebox{
  background: linear-gradient(180deg, rgba(21,26,32,0.85), rgba(12,15,19,0.9));
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:12px;
  text-align:center;
  box-shadow: var(--shadow);
}
.label{
  font-size:12px; color:var(--muted);
  letter-spacing:1px;
  font-weight:900;
  margin-bottom:6px;
}
.value{
  font-weight:900;
  font-size:18px;
  margin-top:4px;
}
.value.big{font-size:24px}

.prompt{
  margin:12px 0;
  padding:14px;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background: rgba(0,0,0,0.25);
  font-weight:800;
  letter-spacing:0.4px;
}

.answers{
  display:grid;
  gap:10px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 520px){
  .answers{grid-template-columns:1fr}
}
.answer{
  height:64px;
  border-radius:16px;
  border:1px solid var(--border);
  background: linear-gradient(180deg, #1e2734, #121820);
  color:var(--text);
  font-weight:900;
  letter-spacing:0.8px;
  font-size:14px;
}
.answer:active{transform: translateY(1px)}

.feedback{
  margin-top:12px;
  padding:12px;
  border-radius:var(--radius);
  border:1px solid var(--border);
  font-weight:900;
}
.feedback.good{border-color: rgba(52,199,89,0.6); background: rgba(52,199,89,0.12)}
.feedback.bad{border-color: rgba(255,59,48,0.6); background: rgba(255,59,48,0.12)}
.final-score{
  font-size:38px;
  font-weight:1000;
  letter-spacing:1px;
  margin:10px 0;
}
