:root{font-family:system-ui,"Microsoft YaHei UI",sans-serif;color:#18283c;background:#eef3f9;font-size:15px;line-height:1.5;--muted:#526780;--line:#d8e1ec;--blue:#195bb1;--navy:#13253a}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
.wrap{width:min(100% - 2rem,1320px);margin-inline:auto}
.banner{background:var(--navy);color:#fff;border-bottom:4px solid #286dcc}
.heading{min-height:96px;display:flex;align-items:center;gap:1rem}
.mark{width:46px;height:46px;display:grid;place-items:center;background:#2466bf;color:#fff;border:2px solid #77a8e8;border-radius:12px;font-size:28px;font-weight:800}
.eyebrow{color:#aac5e5;font-size:.7rem;font-weight:750;letter-spacing:.11em;margin:0 0 .12rem}
h1{font-size:1.6rem;margin:0;line-height:1.25}
.heading button{margin-left:auto}
.intro{display:flex;align-items:center;flex-wrap:wrap;gap:.7rem;padding:1.15rem 0;color:var(--muted)}
.badge{background:#dbe7f5;color:#234d80;border-radius:1rem;padding:.23rem .65rem;font-weight:650;font-size:.86rem}
.badge.online{background:#d9f3e8;color:#106244}
.badge.attention{background:#fff0d8;color:#80461b}
.cloud-status{display:grid;justify-items:start;gap:.26rem;margin-bottom:.65rem}
.cloud-actions{margin-top:.65rem}
.columns{display:grid;grid-template-columns:minmax(20rem,25rem) minmax(0,1fr);gap:1rem;align-items:start;padding-bottom:1.3rem}
.control-stack{display:grid;gap:.85rem}
.card{border:1px solid var(--line);border-radius:12px;background:#fff;padding:1rem 1.13rem;box-shadow:0 2px 6px #13253a08}
.login{width:min(100%,28rem);margin:3rem auto 1rem}
.login p,.hint{margin:.25rem 0;color:var(--muted);font-size:.87rem}
h2{font-size:1.12rem;margin:0 0 .7rem}
form, label:not(.check){display:grid;gap:.58rem}
label:not(.check){gap:.27rem;font-weight:620;font-size:.88rem}
input:not([type=checkbox]),select{min-width:0;width:100%;min-height:2.35rem;padding:.38rem .55rem;border:1px solid #c5d1df;border-radius:6px;background:#fff;color:inherit;font:inherit;font-weight:400}
input:disabled,select:disabled{background:#eef2f7;color:var(--muted)}
.check{display:flex;gap:.4rem;align-items:center;color:#374d69;font-size:.84rem}
.check input{margin:0;accent-color:var(--blue)}
.fields{display:grid;grid-template-columns:1fr 1.2fr;gap:.6rem}
.buttons{display:flex;flex-wrap:wrap;gap:.5rem}
button{justify-self:start;min-height:2.25rem;padding:.34rem .75rem;font:inherit;font-size:.86rem;font-weight:650;color:#164d89;background:#f2f7ff;border:1px solid #cddcf0;border-radius:6px;cursor:pointer}
button:not(:disabled):hover{filter:brightness(.93)}
button:focus-visible,input:focus-visible,select:focus-visible,.log-view:focus-visible{outline:2px solid #3179cd;outline-offset:2px}
button:disabled{opacity:.48;cursor:not-allowed}
.primary{color:#fff;background:var(--blue);border-color:var(--blue)}
.ghost{color:#e1ecfa;background:transparent;border-color:#65809e}
.compact button{min-height:1.9rem;font-size:.78rem}
code{overflow-wrap:anywhere}
.notice{position:sticky;top:.4rem;z-index:1;padding:.61rem .8rem;margin:.6rem 0 0;border:1px solid #a8c7ed;border-radius:7px;background:#e4f0ff;color:#16477c}
.notice.error{background:#fff0ef;border-color:#eab7b4;color:#8c241f}
.logs{display:grid;gap:.75rem}
.views{display:flex;gap:.5rem;padding:.56rem .68rem;margin-bottom:1rem}
.library{margin-bottom:1.3rem;display:grid;gap:1rem}
.library-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:.55rem 1rem}
.library-header h2{margin:0}
.recording-filter{position:relative;display:flex;align-items:end;flex-wrap:wrap;gap:.5rem;min-width:min(18.5rem,calc(100vw - 3rem))}
.recording-date-field{display:grid;gap:.27rem;font-weight:620;font-size:.88rem}
#recording-date{display:flex;align-items:center;justify-content:space-between;gap:.65rem;min-width:9.5rem;width:100%;font-variant-numeric:tabular-nums}
.recording-calendar{position:absolute;z-index:3;inset-inline-start:0;top:calc(100% + .42rem);width:min(18.5rem,calc(100vw - 3rem));padding:.65rem;background:#fff;border:1px solid #c5d1df;border-radius:10px;box-shadow:0 9px 26px #13253a24;color:#18283c}
.calendar-header{display:flex;align-items:center;justify-content:space-between;gap:.45rem;margin-bottom:.35rem}
.calendar-header button{padding:0;min-width:1.9rem;min-height:1.9rem;font-size:1.25rem;line-height:1}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.16rem;text-align:center}
.calendar-weekdays{font-size:.75rem;color:var(--muted);margin-bottom:.2rem}
.calendar-day{position:relative;width:100%;min-height:2rem;padding:.15rem 0 .38rem;background:#fff;border-color:transparent;color:#18283c;line-height:1.15;font-variant-numeric:tabular-nums}
.calendar-day[aria-current=date]{border-color:#7b9bc3}
.calendar-day[aria-pressed=true]{background:#dcecff;color:#174a8a;border-color:#a8c7ed}
.calendar-day.has-recording::after,.calendar-legend span{width:.34rem;height:.34rem;background:#ce332c;border-radius:50%}
.calendar-day.has-recording::after{content:"";position:absolute;bottom:.23rem;left:50%;translate:-50% 0}
.calendar-legend{display:flex;align-items:center;gap:.32rem;margin-top:.4rem;color:var(--muted);font-size:.75rem}
#calendar-status{margin:.16rem 0 0;color:var(--muted);font-size:.75rem}
#calendar-status:empty{display:none}
.library-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(12rem,17rem);gap:.85rem;align-items:start}
.player-box{min-width:0;color:#f2f6fc;background:#101c2a;border:1px solid #25384f;border-radius:10px;padding:.75rem}
.player-title{display:flex;justify-content:space-between;align-items:center;gap:.65rem;padding:0 .15rem .65rem}
.player-title h3,.playlist h3,.channel h4,.timeline-heading h4{margin:0;font-size:.96rem}
.player-title h3{overflow-wrap:anywhere}
#playback-clock,#playback-elapsed,.axis-labels,.recording-select strong{font-variant-numeric:tabular-nums;white-space:nowrap}
#playback-clock{color:#a3c8fa;font-size:.86rem}
.channel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.48rem}
.channel{position:relative;min-width:0;background:#080e17;border:1px solid #2a3a50;border-radius:7px;overflow:hidden}
.channel-header{display:flex;align-items:center;justify-content:space-between;gap:.35rem;padding:.24rem .45rem;background:#172638}
.channel h4{color:#c4daf4;font-size:.78rem;white-space:nowrap}
.channel-header button{min-height:1.45rem;padding:.12rem .3rem;font-size:.7rem;line-height:1.15;color:#d9eaff;background:#1e3148;border-color:#3d5470;white-space:nowrap}
.channel-screen{aspect-ratio:16/9;display:grid;position:relative;place-items:center;overflow:hidden}
.channel-screen video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;cursor:zoom-in}
.channel-screen p{margin:.3rem;color:#a9b9cd;text-align:center;font-size:.8rem}
.player-box[data-fullscreen]{display:flex;flex-direction:column;width:100%;height:100%;padding:clamp(.4rem,1vw,1rem);border:0;border-radius:0;background:#080e17}
.player-box[data-fullscreen-fallback]{position:fixed;inset:0;z-index:10;height:100dvh}
body.player-fullscreen-fallback{overflow:hidden}
.player-box[data-fullscreen] .channel-grid{flex:1;min-height:0}
.player-box[data-fullscreen] .channel{display:flex;flex-direction:column;min-height:0}
.player-box[data-fullscreen] .channel-screen{flex:1;min-height:0;aspect-ratio:auto}
.player-box[data-fullscreen] .playback-controls{flex:none;padding-bottom:max(.35rem,env(safe-area-inset-bottom))}
.player-box[data-fullscreen] .day-timeline{display:none}
.player-box:is([data-fullscreen=left],[data-fullscreen=right]) .channel-grid{grid-template-columns:minmax(0,1fr)}
.player-box[data-fullscreen=left] .channel[data-side=right],.player-box[data-fullscreen=right] .channel[data-side=left]{display:none}
.player-box:is([data-fullscreen=left],[data-fullscreen=right]) video{cursor:zoom-out}
.channel-screen.video-zoomed{touch-action:none;user-select:none}
.channel-screen.video-zoomed video{cursor:grab}
.channel-screen.video-panning video{cursor:grabbing}
.restore-video-zoom{position:absolute;right:.55rem;bottom:.55rem;color:#dceaff;background:#13253aed;border-color:#597492}
.video-zoom-hint{display:none;color:#bbcee6;font-size:.75rem;white-space:nowrap}
.player-box[data-fullscreen] .video-zoom-hint{display:inline}
.playback-controls{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem;padding:.62rem 0}
.playback-controls button,.time-jump button,.timeline-tools button{color:#d9eaff;background:#1e3148;border-color:#3d5470;min-height:1.95rem}
#playback-seek[type=range]{flex:1 0 5rem;width:auto;min-height:1.95rem;padding:0;background:none;border:0;accent-color:#72bfff}
#playback-elapsed,.player-message{font-size:.79rem;color:#bbcee6}
.player-message{color:#ffd294;margin:.2rem 0 .5rem}
.day-timeline{border-top:1px solid #32445c;padding:.6rem 0 0}
.timeline-heading,.axis-labels{display:flex;justify-content:space-between;align-items:center;color:#b9cbe0;font-size:.75rem}
.timeline-heading small{font-weight:400;font-size:.75rem}
.timeline-heading span{display:flex;align-items:center;gap:.35rem}
.timeline-heading i{width:.55rem;height:.55rem;border-radius:2px;background:#61d8b3}
.timeline-tools{display:flex;align-items:center;flex-wrap:wrap;gap:.28rem;margin-top:.42rem;color:#b9cbe0;font-size:.75rem}
.timeline-tools button{min-width:1.65rem;min-height:1.65rem;padding:.12rem .38rem;line-height:1}
#day-axis{width:100%;height:2rem;display:block;margin:.4rem 0 .2rem;background:#22334a;border-radius:5px;cursor:crosshair;touch-action:pan-y;user-select:none}
#day-axis.zoomed{cursor:grab}
#day-axis.panning{cursor:grabbing}
#day-axis :is(rect,path,line){vector-effect:non-scaling-stroke}
.axis-grid{stroke:#465d77;stroke-width:1}
#day-segments rect{stroke:#61d8b3;fill:#61d8b3;stroke-width:2}
#day-segments rect.active{stroke:#ffce78;fill:#ffce78}
#day-cursor{stroke:#f5f9ff;stroke-width:2;pointer-events:none}
.time-jump{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;margin-top:.55rem;color:#c5d7ee;font-size:.8rem}
.time-jump label:not(.check){font-size:inherit}
.time-jump input[type=time]{width:auto;min-height:1.95rem;padding:.2rem .35rem;color:#d9eaff;background:#1e3148;border-color:#3d5470;color-scheme:dark}
#axis-message{color:#ffd294}
.playlist{min-width:0;padding:.65rem;background:#f3f6fb;border:1px solid var(--line);border-radius:10px}
.playlist-tools{display:flex;align-items:center;flex-wrap:wrap;gap:.35rem;margin-top:.45rem}
.playlist-tools button,.recording-remove{min-height:1.65rem;padding:.15rem .38rem;font-size:.73rem}
.danger{background:#fff6f5;border-color:#efcbc6;color:#98362d}
#recording-action.error{color:#98362d}
.recording-list{padding:.15rem;margin:.4rem 0 0;list-style:none;display:grid;gap:.35rem;max-height:clamp(16rem,48vh,36rem);overflow:auto}
.recording-row{background:white;border:1px solid var(--line);border-radius:7px;min-width:0}
.recording-main{display:flex;align-items:center;padding-left:.45rem}
.recording-main input{margin:0;accent-color:var(--blue)}
.recording-select{display:flex;align-items:baseline;gap:.45rem;width:100%;background:none;border:0;text-align:left;padding:.4rem .5rem;color:#243d5b}
.recording-select span{min-width:0;overflow-wrap:anywhere;font-size:.79rem;font-weight:500}
.recording-downloads{display:flex;gap:.45rem;align-items:center;flex-wrap:wrap;padding:0 .5rem .35rem}
.recording-remove{margin-left:auto}
.recording-link{color:#164d89;font-size:.73rem;font-weight:650}
.recording-row.active{border-color:#5791d5;background:#e5f0ff}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:.65rem}
.section-heading h2{margin:0}
.progress-box{padding:.57rem .73rem;background:#edf5ff;border:1px solid #d1e4fc;border-radius:7px;color:#174d8d}
progress{display:block;width:100%;height:.6rem;margin:.42rem 0;accent-color:var(--blue)}
.log-view{height:clamp(20rem,59vh,52rem);overflow:auto;padding:.85rem;background:#111f31;border-radius:8px;color:#dce9fb;font:13px/1.7 ui-monospace,Consolas,monospace}
.log-line{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.75rem;overflow-wrap:anywhere}
.log-line time{color:#9cb7d9;white-space:nowrap}
.log-line.error span{color:#ffb3b3}
.log-line.warn span{color:#ffdc9f}
.foot{margin:0}
@media(max-width:780px){.columns{grid-template-columns:1fr}.log-view{height:24rem}.banner .heading{min-height:80px}}
@media(max-width:820px){.library-layout{grid-template-columns:minmax(0,1fr)}.recording-list{max-height:15rem}}
@media(max-width:410px){.wrap{width:calc(100% - 1rem)}.card{padding:.85rem}.log-line{grid-template-columns:1fr;gap:0}.fields{grid-template-columns:1fr}}
