* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin:0; font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
       background:#0f1320; color:#e8ecf4; font-size:15px; line-height:1.6; }
#app { max-width:480px; margin:0 auto; min-height:100vh; padding:0 0 30px; position:relative; }
.screen { display:none; padding:20px 18px; }
.screen.active { display:block; }
h1 { font-size:21px; margin:6px 0 4px; color:#fff; }
h2 { font-size:17px; margin:14px 0 8px; color:#ffd479; }
.sub { color:#9aa6bd; font-size:13px; margin-bottom:14px; }
.card { background:#171c2e; border:1px solid #232b44; border-radius:14px; padding:16px; margin:12px 0; }
.btn { display:block; width:100%; padding:14px; border:0; border-radius:12px; font-size:16px;
       font-weight:600; cursor:pointer; margin-top:10px; }
.btn-primary { background:linear-gradient(135deg,#ff7a59,#ff4d6d); color:#fff; }
.btn-ghost { background:#222a42; color:#cdd6ea; }
.btn:disabled { opacity:.45; cursor:not-allowed; }
label.field { display:block; margin:10px 0; }
label.field span { display:block; color:#9aa6bd; font-size:13px; margin-bottom:4px; }
input,select { width:100%; padding:11px; border-radius:10px; border:1px solid #2c3550;
               background:#0f1424; color:#e8ecf4; font-size:15px; }
.q { background:#171c2e; border:1px solid #232b44; border-radius:12px; padding:13px; margin:10px 0; }
.q .t { font-size:14px; margin-bottom:8px; }
.opts { display:flex; gap:6px; }
.opts button { flex:1; padding:9px 4px; border-radius:9px; border:1px solid #2c3550;
               background:#0f1424; color:#cdd6ea; font-size:13px; cursor:pointer; }
.opts button.on { background:#ff7a59; color:#fff; border-color:#ff7a59; font-weight:600; }
.scale { display:flex; justify-content:space-between; font-size:11px; color:#7e8aa6; margin-top:4px; }
#taskArea, #taskArea2, #taskArea3, #taskArea4, #taskArea5, #taskArea6 {
  position:relative; height:340px; background:#0b0f1c; border-radius:14px;
  overflow:hidden; display:flex; align-items:center; justify-content:center; flex-direction:column; }
#stim, #stim2, #stim3, #stim4, #stim5, #stim6 { font-size:64px; font-weight:800; color:#fff; user-select:none; }
.hud { position:absolute; top:10px; left:10px; right:10px; display:flex; justify-content:space-between;
       font-size:12px; color:#9aa6bd; }
.countdown { font-size:48px; color:#ffd479; font-weight:700; }
.pill { display:inline-block; padding:3px 9px; border-radius:20px; font-size:12px; background:#222a42; color:#cdd6ea; margin:3px; }
.report-dim { margin:8px 0; }
.bar { height:9px; background:#222a42; border-radius:6px; overflow:hidden; margin-top:4px; }
.bar > i { display:block; height:100%; border-radius:6px; }
.legend { font-size:12px; color:#9aa6bd; }
.disclaimer { font-size:12px; color:#8d98b3; background:#131829; border-left:3px solid #ff7a59;
              padding:10px 12px; border-radius:8px; margin-top:12px; }
.risk-badge { display:inline-block; padding:6px 16px; border-radius:24px; font-weight:700; font-size:16px; }
svg { display:block; margin:0 auto; }
.row { display:flex; gap:8px; }
.row > * { flex:1; }
.muted { color:#9aa6bd; font-size:12px; }
.toast { position:fixed; left:50%; transform:translateX(-50%); bottom:30px; background:#000a;
         color:#fff; padding:10px 18px; border-radius:20px; font-size:13px; z-index:99; }
#camPreview { position:fixed; right:10px; bottom:10px; width:120px; height:90px;
              border-radius:10px; border:2px solid #ff7a59; object-fit:cover; z-index:80;
              transform:scaleX(-1); }

/* ---- 图形化 Go/No-Go ---- */
.stim-go, .stim-nogo { display:flex; flex-direction:column; align-items:center; gap:6px; }
.stim-go .glyph { font-size:120px; line-height:1; filter:drop-shadow(0 0 18px rgba(94,224,138,.5)); }
.stim-nogo .glyph { font-size:120px; line-height:1; filter:drop-shadow(0 0 18px rgba(255,107,107,.5)); }
.stim-go .cap, .stim-nogo .cap { font-size:18px; font-weight:700; }
.stim-go .cap { color:#5ee08a; }
.stim-nogo .cap { color:#ff6b6b; }
.glyph.done, #stim2.done { font-size:80px; color:#5ee08a; }
.glyph.big { font-size:120px; }
.stim-go { animation:pop .15s ease; }
.stim-nogo { animation:pop .15s ease; }
@keyframes pop { from { transform:scale(.7); opacity:.4; } to { transform:scale(1); opacity:1; } }

/* ---- Stroop 颜色按钮 ---- */
.choice-row { display:flex; gap:8px; width:100%; padding:0 16px; margin-top:14px; }
.choice-row button { flex:1; padding:14px 0; border:0; border-radius:12px; font-size:18px; font-weight:700; cursor:pointer; }
.color-btn { color:#10131f !important; }

/* ---- 时间估计 / 延迟 ---- */
.timebar { width:80%; height:26px; background:#222a42; border-radius:14px; overflow:hidden; }
.timebar > i { display:block; height:100%; background:linear-gradient(90deg,#ffd479,#ff7a59); width:0; }
.balloon { font-size:90px; line-height:1; transition:transform .03s linear; }
.balloon.burst { font-size:80px; }
#delayStart { touch-action:none; user-select:none; -webkit-user-select:none; }

/* ---- 八维条形（继承 .bar） ---- */
.report-dim .row span:first-child { font-size:14px; color:#e8ecf4; }

/* ---- 12 指标明细 ---- */
.ind { padding:10px 0; border-bottom:1px solid #232b44; }
.ind:last-child { border-bottom:0; }
.ind .row span:first-child { font-size:14px; }
.ibar { height:7px; background:#222a42; border-radius:5px; overflow:hidden; margin-top:6px; }
.ibar > i { display:block; height:100%; border-radius:5px; }

/* ---- 脑力萌入口 ---- */
.nlm-entry { display:flex; align-items:center; gap:14px; cursor:pointer; border:1px solid #2c3550; }
.nlm-logo { flex:0 0 56px; width:56px; height:56px; }
.nlm-txt { flex:1; }
.nlm-txt .muted { font-size:12px; margin-top:2px; }
.nlm-logo-img { display:block; border-radius:16px; }
.nlm-more { flex:0 0 auto; align-self:center; font-size:12px; color:#9aa6bd; border:1px solid #2c3550; border-radius:999px; padding:5px 10px; white-space:nowrap; }
.nlm-more:active { background:#20263d; }
.qr-wrap { width:220px; height:220px; margin:12px auto 6px; background:#fff; border-radius:14px; padding:8px; box-sizing:content-box; }
.qr-wrap img { width:100%; height:100%; display:block; border-radius:8px; }

/* ---- 弹窗 ---- */
.modal { position:fixed; inset:0; background:#000a; display:flex; align-items:center; justify-content:center; z-index:120; padding:24px; }
.modal-box { position:relative; background:#171c2e; border:1px solid #2c3550; border-radius:16px; padding:22px; max-width:340px; text-align:center; }
.modal-close { position:absolute; top:10px; right:14px; font-size:18px; color:#9aa6bd; cursor:pointer; }
#nlmModalLogo { display:inline-block; }
