/* Portal CSS part: review page V6, no-versions empty state and inline comment. */
/* Split from portal.css (Phase 6): linked straight after portal.css and the earlier portal-*.css parts, in this order, so the cascade is unchanged. */

/* ═══════════════════════════════════════════════════
   REVIEW PAGE V6 (portal-review.html)
   Forest green bg, minimal top bar, split layout
═══════════════════════════════════════════════════ */

body.review-page {
  background: var(--bg, var(--green-deep));
  color: var(--text-primary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ── Top bar — minimal info row ── */
.review-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.05);
  min-height: 48px;
  z-index: var(--rf-z-sticky);
}

.review-bar-left {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-left: 160px;
  min-width: 0;
}

.review-title {
  /* Brand display font = Behind The Nineties via --font-display (theme.css). */
  font-family: var(--rf-type-heading-family);
  font-weight: var(--rf-type-heading-weight);
  color: rgba(var(--rf-tone-neutral-rgb), 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  --rf-type-heading-size: var(--rf-type-size-16px);
}

#review-status-badge { display: none; }

.review-bar-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.review-version-dropdown {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 28px;
  padding: 0 28px 0 var(--space-2);
  border-radius: 8px;
  border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.1);
  background:
    linear-gradient(45deg, transparent 50%, rgba(var(--rf-tone-neutral-rgb), 0.58) 50%) calc(100% - 16px) 10px / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(var(--rf-tone-neutral-rgb), 0.58) 50%, transparent 50%) calc(100% - 11px) 10px / 6px 6px no-repeat,
    rgba(var(--rf-tone-neutral-rgb), 0.04);
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-11px, 11px);
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
}

.review-share {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.16);
  border-radius: 8px;
  background: rgba(var(--rf-tone-neutral-rgb), 0.08);
  color: var(--text-primary);
  font: 600 var(--rf-type-size-12px, 12px)/var(--rf-type-leading-1, 1) var(--font-body);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.review-share:hover {
  background: rgba(var(--rf-tone-neutral-rgb), 0.12);
  border-color: rgba(var(--rf-tone-neutral-rgb), 0.24);
}

.review-share svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.team-review-mode .review-screening-label {
  color: var(--orange);
}

.review-share-dialog {
  width: min(520px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.16);
  border-radius: 12px;
  background: var(--bg-panel, var(--client-panel-solid));
  color: var(--client-review-text);
}

.review-share-dialog::backdrop {
  background: color-mix(in srgb, var(--black) 72%, transparent);
  backdrop-filter: blur(6px);
}

.review-share-card {
  padding: var(--space-5);
}

.review-share-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.review-share-heading h2 {
  margin: 0;
  color: var(--client-review-text);
  font-weight: var(--rf-type-heading-weight);
  line-height: var(--rf-type-leading-1-2);
  --rf-type-heading-size: var(--rf-type-size-20px);
}

.review-share-heading p {
  max-width: 58ch;
  margin: var(--space-2) 0 0;
  color: var(--client-review-muted);
  font: 400 var(--rf-type-size-13px, 13px)/1.5 var(--font-body);
  --rf-type-heading-size: var(--rf-type-size-13px);
}

.review-share-close {
  flex: 0 0 auto;
}

.review-share-label {
  display: block;
  margin-top: var(--space-5);
  color: var(--client-review-text);
  font: 600 var(--rf-type-size-12px, 12px)/var(--rf-type-leading-1-3, 1.3) var(--font-body);
}

.review-share-url {
  width: 100%;
  min-height: 44px;
  margin-top: var(--space-2);
  padding: 0 var(--space-3);
  border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.16);
  border-radius: 8px;
  background: color-mix(in srgb, var(--black) 30%, transparent);
  color: var(--text-primary);
  font: 500 var(--rf-type-size-12px, 12px)/var(--rf-type-leading-1-3, 1.3) var(--font-mono);
}

.review-share-status {
  min-height: 20px;
  margin: var(--space-2) 0 0;
  color: var(--client-review-muted);
  font: 500 var(--rf-type-size-12px, 12px)/var(--rf-type-leading-1-4, 1.4) var(--font-body);
}

.review-share-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.review-share-primary,
.review-share-secondary {
  min-height: 42px;
  padding: 0 var(--space-4);
  border-radius: 8px;
  font: 650 var(--rf-type-size-13px, 13px)/var(--rf-type-leading-1, 1) var(--font-body);
  cursor: pointer;
}

.review-share-primary {
  border: 1px solid var(--orange);
  background: var(--orange);
  color: var(--bg, var(--black));
}

.review-share-secondary {
  border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.16);
  background: var(--rf-tone-neutral-fill);
  color: var(--client-review-text);
}

/* ── Main split layout ── */
.review-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr minmax(0, 360px);
  min-height: 0;
  overflow: hidden;
  max-width: 100vw;
}

/* ── Left: video area ── */
.review-video-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 24px 16px 24px;
}

.video-container {
  flex: 0 1 auto;
  max-height: calc(100vh - 200px);
  min-height: 300px;
  background: var(--black);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
}

/* Player fills the video container */
.review-video-area .video-container .player-wrap,
.review-video-area .video-container.player-wrap {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  max-width: none;
  border: none;
  border-radius: 0;
  background: var(--black);
}

.review-video-area .video-container video,
.review-video-area .video-container.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Commenter name bar ── */
.commenter-name-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--space-2) 0;
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-11px, 11px);
  color: rgba(var(--rf-tone-neutral-rgb), 0.5);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.commenter-name-bar input[type="text"] {
  flex: 1;
}

/* Attention pulse — triggered by JS when the bar is revealed mid-action */
@keyframes name-bar-pulse {
  0%   { border-color: rgba(var(--orange-rgb), 0.15); box-shadow: none; }
  30%  { border-color: rgba(var(--orange-rgb), 0.8);  box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.18); }
  70%  { border-color: rgba(var(--orange-rgb), 0.6);  box-shadow: 0 0 0 2px rgba(var(--orange-rgb), 0.10); }
  100% { border-color: rgba(var(--orange-rgb), 0.15); box-shadow: none; }
}
.commenter-name-bar.name-bar-flash {
  border-radius: 10px;
  animation: name-bar-pulse 1.5s ease forwards;
}

/* ── Format pills below video ── */
#format-section {
  padding: 12px 0 0;
  flex-shrink: 0;
}

.portal-format-pill {
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-10px, 10px);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
  border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.08);
  background: rgba(var(--rf-tone-neutral-rgb), 0.03);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.portal-format-pill:hover {
  border-color: rgba(var(--rf-tone-neutral-rgb), 0.15);
  color: var(--text-secondary);
}
.portal-format-pill.active {
  background: linear-gradient(180deg, rgba(255,210,120,0.5) 0%, var(--orange) 40%, var(--orange-dark) 100%);
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(var(--orange-rgb), 0.25), inset 0 1px 0 rgba(255,235,160,0.4);
}

/* Override standardisation cream color — white is clearer on green */
body.review-page .portal-format-pill,
body.watch-page .portal-format-pill {
  color: rgba(var(--rf-tone-neutral-rgb), 0.45);
  border-color: rgba(var(--rf-tone-neutral-rgb), 0.12);
}
body.review-page .portal-format-pill:hover,
body.watch-page .portal-format-pill:hover {
  color: rgba(var(--rf-tone-neutral-rgb), 0.75);
  border-color: rgba(var(--rf-tone-neutral-rgb), 0.2);
}
body.review-page.portal-page .portal-format-selector .portal-format-pill.active,
body.watch-page.portal-page .portal-format-selector .portal-format-pill.active {
  background: rgba(var(--orange-rgb), 0.2);
  color: white;
  border-color: rgba(var(--orange-rgb), 0.5);
  box-shadow: none;
}

/* ── Right: feedback sidebar ── */
.feedback-sidebar {
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.06);
  background: color-mix(in srgb, var(--black) 15%, transparent);
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
}

/* Panel tabs (Feedback / Transcript) */
.review-panel-tabs {
  display: flex;
  border-bottom: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.05);
  flex-shrink: 0;
}

.review-tab {
  flex: 1;
  height: 40px;
  background: transparent;
  border: none;
  border: none;
  font-family: var(--client-type-body, var(--font-body));
  font-size: var(--rf-type-size-12px, 12px);
  font-weight: 500;
  color: rgba(var(--rf-tone-neutral-rgb), 0.3);
  cursor: pointer;
  transition: color 0.15s ease;
  position: relative;
}
.review-tab:hover { color: rgba(var(--rf-white-rgb), 0.55); }
.review-tab.active { color: var(--orange); }
.review-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 1px;
  background: var(--orange);
}

/* Feedback panel content */
.feedback-panel-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

/* Transcript panel */
.transcript-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.transcript-search-wrap {
  position: relative;
  padding: var(--space-2) 20px;
  border-bottom: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.05);
  flex-shrink: 0;
}

.transcript-search-input {
  width: 100%;
}

.transcript-search-count {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-9px, 9px);
  color: rgba(var(--rf-tone-neutral-rgb), 0.3);
}

.transcript-download-bar {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) 20px;
  border-bottom: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.05);
  flex-shrink: 0;
}

.transcript-dl-btn {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.08);
  background: rgba(var(--rf-tone-neutral-rgb), 0.04);
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-9px, 9px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(var(--rf-tone-neutral-rgb), 0.3);
  text-decoration: none;
  transition: all 0.15s ease;
}
.transcript-dl-btn:hover {
  background: rgba(var(--rf-tone-neutral-rgb), 0.08);
  color: var(--text-secondary);
}

.transcript-lines {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2) 20px;
}

.transcript-line {
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  font-size: var(--rf-type-size-12px, 12px);
  color: rgba(var(--rf-tone-neutral-rgb), 0.5);
  line-height: 1.6;
  cursor: pointer;
  transition: background 0.15s ease;
}
.transcript-line:hover { background: rgba(var(--rf-tone-neutral-rgb), 0.04); }
.transcript-line.active {
  background: rgba(var(--orange-rgb), 0.08);
  color: var(--text-primary);
}

body.review-page.portal-page .transcript-timecode {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: pointer;
}

body.review-page.portal-page .transcript-timecode:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.transcript-speaker {
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-10px, 10px);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-right: var(--space-2);
}

/* ── Approval section (footer) ── */
.approval-section {
  padding: var(--space-3) 20px;
  border-top: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.06);
  flex-shrink: 0;
  background: color-mix(in srgb, var(--black) 10%, transparent);
  margin-top: auto;
}

.approval-label {
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-9px, 9px);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(var(--rf-tone-neutral-rgb), 0.25);
  margin-bottom: var(--space-2);
  display: none;
}

.approval-buttons {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.approval-status {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-11px, 11px);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-align: center;
  padding: 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
}
.approval-status.approved { color: var(--rf-tone-success-ink); }
.approval-status.changes-requested { color: var(--orange); }

/* ── Filter tabs ── */
.filter-tabs {
  display: flex;
  padding: 0 20px;
  border-bottom: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.05);
  flex-shrink: 0;
}

.filter-tab {
  font-family: var(--font-body);
  font-size: var(--rf-type-size-13px, 13px);
  font-weight: 500;
  color: rgba(var(--rf-tone-neutral-rgb), 0.35);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  border: none;
  background: none;
  position: relative;
  transition: color 0.15s ease;
}
.filter-tab:hover { color: rgba(var(--rf-tone-neutral-rgb), 0.55); }
.filter-tab.active { color: var(--orange); }
.filter-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 1px;
  background: var(--orange);
}

/* ── Comments list ── */
.comments-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  min-height: 0;
}
.comments-area::-webkit-scrollbar { width: 4px; }
.comments-area::-webkit-scrollbar-track { background: transparent; }
.comments-area::-webkit-scrollbar-thumb { background: rgba(var(--rf-tone-neutral-rgb), 0.08); border-radius: 2px; }

/* Comment items (rendered by JS) */
.comment-item {
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.04);
  transition: background 0.15s ease;
  display: flex;
  gap: var(--space-2);
}
.comment-item:last-child { border-bottom: none; }
.comment-item:hover { background: rgba(var(--rf-tone-neutral-rgb), 0.02); border-radius: 8px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.comment-item.active { background: rgba(var(--orange-rgb), 0.06); border-radius: 8px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
body.review-page.portal-page .comment-item:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.comment-item.resolved { opacity: 0.45; }
.comment-item.comment-reply { margin-left: 24px; }

.comment-reply-indent {
  display: block;
  width: 2px;
  background: rgba(var(--rf-tone-neutral-rgb), 0.08);
  align-self: stretch;
  border-radius: 1px;
  flex-shrink: 0;
}

body.review-page.portal-page .comment-timecode-wrap {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}

.comment-timecode {
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-10px, 10px);
  font-weight: 500;
  padding: var(--space-1) 8px;
  border-radius: var(--radius-sm);
  background: rgba(var(--orange-rgb), 0.1);
  color: rgba(var(--orange-rgb), 0.75);
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
  align-self: flex-start;
  margin-top: 2px;
}
.comment-timecode:hover { background: rgba(var(--orange-rgb), 0.2); }

body.review-page.portal-page .comment-timecode {
  appearance: none;
  min-height: 32px;
  border: 1px solid transparent;
}

body.review-page.portal-page .comment-timecode:disabled {
  border-color: rgba(var(--rf-tone-neutral-rgb), 0.1);
  background: rgba(var(--rf-tone-neutral-rgb), 0.04);
  color: var(--text-secondary);
  cursor: not-allowed;
}

body.review-page.portal-page .comment-timecode-status {
  max-width: 72px;
  color: var(--text-secondary);
  font-size: var(--rf-type-size-10px, 10px);
  font-weight: 600;
  line-height: var(--rf-type-leading-1-3, 1.3);
}
body.review-page.portal-page .comment-timecode-status:empty { display: none; }

.comment-body { flex: 1; min-width: 0; }

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author {
  font-family: var(--font-body);
  font-size: var(--rf-type-size-13px, 13px);
  font-weight: 600;
  color: rgba(var(--rf-tone-neutral-rgb), 0.75);
}

.comment-date {
  font-family: var(--font-body);
  font-size: var(--rf-type-size-12px, 12px);
  color: rgba(var(--rf-tone-neutral-rgb), 0.2);
  margin-left: auto;
}

.comment-text {
  font-family: var(--font-body);
  font-size: var(--rf-type-size-13px, 13px);
  color: rgba(var(--rf-tone-neutral-rgb), 0.55);
  line-height: 1.5;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.comment-resolve-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--rf-type-size-12px, 12px);
  color: rgba(var(--rf-tone-neutral-rgb), 0.25);
  user-select: none;
  transition: color 0.15s ease;
}
.comment-resolve-toggle:hover { color: rgba(var(--rf-tone-neutral-rgb), 0.45); }

.comment-resolve-cb { display: none; }

body.review-page.portal-page .comment-resolve-toggle {
  position: relative;
}

body.review-page.portal-page .comment-resolve-cb {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body.review-page.portal-page .comment-resolve-cb:focus-visible + .comment-resolve-check {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(var(--orange-rgb), 0.14);
}

.comment-resolve-check {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.12);
  background: rgba(var(--rf-tone-neutral-rgb), 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.comment-resolve-cb:checked + .comment-resolve-check {
  background: rgba(var(--rf-tone-success-rgb), 0.15);
  border-color: rgba(var(--rf-tone-success-rgb), 0.3);
}

.comment-resolve-cb:checked + .comment-resolve-check::after {
  content: '\2713';
  font-size: var(--rf-type-size-10px, 10px);
  color: var(--rf-tone-success-ink);
  font-weight: 700;
}

/* ── Empty state ── */
.comment-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: rgba(var(--rf-tone-neutral-rgb), 0.2);
  text-align: center;
  gap: 8px;
  padding: 40px 20px;
}
.comment-empty-icon { opacity: 0.3; }
.comment-empty-title {
  font-family: var(--rf-type-heading-family);
  font-weight: var(--rf-type-heading-weight);
  color: rgba(var(--rf-tone-neutral-rgb), 0.35);
  margin: 0;
  --rf-type-heading-size: var(--rf-type-size-14px);
}
.comment-empty-sub {
  font-size: var(--rf-type-size-12px, 12px);
  color: rgba(var(--rf-tone-neutral-rgb), 0.2);
  max-width: 200px;
  line-height: 1.5;
  margin: 0;
}

/* ── Composer ── */
.composer {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.06);
  flex-shrink: 0;
}

.review-locked-message {
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(var(--orange-rgb),0.22);
  background: rgba(var(--orange-rgb),0.08);
  color: var(--orange);
  flex-shrink: 0;
}

.review-locked-message div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-locked-message strong {
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--rf-type-size-13px, 13px);
  font-weight: 600;
}

.review-locked-message span {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--rf-type-size-12px, 12px);
  line-height: 1.5;
}

.composer-prompt {
  font-family: var(--font-body);
  font-size: var(--rf-type-size-12px, 12px);
  color: rgba(var(--rf-tone-neutral-rgb), 0.35);
  margin-bottom: var(--space-2);
  display: block;
}

.composer-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.composer-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.composer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.composer-timecode {
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-11px, 11px);
  font-weight: 500;
  padding: 8px var(--space-2);
  border-radius: var(--radius-sm);
  background: rgba(var(--orange-rgb), 0.15);
  color: var(--orange);
  flex-shrink: 0;
  margin-top: 1px;
}

.composer-author {
  font-size: var(--rf-type-size-11px, 11px);
  color: rgba(var(--rf-tone-neutral-rgb), 0.25);
}

.composer-input {
  width: 100%;
  resize: none;
  display: block;
}

.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Comment input actions (for approval comment) ── */
.comment-input-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: var(--space-2);
}

/* ── Timeline comment markers ── */
.comment-markers .comment-marker {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  transform: translate(-50%, -50%);
  border: 2px solid color-mix(in srgb, var(--black) 60%, transparent);
  cursor: pointer;
  z-index: 2;
}

body.review-page.portal-page .comment-markers .comment-marker {
  appearance: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
}

body.review-page.portal-page .comment-markers .comment-marker::before {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 8px;
  height: 8px;
  border: 2px solid color-mix(in srgb, var(--black) 60%, transparent);
  border-radius: 50%;
  background: var(--orange);
  transform: translate(-50%, -50%);
}

body.review-page.portal-page .comment-markers .comment-marker:hover::before,
body.review-page.portal-page .comment-markers .comment-marker.active::before,
body.review-page.portal-page .comment-markers .comment-marker:focus-visible::before {
  width: 10px;
  height: 10px;
}

.comment-markers .comment-marker.resolved {
  background: rgba(var(--rf-tone-neutral-rgb), 0.3);
}

body.review-page.portal-page .comment-markers .comment-marker.resolved {
  background: transparent;
}

body.review-page.portal-page .comment-markers .comment-marker.resolved::before {
  background: rgba(var(--rf-tone-neutral-rgb), 0.3);
}

body.review-page.portal-page .comment-markers .comment-marker.unavailable {
  cursor: not-allowed;
}

body.review-page.portal-page .comment-markers .comment-marker.unavailable::before {
  background: var(--text-secondary);
  border-style: dashed;
}

.marker-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--black) 95%, transparent);
  border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.12);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  pointer-events: none;
  z-index: 5;
}

.marker-tooltip-author {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--rf-type-size-11px, 11px);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.marker-tooltip-text {
  font-size: var(--rf-type-size-11px, 11px);
  color: rgba(var(--rf-tone-neutral-rgb), 0.5);
  max-width: 200px;
  white-space: normal;
}

body.review-page.portal-page .marker-tooltip,
body.review-page.portal-page .marker-tooltip-author,
body.review-page.portal-page .marker-tooltip-text {
  display: block;
}

/* ── Non-video deliverable in review ── */
#deliverable-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--rf-white-rgb), 0.02);
}

.deliverable-preview-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 32px;
  border-radius: 12px;
  background: rgba(var(--rf-tone-neutral-rgb), 0.05);
  border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.1);
  margin: 24px;
}

.deliverable-doc-icon {
  font-size: var(--rf-type-size-32px, 32px);
  flex-shrink: 0;
  color: rgba(var(--rf-tone-neutral-rgb), 0.3);
}

.deliverable-preview-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  cursor: zoom-in;
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease;
}

.deliverable-preview-img:focus-visible {
  outline: 2px solid rgba(var(--orange-rgb), 0.82);
  outline-offset: 4px;
}

.deliverable-preview-img.expanded {
  cursor: zoom-out;
  transform: scale(1.5);
}

/* ── Format selector label ── */
.portal-selector-label {
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-9px, 9px);
  letter-spacing: 0.16em;
  color: rgba(var(--rf-tone-neutral-rgb), 0.32);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

/* ── Mobile responsive ── */
@media (max-width: 768px) {
  body.review-page {
    overflow-y: auto;
    height: auto;
  }

  .review-bar-left {
    padding-left: 0;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
  }

  .review-bar {
    padding: 72px 12px var(--space-2);
    flex-wrap: wrap;
    gap: 8px;
  }

  .review-split {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }

  .review-video-area {
    padding: 8px;
    max-height: 50vh;
  }

  .feedback-sidebar {
    width: 100%;
    min-width: 100%;
    overflow-y: auto;
    border-left: none;
    border-top: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.06);
  }

  .approval-section {
    position: sticky;
    bottom: 0;
    background: var(--bg-panel, var(--client-panel-solid));
    z-index: 2;
    padding-top: 8px;
  }

  .review-title {
    display: none;
  }

  .review-version-dropdown {
    max-width: 100px;
    font-size: var(--rf-type-size-11px, 11px);
    min-height: 44px;
  }

  .review-share {
    min-height: 44px;
    padding: 0 var(--space-3);
  }

  .review-share-card {
    padding: var(--space-4);
  }

  .review-share-actions {
    flex-direction: column-reverse;
  }

  .review-share-primary,
  .review-share-secondary {
    width: 100%;
    min-height: 44px;
  }

  .filter-tab {
    min-height: 40px;
    padding: 8px var(--space-3);
  }

  .portal-format-pill {
    min-height: 40px;
  }

  body.review-page .player-btn {
    padding: var(--space-2);
    min-width: 44px;
    min-height: 44px;
  }

  body.review-page .player-speed-btn {
    min-width: 44px;
    min-height: 44px;
    padding: var(--space-2) 8px;
    border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.14);
    border-radius: var(--radius-sm);
    background: var(--rf-tone-neutral-fill);
  }

  .floating-comment {
    width: 260px;
  }
}

/* ── Error feedback: toasts and inline errors ── */
#portal-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--rf-z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.portal-toast {
  pointer-events: auto;
  max-width: 380px;
  padding: 12px var(--space-5);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: var(--rf-type-size-14px, 14px);
  line-height: var(--rf-type-leading-1-4, 1.4);
  color: var(--white);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--black) 35%, transparent);
}

.portal-toast-visible {
  opacity: 1;
  transform: translateX(0);
}

.portal-toast-error {
  background: #c0392b;
}

.portal-toast-success {
  background: #27ae60;
}

.review-load-error {
  padding: 16px;
  margin: 8px 0;
  border-radius: var(--radius-sm);
  background: var(--rf-tone-danger-fill);
  border: 1px solid var(--rf-tone-danger-line);
  color: var(--rf-tone-danger-ink);
  font-size: var(--rf-type-size-14px, 14px);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════
   REVIEW PAGE — NO VERSIONS EMPTY STATE
═══════════════════════════════════════════════════ */

.review-no-versions {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 48px 24px;
}

.review-no-versions-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 360px;
}

.review-no-versions-icon {
  color: var(--orange);
  opacity: 0.60;
  margin-bottom: 28px;
}

.review-no-versions-heading {
  font-family: var(--rf-type-heading-family);
  font-weight: var(--rf-type-heading-weight);
  letter-spacing: var(--rf-type-heading-tracking);
  color: var(--text-primary);
  margin: 0 0 12px;
  --rf-type-heading-size: var(--rf-type-size-26px);
}

.review-no-versions-sub {
  font-family: var(--font-body);
  font-size: var(--rf-type-size-14px, 14px);
  line-height: 1.65;
  color: rgba(var(--rf-tone-neutral-rgb), 0.38);
  margin: 0 0 32px;
}

.review-no-versions-back {
  font-family: var(--font-body);
  font-size: var(--rf-type-size-12px, 12px);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(var(--rf-tone-neutral-rgb), 0.38);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.15);
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

.review-no-versions-back:hover {
  color: var(--text-primary);
  border-bottom-color: rgba(var(--rf-tone-neutral-rgb), 0.35);
}

/* a11y: visually hide an element while keeping it in the accessibility tree */
body.portal-page .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════
   INLINE COMMENT (click-on-video)
   ═══════════════════════════════════ */

body.review-page #player-wrap { cursor: pointer; }
body.review-page #player-wrap .player-controls { cursor: default; }
body.review-page #player-wrap .player-big-play { cursor: pointer; }

/* Pin marker on the frame */
.comment-pin {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 0;
  background: var(--orange);
  transform: translate(-50%, -100%) rotate(-45deg);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--black) 40%, transparent);
  z-index: 10;
  pointer-events: none;
}
.comment-pin::after {
  content: '';
  position: absolute;
  top: var(--space-1);
  left: var(--space-1);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(var(--rf-tone-neutral-rgb), 0.3);
}

/* Floating comment card */
.floating-comment {
  position: absolute;
  z-index: 20;
  width: 300px;
  background: color-mix(in srgb, var(--black) 92%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.12);
  border-radius: 12px;
  padding: var(--space-3);
  box-shadow: 0 12px 40px color-mix(in srgb, var(--black) 50%, transparent);
  display: none;
}
.floating-comment.active { display: block; }

.floating-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.floating-tc {
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-11px, 11px);
  font-weight: 500;
  padding: var(--space-1) 8px;
  border-radius: var(--radius-sm);
  background: rgba(var(--orange-rgb), 0.15);
  color: var(--orange);
}

.floating-close {
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-textarea {
  width: 100%;
  resize: none;
}

.floating-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2);
}

.floating-author {
  font-size: var(--rf-type-size-11px, 11px);
  color: rgba(var(--rf-tone-neutral-rgb), 0.2);
}

/* Posted comment pins (persist on the frame for the session) */
.posted-pin {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid rgba(var(--rf-tone-neutral-rgb), 0.3);
  transform: translate(-50%, -50%);
  z-index: 5;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--rf-type-size-9px, 9px);
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--black) 40%, transparent);
  transition: transform 0.15s ease;
}
@keyframes pin-pop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.3); }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.posted-pin { animation: pin-pop 0.3s var(--rf-motion-spring, cubic-bezier(0.16, 1, 0.3, 1)); }
.posted-pin:hover { transform: translate(-50%, -50%) scale(1.2); }

/* Player controls — V6 polish for review page */
body.review-page .player-controls {
  background: linear-gradient(to top, color-mix(in srgb, var(--black) 70%, transparent) 0%, transparent 100%);
  padding: 8px 16px;
}

body.review-page .player-btn {
  color: var(--text-secondary);
  transition: color 0.15s ease;
}
body.review-page .player-btn:hover {
  color: rgba(var(--rf-tone-neutral-rgb), 0.9);
}

body.review-page .player-progress {
  height: 4px;
  border-radius: 2px;
  background: rgba(var(--rf-tone-neutral-rgb), 0.15);
  cursor: pointer;
}

body.review-page .player-progress:hover {
  transform: none;
}

body.review-page .player-progress-filled {
  background: var(--orange);
  border-radius: 2px;
}

body.review-page .player-time {
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-11px, 11px);
  color: var(--text-muted);
}

body.review-page .player-speed-btn {
  font-family: var(--font-mono);
  font-size: var(--rf-type-size-11px, 11px);
  color: var(--text-muted);
}

body.review-page .player-volume {
  background: rgba(var(--rf-tone-neutral-rgb), 0.15);
  border-radius: 2px;
}

body.review-page .player-volume-filled {
  background: rgba(var(--rf-tone-neutral-rgb), 0.6);
  border-radius: 2px;
}

/* Client streaming quality selector. It remains a native select so keyboard,
   touch and assistive technology users get the platform's familiar menu. */
.portal-quality-control {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: 2px;
}

.portal-quality-control[hidden] { display: none; }

.portal-quality-control select {
  min-width: 82px;
  height: 32px;
  padding: 0 22px 0 8px;
  border: 1px solid rgba(var(--rf-tone-neutral-rgb), 0.14);
  border-radius: 8px;
  background: color-mix(in srgb, var(--black) 72%, transparent);
  color: rgba(var(--rf-tone-neutral-rgb), 0.82);
  font: 500 var(--rf-type-size-11px, 11px)/var(--rf-type-leading-1, 1) var(--font-body, Inter, sans-serif);
  cursor: pointer;
  outline: none;
}

.portal-quality-control select:hover {
  border-color: rgba(var(--rf-tone-neutral-rgb), 0.28);
  color: rgba(var(--rf-tone-neutral-rgb), 0.96);
}

body.review-page.portal-page .portal-quality-control select:disabled {
  color: var(--text-secondary);
  cursor: default;
  opacity: 1;
  -webkit-text-fill-color: var(--text-secondary);
}

.portal-quality-control select:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(var(--orange-rgb), 0.28);
}

.portal-quality-control select option {
  background: var(--black);
  color: rgba(var(--rf-tone-neutral-rgb), 0.92);
}

@media (pointer: coarse) {
  .portal-quality-control select {
    min-width: 92px;
    min-height: 40px;
    height: 40px;
  }
}

@media (max-width: 600px) {
  body.review-page .portal-quality-control select {
    min-width: 74px;
    width: 74px;
    padding-inline: 6px;
  }
}

@media (max-width: 420px) {
  body.review-page .player-time,
  body.watch-page.portal-page .player-time {
    display: none;
  }

  body.review-page .portal-quality-control select,
  body.watch-page.portal-page .portal-quality-control select {
    min-width: 70px;
    width: 70px;
  }
}

/* CANONICAL CLIENT PRODUCT SYSTEM — migrated from the retired late layer.
   All rules are scoped to body.portal-page so the shared portal.css asset cannot
   alter Public Showcase pages that also load its historical base declarations. */
