:root{--navy: #162867;--navy-2: #22388a;--gold: #f9ad25;--bg: #f4f6fa;--surface: #ffffff;--text: #16203a;--muted: #5d6680;--border: #d8dde8;--danger: #b42318;--radius: 10px;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--text);background:var(--bg);-webkit-text-size-adjust:100%}*{box-sizing:border-box}html{background:var(--navy)}body{margin:0;background:var(--bg);min-height:100vh}h1{font-size:1.5rem;margin:0 0 16px}h2{font-size:1.15rem;margin:32px 0 8px}a{color:var(--navy-2)}.muted{color:var(--muted)}.small{font-size:.9rem}.center{text-align:center;margin-top:30vh}.error{color:var(--danger);margin:0}.hint{color:var(--muted);font-size:.85rem;font-weight:400}.row{display:flex;gap:8px;flex-wrap:wrap}.topbar{display:flex;align-items:center;gap:16px;padding:8px 16px;background:var(--navy);position:sticky;top:0;z-index:1}.topbar-logo{width:44px;height:44px}.topbar nav{display:flex;gap:4px}.topbar nav a{color:#fff;text-decoration:none;padding:8px 12px;border-radius:8px;border-bottom:2px solid transparent}.topbar nav a.active{border-bottom-color:var(--gold);border-radius:8px 8px 0 0}.content{max-width:960px;margin:0 auto;padding:20px 16px 48px}.card-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px;background:var(--navy)}.card{width:100%;max-width:380px;background:var(--surface);border-radius:16px;padding:24px;text-align:center}.card-logo{width:160px;height:160px;border-radius:12px;margin-bottom:8px}.card .form{text-align:left}.form{display:flex;flex-direction:column;gap:14px;margin-bottom:16px;max-width:420px}.card .form{max-width:none}label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:.95rem}input,select{font:inherit;font-weight:400;padding:12px;border:1px solid var(--border);border-radius:var(--radius);background:#fff;min-height:46px}input:focus,select:focus{outline:2px solid var(--navy-2);outline-offset:1px}button{font:inherit;font-weight:600;min-height:46px;padding:10px 18px;border:none;border-radius:var(--radius);background:var(--navy);color:#fff;cursor:pointer}button:disabled{opacity:.6;cursor:default}button.secondary{background:transparent;color:var(--navy);border:1px solid var(--navy)}button.danger{background:var(--danger)}.danger-title{color:var(--danger)}.page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}.page-head h1{margin:0}a.button{display:inline-flex;align-items:center;min-height:46px;padding:10px 18px;border-radius:var(--radius);background:var(--navy);color:#fff;font-weight:600;text-decoration:none}.small-button{min-height:38px;padding:6px 12px;font-size:.9rem}.back{display:inline-flex;align-items:center;min-height:38px;padding:6px 14px;margin-bottom:12px;border:1px solid var(--navy);border-radius:var(--radius);background:var(--surface);color:var(--navy);font-weight:600;font-size:.9rem;text-decoration:none}.back:hover{background:#eef1f7}.section-text{margin:0 0 12px}.empty{background:var(--surface);border:1px dashed var(--border);border-radius:var(--radius);padding:16px}.empty p{margin:0 0 8px}.tiles{list-style:none;margin:0;padding:0;display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}.tile{display:flex;flex-direction:column;gap:6px;padding:16px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);color:inherit;text-decoration:none}.tile:hover{border-color:var(--navy-2)}.tile strong{font-size:1.1rem;overflow-wrap:anywhere}.tv-icon{display:block;width:100%;height:auto;margin:4px 0}.tv-icon.off{opacity:.45}@media(max-width:600px){.screen-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.screen-tiles .tile{padding:12px}.screen-tiles .tile strong{font-size:1rem}}.status:before{content:"";display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;vertical-align:middle}.status.on:before{background:#1f9d55}.status.off{color:var(--muted)}.status.off:before{background:#a0a7b8}.storage{display:flex;flex-direction:column;gap:4px}.bar{height:6px;background:#e6e9f0;border-radius:3px;overflow:hidden}.bar span{display:block;height:100%;background:var(--gold)}.facts{display:grid;grid-template-columns:max-content 1fr;gap:8px 16px;margin:16px 0 0}.panel .facts{margin:0;align-items:center}.panels{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));align-items:start;margin-top:8px}.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px 18px 18px}.panel h2{margin:0 0 12px}.panel .tv-icon{max-width:220px;margin:0 0 14px}.panel .form{max-width:none;margin-bottom:0}.danger-panel{border-color:#f1c4bf}.facts dt{color:var(--muted)}.facts dd{margin:0}.check{flex-direction:row;align-items:center;gap:10px;font-weight:600}.check input{width:22px;height:22px;min-height:0}.inline-form{flex-direction:row;flex-wrap:wrap;align-items:center;max-width:none;margin-bottom:16px}.inline-form input{flex:1 1 200px}.code-input{font-size:1.5rem;letter-spacing:.3em;font-variant-numeric:tabular-nums;max-width:220px}.dropzone{border-radius:var(--radius)}.dropzone.dragging{outline:3px dashed var(--gold);outline-offset:8px}.media-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));margin-top:16px}.tile.media{padding:10px;gap:6px}.thumb{position:relative;aspect-ratio:16 / 9;background:#e6e9f0;border-radius:6px;overflow:hidden;display:flex;align-items:center;justify-content:center}.thumb img{width:100%;height:100%;object-fit:contain;background:#000}.badge{position:absolute;right:6px;bottom:6px;background:#000000b3;color:#fff;font-size:.8rem;padding:1px 6px;border-radius:4px}.media-name{font-size:.95rem;overflow-wrap:anywhere}.replace-name{overflow-wrap:anywhere}.tile.media .inline-form{margin:0;gap:6px}.tile.media .inline-form input{min-height:38px;padding:6px 8px;flex-basis:100%}.link-button{background:none;color:var(--navy-2);min-height:32px;padding:4px 0;font-weight:600;text-decoration:underline}.danger-link{color:var(--danger)}.confirm{display:flex;flex-direction:column;gap:6px}.uploads{display:flex;flex-direction:column;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px;margin:12px 0}.upload{display:flex;flex-direction:column;gap:4px}.upload-head{display:flex;justify-content:space-between;gap:8px;align-items:center}.upload-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uploads .link-button{align-self:flex-start}.summary{display:flex;flex-direction:column;gap:6px;margin-bottom:16px;max-width:420px}.bar.over span{background:var(--danger)}.items{list-style:none;margin:0;padding:0 0 96px;display:flex;flex-direction:column;gap:10px}.item{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:10px;display:flex;flex-direction:column;gap:10px}.item.expired{opacity:.6}.item-main{display:flex;align-items:center;gap:10px}.item-pos{width:22px;text-align:center;color:var(--muted);font-weight:600}.item-thumb{width:80px;aspect-ratio:16 / 9;background:#000;border-radius:4px;overflow:hidden;flex:none;display:block}.item-thumb img{width:100%;height:100%;object-fit:contain}.item-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.item-info strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.validity{color:var(--navy-2)}.item-move{display:flex;flex-direction:column;gap:4px}button.icon{min-height:36px;width:40px;padding:0;font-size:1.1rem}.item-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;align-items:end}.item-options label{font-size:.85rem}.item-options select{min-height:40px;padding:8px}.item-options .duration{display:flex;flex-direction:column;gap:4px}.with-unit{display:flex;align-items:center;gap:8px;font-weight:400}.with-unit input{width:7em;min-height:40px;padding:8px}input[aria-invalid=true]{border-color:var(--danger)}.item-actions{display:flex;gap:8px;justify-content:flex-end}button.icon{display:inline-flex;align-items:center;justify-content:center}.with-clear{display:flex;gap:6px;align-items:center}.with-clear input{flex:1;min-width:0}.with-clear button.icon{flex:none;min-height:40px}.notice{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:12px;padding:10px 12px;border-radius:var(--radius);background:#fff6e0;border:1px solid #f0d58c}.dates{grid-column:1 / -1;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}.savebar{position:fixed;left:0;right:0;bottom:0;z-index:2;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:12px 16px;background:var(--surface);border-top:2px solid var(--gold);box-shadow:0 -4px 12px #00000014}.overlay{position:fixed;inset:0;z-index:3;background:#0f235280;display:flex;align-items:center;justify-content:center;padding:16px}.dialog{background:var(--surface);border-radius:12px;padding:20px;max-width:460px}.dialog p{margin-top:0}.picker{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px;margin-bottom:16px;display:flex;flex-direction:column;gap:12px}.picker-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;max-height:50vh;overflow:auto}.pick{flex-direction:row;align-items:center;gap:10px;font-weight:400;cursor:pointer}.pick.disabled{opacity:.5;cursor:default}.pick input{width:22px;height:22px;min-height:0;flex:none}.pick-name{display:flex;flex-direction:column;min-width:0;overflow-wrap:anywhere}.install-banner{display:flex;flex-direction:column;gap:12px;background:var(--surface);border:1px solid var(--gold);border-radius:var(--radius);padding:12px;margin-bottom:16px}.install-head{display:flex;align-items:center;gap:12px}.install-head img{width:44px;height:44px;border-radius:10px}.install-head div{display:flex;flex-direction:column;flex:1}.install-head .link-button{text-decoration:none;font-size:1.1rem;padding:4px 8px}.install-steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:8px}div.install-steps{padding-left:0;align-items:flex-start}div.install-steps p{margin:0}.glyph{display:inline-block;min-width:1.2em;text-align:center;font-weight:700}.topbar{padding-top:max(8px,env(safe-area-inset-top))}.card-page{padding-top:max(16px,env(safe-area-inset-top))}.savebar{padding-bottom:max(12px,env(safe-area-inset-bottom))}.preview{margin:0;display:flex;flex-direction:column;align-items:center;gap:10px}.preview-tv{position:relative;width:100%;aspect-ratio:16 / 9;background:#000;overflow:hidden;border:6px solid #23262d;border-radius:6px;box-sizing:border-box}.preview-tv.vertical{aspect-ratio:9 / 16;width:min(100%,200px)}.preview-tv img{position:absolute;inset:0;width:100%;height:100%;display:block}.preview-tv img.contain{object-fit:contain}.preview-tv img.cover{object-fit:cover}.preview-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:40px;height:40px;display:flex;align-items:center;justify-content:center;padding-left:3px;box-sizing:border-box;border-radius:50%;background:#0000008c;color:#fff;font-size:.95rem}.preview-progress{position:absolute;left:0;right:0;bottom:0;height:4px;background:#ffffff40}.preview-progress span{display:block;height:100%;background:var(--gold)}.preview-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#a0a7b8;font-size:.9rem;text-align:center;padding:8px}.preview figcaption{width:100%;display:flex;flex-direction:column;align-items:center;gap:8px}.preview-bar{display:flex;align-items:center;gap:10px;max-width:100%}.preview-bar button.icon{flex:none;font-size:.8rem}.preview-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.preview-dots{display:flex;flex-wrap:wrap;justify-content:center;gap:2px}button.dot{width:24px;height:24px;min-height:0;padding:0;background:transparent;border:0;display:flex;align-items:center;justify-content:center}button.dot:before{content:"";width:8px;height:8px;border-radius:50%;background:#c3c9d6}button.dot.active:before{background:var(--navy)}.preview-panel{max-width:420px;margin-bottom:16px;padding:12px 16px}.preview-panel summary{cursor:pointer;font-weight:600}.preview-panel[open] summary{margin-bottom:12px}
