/* Korovka v156 mobile corrections. Desktop remains unchanged. */
@media(max-width:760px){
  /* Top row: logo | date | refresh. Reuse the original React date input, never a second independent route date. */
  .workspace.mono-route .topbar{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:6px!important;min-width:0!important}
  .workspace.mono-route .topbar>.mobile-brand{flex:1 1 auto!important;min-width:0!important}
  .workspace.mono-route .topbar>.top-actions{flex:0 0 auto!important;min-width:0!important}
  .workspace.mono-route .topbar>.k153-mobile-date{display:flex!important;flex:0 1 140px!important;width:auto!important;min-width:109px!important;max-width:155px!important;align-items:center!important;justify-content:center!important;gap:2px!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;border-radius:7px!important}
  .workspace.mono-route .k153-mobile-date .k156-date-icon{font-size:14px;line-height:1;flex:0 0 auto}
  .workspace.mono-route .k153-mobile-date input[type=date]{display:block!important;flex:1 1 auto!important;width:112px!important;max-width:128px!important;min-width:0!important;min-height:36px!important;height:36px!important;font-size:12px!important;font-weight:700!important;letter-spacing:-.04em!important;padding:3px 1px!important;margin:0!important;border:1px solid #bad0ee!important;border-radius:8px!important;background:white!important;color:#193d73!important;box-sizing:border-box!important}
  html.k153-date-ready .workspace.mono-route .mono-day-bar>.mono-date{display:none!important}
  /* The original React menu remains accessible via native close, visually only one close control. */
  .mobile-more-sheet.k153-sheet>[data-radix-dialog-close],
  .mobile-more-sheet.k153-sheet>button[aria-label='Close'],
  .mobile-more-sheet.k153-sheet>button[aria-label='Закрыть'],
  .mobile-more-sheet.k153-sheet>button.absolute{display:none!important}
  .mobile-more-sheet.k153-sheet .mobile-more-body.k153-menu > :not(.k153-menu-header):not(.k153-menu-profile):not([data-k153-menu='manage']):not([data-k150-link]):not([data-k153-menu='notifications']):not(.k153-notification-panel){display:none!important}
  .mobile-more-sheet.k153-sheet .mobile-more-body.k153-menu{gap:9px!important;padding-top:6px!important}
  .mobile-more-sheet.k153-sheet .k153-menu-header{padding:0 0 4px!important}
  /* Native inertial scrolling on the very first open, before any day switches. */
  .k150-screen{overscroll-behavior:contain!important;touch-action:pan-y!important}
  .k150-panel{min-height:0!important;overflow:hidden!important;touch-action:pan-y!important;contain:layout!important}
  .k150-route{height:0!important;min-height:120px!important;max-height:none!important;flex:1 1 0%!important;overflow-y:scroll!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;overscroll-behavior-y:contain!important;position:relative!important}
  .k150-row{touch-action:pan-y!important;user-select:none}
  .k150-handle{touch-action:none!important;-webkit-user-select:none!important;user-select:none!important;cursor:grab;min-width:42px!important;min-height:42px!important}
  .k150-handle:active{cursor:grabbing}
  .k150-days,.k150-tools,.k150-subheader,.k150-bottom{flex-shrink:0!important}
  /* When schedule is visible, the menu is the single active bottom section. */
  html.k150-open .mobile-bottom-nav button:not(:last-child){background:transparent!important;box-shadow:none!important;color:inherit!important}
  html.k150-open .mobile-bottom-nav button:last-child{background:#e9f1ff!important;color:#215b9d!important}
}
@media(max-width:370px){
 .workspace.mono-route .topbar{gap:3px!important}
 .workspace.mono-route .topbar>.k153-mobile-date{flex-basis:113px!important;min-width:100px!important}
 .workspace.mono-route .k153-mobile-date .k156-date-icon{display:none!important}
 .workspace.mono-route .k153-mobile-date input[type=date]{font-size:11px!important}
}

/* v157: Native iOS scroll is established before any tab/day switch. */
@media(max-width:760px){
 .k150-screen{height:calc(100dvh - 76px)!important;overflow:hidden!important;touch-action:auto!important;isolation:isolate!important}
 .k150-panel{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;overflow:hidden!important;touch-action:auto!important;contain:none!important}
 .k150-route{height:auto!important;min-height:0!important;flex:1 1 auto!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;overscroll-behavior-y:contain!important;contain:none!important;scroll-behavior:auto!important;}
 .k150-row{touch-action:pan-y!important}
 .k150-handle{touch-action:none!important;min-width:44px!important;min-height:44px!important}
 .workspace.mono-route .topbar>.k153-mobile-date{align-self:center!important;transform:translateY(3px)!important;min-width:119px!important;max-width:157px!important}
 .workspace.mono-route .k153-mobile-date input[type=date]{font-size:14px!important;min-height:42px!important;height:42px!important;width:125px!important;max-width:142px!important;padding:5px 2px!important;letter-spacing:-.035em!important}
}
@media(max-width:370px){.workspace.mono-route .k153-mobile-date input[type=date]{font-size:12px!important;width:105px!important;max-width:120px!important}}

/* v158: full-height editor: no bottom-navigation icons protrude while it is open. */
@media(max-width:760px){
 .k150-screen:not([hidden]){position:fixed!important;inset:0!important;top:0!important;bottom:0!important;left:0!important;right:0!important;width:100vw!important;height:100dvh!important;max-height:100dvh!important;z-index:2147483000!important;overflow:hidden!important}
 .k150-panel{width:100%!important;height:100dvh!important;max-height:100dvh!important;padding-bottom:max(12px,env(safe-area-inset-bottom,12px))!important;box-sizing:border-box!important}
 .k150-route{min-height:0!important;flex:1 1 auto!important;touch-action:pan-y!important}
 .k150-handle{touch-action:none!important;min-width:44px!important;min-height:44px!important}
 .k150-screen:not([hidden])~.mobile-bottom-nav.k138-nav-bar{visibility:hidden!important;pointer-events:none!important}
 /* Vertically center the rendered date TEXT, not just the input element. */
 .workspace.mono-route .topbar>.k153-mobile-date{align-self:center!important;transform:none!important;height:48px!important;min-height:48px!important}
 .workspace.mono-route .k153-mobile-date input[type=date]{height:46px!important;min-height:46px!important;padding:0 5px!important;line-height:46px!important;text-align:center!important;vertical-align:middle!important;appearance:none!important;-webkit-appearance:none!important}
 .workspace.mono-route .k153-mobile-date input[type=date]::-webkit-date-and-time-value{display:flex!important;align-items:center!important;justify-content:center!important;height:100%!important;line-height:normal!important;margin:0!important;text-align:center!important}
 .workspace.mono-route .k153-mobile-date input[type=date]::-webkit-datetime-edit{display:flex!important;align-items:center!important;justify-content:center!important;height:100%!important;line-height:normal!important;padding:0!important}
 .workspace.mono-route .k153-mobile-date input[type=date]::-webkit-datetime-edit-fields-wrapper{display:flex!important;align-items:center!important;height:100%!important;line-height:normal!important}
}
