:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #667085;
  --line: #d9e2e7;
  --panel: #ffffff;
  --surface: #f4f7f8;
  --surface-strong: #e9eff2;
  --teal: #007c89;
  --teal-dark: #005f69;
  --coral: #d85f45;
  --amber: #b7791f;
  --green: #21845f;
  --blue: #3b6ea8;
  --shadow: 0 18px 42px rgba(31, 41, 51, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: minmax(290px, 340px) minmax(520px, 1fr) minmax(300px, 360px);
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.panel,
.workspace {
  min-width: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: auto;
}

.input-panel,
.output-panel {
  max-height: calc(100vh - 36px);
  padding: 18px;
}

.brand-row,
.toolbar,
.toolbar-actions,
.tabs {
  display: flex;
  align-items: center;
}

.brand-row {
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 21px;
  line-height: 1.25;
}

h2 {
  margin-bottom: 12px;
  font-size: 16px;
}

.form-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cbd6dc;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input[type="range"] {
  min-height: 24px;
  padding: 0;
  accent-color: var(--teal);
}

.range-value {
  justify-self: end;
  min-width: 44px;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 4px 8px;
  text-align: center;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  margin-bottom: 6px;
}

.checks input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal);
}

.workspace {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-height: calc(100vh - 36px);
}

.toolbar,
.stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.toolbar {
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 10px 12px;
}

.tabs {
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 4px;
}

.tab,
.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
}

.tab {
  min-height: 34px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
}

.tab.active {
  background: #fff;
  color: var(--teal-dark);
  box-shadow: 0 2px 10px rgba(31, 41, 51, 0.1);
}

.toolbar-actions {
  gap: 8px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 38px;
  padding: 0 13px;
}

.primary-button {
  background: var(--teal);
  color: #fff;
}

.secondary-button {
  background: #e7f2f3;
  color: var(--teal-dark);
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.icon-button {
  width: 40px;
  height: 40px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 22px;
}

.stage {
  position: relative;
  overflow: hidden;
  min-height: 650px;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.metrics-strip div {
  display: grid;
  gap: 3px;
  min-height: 72px;
  background: #fff;
  padding: 13px 16px;
}

.metrics-strip span {
  font-size: 24px;
  font-weight: 820;
}

.metrics-strip small {
  color: var(--muted);
  font-size: 12px;
}

.project-strip {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.project-strip div {
  display: grid;
  gap: 3px;
  min-height: 64px;
  background: #fbfdfd;
  padding: 12px 16px;
}

.project-strip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

.project-strip small {
  color: var(--muted);
  font-size: 12px;
}

.animation-view,
.layout-view {
  display: grid;
  gap: 12px;
  min-height: 570px;
  padding: 18px;
}

.layout-view.hidden {
  display: none;
}

.layout-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
}

.layout-tools strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.layout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.layout-actions .secondary-button,
.layout-actions .ghost-button {
  min-height: 34px;
}

.animation-view {
  display: grid;
  gap: 14px;
}

.three-scene {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, #edf3f6 0%, #dfe9ee 100%);
}

.three-scene canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.scene-mode-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  min-height: 34px;
  border: 1px solid rgba(42, 56, 65, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(31, 41, 51, 0.12);
  color: var(--ink);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 780;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.three-scene.realistic-mode .scene-mode-toggle {
  background: rgba(15, 29, 38, 0.82);
  color: #fff;
}

.three-scene-overlay {
  position: absolute;
  bottom: 14px;
  left: 16px;
  z-index: 2;
  display: grid;
  gap: 4px;
  max-width: min(320px, calc(100% - 32px));
  border: 1px solid rgba(201, 215, 220, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  padding: 9px 11px;
  backdrop-filter: blur(8px);
}

.three-scene.realistic-mode .three-scene-overlay {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.three-scene.realistic-mode .station-label-layer {
  opacity: 0;
  pointer-events: none;
}

.three-scene-overlay strong {
  color: var(--ink);
  font-size: 16px;
}

.three-scene-overlay span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.presentation-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.mini-control {
  min-height: 30px;
  border: 1px solid #cbd6dc;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.mini-control.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.presentation-status {
  min-height: 18px;
  color: var(--teal-dark) !important;
}

.station-label-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.station-label {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 118px;
  color: #0b326b;
  font-size: 9.5px;
  font-weight: 820;
  line-height: 1.25;
  pointer-events: auto;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.station-label::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 19px;
  width: 1px;
  height: 20px;
  background: rgba(11, 50, 107, 0.34);
  transform: rotate(18deg);
  transform-origin: top;
}

.station-badge {
  display: grid;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 2px solid #2d63b8;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(31, 78, 137, 0.18);
  color: #2358a6;
  font-size: 10px;
}

.station-label span:last-child {
  border: 1px solid rgba(45, 99, 184, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 4px 12px rgba(31, 78, 137, 0.1);
  padding: 3px 5px;
  backdrop-filter: blur(6px);
}

.station-label.selected .station-badge {
  border-color: var(--teal);
  background: #e7f7f6;
  color: var(--teal);
}

.station-label.selected span:last-child {
  border-color: rgba(0, 124, 137, 0.35);
  color: var(--teal);
}

.station-label.presenting .station-badge {
  border-color: #d85f45;
  background: #fff3ef;
  color: #d85f45;
  box-shadow: 0 0 0 5px rgba(216, 95, 69, 0.14), 0 8px 20px rgba(216, 95, 69, 0.2);
}

.station-label.presenting span:last-child {
  border-color: rgba(216, 95, 69, 0.36);
  color: #9d3d29;
}

.flow-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  border-radius: 8px;
  background: linear-gradient(145deg, #f8fafc 0%, #eef4f7 100%);
}

.grid-plane {
  fill: url(#floorGradient);
  stroke: #c9d7dc;
  stroke-width: 1.5;
}

.iso-floor {
  fill: url(#engineeringGrid);
  stroke: #d4e0e4;
  stroke-width: 1.5;
}

.drawing-title {
  fill: var(--ink);
  font-size: 18px;
  font-weight: 820;
}

.drawing-note {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.main-flow,
.pallet-flow {
  fill: none;
  stroke: var(--teal);
  stroke-dasharray: 8 8;
  stroke-linecap: round;
  stroke-width: 3;
}

.machine rect {
  fill: #ffffff;
  stroke: #758992;
  stroke-width: 2;
}

.iso-machine .iso-top,
.iso-machine .iso-front,
.iso-machine .iso-side,
.pallet-deck {
  stroke: #758992;
  stroke-linejoin: round;
  stroke-width: 2;
}

.machine-rail {
  fill: none;
  stroke: rgba(0, 124, 137, 0.62);
  stroke-linecap: round;
  stroke-width: 3;
}

.status-light {
  fill: #2ecc71;
  stroke: #0d8b50;
  stroke-width: 2;
}

.belt-legs path {
  fill: none;
  stroke: rgba(86, 103, 112, 0.5);
  stroke-linecap: round;
  stroke-width: 2;
}

.iso-machine .iso-top {
  fill: #ffffff;
}

.iso-machine .iso-front {
  fill: #e9eff2;
}

.iso-machine .iso-side {
  fill: #d6e0e4;
}

.iso-machine.main .iso-top {
  fill: #e9faf6;
  stroke: var(--teal);
  stroke-width: 3;
}

.iso-machine.main .iso-front {
  fill: #d8f1eb;
}

.iso-machine.main .iso-side {
  fill: #b9ded5;
}

.machine-window {
  fill: rgba(255, 255, 255, 0.72);
  stroke: #93a4ab;
  stroke-width: 1.5;
}

.module-node {
  cursor: pointer;
  outline: none;
}

.module-node:hover rect,
.module-node:focus rect,
.module-node.selected rect {
  stroke: var(--teal);
  stroke-width: 4;
}

.module-node:hover .iso-top,
.module-node:focus .iso-top,
.module-node.selected .iso-top,
.module-node:hover .pallet-deck,
.module-node:focus .pallet-deck,
.module-node.selected .pallet-deck {
  stroke: var(--teal);
  stroke-width: 4;
}

.inspection-points.module-node:hover circle,
.inspection-points.module-node:focus circle,
.inspection-points.module-node.selected circle {
  fill: #e7f7f6;
}

.robot.module-node:hover .robot-base,
.robot.module-node:focus .robot-base,
.robot.module-node.selected .robot-base,
.pallet.module-node:hover > rect,
.pallet.module-node:focus > rect,
.pallet.module-node.selected > rect {
  stroke: var(--teal);
  stroke-width: 4;
}

.machine.main rect {
  fill: #edf8f6;
  stroke: var(--teal);
  stroke-width: 3;
}

.machine text,
.robot text,
.safety-cell text {
  text-anchor: middle;
  fill: var(--ink);
  font-size: 15px;
  font-weight: 760;
}

.machine .machine-sub {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.belt {
  fill: url(#beltGradient);
  stroke: #7b9099;
  stroke-width: 1.5;
}

.iso-belt {
  fill: url(#greenBelt);
  stroke: #0d8b50;
  stroke-linejoin: round;
  stroke-width: 2;
}

.belt-small {
  opacity: 0.94;
}

.belt-return {
  opacity: 0.62;
}

.inspection-points circle {
  fill: #fff;
  stroke: var(--teal);
  stroke-width: 3;
}

.inspection-points text,
.dimension-lines text {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
}

.safety-cell polygon {
  fill: rgba(245, 197, 66, 0.1);
  stroke: #d7aa00;
  stroke-width: 2.5;
}

.safety-cell path {
  fill: none;
  stroke: #d7aa00;
  stroke-width: 2;
}

.product,
.case-box,
.stack-box {
  stroke: rgba(31, 41, 51, 0.25);
  stroke-width: 1.5;
}

.product {
  animation: productMove var(--product-speed, 6s) linear infinite;
}

.case-box {
  animation: caseMove var(--case-speed, 8s) linear infinite;
}

.robot {
  transform-origin: 258px 214px;
  animation: robotSweep var(--robot-speed, 5s) ease-in-out infinite;
}

.paused .product,
.paused .case-box,
.paused .robot {
  animation-play-state: paused;
}

.robot-base {
  fill: #eef2f4;
  stroke: #5a6b77;
  stroke-width: 4;
}

.robot-column {
  fill: #f8fafb;
  stroke: #60727d;
  stroke-width: 3;
}

.robot-link {
  stroke: #4f6673;
  stroke-linecap: round;
  stroke-width: 14;
}

.robot-link.second {
  stroke: #718590;
}

.gripper {
  fill: #d85f45;
}

.pallet-deck {
  fill: #a6794f;
}

.stack-box {
  fill: #d99f64;
}

.empty-pallets polygon {
  fill: rgba(166, 121, 79, 0.42);
  stroke: rgba(105, 80, 54, 0.45);
  stroke-width: 1.2;
}

.dimension-lines path {
  fill: none;
  stroke: #8ea1a9;
  stroke-width: 1.5;
}

.module-inspector {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.module-inspector h2,
.module-inspector h3,
.module-inspector p {
  margin-bottom: 0;
}

.module-inspector h3 {
  color: var(--ink);
  font-size: 14px;
}

.module-inspector p {
  color: var(--muted);
  line-height: 1.55;
}

.module-detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 14px;
}

.module-detail-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
  padding: 12px;
}

.module-detail-grid ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.module-detail-grid li {
  margin-bottom: 7px;
  color: var(--muted);
  line-height: 1.38;
}

.module-costs {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.module-costs div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}

.module-costs dt {
  color: var(--muted);
}

.module-costs dd {
  margin: 0;
  font-weight: 820;
  text-align: right;
}

@keyframes productMove {
  from { transform: translate(55px, 12px); opacity: 0; }
  10% { opacity: 1; }
  82% { opacity: 1; }
  to { transform: translate(-785px, -214px); opacity: 0; }
}

@keyframes caseMove {
  from { transform: translate(0, 0); opacity: 0; }
  8% { opacity: 1; }
  78% { opacity: 1; }
  to { transform: translate(-300px, -118px); opacity: 0; }
}

@keyframes robotSweep {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(7deg); }
}

.layout-board {
  position: relative;
  width: 100%;
  min-height: 530px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-image: linear-gradient(#d7e2e5 1px, transparent 1px), linear-gradient(90deg, #d7e2e5 1px, transparent 1px);
  background-size: 32px 32px;
  background-color: #f8fbfb;
  overflow: hidden;
}

.layout-board.has-customer-layout {
  background-color: #eef3f5;
  background-image: linear-gradient(rgba(215, 226, 229, 0.55) 1px, transparent 1px), linear-gradient(90deg, rgba(215, 226, 229, 0.55) 1px, transparent 1px);
}

.customer-layout-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.58;
  filter: saturate(0.76) contrast(1.06);
}

.cad-layout-card {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 1;
  display: grid;
  gap: 8px;
  max-width: min(430px, calc(100% - 36px));
  border: 1px solid rgba(45, 99, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(31, 41, 51, 0.14);
  padding: 14px;
  backdrop-filter: blur(8px);
}

.cad-layout-card strong {
  color: var(--ink);
  font-size: 15px;
}

.cad-layout-card span,
.cad-layout-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.cad-layout-card code {
  justify-self: start;
  border-radius: 6px;
  background: #e8f1f8;
  color: #2358a6;
  padding: 4px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.cad-layout-card.converting {
  border-color: rgba(183, 121, 31, 0.32);
}

.cad-layout-card.converting code {
  background: #fff3d6;
  color: #8a5a12;
}

.cad-layout-card.error {
  border-color: rgba(216, 95, 69, 0.34);
}

.cad-layout-card.error code {
  background: #fdece8;
  color: #a33d28;
}

.layout-board.has-customer-layout::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(248, 251, 251, 0.12), rgba(248, 251, 251, 0.3));
  pointer-events: none;
}

.layout-note {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  max-width: 280px;
  border: 1px solid rgba(0, 124, 137, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(31, 41, 51, 0.12);
  color: var(--muted);
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  backdrop-filter: blur(8px);
}

.layout-module {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 2px solid #8da2aa;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 780;
  text-align: center;
  box-shadow: 0 8px 18px rgba(31, 41, 51, 0.1);
}

.layout-board.has-customer-layout .layout-module {
  border-color: rgba(0, 124, 137, 0.78);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(31, 41, 51, 0.16);
  backdrop-filter: blur(3px);
}

.layout-module.primary {
  border-color: var(--teal);
  background: #f0fbfb;
}

.layout-module.warning {
  border-color: var(--coral);
  background: #fff5f1;
}

.hidden {
  display: none;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 14px;
  padding: 16px;
}

.summary-card.accent {
  background: #edf8f6;
  border-color: #b9dcda;
}

.authority-card {
  background: linear-gradient(180deg, #ffffff 0%, #f5faf9 100%);
  border-color: #a9d0cd;
}

.authority-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: end;
}

.authority-header strong {
  color: var(--teal-dark);
  font-size: 42px;
  line-height: 0.95;
}

.authority-header span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
  padding-bottom: 3px;
}

.maturity-bar {
  height: 8px;
  margin: 14px 0;
  border-radius: 999px;
  background: #dbe7e9;
  overflow: hidden;
}

.maturity-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--green));
  transition: width 180ms ease;
}

.summary-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.route-list,
.risk-list,
.expert-list {
  margin: 0;
  padding-left: 20px;
}

.route-list li,
.risk-list li,
.expert-list li {
  margin-bottom: 9px;
  line-height: 1.4;
}

.risk-list li.ok,
.expert-list li.ok {
  color: var(--green);
}

.risk-list li.warn,
.expert-list li.warn {
  color: var(--amber);
}

.risk-list li.alert,
.expert-list li.alert {
  color: var(--coral);
}

.expert-list {
  display: grid;
  gap: 8px;
  padding-left: 0;
  list-style: none;
}

.expert-list li {
  position: relative;
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 10px 10px 28px;
  font-size: 13px;
}

.expert-list li::before {
  position: absolute;
  top: 13px;
  left: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.spec-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.spec-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 9px;
}

.spec-list dt {
  color: var(--muted);
}

.spec-list dd {
  margin: 0;
  font-weight: 780;
  text-align: right;
}

.compact-actions {
  display: grid;
  gap: 10px;
}

.saved-projects {
  display: grid;
  gap: 8px;
}

.saved-project {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
  padding: 10px;
}

.saved-project strong,
.saved-project small {
  display: block;
}

.saved-project small {
  color: var(--muted);
  margin-top: 3px;
}

.mini-actions {
  display: flex;
  gap: 6px;
}

.mini-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  padding: 0 8px;
}

.status-line {
  min-height: 20px;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}

.full {
  width: 100%;
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .output-panel {
    grid-column: 1 / -1;
    max-height: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .summary-card {
    margin-bottom: 0;
  }
}

@media (max-width: 840px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .input-panel,
  .output-panel {
    max-height: none;
  }

  .workspace {
    min-height: auto;
  }

  .toolbar,
  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs,
  .toolbar-actions {
    width: 100%;
  }

  .tab,
  .toolbar-actions button {
    flex: 1;
  }

  .metrics-strip,
  .project-strip,
  .output-panel {
    grid-template-columns: 1fr;
  }

  .stage {
    min-height: 520px;
  }

  .animation-view,
  .layout-view {
    min-height: 420px;
    padding: 10px;
  }

  .flow-svg,
  .layout-board {
    min-height: 390px;
  }

  .module-detail-grid {
    grid-template-columns: 1fr;
  }
}