:root{color-scheme:dark}
/* Studio layout: fluid columns, bounded controls, and touch-sized actions. */
html{scrollbar-gutter:stable}body{min-width:0}.shell{grid-template-columns:220px minmax(0,1fr)}.shell>aside{position:sticky;top:0;height:100dvh;min-height:0;overflow:auto;padding:26px 20px;gap:32px}.shell>main{min-width:0;width:100%;max-width:1680px;padding:32px clamp(22px,3vw,44px)}.shell>main>header{flex-wrap:wrap;align-items:center;gap:20px}.shell>main>header>div:first-child{min-width:0;flex:1 1 290px}h1{font-size:clamp(25px,2.5vw,34px);overflow-wrap:anywhere;line-height:1.15}.topactions{flex:0 0 auto;flex-wrap:nowrap;justify-content:flex-end}.topactions button{min-height:44px}.topactions #publish{width:auto;min-width:215px;white-space:normal}.topactions #playAll{white-space:nowrap}.layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:28px}.layout>section{min-width:0}.layout>.preview-column{position:sticky;top:24px;align-self:start;max-width:none}.sectionhead{gap:12px;flex-wrap:wrap}.sectionhead .count{overflow-wrap:anywhere}.previewbar{flex-wrap:wrap;gap:10px}.previewbar button{min-height:40px}.configure-selected{width:100%;padding:13px 16px;min-height:46px;border-color:var(--accent-border);color:var(--accent-light)}.preview-help{margin-top:12px}.previewframe{min-width:0}.previewframe .screen.portrait{width:min(100%,230px)}
.playlist-toolbar{gap:18px;flex-wrap:wrap;flex-direction:row;align-items:flex-end}.playlist-select-label{flex:1 1 240px;min-width:0;max-width:480px}.playlist-select-label select{min-width:0;width:100%;min-height:46px}.playlist-buttons{flex-wrap:wrap;min-width:0}.playlist-buttons button{min-height:44px}.row{display:grid;grid-template-columns:24px 76px minmax(0,1fr) 30px 30px;gap:12px;padding:14px;cursor:pointer}.row .thumb{width:76px;height:58px}.row .info{min-width:0;outline-offset:5px}.row .info strong{font-size:14px;line-height:1.35}.row .info .widget-title{font-size:13px}.row .playlist-media-open{width:76px;min-width:0}.row .grip{min-width:24px;min-height:44px;cursor:grab}.row .dots{width:30px;min-height:44px;padding:4px;font-size:22px}.row .reorder{gap:0}.row .reorder button{width:30px;min-height:28px;padding:2px;font-size:17px}.row .reorder button:disabled{cursor:default;opacity:.28}.row .info small{line-height:1.4}.playlistfoot{gap:12px}.playlistfoot span{min-width:0}.playlistfoot span:last-child{white-space:nowrap}.account-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0}.account-actions button{min-height:40px;font-size:11px;padding:8px 5px}.account-menu-toggle{display:none}
.library{grid-template-columns:repeat(auto-fill,minmax(min(220px,100%),1fr));gap:18px}.media-filters button{min-height:44px}.settings{width:100%;max-width:800px}.panel{min-width:0}.settings .field input,.settings .field select{min-width:0;max-width:min(65%,340px);width:100%}.settings .toggle{flex-shrink:0}.linkbox{max-width:100%;word-break:break-all}.error-banner{overflow-wrap:anywhere}.toast{max-width:min(560px,calc(100vw - 32px));bottom:max(20px,env(safe-area-inset-bottom));text-align:center}.uploadstatus{overflow-wrap:anywhere}
/* One scrollable dialog body; title and save status remain reachable. */
body.overlay-open{overflow:hidden;overscroll-behavior:none}.properties-modal{position:fixed;inset:0;z-index:12;display:grid;place-items:center;padding:32px;background:#03090dd9;backdrop-filter:blur(8px)}.properties-dialog{width:min(1120px,100%);max-height:calc(100dvh - 64px);min-height:0;display:flex;flex-direction:column;overflow:hidden;background:#182125;border:1px solid #4b514b;border-radius:20px;box-shadow:0 28px 110px #0008}.properties-dialog[data-content-type=image],.properties-dialog[data-content-type=video],.properties-dialog[data-content-type=welcome]{width:min(900px,100%)}.properties-dialog[data-content-type=weather]{width:min(1000px,100%)}.properties-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:20px;padding:20px 24px;margin:0;border-bottom:1px solid #35423f;flex:0 0 auto}.properties-header>div{min-width:0}.properties-header h2{font-size:22px;line-height:1.2;margin:0;letter-spacing:-.03em}.properties-header p{font-size:13px;color:#99aaa6;margin:6px 0 0;line-height:1.4;overflow-wrap:anywhere}.properties-header button{width:42px;height:42px;min-width:42px;padding:0;font-size:28px;line-height:1;background:transparent;border-color:#475650}.properties-body{display:grid;grid-auto-rows:max-content;align-content:start;grid-template-columns:minmax(240px,.85fr) minmax(0,1.15fr);gap:28px;padding:24px;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.properties-preview{position:sticky;top:0;display:block;align-self:start;width:auto;height:auto;min-height:0;margin:0;padding:0;border:0;overflow:visible;background:transparent;gap:0}.properties-preview details{min-width:0}.properties-preview summary{padding:3px 0 16px;font-size:14px;color:#c1cfc9;cursor:pointer;font-weight:600}.properties-preview summary::marker{color:var(--accent)}.properties-preview .previewframe{padding:8px;border-radius:12px}.properties-preview .screen{width:100%;aspect-ratio:16/9;max-height:none}.properties-preview .screen.portrait{width:min(100%,210px,calc((100dvh - 390px)*.5625));aspect-ratio:9/16;max-height:none}.properties-preview details>button{margin-top:14px;width:100%;min-height:44px;font-size:13px}.properties-editor{min-width:0;padding:0;border:0;background:none}.properties-editor>.field:first-child{margin-top:0}.properties-editor>h2{display:none}#editor .field{display:grid;grid-template-columns:minmax(100px,.85fr) minmax(0,1.15fr);gap:14px;align-items:center;margin:18px 0;line-height:1.4}#editor .field input,#editor .field select{width:100%;min-width:0;max-width:none;font:14px/1.4 Segoe UI,sans-serif;color:#edf5f3;background-color:#11191d;border:1px solid #3b494f;border-radius:7px;padding:10px}#editor .field .toggle{justify-self:end;flex-shrink:0}#editor #quizImage{max-width:none}#editor fieldset{min-width:0}#editor .quiz-editor-label{margin-top:0}#editor .quiz-editor-label textarea{min-height:95px}.properties-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;flex:0 0 auto;padding:16px 24px;border-top:1px solid #35423f;background:#151e21}.properties-footer>div{min-width:0}.properties-footer span{font-size:13px;color:#e4d4c5}.properties-footer p{font-size:11px;color:#899c94;line-height:1.4;margin-top:5px}.properties-footer .save-error{color:#ffbca7}.properties-footer button{min-width:108px;min-height:44px}.properties-body .hint{overflow-wrap:anywhere}.properties-body .rss-style-options{gap:8px}.properties-body .rss-style-options button{min-height:44px}.properties-body .clock-design-options{gap:9px}.properties-body .clock-design-options button{min-width:0;padding:10px 6px}.properties-body .clock-design-mini{width:100%}
.modal{padding:24px}.modal .dialog{min-width:0;max-height:calc(100dvh - 48px);overflow:auto;overscroll-behavior:contain}.modal .dialog h2{overflow-wrap:anywhere}.modal .dialog button{min-height:44px}.media-preview-dialog{height:min(900px,92dvh)}.fullscreen{padding:0}.fullscreen #fullscreenContent.portrait{height:90dvh!important;width:auto!important}.closepreview{max-width:calc(100% - 24px);font-size:13px}
@media(min-width:1500px){.shell>main{padding-top:42px}.layout{gap:40px}.row{padding:16px;grid-template-columns:24px 88px minmax(0,1fr) 30px 30px}.row .thumb,.row .playlist-media-open{width:88px}.row .thumb{height:62px}}
@media(max-width:1150px){.shell{grid-template-columns:180px minmax(0,1fr)}.shell>aside{padding:22px 15px;gap:28px}.shell>main{padding:28px 24px}.layout{grid-template-columns:minmax(0,1fr);gap:30px}.layout>.preview-column{position:static;max-width:700px}.preview-column .previewframe .screen.portrait{width:min(100%,220px)}.shell>main>header>div:first-child{flex-basis:100%}.topactions{width:100%;justify-content:flex-start}.topactions #publish{flex:0 1 auto}}
@media(max-width:960px){.shell{display:block}.shell>aside{position:sticky;top:0;z-index:3;height:auto;overflow:visible;display:grid;grid-template-columns:150px minmax(0,1fr) 42px;align-items:center;gap:16px;padding:10px 20px;background:#151b1ef5;border-right:0;border-bottom:1px solid #343b38;backdrop-filter:blur(12px)}.shell>aside .brand-lockup{max-width:150px}.shell>aside .brand-studio{display:none}.shell>aside nav{display:flex;align-items:center;justify-content:center;gap:5px}.shell>aside nav button{padding:12px;font-size:14px;min-height:44px;white-space:nowrap}.shell>aside nav i{width:24px}.shell>aside .device{display:none}.account-menu-toggle{display:block;width:42px;height:42px;padding:0;font-size:26px;line-height:1}.shell>aside .account-actions{position:absolute;right:20px;top:calc(100% + 6px);z-index:4;display:none;width:200px;grid-template-columns:1fr;padding:10px;background:#1a2427;border:1px solid #566052;border-radius:10px;box-shadow:0 12px 35px #0006}.shell>aside .account-actions.is-open{display:grid}.account-actions button{font-size:13px;padding:11px}.shell>main{padding:28px 24px 40px}.layout{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:24px}.layout>.preview-column{max-width:none;position:sticky;top:112px}.shell>main>header>div:first-child{flex-basis:100%}.properties-modal{padding:20px}.properties-dialog{max-height:calc(100dvh - 40px)}.properties-body{grid-template-columns:minmax(200px,.8fr) minmax(0,1.2fr);gap:22px;padding:22px}.properties-preview .screen.portrait{width:min(100%,175px)}}
@media(max-width:760px){.layout{grid-template-columns:minmax(0,1fr)}.layout>.preview-column{position:static;max-width:600px}.playlist-toolbar{align-items:stretch;flex-direction:column;gap:14px}.playlist-select-label{flex:0 0 auto;max-width:none}.playlist-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.playlist-buttons button{width:100%;padding:10px 8px;white-space:normal;font-size:13px}.properties-modal{padding:12px}.properties-dialog{max-height:calc(100dvh - 24px)}.properties-body{grid-template-columns:minmax(0,1fr);gap:20px}.properties-preview{position:static}.properties-preview summary{padding:0;font-size:14px}.properties-preview details[open] summary{padding-bottom:14px}.properties-preview .previewframe{max-width:420px;margin:auto}.properties-preview .screen.portrait{width:120px}.properties-preview details>button{display:block;max-width:420px;margin:12px auto 0}.properties-preview{padding-bottom:18px;border-bottom:1px solid #35423f}.properties-body .clock-design-mini{height:58px}}
@media(max-width:650px){.shell>aside{grid-template-columns:minmax(0,1fr) 40px;gap:6px 14px;padding:8px 16px 10px}.shell>aside .brand-lockup{max-width:125px}.shell>aside nav{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.shell>aside nav button{text-align:center;padding:9px 6px;font-size:13px;min-height:40px}.shell>aside .account-menu-toggle{grid-column:2;grid-row:1}.shell>aside .account-actions{right:16px;top:calc(100% + 5px)}.shell>main{padding:24px 16px 32px}h1{font-size:27px;letter-spacing:-.8px}.eyebrow{font-size:10px;letter-spacing:1.5px}.shell>main>header{padding-bottom:22px;gap:18px}.shell>main>header .muted{font-size:14px}.topactions{display:flex;width:100%;gap:8px;justify-content:stretch;flex-wrap:nowrap}.topactions #playAll{flex:0 0 auto;padding:11px;font-size:13px}.topactions #publish{flex:1;min-width:0;padding:11px 10px;font-size:13px;line-height:1.35}.layout{display:grid;margin-top:22px;gap:24px}.layout>section{margin-bottom:0}.row{grid-template-columns:20px 58px minmax(0,1fr) 26px 26px;gap:8px;padding:11px 9px}.row .thumb,.row .playlist-media-open{width:58px}.row .thumb{height:52px}.row .info strong{font-size:13px;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.row .info .widget-title{font-size:12px;line-height:1.35;margin:4px 0}.row .info small{font-size:11px;margin-top:4px}.row .grip{min-width:20px;font-size:20px;padding:0}.row .dots{width:26px;min-height:44px;font-size:21px}.row .reorder button{width:26px;min-height:27px}.sectionhead h2{font-size:16px}.sectionhead .count{font-size:11px}.transition-slot{height:50px}.playlistfoot{font-size:12px}.add{min-height:50px}.previewbar{margin-bottom:14px}.library{gap:16px;margin-top:18px}.library .asset{padding:13px}.media-filters{gap:6px}.media-filters button{padding:9px 12px;font-size:13px}.settings{margin-top:24px}.settings .panel{padding:20px}.settings .field{align-items:flex-start;flex-direction:column;gap:9px}.settings .field input,.settings .field select{max-width:none;width:100%;font-size:16px}.settings .field:has(.toggle){flex-direction:row;align-items:center}.properties-modal{padding:8px}.properties-dialog,.properties-dialog[data-content-type]{width:100%;height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border-radius:15px}.properties-header{padding:16px;gap:12px}.properties-header h2{font-size:20px}.properties-header p{font-size:12px}.properties-header button{width:40px;height:40px;min-width:40px}.properties-body{padding:18px 16px;gap:20px}.properties-footer{padding:13px 16px;gap:12px}.properties-footer button{min-width:82px;padding:11px 14px}.properties-footer span{font-size:12px}.properties-footer p{font-size:10px;max-width:240px}#editor .field{grid-template-columns:minmax(0,1fr);gap:9px;margin:18px 0}#editor .field input,#editor .field select,#editor textarea{font-size:16px}#editor .field:has(.toggle){grid-template-columns:minmax(0,1fr) auto}#editor .field .toggle{grid-column:2;grid-row:1}.properties-body .clock-design-options{gap:7px}.properties-body .clock-design-options button{padding:8px 5px}.properties-body .clock-design-options strong{font-size:12px}.properties-body .rss-palette{gap:8px}.properties-body .rss-style-options{grid-template-columns:repeat(2,minmax(0,1fr))}.properties-body .rss-style-options button{padding:10px 6px;font-size:12px}.properties-body .quiz-preview-controls{flex-wrap:wrap}.modal{padding:12px}.modal .dialog{padding:22px 18px;max-height:calc(100dvh - 24px)}.modal .dialog h2{font-size:21px}.modal .dialog input,.modal .dialog select{font-size:16px}.dialog-actions{gap:8px}.dialog-actions button{min-width:0}.media-preview{padding:8px}.media-preview-dialog{height:calc(100dvh - 16px);border-radius:12px}.media-preview-header{gap:12px;padding:12px}.media-preview-header h2{font-size:14px}.media-preview-header button{min-height:42px;font-size:12px;max-width:130px}.closepreview{top:12px;right:12px;font-size:12px;padding:10px}.auth-page{padding:16px}.auth-page .card{padding:30px 24px}.auth-page .brand-lockup{max-width:250px}.auth-page h1{font-size:25px}.auth-page input{font-size:16px}}
@media(max-width:359px){.shell>main{padding-left:12px;padding-right:12px}.shell>aside{padding-left:12px;padding-right:12px}.row{grid-template-columns:18px 48px minmax(0,1fr) 24px 24px;gap:6px;padding:10px 7px}.row .thumb,.row .playlist-media-open{width:48px}.row .thumb{height:46px}.row .info strong{font-size:12px}.topactions #publish{font-size:12px}.playlist-buttons button{font-size:12px;padding:9px 4px}.properties-header h2{font-size:18px}.properties-footer p{max-width:170px}.cp-panel{padding:12px}.cp-rgb{gap:6px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.shell>aside nav button{min-width:0;font-size:14px;white-space:nowrap;padding-left:12px;padding-right:10px}.shell>aside nav i{width:24px}
@media(max-width:650px){.shell>aside nav button{font-size:13px;padding-left:6px;padding-right:6px}}
@media(max-width:359px){.shell>aside nav button{font-size:12px;padding-left:4px;padding-right:4px}.shell>aside nav i{display:none}}

/* Authentication must shrink with the viewport, including the first-run form. */
body.auth-page{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;min-width:0;min-height:100vh;min-height:100dvh;padding:24px max(16px,env(safe-area-inset-right)) 24px max(16px,env(safe-area-inset-left))}
.auth-page .card{flex:0 0 auto;box-sizing:border-box;width:100%;max-width:440px;min-width:0;margin:auto;padding:40px;overflow-wrap:anywhere}
.auth-page .brand-lockup{width:100%;max-width:280px;margin:0 auto 32px}.auth-page form,.auth-page label{min-width:0;max-width:100%}.auth-page input,.auth-page button{min-width:0;max-width:100%;min-height:46px;font-size:16px}.auth-page h1{font-size:25px;line-height:1.2}.auth-page p{font-size:15px;line-height:1.6}.auth-page .error{overflow-wrap:anywhere}.auth-page .footer{line-height:1.5}
@media(max-width:480px){body.auth-page{padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom))}.auth-page .card{padding:28px 22px;border-radius:16px}.auth-page .brand-lockup{max-width:230px;margin-bottom:28px}.auth-page h1{font-size:24px}.auth-page p{font-size:14px}.auth-page label{margin:19px 0}.auth-page .footer{margin-top:24px;font-size:11px}}
@media(max-width:359px){.auth-page .card{padding:24px 20px}.auth-page .brand-lockup{margin-bottom:24px}.auth-page h1{font-size:22px}}
@media(max-height:550px){body.auth-page{padding-top:16px;padding-bottom:16px}.auth-page .card{padding-top:24px;padding-bottom:24px}.auth-page .brand-lockup{max-width:220px;margin-bottom:20px}}
