/* Only phones. Tablet/desktop rules and saved layout preferences stay untouched. */
@media (max-width:600px){
 .studio-mobile-panes{display:flex;position:sticky;top:0;z-index:25;gap:4px;padding:5px 8px;background:#f7f8fa;border-block:1px solid #dce1e8}
 .studio-mobile-panes button{flex:1;min-width:0;min-height:44px;border:0;border-radius:8px;background:transparent;color:#344657;font:600 12px Montserrat,sans-serif}
 .studio-mobile-panes button[aria-pressed=true]{background:#263d49;color:#fff}
 .studio-mobile-menu{position:relative;flex:none}
 .studio-mobile-menu>summary,.studio-mobile-fold>summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:center;gap:6px;border:1px solid #dce1e8;border-radius:8px;padding:8px 12px;background:#fff;color:#263d49;font:600 12px Montserrat,sans-serif}
 .studio-mobile-menu>summary::-webkit-details-marker,.studio-mobile-fold>summary::-webkit-details-marker{display:none}
 .studio-mobile-menu>summary:after,.studio-mobile-fold>summary:after{content:'⌄';margin-left:6px}
 .studio-mobile-menu[open]>summary:after,.studio-mobile-fold[open]>summary:after{content:'⌃'}
 .studio-mobile-menu-items{position:absolute;right:0;top:calc(100% + 5px);z-index:60;width:min(270px,calc(100vw - 32px));padding:6px;display:grid;gap:4px;max-height:60dvh;overflow:auto;background:#fff;color:#263d49;border:1px solid #dce1e8;border-radius:12px;box-shadow:0 12px 35px #19233733}
 .studio-mobile-menu-items :is(button,a){width:100%;min-height:44px!important;justify-content:flex-start!important;text-align:left;font-size:13px!important;padding:10px 12px!important}
 .studio-mobile-fold{margin:8px 0 12px}
 .studio-mobile-fold>summary{justify-content:space-between;background:#f5f6f8}
 .studio-mobile-fold:has(>[hidden]){display:none}
 .studio-mobile-panes button:focus-visible,.studio-mobile-menu summary:focus-visible,.studio-mobile-fold summary:focus-visible{outline:3px solid #28778e;outline-offset:2px}
 /* Shared navigation: identity and a small set of actions, each still tappable. */
 :is(.pub-page,.gallery-page) .suite-header{min-height:56px;padding:6px 10px;gap:6px;flex-wrap:nowrap}
 :is(.pub-page,.gallery-page) .suite-header-logo{width:38px;flex-basis:38px;height:30px}
 :is(.pub-page,.gallery-page) .suite-header-brand{min-width:0;flex:1;gap:6px}
 :is(.pub-page,.gallery-page) .suite-header-brand-copy{min-width:0}
 :is(.pub-page,.gallery-page) .suite-header-brand-copy strong{font-size:11px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 :is(.pub-page,.gallery-page) .suite-header-module,:is(.pub-page,.gallery-page) .suite-header-brand-copy small{display:none}
 :is(.pub-page,.gallery-page) .suite-header-actions{gap:3px;flex:none}
 :is(.pub-page,.gallery-page) .suite-header-actions :is(button,summary,a){min-height:44px;padding:9px;font-size:11px}
 /* Calendar: a compact persistent header, planning on demand, content first. */
 .pub-shell{width:calc(100% - 20px);padding-top:16px}
 .pub-intro{gap:10px;margin-bottom:12px}.pub-intro h1{font-size:23px}.pub-intro p{font-size:12px;margin-top:6px}
 .pub-intro-actions{gap:8px}.pub-intro-actions>a{font-size:11px}.pub-intro-actions button{font-size:12px;min-height:44px;padding:9px 12px}
 .pub-calendar-tools{gap:8px;padding:8px}.pub-view-switch button{min-height:44px}
 .pub-month-nav button{min-width:44px;min-height:44px}.pub-month-nav{gap:4px}.pub-month-nav strong{min-width:110px;flex:1;font-size:14px}
 .pub-day{min-height:64px}.pub-day-number{width:36px;height:36px;margin-bottom:2px}.pub-mobile-count{min-height:28px;width:100%;font-size:10px}
 .pub-calendar-help{margin:8px 0;font-size:10px}
 #calDayDialog{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;border:0;border-radius:0;margin:0}
 #calDayDialog .pub-day-dialog-panel{height:100%;max-height:100dvh;padding:10px;overscroll-behavior:contain}
 #calDayDialog .pub-day-dialog-head{top:-10px;margin:-10px -10px 10px;padding:10px;gap:8px;z-index:30}
 #calDayDialog .pub-day-dialog-head>div:first-child{padding-right:46px;min-width:0;width:100%}
 #calDayDialog .pub-kicker{font-size:9px;letter-spacing:.1em}
 #calDayDialogTitle{font-size:20px;line-height:1.2;margin:4px 0;max-height:2.4em;overflow:auto}
 #calDayDialogCount{font-size:11px;line-height:1.4}
 #calDayDialog .pub-day-dialog-actions{display:flex;flex-wrap:nowrap;gap:8px;width:100%;justify-content:space-between}
 #calDayDialog .pub-day-dialog-actions>button{flex:0 1 auto;min-height:44px;font-size:12px;padding:8px 12px}
 #calDayDialog #calDayClose{position:absolute;top:8px;right:8px;width:44px;height:44px;min-width:44px;margin:0;font-size:26px;flex:none}
 #calPostBack{font-size:0!important}#calPostBack:after{content:'← Zurück';font-size:12px}
 #calDayDialog .pub-day-dialog-actions .studio-mobile-menu{margin-left:auto}
 #calDayDialog .pub-day-tabs,.pub-page .pub-tabs{flex-wrap:nowrap;overflow-x:auto;gap:5px;scrollbar-width:thin;max-width:100%;margin-bottom:8px}
 .pub-page .pub-tab{flex:none;white-space:nowrap;min-height:40px;padding:8px 10px}
 #calDayStatus:empty{display:none}
 #mobilePostPlan{margin:6px 0 10px}#mobilePostPlan .pub-post-plan{margin:6px 0 0;padding:12px;gap:12px}
 #calDayGrid{gap:14px}.pub-content{padding:12px;gap:10px}.pub-title{font-size:16px}
 .pub-preview:has(>img,>video){height:auto;min-height:180px;padding:8px 6px 42px}
 .pub-preview :is(img,video){height:auto;max-height:56dvh}
 .pub-preview .pub-type{top:8px;left:8px;padding:4px 6px;font-size:9px}
 .pub-preview-hint{height:40px;font-size:11px}.pub-actions{gap:6px}.pub-actions .pub-action{min-height:44px;font-size:12px;padding:9px 10px}
 .pub-page .pub-toolbar{gap:8px;align-items:stretch}.pub-pool-content{padding:12px}
 /* Gallery: small controls, two columns even on a narrow phone. */
 .gallery-shell{width:calc(100% - 20px)}.gallery-control-panel{padding:14px 0 6px}
 .gallery-header{gap:10px;padding-bottom:12px}.gallery-header h1{font-size:24px}.gallery-header p{font-size:12px;line-height:1.4}
 .gallery-header .gallery-button{min-height:44px;padding:8px 10px;font-size:11px}
 .gallery-filter-row,.gallery-search-row{gap:7px}.gallery-page .gallery-tabs{gap:5px;flex-wrap:nowrap;overflow-x:auto}
 .gallery-tab{font-size:11px;padding:8px;min-height:44px;white-space:nowrap}
 .gallery-page .gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .gallery-card-content{padding:8px}.gallery-card-title{font-size:11px}.gallery-card-meta{font-size:10px}
 .gallery-viewer-actions .gallery-button{min-height:44px}.gallery-viewer-footer{padding:12px}
 .gallery-header{flex-direction:row;margin:0;padding-bottom:10px}.gallery-header h1{font-size:23px}.gallery-header p,.gallery-search-hint{display:none}
 .gallery-find-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}.gallery-search{grid-column:auto}.gallery-browse-row{gap:6px;margin:8px 0}
 .gallery-list-tools{margin:6px 0;padding:0}.gallery-list-tools .gallery-status{font-size:10px}
 .gallery-toolbar .studio-mobile-menu-items .gallery-select-field{display:block;width:100%}.gallery-toolbar .studio-mobile-menu-items select{width:100%;min-height:44px;font-size:16px}
 .gallery-toolbar .studio-mobile-menu-items .gallery-chip{margin:0}
 /* Home: the tools take priority over decorative card space. */
 #hub .home-topbar{padding:8px 10px;gap:8px}#hub .home-main{padding:18px 12px 24px}
 #hub .home-intro{margin-bottom:16px}#hub .home-intro h1{font-size:25px}#hub .home-primary-grid{gap:10px}
 #hub .home-primary-grid .home-tile-link{min-height:158px;padding:16px}
 #hub .home-primary-grid .home-tile-title{font-size:19px}#hub .home-primary-grid .home-tile-description{font-size:12px;max-width:65%}
 #hub .home-primary-grid .home-tile-cta{margin-top:12px;padding:8px 10px;min-height:40px}
 #hub .home-primary-grid .home-art{max-height:110px;max-width:32%}
 /* Post editor: choose photos, preview or design, keeping the same project. */
 #app.studio-editor{min-height:100dvh}
 #app.studio-editor .topbar{position:relative;gap:6px;padding:8px 10px}
 #app.studio-editor .topbar-logo{width:42px;height:28px}#app.studio-editor .topbar-title strong{font-size:14px}
 #app.studio-editor .topbar-hint{display:none}#app.studio-editor .topbar-aktionen{gap:5px;flex-wrap:nowrap}
 #app.studio-editor .topbar-aktionen :is(button,summary){min-height:44px;padding:8px 10px}
 #app.studio-editor .editor-history button{width:44px}#app.studio-editor .editor-more{margin-left:auto}
 #app.studio-editor .editor-more-actions{z-index:60}
 #app.studio-editor .layout,#app.studio-editor .editor{display:block;height:auto;min-height:0}
 #app.studio-editor .library{max-height:none;height:auto;margin:0;padding:10px}
 #app.studio-editor .grid{max-height:none;overflow:visible;grid-template-columns:repeat(2,minmax(0,1fr))}
 #app.studio-editor :is(.panel-resizer,#controlsResizer){display:none}
 #app[data-mobile-pane=photos] #editorPanel,#app[data-mobile-pane=preview] #libraryPanel,#app[data-mobile-pane=design] #libraryPanel,#app[data-mobile-pane=preview] .controls{display:none}
 #app.studio-editor .canvas-wrap{height:clamp(240px,49dvh,500px);min-height:0;padding:8px 8px 40px}
 #app.studio-editor #cv{max-width:100%;max-height:100%;width:auto;height:auto}
 #app.studio-editor .editor-toolbar{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding:5px;gap:5px}
 #app.studio-editor .editor-tool-group{flex-shrink:0}#app.studio-editor .editor-tool{min-width:40px;min-height:44px}
 #app.studio-editor .slot-tabs{padding:4px 8px}.slot-tabs button{min-height:40px}
 #app[data-mobile-pane=design] .canvas-wrap{height:clamp(150px,24dvh,220px)}
 #app[data-mobile-pane=design] :is(.editor-toolbar,.slot-zeile){display:none}
 #app[data-mobile-pane=design] .stage{position:sticky;top:55px;z-index:10;background:#f7f8fa}
 #app.studio-editor .studio-mobile-use{position:sticky;top:55px;z-index:12;margin:8px;min-height:44px;background:#263d49;color:white}
 #app.studio-editor .controls{padding:12px}#app.studio-editor .sec-head{min-height:44px}
 #app.studio-editor .controls>.sec>.sec-body{max-height:none}
 /* Reel editor: existing workspace switching, less chrome, cut controls on demand. */
 .rs-page .rs-topbar{position:relative;min-height:0;padding:8px;gap:5px}
 .rs-page .rs-brand strong{font-size:13px}.rs-page .rs-tenant-name{font-size:10px;max-width:130px}
 .rs-page .rs-project-heading{min-width:0;max-width:46%;margin-left:auto}.rs-page .rs-project-heading h1{max-width:100%;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .rs-page .rs-header-actions{gap:4px;width:100%;justify-content:flex-start}
 .rs-page .rs-header-actions :is(.rs-btn,.rs-icon-btn){min-height:44px;font-size:11px;padding:7px 9px}
 .rs-page .rs-header-actions .rs-icon-btn{min-width:38px;width:38px}.rs-page .rs-header-actions .studio-mobile-menu{margin-left:auto}
 .rs-page .studio-mobile-menu-items .rs-home-link{display:flex}
 .rs-page .studio-mobile-menu-items .rs-icon-btn{width:100%;gap:8px}
 .rs-page .rs-workflow{position:sticky;top:0;z-index:25;padding:4px;gap:2px}
 .rs-page .rs-workflow button{min-height:44px;font-size:11px;flex:1;padding:6px 4px}
 .rs-page #rsFinishStep{display:none} /* Export remains permanently in the header. */
 .rs-page .rs-canvas-wrapper{height:clamp(240px,46dvh,460px);min-height:0}
 .rs-page .rs-preview-heading{padding:5px 8px;min-height:44px}
 .rs-page .rs-transport{padding:5px;gap:4px;flex-wrap:wrap}.rs-page .rs-transport-buttons{gap:3px}
 .rs-page .rs-transport button{min-height:40px}.rs-page .rs-transport-time{width:auto;padding-left:4px;margin-left:auto}
 .rs-page .rs-panel-left,.rs-page .rs-panel-right{max-height:none;overflow:visible}
 .rs-page .rs-tab-inhalt,.rs-page .rs-inspector-body{max-height:none}
 .rs-page .rs-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.rs-page .rs-tab{min-height:44px;padding:8px;font-size:12px}
 .rs-page .rs-bottom-area,.rs-page .rs-bottom-area:has(#rsTimelineView:not([hidden])){height:152px;min-height:152px}
 .rs-page .rs-cards-container{height:92px}.rs-page .rs-card{height:86px;min-width:160px;width:160px}
 .rs-page #rsSceneResize{display:none}.rs-page .rs-storyboard-header{height:48px;padding-right:168px}.rs-page .rs-view-switch button{min-height:40px;font-size:11px;padding:6px}
 .rs-page .rs-trim-panel{padding:10px}.rs-page .rs-trim-panel input{font-size:16px}
 .rs-page #mobileTrim{margin:6px 0 8px}.rs-page #mobileTrim>summary{min-height:44px}
 /* Photo editor: keep the photograph in front; library and editing are separate. */
 .photo-editor-page .photo-editor-header{padding:8px 10px;gap:6px}.photo-editor-page .photo-header-file{display:none}
 .photo-editor-page .photo-header-actions{gap:6px}.photo-editor-page .photo-header-actions :is(button,select){min-height:44px}
 .photo-editor-shell[data-mobile-pane=photos] :is(.photo-editor-center,.photo-editor-right),.photo-editor-shell[data-mobile-pane=preview] :is(.photo-assets-panel,.photo-editor-right,.photo-manual-card),.photo-editor-shell[data-mobile-pane=design] .photo-assets-panel{display:none}
 .photo-editor-page .photo-editor-center{padding:8px}.photo-editor-page .photo-compare-stage{min-height:240px;height:49dvh;max-height:520px}
 .photo-editor-shell[data-mobile-pane=design] .photo-compare-stage{min-height:180px;height:28dvh}
 .photo-editor-page .photo-asset-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}.photo-editor-page .photo-asset{min-width:0}
 .photo-editor-page .photo-manual-card{padding:12px}.photo-editor-page .photo-manual-intro{font-size:12px}
 .photo-editor-page .photo-editor-tabs button{min-height:44px;font-size:10px}
 /* Higher specificity also covers the existing large/many-favorites variants. */
 #hub#hub .home-section-head{gap:6px;margin-bottom:10px;align-items:center}
 #hub#hub .home-view-actions{gap:6px;flex-wrap:nowrap}
 #hub#hub .home-section-head h2{font-size:17px}
 #hub#hub .home-density{display:none}
 #hub#hub .home-view-actions button{font-size:11px;min-height:44px}
 #hub#hub .home-primary-grid .home-tile-link{min-height:165px;padding:16px;align-items:center}
 #hub#hub .home-primary-grid .home-tile-copy{width:70%}
 #hub#hub .home-primary-grid .home-tile-title{min-height:0;font-size:18px}
 #hub#hub .home-primary-grid .home-tile-description{width:100%;max-width:100%;font-size:12px;margin:6px 0}
 #hub#hub .home-primary-grid .home-tile-cta{margin-top:6px;min-height:36px;padding:6px 9px;font-size:11px}
 #hub#hub .home-primary-grid .home-art{height:100px;width:28%;max-width:28%;right:0;bottom:20px;top:auto}
 #hub#hub .home-start{position:static;margin-bottom:6px}
 .photo-editor-page .suite-header{display:flex;min-height:56px;padding:6px 10px;gap:8px}
 .photo-editor-page .suite-header-brand{flex:1;min-width:0}
 .photo-editor-page .suite-header-brand-copy strong{font-size:11px}
 .photo-editor-page .suite-header-module,.photo-editor-page .suite-header-brand-copy small{display:none}
 .photo-editor-page .suite-header-actions{flex:none}
 .photo-editor-page .suite-header-actions .studio-mobile-menu-items :is(a,button){color:#263d49;background:white;border-color:#dce1e8}
 .photo-editor-page .photo-stage-footer{display:block;padding-top:6px}
 .photo-editor-page .photo-stage-tools{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;min-width:0}
 .photo-editor-page .photo-stage-tool{min-height:44px;font-size:11px;padding:6px 9px}
 .photo-editor-page .photo-stage-zoom{flex:1 1 220px;min-width:0;min-height:44px;grid-template-columns:auto minmax(60px,1fr) auto 54px;font-size:11px}
}
