#m01-result-panel {
  position: absolute; top: 0.25rem; left: 50%; transform: translateX(-50%);
  width: min(33rem, calc(100% - 1rem)); max-height: calc(100% - 0.5rem);
  overflow-y: auto; z-index: 28; padding: 0.72rem 0.88rem;
  display: flex; flex-direction: column; gap: 0.5rem; pointer-events: auto;
  border-color: rgba(56, 189, 248, 0.48); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.72);
}
#m01-result-panel[hidden], #m01-dam-box[hidden], #m01-hover-tooltip[hidden] { display: none !important; }
body.pure-cinema #m01-result-panel { pointer-events: none !important; }
body.pure-cinema #m01-hover-tooltip { display: none !important; }

.m01-res-hdr {
  display: flex; align-items: center; justify-content: space-between; gap: 0.4rem;
}
#m01-res-title {
  font-size: 0.94rem; color: #FFFFFF; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
}
.m01-res-pills { display: flex; align-items: center; gap: 0.28rem; flex-shrink: 0; }
.m01-pill-btn { padding: 0.18rem 0.48rem; font-size: 0.76rem; border-radius: 999px; }
#btn-m01-res-close { padding: 0.16rem 0.46rem; font-size: 0.84rem; flex-shrink: 0; }

.m01-legend-wrap { display: flex; flex-direction: column; gap: 0.22rem; }
#m01-legend-bar {
  height: 0.52rem; border-radius: 999px; border: var(--border-hairline);
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.35) 0%, #38BDF8 18%, #6366F1 46%, #F59E0B 74%, #EF4444 100%);
}
#m01-legend-bar.is-vel {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.4) 0%, #14B8A6 16%, #10B981 38%, #FACC15 62%, #F97316 82%, #EF4444 100%);
}
.m01-legend-ticks { display: flex; justify-content: space-between; font-size: 0.74rem; color: var(--text-muted); }

#m01-hyd-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.36rem; }
#m01-hyd-kpis .kpi-cell { min-width: 0; padding: 0.36rem 0.48rem; }
#m01-hyd-kpis .kpi-lbl { font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#m01-hyd-kpis .kpi-val { font-size: 0.82rem; }

#m01-dam-box {
  background: rgba(15, 23, 42, 0.72); border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 0.45rem; padding: 0.45rem 0.55rem; display: flex; flex-direction: column; gap: 0.32rem;
}
.m01-dam-hdr { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
#m01-dam-title { font-size: 0.84rem; color: #FDE68A; font-weight: 600; }
#m01-dam-geom { font-size: 0.76rem; color: #CBD5E1; line-height: 1.35; }
.m01-dam-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.28rem; }
.m01-dam-cell {
  background: rgba(4, 7, 13, 0.62); border: var(--border-hairline); border-radius: 0.34rem;
  padding: 0.24rem 0.32rem; display: flex; flex-direction: column; gap: 0.06rem; min-width: 0;
}
.m01-dam-cell span { font-size: 0.68rem; color: var(--text-muted); }
.m01-dam-cell b { font-size: 0.78rem; color: var(--accent-cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m01-dam-cell b.is-ok { color: var(--ok-emerald); }
.m01-dam-cell b.is-warn { color: var(--warn-amber); }
.m01-dam-cell b.is-err { color: var(--danger-red); }
#m01-dam-status { font-size: 0.75rem; color: var(--ok-emerald); line-height: 1.35; }
#m01-dam-status.is-warn { color: var(--warn-amber); }

.m01-export-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.32rem; }
.m01-export-grid button { padding: 0.32rem 0.34rem; font-size: 0.74rem; font-weight: 600; text-align: center; white-space: nowrap; }
#m01-export-bar [data-m01fmt="bundle"] { border-color: rgba(16, 185, 129, 0.55); color: #A7F3D0; }
.m01-export-grid button:disabled, #btn-open-m01-panel:disabled { opacity: 0.45; cursor: not-allowed; }
#btn-open-m01-panel { width: 100%; font-weight: 600; }

#m01-hover-tooltip {
  position: fixed; z-index: 35; pointer-events: none; padding: 0.42rem 0.62rem;
  font-size: 0.78rem; line-height: 1.45; border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7); white-space: nowrap;
}
.m01-tt-d { color: #E0F2FE; font-weight: 600; }
.m01-tt-v { color: #6EE7B7; font-weight: 600; }
.m01-tt-p { color: var(--text-muted); font-size: 0.72rem; }
.m01-dam-choice {
  display: flex; flex-direction: column; gap: 0.28rem; padding: 0.42rem 0.5rem;
  background: rgba(15, 23, 42, 0.72); border: 1px solid rgba(245, 158, 11, 0.36); border-radius: 0.42rem;
}
.m01-dam-choice[hidden], #m01-dam-modal[hidden] { display: none !important; }
.m01-dc-lbl { font-size: 0.76rem; color: #FDE68A; font-weight: 600; line-height: 1.3; }
.m01-dam-choice .seg-btn { font-size: 0.76rem; padding: 0.28rem 0.36rem; }
#m01-dam-modal {
  position: absolute; top: 3.2rem; left: 50%; transform: translateX(-50%); z-index: 34;
  width: min(27rem, calc(100% - 1.5rem)); padding: 0.9rem 1rem;
  display: flex; flex-direction: column; gap: 0.65rem; pointer-events: auto;
  border: 1px solid rgba(245, 158, 11, 0.62); box-shadow: 0 22px 54px rgba(0, 0, 0, 0.85);
}
#m01-dm-title { font-size: 0.96rem; color: #FDE68A; font-weight: 700; }
#m01-dm-msg { margin: 0; font-size: 0.84rem; color: #E2E8F0; line-height: 1.5; }
.m01-dm-actions { display: grid; grid-template-columns: 1fr; gap: 0.42rem; }
.m01-dm-actions button { padding: 0.5rem 0.7rem; font-size: 0.86rem; font-weight: 700; }
