.event-head { min-height: 64px; padding: 6px 12px 8px; gap: 6px; }
.event-head h2 { font-size: 19px; }
.event-head .muted { font-size: 11px; font-variant-numeric: tabular-nums; }
.event-detail { padding: 0 12px 10px; }
.event-identity { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 36px; padding: 3px 2px 10px; }
.event-identity strong { font-size: 13px; font-weight: 500; }
.event-identity span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.event-player { border: 1px solid #52616e; border-radius: 11px; overflow: hidden; background: #19232c; }
.event-viewer { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0c141c; }
.event-viewer > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.event-player-controls { display: flex; align-items: center; gap: 7px; min-height: 52px; padding: 4px 6px; background: #2d3944; }
.event-player-controls .grow { display: flex; flex-direction: column; gap: 1px; }
.event-player-controls strong { font-size: 12px; font-weight: 500; }
.event-player-controls span, .event-player-controls time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.event-player-controls > .text-btn { padding: 8px 7px; font-size: 12px; gap: 5px; }
.event-player-controls .text-btn .i { width: 12px; font-size: 11px; }
.event-player-controls > .text-btn + .grow { text-align: center; }
.event-section-title { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 6px; }
.event-section-title h3 { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; }
.event-section-title h3 span { color: var(--muted); font-size: 11px; }
.event-section-title .text-btn { font-size: 12px; }
.event-snapshot-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.event-snapshot { display: block; width: 100%; min-width: 0; padding: 0; background: #2e3b46; color: var(--text); border: 1px solid #52616e; border-radius: 7px; overflow: hidden; text-align: center; }
.event-snapshot-image { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; background: #111a22; }
.event-snapshot-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.event-snapshot time { display: block; padding: 5px 2px; font-size: 12px; line-height: 1.4; font-weight: 500; font-variant-numeric: tabular-nums; }
.event-snapshot.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.event-snapshot.selected time { color: var(--accent); background: #3b3b37; }
.event-snapshot-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 4px; color: var(--muted); font-size: 10px; line-height: 1.2; }
.event-snapshot-placeholder .i { font-size: 15px; }
.event-snapshot-placeholder .spinner { width: 16px; height: 16px; flex-basis: 16px; }
.event-snapshot-note { margin-top: 8px; color: var(--muted); font-size: 11px; }
.event-recordings { display: flex; justify-content: flex-end; padding-top: 4px; }
.event-recordings .text-btn { font-size: 12px; }
.event-recordings .i { width: 12px; font-size: 10px; }
.event-media-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 16px; text-align: center; color: var(--text); }
.event-media-state > .i { font-size: 25px; color: var(--muted); }
.event-media-state strong { font-size: 14px; font-weight: 500; }
.event-media-state p { font-size: 12px; color: var(--muted); }
.event-media-state .text-btn { padding-block: 6px; }
.event-fullscreen-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.event-detail .action-status { padding-block: 5px; }
.event-detail .inline-feedback { margin: 0 0 10px; }
@media (max-width: 390px) {
  .event-head { min-height: 62px; }
  .event-head h2 { font-size: 18px; }
  .event-detail { padding-inline: 10px; }
  .event-identity { min-height: 34px; gap: 6px; }
  .event-identity strong { font-size: 12px; }
  .event-identity span { font-size: 10px; }
  .event-snapshot-grid { gap: 7px; }
  .event-snapshot time { font-size: 11px; }
  .event-player-controls { min-height: 50px; padding-block: 3px; }
}
.event-identity { align-items: center; min-height: 50px; padding: 0 0 6px; }
.event-identity > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.event-identity strong { font-size: 13px; line-height: 1.4; }
.event-identity span { font-size: 11px; white-space: normal; line-height: 1.4; }
.event-identity .text-btn { flex-shrink: 0; min-height: 44px; padding: 6px; font-size: 12px; gap: 6px; }
.event-identity .i { font-size: 10px; width: 10px; }
.event-metadata { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #52616e; border-radius: 9px; background: #28343e; }
.event-metadata[hidden] { display: none; }
.event-metadata > div { display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 10px; padding: 6px 0; font-size: 12px; line-height: 1.5; }
.event-metadata dt { color: var(--muted); }
.event-metadata dd { margin: 0; overflow-wrap: anywhere; }
.event-boxes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.event-boxes rect { fill: none; stroke: #ed6af5; stroke-width: 2; vector-effect: non-scaling-stroke; }
.event-boxes.cloud rect { stroke: #56e1d6; }
.event-snapshot .event-boxes rect { stroke-width: 1.5; }
.event-overlay-tools { margin-top: 7px; }
.event-overlay-controls { display: flex; align-items: center; gap: 4px; }
.event-overlay-controls > span { margin-right: auto; padding-right: 8px; font-size: 12px; color: var(--muted); }
.event-overlay-option { min-height: 44px; min-width: 64px; padding: 9px 12px; border: 1px solid #52616e; border-radius: 7px; background: #29353f; color: var(--text); font-size: 12px; }
.event-overlay-option[aria-pressed=true] { background: #ead2b2; border-color: #ead2b2; color: #202b34; font-weight: 600; }
.event-boxes-note { margin: 6px 0 0; padding: 2px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.event-descriptions { margin-top: 16px; border: 1px solid #465560; border-radius: 11px; background: #27333d; overflow: hidden; }
.event-description-block { padding: 15px 14px; }
.event-description-block + .event-description-block { border-top: 1px solid #465560; }
.event-description-title { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
.event-description-block h3 { font-size: 12px; line-height: 1.5; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.event-description-block p { font-size: 14px; line-height: 1.65; margin: 0; overflow-wrap: anywhere; }
.event-text-collapsed { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.event-description-block .text-btn { font-size: 12px; padding: 8px 0; min-height: 44px; }
.event-announcement-state { padding: 2px 7px; border-radius: 5px; font-size: 11px; color: var(--muted); background: #38444d; }
.event-announcement-state.sent { color: #b1e2c6; background: #25483f; }
.event-description-status { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 15px; border: 1px solid #465560; border-radius: 10px; }
.event-description-status strong { font-size: 13px; font-weight: 500; }
.event-description-status p { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 5px; }
.event-description-status .spinner { width: 16px; height: 16px; flex-basis: 16px; margin-top: 2px; }
.fullscreen-content:has(.event-fullscreen-stage) { container-type: size; }
.event-fullscreen-stage { position: relative; width: min(100cqw,calc(100cqh * 16 / 9)); aspect-ratio: 16 / 9; flex-shrink: 0; }
.video-exit-overlay:has(.event-overlay-tools) { display: flex; align-items: flex-start; gap: 8px; right: 12px; flex-wrap: wrap; }
.video-exit-overlay[hidden] { display: none; }
.video-exit-overlay .event-overlay-tools { margin: 0; padding: 0 5px 0 9px; background: #18242cf0; border: 1px solid #8b9aa5; border-radius: 8px; }
.video-exit-overlay .event-overlay-controls { min-height: 44px; }
.video-exit-overlay .event-overlay-option { min-width: 52px; border: 0; }
.video-exit-overlay .event-boxes-note { margin: 0; padding: 5px 2px 9px; }
/* Keep detection choices secondary to the event and snapshots. */
.event-overlay-tools { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.event-overlay-controls { gap: 0; }
.event-overlay-option { min-height: 44px; min-width: 60px; padding: 8px 10px; border-radius: 0; background: var(--bg); border-color: var(--line); }
.event-overlay-option + .event-overlay-option { border-left: 0; }
.event-overlay-option:nth-child(2) { border-radius: 7px 0 0 7px; }
.event-overlay-option:last-child { border-radius: 0 7px 7px 0; }
.event-overlay-option[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.video-exit-overlay:has(.event-boxes-button) { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.event-boxes-button { min-height: 44px; gap: 8px; }
