@media(max-width:800px){
  html{overflow-x:hidden}body{min-width:0!important;overflow-x:hidden!important}button,a,input,select,textarea{touch-action:manipulation}button,input,select{min-height:44px}h1,h2,h3{text-wrap:balance}p{text-wrap:pretty}
  .top,.appbar,.legacy-appbar{position:sticky;top:0;z-index:40;width:100%;height:auto!important;min-width:0!important;flex-wrap:wrap;gap:8px;padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left))!important}
  .logo,.brand{width:40px!important;height:40px!important;flex:0 0 40px}.app-title{min-width:0;flex:1}.app-title strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-date{order:3;width:100%;padding:0!important;border:0!important}.view-switch{margin-left:auto}
  .top nav,.appbar nav{order:5;width:100%;margin:0!important;padding-bottom:2px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.top nav::-webkit-scrollbar,.appbar nav::-webkit-scrollbar{display:none}.top nav a,.appbar nav a{display:flex!important;min-height:44px;align-items:center;flex:0 0 auto;padding:8px 12px!important;font-size:13px!important;white-space:nowrap}.top nav .logout{margin:0!important;padding-left:12px!important;border:0!important}
  .header-search{order:4;width:100%;max-width:none!important;margin:0!important}.header-search input{width:100%!important;min-height:44px}.search-results,.shared-search-results{position:fixed!important;z-index:50!important;top:148px!important;right:10px!important;left:10px!important;width:auto!important;max-height:50dvh!important}
  main,.page,.work-schedule{width:100%;min-width:0!important;padding:14px max(12px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important}
  .page-head{align-items:stretch;flex-direction:column}.page-head>div{margin:0}.page-head h1{font-size:25px}.page-head form{display:grid!important;grid-template-columns:minmax(0,1fr) auto;width:100%;gap:0}.page-head form select{grid-column:1/-1;width:100%;margin-bottom:8px}.page-head .search-field,.page-head input[type=search]{width:100%!important}.page-head .primary,.page-head>a.primary{width:100%;min-height:44px;justify-content:center}
  .data{width:100%;overflow-x:auto;border-radius:10px}.data table{min-width:680px}.summary{position:sticky;left:0}.pagination{position:sticky;left:0;width:max-content;max-width:calc(100vw - 24px);overflow-x:auto}.role-filter fieldset,.settings-tabs,.theme-options{overflow-x:auto;flex-wrap:nowrap!important}.role-filter label,.settings-tabs a{flex:0 0 auto;min-height:44px}.role-guide>div{grid-template-columns:1fr!important}
  .stat-cards{grid-template-columns:1fr 1fr!important}.stats-panel{padding:14px}.stats-panel>header{align-items:flex-start;flex-direction:column;gap:10px}.line-chart{margin-right:-14px}.line-chart svg{min-width:680px}
  .weekday,.month-grid{gap:4px}.month-card{padding:12px!important}.month-grid>span,.month-grid>button{min-height:52px!important}.month-grid small{display:none}
  .user-dialog{inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;border:0!important;border-radius:0!important}.user-dialog-bar{height:52px!important;padding-left:max(14px,env(safe-area-inset-left))!important;cursor:default!important}.user-dialog-bar button{width:44px!important;height:44px!important}.user-dialog iframe{height:calc(100dvh - 52px)!important}
  .workspace{display:flex!important;flex-direction:column;gap:12px}.schedule{width:100%;overflow:hidden}.board{overflow-x:auto!important;overscroll-behavior-x:contain}.timeline{grid-template-columns:48px repeat(var(--columns),minmax(180px,1fr))}.rail{width:100%}.theme-panel{position:static!important;width:auto!important}.panel{border:1px solid #dededb;border-radius:10px;background:#fff}.schedule-nav{position:sticky;left:0;width:100%}
  .login-page{padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.login-card{width:100%;max-width:376px;padding:60px 24px 32px}.login-card input:not([type=hidden]),.login-submit,.login-alternative{min-height:48px}
  .user-editor,.booking-editor{min-width:0!important}.user-editor>form>table>tbody>tr:first-child>td{height:auto!important;padding:8px!important}.user-editor>form>table>tbody>tr:first-child table,.user-editor>form>table>tbody>tr:first-child tbody,.user-editor>form>table>tbody>tr:first-child tr{display:block}.user-editor>form>table>tbody>tr:first-child td{display:inline-block}.user-editor>form>table>tbody>tr:nth-child(3)>td,.user-editor>form>table>tbody>tr:nth-child(4)>td{padding-right:10px!important;padding-left:10px!important}.user-editor [id$=_content]>div,.user-editor fieldset{padding:10px!important}.user-editor .editTable,.user-editor .editTable tbody,.user-editor .editTable tr,.user-editor .editTable td,.user-editor fieldset table,.user-editor fieldset tbody,.user-editor fieldset tr,.user-editor fieldset td{display:block;width:100%!important;text-align:left!important}.user-editor input.text,.user-editor select,.user-editor textarea{width:100%!important;max-width:100%!important;min-height:44px}.user-editor .tab,.user-editor .tabSelected{min-height:44px;padding:10px 9px}.booking-editor .editTable tr{grid-template-columns:1fr!important}.booking-editor fieldset{padding:12px}.booking-editor>form>table>tbody>tr:nth-child(4)>td{padding:10px!important}
}
@media(max-width:420px){.stat-cards{grid-template-columns:1fr!important}.month-grid>span,.month-grid>button{min-height:46px!important}.top nav a,.appbar nav a{padding-right:10px!important;padding-left:10px!important}.app-title strong{font-size:13px}}
