/* Active capture is a focused summary and a modal handle, without a page outline. */
body.activity-session-active #activeCaptureFrame{border:0!important;outline:0!important;box-shadow:none!important;padding:0!important;background:transparent!important}
#activeBannerReveal{display:none!important}
body.has-capture-handle #appShell{padding-top:65px!important}
.capture-status-handle{display:flex;align-items:center;justify-content:center;gap:9px;position:fixed;top:max(8px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:80;width:max-content;max-width:calc(100vw - 20px);min-height:35px;margin:0;padding:7px 16px;border:1px solid #ccdce0;border-radius:13px;background:#fff;color:#193942;font:inherit;font-size:13px;font-weight:650;white-space:nowrap;box-shadow:0 4px 16px #19394215}
.capture-status-handle time{font-variant-numeric:tabular-nums}
.capture-status-handle .activity-progress-dot{width:10px;height:10px;flex-basis:10px}
#captureStatusDialog{position:fixed;top:max(8px,env(safe-area-inset-top));margin:0 auto;width:min(590px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:0;border:0;border-radius:16px;background:transparent;color:#183832;overflow:auto;box-shadow:none}
#captureStatusDialog::backdrop{background:rgba(25,30,31,.52)}
#captureStatusDialog[open]{animation:capture-slide-in .18s ease-out}
#captureStatusDialog .capture-status-handle{position:relative;top:0;left:auto;transform:none;margin:0 auto;border-radius:13px 13px 0 0;box-shadow:none}
.capture-status-content{padding:22px;background:#fff;border:1px solid #c7dbe0;border-radius:13px;box-shadow:0 14px 38px #102d392f}
.capture-status-content h2{font-size:24px;margin:7px 0;overflow-wrap:anywhere}.capture-status-content>p{margin:0 0 18px}
.capture-status-actions{display:flex;gap:10px;margin-top:16px}.capture-status-actions button{flex:1;white-space:nowrap;font-size:13px;min-height:40px;padding:9px 12px}
#cancelSession{color:#b43344;border:1px solid #d96773;background:#fff4f4}#stopSession{background:#087653}
.capture-status-open{overflow:hidden}
#courtMatchSummary{max-width:900px;margin:auto;padding:28px 20px 32px;text-align:center}
#courtMatchSummary>.activity-progress-status{justify-content:center}
#courtMatchSummaryTitle{font-size:clamp(25px,3vw,40px);margin:18px 0 8px;overflow-wrap:anywhere}
#courtMatchSummaryText{margin:0 0 26px}
#courtMatchPlayers{margin:25px 0}.activity-match-players{min-width:0}
#courtMatchScore{margin:24px auto!important;max-width:740px!important;text-align:left}
#openCurrentMatch{min-width:170px;background:#087653;margin-top:22px}
#activityResults{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:stretch;gap:18px!important;max-height:none!important;overflow:visible!important;height:auto!important}
#activityResults>.activity-card{min-width:0!important;width:auto!important;display:flex!important;flex-direction:column;height:auto!important}
#activityResults .activity-card-main{flex:1;min-width:0}
#activityResults .activity-card-footer{margin-top:auto;flex-wrap:wrap;gap:10px}
#activityResults .activity-card-top>div:first-child{min-width:0}
#activityResults .activity-card-top h3{overflow-wrap:anywhere;white-space:normal}
#activityResults .activity-card-top-actions{flex-shrink:0}
.modern-activity .activity-card-competition{display:flex!important;flex-direction:column;align-items:stretch;gap:20px!important}
.modern-activity .activity-card-lineup{overflow:visible;min-width:0}
.modern-activity .activity-card-score{width:100%;min-width:0;max-width:100%}
.modern-activity .activity-match-players,#courtMatchPlayers .activity-match-players{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;gap:12px!important;width:100%!important;min-width:0!important}
.modern-activity .activity-match-side,#courtMatchPlayers .activity-match-side{display:flex!important;justify-content:center;flex-wrap:wrap;gap:12px;min-width:0}
.modern-activity .activity-player,#courtMatchPlayers .activity-player{min-width:0;max-width:100%}
.modern-activity .activity-match-side>*,#courtMatchPlayers .activity-match-side>*{min-width:0!important;max-width:100%!important;flex:1 1 90px}
.modern-activity .activity-match-side strong,#courtMatchPlayers .activity-match-side strong{white-space:normal!important;overflow-wrap:anywhere}
.modern-activity .activity-card-lineup .player-avatar,#courtMatchPlayers .player-avatar{width:82px!important;height:82px!important;min-width:0!important;aspect-ratio:1;flex-shrink:0;margin:auto}
.modern-activity .activity-card-lineup .player-avatar img,#courtMatchPlayers .player-avatar img{width:100%;height:100%;object-fit:cover}
.modern-activity .cc-scoreboard{--score-player-min:140px;--score-cell-width:46px}
.modern-activity .cc-scoreboard .live-score-player>strong{font-size:14px!important}
.modern-activity .cc-scoreboard .live-score-player{gap:6px;padding:8px!important}
.modern-activity .cc-scoreboard .live-score-player .player-avatar{width:29px!important;height:29px!important;min-width:29px!important;min-height:29px!important}
#courtActivitiesSection>.section-head{align-items:center;gap:18px}
#startHopperCapture{flex:none;margin:0}
.clip-activity-card .activity-card-main{background:transparent!important}
.clip-players{display:flex;flex-wrap:wrap;gap:12px;margin-top:16px}.clip-players>span{display:flex;align-items:center;gap:7px;min-width:0}.clip-players strong{font-size:13px;overflow-wrap:anywhere}
.clip-activity-card h3{margin:6px 0;overflow-wrap:anywhere}.clip-activity-card .activity-card-top{display:flex;gap:12px;justify-content:space-between}
.clip-activity-card .activity-card-top-actions{display:flex;gap:5px}.clip-activity-card .activity-card-top-actions svg{width:20px;height:20px}
.activity-progress-status{font-size:16px;gap:10px;white-space:nowrap}
.activity-progress-status time{display:inline!important;margin:0;font-variant-numeric:tabular-nums}
.activity-progress-dot{width:12px;height:12px;flex:0 0 12px}
#activityHighlightAction{flex-wrap:wrap;row-gap:12px;margin:16px 0 22px!important}
#activityHighlightAction .activity-progress-status{flex:none;max-width:100%}
@keyframes capture-slide-in{from{opacity:0;translate:0 -12px}to{opacity:1;translate:0 0}}
@media(prefers-reduced-motion:reduce){#captureStatusDialog[open]{animation:none}}
@media(max-width:800px){
  #activityResults{grid-template-columns:minmax(0,1fr)!important;gap:16px!important;scroll-snap-type:none!important;overflow:visible!important}
  #activityResults>.activity-card{height:auto!important;min-width:0!important}
  #activityCarouselControls{display:none!important}
  #courtActivitiesSection>.section-head{flex-wrap:wrap}#startHopperCapture{margin-left:auto}
  #courtMatchSummary{padding:20px 0}#courtMatchPlayers .player-avatar{width:70px!important;height:70px!important}
  .capture-status-content{padding:15px}.capture-status-content h2{font-size:21px}
  .capture-status-actions{gap:6px}.capture-status-actions button{padding:9px 7px;font-size:11px}
  .activity-progress-status{font-size:14px;gap:8px}.activity-progress-dot{width:11px;height:11px;flex-basis:11px}
  #activityHighlightAction .mark-highlight-button{margin-left:auto}
}
/* Override the historical max-content doubles lineup inside narrower new cards. */
.modern-activity .activity-card-main .activity-match-players,
.modern-activity .activity-card-main .activity-match-players.doubles{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;width:100%!important;max-width:100%!important;justify-content:stretch!important;gap:12px!important}
.modern-activity .activity-card-main .activity-match-side{width:100%!important;max-width:100%!important;min-width:0!important;flex-wrap:wrap!important;justify-content:center!important;gap:10px!important}
.modern-activity .activity-card-main .activity-player-unit{flex:1 1 74px!important;min-width:0!important;max-width:120px!important;width:auto!important}
.modern-activity .activity-card-main .activity-player-unit strong,.modern-activity .activity-card-main .activity-player-unit small{max-width:100%!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere!important;text-overflow:clip!important}
@media(max-width:800px){.modern-activity .activity-card-main .activity-match-players.doubles .activity-player-unit .player-avatar{width:62px!important;height:62px!important}.modern-activity .activity-card-main .activity-match-players.doubles{gap:8px!important}}

/* Beta 9: bounded lists and card-sized score surfaces, including legacy cards. */
#courtActivitiesSection{min-width:0}
#courtActivitiesSection>.section-head{padding-right:18px!important;padding-left:18px!important}
#activityResults{max-height:min(76dvh,1000px)!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain;scrollbar-gutter:stable;align-content:start;padding:0 18px 12px!important;scroll-behavior:auto}
#activityCarouselControls{display:none!important}
#activityResults .activity-card-competition{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:18px!important;min-width:0!important;width:100%!important;max-width:100%!important}
#activityResults .activity-card-lineup,#activityResults .activity-card-score{width:100%!important;min-width:0!important;max-width:100%!important;overflow:visible!important}
#activityResults .activity-card-main .activity-match-players,#activityResults .activity-card-main .activity-match-players.doubles{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;gap:10px!important;width:100%!important;max-width:100%!important;min-width:0!important;justify-content:stretch!important}
#activityResults .activity-card-main .activity-match-side{display:flex!important;flex-wrap:wrap!important;justify-content:center!important;gap:10px!important;width:100%!important;min-width:0!important;max-width:100%!important}
#activityResults .activity-card-main .activity-player-unit{flex:1 1 74px!important;min-width:0!important;max-width:120px!important;width:auto!important}
#activityResults .activity-card-main .activity-player-unit strong,#activityResults .activity-card-main .activity-player-unit small{white-space:normal!important;overflow-wrap:anywhere!important;max-width:100%!important;overflow:visible!important;text-overflow:clip!important}
#activityResults .activity-card-lineup .player-avatar{width:76px!important;height:76px!important;min-width:76px!important;min-height:76px!important;aspect-ratio:1!important;flex:none!important;margin:auto;box-sizing:border-box;overflow:hidden;border-radius:50%}
#activityResults .activity-card-lineup .player-avatar img{width:100%;height:100%;object-fit:cover}
#activityResults .activity-card-score .cc-scoreboard{--score-player-min:160px;--score-cell-width:68px;min-width:0!important;max-width:100%!important}
#activityResults .activity-card-main{box-sizing:border-box;width:100%;max-width:100%;overflow:visible!important}
#activityResults .activity-card:focus,#activityResults .activity-card:focus-visible,#historyResults .history-card:focus,#historyResults .history-card:focus-visible,#historyResults .activity-card:focus,#historyResults .activity-card:focus-visible{outline:none!important;box-shadow:none!important}
#startHopperCapture{display:inline-flex;align-items:center;gap:8px}#startHopperCapture svg{width:19px;height:19px;flex:none;fill:currentColor}
/* The video, its status and its rail have independent, measurable bounds. */
#activityControllerHost #courtActions{display:none!important}
#activityControllerHost .live-media-row{align-items:start!important}
#activityControllerHost #liveAlternateAngles{align-self:start;overflow-y:auto!important;min-height:0!important;box-sizing:border-box}
#activityCaptureProgress{display:flex;justify-content:flex-end;font-size:16px;margin:6px 0 10px;max-width:100%;white-space:nowrap}
#activityCaptureProgress .activity-progress-dot{width:13px;height:13px;flex:0 0 13px}
#activityMediaViewer .activity-under-video{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start;margin:12px 0 0;padding:0;min-width:0}
#activityMediaViewer #activityHighlightAction{margin:0!important;padding:0!important;display:flex;align-items:flex-start;justify-content:flex-end}
#activityMediaViewer #activityScoreSlot{margin:0!important;padding:0!important;min-width:0}
#activityScoreSlot #currentMatchScoreboard{margin:0!important;max-width:100%!important}
#activityMediaViewer #activityHighlightAction .mark-highlight-button{margin:0!important;white-space:nowrap}
.activity-footer-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-left:auto}
.highlight-card{container-type:inline-size}.highlight-delete{bottom:auto!important;top:calc(56.25cqw + 7px)!important;display:grid!important;place-items:center!important;margin:0!important}
/* Player placeholders do not shrink into ovals or split their labels. */
.player-picker-preview{min-width:0!important;flex-wrap:wrap;justify-content:center}
.player-picker-preview>.player-avatar{box-sizing:border-box!important;flex:none!important;width:76px!important;height:76px!important;min-width:76px!important;min-height:76px!important;aspect-ratio:1!important;border-radius:50%!important;overflow:hidden!important}
.player-picker-preview>.player-avatar img{width:100%!important;height:100%!important;object-fit:cover!important}
.player-picker-preview>span:not(.player-avatar){min-width:0;max-width:100%}.player-picker-preview.placeholder strong{white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important}
.cc-scoreboard .cc-format-select{appearance:none;border:1px solid #78a793!important;border-radius:7px!important;background-color:#f5fcf8!important;padding:8px 27px 8px 10px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='20' viewBox='0 0 12 20'%3E%3Cpath d='m3 7 3-3 3 3M3 13l3 3 3-3' fill='none' stroke='%23235b45' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:right 9px center;background-repeat:no-repeat;min-height:36px}
#activityViewDialog.capture-setup-face,#activityViewDialog.capture-finalize-face{box-sizing:border-box;max-width:calc(100vw - 24px)!important;width:min(900px,calc(100vw - 24px))!important;max-height:90dvh;padding:26px!important;overflow:auto}
#activityViewDialog.capture-finalize-face{width:min(720px,calc(100vw - 24px))!important}
#activityViewDialog:is(.capture-setup-face,.capture-finalize-face)>.activity-view-head,#activityViewDialog:is(.capture-setup-face,.capture-finalize-face)>#activityViewBody{display:none!important}
#captureFlowFace{width:100%;min-width:0}#captureFlowFace.finalize-match-modal{width:100%}#captureFlowFace #liveCaptureSection{display:block!important;margin:0;padding:0;border:0;box-shadow:none}
#activityViewDialog.activity-turning{overflow:hidden!important;pointer-events:none;box-sizing:border-box}
@media(max-width:800px){#activityResults{overflow-y:auto!important;max-height:76dvh!important}#activityResults .activity-card-lineup .player-avatar{width:62px!important;height:62px!important;min-width:62px!important;min-height:62px!important}}
@media(max-width:700px){#activityMediaViewer .activity-under-video{grid-template-columns:minmax(0,1fr);gap:10px}#activityHighlightAction{grid-row:2}#activityCaptureProgress{font-size:14px;gap:8px}.player-picker-preview>.player-avatar{width:62px!important;height:62px!important;min-width:62px!important;min-height:62px!important}#activityViewDialog.capture-setup-face,#activityViewDialog.capture-finalize-face{padding:18px!important}}

.court-fullscreen-mode #activityCaptureProgress{display:none!important}

#courtActivitiesSection>.section-head{padding-right:calc(18px + var(--activity-scroll-gutter,0px))!important}

/* Mobile pages stretch to the tallest card without changing height during swipes. */
@media(max-width:760px){
  #courtActivitiesSection,#instantReplaysSection{height:auto!important;min-height:0!important;max-height:none!important}
  #courtActivitiesSection>.section-head{padding-left:0!important;padding-right:0!important}
  #activityResults,#historyResults{display:flex!important;grid-template-columns:none!important;align-items:stretch!important;gap:0!important;width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;padding:0!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-gutter:auto!important;scroll-snap-type:x mandatory!important;scrollbar-width:none;overscroll-behavior-x:contain;overscroll-behavior-y:auto;scroll-behavior:auto}
  #activityResults>.activity-card,#activityResults>.card,#historyResults>.mobile-replay-page{flex:0 0 100%!important;width:100%!important;min-width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;box-sizing:border-box;scroll-snap-align:start;scroll-snap-stop:always}
  #historyResults>.mobile-replay-page{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto!important;gap:0!important;padding:0!important}
  #historyResults>.mobile-replay-page>.card{height:auto!important;min-height:0!important;max-width:100%!important;min-width:0!important}
  #activityCarouselControls:not(.hidden),#replayCarouselControls:not(.hidden){display:flex!important}
  #activityCarouselControls.hidden,#replayCarouselControls.hidden{display:none!important}
}

@media(max-width:760px){
  #activityResults .activity-card-main,#activityResults .activity-card-competition,#historyResults .activity-card-main,#historyResults .history-top{flex:0 0 auto!important}
  #historyResults>.mobile-replay-page>.card{display:flex!important;flex-direction:column;align-self:stretch}
  #historyResults .activity-card-footer,#historyResults .history-footer{margin-top:auto!important}
  #activityResults,#historyResults{overflow-anchor:none;scroll-padding:0}
}

/* Keep doubles teammates beside each other, scaling portraits to each column. */
#activityResults .activity-card-main .activity-match-players.doubles .activity-match-side,
#courtMatchPlayers .activity-match-players.doubles .activity-match-side{display:grid!important;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);align-items:start!important;gap:6px!important}
#activityResults .activity-card-main .activity-match-players.doubles .activity-player-unit,
#courtMatchPlayers .activity-match-players.doubles .activity-player-unit{width:100%!important;min-width:0!important;max-width:none!important}
#activityResults .activity-card-main .activity-match-players.doubles .activity-player-unit>.player-avatar,
#courtMatchPlayers .activity-match-players.doubles .activity-player-unit>.player-avatar{width:min(62px,100%)!important;height:auto!important;min-width:0!important;min-height:0!important;aspect-ratio:1!important;box-sizing:border-box!important}
#activityResults .activity-card-main .activity-match-players.doubles .activity-player-unit>span:last-child,
#courtMatchPlayers .activity-match-players.doubles .activity-player-unit>span:last-child{width:100%;min-width:0}

#smartMatchCandidates{display:grid;gap:12px;margin:12px 0}
#smartMatchCandidates .activity-card{padding:16px}
#smartMatchReviewDialog fieldset{min-width:0;margin:14px 0;padding:14px;border:1px solid #c9dde6;border-radius:12px}
#smartMatchReviewDialog fieldset label:has(input[type="checkbox"]){display:flex;align-items:center;gap:10px;margin:10px 0}
#smartMatchReviewDialog input[type="checkbox"]{appearance:auto;-webkit-appearance:checkbox;width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;flex:0 0 22px!important;margin:0!important;padding:0!important;accent-color:var(--court-blue)}
#smartMatchReviewDialog fieldset button{margin:8px 0;max-width:100%}
#smartMatchReviewDialog .modal-actions{flex-wrap:wrap}

/* Smart Match review uses the shared trim player and ordinary activity fields. */
/* Match the established soft keyboard highlight, including newly added controls.
   The media player's thumb/button focus styling remains owned by player.css. */
:is(#smartMatchReviewDialog,#finalizeClipDialog) button:not(.ccp-shell button),
#smartMatchCandidates [role="button"],#smartMatchCandidates button,#showRecentlyDeleted{--hopper-focus:0 0 0 2px rgba(23,109,168,.20)}
:is(#smartMatchReviewDialog,#finalizeClipDialog) button:not(.ccp-shell button):focus,
#smartMatchCandidates [role="button"]:focus,#smartMatchCandidates button:focus,#showRecentlyDeleted:focus{outline:none}
:is(#smartMatchReviewDialog,#finalizeClipDialog) button:not(.ccp-shell button):focus-visible,
#smartMatchCandidates [role="button"]:focus-visible,#smartMatchCandidates button:focus-visible,#showRecentlyDeleted:focus-visible{box-shadow:var(--hopper-focus)}
#smartMatchSection[hidden],#recentlyDeletedPanel[hidden]{display:none!important}
#smartMatchSection>.section-head{padding:0 18px}
#smartMatchCandidates{--smart-card-height:180px;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;max-height:calc(var(--smart-card-height)*1.5 + 16px);overflow-y:auto;overflow-x:hidden;align-content:start;scrollbar-gutter:stable;padding:0 18px 12px;margin:16px 0 0;overscroll-behavior:contain;overflow-anchor:none}
#smartMatchCandidates>.smart-match-card{padding:0;min-height:var(--smart-card-height);height:var(--smart-card-height);display:flex;flex-direction:column;cursor:pointer;overflow:hidden}
.smart-match-card .activity-card-main{padding:18px;flex:1}.smart-match-card h3,.smart-match-card p{margin:0 0 6px}
.smart-match-card .activity-card-footer{margin-top:auto;padding:10px 18px;display:flex;justify-content:flex-end}
.smart-match-card .activity-card-footer button{padding:6px 18px}
#showRecentlyDeleted{margin-left:auto;white-space:nowrap}
#historyView.showing-recently-deleted :is(#smartMatchSection,#smartMatchReadiness,#courtActivitiesSection,#instantReplaysSection,#recommendedSection){display:none!important}
#recentlyDeletedItems{display:grid;gap:16px;padding:0 18px 18px}
#recentlyDeletedItems>section{border-bottom:1px solid var(--border,#dce5e2);padding:12px 0;display:flex;align-items:center;justify-content:space-between;gap:16px}
#smartMatchReviewDialog .smart-review-details{background:#f7faf8;border-radius:16px;padding:20px;margin-top:24px}
#smartMatchReviewDialog .smart-review-details>label{display:block;margin-top:24px;margin-bottom:10px;font-weight:700}
#smartMatchReviewDialog .smart-review-details>h3{margin:20px 0}
#smartReviewScore{margin:24px 0}
#smartMatchReviewDialog [hidden]{display:none!important}
#smartMatchReviewDialog .modal-actions{margin-top:24px;gap:12px}
#finalizeClipDialog .clip-field-heading{display:block;margin-top:24px;margin-bottom:10px}
@media(max-width:760px){
  #smartMatchSection>.section-head{padding:0}
  #smartMatchCandidates{display:flex;gap:0;max-height:none;padding:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scrollbar-gutter:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain}
  #smartMatchCandidates>.smart-match-card{flex:0 0 100%;min-width:100%;max-width:100%;scroll-snap-align:start;scroll-snap-stop:always;box-sizing:border-box}
  #smartCarouselControls:not(.hidden){display:flex}
  #smartMatchReviewDialog .smart-review-details{padding:14px}
  #showRecentlyDeleted{font-size:13px;padding:10px 12px}
}

/* Match setup contains metadata only; every recording retains all court feeds. */
.match-details-grid.match-details-metadata-only{grid-template-columns:minmax(0,1fr)!important}

#recentlyDeletedItems{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.retained-activity .activity-card-footer{display:flex;align-items:center;gap:12px;justify-content:space-between}.retained-activity .activity-card-main{flex:1}.smart-match-card [data-smart-expiry]{font-size:13px;margin-bottom:0}@media(max-width:700px){#recentlyDeletedItems{grid-template-columns:1fr}}
