.depth-replay .panel { padding: clamp(.85rem, 2vw, 1.3rem); }
.replay-controls { margin-bottom: .85rem; }
.replay-controls input { max-width: 100%; min-width: 0; }
.replay-views { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.replay-card h2 { font-size: 1.12rem; }
.replay-card canvas { display: block; margin: .8rem auto; background: var(--input); border-radius: 7px; }
#replay-depth { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; image-rendering: pixelated; }
#replay-grid { width: min(100%, 26rem); height: auto; }
.replay-depth-scale { font-size: .8rem; color: var(--muted); }
.replay-depth-scale i {
  background: linear-gradient(90deg, hsl(52 70% 49%), hsl(105 70% 49%), hsl(158 70% 49%), hsl(212 70% 49%), hsl(265 70% 49%));
  height: .45rem; flex: 1; border-radius: 1rem;
}
.replay-legend { display: flex; gap: .4rem .75rem; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: .82rem; }
.replay-legend li::before { display: inline-block; width: .65rem; height: .65rem; margin-inline-end: .35rem; border: 1px solid #6b7a87; border-radius: 2px; content: ''; }
.replay-legend [data-cell="free"]::before { background: #2b504e; }
.replay-legend [data-cell="margin"]::before { background: #4a4440; }
.replay-legend [data-cell="unknown"]::before { background: #202934; }
.replay-legend [data-cell="obstacle"]::before { background: #df7377; }
.replay-legend [data-cell="keepout"]::before { background: #aa7ac5; }
.replay-legend [data-cell="path"]::before { background: #65e0d1; }
.replay-timeline { margin-top: .8rem; }
#replay-frame { accent-color: var(--accent); min-width: 5rem; flex: 1; }
#replay-time { color: var(--muted); font-variant-numeric: tabular-nums; }
#replay-result[data-state="candidate"] { color: var(--accent); }
#replay-result:not([data-state="candidate"]) { color: var(--warning); }
@media (max-width: 680px) { .replay-views { grid-template-columns: minmax(0, 1fr); } }
