:root{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}body{height:100dvh;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);overscroll-behavior:none}button{min-height:44px;-webkit-tap-highlight-color:transparent}#settings-panel{display:flex;flex-direction:column;gap:10px}.mobile-nav,#settings-close{display:none}.download-button{display:block;text-align:center;border-radius:10px;padding:15px;margin:18px 0;background:var(--accent);color:var(--on-accent);font-weight:600;text-decoration:none}.storage-status{padding:16px;background:var(--bg);border-radius:12px;margin:18px 0}.install-steps{padding-left:23px;line-height:1.8;color:var(--ink)}.form-actions{flex-wrap:wrap}#home,#editor{height:calc(100dvh - 94px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.header-actions{gap:5px}.header-actions button{padding:8px 10px}.busy-card{min-width:0;max-width:90vw}#busy{padding:20px}#busy-text{overflow-wrap:anywhere}#toast{bottom:calc(20px + env(safe-area-inset-bottom));max-width:92vw;width:max-content}#install{font-size:12px}.swatch{width:32px;min-height:32px}
@media(max-width:760px){
 header{height:76px;padding:0 12px;gap:10px}.brand{width:70px;flex-shrink:0}.logo{width:70px;height:30px}.logo img{width:82px;left:-6px;top:-26px}.brand-caption{font-size:6px;letter-spacing:2px}.heading{position:static;flex:1;min-width:0;text-align:center}.heading h1{font-size:17px}.heading>div{font-size:9px;letter-spacing:.4px;margin-top:4px;max-height:28px;overflow:hidden}.header-actions{gap:3px}.header-actions button{font-size:12px;padding:6px 8px;min-width:38px}#install{position:fixed;bottom:calc(16px + env(safe-area-inset-bottom));right:16px;z-index:3;box-shadow:0 4px 20px #0005}body.editing #install{display:none}
 #home{height:calc(100dvh - 76px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:26px 18px 90px}.home-intro h2{font-size:27px;line-height:1.18;margin:10px 0}.home-intro .actions{width:100%;flex-wrap:wrap}.home-intro .actions button{flex:1;font-size:13px}.library-heading{margin:28px 0 16px;gap:12px}.library-heading h3{font-size:17px;white-space:nowrap}#search{width:48%;font-size:16px}#track-list{grid-template-columns:1fr;gap:16px}.track-card .preview{height:160px}.empty{padding:30px 18px}.library-footer{font-size:12px}
 #editor{height:calc(100dvh - 76px - env(safe-area-inset-top) - env(safe-area-inset-bottom));flex-direction:column}.mobile-nav{display:flex;gap:8px;justify-content:space-between;padding:5px 10px;border-bottom:1px solid var(--line);min-height:50px}.mobile-nav button{font-size:12px;min-height:38px}.mobile-nav #settings-toggle{color:var(--accent)}aside{display:contents}#tools{display:flex;flex-direction:row;gap:5px;overflow-x:auto;flex-shrink:0;padding:6px 10px;border-bottom:1px solid var(--line);scrollbar-width:none}#tools button{white-space:nowrap;font-size:12px;min-height:42px;padding:8px 10px;flex-shrink:0}#tools button span{width:19px}#tools button small{display:none}
 #settings-panel{display:none;position:fixed;right:10px;top:calc(128px + env(safe-area-inset-top));bottom:calc(12px + env(safe-area-inset-bottom));width:min(340px,calc(100vw - 20px));background:var(--panel);padding:18px;z-index:15;border:1px solid var(--line);border-radius:16px;box-shadow:0 15px 60px #0009;overflow:auto}.settings-open #settings-panel{display:flex}#settings-close{display:block;position:sticky;top:0;background:var(--accent);color:var(--on-accent);z-index:1}#back-home{display:none}.workspace{min-height:0}.workspace-bar{min-height:0;gap:6px;padding:6px 10px;flex-direction:column;align-items:stretch}.workspace-bar>.actions{overflow-x:auto;flex-shrink:0;gap:5px;scrollbar-width:none}.workspace-bar button{font-size:11px;white-space:nowrap;padding:6px 9px;min-height:35px;flex-shrink:0}#floor-tabs{overflow:visible;max-width:none}.workspace-bar>.actions:last-child{justify-content:space-between}.editor-footer{padding:7px 10px;min-height:30px;font-size:10px;line-height:1.35}#hint{max-height:28px;overflow:hidden}#save-state{font-size:9px}.canvas-badge{bottom:9px;left:10px;padding:5px 8px;font-size:10px}
 dialog,dialog.wide{width:calc(100vw - 20px);max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));border-radius:14px}.modal-head{padding:15px 14px;gap:7px}.modal-head h2{font-size:19px}.modal-head .eyebrow{font-size:8px}.modal-head .actions button{font-size:12px;padding:7px 9px}#modal-body{padding:18px 15px}.form-grid{grid-template-columns:1fr;gap:13px}input,select,textarea{font-size:16px}.form-actions{justify-content:stretch;gap:6px}.form-actions button{flex:1;font-size:12px}.video-actions button{font-size:12px;flex:1}.video-actions select{width:100%}.clip-row{padding:7px}.clip-row button{font-size:12px}.time-fields{gap:9px}.time-fields input{width:100%}.tutorial-text{font-size:16px;line-height:1.7}.menu-list button{padding:14px}.color-custom input[type=text]{font-size:16px;width:110px}.swatch{width:34px;min-height:34px}.voice-actions button{font-size:12px}
}
@media(max-height:500px) and (max-width:950px){header{height:56px}.brand-caption{display:none}#editor{height:calc(100dvh - 56px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.workspace-bar{flex-direction:row;flex-wrap:nowrap;min-height:44px}.editor-footer{display:none}.mobile-nav{min-height:40px;padding:2px 10px}#tools{padding:2px 10px}#tools button{min-height:34px}.heading>div{margin:1px}.canvas-badge{padding:3px 6px}.settings-open #settings-panel{top:60px}}
