@media(max-width:700px){
  body{padding-bottom:calc(58px + env(safe-area-inset-bottom,0px))!important}
  .app-shell{padding-bottom:calc(58px + env(safe-area-inset-bottom,0px))!important}
  #sidebarToggle,.sidebar-toggle{display:none!important;visibility:hidden!important;pointer-events:none!important;width:0!important;height:0!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0!important}
  .app-shell>.sidebar{padding-right:11px!important;padding-left:11px!important}
  .sidebar>.brand{gap:8px!important;min-height:48px!important}
  .sidebar>.brand>.brand-mark{width:36px!important;height:36px!important;flex-basis:36px!important}
  .sidebar .brand-name{font-size:16px!important}
  .sidebar .brand-sub{font-size:7px!important}
  .mobile-brand-tools{gap:5px!important;min-width:0!important}
  .mobile-brand-tools>.topbar-clock{display:none!important}
  .mobile-brand-tools>#libraryTopNav{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;flex:0 0 auto!important;min-width:36px!important;width:auto!important;height:36px!important;min-height:36px!important;padding:0 8px!important;border:1px solid rgba(143,168,201,.22)!important;border-radius:11px!important;background:linear-gradient(145deg,rgba(34,50,72,.94),rgba(17,27,41,.96))!important;color:#dce8f7!important;font-size:9px!important;font-weight:750!important;white-space:nowrap!important}
  .mobile-brand-tools>#libraryTopNav svg{display:block!important;width:15px!important;height:15px!important;flex:0 0 15px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.7!important;stroke-linecap:round!important;stroke-linejoin:round!important}
  .mobile-brand-tools>#libraryTopNav.on{border-color:rgba(167,139,250,.5)!important;background:rgba(113,91,177,.2)!important;color:#e4dcff!important}
  .mobile-brand-tools>.settings-wrap{flex:0 0 36px!important;width:36px!important;height:36px!important}
  .mobile-brand-tools>.settings-wrap>.settings-trigger{width:36px!important;height:36px!important;min-width:36px!important;border-radius:11px!important}
  .mobile-brand-tools>.settings-wrap>.settings-trigger svg{width:18px!important;height:18px!important}
  .workspace{padding-bottom:calc(65px + env(safe-area-inset-bottom,0px))!important}
  #mobileArchiveNav{position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:1250!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;width:100%!important;min-height:52px!important;height:calc(52px + env(safe-area-inset-bottom,0px))!important;padding:6px 10px calc(6px + env(safe-area-inset-bottom,0px))!important;overflow-x:auto!important;overflow-y:hidden!important;border-top:1px solid rgba(143,168,201,.2)!important;background:rgba(9,14,23,.96)!important;backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;box-shadow:0 -8px 24px rgba(0,0,0,.22)!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important}
  #mobileArchiveNav::-webkit-scrollbar{display:none!important}
  #mobileArchiveNav[hidden]{display:none!important}
  #mobileArchiveNav .mobile-category-chip{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;flex:0 0 auto!important;min-width:0!important;height:36px!important;padding:0 12px!important;border:1px solid rgba(143,168,201,.2)!important;border-radius:999px!important;background:rgba(23,35,52,.92)!important;color:#b9c8dc!important;font:700 10px/1 var(--sans,system-ui,sans-serif)!important;white-space:nowrap!important;cursor:pointer!important;-webkit-tap-highlight-color:transparent!important}
  #mobileArchiveNav .mobile-category-chip svg{display:block!important;width:14px!important;height:14px!important;flex:0 0 14px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
  #mobileArchiveNav .mobile-category-chip[aria-current="true"]{border-color:rgba(167,139,250,.55)!important;background:linear-gradient(110deg,rgba(111,86,177,.25),rgba(64,56,100,.25))!important;color:#e5dcff!important;box-shadow:inset 0 0 0 1px rgba(167,139,250,.08)!important}
  #mobileArchiveNav .mobile-category-chip:active{transform:scale(.97)!important}
  body.mobile-workspace-library #mobileArchiveNav{display:none!important}
  body.mobile-workspace-library{padding-bottom:0!important}
  body.mobile-workspace-library .app-shell{padding-bottom:0!important}
  body.mobile-workspace-library .workspace{padding-bottom:12px!important}
  body.mobile-workspace-saves{padding-bottom:calc(58px + env(safe-area-inset-bottom,0px))!important}
  body.mobile-workspace-saves .app-shell{padding-bottom:calc(58px + env(safe-area-inset-bottom,0px))!important}
  body.mobile-workspace-saves .workspace{padding-bottom:calc(65px + env(safe-area-inset-bottom,0px))!important}
  #randomGameBtn{right:13px!important;bottom:calc(65px + env(safe-area-inset-bottom,0px))!important;width:44px!important;height:44px!important;min-width:44px!important;max-width:44px!important;padding:0!important;border-radius:50%!important;box-shadow:0 7px 19px rgba(28,18,74,.4),inset 0 1px 0 rgba(255,255,255,.2)!important}
  #randomGameBtn::before{right:-3px!important;bottom:calc(100% + 5px)!important;padding:4px 9px!important;font-size:9px!important}
  #randomGameBtn svg{width:21px!important;height:21px!important}
  body.mobile-workspace-library #randomGameBtn,body.mobile-workspace-saves #randomGameBtn{display:none!important}
  .library-view,.library-view.fullscreen{display:flex!important;flex-direction:column!important;gap:7px!important;width:100%!important;height:calc(100dvh - 154px)!important;min-height:430px!important;max-height:none!important;flex:1 1 auto!important;padding:0!important;overflow:hidden!important}
  header.topbar.library-mode{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;justify-content:space-between!important;gap:7px!important;min-height:0!important;height:auto!important;padding:8px 0 5px!important}
  header.topbar.library-mode>.library-header-brand:not([hidden]){display:flex!important;align-items:center!important;flex:1 1 145px!important;width:auto!important;min-width:0!important;gap:7px!important;padding:4px 7px!important;margin:0!important;white-space:nowrap!important}
  header.topbar.library-mode>.library-header-brand .library-header-copy strong{font-size:14px!important}
  header.topbar.library-mode>.library-header-brand .library-header-copy small{font-size:7px!important}
  header.topbar.library-mode>.library-recent-home:not([hidden]){order:3!important;display:flex!important;align-items:center!important;flex:1 1 100%!important;width:100%!important;max-width:none!important;min-width:0!important;height:47px!important;min-height:47px!important;margin:0!important;padding:5px 6px!important;gap:6px!important;overflow:hidden!important}
  header.topbar.library-mode>.library-recent-home .library-recent-home-head{flex:0 0 94px!important;width:94px!important;min-width:94px!important;gap:4px!important}
  header.topbar.library-mode>.library-recent-home .library-recent-home-title strong{font-size:8px!important}
  header.topbar.library-mode>.library-recent-home .library-recent-list{flex:1 1 auto!important;min-width:0!important;min-height:0!important;height:34px!important;gap:5px!important;padding:0!important;overflow-x:auto!important;overflow-y:hidden!important}
  header.topbar.library-mode>.library-recent-home .library-recent-card{flex:0 0 118px!important;min-width:118px!important;max-width:118px!important;height:32px!important;min-height:32px!important;padding:4px 6px!important;gap:5px!important}
  header.topbar.library-mode>.library-recent-home .library-recent-file-icon{width:22px!important;height:24px!important;flex-basis:22px!important;font-size:10px!important}
  header.topbar.library-mode>.library-recent-home .library-recent-card-copy b{font-size:8px!important}
  header.topbar.library-mode>.library-recent-home .library-recent-card-copy small,header.topbar.library-mode>.library-recent-home .library-recent-card-meta{display:none!important}
  header.topbar.library-mode>.top-actions{order:2!important;display:flex!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;margin:0!important;gap:5px!important}
  header.topbar.library-mode>.top-actions>.mobile-brand-tools{display:flex!important;align-items:center!important;gap:4px!important;margin:0!important}
  header.topbar.library-mode>.top-actions>.archive-search,header.topbar.library-mode>.top-actions>#newcat,header.topbar.library-mode>.top-actions>#add,header.topbar.library-mode>.top-actions>.topbar-clock{display:none!important}
  .library-toolbar{display:flex!important;flex:0 0 auto!important;flex-wrap:nowrap!important;align-items:center!important;gap:6px!important;width:100%!important;max-width:100%!important;min-height:42px!important;padding:5px!important;overflow-x:auto!important;overflow-y:visible!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important}
  .library-toolbar::-webkit-scrollbar{display:none!important}
  .library-toolbar>*{flex:0 0 auto!important;min-width:0!important}
  .library-toolbar .library-tool{min-height:32px!important;padding:6px 9px!important;font-size:10px!important;white-space:nowrap!important}
  .library-toolbar .library-tool .shortcut{display:none!important}
  .library-workbench,.library-workbench:not(.explorer-collapsed),.library-view.fullscreen .library-workbench,.library-view.fullscreen .library-workbench:not(.explorer-collapsed){display:flex!important;flex:1 1 auto!important;flex-direction:column!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important;width:100%!important;height:auto!important;min-height:0!important;overflow:hidden!important}
  .library-explorer{display:flex!important;flex:0 0 clamp(112px,22dvh,165px)!important;width:100%!important;min-width:0!important;min-height:90px!important;max-height:165px!important;border-right:0!important;border-bottom:1px solid rgba(126,150,184,.2)!important}
  .library-workbench.explorer-collapsed .library-explorer{display:none!important}
  .library-tree{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;width:100%!important;min-width:0!important;min-height:0!important;padding:6px 8px 9px!important;overflow:auto!important}
  .library-tree-row{width:100%!important;min-width:0!important;padding-left:calc(var(--depth,0)*10px)!important}
  .library-tree-folder,.library-tree-file{min-height:32px!important;padding:6px 8px!important;gap:7px!important;font-size:11px!important}
  .library-editor-panel{display:flex!important;flex:1 1 auto!important;width:100%!important;min-width:0!important;min-height:190px!important;overflow:hidden!important}
  .library-tabstrip{flex:0 0 32px!important;min-height:32px!important;max-height:32px!important;overflow-x:auto!important}
  .library-editor-empty{display:grid!important;flex:1 1 auto!important;min-height:150px!important;gap:9px!important;padding:17px 13px!important}
  .library-editor-empty .empty-file-icon{width:48px!important;height:48px!important;border-radius:14px!important;font-size:25px!important}
  .library-editor-empty b{font-size:13px!important;line-height:1.35!important}
  .library-editor-empty span:last-child{max-width:290px!important;font-size:10px!important;line-height:1.45!important}
  .library-code-wrap{grid-template-columns:30px minmax(0,1fr)!important;flex:1 1 auto!important;min-height:0!important}
  .library-code-gutter{font-size:10px!important;padding:10px 5px 24px 0!important}
  #libraryTextEditor{font-size:11px!important;padding:10px 8px 24px!important;line-height:1.6!important}
  #libraryFindHighlight{font-size:11px!important;padding:10px 8px 24px!important;line-height:1.6!important}
  .library-statusbar{flex:0 0 25px!important;min-height:25px!important;gap:6px!important;padding:4px 7px!important;font-size:8px!important}
  #libraryCursorState{display:none!important}
  .library-view.fullscreen .library-workbench:not(.explorer-collapsed){grid-template-columns:minmax(0,1fr)!important}
}
@media(max-width:400px){
  .sidebar>.brand>.brand-mark{width:33px!important;height:33px!important;flex-basis:33px!important}
  .sidebar .brand-name{font-size:14px!important}
  .sidebar .brand-sub{font-size:6px!important}
  .mobile-brand-tools{gap:3px!important}
  .mobile-brand-tools>#libraryTopNav{width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;padding:0!important}
  .mobile-brand-tools>#libraryTopNav span{display:none!important}
  .mobile-brand-tools>.settings-wrap,.mobile-brand-tools>.settings-wrap>.settings-trigger{width:34px!important;min-width:34px!important;height:34px!important;flex-basis:34px!important}
  #mobileArchiveNav{gap:5px!important;padding-left:8px!important;padding-right:8px!important}
  #mobileArchiveNav .mobile-category-chip{height:34px!important;padding:0 10px!important;font-size:9px!important}
  #randomGameBtn{width:41px!important;height:41px!important;min-width:41px!important;max-width:41px!important}
  #randomGameBtn svg{width:20px!important;height:20px!important}
  .library-view,.library-view.fullscreen{height:calc(100dvh - 145px)!important;min-height:400px!important}
  .library-explorer{flex-basis:clamp(105px,20dvh,145px)!important;max-height:145px!important}
}
@media(min-width:701px){#mobileArchiveNav{display:none!important}}
