/* Replay detail and shared transcript player — DESIGN.md, 2026-11-09. */
body:has(.task-replay-page) .content-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding-bottom:20px}
body:has(.task-replay-page) .content-header h1{font-size:24px;line-height:1.35;margin:0}
body:has(.task-replay-page) .content-tabs{margin:0}
html body .task-replay-page{display:grid;grid-template-columns:44px minmax(0,1fr);gap:16px 12px;align-items:center}
html body .task-replay-page>.back-navigation-button{grid-column:1;grid-row:1;width:44px;height:44px;margin:0;background:var(--surface);border:1px solid var(--line);border-radius:10px}
html body .task-page-heading{grid-column:2;grid-row:1;margin:0;gap:12px;align-items:center;min-width:0}
.task-page-heading>div{min-width:0}
html body .task-page-heading h2{font-size:20px;line-height:1.4;overflow-wrap:anywhere}
html body .task-page-heading p{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:13px;line-height:1.6;margin:4px 0 0;color:var(--muted);font-variant-numeric:tabular-nums}
html body .task-page-actions{grid-column:1/-1;display:flex;gap:8px;align-items:center;margin:0}
html body .task-page-actions .button{min-height:44px;padding:8px 12px;font-size:13px;font-weight:500;border:1px solid var(--line);background:var(--surface);color:var(--ink);box-shadow:none;white-space:nowrap}
.replay-export-menu{width:auto;flex:none}
.replay-export-menu>summary{display:flex;align-items:center;justify-content:center;gap:7px;width:auto;height:44px;list-style:none;cursor:pointer}
.replay-export-menu>summary::-webkit-details-marker{display:none}
.replay-export-menu>summary svg:last-child:not(:first-child){width:14px}
.replay-export-menu .card-menu-actions{min-width:220px}
html body .task-replay-page>.notice,html body .task-replay-layout{grid-column:1/-1;min-width:0;margin:0}
html body .task-replay-layout .panel-player-header{display:none}
html body .task-replay-layout>.transcript-side-panel{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:24px;background:none;border:0;padding:0}
.task-replay-layout .panel-media-slot{border-radius:12px;overflow:hidden;background:#24262b}
html body .task-replay-layout :is(.panel-media-slot,.panel-media-slot video){height:clamp(300px,42vh,460px)}
.panel-playback-area,.panel-text-area{min-width:0}
.task-playback-progress{margin:8px 0 0}
.replay-progress-heading{display:flex;align-items:center;justify-content:space-between;min-height:44px;color:var(--muted);font-size:12px}
.replay-progress-tools{display:flex;gap:0}
.replay-progress-tools .icon-button{width:44px;height:44px;border:0;background:transparent;border-radius:8px;color:var(--muted)}
.replay-progress-tools .icon-button[aria-pressed=true]{color:var(--ink);background:var(--soft)}
.replay-progress-tools .icon-button:hover{background:var(--soft);color:var(--ink)}
html .task-playback-progress input[type=range]{min-height:44px;height:44px;margin:0;padding:0;background:transparent;border:0;box-shadow:none}
.replay-progress-rail{position:relative;height:66px}
html .replay-progress-rail>input[type=range]{position:absolute;top:22px;left:0;width:100%}
.task-playback-clock{font-size:12px;line-height:1.5;color:var(--muted);font-variant-numeric:tabular-nums}
.speaker-marker-track{position:absolute;top:0;left:7px;right:7px;height:44px;isolation:isolate;z-index:1;pointer-events:none}
.speaker-marker-track.is-empty{display:none}
.speaker-marker-note{font-size:12px;color:var(--muted);margin:4px 0 8px;line-height:1.6}
html body .speaker-marker-track .speaker-marker-target{position:absolute;top:0;display:block;height:44px;min-height:44px;min-width:44px;padding:0;border:0;background:transparent;border-radius:6px;cursor:pointer;color:var(--ink);box-shadow:none;transform:none;pointer-events:auto}
.speaker-marker-target .speaker-marker-bookmark{position:absolute;bottom:0;display:block;width:10px;height:12px;fill:var(--speaker-marker-color);stroke:var(--surface);stroke-width:.65;stroke-linejoin:round;opacity:.85;transform:translateX(-50%);pointer-events:none;transition:opacity 150ms ease}
.speaker-marker-target.is-pointed .speaker-marker-bookmark.is-current-point{opacity:1}
html body .speaker-marker-track .speaker-marker-target:focus-visible{outline:1px solid var(--focus-ring);outline-offset:-1px}
.speaker-marker-tooltip,.replay-progress-tooltip{position:absolute;top:28px;z-index:2;display:flex;align-items:center;gap:10px;max-width:100%;padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);box-shadow:0 3px 12px rgb(0 0 0 / .1);font-size:12px;line-height:1.4;white-space:nowrap;pointer-events:none;transform:translate(-50%,-100%)}
.speaker-marker-tooltip[hidden],.replay-progress-tooltip[hidden]{display:none}
.replay-progress-tooltip time{font-variant-numeric:tabular-nums}
.speaker-marker-tooltip span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.speaker-marker-tooltip time{font-variant-numeric:tabular-nums;color:var(--muted)}
html .task-playback-controls{display:flex;align-items:center;gap:4px;margin:6px 0 0;flex-wrap:nowrap}
html .task-playback-controls .icon-button{width:44px;height:44px;min-width:44px;min-height:44px;padding:12px;color:var(--ink);background:transparent;border:0;border-radius:8px}
html .task-playback-controls .icon-button:hover{background:var(--soft)}
html .task-playback-controls .icon-button:disabled{opacity:.35;background:transparent}
html .task-playback-controls input[type=range]{flex:0 1 90px;max-width:90px;min-width:40px;margin-right:auto}
html .task-rate-label select{height:44px;min-height:44px;background:transparent;border-color:transparent;max-width:84px;font-size:13px}
html .task-rate-label select:hover{background:var(--soft)}
.replay-progress-tools svg,.task-playback-controls svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.panel-playback-message:has(.panel-playback-status:empty):not(:has(button:not([hidden]))){display:none}
.panel-playback-status{font-size:12px;line-height:1.6;color:var(--muted);margin:8px 0}
html .panel-record-details{border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;padding:0;margin-top:12px;color:var(--muted)}
.panel-record-details>summary{display:flex;align-items:center;gap:8px;min-height:44px;font-size:13px;list-style:none}
.panel-record-details>summary::-webkit-details-marker{display:none}
.panel-record-details>summary::before{content:'›';font-size:20px;line-height:1;transition:transform 150ms ease}
.panel-record-details[open]>summary::before{transform:rotate(90deg)}
.panel-record-details>summary>span{margin-left:auto;font-variant-numeric:tabular-nums}
.panel-record-details .panel-record-picker{margin:4px 0 12px}
.panel-transcript-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:0;border-bottom:1px solid var(--line);padding:0 0 8px}
.panel-transcript-heading h3{font-size:16px;font-weight:600;line-height:1.5;margin:0;color:var(--ink)}
html .panel-transcript-heading .panel-follow-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0;min-height:44px}
.panel-follow-controls label{display:inline-flex;align-items:center;gap:5px;min-height:44px;font-size:12px;color:var(--muted);cursor:pointer}
html .task-replay-layout .panel-transcript-scroll{height:clamp(380px,calc(100dvh - 340px),700px);min-height:280px;scroll-padding-block:20px}
.panel-cue-row{grid-template-columns:minmax(0,1fr) 44px}
.panel-cue-row .panel-cue{font-size:14px;line-height:1.75;color:var(--ink)}
.panel-cue-row .panel-cue-time{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.panel-cue-row .cue-text-trigger{color:var(--ink);line-height:1.75;text-align:left}
.panel-text-area{--current-cue-background:#e2eaf5;--current-cue-marker:#6d8fb7}
html[data-theme=dark] .panel-text-area{--current-cue-background:#34465c;--current-cue-marker:#9eb9db}
html .panel-cue-row .panel-cue.active{background:var(--current-cue-background);color:var(--ink);border-left-color:var(--current-cue-marker)}
html .panel-cue-row .panel-cue.active .panel-cue-time{color:var(--ink);font-weight:600}
html .panel-cue-row .panel-cue.active .cue-text-trigger{font-weight:500}
html .panel-cue-favorite{width:44px;min-width:44px;height:44px;margin:0;padding:12px;color:var(--muted)}
html .panel-export-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:12px;margin-top:12px}
.panel-export-actions .button{min-height:44px;font-size:13px;box-shadow:none}
.panel-transcript-summary{font-size:12px;color:var(--muted);margin-left:auto}
.replay-info-copy p{color:var(--ink);font-size:14px;line-height:1.8;margin-bottom:14px}
@media(min-width:1500px){
 html body .task-replay-page{grid-template-columns:44px minmax(0,1fr) auto}
 html body .task-page-actions{grid-column:3;grid-row:1}
}
@media(max-width:1100px){
 html body .task-replay-layout>.transcript-side-panel{grid-template-columns:1fr;gap:20px}
 html body .task-replay-layout :is(.panel-media-slot,.panel-media-slot video){height:360px}
 html body .task-replay-layout .panel-text-area{margin-top:0}
 html .task-replay-layout .panel-transcript-scroll{height:440px}
}
@media(max-width:600px){
 html body .task-page-actions{grid-column:1/-1;grid-row:auto;flex-wrap:wrap}
 html body .task-page-heading{align-items:flex-start;flex-wrap:wrap}
 html body .task-page-heading h2{font-size:18px}
 html body .task-replay-layout :is(.panel-media-slot,.panel-media-slot video){height:300px}
 .panel-transcript-summary{width:100%;margin:0}
}
@media(max-width:760px){
 body:has(.task-replay-page) .workspace-shell .site-header{background:var(--canvas)}
}
@media(prefers-reduced-motion:reduce){.speaker-marker-bookmark,.panel-record-details>summary::before{transition:none}}
html body .task-replay-layout .panel-playback-area:fullscreen{display:flex;flex-direction:column;background:var(--surface);padding:16px;overflow:auto}
html body .task-replay-layout .panel-playback-area:fullscreen .panel-media-slot{flex:1;min-height:0;height:auto}
html body .task-replay-layout .panel-playback-area:fullscreen video{height:100%;max-height:100%;width:100%;object-fit:contain}

/* Stable reading position while variable-height transcript rows are windowed. */
.panel-transcript-scroll { overflow-anchor: none; }
.transcript-virtual-spacer { pointer-events: none; margin: 0; padding: 0; border: 0; }
