/* Studio-Leitzentrale V23.17 – Zusatzregeln für Touch und Tablet.
   Rein visuell; Backup-, Login-, Push- und API-Logik bleibt unverändert. */
@media (pointer:coarse){
 .button,.tab,.sidebar-link,.studio-mobile-bottom-nav button,
 .calendar-section-tab,.customer-tab,.finance-workspace-tab,.push-workspace-tab,
 .gallery-section-tab,.security-r2-row button,.studio-day{touch-action:manipulation}
 .button,.security-actions .button,.gallery-controls .button,
 .page-actions .button,.category-row-actions .button{min-height:44px}
 .tab{min-height:48px}
 input[type=checkbox],input[type=radio]{min-width:20px;min-height:20px;accent-color:#94667a}
}
@media (min-width:861px) and (max-width:1100px){
 .main-column{padding-left:18px;padding-right:18px}
 .panel{padding:20px}
 .studio-calendar{gap:5px}
 .studio-day{min-height:96px;padding:7px}
 .studio-toolbar,.studio-actions,.security-r2-actions{flex-wrap:wrap}
 .analytics-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
}
@media (max-width:860px){
 html{scroll-padding-top:93px}
 body,#dashboard,.main-column{min-width:0;max-width:100%}
 .main-column{overflow-wrap:anywhere}
 .panel,.dashboard-section,.cockpit-box{min-width:0;max-width:100%}
 .panel h3{font-size:clamp(19px,4.8vw,23px)}
 .panel .section-heading{min-width:0}
 .section-heading>.button,.section-heading>div{max-width:100%}
 .field-grid,.finance-form,.page-form-fields,.studio-form,.service-field-grid{min-width:0}
 .field-grid>*,.service-field-grid>*,.studio-form>*,.page-form-fields>*{min-width:0}
 input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea{max-width:100%;font-size:16px}
 textarea{resize:vertical}
 .studio-toolbar,.studio-actions,.studio-record-actions,
 .security-r2-actions,.security-actions{flex-wrap:wrap;align-items:stretch}
 .studio-toolbar label{min-width:0;max-width:100%}
 .studio-toolbar input{width:100%;max-width:100%}
 .studio-actions .button,.studio-record-actions .button{flex:1 1 135px}
 .security-r2-row{min-width:0;overflow-wrap:anywhere}
 .security-r2-row .button{min-height:44px}
 .analytics-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
 .analytics-report-table{min-width:540px}
 .gallery-editor,.gallery-entry,.page-card-head,.page-editor{min-width:0}
 .upload-card{padding:16px;gap:12px}
 .upload-card .file-button{min-height:47px;display:inline-flex;align-items:center;justify-content:center}
 .admin-command-dialog{max-width:calc(100vw - 20px);max-height:calc(100dvh - 32px)}
 dialog[open]{overscroll-behavior:contain}
 body:has(dialog[open]) .studio-mobile-bottom-nav{visibility:hidden;pointer-events:none}
 #global-status.notice{max-height:35dvh;overflow-y:auto}
}
@media (max-width:600px){
 .studio-calendar:not(.calendar-list-view){gap:3px}
 .studio-calendar:not(.calendar-list-view) .studio-day{min-height:64px;padding:5px 3px;border-radius:9px;gap:3px}
 .studio-calendar:not(.calendar-list-view) .studio-day-num{font-size:12px;font-weight:800}
 .studio-calendar:not(.calendar-list-view) .studio-day small{font-size:9px;line-height:1.2;overflow-wrap:anywhere}
 .studio-calendar.calendar-list-view .studio-day{min-height:74px;padding:10px}
 .studio-day:focus-visible{outline:3px solid #a5687d;outline-offset:1px}
 .studio-customer-filters label,.studio-customer-filters input,.studio-customer-filters select{width:100%;max-width:100%}
 .finance-workspace-tabs,.push-workspace-tabs,.calendar-section-nav{min-width:0;max-width:100%}
 .finance-workspace-tab,.push-workspace-tab,.calendar-section-tab{overflow-wrap:anywhere;hyphens:auto}
 .booking-detail,.customer-detail,.security-r2{overflow-wrap:anywhere}
 .gallery-editor,.gallery-search-toolbar,.invoice-search-tools{grid-template-columns:1fr}
 /* Ja links, Nein rechts auch bei 320 px: keine Flex-Umbrüche. */
 .inventory-confirm-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;direction:ltr}
 .inventory-confirm-actions .button{width:100%;min-width:0}
}
@media (max-width:380px){
 .dashboard-stat{padding:11px 9px}
 .dashboard-stat strong{font-size:clamp(19px,6vw,25px)}
 .studio-mobile-bottom-nav button .app-nav-label{font-size:9px}
 .topbar h1{font-size:18px}
 .studio-calendar:not(.calendar-list-view) .studio-day small{font-size:8px}
}
@media (max-height:440px) and (max-width:860px){
 .studio-mobile-bottom-nav{padding:3px 3px;bottom:3px}
 .studio-mobile-bottom-nav button{min-height:46px}
 #dashboard{padding-bottom:80px}
}
@media print{.studio-mobile-bottom-nav{display:none!important}}
