/* Accepted Court View presentation; the unified core owns every media operation. */
.ccp-player {
  width: 100%;
  min-width: 0;
}
.ccp-shell {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  background: #071411;
  border-radius: 18px;
  overflow: hidden;
  color: #fff;
  width: 100%;
  min-width: 0;
  outline-offset: 3px;
  aspect-ratio: 16/9;
}
.ccp-shell [hidden],
.ccp-player [hidden],
.ccp-mode-actions[hidden] {
  display: none !important;
}
.ccp-media-host,
.ccp-media,
.ccp-held-picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ccp-media,
.ccp-held-picture {
  object-fit: contain;
  background: #071411;
  opacity: 1;
  pointer-events: none;
}
.ccp-held-picture {
  z-index: 2;
}
.ccp-controls {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(transparent 70%, #0008);
}
.ccp-controls :is(button, input) {
  pointer-events: auto;
}
.ccp-shell button {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  border-radius: 8px;
  padding: 5px;
  min-width: 0;
  min-height: 36px;
  line-height: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font: inherit;
  cursor: pointer;
  text-shadow: 0 1px 4px #0008;
}
.ccp-shell button:disabled {
  opacity: 1;
  cursor: default;
}
.ccp-shell button:focus-visible,
.ccp-shell input:focus-visible {
  outline: 2px solid #9bd9ff;
  outline-offset: 2px;
}
.ccp-shell svg,
.ccp-mode-actions svg,
#courtActions > button svg,
.mark-highlight-button svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px #0003);
  flex: none;
}
.ccp-shell svg .fill,
.ccp-mode-actions svg .fill,
#courtActions svg .fill {
  fill: currentColor;
  stroke: none;
}
.ccp-full-button {
  position: absolute;
  top: max(9px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  width: 40px;
  height: 40px;
}
.ccp-shell .ccp-full-button svg {
  width: 30px;
  height: 30px;
}
.ccp-angle {
  position: absolute;
  z-index: 6;
  top: max(11px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  max-width: 52%;
  pointer-events: auto;
}
.ccp-shell button[data-camera] {
  background: #081c23df;
  border-radius: 30px;
  font-size: clamp(13px, 2.8cqw, 21px);
  font-weight: 700;
  line-height: 1.2;
  max-width: 100%;
  min-height: 34px;
  padding: 9px 16px;
}
[data-camera-name] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ccp-shell button[data-camera] svg {
  width: 12px;
  height: 12px;
}
.ccp-shell button[data-camera]:disabled > svg {
  display: none;
}
[data-camera-menu] {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  min-width: 190px;
  max-width: 75vw;
  max-height: 50cqh;
  overflow: auto;
  padding: 5px;
  background: #102522f5;
  border: 1px solid #ffffff30;
  border-radius: 12px;
  box-shadow: 0 6px 24px #0005;
}
.ccp-shell [data-camera-menu] button {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 7px;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 14px;
}
.ccp-shell [data-camera-menu] button[aria-checked="true"] {
  background: #ffffff25;
}
.ccp-camera-spinner {
  width: 13px;
  height: 13px;
  flex: none;
  border: 2px solid #ffffff55;
  border-top-color: #fff;
  border-radius: 50%;
  animation: ccp-spin 0.8s linear infinite;
}
@keyframes ccp-spin {
  to {
    transform: rotate(360deg);
  }
}
.ccp-live-actions {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  top: max(11px, env(safe-area-inset-top));
  right: max(11px, env(safe-area-inset-right));
}
.ccp-live-actions button {
  width: 38px;
  height: 38px;
  padding: 5px;
}
.ccp-live-actions [data-intent="ptz"] svg {
  width: 31px;
  height: 31px;
  stroke-width: 1.6;
}
.ccp-live-actions [data-intent="talkback"] svg {
  width: 26px;
  height: 26px;
}
.ccp-transport {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: clamp(30px, 10cqw, 95px);
}
.ccp-shell .ccp-transport button {
  position: relative;
  width: clamp(44px, 8cqw, 76px);
  height: clamp(48px, 9cqw, 82px);
  padding: 0;
}
.ccp-shell .ccp-transport svg {
  width: 100%;
  height: 100%;
  stroke-width: 4;
}
.ccp-transport button span {
  position: absolute;
  left: 0;
  right: 0;
  top: 54%;
  transform: translateY(-50%);
  font-size: clamp(12px, 2.2cqw, 23px);
  font-weight: 600;
}
.ccp-shell .ccp-transport [data-intent="play"] {
  width: clamp(34px, 6cqw, 62px);
}
.ccp-timeline {
  position: absolute;
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.6cqw, 18px);
  color: white;
  font-size: clamp(11px, 2.4cqw, 20px);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ccp-timeline output {
  white-space: nowrap;
  pointer-events: none;
}
.ccp-timeline-track {
  position: relative;
  flex: 1;
  min-width: 20px;
  display: flex;
  align-items: center;
}
.ccp-shell [data-timeline] {
  min-width: 0;
  width: 100%;
  height: 32px;
  min-height: 0;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  box-shadow: none;
  touch-action: none;
  transition: none;
  color: #fff;
}
.ccp-shell [data-timeline]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 5px;
  background: linear-gradient(
    to right,
    #fff var(--played, 0%),
    #ffffff50 var(--played, 0%)
  );
}
.ccp-shell [data-timeline]::-moz-range-track {
  height: 5px;
  border-radius: 5px;
  background: #ffffff50;
}
.ccp-shell [data-timeline]::-moz-range-progress {
  height: 5px;
  border-radius: 5px;
  background: #fff;
}
.ccp-shell [data-timeline][data-clock="true"]::-webkit-slider-runnable-track {
  background:
    var(--coverage) center/100% 5px no-repeat,
    linear-gradient(#ffffff50, #ffffff50) center/100% 2px no-repeat;
}
.ccp-shell [data-timeline][data-clock="true"]::-moz-range-track {
  background:
    var(--coverage) center/100% 5px no-repeat,
    linear-gradient(#ffffff50, #ffffff50) center/100% 2px no-repeat;
}
.ccp-shell [data-timeline][data-clock="true"]::-moz-range-progress {
  background: transparent;
}
.ccp-shell [data-timeline]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  margin-top: -6px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px #0003;
}
.ccp-shell [data-timeline]::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}
.ccp-timeline [data-cursor] {
  position: absolute;
  bottom: calc(100% - 3px);
  transform: translateX(-50%);
  font-size: clamp(10px, 2cqw, 16px);
  text-shadow: 0 1px 4px #000;
  max-width: 100%;
}
.ccp-shell [data-intent="live"] {
  font-size: inherit;
  font-weight: 600;
  padding: 4px 0 4px 5px;
  flex: none;
  white-space: nowrap;
}
.ccp-shell [data-intent="live"] svg {
  width: 18px;
  height: 18px;
}
.ccp-live-dot {
  width: 10px;
  height: 10px;
  background: #22d69a;
  border-radius: 50%;
  margin: 0 2px;
}
.ccp-status {
  position: absolute;
  top: 22%;
  left: 12%;
  right: 12%;
  z-index: 7;
  text-align: center;
  background: #041218d9;
  border-radius: 12px;
  padding: 10px;
  pointer-events: none;
}
/* Diagnostic state only; stays visible when ordinary playback chrome hides. */
.ccp-debug-clock {
  position: absolute;
  z-index: 8;
  top: 64px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 7px;
  border-radius: 6px;
  background: #061814d9;
  color: #fff;
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.ccp-debug-clock output { color: inherit; font: inherit; }
.ccp-mode-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.ccp-mode-actions button,
#courtActions > button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 700;
}
.ccp-mode-actions svg,
#courtActions > button svg,
.mark-highlight-button svg {
  width: 20px;
  height: 20px;
}
#courtActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0 0;
  width: 100%;
  min-width: 0;
}
#courtActions .secondary {
  background: #e7f3fc;
  border: 1.5px solid #a8cde3;
  color: #174f73;
  box-shadow: inset 0 0 0 1px #d4e9f8;
}
#courtActions .primary {
  background: #0e6e50;
  color: #fff;
  border: 1.5px solid #0e6e50;
}
#activityHighlightAction {
  display: flex;
  justify-content: flex-end;
  padding: 14px 0;
}
/* Clip handles share the canonical ruler; there are no secondary rails. */
.ccp-clip-editor {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
  touch-action: none;
}
.ccp-clip-editor input {
  position: absolute;
  inset: 0;
  width: 100%; height: 32px; min-height: 0;
  margin: 0; padding: 0;
  appearance: none; -webkit-appearance: none;
  border: 0; border-radius: 0; box-shadow: none;
  background: transparent;
  pointer-events: none;
}
.ccp-clip-editor input::-webkit-slider-runnable-track { background: transparent; height: 4px; }
.ccp-clip-editor input::-moz-range-track { background: transparent; height: 4px; }
.ccp-clip-editor input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 30px; margin-top: -13px;
  border: 2px solid #fff; border-radius: 4px; background: #176da8;
  pointer-events: auto; cursor: ew-resize;
}
.ccp-clip-editor input::-moz-range-thumb {
  width: 11px; height: 28px; border: 2px solid #fff; border-radius: 4px;
  background: #176da8; pointer-events: auto; cursor: ew-resize;
}
.ccp-clip-selection { position:absolute; top:13px; height:6px; background:#176da8; pointer-events:none; z-index:1; }
.ccp-clip-editor input { z-index:2; }
.ccp-clip-editor [data-clip-label] { position:absolute; bottom:calc(100% + 2px); font-size:clamp(10px,2cqw,16px); text-shadow:0 1px 4px #000; }
.ccp-clip-editor [data-clip-label="start"] { transform:translateX(-100%); padding-right:9px; }
.ccp-clip-editor [data-clip-label="end"] { padding-left:9px; }
.ccp-editing .ccp-timeline [data-cursor] { bottom:calc(100% + 24px); }
.ccp-editing .ccp-timeline { bottom:max(12px,env(safe-area-inset-bottom)); }
.ccp-editing [data-position], .ccp-editing [data-duration] { font-size:clamp(10px,2cqw,16px); }
/* Focus belongs to the actual thumb, never a form-field box around the rail. */
.ccp-shell [data-timeline]:focus-visible,
.ccp-shell .ccp-clip-editor input:focus-visible { outline: none; }
.ccp-shell [data-timeline]:focus-visible::-webkit-slider-thumb,
.ccp-shell .ccp-clip-editor input:focus-visible::-webkit-slider-thumb {
  outline: 2px solid #9bd9ff; outline-offset: 2px;
}
.ccp-shell [data-timeline]:focus-visible::-moz-range-thumb,
.ccp-shell .ccp-clip-editor input:focus-visible::-moz-range-thumb {
  outline: 2px solid #9bd9ff; outline-offset: 2px;
}
/* Raise only the scrub head above the handles; their exposed ends stay editable. */
.ccp-editing [data-timeline] { position: relative; z-index: 3; pointer-events: none; }
.ccp-editing [data-timeline]::-webkit-slider-thumb { pointer-events: auto; }
.ccp-editing [data-timeline]::-moz-range-thumb { pointer-events: auto; }
.ccp-controls-hidden .ccp-controls {
  opacity: 0;
  pointer-events: none;
}
.ccp-controls-hidden .ccp-controls :is(button, input) {
  pointer-events: none;
}
/* A still replaces the picture at full brightness. No seek veil, clock or floating thumbnail. */
.ccp-scrub-preview {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: transparent;
}
.ccp-scrub-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
}
.ccp-scrubbing .ccp-controls {
  background: none;
}
.ccp-scrubbing .ccp-transport {
  visibility: hidden;
}
.ccp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ccp-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #071411;
  overflow: hidden;
}
.ccp-fullscreen .ccp-shell,
.ccp-shell:fullscreen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}
.ccp-fullscreen::backdrop {
  background: #071411;
}
.ccp-fullscreen-open {
  overflow: hidden;
}
.ccp-explanation {
  max-width: min(440px, calc(100vw - 32px));
  border: 0;
  border-radius: 18px;
  padding: 24px;
  line-height: 1.5;
}
.ccp-explanation::backdrop {
  background: #0009;
}
.ccp-explanation button {
  min-height: 44px;
  padding: 8px 18px;
}
.ccp-shell video::-webkit-media-controls {
  display: none !important;
}
@container (max-width:600px) {
  .ccp-full-button {
    top: 6px;
    left: 6px;
    width: 32px;
    height: 32px;
  }
  .ccp-shell .ccp-full-button svg {
    width: 24px;
    height: 24px;
  }
  .ccp-angle {
    top: 8px;
    max-width: 52%;
  }
  .ccp-shell button[data-camera] {
    padding: 7px 12px;
    min-height: 30px;
    font-size: 13px;
  }
  .ccp-live-actions {
    top: 6px;
    right: 7px;
    gap: 3px;
  }
  .ccp-live-actions button {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 4px;
  }
  .ccp-live-actions [data-intent="ptz"] svg {
    width: 26px;
    height: 26px;
  }
  .ccp-live-actions [data-intent="talkback"] svg {
    width: 23px;
    height: 23px;
  }
  .ccp-timeline {
    left: 8px;
    right: 8px;
    bottom: 5px;
    gap: 6px;
  }
  .ccp-timeline button {
    min-height: 28px;
    padding: 3px;
  }
  .ccp-timeline svg {
    width: 22px;
    height: 22px;
  }
  .ccp-shell [data-intent="live"] svg {
    width: 14px;
    height: 14px;
  }
  .ccp-status {
    font-size: 12px;
    left: 8%;
    right: 8%;
  }
}
@media (max-width: 450px) {
  #courtActions {
    gap: 10px;
  }
  #courtActions > button {
    font-size: 13px;
    gap: 7px;
    padding: 9px 8px;
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ccp-shell * {
    transition: none !important;
  }
}
.ccp-debug-panel {
  margin: 16px 0;
  background: #112723;
  color: #f1f9f6;
  border: 1px solid #36514b;
  border-radius: 12px;
  overflow: hidden;
  font: 13px/1.5 system-ui;
}
.ccp-debug-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  min-height: 48px;
  cursor: pointer;
}
.ccp-debug-panel > summary span {
  color: #bdd2cb;
  font-size: 12px;
}
.ccp-debug-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 10px 12px 0;
  padding: 3px;
  background: #071c18;
  border-radius: 8px;
}
.ccp-debug-tabs button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #c0d6ce;
  padding: 9px 5px;
  font: 600 13px/1.3 system-ui;
  min-width: 0;
  min-height: 38px;
  box-shadow: none;
}
.ccp-debug-tabs button[aria-selected="true"] {
  background: #dceee6;
  color: #123c2b;
}
.ccp-debug-panel pre {
  max-height: 300px;
  min-height: 140px;
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 14px 16px;
  font:
    12px/1.6 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .ccp-debug-tabs button {
    font-size: 11px;
    padding: 8px 2px;
  }
  .ccp-debug-panel > summary {
    padding: 12px;
  }
}
#courtActions [hidden],
#activityHighlightAction [hidden] {
  display: none !important;
}

.ccp-debug-content {
  padding: 14px 16px;
}
.ccp-debug-table-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin: 12px 0;
}
.ccp-debug-panel table {
  width: 100%;
  border-collapse: collapse;
  color: inherit;
  font: inherit;
}
.ccp-debug-panel caption {
  text-align: left;
  font-weight: 700;
  padding: 0 0 8px;
  color: #f1f9f6;
}
.ccp-debug-panel th,
.ccp-debug-panel td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border-bottom: 1px solid #36514b;
  white-space: nowrap;
}
.ccp-debug-panel thead th {
  background: #071c18;
  color: #c0d6ce;
  font-size: 12px;
}
.ccp-debug-panel tbody th {
  font-weight: 600;
}
.ccp-debug-note {
  color: #bdd2cb;
  margin: 8px 0 14px;
  font-size: 12px;
}
.ccp-debug-technical {
  border-top: 1px solid #36514b;
  margin-top: 16px;
  padding-top: 12px;
}
.ccp-debug-technical > summary {
  cursor: pointer;
  color: #bdd2cb;
}
.ccp-debug-technical pre {
  min-height: 0;
  padding: 12px 0 0;
}
@media (max-width: 600px) {
  .ccp-debug-content {
    padding: 12px;
  }
  .ccp-debug-tabs {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(76px, 1fr));
  }
}

.ccp-scrub-preview [data-preview-status] {
  position: absolute;
  right: 12px;
  bottom: 54px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #071411b8;
  color: white;
  font-size: 12px;
}
.ccp-scrub-preview [data-preview-status]:empty { display: none; }

/* Owner-requested compact preset menu, aligned with the right-edge controls. */
.ccp-preset-menu {
  box-sizing: border-box; position: absolute; z-index: 7;
  top: 0; right: max(10px, env(safe-area-inset-right));
  display: flex; flex-direction: column; gap: 0;
  width: max-content; min-width: 144px; max-width: calc(100% - 20px);
  max-height: calc(100% - 56px); overflow-x: hidden; overflow-y: auto;
  padding: 4px; border: 1px solid #ffffff30; border-radius: 9px;
  background: #102522; touch-action: pan-y; -webkit-overflow-scrolling: touch;
  font-size: 13px;
}
.ccp-shell .ccp-preset-menu button {
  flex: 0 0 auto; justify-content: flex-start; text-align: left;
  min-height: 32px; margin: 0; padding: 4px 10px; border-radius: 5px;
  line-height: 1.25; overflow-wrap: anywhere;
}
.ccp-preset-menu button:hover { background: #ffffff20; }
@media (any-pointer: coarse) {
  .ccp-shell .ccp-preset-menu button { min-height: 36px; }
}
.ccp-movement-toast {
  position: absolute; z-index: 8; left: 50%; bottom: 64px; transform: translateX(-50%);
  box-sizing: border-box; max-width: calc(100% - 24px); padding: 7px 12px;
  border: 1px solid #ffffff40; border-radius: 9px; background: #102522f5;
  color: #fff; text-align: center; font-size: 13px; pointer-events: none;
}
.ccp-movement-toast.error { background: #792b32f5; }
@container(max-width:600px) {
  .ccp-preset-menu {
    right: max(7px, env(safe-area-inset-right));
    max-height: calc(100% - 44px);
  }
}
.capture-workspace-heading { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.live-shared-viewers { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 5px 10px; border-radius: 20px; background: #edf5f0; color: #295b41; font-size: 12px; line-height: 1.4; font-weight: 600; }
.live-shared-viewers[hidden] { display: none; }
.live-shared-viewers svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.ccp-loading-poster { position: absolute; inset: 0; z-index: 3; display: grid; grid-template-columns:minmax(0,1fr); place-content: center; justify-items: center; gap: 10px; background: #102522; color: #d9e9e3; pointer-events: none; font-size: clamp(12px, 2cqw, 16px); }
.ccp-loading-poster svg { width: clamp(80px, 24cqw, 170px); height: auto; stroke: #b4d6c9; stroke-width: 2; fill: none; opacity: .8; }
.ccp-loading-poster strong { font-size:clamp(18px,3cqw,30px); color:white; }
.ccp-loading-poster > span { max-width:90%; text-align:center; white-space:normal; }
.ccp-loading-live > span { animation:ccp-loading-pulse 1.8s ease-in-out infinite; }
@keyframes ccp-loading-pulse { 50% { opacity:.45; } }
@media (prefers-reduced-motion:reduce) { .ccp-loading-live > span { animation:none; } }
.ccp-shell [data-retry-loading] { pointer-events:auto; background:#ffffff20; border-radius:8px; padding:8px 14px; }
.ccp-quality { position:relative; flex:none; }
.ccp-shell [data-quality] { border:1px solid #ffffff70; border-radius:6px; padding:3px 8px; min-width:48px; font-size:clamp(11px,1.8cqw,16px); }
.ccp-shell [data-quality-menu] { position:absolute; bottom:calc(100% + 10px); right:0; width:250px; max-width:75vw; max-height:65cqh; overflow:auto; padding:5px; background:#102522f5; border:1px solid #ffffff30; border-radius:12px; box-shadow:0 6px 24px #0005; white-space:normal; font-size:14px; }
.ccp-shell [data-quality-value] { display:block; width:100%; text-align:left; border-radius:7px; min-height:36px; padding:8px 12px; font-size:14px; }
.ccp-shell [data-quality-value][aria-checked="true"] { background:#ffffff25; }
.ccp-shell [data-quality-menu] label { display:flex; align-items:center; gap:7px; padding:10px 8px; border-top:1px solid #ffffff30; font-size:13px; color:white; }
.ccp-shell [data-compatibility] { width:16px; height:16px; margin:0; accent-color:#13c697; }
.ccp-shell .ccp-quality-info { border:1px solid #ffffff80; border-radius:50%; width:18px; height:18px; min-height:18px; padding:0; font-size:12px; flex:none; }
.ccp-quality [role="tooltip"] { display:none; position:absolute; bottom:56px; left:6px; right:6px; z-index:2; padding:10px; font-size:12px; line-height:1.4; background:#193c32; border:1px solid #ffffff50; border-radius:8px; box-shadow:0 4px 18px #0006; }
.ccp-quality:has(.ccp-quality-info:hover) [role="tooltip"], .ccp-quality:has(.ccp-quality-info:focus) [role="tooltip"], .ccp-quality.ccp-show-help [role="tooltip"] { display:block; }
.ccp-editing .ccp-quality { display:none; }
.ccp-poster-only .ccp-controls { visibility:hidden; }
.ccp-native-held { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; z-index:3; pointer-events:none; }
.ccp-loading-poster.ccp-poster-held { inset: auto auto 56px 10px; display: block; max-width: calc(100% - 20px); padding: 6px 9px; border-radius: 7px; background: #102522df; }
.ccp-poster-held svg { display: none; }

/* Keep debug clocks readable on a small player. */
@container(max-width:540px) {
  .ccp-debug-clock { font-size: 10px; }
}
.ccp-shell:has(.ccp-loading-poster:not([hidden]):not(.ccp-poster-held)) .ccp-transport { visibility: hidden; }

/* A cache poster is presentation only; it never advances the verified clock. */
.ccp-loading-poster > img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.ccp-poster-cached svg { visibility:hidden; }
.ccp-poster-cached > span { position:absolute; left:10px; bottom:56px; padding:6px 9px; border-radius:7px; background:#102522df; }

/* A camera's coverage hole leaves the court clock and controls available. */
.ccp-camera-gap {
  position:absolute; inset:0; z-index:4; display:grid; place-items:center;
  padding:20px; background:#000; color:#fff; text-align:center; pointer-events:none;
}

.ccp-scrub-preview { z-index:4; background:#000; overflow:hidden; }
.ccp-scrub-preview img {
  position:absolute; inset:0; display:block; width:100%; height:100%;
  max-width:none; max-height:none; margin:0; padding:0; border:0; object-fit:contain;
}
/* Custom Home Screen fullscreen keeps touch targets above the system gesture area. */
.ccp-fullscreen[data-standalone="true"] .ccp-timeline {
  bottom:calc(env(safe-area-inset-bottom, 0px) + 32px);
}

.ccp-preview-track {position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;margin:0;border:0;object-fit:contain;background:#000;pointer-events:none;}

/* The paused decoder may clear on a chunk change; only verified pixels paint above it. */
.ccp-preview-picture {position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;object-fit:contain;pointer-events:none;}
.ccp-scrub-preview [data-preview-status] {z-index:1;}
.ccp-live-previews{position:absolute;bottom:4.5rem;left:1rem;right:1rem;display:flex;gap:.5rem;z-index:3;pointer-events:auto}
.ccp-shell .ccp-live-preview{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:0;flex:1;max-width:12rem;padding:0;background:#101820;border:1px solid #667;color:white;border-radius:.4rem;overflow:hidden}
.ccp-live-preview-media{display:block;position:relative;flex:none;width:100%;aspect-ratio:16/9}
.ccp-live-preview-media .ccp-media{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
/* Keep native decoders warm below the opaque selected surface. Only the
   selected camera is exposed; angle selection uses the accepted overlay menu. */
.ccp-native-camera{position:absolute;inset:0;width:100%;height:100%;background:#000;z-index:0;overflow:hidden;pointer-events:none}
.ccp-media-host:has(>.ccp-native-camera)::before{content:"";position:absolute;inset:0;background:#000;z-index:1;pointer-events:none}
.ccp-native-camera.ccp-native-selected{z-index:2}
.ccp-native-camera[data-state="preparing"]::after{content:"Connecting…";position:absolute;left:.4rem;top:.3rem;color:white;z-index:4}
.ccp-live-preview-label{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:.65rem;padding:.15rem}

.ccp-shell.ccp-editing [data-timeline]::-webkit-slider-runnable-track { background:var(--trim-rail),var(--coverage); }
.ccp-shell.ccp-editing [data-timeline]::-moz-range-track { background:var(--trim-rail),var(--coverage); }
.ccp-shell.ccp-editing [data-timeline]::-moz-range-progress { background:transparent; }

/* Speed is available in every player mode, including trim previews. */
.ccp-speed { position:relative; flex:none; }
.ccp-shell [data-speed] { border:1px solid #ffffff70; border-radius:6px; padding:3px 8px; min-width:42px; font-size:clamp(11px,1.8cqw,16px); }
.ccp-shell [data-speed-menu] { position:absolute; bottom:calc(100% + 10px); right:0; width:105px; box-sizing:border-box; max-height:min(60vh,calc(56.25cqw - 68px)); overflow:auto; padding:5px; background:#102522f5; border:1px solid #ffffff30; border-radius:12px; box-shadow:0 6px 24px #0005; }
.ccp-shell [data-speed-value] { display:block; width:100%; text-align:left; border-radius:7px; min-height:36px; padding:8px 12px; font-size:14px; }
.ccp-shell [data-speed-value][aria-checked="true"] { background:#ffffff25; }
.ccp-shell .ccp-transport [data-intent^="frame-"] { font-size:22px; min-width:40px; }

.ccp-shell .ccp-transport:has([data-intent="frame-back"]:not([hidden])) { gap:clamp(12px,3cqw,30px); }
.ccp-shell .ccp-transport:has([data-intent="frame-back"]:not([hidden])) [data-intent="back"] { margin-right:clamp(8px,5cqw,55px); }
.ccp-shell .ccp-transport:has([data-intent="frame-back"]:not([hidden])) [data-intent="forward"] { margin-left:clamp(8px,5cqw,55px); }
.ccp-shell .ccp-transport [data-intent^="frame-"] { width:clamp(32px,5cqw,48px); }
.ccp-shell .ccp-transport [data-intent^="frame-"] svg { stroke-width:2; }
