:root {
  --bg: #edf2ee;
  --paper: rgba(250, 252, 250, 0.92);
  --paper-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(34, 53, 39, 0.12);
  --text: #1f2a22;
  --muted: #66756b;
  --navy: #17324a;
  --green: #1d6b4f;
  --amber: #a86b15;
  --red: #b63c2f;
  --shadow: 0 24px 70px rgba(25, 46, 35, 0.10);
  --radius: 22px;
  --mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
  --display: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
  --sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; height: 100%; }
body {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(23,50,74,.16), transparent 26%), radial-gradient(circle at bottom right, rgba(29,107,79,.16), transparent 22%), linear-gradient(180deg, #f5f7f3 0%, #e8efe8 100%);
}
button, input, textarea, select { font: inherit; }
.layout-shell { height: 100vh; min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); overflow: hidden; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 22px; background: linear-gradient(180deg, rgba(19,43,64,.96), rgba(22,66,53,.96)); color: #f3f7f4; display: flex; flex-direction: column; gap: 22px; }
.brand-block h1 { margin: 6px 0 0; font-family: var(--display); font-size: 30px; line-height: 1.1; }
.brand-kicker { margin: 0; color: rgba(255,255,255,.72); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; }
.brand-copy { margin: 12px 0 0; color: rgba(255,255,255,.82); line-height: 1.65; }
.sidebar-nav { display: grid; gap: 10px; }
.nav-item { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: inherit; text-align: left; padding: 14px 16px; border-radius: 16px; cursor: pointer; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.14); transform: translateX(2px); }
.main-shell { height: 100vh; min-height: 0; padding: 28px; display: flex; flex-direction: column; overflow: hidden; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 24px; }
.page-kicker { margin: 0 0 8px; color: var(--green); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }
.page-header h2 { margin: 0; font-family: var(--display); font-size: clamp(28px, 3.2vw, 40px); line-height: 1.08; }
.status-chip { display: inline-flex; align-items: center; padding: 12px 16px; border-radius: 999px; background: rgba(23,50,74,.08); border: 1px solid var(--line); color: var(--navy); }
.view-section { display: none; }
.view-section.active { display: block; overflow: auto; }
.view-section[data-view="algorithms"].active { flex: 1; min-height: 0; height: auto; overflow: auto; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.summary-card, .panel-card, .entity-card { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.summary-card { padding: 18px 20px; border-radius: 20px; }
.summary-card span { display: block; color: var(--muted); }
.summary-card strong { display: block; margin-top: 10px; font-size: 28px; font-family: var(--display); }
.summary-card p { margin: 10px 0 0; color: var(--muted); }
.panel-grid, .module-grid { display: grid; gap: 20px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.single-column, .module-grid.single-column { grid-template-columns: 1fr; }
.panel-card { border-radius: var(--radius); padding: 20px; }
.panel-head { margin-bottom: 16px; }
.panel-head h3 { margin: 0; font-family: var(--display); font-size: 23px; }
.panel-head p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.panel-head-split { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid label, .panel-form label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.form-grid input, .form-grid textarea, .form-grid select, input, textarea, select { width: 100%; border: 1px solid rgba(26,50,42,.16); border-radius: 14px; background: rgba(255,255,255,.88); padding: 12px 14px; color: var(--text); }
textarea { resize: vertical; }
.form-grid textarea { min-height: 96px; font-family: var(--mono); line-height: 1.55; }
.checkbox-field { display: flex !important; align-items: center; gap: 10px !important; color: var(--text) !important; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(23,50,74,.10); background: rgba(255,255,255,.65); }
.checkbox-field input { width: auto; margin: 0; }
.checkbox-field span { flex: 1; color: var(--text) !important; }
.wide-field { grid-column: 1 / -1; }
.form-actions, .inline-actions, .table-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.primary-btn, .secondary-btn, .danger-btn { border: 0; border-radius: 14px; padding: 12px 16px; cursor: pointer; }
.primary-btn { background: linear-gradient(135deg, #17324a, #1d6b4f); color: #fff; }
.secondary-btn { background: rgba(23,50,74,.08); color: var(--navy); border: 1px solid rgba(23,50,74,.12); }
.danger-btn { background: rgba(182,60,47,.10); color: var(--red); border: 1px solid rgba(182,60,47,.18); }
.small-btn { padding: 9px 12px; font-size: 13px; }
.pill { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(23,50,74,.12); background: rgba(23,50,74,.06); color: var(--navy); font-size: 12px; }
.pill.ok { background: rgba(29,107,79,.10); color: var(--green); }
.pill.warn { background: rgba(168,107,21,.10); color: var(--amber); }
.pill.danger { background: rgba(182,60,47,.10); color: var(--red); }
.table-wrap { overflow: auto; border-radius: 18px; border: 1px solid rgba(23,50,74,.12); background: rgba(255,255,255,.62); }
.data-table { width: 100%; min-width: 820px; border-collapse: collapse; }
.compact-table { min-width: 640px; }
.data-table th { padding: 12px 14px; background: rgba(236,242,238,.96); color: var(--navy); text-align: left; font-size: 12px; border-bottom: 1px solid rgba(23,50,74,.12); }
.data-table td { padding: 12px 14px; vertical-align: top; border-bottom: 1px solid rgba(23,50,74,.08); line-height: 1.45; }
.empty-cell { color: var(--muted); text-align: center; padding: 28px 16px !important; }
.muted-inline { color: var(--muted); }
.mono-cell, code, pre { font-family: var(--mono); }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.pagination-summary { color: var(--muted); font-size: 13px; }
.pagination-controls { display: flex; gap: 8px; }
.mini-preview { display: block; width: 160px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid rgba(23,50,74,.10); background: rgba(23,50,74,.04); }
.preview-trigger { padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.param-block { margin-top: 4px; padding: 16px; border-radius: 18px; border: 1px solid rgba(23,50,74,.10); background: rgba(255,255,255,.64); }
.param-grid { display: grid; gap: 14px; }
.param-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.subhead { margin: 14px 0 12px; }
.subhead h4 { margin: 0; font-size: 18px; }
.helper-copy { margin: 0; color: var(--muted); line-height: 1.6; }
.toast { position: fixed; left: 50%; top: 24px; min-width: 260px; max-width: min(560px, calc(100vw - 48px)); padding: 14px 16px; border-radius: 16px; background: rgba(31,42,34,.94); color: #fff; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, -10px); transition: opacity .2s ease, transform .2s ease; z-index: 140; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: rgba(29,107,79,.96); }
.toast.danger { background: rgba(182,60,47,.96); }
.toast.warn { background: rgba(168,107,21,.96); }
body.drawer-open { overflow: hidden; }
.drawer-shell { position: fixed; inset: 0; z-index: 80; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(18,28,25,.42); backdrop-filter: blur(6px); }
.drawer-panel { position: absolute; top: 0; right: 0; width: min(760px, 100vw); height: 100vh; padding: 24px; overflow-y: auto; background: rgba(250,252,250,.98); border-left: 1px solid rgba(23,50,74,.12); box-shadow: -20px 0 60px rgba(21,37,51,.18); transform: translateX(100%); transition: transform .22s ease; }
.drawer-shell.active .drawer-panel { transform: translateX(0); }
.drawer-panel-wide { width: min(900px, 100vw); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.drawer-kicker { margin: 0 0 6px; color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.drawer-head h3 { margin: 0; font-family: var(--display); font-size: 26px; line-height: 1.1; }
.drawer-close { border: 1px solid rgba(23,50,74,.12); background: rgba(23,50,74,.06); color: var(--navy); border-radius: 999px; padding: 10px 14px; cursor: pointer; }
.drawer-form { padding-bottom: 32px; }
.preview-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; }
.preview-modal[hidden], .preview-modal-image[hidden], .preview-modal-loading[hidden], #algorithmListView[hidden], #algorithmEditorView[hidden] { display: none !important; }
.preview-modal-backdrop { position: absolute; inset: 0; background: rgba(12,19,27,.72); backdrop-filter: blur(6px); }
.preview-modal-panel { position: relative; z-index: 1; width: min(92vw, 1180px); max-height: 88vh; padding: 18px; border-radius: 24px; background: rgba(248,251,249,.98); border: 1px solid rgba(23,50,74,.12); box-shadow: 0 30px 70px rgba(0,0,0,.28); overflow: auto; }
.preview-modal-close { position: absolute; top: 16px; right: 16px; z-index: 2; border: 0; border-radius: 999px; padding: 10px 14px; background: rgba(23,50,74,.88); color: #fff; cursor: pointer; }
.preview-modal-stage { position: relative; display: grid; place-items: center; background: #000; border-radius: 18px; min-height: 50vh; overflow: hidden; }
.preview-modal-image { display: block; width: 100%; max-height: calc(88vh - 72px); object-fit: contain; border-radius: 18px; }
.preview-modal-caption { margin: 12px 4px 0; color: var(--muted); }
.realtime-alert-toast { position: fixed; left: 24px; top: 24px; z-index: 80; width: min(520px, calc(100vw - 48px)); display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 6px; background: rgba(255,255,255,.98); border-left: 5px solid var(--red); box-shadow: 0 16px 40px rgba(23,50,74,.18); cursor: pointer; opacity: 0; transform: translateX(-18px); transition: opacity .22s ease, transform .22s ease; }
.realtime-alert-toast.show { opacity: 1; transform: translateX(0); }
.realtime-alert-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(182,60,47,.12); color: var(--red); font-weight: 900; }
.realtime-alert-content { min-width: 0; flex: 1; }
.realtime-alert-title { color: var(--text); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.realtime-alert-meta { margin-top: 4px; display: flex; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.realtime-alert-close { border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; padding: 4px; }
.global-alert-panel { max-width: 760px; }
.global-alert-head h3 { margin: 4px 0 0; font-family: var(--display); font-size: 32px; color: var(--red); }
.global-alert-body { display: grid; grid-template-columns: minmax(260px, 1.2fr) minmax(220px, .8fr); gap: 18px; align-items: stretch; margin-top: 18px; }
.global-alert-image, .global-alert-no-image { width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; border: 1px solid rgba(23,50,74,.12); background: rgba(23,50,74,.06); object-fit: contain; }
.global-alert-no-image { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.global-alert-info { margin: 0; display: grid; gap: 12px; }
.global-alert-info div { padding: 14px; border-radius: 16px; background: rgba(255,255,255,.72); border: 1px solid rgba(23,50,74,.10); }
.global-alert-info dt { color: var(--muted); font-size: 13px; }
.global-alert-info dd { margin: 6px 0 0; font-weight: 700; color: var(--text); }
.global-alert-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.face-photo-grid, .face-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.face-upload-tile, .face-detail-card, .face-photo-card { border: 1px solid var(--line); border-radius: 14px; background: var(--paper-strong); overflow: hidden; }
.face-upload-tile { min-height: 120px; display: grid; place-items: center; cursor: pointer; color: var(--green); }
.face-upload-tile input { position: absolute; opacity: 0; }
.face-detail-panel { max-width: min(960px, 92vw); }

/* Pipeline designer */
.algorithm-designer-shell { display: grid; grid-template-columns: 300px minmax(620px, 1fr) 360px; gap: 18px; align-items: stretch; height: 100%; min-height: 0; }
.designer-sidebar, .designer-properties { max-height: none; overflow: auto; }
.designer-sidebar, .designer-canvas-card, .designer-right-column { min-height: 0; }
.designer-sidebar { display: flex; flex-direction: column; overflow: hidden; }
.component-palette { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; align-content: start; padding-right: 4px; }
.designer-canvas-card { display: flex; flex-direction: column; }
.designer-right-column { display: flex; flex-direction: column; gap: 18px; }
.designer-properties { flex: 1 1 0; min-height: 0; }
.designer-user-inputs { flex: 1 1 0; min-height: 0; overflow: auto; }
.designer-user-inputs h4 { margin: 0 0 10px; }
.design-list, .node-property-panel, .user-input-list { display: grid; gap: 10px; }
.design-list-item, .palette-item { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); color: var(--text); padding: 10px 12px; text-align: left; cursor: pointer; }
.palette-item-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.palette-item-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin: 3px 0; }
.palette-item-row em { flex: 0 0 auto; color: var(--green); font-style: normal; font-size: 12px; }
.component-info-btn { border: 1px solid rgba(23,50,74,.12); border-radius: 12px; background: rgba(23,50,74,.08); color: var(--navy); padding: 6px 8px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.node-info-btn { padding: 5px 7px; }
.graph-node header .component-info-btn { cursor: pointer; }
.component-detail-modal-panel { width: min(980px, 94vw); }
.component-detail-body { display: grid; gap: 14px; }
.component-detail-section { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: rgba(255,255,255,.62); }
.component-detail-section h4 { margin: 0 0 10px; }
.component-detail-section p { margin: 0; color: var(--muted); line-height: 1.7; }
.component-pin-list, .component-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.component-param-table { min-width: 760px; }
.design-list-item.active { border-color: rgba(29,107,79,.55); background: rgba(29,107,79,.10); }
.design-list-item strong, .design-list-item span, .palette-item span, .palette-item code { display: block; }
.design-list-item span, .palette-item code { margin-top: 4px; color: var(--muted); font-size: 12px; }
.palette-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-group { display: grid; gap: 8px; }
.palette-group h5 { margin: 12px 0 0; color: var(--green); }
.graph-canvas { position: relative; flex: 1; min-height: 520px; overflow: hidden; cursor: grab; user-select: none; border: 1px dashed rgba(29,107,79,.26); border-radius: 18px; background: linear-gradient(rgba(23,50,74,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(23,50,74,.04) 1px, transparent 1px), rgba(255,255,255,.58); background-size: 24px 24px; }
.graph-canvas.panning { cursor: grabbing; }
.graph-canvas.drag-over { border-color: rgba(29,107,79,.82); background-color: rgba(29,107,79,.08); }
.graph-links, .graph-nodes { position: absolute; inset: 0; min-width: 1400px; min-height: 900px; transform-origin: 0 0; }
.graph-links { pointer-events: auto; }
.graph-link-hit { fill: none; stroke: transparent; stroke-width: 18; pointer-events: stroke; }
.graph-link { fill: none; stroke: rgba(29,107,79,.78); stroke-width: 2.5; pointer-events: none; }
.graph-link-draft { stroke-dasharray: 8 6; stroke: rgba(168,107,21,.86); pointer-events: none; }
.graph-link-label { fill: var(--muted); font-size: 11px; pointer-events: none; }
.graph-link-delete { position: absolute; z-index: 5; pointer-events: auto; cursor: pointer; width: 24px; height: 24px; border: 0; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--red); font-size: 16px; font-weight: 700; line-height: 22px; padding: 0; touch-action: none; opacity: 0; transform: scale(.82); transition: opacity .12s ease, transform .12s ease; }
.graph-link-delete.visible, .graph-link-delete:hover { opacity: 1; transform: scale(1); }
.graph-node { position: absolute; width: 210px; border: 1px solid rgba(23,50,74,.18); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 0 14px 36px rgba(23,50,74,.12); overflow: hidden; }
.graph-node.selected { border-color: rgba(29,107,79,.8); box-shadow: 0 0 0 3px rgba(29,107,79,.14), 0 14px 36px rgba(23,50,74,.12); }
.graph-node header { padding: 10px 12px; background: rgba(23,50,74,.08); cursor: move; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.graph-node header strong, .graph-node header code { display: block; }
.graph-node header code { margin-top: 3px; color: var(--muted); font-size: 11px; }
.graph-node-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
.pin-column { display: grid; gap: 6px; }
.graph-pin { border: 1px solid rgba(29,107,79,.22); border-radius: 999px; background: rgba(29,107,79,.08); padding: 5px 8px; cursor: pointer; color: var(--text); font-size: 12px; }
.graph-pin.pending { color: var(--text); background: rgba(29,107,79,.18); border-color: rgba(29,107,79,.72); box-shadow: 0 0 0 3px rgba(29,107,79,.16); }
.graph-pin.connectable { border-color: rgba(29,107,79,.72); background: rgba(29,107,79,.16); }
.graph-pin.connect-blocked { opacity: .42; }
.graph-pin small { display: flex; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 10px; }
.pin-memory { display: inline-flex; align-items: center; border-radius: 999px; padding: 1px 5px; font-style: normal; font-size: 9px; line-height: 1.35; color: #fff; background: rgba(23,50,74,.62); }
.pin-memory.host { background: rgba(168,107,21,.82); }
.pin-memory.device { background: rgba(29,107,79,.82); }
.graph-pin.pending small { color: var(--muted); }
.out-pins .graph-pin { background: rgba(23,50,74,.08); border-color: rgba(23,50,74,.22); }
.designer-toolbar { align-items: center; gap: 12px; }
.designer-toolbar-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.designer-toolbar-title h3 { margin: 0; font-family: var(--display); font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.designer-toolbar-title span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.designer-toolbar p { margin: 0; color: var(--muted); font-size: 13px; }
.designer-bottom-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; margin-top: 14px; }
.designer-subpanel { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: rgba(255,255,255,.62); }
.user-input-subpanel { margin-top: 14px; }
.designer-subpanel h4, .subhead h4 { margin: 0 0 10px; }
.json-preview { max-height: 220px; overflow: auto; margin: 0; padding: 12px; border-radius: 12px; background: rgba(18,29,39,.92); color: #e8f5ee; font-size: 12px; }
.design-json-modal-panel { width: min(980px, 94vw); }
.design-run-modal-panel { width: min(980px, 94vw); }
#designRunInputFields { margin: 8px 0 0; max-height: 28vh; overflow: auto; }
#designRunInputFields:empty { display: none; margin: 0; }
.design-run-status-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 8px; }
.design-run-status-row .helper-copy { margin: 0; min-width: 0; flex: 1; }
.design-run-actions { margin-top: 0; flex: 0 0 auto; }
.design-run-log { margin-top: 14px; min-height: 320px; max-height: 52vh; white-space: pre-wrap; overflow: auto; }
.design-json-preview { max-height: 68vh; min-height: 360px; }
.property-field, .user-input-row { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.property-field input, .property-field select, .param-editor input, .param-editor select, .param-editor textarea, .user-input-row input, .roi-toolbar input, .roi-toolbar select { width: 100%; border: 1px solid rgba(26,50,42,.16); border-radius: 12px; background: rgba(255,255,255,.88); padding: 9px 10px; color: var(--text); }
.param-editor-list { display: grid; gap: 10px; margin-top: 12px; }
.param-editor { border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: rgba(255,255,255,.58); display: grid; gap: 8px; }
.param-editor.bound { border-color: rgba(168,107,21,.45); background: rgba(168,107,21,.08); }
.param-editor-head { display: flex; justify-content: space-between; gap: 8px; }
.param-editor-head code, .user-input-row code { color: var(--muted); font-size: 11px; }
.mini-check { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.model-picker { display: grid; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(23,50,74,.06); }
.roi-modal-panel { width: min(1100px, 96vw); }
.design-file-modal-panel { width: min(720px, 92vw); }
.roi-toolbar { display: grid; grid-template-columns: 1fr 220px auto; gap: 12px; align-items: end; margin-bottom: 12px; }
.roi-toolbar label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.roi-stage { position: relative; border-radius: 16px; overflow: hidden; background: #172a3a; }
.roi-image { display: none; }
.roi-canvas { display: block; width: 100%; height: auto; cursor: crosshair; }

@media (max-width: 1320px) { .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .algorithm-designer-shell { grid-template-columns: 260px minmax(520px, 1fr); height: auto; overflow: auto; } .designer-right-column { grid-column: 1 / -1; } .designer-properties { max-height: none; } }
@media (max-width: 1080px) { .layout-shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } .module-grid, .two-columns { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .main-shell { padding: 18px; } .summary-grid, .form-grid, .param-grid.two-up, .designer-bottom-grid, .roi-toolbar { grid-template-columns: 1fr; } .page-header, .entity-head, .panel-head-split { flex-direction: column; } .drawer-panel, .drawer-panel-wide { width: 100vw; padding: 18px; } }
