:root {
    color-scheme: dark;
    font-family: "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    color: #e5edf2;
    background: #111c25;
    line-height: 1.5;
    --page-bg: #111c25;
    --page-bg-soft: #172631;
    --panel-bg: #1b2a35;
    --panel-raised: #223540;
    --panel-inset: #16242d;
    --input-bg: #14222b;
    --border: #30444f;
    --border-soft: #273b46;
    --text: #e5edf2;
    --text-muted: #a4b5bf;
    --text-dim: #788e9a;
    --teal: #63c5b1;
    --teal-strong: #38a78d;
    --green: #45b99d;
    --green-dark: #25866f;
    --red-track: #713f4b;
    --red-border: #925363;
    --orange: #f2a15d;
    --focus: #6ed7dc;
    --touch-size: 44px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 75% -15%, #263d49 0, transparent 34rem), var(--page-bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .55; }
.hidden { display: none !important; }
button, input, select, a { min-height: var(--touch-size); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #f4c45d; outline-offset: 2px; }
.skip-link { position: absolute; z-index: 10; top: 8px; left: 8px; padding: 8px 12px; border-radius: 8px; color: #10222c; background: #d8f4f0; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.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; }
.recordings-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 24px max(24px, calc((100vw - 1440px) / 2)); color: var(--text); border-bottom: 1px solid rgb(126 170 181 / 16%); background: linear-gradient(110deg, #172b38, #1b3a46 58%, #244c55); }
.header-main { min-width: 0; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.site-nav-link { display: inline-flex; align-items: center; padding: 5px 11px; border: 1px solid rgb(161 224 221 / 28%); border-radius: 999px; color: #d8f4f0; font-size: 12px; text-decoration: none; }
.site-nav-link:hover, .site-nav-link.is-current { color: #17343e; background: #d8f4f0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: #b8e4e1; font-size: 13px; text-decoration: none; opacity: .9; }
.back-link:hover { color: #fff; opacity: 1; }
.eyebrow, .section-kicker { margin: 0 0 5px; font-size: 10px; letter-spacing: .18em; font-weight: 800; }
.eyebrow { color: #91e2d5; }
.section-kicker { color: var(--teal); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; color: #f4f8fa; font-size: clamp(27px, 4vw, 40px); letter-spacing: -.02em; }
h2 { margin-bottom: 0; color: var(--text); font-size: 19px; letter-spacing: -.01em; }
.subtitle { margin: 0; color: #b7ced5; }
.header-status { max-width: 360px; padding: 9px 13px; border: 1px solid rgb(161 224 221 / 28%); border-radius: 999px; color: #d8f4f0; background: rgb(14 34 43 / 35%); box-shadow: inset 0 1px rgb(255 255 255 / 8%); font-size: 12px; }
.recordings-layout { display: grid; grid-template-columns: 276px minmax(0, 1fr); gap: 22px; width: min(1440px, calc(100% - 48px)); margin: 26px auto 60px; align-items: start; }
.filter-panel, .playback-panel { border: 1px solid var(--border); border-radius: 16px; background: rgb(27 42 53 / 94%); box-shadow: 0 18px 45px rgb(0 0 0 / 18%), inset 0 1px rgb(255 255 255 / 3%); }
.filter-panel { position: sticky; top: 18px; padding: 21px; }
.filter-heading { margin-bottom: 17px; }
.filter-heading h2 { color: var(--text); }
.field-label { display: block; margin: 0 0 7px; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.filter-control { width: 100%; min-width: 0; min-height: var(--touch-size); padding: 10px 11px; border: 1px solid var(--border); border-radius: 9px; outline: none; color: var(--text); background: var(--input-bg); }
.filter-control:hover { border-color: #44606c; }
.filter-control:focus-visible { border-color: var(--focus); box-shadow: 0 0 0 3px rgb(110 215 220 / 15%); }
.filter-control option { color: var(--text); background: var(--input-bg); }
.node-card { display: flex; flex-direction: column; gap: 4px; margin-top: 17px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 11px; background: var(--panel-inset); }
.node-card-heading { display: flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.node-dot { width: 7px; height: 7px; border-radius: 50%; background: #718692; box-shadow: 0 0 0 3px rgb(113 134 146 / 13%); }
.node-card strong { overflow: hidden; color: #d5e6eb; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.node-address { overflow: hidden; color: var(--text-dim); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-block; width: fit-content; margin-top: 5px; padding: 3px 8px; border: 1px solid transparent; border-radius: 999px; font-size: 10px; font-weight: 700; }
.status-muted { color: #a2b0b8; border-color: #40515b; background: #263640; }
.status-ready { color: #94e4c7; border-color: #2e755f; background: #1f4a40; }
.status-warning { color: #f0c684; border-color: #80643d; background: #493b29; }
.date-heading { margin-top: 29px; }
.date-actions { display: flex; gap: 6px; margin-top: 10px; align-items: center; }
.button { padding: 9px 14px; border: 1px solid transparent; border-radius: 9px; color: #0e2927; background: var(--teal); box-shadow: 0 4px 12px rgb(20 108 96 / 18%); font-weight: 800; transition: background .15s, transform .15s, border-color .15s; }
.button:hover:not(:disabled) { background: #82d8c5; transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.button-secondary { color: #c6dfe5; border-color: var(--border); background: #263b46; box-shadow: none; }
.button-secondary:hover:not(:disabled) { color: #eaf7f7; border-color: #52717b; background: #304a56; }
.button-small { padding: 6px 10px; font-size: 11px; }
.button-wide { flex: 1; padding: 7px 5px; }
.icon-button { width: 35px; height: 35px; padding: 0; border: 1px solid var(--border); border-radius: 9px; color: #c1d9df; background: #223640; font-weight: 800; }
.icon-button:hover:not(:disabled) { border-color: #54737d; background: #2c4651; }
.filter-hint { margin: 17px 0 0; color: var(--text-dim); font-size: 11px; line-height: 1.65; }
.playback-panel { min-width: 0; padding: 23px; }
.playback-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.playback-heading h2, .timeline-heading h2 { color: var(--text); }
.count-badge { padding: 5px 10px; border: 1px solid #356a6e; border-radius: 999px; color: #a5e7d6; background: #23484a; font-size: 11px; font-weight: 700; white-space: nowrap; }
.playback-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 24px; align-items: start; }
.player-column { min-width: 0; }
.player-shell { position: relative; overflow: hidden; min-height: 300px; aspect-ratio: 16 / 9; border: 1px solid #344b56; border-radius: 12px; background: #0b1218; box-shadow: 0 12px 28px rgb(0 0 0 / 22%); }
#record-player { display: block; width: 100%; height: 100%; background: #0b1218; }
.player-empty { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; color: #8ba1ac; font-size: 12px; }
.player-empty strong { color: #d8e7eb; font-size: 15px; }
.player-icon { display: flex; justify-content: center; align-items: center; width: 46px; height: 46px; margin-bottom: 5px; padding-left: 3px; border: 1px solid #4d737b; border-radius: 50%; color: #8ddacc; background: rgb(49 102 104 / 18%); box-shadow: 0 0 0 7px rgb(82 177 167 / 6%); }
.current-record { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 12px; padding: 11px 13px; border: 1px solid #345d61; border-radius: 10px; background: #1c373c; }
.current-record > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.current-label { color: #79d5c1; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
#current-name { overflow: hidden; color: #d7ebed; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.current-meta { display: flex; align-items: center; gap: 10px; color: #a9c3c9; font-size: 11px; white-space: nowrap; }
.record-message { min-height: 0; margin-top: 10px; border-radius: 8px; font-size: 12px; }
.record-message:not(:empty) { padding: 9px 11px; border: 1px solid #754b55; }
.record-message.error { color: #f2b8ba; background: #3a252d; }
.day-timeline { min-width: 0; }
.timeline-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 43px; margin-bottom: 13px; }
.timeline-date { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.timeline-state { padding: 11px 8px; border: 1px solid var(--border-soft); border-radius: 9px; color: var(--text-dim); background: var(--panel-inset); text-align: center; font-size: 11px; }
.timeline-rail { position: relative; height: 500px; margin-top: 3px; border: 1px solid #3c5b61; border-radius: 11px; outline: none; background: #14242c; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 4%); cursor: crosshair; touch-action: none; user-select: none; }
.timeline-rail:focus-visible { border-color: var(--focus); box-shadow: 0 0 0 3px rgb(110 215 220 / 15%), inset 0 0 0 1px rgb(255 255 255 / 4%); }
.timeline-rail.timeline-disabled { cursor: not-allowed; opacity: .65; }
.timeline-scale { position: absolute; inset: 0 auto 0 0; width: 48px; color: #8fa7b0; font-size: 10px; font-variant-numeric: tabular-nums; pointer-events: none; }
.timeline-scale span { position: absolute; top: calc(var(--hour) / 24 * 100%); right: 7px; transform: translateY(-50%); }
.timeline-scale span:first-child { transform: none; }
.timeline-scale span:last-child { transform: translateY(-100%); }
.timeline-track { position: absolute; top: 0; right: 10px; bottom: 0; left: 53px; overflow: hidden; border: 1px solid var(--red-border); border-radius: 6px; background-color: var(--red-track); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), rgb(191 156 164 / 19%) calc(25% - 1px), rgb(191 156 164 / 19%) 25%), repeating-linear-gradient(to bottom, transparent 0, transparent calc(4.1667% - 1px), rgb(191 156 164 / 9%) calc(4.1667% - 1px), rgb(191 156 164 / 9%) 4.1667%); pointer-events: none; }
.timeline-track::before, .timeline-track::after { display: none; }
.timeline-segment { position: absolute; z-index: 1; top: var(--start); right: 3px; left: 3px; height: calc(var(--end) - var(--start)); border: 1px solid var(--green-dark); border-radius: 4px; background: linear-gradient(105deg, #54c2a7, var(--green)); box-shadow: 0 1px 4px rgb(0 0 0 / 22%); }
.timeline-segment.segment-unknown { background: repeating-linear-gradient(135deg, #76bcae 0, #76bcae 4px, #a4d2c9 4px, #a4d2c9 8px); }
.timeline-cursor { position: absolute; z-index: 3; top: var(--position); right: 4px; left: 48px; height: 2px; background: var(--orange); pointer-events: none; }
.timeline-cursor span { position: absolute; top: 50%; left: -5px; width: 11px; height: 11px; border: 2px solid #f7fafb; border-radius: 50%; background: var(--orange); box-shadow: 0 1px 5px rgb(0 0 0 / 40%); transform: translateY(-50%); }
.timeline-tooltip { position: absolute; z-index: 4; top: var(--position); right: 7px; padding: 4px 7px; border: 1px solid #49616b; border-radius: 5px; color: #f3f8f9; background: #243945; box-shadow: 0 3px 8px rgb(0 0 0 / 28%); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; transform: translateY(-50%); }
.timeline-tooltip.edge-start { transform: translateY(0); }
.timeline-tooltip.edge-end { transform: translateY(-100%); }
.timeline-help { margin: 10px 0 0; color: var(--text-dim); font-size: 11px; line-height: 1.6; }
.timeline-clip-list { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.clip-list-title { margin: 0 0 8px; color: var(--text-muted); font-size: 12px; }
.clip-list-item + .clip-list-item { margin-top: 6px; }
.clip-button { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: var(--touch-size); padding: 8px 10px; border: 1px solid #356a6e; border-radius: 8px; color: #d8f4f0; background: #1d3b40; text-align: left; }
.clip-button:hover { border-color: var(--teal); background: #264e50; }
.clip-button-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-button-time { flex: 0 0 auto; color: #9bd8cb; font-size: 11px; font-variant-numeric: tabular-nums; }
.clip-unknown { padding: 8px 10px; border: 1px dashed #566b70; border-radius: 8px; color: var(--text-dim); font-size: 11px; overflow-wrap: anywhere; }
@media (max-width: 900px) {
    .recordings-header { align-items: flex-start; flex-direction: column; padding: 22px 24px; }
    .header-status { max-width: none; width: 100%; border-radius: 10px; overflow-wrap: anywhere; }
    .recordings-layout { grid-template-columns: 1fr; width: min(100% - 28px, 800px); margin-top: 16px; }
    .filter-panel { position: static; }
    .date-heading { margin-top: 22px; }
    .playback-workspace { grid-template-columns: 1fr; gap: 20px; }
    .player-shell { min-height: 0; }
    .timeline-rail { height: 132px; margin-top: 8px; }
    .timeline-scale { top: auto; right: 0; bottom: 0; left: 0; width: auto; height: 28px; }
    .timeline-scale span { top: auto; right: auto; bottom: 6px; left: calc(var(--hour) / 24 * 100%); transform: translateX(-50%); }
    .timeline-scale span:first-child { transform: none; }
    .timeline-scale span:last-child { transform: translateX(-100%); }
    .timeline-track { top: 10px; right: 0; bottom: 28px; left: 0; border: 1px solid var(--red-border); border-top: 1px solid #3a555d; border-right: 0; border-bottom: 1px solid #3a555d; border-left: 0; border-radius: 6px; background-color: var(--red-track); background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(25% - 1px), rgb(191 156 164 / 19%) calc(25% - 1px), rgb(191 156 164 / 19%) 25%), repeating-linear-gradient(to right, transparent 0, transparent calc(4.1667% - 1px), rgb(191 156 164 / 9%) calc(4.1667% - 1px), rgb(191 156 164 / 9%) 4.1667%); }
    .timeline-track::before, .timeline-track::after { display: none; }
    .timeline-segment { top: 0; right: 0; bottom: 0; left: var(--start); width: calc(var(--end) - var(--start)); height: auto; }
    .timeline-cursor { top: 10px; right: auto; bottom: 28px; left: var(--position); width: 2px; height: auto; }
    .timeline-cursor span { top: -5px; left: 50%; transform: translateX(-50%); }
    .timeline-tooltip { top: 0; right: auto; bottom: auto; left: var(--position); transform: translate(-50%, -2px); }
    .timeline-tooltip.edge-start { transform: translate(0, -2px); }
    .timeline-tooltip.edge-end { transform: translate(-100%, -2px); }
}
@media (max-width: 600px) {
    html { scroll-padding-top: 12px; }
    body { padding-bottom: env(safe-area-inset-bottom); }
    .recordings-header { padding: 18px var(--page-gutter) 22px; }
    .site-nav { margin-bottom: 14px; }
    .recordings-layout { width: calc(100% - 20px); }
    .filter-panel, .playback-panel { padding: 16px; border-radius: 13px; }
    .playback-heading, .timeline-heading { align-items: flex-start; flex-wrap: wrap; }
    .playback-heading { margin-bottom: 14px; }
    .current-record { align-items: flex-start; flex-direction: column; }
    .current-meta { justify-content: space-between; width: 100%; }
    .date-actions { gap: 5px; }
    .date-actions .icon-button { flex: 0 0 44px; }
    .date-actions .button-wide { min-width: 0; }
    .timeline-help { line-height: 1.6; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
    .button:hover:not(:disabled) { transform: none; }
}
