/* Planning instruments share the table's material. Data is an opaque cut;
   views and commands are operable pucks, while labels and grouping stay flat.
   Container queries follow each applet's allocated width, not the viewport. */
body.windowed-layout [data-win-id="room-matrix-hub"] { container: room-matrix / inline-size; }
body.windowed-layout [data-win-id="finish-board-hub"] { container: finish-board / inline-size; }
body.windowed-layout [data-win-id="schedule-hub"] { container: schedule / inline-size; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] { container: workbench / inline-size; }
body.windowed-layout :is([data-win-id="room-matrix-hub"], [data-win-id="finish-board-hub"], [data-win-id="schedule-hub"]) .dynamic-window-content {
  padding: 0;
  min-height: 0;
}

body.windowed-layout :is(.rm-root, .fb-root, .sched-root) {
  --text: var(--v10-ink);
  --muted: var(--v10-muted);
  --text-secondary: var(--v10-muted);
  --bg: var(--v10-surface);
  --bg-card: var(--v10-surface);
  --input-bg: var(--v10-surface);
  --input-border: var(--v10-line);
  --border: var(--v10-line);
  --border-subtle: color-mix(in srgb, var(--v10-line) 45%, transparent);
  --accent: var(--v10-ink);
  background: var(--v10-surface);
  color: var(--v10-ink);
  min-width: 0;
}
body.windowed-layout :is(.rm-header, .fb-header, .rm-filter-bar, .fb-filter-bar) {
  background: transparent;
  border: 0;
}
body.windowed-layout :is(.rm-header, .fb-header) {
  padding: 14px 14px 10px;
  gap: 10px 14px;
}
body.windowed-layout :is(.rm-header-icon, .fb-header-icon) { display: none; }
body.windowed-layout :is(.rm-title-main, .fb-title-main, .sched-title) {
  color: var(--v10-ink);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.015em;
}
body.windowed-layout :is(.rm-title-sub, .fb-title-sub, .sched-subtitle) {
  color: var(--v10-muted);
  font-size: 12px;
  line-height: 1.45;
}

/* Exact entry keeps a quiet recessed reading; commands retain tactile depth. */
body.windowed-layout :is(.rm-root, .fb-root, .sched-root) :is(input:not([type="checkbox"]), select, textarea) {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--v10-surface);
  box-shadow: var(--v10-cut);
  color: var(--v10-ink);
  font-size: 12px;
}
body.windowed-layout :is(.rm-view-toggle, .fb-view-toggle) {
  width: fit-content;
  max-width: 100%;
  padding: 3px;
  gap: 3px;
  border: 0;
  border-radius: 10px;
  background: var(--v10-surface);
  box-shadow: var(--v10-cut);
  overflow-x: auto;
  scrollbar-width: thin;
}
body.windowed-layout :is(.rm-toggle-btn, .fb-toggle-btn) {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--v10-muted);
  font-size: 12px;
}
body.windowed-layout :is(.rm-toggle-btn, .fb-toggle-btn).active {
  background: var(--v10-zone);
  box-shadow: var(--v10-puck);
  color: var(--v10-ink);
  font-weight: 650;
}
body.windowed-layout :is(.rm-icon-btn, .rm-menu-btn, .rm-export-btn, .rm-filter-clear, .fb-add-btn, .fb-filter-clear, .fb-rooms-back, .sched-actions .btn-secondary, .sched-empty-actions .btn-secondary, .sched-nextup-chip, .sched-add-row) {
  box-sizing: border-box;
  min-height: 32px;
  border: 0 !important;
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--v10-zone);
  color: var(--v10-ink) !important;
  box-shadow: var(--v10-puck);
  font-size: 12px;
  font-weight: 500;
}
body.windowed-layout :is(.rm-root, .fb-root, .sched-root) button:active {
  transform: translateY(1px);
}
body.windowed-layout :is(.rm-root, .fb-root, .sched-root) :is(button, input, select, textarea):focus-visible {
  outline: 2px solid var(--v10-focus);
  outline-offset: 2px;
}

/* Matrix is a ledger, with one continuous opaque data well and a flat inspector. */
body.windowed-layout .rm-header {
  grid-template-columns: minmax(140px, 1fr) auto;
}
body.windowed-layout .rm-header-actions { grid-column: 1 / -1; justify-content: flex-start; }
body.windowed-layout .rm-title-sub { max-width: 100%; }
body.windowed-layout .rm-metrics { gap: 8px; }
body.windowed-layout .rm-metric { padding: 3px 0; background: transparent; }
body.windowed-layout .rm-filter-bar { padding: 0 14px 12px; }
body.windowed-layout .rm-filter-compact { flex-wrap: wrap; gap: 7px; }
body.windowed-layout .rm-filter-compact > :is(input, select) { flex: 1 1 140px; min-width: 0; }
body.windowed-layout .rm-body { gap: 12px; padding: 0 14px 14px; }
body.windowed-layout .rm-table-panel {
  border: 0;
  border-radius: 10px;
  background: var(--v10-surface);
  box-shadow: var(--v10-cut);
}
body.windowed-layout .rm-table-wrap { padding: 2px; }
body.windowed-layout .rm-table th {
  height: 36px;
  background: var(--v10-surface);
  color: var(--v10-muted);
  border-right-color: transparent;
  font-weight: 600;
}
body.windowed-layout .rm-table td { border-right-color: transparent; }
body.windowed-layout .rm-group-row td {
  top: 36px;
  background: var(--v10-zone);
  color: var(--v10-muted);
}
body.windowed-layout :is(.rm-cell-code, .rm-cell-code strong, .rm-inspector-code, .rm-cell-room, .rm-inspector-title) { color: var(--v10-ink) !important; }
body.windowed-layout .rm-data-row.selected td,
body.windowed-layout .rm-root.wrap-text .rm-data-row.selected .rm-sticky-col {
  background: var(--v10-zone);
  box-shadow: none;
  border-color: var(--border-subtle);
}
body.windowed-layout .rm-inspector {
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 0;
}
body.windowed-layout .rm-inspector-code {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
body.windowed-layout .rm-inspector-section { border: 0; padding-top: 14px; }
body.windowed-layout .rm-inspector-field {
  min-height: 38px;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: var(--v10-surface);
  box-shadow: var(--v10-cut);
}
body.windowed-layout :is(.rm-source-pill, .rm-chip, .rm-field-review, .rm-popover-status) {
  background: transparent;
  border: 0;
  color: var(--v10-muted);
}
body.windowed-layout :is(.rm-header-popover, .rm-cell-popover) {
  background: var(--v10-glass);
  backdrop-filter: blur(18px) saturate(.65);
  border-color: var(--v10-line);
  border-radius: 12px;
  color: var(--v10-ink);
}

/* Finish samples keep their actual material; their labels live on readable paper. */
body.windowed-layout .fb-header { flex-wrap: wrap; }
body.windowed-layout .fb-header-title { min-width: 0; gap: 0; }
body.windowed-layout .fb-header-actions { flex-wrap: wrap; min-width: 0; gap: 8px; }
body.windowed-layout .fb-cat-pills { border: 0; padding: 0 14px 10px; gap: 10px; }
body.windowed-layout .fb-cat-pill,
body.windowed-layout.light-theme .fb-cat-pill {
  border: 0;
  background: transparent;
  color: var(--v10-muted);
  padding: 0;
  font-size: 11px;
}
body.windowed-layout .fb-cat-count { background: transparent; }
body.windowed-layout .fb-filter-bar { padding: 0 14px 12px; flex-wrap: wrap; }
body.windowed-layout .fb-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.windowed-layout :is(.fb-palette-view, .fb-rooms-view, .fb-schedule-view) { padding: 0 14px 18px; }
body.windowed-layout .fb-mosaic-grid { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(154px, 1fr)); }
body.windowed-layout .fb-mosaic-card,
body.windowed-layout .fb-needs-detail-grid .fb-mosaic-card {
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 12px;
  background: var(--v10-surface);
  box-shadow: var(--v10-cut);
  animation: none;
}
body.windowed-layout .fb-mosaic-card .fb-swatch-color { height: 136px; min-height: 136px; margin: 3px; border-radius: 9px; }
body.windowed-layout .fb-mosaic-card .fb-swatch-body {
  position: relative;
  padding: 6px 10px 10px;
  background: var(--v10-surface);
  pointer-events: auto;
}
body.windowed-layout .fb-mosaic-card :is(.fb-swatch-label, .fb-swatch-meta, .fb-spec-code) {
  color: var(--v10-ink);
  text-shadow: none;
}
body.windowed-layout .fb-mosaic-card .fb-swatch-label { font-size: 12px; line-height: 1.4; opacity: 1; }
body.windowed-layout .fb-mosaic-card .fb-swatch-meta { justify-content: space-between; color: var(--v10-muted); }
body.windowed-layout .fb-usage-dot { display: none; }
body.windowed-layout .fb-swatch-card:hover { border-color: transparent; box-shadow: var(--v10-cut); transform: none; }
body.windowed-layout .fb-swatch-card:focus-within .fb-swatch-actions { opacity: 1; }
body.windowed-layout .fb-action-btn { width: 32px; height: 32px; border-radius: 7px; }
body.windowed-layout .fb-section-head {
  width: 100%;
  color: var(--v10-ink);
  text-align: left;
  font: inherit;
  border: 0;
  border-radius: 10px;
  background: transparent;
}
body.windowed-layout .fb-section-head.clickable { min-height: 56px; cursor: pointer; }
body.windowed-layout .fb-section-head.clickable:hover { background: var(--v10-zone); }
body.windowed-layout .fb-room-section { border: 0; border-radius: 12px; background: var(--v10-surface); box-shadow: var(--v10-cut); animation: none; }
body.windowed-layout :is(.fb-section-progress, .fb-section-progress.complete, .fb-section-progress.empty) { color: var(--v10-muted); background: transparent; border: 0; }
body.windowed-layout .fb-schedule-table-wrap { border: 0; border-radius: 10px; box-shadow: var(--v10-cut); background: var(--v10-surface); }

/* Schedule preserves the backward date cascade and exact date entry.
   The chain is expressed through order and labels, not colored leading rails. */
body.windowed-layout .sched-root { padding: 14px; gap: 14px; }
body.windowed-layout .sched-actions { gap: 8px; }
body.windowed-layout .sched-empty-state { border: 0; border-radius: 12px; background: transparent; box-shadow: none; padding: 26px 12px; }
body.windowed-layout .sched-empty-state b { color: var(--v10-ink); }
body.windowed-layout .sched-phase-card { border: 0; border-radius: 12px; padding: 12px; background: var(--v10-surface); box-shadow: var(--v10-cut); }
body.windowed-layout .sched-phase-card.is-past { opacity: 1; }
body.windowed-layout .sched-phase-head { flex-wrap: wrap; gap: 4px 10px; }
body.windowed-layout .sched-phase-status { white-space: normal; }
body.windowed-layout .sched-chain::before { display: none; }
body.windowed-layout .sched-row { grid-template-columns: 32px minmax(0, 1fr) minmax(120px, auto); gap: 10px; padding: 9px 0; }
body.windowed-layout .sched-row :is(.sched-row-gate-label, .sched-row-flow b) { color: var(--v10-ink); }
body.windowed-layout .sched-node { display: none; }
body.windowed-layout :is(.sched-row-qc, .sched-row-due) .sched-row-main { grid-column: 2; }
body.windowed-layout .sched-row .milestone-done-toggle {
  width: 30px;
  height: 30px;
  margin: 0;
  border: 0;
  border-radius: 9px;
  background: var(--v10-zone);
  color: var(--v10-ink);
  box-shadow: var(--v10-puck);
}
body.windowed-layout .sched-row .milestone-done-toggle.is-done { background: var(--v10-surface); box-shadow: var(--v10-cut); }
body.windowed-layout .sched-row-edit-target {
  min-height: 48px;
  min-width: 0;
  margin: 0;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: var(--v10-surface);
  box-shadow: var(--v10-cut);
  white-space: normal;
}
body.windowed-layout .sched-row-edit-target:hover { border: 0; background: var(--v10-zone); }
body.windowed-layout .sched-row-date .sched-relative-rule { color: var(--v10-ink); font-size: 12px; max-width: 180px; }
body.windowed-layout .sched-edit-cue { color: var(--v10-muted); opacity: 1; text-transform: none; letter-spacing: 0; font-size: 11px; }
body.windowed-layout .sched-horizon { border: 0; background: var(--v10-surface); box-shadow: var(--v10-cut); border-radius: 10px; }
body.windowed-layout .sched-horizon-track { height: 44px; margin-inline: 12px; }
body.windowed-layout .sched-horizon-track :is(.sched-h-dot, .sched-h-due) {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
  color: var(--v10-ink);
}
body.windowed-layout .sched-horizon-track :is(.sched-h-dot, .sched-h-due)::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}
body.windowed-layout .sched-horizon-track .sched-h-due::after { border-radius: 2px; transform: translate(-50%, -50%) rotate(45deg); }
body.windowed-layout .sched-horizon-track :is(.sched-h-dot, .sched-h-due):hover { transform: translate(-50%, -50%); }
body.windowed-layout .sched-h-today { background: var(--v10-line); }
body.windowed-layout .sched-h-qc { background: var(--v10-muted); }
body.windowed-layout :is(.sched-nextup-chip em, .sched-nextup-chip.is-due b, .sched-countdown.is-ok, .sched-countdown.is-done) { color: var(--v10-muted); }
body.windowed-layout .sched-countdown.is-soon { color: var(--v10-ink); }
body.windowed-layout .sched-h-label { color: var(--v10-ink); }
body.windowed-layout .sched-card-focus { outline: 0; }
body.windowed-layout .sched-add-row { margin: 8px 0 0 42px; }

/* Workbench retains its proven room-hand source and drawing gestures. */
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-slimbar, .adj-graph-head, .adj-layout-head, .adj-ledger-head) {
  border-bottom: 0;
  background: transparent;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-graph-panel, .adj-layout-panel, .adj-ledger-panel, .adj-bubble-panel) {
  border: 0;
  border-radius: 12px;
  background: var(--v10-surface);
  box-shadow: none;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-table[data-presentation="single"] .adj-table-main {
  min-height: 0;
  overflow: auto;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-body {
  background: var(--v10-surface);
  border-radius: 10px;
  box-shadow: var(--v10-cut);
  padding: 8px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-panel { container: adjacency-ledger / inline-size; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-rows { border: 0; background: transparent; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-area-heading {
  background: var(--v10-zone);
  border: 0;
  box-shadow: none;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-area-heading:not(:first-child) { margin-top: 8px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-room.is-selected {
  background: var(--v10-zone);
  box-shadow: none;
  border-color: var(--v10-line);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-room.is-selected .adj-ledger-mainline { background: transparent; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-ledger-room-name strong, .adj-ledger-area-heading strong, .adj-ledger-target strong) { font-size: 12px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-ledger-room-name span, .adj-ledger-area-heading small, .adj-ledger-area-heading b, .adj-ledger-target span) { font-size: 10px; letter-spacing: 0; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-ledger-subline select, .adj-ledger-note) {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  background: var(--v10-surface);
  color: var(--v10-ink);
  box-shadow: var(--v10-cut);
  font-size: 11px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-ledger-subline > .adj-delete, .adj-ledger-add > button, .adj-ledger-route-toggle, .adj-ledger-activate) {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  background: var(--v10-zone);
  color: var(--v10-ink);
  box-shadow: var(--v10-puck);
  font-size: 11px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-ledger-subline.is-circulation, .adj-ledger-subline.is-derived) { background: transparent; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch { border: 0; border-radius: 10px; box-shadow: var(--v10-cut); }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch button { min-height: 32px; border: 0; border-radius: 7px; font-size: 12px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch button > i { display: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch button[aria-current="true"] { background: var(--v10-zone); box-shadow: var(--v10-puck); }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-selectionbar { border-color: var(--v10-line); background: var(--v10-zone); box-shadow: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-selectionbar > i { display: none; }

/* Settings belongs to the command strip, rather than a second tinted header.
   Its original button and lifecycle popover retain their native behavior. */
body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-window-shell { position: relative; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle-host {
  position: absolute;
  z-index: 5;
  top: 6px;
  right: 8px;
  padding: 0;
  background: transparent;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher {
  min-height: 32px;
  height: 32px;
  gap: 5px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: var(--v10-surface);
  color: var(--v10-ink);
  box-shadow: var(--v10-puck);
  font-size: 11px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher-icon { color: var(--v10-muted); }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher-state {
  padding: 0;
  background: transparent;
  color: var(--v10-muted);
  font-size: 10px;
  font-weight: 500;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher-phase { display: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher:focus-visible {
  outline: 2px solid var(--v10-ink);
  outline-offset: 2px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-root.adj-shell { gap: 5px; padding: 6px 8px 8px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slimbar {
  min-height: 32px;
  gap: 4px;
  padding: 0 184px 0 0;
  align-content: start;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-workflow-label, .adj-slim-actions > button > small) { display: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch { padding: 2px; gap: 1px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch button { padding-inline: 7px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slim-actions { gap: 1px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-slim-actions button > i, .adj-spatial-precedence > i),
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-count::before,
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-count::after { display: none; }

/* The drawing fits the panel. Long ledgers retain their own scroll cut. */
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-table[data-view="workspace"] .adj-table-main {
  min-height: 0;
  overflow: hidden;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-table .adj-workspace-deck {
  min-height: 0;
  overflow: hidden;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-graph-canvas-wrap, .adj-plan-preview, .adj-block-canvas-stage) { min-height: 0 !important; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-table[data-view="workspace"] .adj-graph-head {
  height: 32px;
  min-height: 32px;
  padding: 0 6px;
  gap: 5px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-table[data-laytab="assembly"] .adj-layout-head { display: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-layout-body { padding: 0; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  inset: 6px auto auto 6px;
  width: max-content;
  max-width: calc(100% - 12px);
  padding: 3px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome > .adj-block-spatial-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome :is(.adj-block-plan-primary-controls, .adj-block-plan-reading-controls) {
  width: auto;
  margin: 0;
  gap: 4px;
  flex-wrap: nowrap;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome .adj-initial-layout-status {
  top: calc(100% + 4px);
  max-width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 3px 7px;
  border-color: var(--v10-line);
  background: var(--v10-surface);
  color: var(--v10-muted);
  box-shadow: none;
  font-size: 10px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-table[data-density="compact"] .adj-block-view-cluster[data-has-orbit="false"] .adj-block-orbit-toggle { display: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-table[data-density="compact"] .adj-cg-head.is-summary span {
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

@media (pointer: coarse), (max-width: 768px) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher {
    min-height: 44px;
    height: 44px;
    width: 44px;
    padding: 0;
    justify-content: center;
  }
  /* Keep the complete accessible name, including review state, on the
     original native button while the narrow strip uses its settings glyph. */
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher > span:not(.arrange-planner-lifecycle__launcher-icon) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher-icon { font-size: 17px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slimbar {
    min-height: 44px !important;
    margin-right: 52px;
    padding-right: 0;
    grid-auto-columns: max-content;
    gap: 4px;
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slimbar .adj-view-switch {
    min-height: 44px;
    width: auto;
    max-width: none;
    padding: 0;
    overflow: visible;
    order: -1;
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slimbar :is(.adj-command-button, .adj-slim-actions button, .adj-guide-button) { min-height: 44px; height: 44px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-table[data-view="workspace"] .adj-graph-head { height: 44px; min-height: 44px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome { padding: 2px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome :is(.adj-block-view-rail, .adj-block-selector > summary) { height: 44px; min-height: 44px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-view-rail > i { height: 40px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-selector > summary { padding-inline: 6px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-workspace-current { gap: 3px; }
}

/* Two independently selected records share one instrument. Their felt
   carriers rest in a shallow bed; each record retains one reading cut. */
body.windowed-layout [data-win-id="compare"] > .window-body { container: comparison / inline-size; }
body.windowed-layout [data-win-id="compare"] #compare-view { padding: 10px 12px 12px; }
body.windowed-layout [data-win-id="compare"] .compare-workspace {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px;
  padding: 5px;
  border-radius: 14px;
  background: var(--applet-cut, var(--v10-surface));
  box-shadow: var(--workspace-cut);
  align-items: stretch;
}
body.windowed-layout [data-win-id="compare"] .compare-column {
  min-height: 0;
  padding: 8px;
  border: 0;
  border-radius: 11px;
  background-color: var(--applet-material, var(--v10-surface));
  background-image: var(--applet-felt-grain, none);
  box-shadow: var(--workspace-card-edge), var(--workspace-pillow-edge);
}
body.windowed-layout [data-win-id="compare"] .compare-column > h3 {
  margin-bottom: 8px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--applet-muted, var(--v10-muted));
}
body.windowed-layout [data-win-id="compare"] .compare-search { margin-bottom: 10px; }
body.windowed-layout [data-win-id="compare"] .compare-room-display {
  margin-top: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-width: 0;
}
body.windowed-layout [data-win-id="compare"] .compare-room-display > div:first-child {
  gap: 10px;
  margin-bottom: 8px !important;
}
body.windowed-layout [data-win-id="compare"] .compare-room-display h4 {
  margin-bottom: 8px;
  color: var(--applet-ink, var(--v10-ink));
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
body.windowed-layout [data-win-id="compare"] .compare-room-display .detail-row {
  display: grid;
  grid-template-columns: minmax(70px, .8fr) minmax(0, 1.2fr);
  gap: 6px 12px;
  padding: 7px 0;
  font-size: 12px;
  line-height: 1.45;
  border-bottom-color: var(--applet-edge, var(--v10-line));
}
body.windowed-layout [data-win-id="compare"] :is(.detail-label, .detail-value) {
  width: auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
body.windowed-layout [data-win-id="compare"] .detail-label { color: var(--applet-muted, var(--v10-muted)); }
body.windowed-layout [data-win-id="compare"] .detail-value { color: var(--applet-ink, var(--v10-ink)); }
body.windowed-layout [data-win-id="compare"] :is(#compare-left-display, #compare-right-display) > p {
  margin: 0;
  padding: 16px 0 !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  line-height: 1.5;
}
body.windowed-layout [data-win-id="compare"] .compare-column.drag-over :is(#compare-left-display, #compare-right-display) {
  outline: 2px solid var(--applet-ink, var(--v10-ink));
  outline-offset: 3px;
  border-radius: 8px;
}
body.windowed-layout [data-win-id="compare"] .compare-room-display > div[style*="background: var(--bg-secondary)"] {
  padding: 8px 0 !important;
  margin-bottom: 0 !important;
  border-bottom: 1px solid var(--applet-edge, var(--v10-line));
  border-radius: 0 !important;
  background: transparent !important;
}
@container comparison (max-width: 560px) {
  body.windowed-layout [data-win-id="compare"] .compare-workspace { grid-template-columns: minmax(0, 1fr) !important; gap: 16px; }
}

/* MEP keeps a fixed operating shelf and gives the remaining allocation to
   the schedule or network. Exact engineering fields retain their native
   controls; computed readings never acquire another control frame. */
body.windowed-layout [data-win-id="mep-calculator"] > .window-body {
  container: engineering / inline-size;
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}
body.windowed-layout [data-win-id="mep-calculator"] .dynamic-window-content {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  max-height: 100%;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden !important;
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-app {
  height: 100%;
  flex: 1 1 0;
  min-height: 0;
  padding: 8px 12px 10px;
  gap: 8px;
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-top-row {
  display: flex;
  padding: 0;
  gap: 6px 12px;
  align-items: center;
}
/* The retained window title already includes this exact project name. */
body.windowed-layout [data-win-id="mep-calculator"] .mep-project-name { display: none; }
body.windowed-layout [data-win-id="mep-calculator"] :is(.mep-disc-filters, .mep-content-tabs) {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  gap: 3px;
  width: auto;
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-content-tabs { margin-top: 6px; }
body.windowed-layout [data-win-id="mep-calculator"] :is(.mep-disc-filter, .mep-content-tab) {
  min-height: 32px;
  padding: 6px 10px;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  color: var(--applet-muted, var(--v10-muted));
}
body.windowed-layout [data-win-id="mep-calculator"] :is(.mep-disc-filter, .mep-content-tab).active {
  color: var(--applet-ink, var(--v10-ink));
  background: var(--applet-raised, var(--v10-zone));
  box-shadow: var(--v10-puck);
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-top-actions { gap: 8px; margin-left: auto; flex-wrap: wrap; }
body.windowed-layout [data-win-id="mep-calculator"] .mep-assumption-panel {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-assumption-panel > summary {
  padding: 7px 0;
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--applet-muted, var(--v10-muted));
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-assumption-panel[open] { max-height: 38%; overflow: auto; }
body.windowed-layout [data-win-id="mep-calculator"] .mep-assumptions {
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
/* Model Link's headings group connection, discovery and mapping on one body.
   Only the actual operations and precise fields have physical depth. */
body.windowed-layout [data-win-id="mep-calculator"] :is(.mep-ml-section, .mep-ml-section-head) {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-ml-section-head {
  padding: 8px 0;
  border-bottom: 1px solid var(--applet-edge, var(--v10-line));
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-ml-section-body { padding: 8px 0; }
body.windowed-layout [data-win-id="mep-calculator"] .mep-ml-scan-btn {
  border: 0;
  border-radius: 7px;
  background: var(--applet-raised, var(--v10-zone));
  box-shadow: var(--v10-puck);
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-ml-scan-btn.primary {
  background: var(--applet-ink, var(--v10-ink));
  color: var(--applet-material, var(--v10-surface));
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-ml-scan-btn.primary :is(strong, small) { color: inherit; }
body.windowed-layout [data-win-id="mep-calculator"] .mep-ml-scan-btn:not(:disabled):active {
  box-shadow: var(--v10-cut);
  transform: translateY(1px);
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-content {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  padding: 0;
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-content:has(> .mep-live-schedule) { overflow: hidden; }
body.windowed-layout [data-win-id="mep-calculator"] .mep-schedule-toolbar { padding: 0 0 7px; gap: 7px; }
body.windowed-layout [data-win-id="mep-calculator"] .mep-search { flex: 1 1 120px; min-width: 120px; width: auto; }
body.windowed-layout [data-win-id="mep-calculator"] .mep-live-schedule {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  border-radius: 8px;
  background: var(--applet-cut, var(--v10-surface));
  scrollbar-width: auto;
  scrollbar-color: auto;
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-live-schedule::-webkit-scrollbar { width: 10px; height: 10px; }
body.windowed-layout [data-win-id="mep-calculator"] .mep-live-schedule::-webkit-scrollbar-track { background: var(--applet-cut); }
body.windowed-layout [data-win-id="mep-calculator"] .mep-live-schedule::-webkit-scrollbar-thumb {
  border: 2px solid var(--applet-cut);
  border-radius: 8px;
  background: var(--applet-muted);
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-ls-table { font-size: 12px; }
body.windowed-layout [data-win-id="mep-calculator"] .mep-ls-table :is(th, td) { border-bottom-color: var(--applet-edge, var(--v10-line)); }
body.windowed-layout [data-win-id="mep-calculator"] .mep-ls-table thead th {
  background: var(--applet-cut, var(--v10-surface));
  color: var(--applet-muted, var(--v10-muted));
  font-size: 11px;
  font-weight: 500;
  padding-block: 8px;
  border-top: 0;
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-ls-footer {
  background: var(--applet-cut, var(--v10-surface));
  border-top: 1px solid var(--applet-edge, var(--v10-line));
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-ls-table :is(.mep-ls-cell.readonly, .mep-col-170) {
  color: var(--applet-muted, var(--v10-muted));
  background: transparent;
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-network-layout {
  flex: 1 0 230px;
  min-height: 230px;
  max-height: none;
  background: var(--applet-cut, var(--v10-surface));
  border-radius: 8px;
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-network-all-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
}
body.windowed-layout [data-win-id="mep-calculator"] :is(.mep-net-col-src, .mep-net-col-sys) { flex-basis: 170px; }
body.windowed-layout [data-win-id="mep-calculator"] .mep-net-col { padding: 10px; min-width: 0; }
body.windowed-layout [data-win-id="mep-calculator"] :is(.mep-node-source, .mep-node-sys, .mep-room-endpoint) {
  border: 0;
  border-radius: 5px;
  background: transparent;
  box-shadow: none;
  color: var(--applet-ink, var(--v10-ink));
}
body.windowed-layout [data-win-id="mep-calculator"] .mep-node-sys.selected {
  background: var(--applet-raised, var(--v10-zone));
  box-shadow: var(--v10-puck);
}
body.windowed-layout [data-win-id="mep-calculator"] :is(.mep-node-metric, .mep-re-metric, .mep-node-flag, .mep-tier-label) {
  color: var(--applet-muted, var(--v10-muted));
}
body.windowed-layout [data-win-id="mep-calculator"] :is(.mep-ls-cell.check-pass, .mep-ls-cell.check-fail, .mep-status-pill, .mep-flag-badge) {
  color: var(--applet-ink, var(--v10-ink));
  background: transparent;
}
body.windowed-layout [data-win-id="mep-calculator"] :is(.mep-family-disc, .mep-rd) { display: none; }
body.windowed-layout [data-win-id="mep-calculator"] .mep-note { flex: 0 0 auto; margin: 0; font-size: 10px; line-height: 1.45; }
@container engineering (max-width: 640px) {
  body.windowed-layout [data-win-id="mep-calculator"] .mep-top-row { align-items: flex-start; }
  body.windowed-layout [data-win-id="mep-calculator"] .mep-disc-filters { flex-basis: 100%; }
  body.windowed-layout [data-win-id="mep-calculator"] .mep-top-actions { margin-left: 0; }
  body.windowed-layout [data-win-id="mep-calculator"] .mep-network-layout { flex-direction: column; flex: 0 0 auto; }
  body.windowed-layout [data-win-id="mep-calculator"] .mep-net-col { flex: 0 0 auto; min-height: 0; width: auto; }
  body.windowed-layout [data-win-id="mep-calculator"] .mep-net-nodes { overflow: visible; flex: 0 0 auto; }
  body.windowed-layout [data-win-id="mep-calculator"] .mep-net-arrow { display: none; }
}
@media (pointer: coarse) {
  body.windowed-layout [data-win-id="mep-calculator"] :is(.mep-disc-filter, .mep-content-tab, .mep-assumption-panel > summary, .mep-room-endpoint, .mep-node-sys) { min-height: 44px; }
  body.windowed-layout [data-win-id="mep-calculator"] .mep-search { flex-basis: 100%; }
}

@container room-matrix (max-width: 720px) {
  /* Refresh renders directly into the native body, replacing its initial
     dynamic wrapper. Allocation must therefore belong to the stable host. */
  body.windowed-layout [data-win-id="room-matrix-hub"] > .window-body { container: matrix-reading / size; }
  body.windowed-layout .rm-root { min-height: 560px; }
  body.windowed-layout .rm-header { grid-template-columns: 1fr; }
  body.windowed-layout .rm-header-actions { gap: 7px; }
  body.windowed-layout .rm-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.windowed-layout .rm-metric { display: grid; gap: 1px; }
  body.windowed-layout .rm-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(150px, 1fr) auto; overflow-y: auto; }
  body.windowed-layout .rm-root.inspector-closed .rm-body { grid-template-rows: minmax(0, 1fr); }
  body.windowed-layout .rm-inspector { max-height: 220px; overflow: auto; padding-top: 8px; }
  body.windowed-layout .rm-view-toggle { width: 100%; }
}
@container finish-board (max-width: 460px) {
  body.windowed-layout .fb-root { min-height: 520px; }
  body.windowed-layout .fb-header-actions { width: 100%; }
  body.windowed-layout .fb-view-toggle { flex: 1 1 100%; width: 100%; flex-wrap: nowrap; }
  body.windowed-layout .fb-toggle-btn { padding-inline: 8px; }
  body.windowed-layout .fb-filter-bar { flex-direction: row; }
  body.windowed-layout .fb-filter-fields { flex-basis: 100%; }
  body.windowed-layout .fb-mosaic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.windowed-layout .fb-rooms-grid { grid-template-columns: minmax(0, 1fr); }
}
@container room-matrix (max-width: 480px) {
  /* Keep the room code reachable while the wider columns scroll beneath it. */
  body.windowed-layout .rm-table td.rm-sticky-col:not(.rm-cell-code) { position: static; }
  body.windowed-layout .rm-table th.rm-sticky-col:not([title="Code"]) { left: auto !important; }
  body.windowed-layout .rm-table :is(.rm-cell-code, th[title="Code"]) { left: 0 !important; }
  body.windowed-layout .rm-table .rm-cell-code { z-index: 5; }
  body.windowed-layout .rm-table th[title="Code"] { z-index: 8; }
}
@container schedule (max-width: 480px) {
  body.windowed-layout .sched-row { grid-template-columns: 32px minmax(0, 1fr); }
  body.windowed-layout .sched-row-date { grid-column: 2; align-items: flex-start; text-align: left; }
  body.windowed-layout .sched-row-date .sched-relative-rule { max-width: none; text-align: left; }
  body.windowed-layout .sched-empty-actions { flex-wrap: wrap; }
  body.windowed-layout .sched-horizon-labels { display: none; }
}
@container workbench (max-width: 480px) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slimbar { padding-inline: 8px; gap: 7px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch { width: 100%; }
}
@container workbench (max-width: 380px) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome .adj-workspace-tools > summary {
    padding-inline: 6px;
    gap: 4px;
  }
  /* Per-floor counts stay in the floor choice. The small live summary yields
     to the dimensional view, Tools and current reading on a narrow card. */
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-workspace-current > small { display: none; }
}
@container adjacency-ledger (max-width: 620px) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-subline {
    grid-template-columns: minmax(0, 1fr) minmax(84px, .8fr) 32px;
    gap: 6px;
    padding-top: 8px;
    padding-bottom: 10px;
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-subline :is(.adj-force-select, .adj-ledger-note, .adj-ledger-source, [data-ledger-force]) { display: block; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-target { grid-column: 1 / 3; grid-row: 1; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-ledger-relation, [data-ledger-relationship], .adj-ledger-derived) { grid-column: 1; grid-row: 2; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-force-select, [data-ledger-force], .adj-ledger-route-toggle) { grid-column: 2; grid-row: 2; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-ledger-reading, .adj-ledger-source) { grid-column: 1 / -1; grid-row: 3; font-size: 11px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-note { grid-column: 1 / -1; grid-row: 4; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-subline > .adj-delete { grid-column: 3; grid-row: 1; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-add > [data-ledger-target] { grid-column: 1 / 3; grid-row: 1; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-add > button { grid-column: 3; grid-row: 1; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-subline.is-held .adj-ledger-target { grid-column: 1 / -1; }
}
@media (pointer: coarse), (max-width: 768px) {
  body.windowed-layout :is(.rm-root, .fb-root, .sched-root) :is(input:not([type="checkbox"]), select, .rm-toggle-btn, .fb-toggle-btn, .rm-icon-btn, .rm-menu-btn, .rm-export-btn, .rm-filter-clear, .fb-add-btn, .fb-filter-clear, .fb-rooms-back, .sched-actions .btn-secondary, .sched-empty-actions .btn-secondary, .sched-nextup-chip, .sched-add-row) { min-height: 44px; }
  body.windowed-layout .fb-action-btn { width: 44px; height: 44px; }
  body.windowed-layout .fb-swatch-actions { opacity: 1; }
  body.windowed-layout .sched-row .milestone-done-toggle { width: 44px; height: 44px; }
  body.windowed-layout .sched-row { grid-template-columns: 44px minmax(0, 1fr) minmax(120px, auto); }
  body.windowed-layout .rm-inspector-field { min-height: 44px; }
  body.windowed-layout .rm-body { min-height: 300px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-view-switch button, .adj-ledger-select, .adj-ledger-chevron, .adj-ledger-route-toggle, .adj-ledger-activate, .adj-ledger-subline select, .adj-ledger-note, .adj-ledger-subline > .adj-delete, .adj-ledger-add > button) { min-height: 44px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-mainline { grid-template-columns: 44px minmax(0, 1fr) 26px 44px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-subline { padding-left: 44px; }
  @container adjacency-ledger (max-width: 620px) {
    body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-subline { grid-template-columns: minmax(0, 1fr) minmax(84px, .8fr) 44px; }
    body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-ledger-subline > .adj-delete, .adj-ledger-add > button) { width: 44px; min-width: 44px; }
  }
  @container schedule (max-width: 480px) {
    body.windowed-layout .sched-row { grid-template-columns: 44px minmax(0, 1fr); }
  }
}
@media (prefers-reduced-motion: reduce) {
  body.windowed-layout :is(.rm-root, .fb-root, .sched-root) *,
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch button { transition: none; animation: none; }
}

/* Function-led interiors: a spatial stage and a comparison sheet are different
   instruments. Their material is continuous with the hand-held card. Depth
   belongs to drawing/entry cuts and actual controls, never every text block. */
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-root {
  --adj-ink: var(--applet-ink, var(--v10-ink));
  --adj-muted: var(--applet-muted, var(--v10-muted));
  --adj-line: var(--applet-edge, var(--v10-line));
  --adj-workspace-base: var(--applet-material, var(--v10-surface));
  --surface: var(--applet-material, var(--v10-surface));
  background: var(--applet-material, var(--v10-surface));
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-workspace-deck, .adj-graph-panel, .adj-layout-panel, .adj-ledger-panel, .adj-bubble-panel, .adj-parti-workspace) {
  background: var(--applet-material, var(--v10-surface));
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-graph-canvas-wrap, .adj-block-canvas-stage, .adj-plan-preview) {
  background: var(--applet-cut, var(--v10-surface)) !important;
  border-radius: 9px;
  box-shadow: var(--v10-cut);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch {
  background: var(--applet-cut, var(--v10-surface));
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch button.is-active {
  background: var(--applet-raised, var(--v10-zone));
  box-shadow: var(--v10-puck);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-command-button, .adj-slim-actions button, .adj-guide-button) {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--adj-muted);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-nlbar-toggle {
  background: var(--applet-raised, var(--v10-zone));
  box-shadow: var(--v10-puck);
  color: var(--adj-ink);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-nl-park {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 28px;
  min-height: 28px;
  margin-left: 4px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: var(--applet-raised);
  color: var(--adj-ink);
  box-shadow: var(--workspace-puck);
  font: 18px/1 var(--font-sans, system-ui);
  cursor: pointer;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-nl-park:focus-visible { outline: 2px solid var(--adj-ink); outline-offset: 2px; }
@media (pointer: coarse) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-nl-park { width: 44px; min-height: 44px; }
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-head { gap: 8px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-cg-head { flex: 1 1 auto; min-width: 0; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-fit {
  flex: 0 0 auto;
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  padding: 5px 10px;
  color: var(--adj-ink);
  background: var(--applet-raised, var(--v10-zone));
  box-shadow: var(--v10-puck);
  font: 600 12px/1.3 var(--font-sans, system-ui);
  cursor: pointer;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-fit {
  box-sizing: border-box;
  flex: 0 0 auto;
  min-width: 32px;
  min-height: 28px;
  padding: 4px 7px;
  border: 0;
  border-radius: 7px;
  color: var(--adj-ink);
  background: var(--applet-raised);
  box-shadow: var(--workspace-puck);
  font: 600 11px/1.4 var(--font-sans, system-ui);
  cursor: pointer;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-fit:focus-visible { outline: 2px solid var(--adj-ink); outline-offset: 2px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-reading-status {
  position: absolute;
  top: calc(100% + 3px);
  left: 8px;
  max-width: calc(100% - 16px);
  color: var(--applet-ink);
  font: 11px/1.4 var(--font-sans, system-ui);
  pointer-events: none;
}
/* The native deck fits the available cut. Room identities keep their width;
   an adjacent deal and inline Find reach large programs without a scroll strip. */
body.windowed-layout [data-win-id="adjacency-planner-hub"] #adj-graph-hand { top: 0; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 30px !important;
  container: room-hand / inline-size;
  --room-hand-lift: 0px;
  pointer-events: none;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-controls {
  position: absolute;
  z-index: 10010;
  inset: auto 8px calc(100% + 8px);
  right: auto;
  width: max-content;
  max-width: calc(100% - 16px);
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0;
  background: none;
  pointer-events: none;
  transform: translateY(calc(-1 * var(--room-hand-lift)));
  transition: transform 260ms cubic-bezier(.16,.96,.28,1);
}
/* A short transparent bridge preserves the pointer route across the gap. */
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-controls::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 10px;
  pointer-events: auto;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-controls button {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 28px;
  min-height: 28px;
  height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--workspace-field) 90%, transparent);
  color: var(--workspace-plane-ink);
  box-shadow: var(--workspace-puck);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  opacity: 1;
  transform: none;
  font: 500 12px/1.35 var(--font-sans, system-ui);
  cursor: pointer;
  touch-action: manipulation;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-controls button:disabled {
  box-shadow: var(--workspace-cut);
  color: var(--workspace-plane-muted);
  cursor: default;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-more svg {
  width: 16px; height: 16px; min-height: 0; max-width: 16px; max-height: 16px; flex: 0 0 16px; pointer-events: none;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-controls [data-room-hand-range] {
  flex: 0 1 auto;
  min-width: 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--workspace-field) 90%, transparent);
  color: var(--workspace-plane-ink);
  font: 11px/1.4 var(--font-sans, system-ui);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand.has-single-deal :is(.adj-room-hand-prev, .adj-room-hand-next, [data-room-hand-range]) { display: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-controls [data-room-hand-filter-summary] {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 0;
  max-height: 16px;
  overflow: hidden;
  color: var(--workspace-plane-ink);
  font: 11px/16px var(--font-sans, system-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-controls [data-room-hand-filter-summary][hidden] { display: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-library {
  position: absolute;
  inset: auto 8px calc(100% + 48px + var(--room-hand-lift));
  z-index: 10020;
  width: auto;
  max-height: none;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: var(--workspace-field);
  box-shadow: var(--workspace-card-rest);
  pointer-events: auto;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-library-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, .55fr);
  gap: 8px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-library-controls label { min-width: 0; font-size: 11px; color: var(--workspace-plane-muted); }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-library-controls :is(input, select) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 32px;
  color: var(--workspace-plane-ink);
  background: var(--workspace-field);
  border: 0;
  border-radius: 7px;
  box-shadow: var(--workspace-cut);
  font: 13px/1.35 var(--font-sans, system-ui);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-library-controls input::placeholder { color: var(--workspace-plane-muted); opacity: 1; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-fan {
  position: relative;
  flex: 0 0 30px;
  left: auto;
  right: auto;
  bottom: auto;
  width: auto;
  margin-inline: 4px;
  height: 30px;
  overflow: visible;
  pointer-events: none;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-card {
  left: calc(4px + var(--hand-index, 0) * var(--hand-exposure, 56px));
  bottom: -38px;
  height: 68px;
  padding: 6px 8px 7px;
  border-radius: 8px 8px 0 0;
  transform: translate3d(0, 0, 0);
  opacity: 1;
  pointer-events: auto;
  touch-action: none;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-card[hidden] { display: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-card:last-child::after { content: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-card:is(.is-inspected, .is-preview, :hover, :focus-visible) {
  transform: translate3d(0, -24px, 0) scale(1.012);
  z-index: 10000;
  opacity: 1;
}
@supports selector(.adj-room-hand-card:has(+ .adj-room-hand-card:hover)) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(
    .adj-room-hand-card:has(+ .adj-room-hand-card:hover), .adj-room-hand-card:hover + .adj-room-hand-card,
    .adj-room-hand-card:has(+ .adj-room-hand-card:focus-visible), .adj-room-hand-card:focus-visible + .adj-room-hand-card
  ):not(.is-inspected):not(.is-preview):not(:hover):not(:focus-visible) { z-index: 160; transform: translate3d(0, -12px, 0) scale(1.008); }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(
    .adj-room-hand-card:has(+ .adj-room-hand-card + .adj-room-hand-card:hover), .adj-room-hand-card:hover + .adj-room-hand-card + .adj-room-hand-card,
    .adj-room-hand-card:has(+ .adj-room-hand-card + .adj-room-hand-card:focus-visible), .adj-room-hand-card:focus-visible + .adj-room-hand-card + .adj-room-hand-card
  ):not(.is-inspected):not(.is-preview):not(:hover):not(:focus-visible) { z-index: 120; transform: translate3d(0, -5px, 0) scale(1.003); }
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand:is(.has-preview, .has-inspection, :has(.adj-room-hand-card:focus-visible)) { --room-hand-lift: 24px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand--block { bottom: 0 !important; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-sort { margin-right: 0; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand:not(.has-inspection) .adj-room-hand-place { display: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-room-hand-controls button, .adj-room-hand-library-controls input, .adj-room-hand-library-controls select):focus-visible { outline: 2px solid var(--workspace-plane-ink); outline-offset: 2px; }
@container room-hand (max-width: 420px) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] [data-room-hand-range] { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
}
@media (pointer: coarse) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-controls { gap: 2px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-controls .adj-room-hand-place { position: absolute; bottom: calc(100% + 6px); left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-controls { transition-duration: 1ms; }
}
/* Guidance is a reading in the graph header flow, clear of controls and cards. */
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-empty {
  position: static;
  flex: 0 0 auto;
  display: block;
  padding: 0 12px 8px;
  pointer-events: auto;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-empty[hidden] { display: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ge-empty {
  max-width: none;
  padding: 0;
  flex-wrap: wrap;
  gap: 4px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--applet-ink);
  box-shadow: none;
  backdrop-filter: none;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ge-empty :is(strong, span, button) {
  color: var(--applet-ink);
  font-size: 12px;
  line-height: 1.4;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ge-empty button:focus-visible {
  outline: 2px solid var(--applet-ink);
  outline-offset: 3px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-plan-entry-label {
  fill: var(--adj-ink);
  stroke: none;
  paint-order: normal;
}
/* Read room identities against their translucent room faces, using the same
   clear ink as the actual table plane in each theme. */
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-edit-block { --adj-block-tag-fill: #f4f3ee; }
body.windowed-layout.light-theme [data-win-id="adjacency-planner-hub"] .adj-edit-block { --adj-block-tag-fill: #202a24; }
@media (pointer: coarse) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-block-fit { min-height: 44px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-fan { right: auto; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-more { width: 44px; height: 44px; }
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-tools-popover {
  container: graph-tuning / inline-size;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-settings {
  color: var(--adj-ink);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-sec {
  border-color: var(--adj-line);
  background: transparent;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-head {
  padding: 8px 10px;
  background: transparent;
  color: var(--adj-ink);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-head strong {
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-body {
  gap: 8px;
  padding: 4px 10px 12px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-row > span,
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-filter-label {
  font-size: 11px !important;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-lens-buttons {
  border: 0;
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
  background: var(--applet-cut, var(--v10-surface));
  box-shadow: var(--v10-cut);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-lens-buttons button {
  height: auto;
  min-height: 30px;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  font: 500 11px/1.3 var(--font-sans, system-ui);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-lens-buttons button.is-active {
  background: var(--applet-raised, var(--v10-zone));
  color: var(--adj-ink);
  box-shadow: var(--v10-puck);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-display-toggle {
  min-height: 44px;
  border: 0;
  background: var(--applet-raised, var(--v10-zone));
  box-shadow: var(--v10-puck);
  color: var(--adj-ink);
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto;
  gap: 8px;
  padding: 9px 10px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-display-toggle > i { display: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-display-toggle > span { font-size: 12px; font-weight: 500; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-display-toggle > b {
  min-width: 24px;
  font-size: 10px;
  color: var(--adj-muted);
  text-transform: none;
  letter-spacing: 0;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-display-toggle.is-on {
  background: var(--applet-cut, var(--v10-surface));
  box-shadow: var(--v10-cut);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-display-toggle.is-on > b { color: var(--adj-ink); }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-filter-grid select {
  height: 34px;
  line-height: 1.4;
  border: 0;
  background: var(--applet-cut, var(--v10-surface));
  box-shadow: var(--v10-cut);
  color: var(--adj-ink);
  font-size: 12px !important;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-force-bank {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-fader {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-fader-reading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-fader-reading > label {
  color: var(--adj-ink);
  font-size: 12px;
  font-weight: 500;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-fader-exact {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  color: var(--adj-muted);
  font-size: 11px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-fader-exact input {
  box-sizing: border-box;
  width: 70px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 5px 7px;
  background: var(--applet-cut, var(--v10-surface));
  box-shadow: var(--v10-cut);
  color: var(--adj-ink);
  text-align: right;
  font: 500 12px/1.3 var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-fader input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: ew-resize;
  touch-action: pan-y;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-fader input[type="range"]::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 4px;
  background: var(--applet-cut, var(--v10-surface));
  box-shadow: var(--v10-cut);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-fader input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 22px;
  margin-top: -7.5px;
  border: 1px solid color-mix(in srgb, var(--adj-line) 60%, transparent);
  border-radius: 5px;
  background: var(--applet-raised, var(--v10-zone));
  box-shadow: var(--v10-puck);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-fader input[type="range"]::-moz-range-track {
  height: 7px;
  border-radius: 4px;
  background: var(--applet-cut, var(--v10-surface));
  box-shadow: var(--v10-cut);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-fader input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 22px;
  border: 1px solid var(--adj-line);
  border-radius: 5px;
  background: var(--applet-raised, var(--v10-zone));
  box-shadow: var(--v10-puck);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-fader-scale {
  display: flex;
  justify-content: space-between;
  color: var(--adj-muted);
  font: 400 10px/1.2 var(--font-mono, monospace);
  font-variant-numeric: tabular-nums;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-gs-note, .adj-gs-quality) {
  font-size: 11px;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-actions { gap: 10px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-actions .adj-lens-action {
  min-height: 34px;
  height: auto;
  border: 0;
  border-radius: 7px;
  padding: 7px 11px;
  background: transparent;
  color: var(--adj-ink);
  box-shadow: none;
  font-size: 12px;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-actions .is-primary {
  background: var(--applet-raised, var(--v10-zone));
  box-shadow: var(--v10-puck);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-body {
  background: var(--applet-cut, var(--v10-surface));
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-area-heading {
  background: transparent;
  border-bottom: 1px solid var(--adj-line);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-room { border-bottom-color: var(--adj-line); }
body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-ledger-subline select, .adj-ledger-note) {
  background: var(--applet-cut, var(--v10-surface));
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-ledger-room.is-selected {
  background: color-mix(in srgb, var(--applet-ink, var(--v10-ink)) 5%, var(--applet-cut, var(--v10-surface)));
}

/* Matrix is a single ruled sheet, with the selected-room specification beside
   it. Totals are printed readings; only actual edit fields get a recess. */
body.windowed-layout .rm-root {
  --text: var(--applet-ink, var(--v10-ink));
  --muted: var(--applet-muted, var(--v10-muted));
  --text-secondary: var(--applet-muted, var(--v10-muted));
  --bg: var(--applet-material, var(--v10-surface));
  --bg-card: var(--applet-material, var(--v10-surface));
  --input-bg: var(--applet-cut, var(--v10-surface));
  --input-border: var(--applet-edge, var(--v10-line));
  --border: var(--applet-edge, var(--v10-line));
  --accent: var(--applet-ink, var(--v10-ink));
  background: var(--applet-material, var(--v10-surface));
  color: var(--applet-ink, var(--v10-ink));
}
body.windowed-layout .rm-header { padding: 10px 14px 8px; }
body.windowed-layout .rm-title-main { font-size: 14px; font-weight: 600; }
body.windowed-layout .rm-metrics { gap: 14px; }
body.windowed-layout .rm-metric { padding: 0; }
body.windowed-layout .rm-metric-label { font-size: 10px; letter-spacing: 0; text-transform: none; }
body.windowed-layout .rm-header-actions { gap: 8px; }
body.windowed-layout .rm-view-toggle { background: var(--applet-cut, var(--v10-surface)); }
body.windowed-layout .rm-view-toggle {
  flex-wrap: wrap;
  overflow: visible;
}
body.windowed-layout .rm-toggle-btn { flex-shrink: 0; }
body.windowed-layout .rm-toggle-btn.active { background: var(--applet-raised, var(--v10-zone)); }
body.windowed-layout .rm-root :is(input:not([type="checkbox"]), select, textarea) {
  background: var(--applet-cut, var(--v10-surface));
  color: var(--applet-ink, var(--v10-ink));
}
body.windowed-layout .rm-root :is(.rm-icon-btn, .rm-menu-btn, .rm-export-btn, .rm-filter-clear, .rm-inspector-toggle) {
  min-height: 32px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  color: var(--applet-muted, var(--v10-muted));
  font: 500 12px/1.3 var(--font-sans, system-ui);
  cursor: pointer;
}
body.windowed-layout .rm-inspector-toggle[aria-expanded="true"] {
  color: var(--applet-ink, var(--v10-ink));
  background: color-mix(in srgb, var(--applet-ink, var(--v10-ink)) 5%, transparent);
}
body.windowed-layout .rm-filter-bar { padding-bottom: 10px; }
body.windowed-layout .rm-body {
  gap: 10px;
  margin: 0 14px 14px;
  padding: 5px;
  border-radius: 14px;
  background: var(--applet-cut, var(--v10-surface));
  box-shadow: var(--workspace-cut);
}
body.windowed-layout .rm-table-panel {
  box-sizing: border-box;
  padding: 5px;
  border-radius: 11px;
  background-color: var(--applet-material, var(--v10-surface));
  background-image: var(--applet-felt-grain, none);
  box-shadow: var(--workspace-card-edge), var(--workspace-pillow-edge);
}
body.windowed-layout .rm-table-wrap {
  padding: 1px;
  border-radius: 9px;
  background: var(--applet-cut, var(--v10-surface));
  box-shadow: var(--v10-cut);
}
body.windowed-layout .rm-table :is(th, td) {
  color: var(--applet-ink, var(--v10-ink));
  background: var(--applet-cut, var(--v10-surface));
  border-bottom-color: color-mix(in srgb, var(--applet-edge, var(--v10-line)) 65%, transparent);
}
body.windowed-layout .rm-table th {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--applet-muted, var(--v10-muted));
}
body.windowed-layout .rm-table .rm-group-row td {
  background: color-mix(in srgb, var(--applet-ink, var(--v10-ink)) 3%, var(--applet-cut, var(--v10-surface)));
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
body.windowed-layout .rm-data-row.selected td,
body.windowed-layout .rm-root.wrap-text .rm-data-row.selected .rm-sticky-col {
  background: color-mix(in srgb, var(--applet-ink, var(--v10-ink)) 6%, var(--applet-cut, var(--v10-surface)));
}
body.windowed-layout .rm-table .rm-attr-cell { padding: 0; }
body.windowed-layout .rm-cell-edit {
  display: flex;
  width: 100%;
  min-height: 32px;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 7px 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  color: var(--applet-ink, var(--v10-ink));
  text-align: left;
  font: inherit;
  cursor: pointer;
}
body.windowed-layout .rm-cell-edit:hover,
body.windowed-layout .rm-cell-edit:focus-visible {
  background: color-mix(in srgb, var(--applet-ink, var(--v10-ink)) 4%, var(--applet-cut, var(--v10-surface)));
  box-shadow: var(--v10-cut);
}
body.windowed-layout .rm-cell-review {
  margin-left: auto;
  color: var(--applet-muted, var(--v10-muted));
  font-size: 10px;
  font-style: italic;
}
body.windowed-layout .rm-inspector {
  box-sizing: border-box;
  border: 0;
  border-radius: 11px;
  padding: 12px;
  background-color: var(--applet-material, var(--v10-surface));
  background-image: var(--applet-felt-grain, none);
  box-shadow: var(--workspace-card-edge), var(--workspace-pillow-edge);
}
body.windowed-layout .rm-inspector-head { align-items: baseline; gap: 12px; }
body.windowed-layout .rm-inspector-code { font-size: 13px; }
body.windowed-layout .rm-inspector-title { font-size: 15px; line-height: 1.35; }
body.windowed-layout .rm-inspector-metrics {
  gap: 10px;
  background: transparent;
  border: 0;
  padding: 10px 0 0;
}
body.windowed-layout .rm-inspector-section { padding-top: 14px; }
body.windowed-layout .rm-inspector-section h4 {
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: var(--applet-muted, var(--v10-muted));
}
body.windowed-layout .rm-inspector-field {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--applet-edge, var(--v10-line));
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.windowed-layout .rm-inspector-field:hover { background: color-mix(in srgb, var(--applet-ink, var(--v10-ink)) 4%, transparent); }
body.windowed-layout .rm-inspector-field > em { grid-column: 2; font-size: 10px; }
body.windowed-layout .rm-cell-popover,
body.windowed-layout .rm-header-popover {
  --bg: var(--applet-material, var(--v10-surface));
  --bg-card: var(--applet-material, var(--v10-surface));
  --border: var(--applet-edge, var(--v10-line));
  color: var(--applet-ink, var(--v10-ink));
}
body.windowed-layout .rm-cell-popover {
  box-sizing: border-box;
  width: min(360px, calc(100vw - 32px));
  max-height: min(430px, calc(100vh - 32px));
  max-height: min(430px, calc(100dvh - 32px));
}
/* Exact editing occupies the existing specification zone, beside the sheet.
   It has no global overlay, backdrop or competing card perimeter. */
body.windowed-layout .rm-cell-inline {
  position: static;
  inset: auto;
  z-index: auto;
  width: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
body.windowed-layout .rm-inspector.is-editing { max-height: none; }
body.windowed-layout .rm-cell-evidence > summary {
  min-height: 32px;
  box-sizing: border-box;
  padding: 7px 0;
  color: var(--applet-muted, var(--v10-muted));
  font-size: 11px;
  line-height: 1.5;
  cursor: pointer;
}
body.windowed-layout .rm-cell-popover-head > button {
  border: 0;
  box-shadow: none;
  background: transparent;
  color: var(--applet-muted, var(--v10-muted));
}
body.windowed-layout .rm-popover-provenance {
  border: 0;
  border-radius: 0;
  padding: 8px 0;
  background: transparent;
  color: var(--applet-muted, var(--v10-muted));
}
body.windowed-layout .rm-cell-commit {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--applet-edge, var(--v10-line));
}
body.windowed-layout .rm-cell-inline .rm-cell-commit { flex-wrap: wrap; gap: 8px; }
body.windowed-layout .rm-cell-inline .rm-cell-commit .rm-cell-cancel {
  background: transparent;
  box-shadow: none;
  font-weight: 500;
}
body.windowed-layout .rm-cell-inline .rm-cell-commit > span { flex-basis: 100%; }
body.windowed-layout .rm-cell-commit > button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  padding: 9px 16px;
  background: var(--applet-raised, var(--v10-zone));
  box-shadow: var(--v10-puck);
  color: var(--applet-ink, var(--v10-ink));
  font-weight: 600;
  cursor: pointer;
}
body.windowed-layout .rm-cell-commit > span { color: var(--applet-muted, var(--v10-muted)); font-size: 11px; line-height: 1.4; }
body.windowed-layout .rm-cell-review-heading { margin-top: 14px; color: var(--applet-muted, var(--v10-muted)); font-size: 11px; }
body.windowed-layout .rm-cell-inline .rm-cell-review-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
body.windowed-layout .rm-cell-inline .rm-cell-review-heading > button {
  min-height: 32px;
  border: 0;
  padding: 4px 6px;
  background: transparent;
  box-shadow: none;
  color: var(--applet-muted, var(--v10-muted));
  font: 500 11px/1.3 var(--font-sans, system-ui);
}
body.windowed-layout .rm-review-actions button {
  min-height: 32px;
  border: 0;
  border-radius: 5px;
  padding: 7px 8px;
  background: transparent;
  box-shadow: none;
  color: var(--applet-ink, var(--v10-ink));
}
body.windowed-layout .rm-review-actions button:hover { background: color-mix(in srgb, var(--applet-ink, var(--v10-ink)) 5%, transparent); }
body.windowed-layout .rm-review-actions .rm-review-state {
  border: 0;
  background: var(--applet-raised, var(--v10-zone));
  box-shadow: var(--workspace-puck);
  font-size: 12px;
  font-weight: 500;
}
body.windowed-layout .rm-review-actions .rm-review-state:hover {
  background: var(--applet-raised, var(--v10-zone));
}
body.windowed-layout .rm-review-actions .rm-review-state[aria-pressed="true"] {
  background: var(--applet-cut, var(--v10-surface));
  box-shadow: var(--v10-cut);
  font-weight: 650;
}
@container graph-tuning (min-width: 600px) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-force-bank { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-display-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container room-matrix (max-width: 720px) {
  body.windowed-layout .rm-inspector { border: 0; padding: 8px; }
  body.windowed-layout .rm-root.is-cell-editing :is(.rm-header-title, .rm-metrics, .rm-filter-bar) { display: none; }
  body.windowed-layout .rm-root.is-cell-editing .rm-body { display: flex; flex-direction: column; }
  body.windowed-layout .rm-root.is-cell-editing .rm-inspector { order: -1; flex: 0 0 auto; overflow: visible; padding: 8px; }
  body.windowed-layout .rm-root.is-cell-editing .rm-table-panel { flex: 1 0 180px; }
  body.windowed-layout .rm-root.is-cell-editing .rm-cell-inline .rm-popover-provenance { padding-block: 4px; font-size: 11px; }
  body.windowed-layout .rm-root.is-cell-editing .rm-cell-inline .rm-cell-review-heading { margin-top: 4px; }
}
@container room-matrix (max-width: 480px) {
  body.windowed-layout .rm-title-main { display: none; }
  body.windowed-layout .rm-title-sub { margin-top: 0; }
  body.windowed-layout .rm-filter-compact > .rm-search-primary { flex-basis: 100%; }
}
@media (pointer: coarse), (max-width: 768px) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-graph-fit, .adj-gs-head, .adj-gs-fader-exact input, .adj-graph-lens-buttons button, .adj-gs-filter-grid select, .adj-gs-actions .adj-lens-action) { min-height: 44px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-gs-fader input[type="range"] { height: 44px; }
  body.windowed-layout .rm-root :is(.rm-inspector-toggle, .rm-cell-edit, .rm-cell-commit > button, .rm-review-actions button, .rm-cell-review-heading > button, .rm-cell-evidence > summary) { min-height: 44px; }
  body.windowed-layout .rm-cell-popover-head > button { width: 44px; height: 44px; flex: 0 0 44px; }
}

@media (pointer: coarse) {
  body.windowed-layout [data-win-id="simulation"] .rmp-type-select { width: 164px; }
}

/* A smaller table allocation keeps the actual instrument. Only spacing and
   duplicate introductions change; selection, fields and gestures stay live. */
body.windowed-layout .workspace-widget-compact[data-win-id="navigator"] .tree-header {
  padding: 4px 8px 6px;
}
body.windowed-layout .workspace-widget-compact[data-win-id="navigator"] .nav-actions { gap: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="navigator"] .nav-view-toolbar { border: 0; padding: 0; }
body.windowed-layout .workspace-widget-compact[data-win-id="navigator"] .nav-toolbar { flex-wrap: wrap; gap: 1px; }
body.windowed-layout .workspace-widget-compact[data-win-id="navigator"] .tree-item { padding-block: 4px; font-size: 12px; }
body.windowed-layout .workspace-widget-compact[data-win-id="navigator"] .navigator-search-hint { margin-top: 3px; font-size: 10px; }
/* The retained native scroll thumb belongs inside its host. The old -16px
   rail offset enlarged the real panel's horizontal scroll area. */
body.windowed-layout [data-win-id="navigator"] .navigator-scroll-rail { right: 0; }

/* The existing first-use guide keeps dismissal available at any allocation.
   Its explanatory list scrolls, while the real Close/Start controls stay put. */
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-howto-layer { box-sizing: border-box; padding: 8px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-howto-panel {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  width: min(660px, 100%);
  height: min(560px, 100%);
  max-height: 100%;
  overflow: hidden;
  padding: 12px;
  border: 0;
  color: var(--applet-ink);
  background: var(--v10-glass);
  backdrop-filter: blur(18px);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-howto-head p { margin-bottom: 0; font-size: 12px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-howto-grid { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); grid-auto-rows: max-content; gap: 0 12px; overflow: auto; overscroll-behavior: contain; align-content: start; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-howto-grid article { display: grid; grid-template-columns: 20px minmax(0, 1fr); grid-template-rows: auto auto; align-content: start; gap: 3px 8px; min-height: auto; padding: 8px 0; border: 0; border-bottom: 1px solid var(--applet-edge); border-radius: 0; background: transparent; text-align: left; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-howto-glyph { width: 20px; height: 20px; grid-column: 1; grid-row: 1; color: var(--applet-muted); }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-howto-grid strong { grid-column: 2; grid-row: 1; font-size: 12px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-howto-grid p { grid-column: 2; grid-row: 2; font-size: 12px; line-height: 1.45; color: var(--applet-muted); }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-howto-grid p b { color: var(--applet-ink); }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-howto-foot { flex-wrap: wrap; gap: 6px; margin-top: 0; padding-top: 6px; border-top: 1px solid var(--applet-edge); }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-howto-foot > button { margin-left: auto; border: 0; background: var(--applet-raised); color: var(--applet-ink); box-shadow: var(--workspace-puck); }

body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-root.adj-shell { padding: 4px 6px 6px; gap: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-slimbar { padding: 0; margin-right: 0; gap: 3px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle-host { top: 36px; right: 6px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-view-switch { width: 100%; flex: 1 0 100%; order: 0; flex-wrap: wrap; max-width: 100%; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-view-switch button { padding-inline: 6px; font-size: 11px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-slimbar > .adj-command-button { order: 1; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-nlbar { order: 1; flex: 0 0 auto; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-nlbar[data-open="true"] { order: 2; flex: 1 1 100%; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-slim-actions { order: 1; margin-left: 0; gap: 0; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-guide-button { order: 1; margin-right: 34px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-graph-selectionbar { order: 3; flex-basis: 100%; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-spatial-precedence { order: 3; }
/* A compact allocation keeps the real selected instrument in front. The
   adapter routes this selector through native views and moves the existing
   authoring controls into a same-panel disclosure, with no copied drafts. */
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-slimbar.workspace-compact-controls { padding-right: 34px; align-items: flex-start; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-view-switch.workspace-compact-view { display: block; flex: 1 1 120px; width: auto; min-width: 0; padding: 0; background: transparent; box-shadow: none; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .workspace-compact-view > :is(button, span) { display: none; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .workspace-workbench-view-select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 28px; padding: 4px 7px; border: 0; border-radius: 7px; background: var(--applet-cut); color: var(--applet-ink); box-shadow: var(--workspace-cut); font: 12px/1.4 var(--font-sans, system-ui); }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .workspace-workbench-actions { flex: 0 0 auto; order: 0; min-width: 0; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .workspace-workbench-actions > summary { min-height: 28px; box-sizing: border-box; padding: 4px 8px; border: 0; border-radius: 7px; background: var(--applet-raised); color: var(--applet-ink); box-shadow: var(--workspace-puck); font: 12px/1.4 var(--font-sans, system-ui); cursor: pointer; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .workspace-workbench-actions[open] { flex: 1 0 100%; order: 1; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .workspace-workbench-actions[open] > summary { width: max-content; margin-left: auto; background: var(--applet-cut); box-shadow: var(--workspace-cut); }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .workspace-workbench-actions-body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; padding-top: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .workspace-workbench-actions-body > .adj-command-button { order: 0; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .workspace-workbench-actions-body > .adj-guide-button { order: 0; margin-right: 0; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .workspace-workbench-actions-body > .adj-slim-actions { order: 0; flex-wrap: wrap; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .workspace-workbench-actions-body > .adj-nlbar { order: 0; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .workspace-workbench-actions-body > .adj-nlbar[data-open="true"] { order: 1; flex-basis: 100%; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] :is(.workspace-workbench-view-select, .workspace-workbench-actions > summary):focus-visible { outline: 2px solid var(--applet-ink); outline-offset: 2px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-layout-body .adj-plan-preview svg { min-height: 0; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome { inset: 4px auto auto 4px; gap: 3px; max-width: calc(100% - 8px); padding: 3px 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome .adj-block-workspace-current { gap: 3px; }
@media (pointer: fine) {
  body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome .adj-block-view-rail { width: 60px; }
  body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-block-fit { min-width: 28px; padding-inline: 4px; }
  body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome :is(.adj-block-plan-primary-controls, .adj-block-plan-reading-controls) { gap: 3px; }
  body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome :is(.adj-workspace-tools, .adj-block-workspace-selector) > summary { padding-inline: 4px; }
}
/* Compact Rows puts its existing controls in two rows so the room schedule
   keeps a useful viewport. Native labels remain available to assistive tools. */
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-tools {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) minmax(68px, .8fr) minmax(86px, 1fr);
  gap: 2px;
  padding: 2px;
  border: 0;
  background: transparent;
}
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-tools > label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-tools :is(input, select) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 28px; font-size: 11px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-tool-actions:has(#adj-ledger-selection-tools:empty) { display: none; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-tool-actions:has(#adj-ledger-selection-tools:not(:empty)) { grid-column: 1 / -1; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-row-actions { grid-column: 1 / span 2; display: flex; gap: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-row-actions button { flex: 1; min-width: 0; min-height: 28px; padding-inline: 3px; font-size: 10px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-areas > summary { box-sizing: border-box; min-height: 28px; font-size: 11px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-color-key { display: none; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-results { grid-column: 1 / -1; margin: 0; font-size: 10px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .window-body > .workspace-record-context {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-area-heading { position: static; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-area-heading button { min-height: 28px; padding: 3px 5px; gap: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-area-heading button > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-area-heading small { margin-right: 5px; font-size: 9px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-body { padding: 4px 6px; }
body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-ledger-mainline { padding-block: 4px; }

/* The Block Plan working stage is a real opening. The shared panel material
   mask follows this stage; the lip fades outward onto the surrounding felt. */
body.windowed-layout [data-workspace-material-opening] :is(
  .window-body, .dynamic-window-content, .arrange-planner-window-shell,
  #adjacency-planner-root, .adj-root, .adj-table-main, .adj-workspace-deck) {
  background: transparent !important;
  background-image: none !important;
}
body.windowed-layout [data-workspace-material-opening="block-plan"] :is(
  .adj-layout-panel, .adj-layout-body, .adj-assembly, .adj-plan-preview, .adj-block-canvas-stage),
body.windowed-layout .adj-layout-panel[data-workspace-inner-opening="block-plan"] :is(
  .adj-layout-body, .adj-assembly, .adj-plan-preview, .adj-block-canvas-stage) {
  background: transparent !important;
  background-image: none !important;
}
body.windowed-layout [data-workspace-material-opening="block-plan"] .adj-plan-preview,
body.windowed-layout .adj-layout-panel[data-workspace-inner-opening="block-plan"] .adj-plan-preview { box-shadow: none; border: 0; }
body.windowed-layout [data-workspace-material-opening="block-plan"] .adj-block-canvas-stage,
body.windowed-layout .adj-layout-panel[data-workspace-inner-opening="block-plan"] .adj-block-canvas-stage {
  --adj-ink: #f4f3ee;
  --adj-muted: #c5ccc5;
  --adj-workspace-base: var(--workspace-field);
  background: var(--workspace-field) !important;
  color: var(--adj-ink);
  border: 0;
  border-radius: 9px;
  box-shadow: var(--workspace-opening-seam), var(--workspace-opening-cushion);
}
body.windowed-layout.light-theme [data-workspace-material-opening="block-plan"] .adj-block-canvas-stage,
body.windowed-layout.light-theme .adj-layout-panel[data-workspace-inner-opening="block-plan"] .adj-block-canvas-stage {
  --adj-ink: #202a24;
  --adj-muted: #4c5b52;
}

/* The broad bed is removed material. Native workspace peers rest inside it
   as smaller felt objects; only their useful drawing/data wells are cuts.
   Compact and phone readings keep the single construction above. */
body.windowed-layout [data-workspace-material-bed="workbench"] .adj-table-main {
  box-sizing: border-box;
  padding: 5px;
  border-radius: 12px;
  box-shadow: var(--workspace-opening-seam), var(--workspace-opening-cushion);
  overflow: hidden;
}
body.windowed-layout [data-workspace-material-bed="workbench"] .adj-workspace-deck {
  padding: 0;
  overflow: visible;
}
body.windowed-layout [data-workspace-material-bed="workbench"] :is(
  .adj-input-drawer, .adj-graph-panel, .adj-layout-panel, .adj-ledger-panel,
  .adj-bubble-panel, .adj-parti-workspace) {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  min-width: 0;
  padding: 4px;
  border: 0;
  border-radius: 11px;
  background-color: var(--applet-material);
  background-image: var(--applet-felt-grain, none);
  box-shadow: var(--workspace-card-edge), 0 3px 5px rgba(0,0,0,.10);
}
body.windowed-layout [data-workspace-material-bed="workbench"] :is(
  .adj-input-drawer, .adj-graph-panel, .adj-layout-panel, .adj-ledger-panel,
  .adj-bubble-panel, .adj-parti-workspace)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
  box-shadow: var(--workspace-pillow-edge);
}
body.windowed-layout [data-workspace-material-bed="workbench"] .adj-layout-panel[data-workspace-inner-opening="block-plan"] {
  background: transparent !important;
  background-image: none !important;
}
body.windowed-layout [data-workspace-material-bed="workbench"] .adj-layout-panel[data-workspace-inner-opening="block-plan"]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  background-color: var(--applet-material);
  background-image: var(--applet-felt-grain, none);
  clip-path: var(--workspace-opening-mask);
}
body.windowed-layout [data-workspace-material-bed="workbench"] .adj-layout-panel[data-workspace-inner-opening="block-plan"]::after {
  clip-path: var(--workspace-opening-mask);
}

body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-header { padding: 4px 8px; gap: 4px 8px; }
body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-header-title { display: none; }
body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-metrics { gap: 8px; }
body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-metric-value { font-size: 15px; }
body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-header-actions { gap: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-filter-bar { padding: 0 8px 5px; }
body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-filter-compact { gap: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-filter-compact > :is(input, select) { flex-basis: 100px; }
body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-filter-compact > .rm-search-primary { flex-basis: 100%; }
body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-body { padding: 4px; margin: 0 8px 8px; gap: 8px; }
body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-table :is(th, td) { padding-block: 5px; }
body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-table th { height: 28px; }

/* Compact comparisons retain the same two native cards and their records. */
body.windowed-layout .workspace-widget-compact[data-win-id="compare"] #compare-view { padding: 4px 8px 8px; }
body.windowed-layout .workspace-widget-compact[data-win-id="compare"] .compare-workspace { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
body.windowed-layout .workspace-widget-compact[data-win-id="compare"] .compare-column { padding: 5px; }
body.windowed-layout .workspace-widget-compact[data-win-id="compare"] .compare-column > h3 { margin-bottom: 5px; font-size: 11px; }
body.windowed-layout .workspace-widget-compact[data-win-id="compare"] .compare-search { margin-bottom: 5px; }
body.windowed-layout .workspace-widget-compact[data-win-id="compare"] .compare-room-display { padding: 2px 0; margin-top: 0; }
body.windowed-layout .workspace-widget-compact[data-win-id="compare"] .compare-room-display > div:first-child { gap: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="compare"] .compare-room-display h4 { font-size: 13px; }
body.windowed-layout .workspace-widget-compact[data-win-id="compare"] .compare-room-display .detail-row { padding-block: 4px; font-size: 12px; }

body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] .mep-app { padding: 4px 8px 8px; gap: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] .mep-top-row { gap: 3px 6px; }
body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] .mep-top-actions { gap: 5px; align-items: center; }
body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] .mep-content-tabs { margin-top: 0; }
body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] :is(.mep-disc-filter, .mep-content-tab) { font-size: 11px; padding-inline: 6px; }
body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] .mep-assumption-panel > summary { padding-block: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] .mep-schedule-toolbar { padding-bottom: 4px; gap: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] .mep-search { flex-basis: 100px; min-width: 80px; }
body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] .mep-ls-table :is(th, td) { padding-block: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] .mep-note { display: none; }
body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] .mep-network-layout { min-height: 0; flex-basis: auto; }
body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] .mep-net-col { padding: 6px; }

body.windowed-layout .workspace-widget-compact[data-win-id="finish-board-hub"] :is(.fb-header, .fb-filter-bar) { padding: 4px 8px; gap: 4px 6px; }
body.windowed-layout .workspace-widget-compact[data-win-id="finish-board-hub"] .fb-header-title { display: none; }
body.windowed-layout .workspace-widget-compact[data-win-id="finish-board-hub"] .fb-header-actions { gap: 4px; }
body.windowed-layout .workspace-widget-compact[data-win-id="finish-board-hub"] .fb-cat-pills { padding: 0 8px 4px; gap: 6px; }
body.windowed-layout .workspace-widget-compact[data-win-id="finish-board-hub"] :is(.fb-palette-view, .fb-rooms-view, .fb-schedule-view) { padding: 0 8px 8px; }

/* The two drawing cards share one desktop control band and one button scale.
   Phone controls retain their larger touch targets and natural wrapping. */
@media (min-width: 769px) and (pointer: fine) {
  body.workspace-hand-enabled .app-window[data-win-id="adjacency-planner-hub"] {
    --workbench-switch-height: 32px;
    --workbench-switch-padding: 2px;
    --workbench-switch-gap: 2px;
    --workbench-switch-wrap: nowrap;
    --workbench-command-height: 28px;
    --workbench-command-padding: 0 8px;
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-root.adj-shell { padding-top: 4px; gap: 4px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slimbar {
    min-height: 32px;
    margin-bottom: 0;
    padding-right: 36px;
    align-items: center;
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle-host { top: 6px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher {
    width: 28px; min-width: 28px; height: 28px; min-height: 28px; padding: 0; justify-content: center;
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher > span:not(.arrange-planner-lifecycle__launcher-icon) {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slimbar :is(.adj-command-button, .adj-slim-actions button, .adj-guide-button, .workspace-workbench-actions > summary) {
    min-height: 28px; height: 28px; padding-block: 0;
  }
  body.workspace-hand-enabled [data-win-id="adjacency-planner-hub"] .adj-table[data-view="workspace"] .adj-graph-head {
    box-sizing: border-box;
    flex: 0 0 52px;
    height: 52px;
    min-height: 52px;
    padding: 6px 6px 14px;
  }
  body.workspace-hand-enabled [data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome {
    box-sizing: border-box;
    inset: 0 auto auto 0;
    height: auto;
    min-height: 44px;
    padding: 6px;
    flex-wrap: wrap;
    background: transparent;
    box-shadow: none;
  }
  body.workspace-hand-enabled [data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome .adj-block-reading-status {
    position: static; flex: 1 1 200px; max-width: none; line-height: 1.25;
  }
  body.workspace-hand-enabled [data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome :is(.adj-block-view-rail, .adj-block-plan-primary-controls, .adj-block-plan-reading-controls) {
    box-sizing: border-box;
    height: 32px;
    min-height: 32px;
  }
  body.workspace-hand-enabled [data-win-id="adjacency-planner-hub"] .adj-block-plan-chrome .adj-block-view-rail { padding: 0; border: 0; }
  body.workspace-hand-enabled [data-win-id="adjacency-planner-hub"] :is(.adj-graph-head, .adj-block-plan-chrome) :is(button, summary) {
    box-sizing: border-box;
    height: 32px;
    min-height: 32px;
    font-size: 12px;
  }
}
body.windowed-layout .workspace-widget-compact[data-win-id="finish-board-hub"] .fb-mosaic-grid { grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: 8px; }
body.windowed-layout .workspace-widget-compact[data-win-id="finish-board-hub"] .fb-mosaic-card .fb-swatch-color { height: 64px; min-height: 64px; }
body.windowed-layout .workspace-widget-compact[data-win-id="finish-board-hub"] .fb-mosaic-card .fb-swatch-body { padding: 4px 6px 6px; }

@media (hover: hover) and (pointer: fine) {
  body.windowed-layout .workspace-widget-compact[data-win-id="navigator"] .nav-action { min-height: 28px; padding: 4px 6px; font-size: 11px; }
  body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] :is(.adj-view-switch button, .adj-graph-fit, .arrange-planner-lifecycle__launcher) { min-height: 28px; height: auto; }
  body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .adj-slimbar :is(.adj-command-button, .adj-slim-actions button, .adj-guide-button) { min-height: 28px; height: 28px; padding-inline: 4px; font-size: 10px; }
  body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher { width: 28px; height: 28px; padding: 0; justify-content: center; }
  body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle-host:has(+ #adjacency-planner-root .workspace-compact-controls) { top: 4px; }
  /* The original button retains its complete native accessible name/state.
     Its settings glyph leaves the live drawing room in a small allocation. */
  body.windowed-layout .workspace-widget-compact[data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher > span:not(.arrange-planner-lifecycle__launcher-icon) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] :is(.rm-toggle-btn, .rm-icon-btn, .rm-menu-btn, .rm-export-btn, .rm-filter-clear, input:not([type="checkbox"]), select) { min-height: 28px; padding-block: 4px; }
  body.windowed-layout .workspace-widget-compact[data-win-id="mep-calculator"] :is(.mep-disc-filter, .mep-content-tab, .mep-assumption-panel > summary, button, input:not([type="checkbox"]), select) { min-height: 28px; padding-block: 4px; }
  body.windowed-layout .workspace-widget-compact[data-win-id="finish-board-hub"] :is(.fb-toggle-btn, .fb-add-btn, .fb-filter-clear, input:not([type="checkbox"]), select) { min-height: 28px; padding-block: 4px; }
}

/* A narrow Matrix keeps the ruled table as its own scrollable instrument.
   The specification follows on the same outer reading, without a third
   nested vertical viewport. Desktop keeps its side-by-side specification. */
@container room-matrix (max-width: 720px) {
  body.windowed-layout [data-win-id="room-matrix-hub"] .rm-root {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  body.windowed-layout [data-win-id="room-matrix-hub"] .rm-header-title { display: none; }
  body.windowed-layout [data-win-id="room-matrix-hub"] .rm-header { grid-template-columns: minmax(0, 1fr); }
  body.windowed-layout [data-win-id="room-matrix-hub"] .rm-header-actions { min-width: 0; max-width: 100%; }
  body.windowed-layout [data-win-id="room-matrix-hub"] .rm-view-toggle {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    overflow: visible;
  }
  body.windowed-layout [data-win-id="room-matrix-hub"] .rm-toggle-btn { flex: 1 1 auto; }
  body.windowed-layout [data-win-id="room-matrix-hub"] .rm-body,
  body.windowed-layout [data-win-id="room-matrix-hub"] .rm-root.inspector-closed .rm-body {
    flex: 0 0 auto;
    grid-template-rows: auto;
    min-height: 0;
    overflow: visible;
  }
  body.windowed-layout [data-win-id="room-matrix-hub"] .rm-table-panel { height: clamp(140px, calc(100cqh - 200px), 250px); }
  body.windowed-layout [data-win-id="room-matrix-hub"] .rm-inspector {
    max-height: none;
    overflow: visible;
    padding: 12px;
  }
  body.windowed-layout [data-win-id="room-matrix-hub"] .rm-root.is-cell-editing .rm-table-panel { flex: 0 0 auto; }
}
body.windowed-layout [data-win-id="room-matrix-hub"] .rm-metric-value { font-size: 13px; }
body.windowed-layout .workspace-widget-compact[data-win-id="room-matrix-hub"] .rm-table .rm-group-row td { top: 28px; }
/* The SVG's native viewBox is also the pointer-coordinate space. Keeping its
   aspect at narrow widths avoids a blank letterbox before the actual nodes. */
@container movement (max-width: 650px) {
  body.workspace-hand-enabled [data-win-id="simulation"] #sim-panel .wf-graph-svg { width: 100%; height: auto !important; display: block; }
}
@media (pointer: coarse) {
  @container room-matrix (max-width: 720px) {
    body.windowed-layout [data-win-id="room-matrix-hub"] .rm-table-panel { height: clamp(150px, calc(100cqh - 340px), 300px); }
  }
  body.workspace-hand-enabled [data-win-id="simulation"] #sim-panel .sim-tier-card { min-height: 44px; }
}

/* Literal source browsing starts with the actual catalog. The existing About
   disclosure carries the source-only explanation at small allocations. Native
   search, import, floor scope and scale controls retain their original nodes. */
body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-library-header h2 { display: none; }
body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-library-header > div > p { font-size: 12px; }
body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-selected {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-kicker { font-weight: 500; letter-spacing: 0; text-transform: none; }
body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-controls label { font-weight: 500; }
body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-controls :is(input, select) { font-size: 12px; font-weight: 400; }
@container diagram-library (max-width: 720px) {
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-library { padding: 8px 10px 12px; }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-library-header { align-items: center; padding-bottom: 0; }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-library-header > div > p { display: none; }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
    padding: 6px 0;
  }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-import { grid-column: 1 / -1; }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-selected { margin-top: 0; }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-selected:has(.adj-functional-diagram-empty) .adj-functional-diagram-empty { display: none; }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-section-head { padding: 7px 9px; }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-selected .adj-functional-diagram-section-head { align-items: center; padding-inline: 0; }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-selected .adj-functional-diagram-section-head > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-selected .adj-functional-diagram-section-head > span { max-width: 45%; }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-catalog-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
  }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-catalog-row > div { grid-column: 1; grid-row: 1 / 3; }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-catalog-row > button { grid-column: 2; grid-row: 1; }
  body.windowed-layout [data-win-id="functional-diagram-library"] .adj-functional-diagram-status { grid-column: 2; grid-row: 2; font-size: 9px; text-transform: none; }
}

/* The date chain remains the primary reading. Next-up jump commands share
   one small row so compact cards reveal the deliverable and its exact dates. */
body.windowed-layout [data-win-id="schedule-hub"] :is(.sched-phase-head h3, .milestone-title-btn) { font-size: 13px; font-weight: 500; }
@container applet-schedule (max-width: 600px) {
  body.windowed-layout [data-win-id="schedule-hub"] .sched-nextup {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px 6px;
  }
  body.windowed-layout [data-win-id="schedule-hub"] .sched-nextup-title { grid-column: 1 / -1; }
  body.windowed-layout [data-win-id="schedule-hub"] .sched-nextup-chip { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; padding: 4px 0; }
  body.windowed-layout [data-win-id="schedule-hub"] .sched-nextup-chip :is(b, span, em) { font-size: 10px; line-height: 1.4; font-weight: 400; }
  body.windowed-layout [data-win-id="schedule-hub"] .sched-phase-head { margin-bottom: 4px; }
}
/* Sorting is an icon operation on the model's neutral hand, rather than a
   status mark. Its actual glyph uses that plane's ink at full opacity. */
body.workspace-hand-enabled [data-win-id="adjacency-planner-hub"] .adj-room-hand-sort {
  color: var(--workspace-plane-ink);
  opacity: 1;
}
body.workspace-hand-enabled [data-win-id="adjacency-planner-hub"] .adj-room-hand-sort span { color: inherit; }

@media (pointer: coarse) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] :is(.adj-room-hand-controls button, .adj-room-hand-library-controls input, .adj-room-hand-library-controls select) { min-height: 44px; min-width: 44px; }
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] #adj-graph-hand .adj-room-hand-sort { display: inline-flex; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] #adj-graph-hand .adj-room-hand-card { bottom: -38px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-card-top b { color: color-mix(in srgb, var(--hand-color) 35%, var(--adj-ink)); }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-card:focus-visible .adj-room-hand-card-top b {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* The card hand belongs to the same rounded working cut, below the graph's
   painted viewport. It cannot cover the minimap or the connection guidance. */
.adj-graph-working-cut { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-panel { display: flex; flex-direction: column; min-height: 0; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-working-cut {
  overflow: hidden;
  border-radius: 12px;
  background: var(--workspace-field);
  box-shadow: var(--workspace-through-cut);
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-panel.is-resolved .adj-graph-working-cut { display: none; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-working-cut .adj-graph-canvas-wrap {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-working-cut #adj-graph-hand {
  position: relative;
  flex: 0 0 auto;
  top: auto;
  bottom: auto;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-working-cut #adj-graph-hand .adj-room-hand {
  position: relative;
  min-height: 0;
  height: auto !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand--block .adj-room-hand-sort { display: inline-flex; }
body.workspace-hand-enabled .layout .app-window[data-win-id="adjacency-planner-hub"] .adj-graph-working-cut .adj-graph-canvas-wrap {
  box-shadow: none;
  border-radius: 0;
}
/* The lower edge stays behind the cut while the face and bubbles rise. */
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-card:is(.is-inspected, .is-preview) {
  background: color-mix(in srgb, var(--hand-color) 31%, var(--surface));
  box-shadow: 0 6px 17px color-mix(in srgb, var(--hand-color) 26%, transparent);
}
.adj-workbench-mode-select { display: none; }
.adj-phone-tools-trigger { display: none; }
/* Narrow allocations use one native selector for all six readings. Bound the
   older intrinsic-width mobile command row so it leaves room for the graph. */
@container workbench (max-width: 620px) {
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slimbar:not(.workspace-compact-controls) {
    display: flex !important;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    justify-content: flex-start;
    overflow: visible;
    min-width: 0;
    height: auto;
    gap: 4px;
    padding: 4px 0;
    margin: 0;
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slimbar .adj-view-switch:not(.workspace-compact-view) {
    display: block;
    position: relative;
    flex: 0 0 calc(100% - 52px);
    width: calc(100% - 52px);
    max-width: none;
    min-width: 0 !important;
    min-height: 0;
    height: auto !important;
    order: -1;
    align-items: center;
    align-content: flex-start;
    margin: 0;
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch:not(.workspace-compact-view) > :is(button, .adj-view-count) { display: none; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch:not(.workspace-compact-view) > .adj-workbench-mode-select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 6px 32px 6px 10px;
    border: 0;
    border-radius: 7px;
    background: var(--applet-cut);
    color: var(--applet-ink);
    box-shadow: var(--workspace-cut);
    font: 13px/1.4 var(--font-sans, system-ui);
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-view-switch:not(.workspace-compact-view)::after {
    content: '';
    position: absolute;
    top: calc(50% - 5px);
    right: 15px;
    width: 7px;
    height: 7px;
    border: solid var(--applet-ink);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    pointer-events: none;
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slimbar > :not(.adj-view-switch) { margin: 0; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slimbar .adj-guide-button { margin-right: 0; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-slimbar .adj-slim-actions {
    min-width: 0 !important;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
  }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-controls { gap: 2px; padding-inline: 4px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-room-hand-controls [data-room-hand-range] { flex-basis: 58px; }
  body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-graph-head { padding: 6px; gap: 4px; }
}
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-workbench-mode-select:focus-visible { outline: 2px solid var(--applet-ink); outline-offset: 2px; }
body.windowed-layout [data-win-id="adjacency-planner-hub"] .adj-workbench-mode-select option {
  background: var(--workspace-field);
  color: var(--workspace-plane-ink);
}

/* Focused phone Workbench: one view choice, one contextual tool surface, and
   the live drawing left in charge of the remaining height. The normal desktop
   command strip and all native Planner actions remain mounted unchanged. */
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-root.adj-shell {
  gap: 3px !important;
  padding: 4px max(6px, env(safe-area-inset-right, 0px)) max(4px, env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)) !important;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-slimbar {
  position: relative;
  display: flex !important;
  box-sizing: border-box;
  flex: 0 0 44px;
  width: 100%;
  min-width: 0;
  min-height: 44px !important;
  height: 44px;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 50px 0 0;
  overflow: visible;
  border: 0;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-view-switch {
  position: relative;
  display: flex !important;
  flex: 1 1 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 44px;
  height: 44px;
  align-items: center;
  gap: 0;
  order: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  background: transparent !important;
  box-shadow: none !important;
  flex-wrap: nowrap !important;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-view-switch > :is(.adj-workflow-label, button[data-pane], .adj-view-count) { display: none !important; }
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-view-switch > .adj-workbench-mode-select {
  display: block !important;
  box-sizing: border-box;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  padding: 6px 32px 6px 10px;
  border: 0;
  border-radius: 9px;
  background: var(--applet-cut);
  color: var(--applet-ink);
  box-shadow: var(--workspace-cut);
  font: 13px/1.4 var(--font-sans, system-ui);
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-view-switch::after {
  content: '';
  position: absolute;
  top: calc(50% - 5px);
  right: 14px;
  width: 7px;
  height: 7px;
  border: solid var(--applet-ink);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  pointer-events: none;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-phone-tools-trigger {
  display: inline-flex !important;
  flex: 0 0 44px;
  box-sizing: border-box;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 4px;
  border: 0;
  border-radius: 9px;
  background: var(--applet-raised);
  color: var(--applet-ink);
  box-shadow: var(--workspace-puck);
  font: 650 12px/1.2 var(--font-sans, system-ui);
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-phone-tools-panel:not([open]) { display: none !important; }
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-phone-tools-panel[open] {
  position: fixed;
  inset: auto;
  top: calc(var(--arrange-visual-top, 0px) + 56px + env(safe-area-inset-top, 0px));
  right: max(8px, env(safe-area-inset-right, 0px));
  left: max(8px, env(safe-area-inset-left, 0px));
  z-index: 10020;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: auto;
  max-width: 420px;
  max-height: min(55dvh, calc(var(--arrange-visual-height, 100dvh) - 80px));
  margin: 0 auto;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--applet-edge);
  border-radius: 12px;
  background: var(--v10-glass);
  color: var(--applet-ink);
  box-shadow: var(--workspace-card-rest), 0 10px 26px rgba(0,0,0,.22);
  backdrop-filter: blur(18px) saturate(.75);
  -webkit-backdrop-filter: blur(18px) saturate(.75);
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-phone-tools-panel::backdrop { background: transparent; }
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-phone-tools-panel > button {
  box-sizing: border-box;
  min-width: 0;
  min-height: 44px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: var(--applet-raised);
  color: var(--applet-ink);
  box-shadow: var(--workspace-puck);
  font: 600 13px/1.3 var(--font-sans, system-ui);
  text-align: left;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-phone-tools-panel > button:focus-visible,
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-phone-tools-trigger:focus-visible,
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-workbench-mode-select:focus-visible {
  outline: 2px solid var(--applet-ink);
  outline-offset: 2px;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-slimbar > :not(.adj-view-switch, .adj-graph-selectionbar),
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-view-switch > :not(.adj-workbench-mode-select, .adj-phone-tools-trigger, .adj-phone-tools-panel) {
  display: none !important;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-slimbar > .adj-graph-selectionbar {
  position: absolute;
  z-index: 8;
  top: calc(100% + 3px);
  left: 0;
  display: flex !important;
  max-width: min(100%, 360px);
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-nlbar:not([data-open="true"]) { display: none !important; }
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-nlbar[data-open="true"] {
  position: fixed;
  z-index: 10021;
  right: max(8px, env(safe-area-inset-right, 0px));
  bottom: max(8px, env(safe-area-inset-bottom, 0px));
  left: max(8px, env(safe-area-inset-left, 0px));
  display: flex !important;
  box-sizing: border-box;
  width: auto;
  max-width: none;
  min-width: 0;
  align-items: flex-start;
  padding: 7px;
  border: 1px solid var(--applet-edge);
  border-radius: 12px;
  background: var(--v10-glass);
  box-shadow: var(--workspace-card-rest), 0 10px 28px rgba(0,0,0,.22);
  backdrop-filter: blur(18px) saturate(.75);
  -webkit-backdrop-filter: blur(18px) saturate(.75);
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-slimbar > .adj-nlbar[data-open="true"] {
  box-sizing: border-box;
  width: auto !important;
  min-width: 0 !important;
  max-width: calc(100vw - 16px) !important;
  flex: 0 1 auto !important;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-nlbar[data-open="true"] .adj-nlbar-toggle {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin-right: 6px;
  padding-inline: 8px;
  border-color: var(--applet-edge);
  opacity: 1;
  overflow: visible;
  pointer-events: auto;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-nlbar[data-open="true"] .adj-nlbar-shell {
  width: auto;
  max-width: none;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-nl.is-bar .adj-nl-input[contenteditable="true"] {
  min-height: 44px;
  max-height: min(24dvh, 180px);
  font-size: 16px;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-table[data-view="workspace"] .adj-table-main {
  position: relative;
  display: flex !important;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0 !important;
  overflow: hidden;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-table[data-input="none"] .adj-input-drawer { display: none !important; }
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-table[data-view="workspace"] .adj-workspace-deck {
  display: block !important;
  flex: 1 1 0;
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  overflow: hidden;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-table[data-view="workspace"] .adj-workspace-deck > :is(.adj-graph-panel, .adj-layout-panel, .adj-ledger-panel, .adj-bubble-panel) {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] :is(.adj-graph-canvas-wrap, .adj-plan-preview, .adj-block-canvas-stage) {
  min-height: 0 !important;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-table[data-input]:not([data-input="none"]) .adj-input-drawer {
  position: absolute;
  z-index: 20;
  inset: 4px;
  display: flex;
  box-sizing: border-box;
  width: auto;
  max-width: none;
  height: auto;
  max-height: calc(100% - 8px);
  overflow: auto;
  border: 1px solid var(--applet-edge);
  border-radius: 12px;
  background: var(--applet-material);
  box-shadow: var(--workspace-card-rest), 0 12px 30px rgba(0,0,0,.2);
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-howto-layer {
  position: fixed;
  z-index: 10022;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle-host { top: 4px; right: 6px; }
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  justify-content: center;
}
body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .arrange-planner-lifecycle__launcher > span:not(.arrange-planner-lifecycle__launcher-icon) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
body.workspace-phone-focus .layout > .app-window.workspace-phone-focus-target[data-win-id="adjacency-planner-hub"] .adj-root .adj-slimbar {
  padding: 0 50px 0 0 !important;
  flex-wrap: nowrap !important;
}
body.workspace-phone-focus .layout > .app-window.workspace-phone-focus-target[data-win-id="adjacency-planner-hub"] .adj-root .adj-slimbar .adj-view-switch:not(.workspace-compact-view) {
  flex-wrap: nowrap !important;
  height: 44px !important;
}
body.workspace-phone-focus .layout > .app-window.workspace-phone-focus-target[data-win-id="adjacency-planner-hub"] .adj-root .adj-slimbar .adj-view-switch:not(.workspace-compact-view) > .adj-workbench-mode-select {
  flex: 1 1 0px !important;
  width: 0 !important;
  min-width: 0 !important;
}
@media (max-width: 360px) {
  body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-phone-tools-panel[open] { grid-template-columns: minmax(0, 1fr); }
  body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-graph-head { gap: 3px; padding: 4px 5px; }
  body.workspace-phone-focus [data-win-id="adjacency-planner-hub"] .adj-cg-head.is-summary > span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
