/* Final mobile product layer. Page-specific styles stay authoritative on desktop. */
:root{--mobile-nav-height:68px;--mobile-safe-bottom:env(safe-area-inset-bottom,0px)}
html,body{max-width:100%;overflow-x:clip}
main,main>*{min-width:0}
img,svg,canvas,video{max-width:100%}
.mobile-product-nav,.shortcut-mobile-note{display:none}

@media(max-width:700px),(max-width:900px) and (max-height:500px){
  :root{--mobile-nav-height:64px}
  body{min-width:0;padding-bottom:calc(var(--mobile-nav-height) + var(--mobile-safe-bottom));font-size:15px;overflow-wrap:anywhere}
  body.keyboard-open{padding-bottom:12px}
  body.keyboard-open .mobile-product-nav{display:none}
  main{width:100%;max-width:100%;overflow:visible}
  h1{font-size:clamp(22px,7vw,26px)!important;line-height:1.16!important;letter-spacing:-.45px!important}
  h2{line-height:1.25}
  p,li,dd,dt,td,th,label,small,strong,span,a{min-width:0}
  a,code,.service-card-title,.service-url-menu,.private-record p{overflow-wrap:anywhere;word-break:break-word}
  input:not([type=checkbox]):not([type=radio]),select,textarea{max-width:100%;font-size:16px!important}
  button,.button,[role=button],summary{touch-action:manipulation}
  button:not(.button-small):not(.icon-button),.button:not(.button-small),input,select{min-height:44px}
  textarea{min-height:96px}

  .mobile-product-nav{position:fixed;z-index:1900;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));min-height:var(--mobile-nav-height);padding:4px max(4px,env(safe-area-inset-left)) calc(4px + var(--mobile-safe-bottom)) max(4px,env(safe-area-inset-right));border-top:1px solid var(--line);background:#fffc;box-shadow:0 -8px 28px #153c3014;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
  .mobile-product-nav>a,.mobile-product-nav>.mobile-more>summary{position:relative;display:flex;min-width:0;min-height:56px;align-items:center;justify-content:center;flex-direction:column;gap:3px;padding:4px 2px;border:0;border-radius:10px;background:transparent;color:#708078;list-style:none}
  .mobile-product-nav svg{width:22px;height:22px}.mobile-product-nav small{max-width:100%;overflow:hidden;font-size:10px;font-weight:720;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}
  .mobile-product-nav>a[aria-current=page],.mobile-product-nav>.mobile-more[data-current=true]>summary{color:var(--teal)}
  .mobile-product-nav>a[aria-current=page]::before,.mobile-product-nav>.mobile-more[data-current=true]>summary::before{content:"";position:absolute;top:-4px;width:28px;height:3px;border-radius:0 0 4px 4px;background:var(--teal)}
  .mobile-product-more{position:static}.mobile-product-more>summary::-webkit-details-marker{display:none}
  .mobile-product-more .mobile-more-backdrop{position:fixed;z-index:1901;inset:0;width:100%;height:100%;border:0;border-radius:0;background:#10271f73;backdrop-filter:blur(2px)}
  .mobile-product-more:not([open]) .mobile-more-backdrop,.mobile-product-more:not([open]) .mobile-more-menu{display:none}
  .mobile-product-more .mobile-more-menu{position:fixed;z-index:1902;left:0;right:0;bottom:0;width:100%;max-height:min(82dvh,720px);overflow:auto;overscroll-behavior:contain;padding:8px 14px calc(20px + var(--mobile-safe-bottom));border:0;border-radius:20px 20px 0 0;background:#fff;box-shadow:0 -20px 70px #10271f2e}
  .mobile-sheet-handle{display:block;width:42px;height:4px;margin:1px auto 12px;border-radius:99px;background:#d5dfda}
  .mobile-more-menu header{display:grid;gap:2px;padding:0 4px 12px}.mobile-more-menu header strong{font-size:20px}.mobile-more-menu header small{color:var(--muted);font-size:12px}
  .mobile-more-menu section{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}.mobile-more-menu section h2{grid-column:1/-1;margin:6px 4px 2px;color:#75877f;font-size:10px;letter-spacing:.08em;text-transform:uppercase}
  .mobile-more-menu section a{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:8px;min-height:50px;padding:7px 9px;border:1px solid #e3ebe7;border-radius:11px;background:#fafcfb;color:#29463b;font-size:12px;font-weight:700}.mobile-more-menu section a svg{width:18px;height:18px;padding:0;color:var(--teal)}.mobile-more-menu section a[aria-current=page]{border-color:#9dc8b6;background:var(--mint);color:var(--teal)}

  dialog,.modal,.navigation-dialog,.kgt-dialog,.gate-dialog{width:100%!important;max-width:none!important;max-height:min(92dvh,760px)!important;margin:auto 0 0!important;border-radius:18px 18px 0 0!important;overflow:auto!important;padding-bottom:var(--mobile-safe-bottom)!important}
  dialog::backdrop{background:#10271f73!important}
  .modal-actions,.form-actions,.dialog-actions{gap:8px}.modal-actions>.button,.form-actions>.button{min-height:46px}

  .workday-board{scroll-padding-inline:12px}.workday-column{flex-basis:calc(100vw - 40px)!important;max-width:380px!important}.workday-task strong{font-size:14px}.workday-task small{font-size:11px}
  .attendance-page,.reports-page,.services-page,.k-page,.map-page,.kgt-system,.gate-page,.postomat-page,.utilities-page,.account-page{max-width:100%}
  .attendance-actions,.run-actions,.heading-actions,.report-date-tools,.copy-tools{max-width:100%}

  .service-toolbar{position:static!important}.service-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}.service-tab[data-filter=archived]{grid-column:auto!important}.shortcut-card,.shortcut-row{max-width:100%}.shortcut-settings-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:start!important}.shortcut-reset{min-width:96px;white-space:nowrap;overflow-wrap:normal}.shortcut-mobile-note{display:block;margin:0 0 14px;padding:11px 12px;border-radius:10px;background:#edf6f1;color:#365b4c;font-size:12px;line-height:1.5}
  .shortcut-command{grid-template-columns:1fr!important}.shortcut-command>*{min-width:0}

  .postomat-page{width:100%!important;padding:16px 10px calc(20px + var(--mobile-nav-height))!important}.postomat-hero{width:100%;gap:12px}.postomat-hero>div,.postomat-hero p{max-width:100%}.postomat-card{padding:16px;border-radius:15px}.upload-card{grid-template-columns:minmax(0,1fr)!important}.file-drop{min-width:0}.counter-grid{grid-template-columns:1fr 1fr}.counter-grid div{min-width:0;padding:11px}.counter-grid span{font-size:21px}.table-scroll{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.results-card table{min-width:680px}

  .kgt-system{padding:14px 10px calc(24px + var(--mobile-nav-height))}.kgt-crumbs,.kgt-section-nav{max-width:100%;overflow-x:auto;scrollbar-width:none}.kgt-title-row{align-items:stretch;flex-direction:column;gap:12px}.kgt-section-nav a{flex:0 0 auto;min-height:44px}.kgt-input-actions,.kgt-directory-tools{display:grid;grid-template-columns:1fr 1fr}.kgt-input-actions>*:not(.kgt-button),.kgt-directory-tools input[type=search]{grid-column:1/-1;width:100%;min-width:0}.kgt-button{min-height:44px}.kgt-stats{display:flex;overflow-x:auto;scroll-snap-type:x proximity}.kgt-stat{flex:0 0 132px;scroll-snap-align:start}.kgt-table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.kgt-table{min-width:760px}.kgt-directory-layout{display:block}.kgt-courier-card{position:static;margin-top:10px}.kgt-form-grid{grid-template-columns:1fr}.kgt-dialog-actions{display:grid;grid-template-columns:1fr 1fr}.kgt-dialog-actions span{display:none}

  .gate-heading{max-width:100%}.gate-scope{width:100%;min-width:0!important}.gate-scope>strong{max-width:100%;white-space:normal}.gate-panel>header,.distribution-panel>header{max-width:100%}.distribution-actions{grid-template-columns:1fr 1fr!important}.distribution-actions .gate-button:first-child{grid-column:1/-1}.gate-row{grid-template-columns:34px 34px minmax(0,1fr) 32px!important}.free-pool{grid-template-columns:1fr!important}.gate-result header>div:last-child{display:grid;width:100%;grid-template-columns:1fr}.gate-result .gate-button{width:100%}

  .productivity-page,.productivity-shell{max-width:100%;overflow:visible}.productivity-nav{display:flex;max-width:100%;overflow-x:auto;scrollbar-width:none}.productivity-nav a{flex:0 0 auto}.productivity-grid,.kanban-board{grid-template-columns:1fr!important}.utility-card,.kanban-column{min-width:0}

  .core-overlay{right:8px!important;bottom:calc(var(--mobile-nav-height) + var(--mobile-safe-bottom) + 8px)!important;width:calc(100vw - 16px)!important}.core-overlay-panel{max-height:calc(100dvh - var(--mobile-nav-height) - var(--mobile-safe-bottom) - 24px)!important;overflow:auto!important}.core-overlay.collapsed{width:52px!important}.keyboard-open .core-overlay{bottom:8px!important}.core-page{min-height:calc(100dvh - var(--mobile-nav-height) - var(--mobile-safe-bottom))!important;padding-bottom:calc(var(--mobile-nav-height) + var(--mobile-safe-bottom))!important}
}

@media(max-width:360px){
  .mobile-more-menu section{grid-template-columns:1fr}.mobile-product-nav small{font-size:9px}.mobile-product-nav>a,.mobile-product-nav>.mobile-more>summary{padding-inline:1px}
  .service-tabs{grid-template-columns:1fr 1fr!important}.counter-grid{grid-template-columns:1fr}.distribution-actions{grid-template-columns:1fr!important}.distribution-actions .gate-button:first-child{grid-column:1}.kgt-input-actions,.kgt-directory-tools{grid-template-columns:1fr}.kgt-input-actions>*,.kgt-directory-tools>*{grid-column:1!important;width:100%}
}

@media(min-width:701px) and (max-width:900px) and (min-height:501px){
  .workday-board{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;padding-bottom:0!important}
  .workday-column{min-width:0!important;max-width:none!important}.workday-column:last-child{grid-column:1/-1}
}

@media(max-width:900px) and (max-height:500px){
  :root{--mobile-nav-height:54px}.mobile-product-nav>a,.mobile-product-nav>.mobile-more>summary{min-height:46px}.mobile-product-nav svg{width:19px;height:19px}.mobile-product-more .mobile-more-menu{max-height:92dvh}.core-overlay{bottom:calc(var(--mobile-nav-height) + 6px)!important}
}

@media(prefers-reduced-motion:reduce){.mobile-product-nav *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
