/* Adds touch layouts without changing the desktop 0.7 visual language. */
.kc-gate{min-height:100dvh;display:grid;place-items:center;padding:24px;background:radial-gradient(at 10% 20%,#ddf3ef,transparent 55%),var(--bg)}
.kc-login{width:min(440px,100%);padding:32px}.kc-wide{width:100%;margin-top:12px;min-height:44px}.kc-error{color:var(--red);font-size:12px;margin:12px 0;min-height:18px}
.kc-mobile-menu,#kc-menu-backdrop{display:none}.v7-local-state[data-state="error"]{color:#ff9c9c}.v7-local-state[data-state="pending"]{color:#f4d181}
.kc-message{padding:20px 0;border-bottom:1px solid var(--line)}.kc-message-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:14px 0;font-size:14px}.kc-message .btn{margin-top:14px}
.kc-conflict{padding:20px 0;border-bottom:1px solid var(--line)}.kc-conflict pre{font-size:11px;max-height:260px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;background:#f6f8fa;padding:12px;border-radius:6px}
@media(max-width:760px){
  html,body{width:100%;overflow-x:hidden;font-size:14px;-webkit-text-size-adjust:100%}.shell,.v7-shell{display:block!important;min-width:0!important}
  .sidebar{position:fixed!important;top:0;left:0;bottom:0;z-index:70!important;width:min(84vw,296px)!important;height:100dvh!important;transform:translateX(-105%);transition:transform .18s;box-shadow:16px 0 70px #10243040;padding:64px 14px max(20px,env(safe-area-inset-bottom))!important;visibility:hidden;pointer-events:none}
  .kc-menu-open .sidebar{transform:translateX(0);visibility:visible;pointer-events:auto}.kc-menu-open #kc-menu-backdrop{display:block;position:fixed;inset:0;background:#0b1c354d;z-index:65;border:0;width:100%;height:100%}
  .sidebar .brand,.sidebar .brand-note,.sidebar .navlabel,.sidebar .sidebar-foot,.sidebar .v7-brand-lockup>div{display:block!important}.sidebar .navbtn span{display:inline!important}.sidebar .v7-brand-lockup{justify-content:flex-start!important;gap:10px!important}.sidebar .navbtn{justify-content:flex-start!important;padding:11px 12px!important;font-size:13px!important;min-height:44px!important}.sidebar .brand{font-size:20px!important}.sidebar .brand-note{font-size:8px!important}.sidebar .sidebar-foot{font-size:11px!important}
  .kc-mobile-menu{display:grid;place-items:center;position:fixed;left:12px;top:max(10px,env(safe-area-inset-top));z-index:80;width:42px;height:42px;border:1px solid var(--line);border-radius:11px;background:white;color:var(--teal);box-shadow:0 3px 12px #19384d20;font-size:22px}
  .main{padding:66px 12px 24px!important;max-width:100%!important}.header{align-items:flex-start!important;flex-direction:column;gap:12px!important;margin-bottom:14px!important}.header h1{font-size:24px!important}.eyebrow{font-size:9px!important}.subtitle{line-height:1.6}
  .v7-header-actions{width:100%;justify-content:flex-start!important}.actions{gap:7px!important}.btn,button.btn{min-height:42px!important;font-size:12px!important;padding:9px 12px!important}input,select,textarea{font-size:16px!important;min-height:44px!important}
  input[type="checkbox"],input[type="radio"]{min-height:20px!important;min-width:20px!important;width:20px;height:20px}.panel{padding:14px!important;border-radius:12px!important}.panel-title{flex-wrap:wrap;gap:10px!important}
  .grid2,.map-layout,.v7-today-grid,.v6-calendar-layout,.v5-personnel-layout,.v5-contacts-layout,.v5-production-grid{grid-template-columns:minmax(0,1fr)!important;display:grid!important}.fieldgrid,.v4-passport-grid{grid-template-columns:1fr!important}.v4-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .metrics,.v7-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.v7-kpi{padding:12px!important}.metric strong{font-size:24px!important}.metric small{font-size:10px!important}
  .v5-minimize{min-height:28px!important;min-width:28px!important;width:28px!important}
  .v4-searchbar{padding:10px!important;gap:8px!important}.v4-searchbar form{min-width:0!important;width:100%!important}.v4-searchbar input{width:100%!important}.v4-search-results{max-height:60dvh!important;left:0!important;right:0!important;max-width:100%!important}
  .table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}table{min-width:540px}th{font-size:10px!important}td{font-size:12px!important}.v7-today-grid table{min-width:0}
  .overlay{padding:8px!important;align-items:flex-end!important}.modal,.v4-wide-modal{width:100%!important;max-width:100%!important;max-height:94dvh!important;padding:20px 16px max(20px,env(safe-area-inset-bottom))!important;border-radius:16px 16px 8px 8px!important}.modal-actions{position:sticky!important;bottom:-20px!important;background:white!important;padding:12px 0!important;flex-wrap:wrap!important;z-index:8}.modal h2{font-size:21px!important}
  .editor-active .main{padding:65px 8px 12px!important}.editor-shell{height:auto!important;min-height:0!important;grid-template-columns:minmax(0,1fr)!important;display:grid!important;gap:10px!important}.editor-library,.editor-inspector{max-height:none!important;overflow:visible!important}.editor-library{order:2}.editor-workspace{order:1;min-height:48dvh!important}.editor-inspector{order:3}.editor-stage{min-height:48dvh!important;height:54dvh!important;touch-action:none}.editor-topbar{flex-wrap:wrap;gap:6px!important}.editor-topbar input,.editor-topbar select{max-width:100%!important}.editor-tools{flex-wrap:wrap}.editor-library .library-items{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}
  .mapframe{height:48dvh;min-height:280px;overflow:auto}.map-svg{min-width:800px;min-height:480px}.map-toolbar,.toolbar-left{flex-wrap:wrap}.map-toolbar select{max-width:100%}
  .v7-calendar-navigation{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px!important}.v7-date-jump{width:100%!important}.v7-month-button{font-size:15px!important;padding:9px!important}.v6-month-grid{gap:3px!important}.v6-day{min-height:80px!important;padding:3px!important}.v6-day-number{min-height:28px!important;font-size:13px!important;padding:2px!important}.v6-calendar-chip{font-size:8px!important;padding:3px!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}.v6-calendar-chip b{display:none}.v7-day-note{font-size:8px!important;max-height:18px;overflow:hidden}.v7-day-icon svg{width:13px!important;height:13px!important}.v7-calendar-reminder{font-size:8px!important;max-width:100%;overflow:hidden}.v6-calendar-panel{padding:8px!important}.v7-color-options,.v7-icon-options{grid-template-columns:repeat(3,1fr)!important}.v7-rule-row{flex-wrap:wrap;gap:8px!important}.v7-rule-row input[type="number"]{width:68px!important}.v6-planner-filters{display:block!important}.v6-task-row{flex-wrap:wrap;gap:8px}
  .kc-conflict .grid2{grid-template-columns:1fr!important}.report{font-size:11px!important;padding:10px!important}.kc-login{padding:24px!important}.kc-gate{padding:16px}.kc-message .actions{flex-wrap:wrap}.v7-workspace-footer{font-size:9px;gap:10px;flex-wrap:wrap}.v4-dates{font-size:10px!important}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
