html, body{
  height: auto !important;
  overflow: auto !important;
}

html, body{
  margin:0;
  background:#000;
}

.chart-wrap{
  min-height: 0;
  display: block;
  padding: 18px;
}


.chart-card{
  width: min(980px, 96vw);
  border: 1px solid rgba(255,255,255,.12);
  margin: 0 auto;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 14px;
  color: rgba(255,255,255,.92);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.chart-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.chart-title{
  font-weight: 700;
  letter-spacing: .4px;
  font-size: 16px;
  color: #fff;
}

.chart-sub{
  font-size: 12px;
  opacity: .85;
}

.chart-controls{
  display:flex;
  gap: 10px;
  align-items:center;
  margin: 10px 0 12px;
  flex-wrap: wrap;
}

.chart-label{
  font-size: 12px;
  opacity: .9;
}

.chart-select{
  background: #050b14;
  color: rgba(220,235,255,.98);
  border: 1px solid rgba(220,235,255,.35);
  border-radius: 10px;
  padding: 8px 10px;
  outline: none;
}

.chart-select:focus{
  border-color: rgba(220,235,255,.75);
}

.chart-back{
  margin-left: auto;
  font-size: 12px;
  color: rgba(220,235,255,.95);
  text-decoration: none;
  border-bottom: 1px dashed rgba(220,235,255,.35);
  padding-bottom: 1px;
}

.chart-back:hover{
  color:#fff;
  border-bottom-color: rgba(220,235,255,.85);
}

.chart-canvas-wrap{
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
}

@media (max-width: 600px){
  .chart-canvas-wrap{ height: 210px; }
}

#pmChart{
  width: 100%;
  height: 100%;
  display: block;
}

.chart-legend{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
  font-size: 12px;
  opacity: 1;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(0,0,0,.18);
}


.legend-item{
  display:flex;
  align-items:center;
  gap: 6px;
}

.legend-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 10px rgba(0,140,255,.25);
}

.chart-note{
  margin-top: 10px;
  font-size: 11px;
  opacity: .65;
}

.chart-canvas-wrap{ position: relative; }

.pm-tip{
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-9999px,-9999px);
  pointer-events: none;
  z-index: 5;

  max-width: 320px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(6px);

  font-size: 12px;
  color: rgba(255,255,255,.95);
  line-height: 1.25;
  box-shadow: 0 0 22px rgba(0,0,0,.35);
}

.pm-tip .t{
  font-weight: 700;
  margin-bottom: 6px;
  color: rgba(220,235,255,.95);
}

.pm-tip .r{
  display:flex;
  gap: 8px;
  align-items:center;
  margin: 2px 0;
}

.pm-tip .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
}

.pm-tip .name{
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .95;
}

.pm-tip .val{
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  opacity: .95;
}

.hidden{ display:none; }
