/* Small-screen chrome is installed only after authentication; desktop stays unchanged. */
.mw-bottom-host,.mw-topbar-brand,.mw-message-trigger,.mw-home,.mw-menu-sheet{display:none}
@media(max-width:760px), (max-width:1000px) and (max-height:540px) and (orientation:landscape){
  body.mw-enabled{--mw-green:#244a30;--mw-gold:#c6986f;--mw-mint:#6ca285;--mw-ink:#242625;--mw-line:#e4ebe6;--mw-bottom:calc(68px + env(safe-area-inset-bottom,0px));background:#f4f7f5}
  .mw-enabled .app-shell{min-height:100dvh;display:block}
  .mw-enabled .sidebar,.mw-enabled .mobile-backdrop,.mw-enabled .nav-flyout{display:none!important}
  .mw-enabled .main-wrap{min-width:0;width:100%}
  .mw-enabled .topbar{position:sticky;top:0;z-index:62;height:calc(68px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px));background:#ffffffed;border-bottom:1px solid #e5ece7;gap:10px;isolation:isolate}
  .mw-enabled .topbar>.menu-toggle,.mw-enabled .topbar>.system-title,.mw-enabled .topbar-actions>.current-role,.mw-enabled .topbar-actions>.logout,.mw-enabled .topbar-date,.mw-enabled .topbar-actions>a{display:none!important}
  .mw-topbar-brand{display:flex;align-items:center;gap:9px;min-width:0;flex:1}
  .mw-topbar-brand img{width:41px;height:41px;object-fit:contain;flex:0 0 41px;background:white;padding:3px;border-radius:12px;border:1px solid #e2ebe5;clip-path:inset(0 round 12px)}
  .mw-topbar-brand>div{display:flex;flex-direction:column;min-width:0;gap:1px;line-height:1.4}
  .mw-topbar-brand strong{color:var(--mw-green);font-size:17px;letter-spacing:.3px;white-space:nowrap}
  .mw-topbar-brand span{color:#7a8c80;font-size:11px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mw-enabled .topbar-actions{flex:0 0 auto;gap:7px;min-width:0}
  .mw-enabled #global-search-host{min-width:44px;flex:0 0 44px}
  .mw-enabled .gs-mobile-toggle{display:flex;width:44px;height:44px;border-radius:12px;background:#f7faf8;border:1px solid #e3ebe6}
  .mw-enabled .gs-mobile-toggle svg{width:20px;height:20px;stroke:#446451}
  .mw-enabled .global-search.is-expanded .gs-field{top:calc(77px + env(safe-area-inset-top,0px));height:48px;left:14px;right:14px;border-radius:12px}
  .mw-enabled .global-search .gs-input{font-size:16px!important;min-height:44px}
  .mw-enabled .gs-panel{top:calc(133px + env(safe-area-inset-top,0px));left:14px;right:14px;max-height:calc(100dvh - 150px - env(safe-area-inset-top,0px));border-radius:14px}
  .mw-enabled .gs-list{max-height:calc(100dvh - 285px - env(safe-area-inset-top,0px));padding-bottom:12px}
  .mw-enabled .gs-close{min-width:44px;min-height:36px}
  .mw-message-trigger{position:relative;display:flex;align-items:center;justify-content:center;width:44px;height:44px;flex:0 0 44px;border:1px solid #e3ebe6;border-radius:12px;color:#446451;background:#f7faf8;padding:0;touch-action:manipulation;-webkit-user-select:none;user-select:none}
  .mw-icon{width:22px;height:22px;display:inline-flex;flex-shrink:0;vertical-align:middle}
  .mw-icon svg{display:block;width:100%;height:100%}
  .mw-message-badge{position:absolute;top:-5px;right:-5px;display:grid;place-items:center;min-width:19px;height:19px;padding:0 4px;background:#d92d20;border:2px solid #fff;border-radius:99px;color:white;font:700 10px/1 system-ui,sans-serif;font-variant-numeric:tabular-nums;box-shadow:0 1px 3px #b91c1c20}
  .mw-bottom-host{display:block}
  .mw-bottom-nav{display:flex;align-items:stretch;justify-content:space-around;position:fixed;z-index:64;left:0;right:0;bottom:0;height:var(--mw-bottom);padding:5px max(12px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(12px,env(safe-area-inset-left,0px));border-top:1px solid #e2eae5;background:#fffffff5;box-shadow:0 -5px 24px #244a3005;gap:4px}
  .mw-bottom-item{position:relative;display:flex;flex:1;min-width:0;min-height:56px;max-width:120px;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:transparent;border:0;border-radius:11px;padding:7px 8px 6px;color:#7b8b81;font-size:11px;font-weight:600;line-height:1.3;touch-action:manipulation;-webkit-user-select:none;user-select:none}
  .mw-bottom-item .mw-icon{width:23px;height:23px}
  .mw-bottom-item.is-current{background:#edf4ef;color:var(--mw-green)}
  .mw-bottom-item.is-current:before{content:"";position:absolute;top:3px;left:calc(50% - 9px);width:18px;height:2px;border-radius:2px;background:var(--mw-gold)}
  .mw-enabled .content{padding-bottom:calc(var(--mw-bottom) + 22px)}
  .mw-enabled .footer-note{margin-bottom:0}
  .mw-enabled #toast-root{position:relative;z-index:400}
  .mw-enabled .toast{bottom:calc(var(--mw-bottom) + 13px);max-width:calc(100vw - 28px);white-space:normal;overflow-wrap:anywhere}
  .mw-business-modal-open .mw-bottom-nav,.mw-business-modal-open .mw-message-trigger,.mw-keyboard-open .mw-bottom-nav,.touch-fullscreen .mw-bottom-nav{display:none}
  .touch-fullscreen .mw-topbar-brand,.touch-fullscreen .mw-home{display:none}
  .mw-home{display:contents}
  .mw-home-intro{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:4px 2px 18px}
  .mw-home-intro>div{min-width:0}
  .mw-home-date{font-size:10px;letter-spacing:.7px;color:#8c9b91}
  .mw-home-intro h2{font-size:23px;line-height:1.5;letter-spacing:-.5px;margin:3px 0 5px;color:var(--mw-ink);overflow-wrap:anywhere}
  .mw-home-intro p{font-size:12px;color:#73887b;line-height:1.7}
  .mw-home-tools{display:flex;align-items:center;gap:9px;flex:0 0 auto}
  .mw-home-refresh{display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;padding:0;border:1px solid #dfebe3;border-radius:13px;background:#fff;color:#668470;touch-action:manipulation;-webkit-user-select:none;user-select:none}
  .mw-home-refresh .mw-icon{width:20px;height:20px}
  .mw-home-refresh:active{transform:scale(.97)}
  .mw-home-refresh:focus-visible{outline:3px solid #b58b60;outline-offset:2px}
  .mw-home-avatar{width:49px;height:49px;flex:0 0 49px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(140deg,#e9f3ed,#d9eadd);border:1px solid #d4e5d9;color:var(--mw-green);font-size:22px;font-weight:700;box-shadow:inset 0 1px #fff}
  .mw-home-shortcuts{background:#fff;border:1px solid var(--mw-line);border-radius:15px;padding:16px 12px 13px;margin:0 0 16px;box-shadow:0 4px 15px #244a3003}
  .mw-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 3px 12px}
  .mw-section-heading h2{font-size:15px;line-height:1.4;color:var(--mw-ink)}
  .mw-section-heading>button{display:flex;align-items:center;justify-content:center;gap:2px;min-height:44px;background:none;border:0;padding:0 2px 0 8px;color:#7a8e80;font-size:11px;touch-action:manipulation}
  .mw-section-heading>button .mw-icon{width:15px;height:15px}
  .mw-shortcut-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px 5px}
  .mw-shortcut-grid>button{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:7px;background:transparent;border:0;border-radius:10px;color:#3b5143;font-size:12px;line-height:1.5;min-height:80px;padding:5px 3px;touch-action:manipulation;-webkit-user-select:none;user-select:none}
  .mw-shortcut-grid>button>span:last-child{overflow-wrap:anywhere;text-align:center}
  .mw-shortcut-icon{width:45px;height:45px;border:1px solid #e1ece4;border-radius:13px;background:linear-gradient(145deg,#edf5f0,#e1eee5);display:grid;place-items:center;color:#39764c;box-shadow:inset 0 1px 0 #fff}
  .mw-shortcut-grid>button:nth-child(3n+2) .mw-shortcut-icon{color:#a37447;background:linear-gradient(145deg,#fcf6ef,#f4e9da);border-color:#eee3d6}
  .mw-shortcut-grid>button:nth-child(3n) .mw-shortcut-icon{color:#3e7b74;background:linear-gradient(145deg,#eff8f5,#e4f0ed);border-color:#dcece6}
  .mw-shortcut-icon .mw-icon{width:23px;height:23px}
  .mw-menu-sheet{position:fixed;inset:auto 0 0;box-sizing:border-box;width:100%;max-width:760px;height:min(92dvh,860px);max-height:calc(100dvh - env(safe-area-inset-top,0px) - 8px);padding:0;margin:auto auto 0;border:1px solid #e0e9e3;border-bottom:0;border-radius:22px 22px 0 0;overflow:hidden;background:#f7faf8;color:#242625;box-shadow:0 -12px 70px #173c2b26;opacity:0;transform:translateY(22px);transition:transform 190ms cubic-bezier(.32,.72,0,1),opacity 150ms cubic-bezier(.23,1,.32,1)}
  .mw-menu-sheet[open]{display:flex;flex-direction:column}
  .mw-menu-sheet.is-open{opacity:1;transform:translateY(0)}
  .mw-menu-sheet.is-keyboard-open{transition:none}
  .mw-menu-sheet::backdrop{background:#11281c61}
  .mw-sheet-handle{width:36px;height:4px;border-radius:9px;background:#d4dfd7;margin:10px auto 5px;flex:0 0 auto}
  .mw-sheet-header{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 20px 13px;flex:0 0 auto}
  .mw-sheet-header>div>span{font-size:9px;letter-spacing:1.7px;color:#96a49b}
  .mw-sheet-header h2{font-size:22px;letter-spacing:-.4px;color:#244a30;margin-top:3px}
  .mw-sheet-header>button{width:44px;height:44px;background:#eaf1ec;border:1px solid #e0e9e3;border-radius:13px;color:#647a6b;display:grid;place-items:center;touch-action:manipulation}
  .mw-menu-search{padding:0 18px 8px;flex:0 0 auto}
  .mw-menu-search>label{height:47px;display:flex;align-items:center;gap:9px;border:1px solid #e0e9e3;border-radius:12px;background:#fff;padding:0 12px;color:#80958a}
  .mw-menu-search>label:focus-within{border-color:#6ca285;box-shadow:0 0 0 3px #6ca28512}
  .mw-menu-search input{border:0!important;box-shadow:none!important;outline:none!important;min-width:0;margin:0!important;padding:0!important;min-height:44px;background:transparent!important;color:#242625;font-size:16px!important;font-weight:400}
  .mw-menu-search input::-webkit-search-cancel-button{display:none}
  .mw-menu-search>label>.mw-icon{width:19px;height:19px;flex:0 0 19px}
  .mw-menu-search>label>button{border:0;background:#f1f5f2;color:#6f8275;border-radius:7px;width:44px;min-width:44px;height:44px;padding:6px;display:grid;place-items:center}
  .mw-menu-search>label>button[hidden]{display:none}
  .mw-menu-search>label>button .mw-icon{width:17px;height:17px}
  .mw-menu-result{font-size:10px;color:#96a499;padding:7px 3px 0;min-height:21px}
  .mw-menu-scroll{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 18px 20px;scroll-padding:12px}
  .mw-menu-group{padding-top:13px}
  .mw-menu-group h3{font-size:12px;line-height:1.5;color:#758a7c;margin:0 3px 9px;font-weight:600}
  .mw-menu-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .mw-menu-item{position:relative;min-width:0;min-height:90px;padding:11px 6px 10px;border:1px solid #e3ebe6;border-radius:12px;background:white;display:flex;align-items:center;flex-direction:column;justify-content:flex-start;gap:8px;color:#405347;font-size:12px;line-height:1.5;touch-action:manipulation;-webkit-user-select:none;user-select:none}
  .mw-menu-item>span:last-of-type{text-align:center;overflow-wrap:anywhere}
  .mw-menu-item-icon{width:32px;height:32px;display:grid;place-items:center;color:#5c8d6b;background:#eef5f0;border-radius:9px}
  .mw-menu-item-icon .mw-icon{width:19px;height:19px}
  .mw-menu-item.is-current{border-color:#a8c8b4;background:#edf5ef;color:#244a30;font-weight:700}
  .mw-menu-current-dot{position:absolute;right:9px;top:9px;width:5px;height:5px;border-radius:50%;background:#c6986f}
  .mw-menu-sheet mark{padding:0 1px;border-radius:3px;background:#f0dfc9;color:#6f4c28}
  .mw-menu-empty{display:flex;align-items:center;flex-direction:column;justify-content:center;min-height:190px;padding:25px 12px;color:#7b8e80;font-size:13px;text-align:center}
  .mw-menu-empty strong{font-size:15px;color:#4a6a55;margin-bottom:7px}
  .mw-sheet-account{display:flex;align-items:center;gap:10px;background:#fff;border-top:1px solid #e3eae5;padding:13px max(18px,env(safe-area-inset-right,0px)) calc(14px + env(safe-area-inset-bottom,0px)) max(18px,env(safe-area-inset-left,0px));flex:0 0 auto}
  .mw-account-avatar{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:10px;background:#eaf2ed;color:#4e785b;font-size:16px;font-weight:700}
  .mw-sheet-account>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .mw-sheet-account strong{font-size:13px;color:#355641;overflow-wrap:anywhere}
  .mw-sheet-account small{font-size:10px;color:#8b9b90}
  .mw-sheet-account>button{display:flex;align-items:center;gap:5px;background:#f8faf8;color:#73877a;border:1px solid #e4ebe6;border-radius:9px;font-size:11px;min-height:44px;padding:8px 11px;touch-action:manipulation}
  .mw-sheet-account>button .mw-icon{width:15px;height:15px}
  .mw-enabled .mw-bottom-item:active,.mw-enabled .mw-shortcut-grid>button:active,.mw-menu-sheet .mw-menu-item:active,.mw-message-trigger:active{transform:scale(.97)}
  .mw-enabled .mw-bottom-item:focus-visible,.mw-enabled .mw-shortcut-grid>button:focus-visible,.mw-menu-sheet button:focus-visible,.mw-message-trigger:focus-visible{outline:3px solid #b58b60;outline-offset:2px}
}
@media(max-width:360px){.mw-enabled .topbar{padding-left:12px;padding-right:12px;gap:7px}.mw-topbar-brand{gap:7px}.mw-topbar-brand strong{font-size:15px}.mw-topbar-brand img{width:37px;height:37px;flex-basis:37px}.mw-home-intro h2{font-size:21px}.mw-menu-grid{gap:6px}.mw-menu-item{font-size:11px;padding-left:3px;padding-right:3px}}
@media(hover:hover) and (pointer:fine){.mw-bottom-item:hover{color:#244a30;background:#f1f6f2}.mw-menu-sheet button:hover{border-color:#b7cebf}.mw-shortcut-grid>button:hover{background:#f5f9f6}}
@media(prefers-reduced-motion:reduce){.mw-menu-sheet{transition:none!important}.mw-enabled .mw-bottom-item:active,.mw-enabled .mw-shortcut-grid>button:active,.mw-menu-sheet .mw-menu-item:active,.mw-message-trigger:active{transform:none}}
@media print{.mw-bottom-host,.mw-menu-sheet,.mw-home,.mw-topbar-brand,.mw-message-trigger{display:none!important}}

@media (max-width:760px), (max-width:1000px) and (max-height:540px) and (orientation:landscape){
  .mw-menu-group h3{display:flex;align-items:center;gap:7px}.mw-group-count,.mw-shortcut-count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:99px;background:#d93e35;color:#fff;font-size:10px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums;flex-shrink:0}.mw-shortcut-icon{position:relative}.mw-shortcut-count{position:absolute;top:-5px;right:-9px;box-shadow:0 0 0 2px #fff}.mw-menu-item .nav-count{flex-shrink:0}
}
