.chart {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--panel);
}

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

/* ---------- centred multiplier ---------- */

.readout-mid {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  text-align: center;
  padding: 20px;
}

.readout-mid b {
  position: relative;
  font-size: clamp(44px, 8vw, 86px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: color .18s var(--ease);
}
.readout-mid b span { font-size: .5em; opacity: .5; margin-left: 2px; }

.readout-mid span#status {
  position: relative;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}

.chart.flying  .readout-mid b { color: var(--text); }
.chart.cashed  .readout-mid b { color: var(--green); }
.chart.crashed .readout-mid b { color: var(--red); }
.chart.crashed .readout-mid span#status { color: var(--red); }
.chart.cashed  .readout-mid span#status { color: var(--green); }

/* red wash on the bust */
.flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 55%, rgba(237,65,99,.32), transparent 68%);
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.flash.on { opacity: 1; transition-duration: .06s; }

/* ---------- rail extras ---------- */

.toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track {
  width: 34px; height: 20px;
  flex: none;
  border-radius: 100px;
  background: var(--panel-3);
  position: relative;
  transition: background .18s var(--ease);
}
.toggle .knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .2s var(--ease), background .18s var(--ease);
}
.toggle input:checked + .track { background: var(--green); }
.toggle input:checked + .track .knob { transform: translateX(14px); background: #04160B; }
.toggle input:focus-visible + .track { outline: 2px solid var(--green); outline-offset: 2px; }

#action { width: 100%; }

/* the cash out state takes over the main button */
#action.cashout { background: var(--green); color: #04160B; }
#action.cashout:hover { background: #1BFF1C; }
#action.waiting { background: var(--panel-2); color: var(--muted); }
