
.factory-world-map,.factory-world-effects{position:absolute;inset:0;width:100%;height:100%}.factory-world-effects{pointer-events:none;z-index:2}.factory-world-effects canvas{display:block!important;pointer-events:none}.top-bar{gap:6px;flex-wrap:wrap;right:290px}.top-bar .btn{opacity:1;background:#f8fcfc;border-color:#cedbdc;color:#22383f;min-height:32px}.top-bar .btn[aria-pressed=true]{background:#1c5b63;color:white;border-color:#1c5b63}.today-work-panel{top:64px;background:rgba(22,40,47,.9);border-color:#536968;color:#e8f3ef}.today-work-header{background:#304d52}.today-work-empty{color:#b6c8c7}.today-work-card{background:#29434a;border-color:#536968}.today-work-name{color:#c2d9d4}.chart-layout-panel{background:rgba(22,40,47,.85);border-radius:12px;right:15px}.debug-panel{bottom:85px}.maplibregl-ctrl-bottom-left{bottom:32px}.maplibregl-ctrl-bottom-right{bottom:32px}#world-map-status{position:absolute;bottom:0;left:0;right:0;z-index:5;padding:6px 12px;background:#173039;color:#e0ecea;font-size:11px;min-height:19px;pointer-events:none}#site-origin-panel{position:absolute;left:40px;top:105px;width:280px;padding:16px;z-index:110;background:#f6faf9;color:#203c43;border:1px solid #b9c8c6;border-radius:10px;box-shadow:0 8px 35px #0004;font-size:12px}#site-origin-panel p{line-height:1.6;color:#4f686c}#site-origin-panel label{display:flex;justify-content:space-between;align-items:center;margin:8px 0}#site-origin-panel input{width:125px;padding:6px;border:1px solid #bdcdce;border-radius:4px}#site-origin-panel button{padding:8px 12px;border:0;border-radius:5px;margin:8px 8px 0 0;cursor:pointer;background:#1c5b63;color:white}.maplibregl-canvas:focus-visible{outline:2px solid #27858b;outline-offset:-2px}@media(max-width:700px){.top-bar{top:8px;left:8px;right:8px}.top-bar .btn{font-size:11px;padding:5px 8px}.today-work-panel{left:8px;top:88px;width:220px;max-height:32vh}.chart-layout-panel{right:8px;top:auto;bottom:70px;width:180px;height:140px}.chart-layout{height:140px}#site-origin-panel{left:8px;top:88px;max-width:calc(100vw - 50px)}#world-map-status{font-size:10px}.edit-panel{max-width:calc(100vw - 30px)}}

.factory-world-map .maplibregl-ctrl-top-right{top:230px}@media(max-width:700px){.factory-world-map .maplibregl-ctrl-top-right{top:76px}}

/* Unified responsive editing and selection experience — phone/tablet/desktop. */
.factory-quick-menu{max-height:min(79dvh,680px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;width:min(240px,calc(100vw - 18px))}
.factory-quick-menu .menu-section-title{font:700 11px/1.4 system-ui,sans-serif;letter-spacing:.02em;padding:10px 8px 3px;color:#53747a;border-top:1px solid #dce6e5}
.factory-quick-menu .menu-section-title:first-child{border-top:0;padding-top:3px}
#site-origin-panel,#factory-login-panel,#map-data-panel,.edit-panel{box-sizing:border-box;max-height:calc(100vh - 70px);max-height:calc(100dvh - 70px);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#site-origin-panel{scrollbar-gutter:stable}
#factory-login-panel{max-width:calc(100vw - 18px)}
#map-data-panel{max-width:calc(100vw - 18px)}
#site-manager{max-height:calc(100dvh - 16px);overflow-y:auto}
.edit-panel{max-height:calc(100dvh - 70px)!important;overflow-y:auto!important;overscroll-behavior:contain;touch-action:pan-y}
.factory-quick-menu button:focus-visible,#map-data-panel button:focus-visible,#site-origin-panel button:focus-visible{outline:2px solid #e09b36;outline-offset:2px}
@media(max-width:900px){
  #site-origin-panel,#factory-login-panel,#map-data-panel{left:8px!important;right:8px!important;top:56px!important;width:auto!important;max-width:none!important;max-height:calc(100dvh - 64px)!important;padding:12px!important}
  .factory-quick-menu{top:50px;left:8px;max-height:calc(100dvh - 60px)}
  .edit-panel{position:fixed!important;left:8px!important;right:8px!important;top:56px!important;width:auto!important;max-height:calc(100dvh - 64px)!important;padding:12px!important;cursor:auto!important}
}
@media(max-height:550px) and (orientation:landscape){
  #site-origin-panel,#factory-login-panel,#map-data-panel,.edit-panel{top:42px!important;max-height:calc(100dvh - 50px)!important}
  .factory-quick-menu{top:40px;max-height:calc(100dvh - 45px)}
}


/* Selected factory edit window stays within viewport; body scrolls and actions remain visible. */
.edit-panel{width:min(475px,calc(100vw - 20px))!important;
  max-height:calc(100dvh - 22px)!important;overflow-x:hidden!important;
  overflow-y:auto!important;scrollbar-gutter:stable;overscroll-behavior:contain;
  padding:12px!important;touch-action:pan-y}
.edit-panel .factory-edit-header{position:sticky;top:-12px;z-index:3;
  padding:8px 4px;margin:-4px 0 8px;background:#fff;border-bottom:1px solid #dde5e4;
  cursor:move;touch-action:none}
.edit-panel .factory-edit-header small{font-weight:400;color:#65787c}
.edit-panel .factory-edit-actions{position:sticky;bottom:-12px;z-index:4;
  display:flex;gap:5px;flex-wrap:wrap;margin:12px -12px -12px;
  padding:9px 12px;background:#f8fbfa;border-top:1px solid #d7e3e2;
  box-shadow:0 -5px 14px #142c311a}
.edit-panel .factory-edit-actions .btn{flex:1 1 82px!important;min-height:38px;padding:6px!important}
#map-data-panel{width:min(455px,calc(100vw - 20px))!important;top:8px!important;
  max-height:calc(100dvh - 16px)!important;z-index:185}
@media(max-width:900px){
  #map-data-panel{left:6px!important;right:6px!important;top:6px!important;width:auto!important;
    max-width:none!important;max-height:calc(100dvh - 12px)!important}
  .edit-panel{left:6px!important;right:6px!important;top:6px!important;
    width:auto!important;max-height:calc(100dvh - 12px)!important}
}
#app-chart[hidden], .today-work-panel[v-cloak] { display: none !important; }
