.web-player {
  position: fixed; inset: 0; z-index: 30; background: var(--stage);
  color: var(--stage-text); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%; height: 100dvh; overflow: hidden;
}
.web-player:fullscreen { display: block; }
.web-player:fullscreen .player-viewport { position: absolute; inset: 0; }
.web-player:fullscreen .player-header,
.web-player:fullscreen .player-controls {
  position: absolute; left: 0; right: 0; z-index: 1;
  transition: opacity 180ms ease;
}
.web-player:fullscreen .player-header { top: 0; }
.web-player:fullscreen .player-controls { bottom: 0; }
.web-player:fullscreen.controls-hidden { cursor: none; }
.web-player:fullscreen.controls-hidden .player-header,
.web-player:fullscreen.controls-hidden .player-controls { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .web-player:fullscreen .player-header,
  .web-player:fullscreen .player-controls { transition: none; }
}
.player-header { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.player-heading { min-width: 0; flex: 1; }
.player-heading .eyebrow { margin: 0 0 3px; }
.player-title { margin: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-viewport { position: relative; min-height: 0; overflow: hidden; touch-action: pinch-zoom; user-select: none; outline-offset: -4px; }
.player-viewport.is-mirrored .player-mirror { transform: scaleX(-1); }
.player-mirror { height: 100%; }
.player-track { width: 100%; will-change: transform; }
.player-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 56px; line-height: 1.45; font-weight: 500; color: var(--stage-text); }
.player-guide { position: absolute; top: 50%; left: 8px; width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 11px solid var(--accent-glow); transform: translateY(-50%); pointer-events: none; }
.player-guide.right { left: auto; right: 8px; border-left: 0; border-right: 11px solid var(--accent-glow); }
.player-controls { background: var(--surface); border-top: 1px solid var(--border); padding: 12px 20px max(12px, env(safe-area-inset-bottom)); }
.player-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.player-actions [data-action="toggle"] { min-width: 120px; }
.player-status { flex: 1; min-width: 140px; margin: 0; color: var(--muted); font-size: 13px; }
.player-adjustments { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 10px; }
.player-adjustments label { display: grid; gap: 0; font-size: 13px; color: var(--muted); }
.player-adjustments label > span { display: flex; justify-content: space-between; gap: 8px; }
.player-adjustments output { color: var(--text); font-variant-numeric: tabular-nums; }
.web-player input[type="range"] { appearance: none; width: 100%; min-width: 0; min-height: 48px; padding: 0; cursor: pointer; background: transparent; border: 0; }
.web-player input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: var(--radius-pill); background: linear-gradient(to right, var(--accent) var(--range-fill, 0%), var(--surface-3) var(--range-fill, 0%)); }
.web-player input[type="range"]::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; border: 3px solid var(--accent); background: var(--accent-on); }
.web-player input[type="range"]::-moz-range-track { height: 6px; border-radius: var(--radius-pill); background: var(--surface-3); }
.web-player input[type="range"]::-moz-range-progress { height: 6px; border-radius: var(--radius-pill); background: var(--accent); }
.web-player input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--accent); background: var(--accent-on); }
.web-player [aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.player-help { margin: 0; color: var(--dim); font-size: 12px; }
.web-player.is-narrow .player-adjustments { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.web-player.is-narrow .player-status { flex-basis: 100%; }
.web-player.is-narrow .player-help, .web-player.is-short .player-help { display: none; }
.web-player.is-short .player-heading .eyebrow { display: none; }
.web-player.is-short .player-header, .web-player.is-short .player-controls { padding: 4px 12px; }
.web-player.is-short .player-adjustments { margin-top: 2px; }
@media (max-width: 700px) {
  .player-header { padding: 8px 12px; gap: 8px; }
  .player-controls { padding: 8px 12px max(8px, env(safe-area-inset-bottom)); }
  .player-adjustments { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .player-help { display: none; }
  .player-status { flex-basis: 100%; }
}
@media (max-height: 500px) and (min-width: 600px) {
  .player-header { padding: 4px 12px; }
  .player-heading .eyebrow, .player-help { display: none; }
  .player-controls { padding: 4px 12px; }
  .player-adjustments { margin-top: 2px; }
}
