@import url('/theme.css');
@font-face {
    font-family: 'Pretendard Variable';
    src: url('/static/fonts/pretendard-var.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}
:root {
    color-scheme: dark;
    font-family: var(--app-font);
    color: #e9ebef;
    background: #101113;
    font-synthesis: none;
    --muted: #a4aab4;
    --line: #30343b;
    --blue: #75b8ff;
    --green: #62d7b0;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
}
button,
input,
select {
    font: inherit;
}
button,
select,
.file-button,
.heading-actions a {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--app-radius-control);
    background: #202329;
    color: inherit;
    padding: 9px 14px;
}
button,
a,
select,
.file-button {
    cursor: pointer;
}
button:hover,
a:hover {
    filter: brightness(1.17);
}
button:disabled,
select:disabled {
    opacity: 0.45;
    cursor: default;
}
button.primary {
    background: #e5eaf1;
    color: #15191e;
    border-color: #e5eaf1;
    font-weight: 650;
}
a {
    color: #b2d6ff;
    text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
canvas:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
}
[hidden] {
    display: none !important;
}
.sr-only,
.skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}
.skip-link:focus {
    position: fixed;
    z-index: 10;
    padding: 16px;
    background: #202329;
}
.muted,
.plot-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}
.topbar {
    height: 72px;
    padding: 0 32px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.back {
    color: #d2d6dd;
    font-size: 14px;
}
.brand {
    font-size: 21px;
    font-weight: 650;
    letter-spacing: -0.8px;
}
.brand span {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--muted);
    margin-left: 10px;
}
.file-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    overflow: hidden;
}
.file-button input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}
.file-button:focus-within {
    outline: 2px solid var(--blue);
}
main {
    max-width: 1680px;
    margin: auto;
    padding: 32px;
}
.heading,
.analysis-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--muted);
    margin: 0 0 10px;
}
h1 {
    font-size: 28px;
    letter-spacing: -0.8px;
    font-weight: 600;
    margin: 0;
    overflow-wrap: anywhere;
}
h2 {
    font-size: 15px;
    letter-spacing: -0.2px;
    font-weight: 600;
    margin: 0;
}
#session-subtitle {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}
.heading-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
}
.status-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 13px;
    color: var(--muted);
    min-height: 44px;
    align-items: center;
}
.status-row p {
    margin: 8px 0;
}
#transfer {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin: 16px 0 24px;
}
.stat {
    padding: 20px 0;
}
.stat span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px;
}
.stat strong {
    font-size: 25px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.panel {
    background: #181a1e;
    border: 1px solid var(--line);
    border-radius: var(--app-radius-panel);
    overflow: hidden;
}
.panel > header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 12px 18px;
}
.panel header h2 {
    margin-right: auto;
    white-space: nowrap;
}
.panel header select {
    max-width: 280px;
    font-size: 12px;
}
.panel header button {
    font-size: 12px;
}
.playback-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
    gap: 18px;
}
.camera-catalog { margin:0 0 18px; }
#camera-channels { display:flex; flex-wrap:wrap; gap:10px; padding:0 18px; }
#camera-channels>button { flex:1 1 220px; max-width:100%; text-align:left; display:flex; flex-direction:column; gap:8px; padding:14px; }
#camera-channels>button strong { font-size:13px; font-weight:500; overflow-wrap:anywhere; }
#camera-channels>button span { font-size:12px; color:var(--muted); }
#camera-channels>button[aria-pressed=true] { border-color:var(--blue); background:#202e3e; }
.video-stage {
    position: relative;
    height: clamp(220px, 34vh, 440px);
    background: #060708;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.video-stage canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.video-stage > p {
    position: absolute;
    max-width: 80%;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}
.video-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 32px 18px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    font-size: 12px;
    pointer-events: none;
    color: #dfe5ec;
    gap: 12px;
}
#frame-time {
    font-variant-numeric: tabular-nums;
}
.cursor-values {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 14px 20px;
    flex-wrap: wrap;
}
.cursor-values span {
    font-size: 11px;
    color: var(--muted);
}
.cursor-values strong {
    display: block;
    font-size: 20px;
    font-weight: 500;
    color: #e6eaf0;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}
.event-panel {
    display: flex;
    flex-direction: column;
    max-height: 660px;
}
.event-filter {
    margin: 0 16px 14px;
    color: var(--muted);
    font-size: 11px;
}
.event-filter input {
    width: 100%;
    background: #101216;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    color: inherit;
    margin-top: 6px;
}
.events {
    overflow: auto;
    padding: 0 14px 14px;
    min-height: 130px;
    flex: 1;
}
.events > button {
    display: grid;
    grid-template-columns: 72px 1fr;
    text-align: left;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding: 14px 4px;
    font-size: 12px;
}
.events time {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.events strong {
    display: block;
    margin-bottom: 5px;
    color: #e3e6ec;
    font-weight: 500;
    overflow-wrap: anywhere;
}
.events small {
    color: var(--muted);
    overflow-wrap: anywhere;
}
#event-count {
    color: var(--muted);
    font-size: 12px;
}
.transport {
    margin-top: 18px;
    padding: 18px 22px;
}
.video-panel > .transport {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
}
.timebar {
    display: flex;
    gap: 8px;
    align-items: center;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}
#position {
    font-size: 21px;
    font-weight: 500;
}
#duration {
    color: var(--muted);
}
#absolute-time {
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}
#timeline {
    display: block;
    width: 100%;
    height: 32px;
    accent-color: #c5d5e9;
    cursor: pointer;
    margin: 12px 0 0;
}
#event-markers {
    height: 12px;
    position: relative;
    margin: 0 8px;
}
#event-markers i {
    position: absolute;
    top: 0;
    width: 2px;
    height: 8px;
    background: var(--green);
}
#event-markers i.failure {
    background: #f49b90;
}
.transport-actions,
.transport-actions > div {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.transport-actions {
    justify-content: space-between;
}
.transport-actions label {
    color: var(--muted);
    font-size: 12px;
    margin-left: 8px;
}
.transport-actions button {
    font-size: 13px;
}
.transport-actions select {
    margin-left: 6px;
    font-size: 13px;
}
.analysis-heading {
    margin: 36px 0 12px;
}
.analysis-heading h2 {
    font-size: 20px;
}
.analysis-heading p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}
.analysis-heading > div:last-child {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.analysis-heading button {
    font-size: 12px;
}
progress {
    display: block;
    width: 100%;
    height: 6px;
    accent-color: var(--blue);
    margin-bottom: 12px;
}
.chart-grid,
.spatial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 18px 0;
}
.chart {
    padding: 18px;
}
.chart h3 {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 12px;
}
.chart canvas {
    width: 100%;
    height: 260px;
    display: block;
    cursor: crosshair;
}
.chart .legend {
    display: flex;
    gap: 18px;
    font-size: 11px;
    flex-wrap: wrap;
    color: var(--muted);
}
.chart-canvas { position:relative; height:260px; min-width:0; margin:14px 0; }
.chart-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.chart-header h3 { margin:0; overflow-wrap:anywhere; line-height:1.6; }
.chart-header button { font-size:12px; flex-shrink:0; }
.chart-note { min-height:36px; color:var(--muted); font-size:12px; line-height:1.5; margin:8px 0; }
.chart .legend { gap:4px 16px; }
.chart .legend label { display:flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; min-width:0; }
.chart .legend input { accent-color:var(--blue); width:16px; height:16px; flex-shrink:0; }
.chart .legend span { overflow-wrap:anywhere; }
.chart .legend i { width:18px; border-top:2px solid; flex-shrink:0; }
.chart-readout { display:block; min-height:44px; font-size:12px; color:var(--muted); line-height:1.8; overflow-wrap:anywhere; }
.chart .metrics summary { min-height:44px; cursor:pointer; }
.chart .metrics td { white-space:nowrap; }
.chart { min-width:0; }
.chart-tools { padding:18px; margin:18px 0; }
.chart-toolbar { display:flex; align-items:end; gap:12px; flex-wrap:wrap; }
.chart-toolbar+form { margin-top:16px; }
.chart-toolbar label { display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--muted); }
.chart-toolbar input { width:130px; min-height:44px; border:1px solid var(--line); border-radius:var(--app-radius-control); background:#101216; color:inherit; padding:10px; }
.chart-tools p { margin:14px 0 0; }
.chart .metrics {
    border-top: 1px solid var(--line);
    margin-top: 12px;
    padding-top: 12px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.8;
}
.spatial-grid canvas {
    width: 100%;
    height: 320px;
    display: block;
    touch-action: none;
}
.plot-note {
    padding: 0 18px;
    font-size: 11px;
}
.details {
    margin: 18px 0;
    padding: 18px;
}
.details summary {
    cursor: pointer;
    font-size: 14px;
    min-height: 28px;
}
.details pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.7;
    color: #c7cdd7;
    max-height: 450px;
    overflow: auto;
}
.table-scroll {
    overflow: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
}
th {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}
td small {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-top: 6px;
}
footer {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.8;
    margin: 24px 0;
}
footer a {
    margin-left: 10px;
}
@media (max-width: 1050px) {
    .playback-grid {
        grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    }
    main {
        padding: 24px;
    }
    .heading {
        align-items: flex-start;
    }
    .heading-actions {
        justify-content: flex-end;
    }
    .panel > header {
        flex-wrap: wrap;
    }
    .panel header select {
        max-width: 200px;
    }
    .analysis-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
@media (max-width: 720px) {
    .topbar {
        padding: 0 16px;
        height: 64px;
    }
    .brand {
        display: none;
    }
    main {
        padding: 20px 14px;
    }
    .heading {
        flex-direction: column;
        gap: 8px;
    }
    h1 {
        font-size: 23px;
    }
    .heading-actions {
        justify-content: flex-start;
    }
    .stats {
        grid-template-columns: 1fr 1fr;
        margin-top: 8px;
    }
    .stat {
        padding: 14px 0;
    }
    .stat strong {
        font-size: 22px;
    }
    .playback-grid,
    .chart-grid,
    .spatial-grid {
        grid-template-columns: 1fr;
    }
    .event-panel {
        max-height: 290px;
    }
    .panel > header {
        padding: 12px;
        gap: 8px;
    }
    .video-panel header h2 {
        width: 100%;
    }
    .video-panel header select {
        max-width: calc(100vw - 150px);
    }
    .cursor-values {
        gap: 18px;
        padding: 14px;
    }
    .transport {
        padding: 16px 12px;
    }
    .transport-actions > .muted {
        display: none;
    }
    #absolute-time {
        display: none;
    }
    .transport-actions > div {
        gap: 6px;
    }
    .transport-actions label {
        margin-left: 0;
    }
    .transport-actions button {
        padding: 9px 11px;
    }
    .status-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }
    .analysis-heading {
        margin-top: 28px;
    }
    .details {
        padding: 14px;
    }
    .chart {
        padding: 14px;
    }
    .spatial-grid canvas {
        height: 260px;
    }
    .video-caption {
        font-size: 10px;
    }
    .cursor-values strong {
        font-size: 18px;
    }
}
