/* Mobile-only atelier layout, shared by story, pages and delivery. */
.mobile-dock-toggle,.mobile-story-picker,.story-mobile-preview{display:none}
@media(max-width:740px){
 body.compact-editing{overscroll-behavior:none}
 .compact-atelier{height:var(--atelier-mobile-height,100dvh);padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
 .compact-atelier .compact-header{min-height:52px}
 .compact-atelier .compact-header>.btn,.compact-atelier .compact-journey button{min-height:44px}
 .compact-atelier .compact-header h1{font-size:15px}
 .compact-atelier .compact-journey{gap:2px;padding:2px 6px}
 .compact-atelier .compact-journey button{padding:6px;font-size:12px}
 .compact-atelier input:not([type=range]):not([type=checkbox]):not([type=radio]),.compact-atelier textarea,.compact-atelier select{font-size:16px!important}
 .compact-atelier input[type=range]{min-height:34px!important}
 .compact-atelier .compact-footer{min-height:38px;padding:5px 10px;font-size:11px}
 .compact-footer button{min-height:34px;font-size:11px;max-width:110px}
 .compact-atelier .compact-toolbar .btn{min-height:40px;font-size:11px}
 .compact-atelier .compact-toolbar{padding:4px 6px}
 .compact-atelier .compact-toolbar>div{gap:3px}
 .compact-atelier .compact-toolbar .compact-history{display:none}
}
@media(max-width:560px){
 .compact-atelier .board-studio{grid-template-columns:50px minmax(0,1fr)}
 .compact-atelier .board-center{padding:5px;gap:3px}
 .compact-atelier .portrait-desk{padding:3px}
 .compact-atelier .portrait-meta{font-size:10px}
 .compact-atelier .board-controls,.compact-atelier .delivery-controls{height:clamp(220px,35dvh,310px);padding:4px 10px 7px;grid-template-rows:auto auto minmax(0,1fr);gap:4px;min-height:0}
 .mobile-dock-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;border-bottom:1px solid var(--line);background:var(--white);font:600 12px var(--tramea-font);min-height:36px;padding:4px 3px}
 .mobile-dock-toggle span{font-size:20px}
 .compact-atelier .studio-tabs button,.compact-atelier .delivery-tabs button{min-height:44px;padding:6px 4px;font-size:12px;line-height:1.2}
 .compact-atelier .board-controls textarea{height:60px;min-height:60px;resize:none}
 .compact-atelier .studio-pane{padding-bottom:16px;scroll-padding-block:8px}
 .compact-atelier .studio-pane .field{font-size:13px;margin-bottom:10px}
 .compact-atelier .studio-pane .btn,.compact-atelier .delivery-content .btn{min-height:44px;font-size:13px}
 .compact-atelier .delivery-content .board-actions{gap:8px}
 .delivery-check{min-height:44px;margin:6px 0;font-size:13px}
 .compact-atelier.mobile-tools-collapsed .board-controls,.compact-atelier.mobile-tools-collapsed .delivery-controls{height:92px;grid-template-rows:auto auto;gap:2px}
 .mobile-tools-collapsed .studio-pane,.mobile-tools-collapsed .delivery-content{display:none}
 .compact-atelier .compact-pages button{min-height:44px}
 .compact-atelier .compact-pages{gap:6px}
 .mobile-story-picker{display:flex;align-items:center;gap:10px;padding:5px 10px;font-size:12px;background:var(--white);border-bottom:1px solid var(--line)}
 .mobile-story-picker select{flex:1;min-width:0;min-height:44px;padding-block:6px}
 .compact-atelier .compact-story-grid{grid-template-rows:auto minmax(90px,23%) minmax(0,1fr)}
 .compact-story-grid .story-sections{display:none}
 .story-mobile-preview{display:flex;align-items:center;justify-content:center;gap:16px;padding:4px 10px;background:var(--tramea-soft);min-height:0;overflow:hidden}
 .story-mobile-preview .portrait-desk{height:100%;width:100px;padding:2px;flex:0 1 100px}
 .story-mobile-preview .btn{font-size:12px;min-height:44px;max-width:150px}
 .story-writing{padding:10px;gap:6px}
 .story-writing h2{font-size:17px;margin:0}
 .story-writing header p{display:none}
 .story-fields{padding:0 4px 12px 0;overscroll-behavior:contain;scroll-padding-block:10px}
 .story-fields .field{margin-bottom:10px;font-size:13px}
 .story-fields #draft{min-height:100px;resize:none}
 .compact-atelier.is-focused .compact-story-grid{grid-template-rows:auto minmax(0,1fr)}
 .compact-atelier.is-focused .story-mobile-preview{display:none}
 body.mobile-keyboard .compact-journey,body.mobile-keyboard .compact-toolbar{display:none}
 body.mobile-keyboard .compact-header{padding-block:3px;min-height:44px}
 body.mobile-keyboard .compact-header [data-workflow=preview]{display:none}
 body.mobile-keyboard .compact-atelier .board-controls{height:clamp(150px,49dvh,240px)}
 body.mobile-keyboard .compact-inspector-heading{display:none}
 body.mobile-keyboard .compact-footer{min-height:28px;padding-block:1px}
 body.mobile-keyboard .compact-footer button{min-height:28px}
 body.mobile-keyboard .compact-story-grid{grid-template-rows:auto minmax(65px,20%) minmax(0,1fr)}
 .compact-atelier .compact-toolbar [data-studio-tab=sheet]{display:none}
 .compact-atelier .compact-toolbar{flex-wrap:nowrap}
 .compact-atelier .compact-toolbar>div{flex-wrap:nowrap}
 .compact-atelier .studio-tabs [data-studio-tab=sheet]{font-size:0}
 .compact-atelier .studio-tabs [data-studio-tab=sheet]::after{content:'Planche';font-size:12px}
}
@media(max-width:380px){
 .compact-atelier .compact-toolbar [data-compact=focus]{max-width:100px;font-size:11px}
 .compact-atelier .compact-toolbar .btn{padding:5px;min-height:42px}
 .compact-header>.back-link{padding:6px;font-size:11px}
 .compact-header h1{font-size:13px}
}
@media(max-height:620px) and (max-width:560px){
 .compact-atelier .board-controls,.compact-atelier .delivery-controls{height:190px}
 .compact-atelier .compact-header{min-height:44px;padding-block:4px}
 .compact-atelier .compact-journey button{min-height:40px}
 .compact-atelier .compact-footer{min-height:30px}
 .compact-atelier .compact-toolbar{padding-block:2px}
}
