*{box-sizing:border-box}
html,body{margin:0;background:#0f172a;color:#e2e8f0;font-family:-apple-system,"PingFang SC","Noto Sans CJK SC","Microsoft YaHei",sans-serif}
body{max-width:520px;margin:0 auto;padding:0 18px 28px;min-height:100vh}
header{display:flex;align-items:center;justify-content:space-between;padding:18px 2px 10px}
h1{font-size:24px;margin:0;color:#fbbf24}
h2{font-size:18px;margin:6px 0 14px}
.net{font-size:13px;padding:4px 10px;border-radius:99px;background:#14532d;color:#bbf7d0}
.net.off{background:#7c2d12;color:#fed7aa}
nav{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;background:#1e293b;padding:5px;border-radius:14px;margin-bottom:18px}
nav button{border:0;background:transparent;color:#94a3b8;font-size:16px;padding:10px 0;border-radius:10px;font-weight:600}
nav button.on{background:#f59e0b;color:#111827}
.hidden{display:none}
button{font:inherit;cursor:pointer}
.dots{display:flex;justify-content:center;gap:14px;margin:8px 0 18px;min-height:34px}
.dot{width:30px;height:30px;border-radius:50%;background:#334155;transition:transform .06s}
.dot.acc{border:3px solid #fbbf24}
.dot.lit{background:#22c55e;transform:scale(1.25)}
.dot.acc.lit{background:#f59e0b}
.bpmrow{display:flex;align-items:center;justify-content:space-between}
.round{width:64px;height:64px;border-radius:50%;border:0;background:#1e293b;color:#e2e8f0;font-size:34px}
.bpm{text-align:center}
.bpm b{display:block;font-size:84px;line-height:1;color:#f8fafc;font-variant-numeric:tabular-nums}
.bpm small{color:#94a3b8;font-size:15px;letter-spacing:2px}
.bpm em{display:block;font-style:normal;color:#fbbf24;font-size:15px;margin-top:4px}
input[type=range]{width:100%;margin:20px 0;accent-color:#f59e0b;height:28px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}
label{display:flex;flex-direction:column;gap:6px;font-size:14px;color:#94a3b8}
select{font:inherit;font-size:16px;padding:10px;border-radius:10px;border:1px solid #334155;background:#1e293b;color:#e2e8f0}
.chk{flex-direction:row;align-items:center;gap:8px;font-size:15px;color:#cbd5e1}
.chk input{width:20px;height:20px;accent-color:#f59e0b}
.go,.ghost{width:100%;padding:16px 0;border-radius:14px;font-size:18px;font-weight:700;border:0}
.go{background:#f59e0b;color:#111827}
.go.stop{background:#ef4444;color:#fff}
.ghost{background:#1e293b;color:#e2e8f0;border:1px solid #334155}
.hint{color:#94a3b8;font-size:14px;line-height:1.6;margin:14px 0 0}
.strings{display:flex;gap:8px;justify-content:center;margin:6px 0 14px;flex-wrap:wrap}
.strings span{min-width:46px;text-align:center;padding:8px 6px;border-radius:10px;background:#1e293b;color:#94a3b8;font-weight:700}
.strings span.near{background:#f59e0b;color:#111827}
.strings span.ok{background:#22c55e;color:#052e16}
.dial{background:#111c33;border:1px solid #1e293b;border-radius:18px;padding:18px 16px 16px;margin-bottom:16px;text-align:center}
.scale{display:flex;justify-content:space-between;color:#64748b;font-size:12px}
.track{position:relative;height:40px;margin:6px 0 10px;background:linear-gradient(90deg,#7f1d1d,#334155 40%,#14532d 47%,#14532d 53%,#334155 60%,#7f1d1d);border-radius:8px}
.mid{position:absolute;left:50%;top:-4px;bottom:-4px;width:2px;background:#e2e8f0}
.needle{position:absolute;left:50%;top:-8px;width:6px;height:56px;margin-left:-3px;border-radius:3px;background:#fbbf24;transition:left .12s}
.needle.ok{background:#22c55e}
.note b{font-size:96px;line-height:1;color:#f8fafc}
.note sub{font-size:28px;color:#94a3b8}
.note.ok b{color:#4ade80}
.hz{font-size:20px;color:#cbd5e1;font-variant-numeric:tabular-nums;margin-top:4px}
.advice{font-size:18px;margin-top:10px;color:#fbbf24;min-height:28px}
.advice.ok{color:#4ade80}
.bars{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;align-items:end;height:200px;background:#111c33;border-radius:14px;padding:14px 10px 8px}
.bar{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;font-size:12px;color:#94a3b8;gap:4px}
.bar i{display:block;width:70%;background:#f59e0b;border-radius:6px 6px 0 0;min-height:2px}
.bar b{color:#e2e8f0;font-size:12px}
footer{margin-top:22px;text-align:center;color:#64748b;font-size:13px}
/* 电脑 / 平板横屏：左右两栏，大字 */
@media (min-width:900px){
  body{max-width:1200px;padding:0 36px 24px}
  h1{font-size:30px}
  .pane:not(.hidden){display:grid;grid-template-columns:1.1fr 1fr;column-gap:56px;grid-auto-flow:row dense;align-items:start}
  #metro>.dots,#metro>.bpmrow,#metro>input{grid-column:1}
  #metro>.grid2,#metro>.chk,#metro>.hint{grid-column:2}
  #tuner>.dial,#tuner>#strings{grid-column:1}
  #tuner>.grid2,#tuner>#mic,#tuner>.hint{grid-column:2}
  #log>.bars{grid-column:1;grid-row:1 / span 4;height:300px}
  #log>h2,#log>.hint,#log>#clear{grid-column:2}
  .bpm b{font-size:120px}
  .dot{width:44px;height:44px}
  nav{max-width:600px}
}
