#player-switcher {
  position: fixed; z-index: 125; top: 16px; right: 16px;
  display: grid; grid-template-columns: 34px minmax(160px, auto) 34px auto;
  gap: 6px; align-items: center;
  color: #f6f7ff;
}
#player-switcher.hidden { display: none; }
#player-switcher button {
  height: 48px; border: 1px solid #394360; border-radius: 10px;
  color: #f6f7ff; background: rgba(12, 16, 28, .92); cursor: pointer;
}
#player-switcher button:hover, #player-switcher button:focus-visible {
  border-color: #ff4f93; outline: 2px solid rgba(255,79,147,.22); outline-offset: 1px;
}
#player-switcher .player-arrow { font: 700 26px/1 system-ui; }
#player-active { display: flex; align-items: center; gap: 9px; padding: 5px 11px 5px 6px; text-align: left; }
.player-copy { display: grid; gap: 1px; }
.player-copy small, .player-eyebrow { color: #91a0c5; font: 800 10px/1.2 system-ui; letter-spacing: .13em; }
.player-copy strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
#player-calibrate { padding: 0 13px; color: #ff9ac1 !important; font: 800 11px/1 system-ui; letter-spacing: .06em; }
#player-gesture-hint { grid-column: 2 / 5; justify-self: end; color: #6f7b9b; font: 700 9px/1 system-ui; letter-spacing: .1em; }
.player-avatar {
  flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; color: #08101b; background: linear-gradient(135deg, #ffd166, #ff4f93);
  background-size: cover; background-position: center; font: 900 13px/1 system-ui;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.28);
}
.player-avatar.large { width: 64px; height: 64px; font-size: 21px; }
.player-layer {
  position: fixed; z-index: 180; inset: 0; display: grid; place-items: center;
  padding: 24px; box-sizing: border-box; color: #f7f8ff;
  background: rgba(4,7,17,.86); backdrop-filter: blur(8px);
}
.player-layer.hidden { display: none; }
.player-panel, .calibration-panel {
  width: min(610px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  box-sizing: border-box; border: 1px solid #394360; border-radius: 22px;
  padding: 30px; background: linear-gradient(145deg, #151a2c, #0d1120);
  box-shadow: 0 28px 90px rgba(0,0,0,.6); position: relative;
}
.player-panel h2, .calibration-panel h2 { margin: 5px 0 0; font: 900 34px/1.05 system-ui; letter-spacing: -.035em; }
.player-eyebrow { margin: 0; color: #ff79ad; }
.player-privacy, #calibration-instruction, #calibration-feedback { color: #aeb9d5; line-height: 1.45; }
.player-close {
  position: absolute; right: 20px; top: 16px; border: 0; background: none;
  color: #8793b3; font-size: 28px; cursor: pointer;
}
#player-list { display: grid; gap: 8px; margin: 24px 0; }
.player-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; padding: 5px; border: 1px solid #252d45; border-radius: 13px; }
.player-row.selected { border-color: #ff4f93; background: rgba(255,79,147,.06); }
.player-row button { border: 0; border-radius: 9px; color: #e8ecf8; background: transparent; cursor: pointer; }
.player-choice { min-width: 0; display: flex; gap: 12px; align-items: center; padding: 7px; text-align: left; }
.player-choice span:not(.player-avatar) { display: grid; gap: 4px; }
.player-choice strong { font-size: 16px; }
.player-choice small { color: #8491b2; }
.player-row-action { color: #ffd166 !important; font-weight: 800; }
.player-delete { color: #7884a2 !important; }
#player-add-form { padding-top: 21px; border-top: 1px solid #293149; }
#player-add-form label { display: block; margin-bottom: 9px; color: #cad2e9; font-weight: 750; }
#player-add-form div { display: flex; gap: 8px; }
#player-add-form input { min-width: 0; flex: 1; border: 1px solid #394360; border-radius: 10px; padding: 12px; color: white; background: #090d18; font-size: 16px; }
#player-add-form button, .calibration-actions button { border: 1px solid #ff4f93; border-radius: 10px; padding: 0 14px; color: white; background: #b82964; font-weight: 850; cursor: pointer; }
#player-calibration { z-index: 210; }
.calibration-panel { width: min(680px, calc(100vw - 32px)); text-align: center; }
.calibration-head { display: flex; justify-content: center; align-items: center; gap: 16px; text-align: left; }
#calibration-instruction { max-width: 530px; min-height: 48px; margin: 24px auto 14px; font-size: 18px; }
.calibration-stage { display: grid; place-items: center; height: 180px; margin: 14px 0; border: 1px solid #29334d; border-radius: 18px; background: radial-gradient(circle, rgba(255,79,147,.14), transparent 65%); }
#calibration-icon { color: #ffd166; font: 200 96px/1 system-ui; text-shadow: 0 0 35px rgba(255,209,102,.25); }
.calibration-meter { height: 14px; overflow: hidden; border-radius: 8px; background: #070b15; box-shadow: inset 0 0 0 1px #2a334d; }
.calibration-meter i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff4f93, #ffd166); transition: width .09s linear; }
#calibration-feedback { min-height: 24px; color: #ffd166; font-weight: 700; }
.calibration-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.calibration-actions button { min-height: 42px; background: transparent; color: #aeb9d5; border-color: #394360; }
#calibration-skip { color: #ffd166 !important; }
#player-toast {
  position: fixed; z-index: 220; left: 50%; top: 86px; transform: translate(-50%, -12px);
  padding: 12px 20px; border: 1px solid #ffd166; border-radius: 999px;
  color: #fff2c7; background: rgba(15,18,31,.96); font: 850 12px/1 system-ui;
  letter-spacing: .09em; opacity: 0; pointer-events: none; transition: .2s ease;
}
#player-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 720px) {
  #player-switcher { top: 10px; right: 10px; grid-template-columns: 30px minmax(120px, auto) 30px; }
  #player-calibrate { grid-column: 2 / 4; height: 34px !important; }
  #player-gesture-hint { display: none; }
  #player-active { min-width: 0; }
  .player-copy strong { max-width: 92px; }
  .player-panel, .calibration-panel { padding: 24px 18px; }
  .player-panel h2, .calibration-panel h2 { font-size: 28px; }
  .player-row { grid-template-columns: 1fr auto; }
  .player-delete { grid-column: 2; }
  #player-add-form div { flex-direction: column; }
  #player-add-form button { min-height: 44px; }
  .calibration-stage { height: 125px; }
  #player-toast { top: 108px; max-width: calc(100vw - 48px); text-align: center; }
  /* This sheet loads after tracker.css, keeping tracker status below the two
     top control clusters on compact screens. */
  #status { top: 108px; max-width: calc(100vw - 48px); text-align: center; }
}
