:root{
  --bg:#0b1220; --card:#111a2e; --muted:#8ea0c9; --text:#e8eeff;
  --accent:#7aa2ff; --accent2:#7dffbf; --danger:#ff6b6b; --warn:#ffd166; --line:rgba(255,255,255,.10);
  --shadow: 0 16px 50px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "PingFang SC","Microsoft Yahei", Arial;
  background:
    radial-gradient(900px 520px at 10% 0%, rgba(122,162,255,.22), transparent 60%),
    radial-gradient(900px 520px at 90% 0%, rgba(125,255,191,.16), transparent 60%),
    var(--bg);
  color:var(--text);
  -webkit-tap-highlight-color: transparent;
}
a{color:inherit}
header{
  position:sticky; top:0; z-index:10;
  padding:14px 14px 10px;
  background: rgba(11,18,32,.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
h1{margin:0 0 6px; font-size:18px}
.sub{color:var(--muted); font-size:12px; line-height:1.5}
.container{max-width:860px; margin:0 auto; padding:12px 14px 88px;}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow: var(--shadow);
  padding:14px;
}
.row{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;}
.pill{
  display:inline-flex; gap:8px; align-items:center;
  padding:6px 10px; border-radius:999px;
  border:1px solid var(--line); color:var(--muted); font-size:12px;
  background: rgba(0,0,0,.10);
}
.pill b{color:var(--text)}
.progress{height:10px; border-radius:999px; background:rgba(255,255,255,.06); overflow:hidden; border:1px solid var(--line);}
.progress>div{height:100%; width:0%; background:linear-gradient(90deg, var(--accent), var(--accent2));}
.main{
  margin-top:10px;
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}
@media(min-width: 900px){
  .main{grid-template-columns: 1.25fr .75fr;}
}
.question{
  min-height: 52vh;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:14px;
}
.qtop{display:flex; gap:10px; align-items:flex-start; justify-content:space-between}
.qno{font-weight:800; font-size:14px; color:var(--accent)}
.qtext{font-size:16px; line-height:1.55; margin:0}
.qmeta{color:var(--muted); font-size:12px; text-align:right}
.scale{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
@media(min-width: 480px){
  .scale{grid-template-columns: repeat(5, 1fr);}
}
.choice{
  border:1px solid var(--line);
  background:rgba(0,0,0,.12);
  border-radius:14px;
  padding:12px 10px;
  text-align:center;
  cursor:pointer;
  user-select:none;
  transition: transform .12s, border-color .12s, background .12s;
  touch-action: manipulation;
}
.choice:active{transform: scale(.98)}
.choice.selected{
  border-color: rgba(122,162,255,.60);
  background: rgba(122,162,255,.14);
}
.choice .lab{font-weight:800; font-size:14px}
.choice .val{color:var(--muted); font-size:12px; margin-top:4px}
.nav{
  display:flex; gap:10px;
}
button{
  appearance:none;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--text);
  padding:12px 12px;
  border-radius:14px;
  font-weight:800;
  cursor:pointer;
  flex:1;
  touch-action: manipulation;
}
button.primary{border-color: rgba(122,162,255,.55); background: rgba(122,162,255,.14);}
button.danger{border-color: rgba(255,107,107,.55); background: rgba(255,107,107,.12);}
button:active{transform: scale(.99)}
.small{color:var(--muted); font-size:12px; line-height:1.5}
.sidebar .box{
  border:1px solid var(--line);
  background: rgba(0,0,0,.10);
  border-radius:16px;
  padding:12px;
  margin-bottom:12px;
}
.kpi{
  display:grid; grid-template-columns: 1fr 1fr; gap:10px;
}
.kpi .val{font-size:18px; font-weight:900; margin-top:4px}
.tag{
  display:inline-block; padding:4px 8px; border-radius:999px; border:1px solid var(--line); font-size:12px;
}
.tag.ok{border-color: rgba(102,255,153,.4); background: rgba(102,255,153,.08);}
.tag.warn{border-color: rgba(255,209,102,.45); background: rgba(255,209,102,.08);}
.tag.bad{border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.08);}
.canvas{
  width:100%; height:220px; border-radius:16px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.10);
}
.stickybar{
  position:fixed; left:0; right:0; bottom:0; z-index:20;
  padding:10px 12px;
  background: rgba(11,18,32,.78);
  backdrop-filter: blur(10px);
  border-top:1px solid var(--line);
}
.stickyinner{max-width:860px; margin:0 auto; display:flex; gap:10px;}
.toast{
  position:fixed; left:50%; bottom:84px; transform: translateX(-50%);
  background: rgba(0,0,0,.65);
  border:1px solid rgba(255,255,255,.12);
  color:var(--text);
  padding:10px 12px;
  border-radius:999px;
  font-size:12px;
  opacity:0; pointer-events:none;
  transition: opacity .18s, transform .18s;
}
.toast.show{opacity:1; transform: translateX(-50%) translateY(-6px);}
details{border:1px solid var(--line); border-radius:16px; padding:10px; background:rgba(0,0,0,.10)}
summary{cursor:pointer; font-weight:900}
