#ctv-cast-wrap, #ctv-cast-toast {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  color: #eef8ff;
  background: #0a2033e8;
  border: 1px solid #b8def466;
  border-radius: 12px;
  box-shadow: 0 6px 18px #04162366;
  font: 600 12px/1.25 system-ui, sans-serif;
  pointer-events: none;
}

#ctv-cast-wrap[hidden], #ctv-cast-toast[hidden],
#ctv-cast-target[hidden], #ctv-cast-hint[hidden] { display: none; }

#ctv-cast-wrap {
  bottom: max(140px, calc(env(safe-area-inset-bottom) + 109px));
  width: min(228px, 57%);
  padding: 8px 10px;
}

.ctv-power-header { display: flex; justify-content: space-between; gap: 8px; }
#ctv-cast-pct { font-variant-numeric: tabular-nums; }

#ctv-cast-track {
  position: relative;
  height: 11px;
  margin-top: 5px;
  overflow: hidden;
  border: 1px solid #8fb5cb88;
  border-radius: 999px;
  background: #051421;
}

#ctv-cast-fill { height: 100%; background: linear-gradient(90deg, #34cae1, #5b9af4); }
.ctv-power-chum #ctv-cast-fill { background: linear-gradient(90deg, #f8b648, #ff861f); }

#ctv-cast-target {
  position: absolute;
  inset-block: 0;
  box-sizing: border-box;
  border-inline: 1px solid #a6ffdc;
  background: #54e5ac65;
}

#ctv-cast-hint { margin-top: 5px; text-align: center; color: #a6ffdc; }

#ctv-cast-toast {
  bottom: max(195px, calc(env(safe-area-inset-bottom) + 162px));
  width: max-content;
  max-width: 75%;
  padding: 6px 10px;
  text-align: center;
}

#ctv-cast-toast.ctv-power-highlight { color: #a6ffdc; border-color: #6bdca970; }
