:root{
  --bg:#060914;
  --bg2:#0b1020;
  --panel:rgba(12,17,32,.74);
  --line:#24304f;
  --text:#edf2ff;
  --muted:#8da0cf;
  --blue:#67c2ff;
  --red:#ff5f76;
  --white:#ffffff;
  --chip:#10172b;
  --chipBorder:#2a3557;
}
*{box-sizing:border-box}
html,body{
  margin:0;
  width:100%;
  height:100%;
  background:
    radial-gradient(circle at 30% 20%, rgba(74,104,190,.12), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(255,95,118,.08), transparent 24%),
    linear-gradient(180deg,var(--bg),var(--bg2));
  color:var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow:hidden;
}
#app{
  display:grid;
  grid-template-columns: 1fr 348px;
  gap:16px;
  width:100%;
  height:100%;
  padding:16px;
}
#stageWrap{
  position:relative;
  border:1px solid rgba(82,101,154,.28);
  border-radius:24px;
  background:linear-gradient(180deg, rgba(8,11,22,.82), rgba(10,15,29,.94));
  overflow:hidden;
  box-shadow:0 10px 40px rgba(0,0,0,.28), inset 0 0 80px rgba(54,84,160,.08);
}
#titleBlock{
  position:absolute;
  left:24px;
  top:22px;
  z-index:10;
  pointer-events:none;
}
#titleBlock h1{
  margin:0;
  font-size:30px;
  line-height:1;
  letter-spacing:.02em;
  font-weight:800;
}
#titleBlock p{
  margin:8px 0 0;
  color:var(--muted);
  font-size:14px;
}
#legend{
  position:absolute;
  left:24px;
  top:84px;
  z-index:10;
  display:flex;
  gap:14px;
  color:var(--muted);
  font-size:13px;
  pointer-events:none;
  flex-wrap:wrap;
  max-width:560px;
}
.leg{
  display:flex;
  align-items:center;
  gap:8px;
}
.dot{
  width:10px;height:10px;border-radius:999px;
}
.blue{background:var(--blue); box-shadow:0 0 16px rgba(103,194,255,.5)}
.red{background:var(--red); box-shadow:0 0 16px rgba(255,95,118,.5)}
.white{background:var(--white)}
#nowHearing{
  position:absolute;
  right:24px;
  top:24px;
  z-index:10;
  width:260px;
  padding:10px 14px;
  border-radius:999px;
  font-size:12px;
  letter-spacing:.08em;
  color:#f6f8ff;
  text-align:left;
  background:rgba(16,23,43,.78);
  border:1px solid rgba(82,101,154,.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:0 0 24px rgba(0,0,0,.16);
}
#panel{
  border:1px solid rgba(82,101,154,.28);
  border-radius:24px;
  background:var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding:16px;
  overflow:auto;
  box-shadow:0 10px 40px rgba(0,0,0,.24);
}
#panel h2{
  margin:2px 0 4px;
  font-size:22px;
}
#panel .sub{
  margin:0 0 14px;
  color:var(--muted);
  font-size:12px;
}
.stack{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.row{
  display:flex;
  flex-direction:column;
  gap:6px;
}
label{
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:13px;
  color:#dfe6ff;
}
.value{
  color:var(--muted);
  font-variant-numeric: tabular-nums;
}
select,input[type="range"]{
  width:100%;
}
select{
  appearance:none;
  border:none;
  outline:none;
  border-radius:12px;
  padding:11px 12px;
  color:var(--text);
  background:#11182b;
  border:1px solid #2a3557;
  font-size:14px;
}
input[type="range"]{
  appearance:none;
  height:6px;
  border-radius:999px;
  background:#1f2a44;
  outline:none;
}
input[type="range"]::-webkit-slider-thumb{
  appearance:none;
  width:17px;height:17px;border-radius:50%;
  background:var(--red);
  border:2px solid #fff;
  box-shadow:0 0 16px rgba(255,95,118,.45);
  cursor:pointer;
}
.btnRow{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
button{
  border:none;
  outline:none;
  border-radius:14px;
  padding:11px 12px;
  font-size:14px;
  color:#fff;
  background:#1e2843;
  cursor:pointer;
  transition:transform .08s ease, background .16s ease;
}
button:hover{background:#273456}
button:active{transform:translateY(1px)}
.primary{
  background:linear-gradient(180deg, #ff6e81, #ff5f76);
  box-shadow:0 8px 20px rgba(255,95,118,.28);
}
.primary:hover{background:linear-gradient(180deg, #ff7e8f, #ff647b)}
.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.chip{
  padding:8px 11px;
  border-radius:999px;
  border:1px solid var(--chipBorder);
  background:var(--chip);
  color:#dfe6ff;
  font-size:12px;
  cursor:pointer;
  user-select:none;
  line-height:1;
}
.chip.active{
  border-color:rgba(255,95,118,.55);
  background:rgba(255,95,118,.14);
  box-shadow:0 0 20px rgba(255,95,118,.14);
}
.tiny{
  font-size:12px;
  color:var(--muted);
  line-height:1.55;
}
.status{
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
  white-space:pre-line;
  border-top:1px solid rgba(60,78,122,.35);
  padding-top:12px;
  margin-top:2px;
}
.divider{
  height:1px;
  background:rgba(60,78,122,.35);
  margin:2px 0;
}
.panelBlock{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.panelTitle{
  color:#ffd7de;
  font-size:13px;
  letter-spacing:.02em;
}
.metricGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.metricCard{
  padding:10px;
  border-radius:14px;
  background:rgba(14,21,39,.72);
  border:1px solid rgba(60,78,122,.35);
  min-height:68px;
}
.metricName{
  color:var(--muted);
  font-size:11px;
  margin-bottom:10px;
}
.metricValue{
  color:#f2f6ff;
  font-size:15px;
  line-height:1.25;
}
.smallMetric{
  font-size:12px;
}
canvas{
  display:block;
  width:100% !important;
  height:100% !important;
}
@media (max-width: 1100px){
  #app{
    grid-template-columns: 1fr;
  }
  #panel{
    height:42vh;
  }
}


.socialCard{
  text-decoration:none;
  cursor:pointer;
  transition:transform .12s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.socialCard:hover{
  transform:translateY(-1px);
  border-color:rgba(255,95,118,.45);
  background:rgba(20,28,50,.9);
  box-shadow:0 0 20px rgba(255,95,118,.10);
}
.socialCard .metricValue{
  color:#dfe6ff;
}

#statusText{display:none !important;}


.panelSection{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:14px;
  border:1px solid rgba(60,78,122,.35);
  border-radius:18px;
  background:rgba(12,18,35,.42);
}

.panelHero{
  gap:14px;
}

.panelPlayback{
  gap:14px;
}

.panelTiming{
  gap:14px;
}

.panelFollow{
  gap:10px;
}

.sectionHead{
  color:#ffd7de;
  font-size:13px;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.softDivider{
  height:1px;
  background:rgba(60,78,122,.28);
  margin:2px 0;
}

.heroButtons{
  grid-template-columns:1.15fr .85fr;
}

#panel .sub{
  margin:0 0 16px;
}

.metricGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.metricCard{
  padding:12px;
  border-radius:16px;
  background:rgba(14,21,39,.72);
  border:1px solid rgba(60,78,122,.35);
  min-height:78px;
}

.socialCard{
  text-decoration:none;
  cursor:pointer;
  transition:transform .12s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.socialCard:hover{
  transform:translateY(-1px);
  border-color:rgba(255,95,118,.45);
  background:rgba(20,28,50,.9);
  box-shadow:0 0 20px rgba(255,95,118,.10);
}
.socialCard .metricValue{
  color:#dfe6ff;
}

#panel .chips{
  gap:10px;
}

#panel .chip{
  padding:10px 14px;
}

#statusText{
  display:none !important;
}

/* ===== Advanced music-device panel pass ===== */

#panel{
  padding:18px 16px 14px;
  background:
    linear-gradient(180deg, rgba(10,15,30,.92), rgba(8,12,24,.96));
  border:1px solid rgba(88,108,170,.22);
  box-shadow:
    0 10px 32px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.03);
}

#panel h2{
  font-size:18px;
  letter-spacing:.01em;
  margin:0 0 4px;
}

#panel .sub{
  margin:0 0 12px;
  font-size:11px;
  line-height:1.4;
  color:rgba(160,178,225,.82);
}

.stack{
  gap:10px;
}

.panelSection{
  gap:10px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(72,92,145,.22);
  background:
    linear-gradient(180deg, rgba(13,19,36,.72), rgba(10,15,28,.78));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025);
}

.panelHero{
  padding:12px;
}

.panelPlayback{
  padding:12px;
}

.panelTiming{
  padding:12px;
}

.panelFollow{
  padding:10px;
  background:
    linear-gradient(180deg, rgba(10,14,26,.45), rgba(8,12,22,.55));
  border-color:rgba(62,78,120,.16);
}

.sectionHead,
.panelTitle{
  color:#cfd8f7;
  font-size:11px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.row{
  gap:5px;
}

label{
  font-size:11px;
  color:#c7d3f8;
  letter-spacing:.02em;
}

.value{
  color:#9fb3ea;
  font-size:10px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

select{
  border-radius:10px;
  padding:10px 11px;
  font-size:13px;
  background:
    linear-gradient(180deg, rgba(17,25,45,.95), rgba(14,21,38,.98));
  border:1px solid rgba(75,95,150,.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

input[type="range"]{
  height:5px;
  background:rgba(39,54,92,.92);
}

input[type="range"]::-webkit-slider-thumb{
  width:16px;
  height:16px;
  border:1.5px solid rgba(255,255,255,.72);
  background:#dfe7ff;
  box-shadow:
    0 0 0 3px rgba(255,255,255,.03),
    0 0 18px rgba(255,255,255,.08);
}

#panel .chips{
  gap:8px;
}

#panel .chip{
  min-width:0;
  padding:9px 12px;
  font-size:12px;
  border-radius:999px;
  border:1px solid rgba(76,97,150,.28);
  background:
    linear-gradient(180deg, rgba(16,24,43,.85), rgba(12,18,34,.92));
  color:#dbe5ff;
  box-shadow:none;
}

#panel .chip.active{
  border-color:rgba(255,95,118,.62);
  background:
    linear-gradient(180deg, rgba(70,31,45,.58), rgba(48,20,31,.62));
  color:#fff4f6;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 0 22px rgba(255,95,118,.10);
}

button{
  border-radius:12px;
  padding:12px 14px;
  font-size:13px;
  background:
    linear-gradient(180deg, rgba(32,44,75,.95), rgba(24,35,63,.98));
  border:1px solid rgba(76,97,150,.22);
  color:#eef3ff;
  box-shadow:none;
}

button:hover{
  background:
    linear-gradient(180deg, rgba(38,52,88,.98), rgba(28,40,72,.98));
}

.primary{
  background:
    linear-gradient(180deg, #ff6f85, #f85d74);
  border:none;
  box-shadow:
    0 0 26px rgba(255,95,118,.16),
    inset 0 1px 0 rgba(255,255,255,.18);
}

.primary:hover{
  background:
    linear-gradient(180deg, #ff7d91, #fb647b);
}

.heroButtons{
  grid-template-columns:1fr 0.82fr;
}

.softDivider{
  margin:0;
  background:rgba(66,85,132,.22);
}

.metricGrid{
  gap:8px;
}

.metricCard{
  min-height:62px;
  padding:10px 11px;
  border-radius:12px;
  border:1px solid rgba(62,78,120,.18);
  background:
    linear-gradient(180deg, rgba(11,16,30,.56), rgba(9,13,24,.68));
}

.panelFollow .metricCard{
  min-height:58px;
}

.metricName{
  font-size:10px;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#8fa5dd;
}

.metricValue{
  font-size:12px;
  color:#edf3ff;
}

.socialCard{
  opacity:.88;
}

.socialCard:hover{
  transform:translateY(-1px);
  opacity:1;
  border-color:rgba(95,118,180,.28);
  background:
    linear-gradient(180deg, rgba(16,23,41,.92), rgba(12,18,32,.98));
  box-shadow:
    0 8px 20px rgba(0,0,0,.14);
}

.panelFollow .metricValue{
  color:#d8e1fb;
}

.tiny{
  margin-top:2px;
  padding:8px 2px 0;
  font-size:10px;
  line-height:1.55;
  color:rgba(140,160,210,.62);
}

#statusText{
  display:none !important;
}

@media (min-width: 1101px){
  #panel{
    overflow:auto;
  }
}

#quickKeys{
  position:absolute;
  right:24px;
  top:90px;
  z-index:10;
  width:260px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(13,18,33,.76);
  border:1px solid rgba(82,101,154,.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:0 10px 24px rgba(0,0,0,.14);
}

.quickTitle{
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#9fb3ea;
  margin-bottom:6px;
}

.quickBody{
  font-size:11px;
  line-height:1.72;
  color:rgba(225,234,255,.86);
}

.tiny{
  display:none !important;
}

/* ===== Real mobile layout pass ===== */
@media (max-width: 900px){
  html, body{
    overflow:auto;
    height:auto;
    min-height:100%;
  }

  #app{
    grid-template-columns:1fr;
    grid-template-areas:
      "stage"
      "panel";
    height:auto;
    min-height:100vh;
    padding:10px;
    gap:10px;
  }

  #stageWrap{
    grid-area:stage;
    min-height:78svh;
    max-height:none;
    border-radius:20px;
    overflow:hidden;
  }

  #panel{
    grid-area:panel;
    height:auto;
    max-height:none;
    overflow:visible;
    border-radius:20px;
    padding:14px 12px 14px;
    background:
      linear-gradient(180deg, rgba(10,15,30,.94), rgba(8,12,24,.98));
  }

  canvas{
    min-height:78svh;
    height:78svh !important;
  }

  #titleBlock{
    left:14px;
    top:14px;
    right:14px;
  }

  #titleBlock h1{
    font-size:24px;
    line-height:1;
    margin:0;
  }

  #titleBlock p{
    margin-top:6px;
    max-width:78%;
    font-size:12px;
    line-height:1.35;
    color:rgba(190,205,240,.86);
  }

  #legend{
    left:14px;
    top:78px;
    right:14px;
    max-width:none;
    gap:8px 12px;
    font-size:11px;
    line-height:1.3;
  }

  #nowHearing{
    left:14px;
    right:14px;
    top:auto;
    bottom:14px;
    width:auto;
    padding:10px 12px;
    text-align:center;
    font-size:11px;
    letter-spacing:.1em;
    border-radius:16px;
    background:rgba(12,17,32,.78);
  }

  /* 手机端不让快捷键占主舞台 */
  #quickKeys{
    display:none !important;
  }

  #panel h2{
    font-size:17px;
    margin-bottom:4px;
  }

  #panel .sub{
    font-size:10px;
    line-height:1.45;
    margin:0 0 10px;
    color:rgba(160,178,225,.74);
  }

  .stack{
    gap:9px;
  }

  .panelSection{
    padding:11px;
    border-radius:16px;
    gap:10px;
  }

  .panelHero,
  .panelPlayback,
  .panelTiming,
  .panelFollow{
    padding:11px;
  }

  .sectionHead,
  .panelTitle{
    font-size:10px;
    letter-spacing:.14em;
  }

  .row{
    gap:5px;
  }

  label{
    font-size:10px;
    line-height:1.3;
  }

  .value{
    font-size:10px;
    letter-spacing:.08em;
  }

  select{
    min-height:42px;
    padding:10px 11px;
    font-size:13px;
    border-radius:12px;
  }

  input[type="range"]{
    height:6px;
  }

  input[type="range"]::-webkit-slider-thumb{
    width:18px;
    height:18px;
  }

  #panel .chips{
    gap:8px;
    flex-wrap:wrap;
  }

  #panel .chip{
    padding:9px 12px;
    font-size:12px;
    min-height:38px;
    display:flex;
    align-items:center;
    justify-content:center;
  }

  .heroButtons,
  .btnRow{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  button{
    min-height:42px;
    font-size:13px;
    border-radius:12px;
    padding:10px 12px;
  }

  .metricGrid{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  .metricCard{
    min-height:58px;
    padding:10px;
    border-radius:14px;
  }

  .metricName{
    font-size:10px;
  }

  .metricValue{
    font-size:11px;
    line-height:1.35;
  }

  .socialCard{
    opacity:.96;
  }

  .tiny{
    display:none !important;
  }
}

@media (max-width: 640px){
  #app{
    padding:8px;
    gap:8px;
  }

  #stageWrap{
    min-height:74svh;
    border-radius:18px;
  }

  canvas{
    min-height:74svh;
    height:74svh !important;
  }

  #titleBlock{
    left:12px;
    top:12px;
    right:12px;
  }

  #titleBlock h1{
    font-size:21px;
  }

  #titleBlock p{
    max-width:100%;
    font-size:11px;
  }

  #legend{
    top:70px;
    font-size:10px;
    gap:7px 10px;
  }

  #nowHearing{
    left:12px;
    right:12px;
    bottom:12px;
    padding:9px 10px;
    font-size:10px;
  }

  #panel{
    padding:12px 10px 12px;
    border-radius:18px;
  }

  .panelSection{
    padding:10px;
    border-radius:14px;
  }

  .panelHero,
  .panelPlayback,
  .panelTiming,
  .panelFollow{
    padding:10px;
  }

  #panel .chip{
    font-size:11px;
    padding:8px 10px;
  }

  button{
    font-size:12px;
  }
}

@media (max-width: 480px){
  #stageWrap{
    min-height:70svh;
  }

  canvas{
    min-height:70svh;
    height:70svh !important;
  }

  #titleBlock h1{
    font-size:19px;
  }

  #legend{
    top:66px;
  }

  .metricGrid{
    grid-template-columns:1fr;
  }

  .heroButtons,
  .btnRow{
    grid-template-columns:1fr 1fr;
  }
}
