/* Unified operator workspace: Chinese labels, wide-screen density, and predictable mobile behavior. */
:root{--workspace-max:1680px;--control-height:38px;--focus-ring:0 0 0 3px rgba(35,99,235,.16)}
html,body{width:100%;overflow-x:hidden}.main{width:100%;max-width:none;margin:0;padding:clamp(22px,2vw,38px) clamp(18px,2.6vw,50px)}
.main>.view{width:min(100%,var(--workspace-max));margin:0 auto}.panel,.metric{border-color:#dfe7f0;box-shadow:0 1px 2px rgba(16,36,62,.025)}
.page-head{align-items:center;min-height:48px;margin-bottom:18px}.page-head h1{letter-spacing:0;font-size:26px}.eyebrow,.panel-kicker,.section-label{letter-spacing:.08em;font-weight:700}.page-actions,.toolbar,.field-page-actions,.field-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.primary-btn,.outline-btn,.range-btn,.toolbar input,.toolbar select,.toolbar label select{min-height:var(--control-height)}
.primary-btn:focus-visible,.outline-btn:focus-visible,.range-btn:focus-visible,.nav:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:0;box-shadow:var(--focus-ring)}
.primary-btn:disabled,.outline-btn:disabled{cursor:not-allowed;opacity:.48}.table-scroll{scrollbar-color:#c7d3e1 transparent}.table-scroll::-webkit-scrollbar{height:8px}.table-scroll::-webkit-scrollbar-thumb{background:#c7d3e1;border-radius:4px}
.field-workbench,.cross-section-layout,.water-layout,.wave-layout{gap:18px}.baseline-workspace{max-width:var(--workspace-max);margin:0 auto}.baseline-layout{grid-template-columns:minmax(0,1.45fr) minmax(330px,.7fr);gap:18px}.baseline-history{margin-top:18px}.baseline-gates .error{background:#fff0f0;color:#a12d2d}.baseline-status{margin:0 0 18px}.baseline-readings dd{word-break:break-word}
.field-page-actions,.cross-section-toolbar{justify-content:flex-end}.field-live-head,.field-map-head,.mobile-card-head{gap:12px}.field-reading-grid,.metric-grid{gap:16px}.field-map-panel,.cross-section-chart-panel{min-width:0}.cross-section-result-bar{padding:2px 0 0}.cross-section-result-title{min-width:0}.cross-section-result-title h2{overflow-wrap:anywhere}.mobile-workspace{max-width:var(--workspace-max);padding-bottom:42px}.mobile-page-head{margin-bottom:20px}
.lspiv-stage:after{content:'参考画面 · MQTT 矢量叠加';letter-spacing:.08em}.code-block{max-width:100%;font-size:11px}.device-card{min-width:0}.device-card small,.muted{overflow-wrap:anywhere}

/* Keep the field page's live state and commands together on wide screens. */
@media (min-width:1181px){
  #field{max-width:1480px}
  #field .field-page-head{justify-content:space-between;gap:20px}
  #field .field-page-actions{margin-left:auto;flex-wrap:nowrap;white-space:nowrap}
  #field .field-context-panel{position:sticky;top:18px}
}

@media (max-width:1180px){
  .sidebar{position:fixed;z-index:60;top:72px;bottom:0;left:-248px;width:236px;padding:22px 16px;box-shadow:5px 0 20px rgba(16,36,62,.16);transition:left .2s ease}
  .sidebar.open{left:0}.mobile-title{display:flex;align-items:center;justify-content:space-between;margin:0 0 18px;color:#203a53;font-weight:700}.mobile-title button{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--blue);font-size:20px}
  .main{padding:26px 28px}.main>.view{max-width:1420px}.field-workbench,.cross-section-layout,.water-layout,.wave-layout{grid-template-columns:1fr}.field-context-panel,.cross-section-details,.water-context,.wave-context{grid-column:1/-1}.baseline-layout{grid-template-columns:minmax(0,1fr) minmax(300px,.62fr)}
}

@media (max-width:880px){
  .main{padding:22px 20px}.main>.view{max-width:none}.page-head{align-items:flex-start;flex-direction:column}.page-head>.toolbar,.page-head>.page-actions,.page-head>.range,.field-page-actions,.cross-section-toolbar{width:100%;justify-content:flex-start}
  .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-2,.baseline-layout{grid-template-columns:1fr}.baseline-active{order:-1}.field-live-head{align-items:flex-start;flex-direction:column}.field-controls{width:100%}.field-controls>*{flex:0 0 auto}.water-layout,.wave-layout{gap:14px}.mobile-page-head{align-items:flex-start;flex-direction:column}.mobile-page-head .mobile-primary{width:auto}
}

@media (max-width:640px){
  :root{--control-height:40px}.topbar{height:60px;padding:0 14px}.brand{gap:9px}.brand-mark{width:31px;height:31px;font-size:17px}.brand strong{font-size:13px}.brand small,.top-actions>span:not(.live-dot){display:none}.top-actions{gap:5px}.shell{min-height:calc(100svh - 60px)}.sidebar{top:60px;left:-88vw;width:min(84vw,280px);padding:18px 12px}.sidebar.open{left:0}.nav{min-height:42px;padding:10px 12px}.sidebar-foot{padding:16px 12px}
  .main{min-height:calc(100svh - 60px);padding:16px 12px}.mobile-title{margin-bottom:16px}.page-head{gap:12px;margin-bottom:16px}.page-head h1{font-size:23px}.eyebrow,.panel-kicker{font-size:10px;letter-spacing:.06em}.page-actions,.toolbar,.field-page-actions,.field-controls{width:100%;align-items:stretch}.page-actions>*{flex:1 1 132px}.toolbar>*{min-width:0}.toolbar input,.toolbar select,.toolbar label{flex:1 1 calc(50% - 6px);min-width:0}.toolbar .primary-btn,.toolbar .outline-btn{flex:1 1 100%}.range{width:100%}.range-btn{flex:1}.metric-grid,.system-grid,.mobile-summary-grid,.floating-summary-grid{grid-template-columns:1fr}.metric{min-height:108px;padding:15px}.metric strong{font-size:28px}.panel{padding:15px}.panel-head{align-items:flex-start;flex-wrap:wrap;margin-bottom:14px}.panel-head>.text-btn,.panel-head>.outline-btn{margin-left:auto}.chart-wrap{height:250px}.field-reading-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.field-reading-grid>div{min-width:0}.lspiv-stage{min-height:0;aspect-ratio:16/10}.lspiv-hud{width:calc(100% - 20px);min-height:0;left:10px;right:10px;top:10px;padding:7px 9px;justify-content:flex-start}.lspiv-stage:after{left:11px;top:57px;font-size:8px}.lspiv-legend{max-width:calc(100% - 24px);flex-wrap:wrap;gap:4px}.field-map-panel,.cesium-panel{height:clamp(300px,55svh,440px)}
  .cross-section-canvas-wrap{height:clamp(300px,55svh,440px)}.cross-section-canvas-wrap>#cross-section-canvas{min-height:0}.cross-section-result-bar,.cross-section-acquisition,.cross-section-acquisition-form{width:100%}.cross-section-view-switch{width:100%}.cross-section-view-switch button{flex:1}.cross-section-chart-panel .cross-section-legend{margin:11px 14px 14px;gap:8px}.cross-section-details dl,.field-context-panel dl{grid-template-columns:1fr}.water-wave-stage,.wave-chart-stage{height:clamp(250px,42svh,340px)}
  .baseline-status{padding:10px 11px;font-size:12px}.baseline-readings{grid-template-columns:repeat(2,minmax(0,1fr))}.baseline-readings div{min-width:0;padding:12px 8px}.baseline-readings dd{font-size:21px}.baseline-gates{gap:6px}.baseline-gates span{max-width:100%;white-space:normal}.baseline-active dl div{grid-template-columns:78px minmax(0,1fr)}.baseline-active dd{font-size:11px}.baseline-history{margin-top:14px}
  .table-scroll{margin:0 -15px;padding:0 15px;width:calc(100% + 30px)}table{min-width:620px}th,td{padding:11px 8px;font-size:12px}.history-pagination,.mobile-pagination{align-items:flex-start;flex-wrap:wrap;justify-content:flex-start}.history-controls{margin:0}.history-page-size{margin-left:auto}.mobile-page-head h1{font-size:24px}.mobile-page-head .mobile-primary{width:100%}.mobile-card-head{display:block}.mobile-card-head .mobile-count{display:inline-block;margin-top:10px}.mobile-dialog,.floating-dialog{width:calc(100vw - 20px);max-height:calc(100svh - 20px)}.mobile-dialog form,.floating-dialog-form{padding:16px}.mobile-dialog-actions,.floating-dialog-actions{align-items:stretch;flex-direction:column-reverse}.mobile-dialog-actions button,.floating-dialog-actions button{width:100%}.mobile-activation-result{grid-template-columns:1fr}.mobile-qr{margin:auto}
}
