:root { color-scheme: light; font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif; font-size: 13px; background: #f5f6f8; color: #273640; }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 360px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  background: #246c87;
  border: 1px solid #1d5a72;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  min-height: 34px;
  padding: 7px 10px;
}

button:hover {
  background: #1b586f;
}

button:disabled {
  background: #87939a;
  border-color: #87939a;
  cursor: wait;
}

body.global-busy button:not(:disabled) {
  cursor: progress;
}

.topbar { align-items: center; background: #fff; border-bottom: 1px solid #dfe5e8; color: #273640; display: flex; gap: 16px; height: 64px; justify-content: space-between; padding: 12px 24px; }

.topbar h1 { font-size: 17px; font-weight: 600; line-height: 1.3; margin: 0; }

.topbar p { color: #71808a; font-size: 12px; margin: 5px 0 0; }

.workbench-layout { display: grid; gap: 16px; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 64px); height: calc(100dvh - 64px); padding: 16px; }

.sidebar,
.viewport-panel { background: #fff; border: 1px solid #dfe5e8; border-radius: 10px; min-height: 0; min-width: 0; }

.sidebar { overflow: auto; padding: 18px; scrollbar-width: thin; }

.tool-section + .tool-section {
  border-top: 1px solid #dce4e9;
  margin-top: 14px;
  padding-top: 14px;
}

.tool-section h2 {
  font-size: 15px;
  margin: 0 0 10px;
}

.resource-strip {
  border-bottom: 1px solid #dce4e9;
  padding-bottom: 10px;
}

.resource-strip > h2 {
  font-size: 12px;
  letter-spacing: 0;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.resource-buttons {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-button {
  align-items: center;
  background: #f7f9fa;
  border-color: #b9c6ce;
  color: #2c3d47;
  display: flex;
  flex-direction: column;
  font-size: 11px;
  gap: 3px;
  min-height: 52px;
  min-width: 0;
  padding: 6px 4px;
}

.resource-button:hover,
.resource-button[aria-selected="true"] {
  background: #e7f1f4;
  border-color: #4d8699;
  color: #174e62;
}

.resource-mark {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 3px;
  display: inline-flex;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  height: 20px;
  justify-content: center;
  min-width: 24px;
  padding: 0 3px;
}

.resource-panel {
  background: #f8fafb;
  border: 1px solid #cbd6dc;
  margin-top: 8px;
  padding: 9px;
}

.resource-panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.panel-close {
  background: transparent;
  border: 0;
  color: #4a5b65;
  font-size: 20px;
  line-height: 1;
  min-height: 28px;
  padding: 0 6px;
}

.panel-close:hover {
  background: #e5ecef;
}

.modeling-section {
  border-top: 0 !important;
  margin-top: 10px !important;
  padding-top: 0 !important;
}

.section-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
}

.section-title-row h2 {
  font-size: 17px;
  margin: 1px 0 0;
}

.section-kicker {
  color: #52707f;
  font-size: 10px;
  font-weight: 700;
}

.scene-selection-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.summary {
  background: #eef7f4;
  border-left: 4px solid #2b836b;
  color: #24433d;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 10px;
  padding: 9px 10px;
}

.compact-summary,
.resource-panel .summary {
  display: -webkit-box;
  max-height: 64px;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.manual-path {
  margin-top: 10px;
}

.manual-path summary {
  color: #33444f;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.wide-button {
  width: 100%;
}

.fields {
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr;
  margin-bottom: 12px;
}

.parameter-groups {
  margin-top: 8px;
}

.parameter-group {
  border-bottom: 1px solid #d6e0e6;
  border-top: 1px solid #d6e0e6;
  margin-bottom: 7px;
}

.parameter-group + .parameter-group {
  border-top: 0;
  margin-top: -7px;
}

.parameter-group > summary {
  align-items: center;
  background: #f7f9fa;
  color: #263842;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: space-between;
  list-style: none;
  min-height: 38px;
  padding: 8px 9px;
}

.parameter-group > summary::-webkit-details-marker {
  display: none;
}

.parameter-group > summary::after {
  color: #607782;
  content: "+";
  font-family: Consolas, "Courier New", monospace;
  font-size: 16px;
  margin-left: 8px;
}

.parameter-group[open] > summary::after {
  content: "−";
}

.parameter-group > summary small {
  color: #6d7d86;
  font-size: 10px;
  font-weight: 400;
  margin-left: auto;
}

.parameter-group-body {
  padding: 10px 9px 2px;
}

.parameter-group-body.fields {
  margin-bottom: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.field span {
  color: #40505b;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #b9c6ce;
  border-radius: 6px;
  color: #172027;
  min-height: 34px;
  padding: 7px 9px;
  width: 100%;
}

textarea {
  line-height: 1.4;
  min-height: 88px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #246c87;
  outline: 2px solid #b7d9e5;
}

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

.actions { background: #fff; border-top: 1px solid #dfe5e8; bottom: -18px; margin: 16px -18px -18px; padding: 12px 18px 18px; position: sticky; z-index: 6; }

.section-heading-row {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin: 12px 0 8px;
}

.section-heading-row h2 {
  margin: 0;
}

.secondary-button,
.icon-text-button {
  background: #f7f9fa;
  border-color: #aebdc6;
  color: #22333d;
}

.secondary-button:hover,
.icon-text-button:hover {
  background: #e9f0f3;
}

.panel-note {
  color: #60717c;
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 9px;
}

.blast-preset-panel {
  align-items: end;
  border: 1px solid #c7d6dd;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 10px 0;
  padding: 9px;
}

.blast-targets {
  display: grid;
  gap: 6px;
}

.blast-target-row {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 20px minmax(70px, 1fr) minmax(90px, 1fr);
}

.blast-target-row input {
  min-height: 18px;
  width: 18px;
}

.blast-target-row span {
  font-size: 11px;
}

.compare-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 9px;
}

.assembly-list {
  display: grid;
  gap: 9px;
}

.assembly-card {
  border: 1px solid #cad6dd;
  border-radius: 6px;
  padding: 9px;
}

.assembly-card-header {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 8px;
}

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

.mini-actions button {
  min-height: 28px;
  padding: 4px 8px;
}

.danger-button {
  background: #fff;
  border-color: #bd6b6b;
  color: #8b2929;
}

.danger-button:hover {
  background: #fbeeee;
}

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

.compact-field {
  margin-bottom: 0;
  min-width: 0;
}

.compact-field span {
  font-size: 11px;
}

.compact-field input,
.compact-field select {
  min-width: 0;
}

.viewport-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.viewport-toolbar { align-items: center; background: #fff; border-bottom: 1px solid #dfe5e8; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding: 14px 18px; }

.viewport-toolbar strong {
  font-size: 14px;
}

.viewport-heading {
  align-items: center;
  display: flex;
  gap: 12px;
}

.viewport-mode-switch {
  background: #e7edf0;
  border: 1px solid #c4d0d7;
  border-radius: 6px;
  display: inline-flex;
  padding: 2px;
}

.viewport-mode-switch button {
  background: transparent;
  border: 0;
  color: #465963;
  font-size: 12px;
  min-height: 28px;
  padding: 4px 9px;
}

.viewport-mode-switch button:hover {
  background: #d9e4e9;
}

.viewport-mode-switch button.active {
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 35, 45, 0.12);
  color: #174e62;
  font-weight: 700;
}

.viewport-buttons {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.viewport-buttons button {
  background: #fdfefe;
  border-color: #b9c6ce;
  color: #22333d;
  font-size: 12px;
  min-height: 30px;
  padding: 4px 8px;
}

.viewport-buttons button:hover,
.viewport-buttons button.active {
  background: #e4f1f5;
  border-color: #6d9fb2;
  color: #174e62;
}

.viewport-select {
  align-items: center;
  color: #556872;
  display: inline-flex;
  font-size: 11px;
  gap: 5px;
}

.viewport-select select {
  font-size: 12px;
  min-height: 30px;
  padding: 4px 24px 4px 7px;
  width: auto;
}

.context-status {
  align-items: center;
  background: #f8fafb;
  border-bottom: 1px solid #d6e0e6;
  color: #33444f;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 7px;
  line-height: 1.45;
  padding: 7px 10px;
}

.context-status.warning {
  background: #fff6e5;
  color: #6f4c13;
}

.context-chip {
  align-items: center;
  background: #edf2f4;
  border: 1px solid #d4dfe4;
  border-radius: 4px;
  display: inline-flex;
  gap: 5px;
  max-width: min(280px, 35vw);
  padding: 3px 6px;
}

.context-chip b {
  color: #657781;
  font-size: 10px;
  font-weight: 700;
}

.context-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-state {
  border-radius: 4px;
  font-size: 11px;
  margin-left: auto;
  padding: 3px 7px;
}

.context-state.ok {
  background: #e2f2e8;
  color: #276341;
}

.context-state.warning {
  background: #f8dfad;
  color: #744c0a;
}

.summary.warning {
  background: #fff6e5;
  border-left-color: #b57916;
  color: #6f4c13;
}

.summary.pending {
  background: #edf5f8;
  border-left-color: #397d96;
  color: #28556a;
}

.model-viewport {
  background: #20282e;
  cursor: grab;
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

.model-viewport:active {
  cursor: grabbing;
}

.model-viewport.result-mode {
  cursor: default;
}

.model-viewport.result-mode .selection-panel {
  display: none;
}

.viewport-grid {
  display: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(73, 184, 143, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 184, 143, 0.18) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px, 220px 220px, 220px 220px;
  inset: 0;
  opacity: 0.85;
  position: absolute;
  transform: perspective(900px) rotateX(58deg) scale(1.4);
  transform-origin: center 64%;
}

.axis-widget {
  display: none;
  bottom: 18px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  height: 70px;
  left: 18px;
  position: absolute;
  width: 70px;
}

.solve-section {
  display: grid;
  gap: 9px;
}

.inspector-heading {
  display: grid;
  gap: 1px;
  margin: 1px 2px 8px;
}

.inspector-heading strong {
  font-size: 16px;
}

.inspector-tabs {
  border-bottom: 1px solid #cbd5dc;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 -10px 10px;
  position: sticky;
  top: -10px;
  z-index: 8;
}

.inspector-tab {
  background: #f3f6f8;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #455862;
  font-size: 11px;
  min-height: 38px;
  padding: 6px 2px;
  position: relative;
}

.inspector-tab:hover {
  background: #e9f0f3;
}

.inspector-tab.active {
  background: #fff;
  border-bottom-color: #246c87;
  color: #174e62;
  font-weight: 700;
}

.inspector-tab.has-update::after {
  background: #c84c4c;
  border-radius: 50%;
  content: "";
  height: 6px;
  position: absolute;
  right: 5px;
  top: 5px;
  width: 6px;
}

.inspector-panel h2 {
  font-size: 15px;
  margin: 0 0 9px;
}

.panel-header-copy p {
  color: #64747d;
  font-size: 11px;
  line-height: 1.4;
  margin: -4px 0 9px;
}

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

.primary-action-stack {
  display: grid;
  gap: 7px;
}

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

.qualification-badge {
  background: #edf2f4;
  border: 1px solid #cfd9de;
  border-radius: 4px;
  color: #344750;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
}

.qualification-badge strong {
  font-size: 12px;
}

.qualification-badge small {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.qualification-badge[data-state="passed"] {
  background: #e9f6ee;
  border-color: #86b99a;
  color: #245d3b;
}

.qualification-badge[data-state="failed"] {
  background: #fff0ef;
  border-color: #d59b95;
  color: #862f28;
}

.qualification-badge[data-state="warning"] {
  background: #fff6e5;
  border-color: #d8b06b;
  color: #745015;
}

.subsection {
  border-top: 1px solid #dce4e9;
  margin-top: 14px;
  padding-top: 14px;
}

.solve-field {
  margin-top: 4px;
}

.solve-resource-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-field {
  min-width: 0;
}

.compact-field input {
  min-width: 0;
  width: 100%;
}

.solve-confirmation-field {
  margin-top: 2px;
}

.command-preview {
  background: #f7f9fa;
  border: 1px solid #d6e0e6;
  border-radius: 6px;
  color: #33444f;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  padding: 8px;
}

.solve-button {
  margin-top: 2px;
}

.model-canvas {
  display: block;
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
  z-index: 2;
}

.phase17-canvas {
  cursor: default;
  z-index: 3;
}

.phase17-mode-control {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 8px 0;
}

.phase17-mode-control button.active {
  background: #246c87;
  border-color: #246c87;
  color: #fff;
}

.phase17-panel-tabs {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 8px 0 10px;
}

.phase17-panel-tabs button.active {
  background: #e8f3f6;
  border-color: #287995;
  color: #173c4a;
}

.phase17-instance-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.phase17-component-summary {
  background: #eef5f4;
  border-left: 3px solid #2f8f78;
  display: grid;
  gap: 6px;
  margin: 8px 0;
  padding: 9px 10px;
}

.phase17-component-summary:empty {
  display: none;
}

.phase17-component-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.phase17-component-summary span {
  background: #fff;
  border: 1px solid #cddadd;
  border-radius: 4px;
  color: #31444b;
  font-size: 12px;
  padding: 3px 6px;
}

.phase17-library-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.phase17-library-item {
  align-items: center;
  border: 1px solid #d5e0e5;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.phase17-library-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.phase17-library-item small {
  color: #5b6b73;
  line-height: 1.35;
}

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

.phase17-ground-response {
  border: 1px solid #c7d5dc;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 10px;
}

.phase17-ground-response legend {
  color: #253943;
  font-size: 14px;
  font-weight: 700;
  padding: 0 5px;
}

.toggle-field {
  align-items: center;
  display: flex;
  gap: 8px;
}

.toggle-field input {
  height: 18px;
  width: 18px;
}

#phase17GroundCraterStatus {
  margin-bottom: 0;
}

#phase17EditorPanel .summary {
  margin-bottom: 10px;
}

.axis-widget span {
  position: absolute;
}

.part-legend {
  background: rgba(248, 250, 251, 0.95);
  border: 1px solid rgba(214, 224, 230, 0.95);
  border-radius: 6px;
  color: #172027;
  display: grid;
  gap: 6px;
  max-height: 62%;
  max-width: 230px;
  overflow: auto;
  padding: 8px 10px;
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 4;
}

.part-legend-item {
  border-radius: 4px;
  cursor: pointer;
  padding: 2px 4px;
}

.part-legend-item:hover,
.part-legend-item.selected {
  background: #dfecef;
}

.part-legend-title {
  font-size: 13px;
  font-weight: 700;
}

.part-legend-item {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: auto auto minmax(0, 1fr);
  min-height: 22px;
}

.part-legend-item input {
  margin: 0;
  min-height: 0;
  padding: 0;
  width: auto;
}

.part-swatch {
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 2px;
  display: inline-block;
  height: 12px;
  width: 12px;
}

.part-name {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-panel {
  background: rgba(248, 250, 251, 0.96);
  border: 1px solid rgba(214, 224, 230, 0.96);
  border-radius: 6px;
  bottom: 12px;
  color: #172027;
  display: grid;
  gap: 7px;
  left: 12px;
  max-width: min(340px, calc(100% - 24px));
  padding: 9px 10px;
  position: absolute;
  z-index: 5;
}

.selection-panel-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.selection-panel-heading strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-panel-heading button {
  background: transparent;
  border: 0;
  color: #526670;
  font-size: 18px;
  min-height: 24px;
  padding: 0 4px;
}

.selection-meta {
  color: #60727c;
  font-size: 11px;
  line-height: 1.45;
}

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

.selection-actions button {
  font-size: 11px;
  min-height: 28px;
  padding: 4px 8px;
}

.result-empty-state {
  align-items: center;
  background: rgba(22, 30, 35, 0.78);
  color: #e5edf1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  inset: 0;
  justify-content: center;
  padding: 32px;
  position: absolute;
  text-align: center;
  z-index: 4;
}

.result-empty-state strong {
  font-size: 17px;
}

.result-empty-state span {
  color: #bccbd2;
  font-size: 13px;
  line-height: 1.6;
  max-width: 560px;
}

.result-controls {
  align-items: center;
  background: #f7f9fa;
  border-top: 1px solid #cbd5dc;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 0.8fr) auto minmax(160px, 1fr) auto auto;
  padding: 8px 10px;
}

.result-controls > div {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: auto minmax(0, 1fr);
}

.result-controls strong,
.result-controls output {
  font-size: 11px;
  white-space: nowrap;
}

.result-controls select,
.result-controls button {
  font-size: 12px;
  min-height: 30px;
  padding-bottom: 4px;
  padding-top: 4px;
}

.result-controls input[type="range"] {
  min-height: 24px;
  padding: 0;
}

.viewport-panel:fullscreen {
  border: 0;
  border-radius: 0;
  height: 100vh;
  width: 100vw;
}

.viewport-panel:fullscreen .model-viewport {
  min-height: 0;
}

.axis-x {
  color: #ff6f61;
  left: 48px;
  top: 42px;
}

.axis-y {
  color: #67d77f;
  left: 20px;
  top: 4px;
}

.axis-z {
  color: #74a7ff;
  left: 4px;
  top: 46px;
}

.viewer-hint,
.preview-box {
  align-items: center;
  color: #dce8ed;
  display: flex;
  font-size: 15px;
  inset: 0;
  justify-content: center;
  padding: 22px;
  position: absolute;
  text-align: center;
  z-index: 3;
}

.preview-box {
  background: rgba(32, 40, 46, 0.82);
}

.preview-box img {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: block;
  max-height: 100%;
  max-width: 100%;
}

.hidden {
  display: none;
}

.projects,
.result {
  background: #f8fafb;
  border: 1px solid #d6e0e6;
  border-radius: 6px;
  min-height: 90px;
  padding: 10px;
}

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

.impact-risk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 9px 0;
}

.impact-section .summary {
  background: #f3f6f8;
  border-left-color: #708894;
  color: #31454f;
}

.risk-chip {
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
}

.risk-low {
  background: #dcefe4;
  border-color: #8ebda0;
  color: #1f5c37;
}

.risk-attention {
  background: #fff2bf;
  border-color: #d8b84f;
  color: #715600;
}

.risk-high {
  background: #ffe0bd;
  border-color: #db9650;
  color: #7d3d00;
}

.risk-severe {
  background: #f8d3d5;
  border-color: #d7767d;
  color: #861f29;
}

.risk-unavailable {
  background: #e7ecef;
  border-color: #aebbc3;
  color: #52616a;
}

.impact-objects {
  display: grid;
  gap: 5px;
  margin-top: 9px;
  max-height: 250px;
  overflow: auto;
}

.impact-object {
  align-items: center;
  background: #f8fafb;
  border: 1px solid #d6e0e6;
  border-radius: 4px;
  color: #172832;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 36px;
  padding: 6px 8px;
  text-align: left;
  width: 100%;
}

.impact-object-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.impact-detail {
  background: #f8fafb;
  border-left: 4px solid #2b7a78;
  margin-top: 9px;
  padding: 8px 10px;
}

.impact-detail h3 {
  font-size: 14px;
  margin: 0 0 7px;
}

.impact-metric {
  display: flex;
  font-size: 12px;
  gap: 8px;
  justify-content: space-between;
  padding: 3px 0;
}

.project-item {
  align-items: center;
  border-bottom: 1px solid #e4ebef;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding-bottom: 8px;
}

.project-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.project-name {
  font-weight: 700;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-source {
  color: #65747e;
  font-size: 12px;
}

.result {
  max-height: 360px;
  overflow: auto;
  white-space: normal;
}

.status {
  color: #40505b;
}

.operation-summary {
  display: grid;
  gap: 10px;
}

.operation-summary h3 {
  font-size: 16px;
  margin: 0;
}

.summary-list {
  display: grid;
  gap: 6px;
  margin: 0;
}

.summary-row {
  display: grid;
  gap: 4px;
}

.summary-label {
  color: #60717c;
  font-size: 12px;
}

.summary-value {
  color: #172832;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.detail-json {
  background: #ffffff;
  border: 1px solid #d6e0e6;
  border-radius: 6px;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  white-space: pre-wrap;
}

.error {
  color: #9b1c1c;
}

@media (max-width: 1080px) {

  .viewport-toolbar {
    grid-template-columns: 1fr;
  }

  .viewport-buttons {
    justify-content: flex-start;
  }

  .model-viewport {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    height: auto;
  }

  .workbench-layout {
    height: auto;
  }

  .actions,
  .config-actions {
    grid-template-columns: 1fr;
  }

  .viewport-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .viewport-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .viewport-select {
    width: 100%;
  }

  .viewport-select select {
    flex: 1;
  }

  .context-state {
    margin-left: 0;
  }

  .result-controls {
    grid-template-columns: 1fr;
  }
}
