/* Time-Lapse camera view — Panel (side drawer) and Gallery (cards + lightbox) layouts */
.tly-ov{position:fixed;inset:0;z-index:1100;background:rgba(7,22,36,.5);display:flex;color:#10253b}
.tly-ov.panel{justify-content:flex-end;padding:12px}
.tly-ov.gallery{justify-content:flex-end;padding:12px}
.tly-ov header{margin:0!important}
.tly-t{flex:1;min-width:0}
.tly-t h2{margin:0;font-size:16px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tly-t small{display:flex;align-items:center;gap:6px;font-size:12px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tly-t small i{width:8px;height:8px;border-radius:50%;flex:none;background:#9aa9b5}.tly-t small i.on{background:#1fb47a}

/* Panel / Gallery switch */
.tly-sw{display:inline-flex;padding:3px;border-radius:9px;gap:2px;background:rgba(255,255,255,.12);flex:none}
.tly-sw button{height:28px;padding:0 11px;border:0;border-radius:7px;background:transparent;color:inherit;font-size:12px;font-weight:700;cursor:pointer;opacity:.75}
.tly-sw button[aria-pressed=true]{background:#fff;color:#082945;opacity:1;box-shadow:0 1px 3px rgba(0,0,0,.15)}
.tly-gh .tly-sw{background:#eef3f6}

/* header buttons (dark) */
.tly-hb{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:34px;padding:0 12px;border:1px solid rgba(255,255,255,.25);border-radius:8px;background:transparent;color:#fff;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;flex:none}
.tly-hb:hover{background:rgba(255,255,255,.1)}
.tly-hb.pri{background:#14a0b8;border-color:#14a0b8}.tly-hb.pri:hover{background:#108ba0}
.tly-hb.ic{width:34px;padding:0}

/* ========== Panel ========== */
.tly-panel{width:min(820px,100%);background:#f4f8fa;border-radius:14px;display:flex;flex-direction:column;min-height:0;overflow:hidden;box-shadow:0 30px 80px rgba(0,15,30,.4);position:relative;animation:tlyIn .18s ease-out}
@keyframes tlyIn{from{transform:translateX(30px);opacity:0}to{transform:none;opacity:1}}
.tly-dh{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#0c2439;color:#fff}
.tly-dh>img{width:56px;height:32px;object-fit:cover;border-radius:6px;flex:none}
.tly-dh h2{color:#fff}
.tly-dh .tly-t small{color:#a9c0d1}
.tly-tabs{padding:0 14px}
.tly-tabs button{padding:9px 10px 7px;font-size:13px}
.tly-vpane{padding:12px 14px;gap:10px}
.tly-panel .tly-player{flex:none;height:300px;aspect-ratio:auto;max-height:none;width:100%}
.tly-info{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;min-height:22px}
.tly-info>b{font-size:14px;color:#082945}
.tly-bar{display:flex;align-items:center;gap:8px;padding-top:4px;border-top:1px solid #dbe6ec;flex-wrap:wrap}
.tly-kinds{display:flex;gap:4px;flex-wrap:wrap}
.tly-kinds button{height:28px;padding:0 10px;border:1px solid #cddbe3;border-radius:20px;background:#fff;color:#33495c;font-size:12px;font-weight:700;cursor:pointer}
.tly-kinds button span{color:#7a8fa0;font-weight:600;margin-left:2px}
.tly-kinds button[aria-pressed=true]{background:#0c2439;border-color:#0c2439;color:#fff}
.tly-kinds button[aria-pressed=true] span{color:#a9c0d1}
.tly-count{font-size:12px;color:#6b8194;font-weight:600}
.tly-list{display:flex;flex-direction:column;gap:6px}
.tly-gt{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#6b8194;padding:8px 2px 2px}
.tly-row{display:flex;align-items:center;gap:12px;padding:7px 8px;border:1px solid #dbe6ec;border-radius:10px;background:#fff;cursor:pointer}
.tly-row:hover{border-color:#a9c6d4}
.tly-row.sel{border-color:#0f6f84;box-shadow:0 0 0 2px rgba(15,111,132,.18);background:#f2fafc}
.tly-th{position:relative;flex:none;width:104px;height:58px;padding:0;border:0;border-radius:7px;overflow:hidden;background:#0d1d2b;cursor:pointer}
.tly-th img{width:100%;height:100%;object-fit:cover;display:block}
.tly-th small{position:absolute;right:4px;bottom:4px;padding:1px 5px;border-radius:4px;background:rgba(0,0,0,.7);color:#fff;font-size:10.5px;font-weight:700}
.tly-pl{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;opacity:.85}
.tly-pl svg{width:22px;height:22px;filter:drop-shadow(0 1px 3px rgba(0,0,0,.6))}
.tly-rt{flex:1;min-width:0}
.tly-rt>div{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tly-rt b{font-size:13.5px;color:#082945}
.tly-rt small{display:block;font-size:12px;color:#5d7387;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tly-now{font-size:10.5px;font-weight:800;color:#0f6f84;background:#dff3f7;padding:2px 7px;border-radius:20px}
.tly-row.failed .tly-rt small{color:#b4233f}
.tly-acts{display:flex;gap:4px;flex:none}
.tly-ab{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:1px solid #cddbe3;border-radius:8px;background:#fff;color:#33495c;cursor:pointer;text-decoration:none}
.tly-ab:hover{background:#eef5f8;color:#0f6f84;border-color:#a9c6d4}
.tly-ab.sh{color:#0f6f84}
.tly-ab.del:hover{background:#fde8ec;color:#b4233f;border-color:#f3b8c4}
.tly-ab.sm{width:28px;height:28px;border-radius:7px}
.tly-ab.sm svg{width:13px;height:13px}
.tly-more{align-self:center;margin:6px 0}

/* ========== Gallery ========== */
.tly-gal{width:min(820px,100%);animation:tlyIn .18s ease-out;background:#f4f8fa;border-radius:14px;display:flex;flex-direction:column;min-height:0;overflow:hidden;box-shadow:0 30px 80px rgba(0,15,30,.4);position:relative}
.tly-gh{display:flex;align-items:center;gap:10px;padding:12px 16px;background:#fff;border-bottom:1px solid #d9e6ec;color:#082945}
.tly-gh>img{width:56px;height:32px;object-fit:cover;border-radius:6px;flex:none}
.tly-gh .tly-t small{color:#5d7387}
.tly-gh .tlx-btn{height:34px}.tly-gh .tlx-ic{width:34px}
.tly-gpane{padding:14px 16px;gap:12px}
.tly-days{background:#fff;border:1px solid #dbe6ec;border-radius:12px;padding:10px 12px}
.tly-dh2{display:flex;align-items:baseline;gap:10px;margin-bottom:8px}
.tly-dh2 b{font-size:13px;color:#082945}.tly-dh2 span{font-size:11.5px;color:#7a8fa0}
.tly-sq{display:grid;grid-template-columns:repeat(30,1fr);gap:4px}
.tly-sq button{height:22px;padding:0;border:0;border-radius:4px;cursor:pointer;background:#e6edf1}
.tly-sq button.ok{background:#1fb47a}.tly-sq button.ok:hover{background:#13965f}
.tly-sq button.bad{background:#e2566f}.tly-sq button.run{background:#5aa7dc}
.tly-sq button.today{background:repeating-linear-gradient(45deg,#cfe6ee 0 4px,#e8f3f7 4px 8px);outline:1.5px dashed #0f6f84;outline-offset:-1.5px;cursor:default}
.tly-sq button.none{cursor:default}
.tly-dl{display:flex;justify-content:space-between;font-size:11px;color:#7a8fa0;margin-top:5px}
.tly-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.tly-grid>.tl-empty{grid-column:1/-1}
.tly-card{background:#fff;border:1px solid #dbe6ec;border-radius:11px;overflow:hidden;display:flex;flex-direction:column}
.tly-card:hover{border-color:#a9c6d4;box-shadow:0 6px 18px rgba(8,41,69,.08)}
.tly-cth{position:relative;aspect-ratio:16/9;width:100%;padding:0;border:0;background:#0d1d2b;cursor:pointer;display:block}
.tly-cth img{width:100%;height:100%;object-fit:cover;display:block}
.tly-cth em{position:absolute;left:6px;top:6px;padding:2px 6px;border-radius:4px;font-size:9.5px;font-weight:800;font-style:normal;letter-spacing:.05em;color:#fff;background:#0f6f84}
.tly-cth em.weekly{background:#6b4fc4}.tly-cth em.manual{background:#c77a12}
.tly-cth small{position:absolute;right:6px;bottom:6px;padding:1px 6px;border-radius:4px;background:rgba(0,0,0,.7);color:#fff;font-size:11px;font-weight:700}
.tly-cth strong{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#cfdbe4;font-size:12px;font-weight:700;text-transform:capitalize;background:rgba(6,18,28,.55)}
.tly-card.failed .tly-cth strong{color:#ffb3c1}
.tly-cth .tly-pl{opacity:0;transition:opacity .15s;background:rgba(6,18,28,.25)}
.tly-cth .tly-pl svg{width:30px;height:30px}
.tly-cth:hover .tly-pl,.tly-cth:focus-visible .tly-pl{opacity:1}
.tly-cb{display:flex;align-items:center;gap:6px;padding:8px 9px}
.tly-cb>div:first-child{flex:1;min-width:0}
.tly-cb b{display:block;font-size:12.5px;color:#082945;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tly-cb small{display:block;font-size:11px;color:#6b8194;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tly-card.failed .tly-cb small{color:#b4233f}
.tly-moreg{grid-column:1/-1;display:flex;justify-content:center}

/* lightbox */
.tly-light{position:absolute;inset:0;z-index:5;background:rgba(6,18,28,.72);display:flex;align-items:center;justify-content:center;padding:16px}
.tly-light[hidden]{display:none}
.tly-lbox{width:min(860px,100%);background:#0c2439;border-radius:12px;padding:10px 12px 12px;display:flex;flex-direction:column;gap:8px;color:#fff;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.tly-lh{display:flex;align-items:center;gap:8px}
.tly-lh b{flex:1;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tlyLAct{display:flex;gap:4px}
.tly-lh .tly-ab{background:transparent;border-color:rgba(255,255,255,.25);color:#fff}
.tly-lh .tly-ab:hover{background:rgba(255,255,255,.1);color:#fff}
.tly-lh .tly-ab.del:hover{background:#b4233f;border-color:#b4233f}
.tly-lstage{position:relative}
.tly-lstage .tly-player{width:100%;max-height:calc(100vh - 220px)}
.tly-nav{position:absolute;top:50%;transform:translateY(-50%);width:38px;height:54px;border:0;border-radius:8px;background:rgba(0,0,0,.45);color:#fff;font-size:28px;line-height:1;cursor:pointer;z-index:2}
.tly-nav:hover{background:rgba(0,0,0,.7)}
.tly-nav.l{left:-6px}.tly-nav.r{right:-6px}
.tly-lbox .tly-info>b{display:none}
.tly-lbox .tlx-meta{color:#a9c0d1}

@media (max-width:900px){.tly-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tly-sq{grid-template-columns:repeat(15,1fr)}}
@media (max-width:600px){.tly-panel .tly-player{height:200px}.tly-acts{flex-direction:column}.tly-dh>img,.tly-gh>img{display:none}}

.tly-ov.noanim .tly-panel,.tly-ov.noanim .tly-gal{animation:none}
.tly-gal .tly-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.tly-gal .tly-sq{gap:3px}.tly-gal .tly-sq button{height:20px}
/* Schedule tab: the window fits its content (no empty space under the cards) */
.tly-panel:has(#tlxSchedule:not([hidden])),.tly-gal:has(#tlxSchedule:not([hidden])){align-self:flex-start;max-height:100%}
#tlxSchedule .tlx-sgrid{align-items:stretch}
#tlxSchedule{flex:0 1 auto;min-height:0;overflow:auto}
