*{box-sizing:border-box}html,body{margin:0;font-family:"Segoe UI",Arial,sans-serif;color:#2a1c3f}button,input,select{font:inherit}button,a,input,select{outline-offset:4px}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}
.tv{height:100vh;height:100dvh;overflow:hidden;background:linear-gradient(120deg,#e8e0f5,#fbe4e8);padding:1.6vh 3vw;display:flex;flex-direction:column;gap:2vh}
.brand{height:12vh;flex:none;display:flex;justify-content:center;align-items:center}.brand img{height:100%;max-width:60%;object-fit:contain}
.display{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1.8fr) minmax(0,1fr);gap:1vw}
.media{min-width:0;min-height:0;position:relative;background:#20172d;overflow:hidden;display:flex;align-items:center;justify-content:center}
.media img,.media video,.media iframe{width:100%;height:100%;object-fit:contain;border:0}.media iframe{position:absolute;inset:0}
.empty{height:100%;width:100%;background:linear-gradient(130deg,#25133f,#522e90);display:flex;flex-direction:column;align-items:center;justify-content:center;color:white;padding:2rem;text-align:center;position:relative;overflow:hidden}
.empty:after{content:"";position:absolute;width:110%;height:55%;border-top:2.5vh solid #ec1b34;border-radius:50%;transform:rotate(-25deg);bottom:-40%;right:-22%;box-shadow:0 -3vh #7046ad}
.empty strong{font-size:clamp(22px,2.2vw,46px)}.empty p{font-size:clamp(16px,1.4vw,30px)}
.qr-panel{background:#fff;position:relative;min-height:0;min-width:0;display:flex;flex-direction:column;align-items:center;padding:3vh 1.8vw}
.qr-border{position:absolute;inset:12px;border:3px solid transparent;border-image:linear-gradient(135deg,#522e90,#ec1b34) 1;pointer-events:none}
.qr-space{flex:1;min-height:0;width:100%;display:flex;align-items:center;justify-content:center}#qr{image-rendering:pixelated;max-width:100%;max-height:100%;aspect-ratio:1;object-fit:contain;background:white}
.qr-panel p{margin:1.2vh 0;font-size:clamp(16px,1.8vw,36px);flex:none}
.footer{min-height:7vh;flex:none;display:flex;align-items:center;justify-content:space-between;gap:1rem;font-size:clamp(14px,1.5vw,30px)}
.clock{display:flex;gap:.7em;align-items:center;color:#522e90}.clock #time{border-left:1px solid #b8a8cb;padding-left:.7em;font-variant-numeric:tabular-nums;min-width:8em}
.display-tools{position:fixed;right:1rem;top:1rem;opacity:0;transition:opacity .2s;z-index:10;font-size:14px}.display-tools:hover,.display-tools:focus-within,.tv.show-tools .display-tools{opacity:1}.display-tools button{background:white;border:1px solid #522e90;color:#522e90;padding:.5em}
#connection{display:block;background:#fff;color:#522e90;padding:.2em;max-width:230px}#connection:empty{display:none}
.media-message{position:absolute;inset:auto 1rem 1rem;background:#fff;padding:1rem;z-index:3;text-align:center}.media-message button{margin-left:.7em}
.tv.portrait .display{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,2fr) minmax(0,1fr);gap:1vh}
.tv.portrait{padding:1.2vh 4vw;gap:1.2vh}.tv.portrait .brand{height:7vh}
.tv.portrait .footer{min-height:6vh;flex-direction:column;justify-content:center;gap:.5vh;font-size:clamp(12px,2.5vw,28px)}
.tv.portrait .qr-panel{padding:1.8vh 4vw}.tv.portrait .qr-panel p{font-size:clamp(16px,2.8vw,32px);margin:.4vh 0}.tv.portrait .qr-border{inset:10px}
.tv.portrait .empty strong{font-size:clamp(22px,3.5vw,42px)}.tv.portrait .empty p{font-size:clamp(16px,2.5vw,26px)}
.admin{background:#f6f4fb;min-height:100vh;font-size:17px}.admin-header{background:white;display:flex;align-items:center;padding:1rem 5vw;gap:2.5rem}.admin-header img{width:150px}.admin-header h1{font-size:28px;flex:1}
.admin main{max-width:1200px;margin:2rem auto;padding:0 1.5rem}.admin h2{font-size:27px}.admin h3{font-size:20px}
.grid{display:grid;grid-template-columns:1.8fr 1fr;gap:2rem}.card{background:white;padding:2rem}.card label.field{display:block;font-weight:600;margin:1.5rem 0 .6rem}.card label.field:first-child{margin-top:0}
input[type=url],input[type=password],input[type=text],select{width:100%;padding:.9rem;border:1px solid #d2c8df;background:#f8f6fc;border-radius:3px;color:#2a1c3f}
.checks{display:flex;gap:2rem;padding:.6rem 0}.checks input{width:20px;height:20px;accent-color:#522e90;vertical-align:middle;margin-right:.5rem}
.actions{display:flex;gap:1.5rem;align-items:center;margin-top:1.5rem}.primary{background:#522e90;color:white;border:0;padding:1rem 1.5rem;border-radius:3px}
.secondary{border:1px solid #522e90;background:white;color:#522e90;padding:.8rem 1rem;text-decoration:none}.hint{color:#776686;font-size:.92em;line-height:1.6}
#message{min-height:1.7em;line-height:1.5;margin:1rem 0;color:#522e90}#message.error{color:#b20a28}.auth{max-width:520px;margin:3rem auto}.auth .primary{margin-top:1.4rem}
[hidden]{display:none!important}dialog{border:1px solid #cfc4df;padding:1rem;max-width:96vw;width:1100px;background:#f6f4fb}dialog::backdrop{background:#20172d99}dialog iframe{width:100%;height:65vh;border:0;display:block;margin-top:1rem}dialog .actions{margin:0;justify-content:space-between}
@media(max-width:700px){.grid{grid-template-columns:1fr}.card{padding:1.3rem}.admin-header{gap:1rem}.admin-header img{width:95px}.admin-header h1{font-size:21px}.admin main{padding:0 1rem}.actions{flex-wrap:wrap}.clock{gap:.4em}}

