  .cim-canvas {
    position: relative;
    flex: 1;
    min-height: 360px;
    border: 1px solid #cbded1;
    border-radius: 8px;
    background: #ffffff;
    overflow: auto;
    cursor: grab;
  }

  .cim-canvas.drag-over {
    border-color: #00662C;
    background: #f1fbf3;
  }

  .cim-canvas.panning {
    cursor: grabbing;
  }

  .cim-graph-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-left: auto;
    padding: 2px 0;
    color: #345346;
    font-size: 10px;
    font-weight: 700;
  }

  .cim-graph-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
  }

  .cim-legend-symbol {
    width: 38px;
    height: 12px;
    overflow: visible;
  }

  .cim-legend-symbol path.cim-match,
  .cim-legend-symbol path.selected,
  .cim-legend-symbol path.available,
  .cim-legend-symbol path.inheritance {
    fill: none;
    stroke: #5d7f72;
    stroke-width: 1.8;
    stroke-linecap: round;
  }

  .cim-legend-symbol path.xsd-only {
    fill: none;
    stroke: #c43d3d;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .cim-legend-symbol marker path {
    fill: #5d7f72;
    stroke: none;
  }

  .cim-legend-symbol marker path.inheritance-marker {
    fill: #856f36;
  }

  .cim-legend-mult {
    color: #17372a;
    font-size: 10px;
    line-height: 1;
  }

  .cim-legend-node {
    width: 16px;
    height: 12px;
    border-radius: 4px;
    border: 1px solid;
    display: inline-block;
  }

  .cim-legend-node.normal-class {
    border-color: #d8ad6f;
    background: #fff1dc;
  }

  .cim-legend-node.enumeration {
    border-color: #95c8a0;
    background: #e8f8ec;
  }

  .cim-canvas-hint {
    position: absolute;
    top: 14px;
    left: 14px;
    color: #6c7d70;
    font-size: 12px;
  }

  .cim-graph-stage {
    position: relative;
    min-width: 100%;
    min-height: 100%;
    background:
      linear-gradient(rgba(28, 73, 48, 0.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(28, 73, 48, 0.045) 1px, transparent 1px),
      #ffffff;
    background-size: 28px 28px;
  }

  .cim-graph-zoom-layer {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
  }

  .cim-graph-edges {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 1;
  }

  .cim-graph-edges marker path {
    fill: #55786a;
    stroke: none;
  }

  .cim-graph-edge {
    fill: none;
    stroke: #5d7f72;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
  }

  .cim-graph-edge.inheritance {
    stroke: #5d7f72;
    stroke-dasharray: 0;
  }

  .cim-graph-edge.available {
    stroke-dasharray: 0;
    opacity: 0.9;
  }

  .cim-graph-edge.self-loop {
    stroke: #3f705c;
    stroke-width: 2.3;
    opacity: 0.98;
  }

  .cim-graph-edge.xsd-only {
    stroke: #c43d3d;
    stroke-width: 2;
    opacity: 0.95;
  }

  .cim-graph-edge-label-wrap {
    pointer-events: auto;
    cursor: grab;
  }

  .cim-graph-edge-label-wrap rect {
    fill: rgba(255, 255, 255, 0.88);
    stroke: none;
  }

  .cim-graph-edge-label-wrap.self-loop rect {
    fill: rgba(247, 252, 249, 0.9);
  }

  .cim-graph-edge-label-wrap.dragging {
    cursor: grabbing;
  }

  .cim-graph-edge-label-wrap.dragging rect {
    fill: rgba(255, 255, 255, 0.97);
    filter: drop-shadow(0 4px 8px rgba(30, 62, 45, 0.18));
  }

  .cim-graph-edge-label {
    fill: #17372a;
    font-size: 10px;
    font-weight: 800;
    dominant-baseline: middle;
    text-anchor: middle;
    pointer-events: none;
  }

  .cim-graph-edge-label-wrap.xsd-only rect {
    fill: rgba(255, 247, 247, 0.9);
  }

  .cim-graph-edge-label-wrap.xsd-only .cim-graph-edge-label {
    fill: #9b2525;
  }

  .cim-graph-node {
    position: absolute;
    z-index: 2;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    column-gap: 7px;
    padding: 6px 8px;
    box-sizing: border-box;
    border: 1px solid #e1b77b;
    border-radius: 8px;
    background: #fff7eb;
    box-shadow: 0 6px 16px rgba(92, 58, 23, 0.12);
    cursor: grab;
    user-select: none;
  }

  .cim-graph-node.xsd-only {
    grid-template-columns: minmax(0, 1fr);
    border-color: #d65c5c;
    background: #fff8f7;
    box-shadow: 0 6px 16px rgba(138, 35, 35, 0.12);
  }

  .cim-graph-node.active {
    border-color: #b9751f;
    background: #fff1dc;
    box-shadow: 0 0 0 3px rgba(199, 126, 39, 0.17), 0 8px 18px rgba(92, 58, 23, 0.12);
  }

  .cim-graph-node.enumeration {
    border-color: #98cda3;
    background: #f0fbf2;
    box-shadow: 0 6px 16px rgba(24, 82, 45, 0.11);
  }

  .cim-graph-node.enumeration.active {
    border-color: #2f8b4a;
    background: #e7f8eb;
    box-shadow: 0 0 0 3px rgba(47, 139, 74, 0.16), 0 8px 18px rgba(24, 82, 45, 0.12);
  }

  .cim-graph-node.xsd-only.active {
    border-color: #b83232;
    background: #fff3f1;
    box-shadow: 0 0 0 3px rgba(196, 61, 61, 0.16), 0 8px 18px rgba(138, 35, 35, 0.13);
  }

  .cim-graph-node:focus-visible {
    outline: 3px solid rgba(0, 102, 44, 0.28);
    outline-offset: 2px;
  }

  .cim-graph-node.dragging {
    cursor: grabbing;
    box-shadow: 0 14px 28px rgba(24, 52, 38, 0.22);
  }

  .cim-graph-node-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    height: 100%;
  }

  .cim-graph-node-check input {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
  }

  .cim-graph-node-label {
    min-width: 0;
    width: 100%;
    color: #523510;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
    text-align: left;
    cursor: default;
  }

  .cim-graph-node.enumeration .cim-graph-node-label {
    color: #173f25;
  }

  .cim-graph-node.xsd-only .cim-graph-node-label {
    color: #922525;
  }

  .cim-graph-node-title-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
  }

  .cim-graph-node-title {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  .cim-graph-node-label small {
    display: block;
    color: #b84747;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.1;
    margin-top: 2px;
    text-transform: uppercase;
  }

  .cim-graph-node.enumeration .cim-graph-node-label small {
    color: #2f7a45;
  }

  .cim-graph-node-attrs {
    list-style: none;
    margin: 5px 0 0;
    padding: 4px 0 0;
    border-top: 1px solid rgba(150, 103, 39, 0.22);
    display: grid;
    gap: 2px;
    color: #6b512d;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.2;
  }

  .cim-graph-node-attrs [role='listitem'] {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cim-graph-node-attrs .more {
    color: #8a765a;
    font-size: 9px;
    font-weight: 800;
  }

  .cim-graph-node-overflow {
    display: block;
    margin-top: 2px;
    color: #8a765a;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.1;
  }

  .cim-graph-concrete-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    color: #5d4321;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1.15;
    cursor: pointer;
  }

  .cim-graph-concrete-toggle input {
    width: 12px;
    height: 12px;
    margin: 0;
    flex: 0 0 auto;
  }

  .cim-graph-node.enumeration .cim-graph-concrete-toggle {
    color: #235e35;
  }

  .cim-graph-node-more {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 0;
    border: 0;
    background: transparent;
    color: #0d6f39;
    padding: 0;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: underline;
    cursor: pointer;
  }

  .cim-graph-node-more:hover,
  .cim-graph-node-more:focus-visible {
    color: #064d27;
  }

  .cim-tree {
    padding: 8px;
    overflow: auto;
  }

  .cim-tree-node {
    border: 1px solid #d4e1d7;
    border-radius: 8px;
    background: #ffffff;
    margin-bottom: 8px;
  }

  .cim-tree-node > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #edf5ef;
    border-radius: 8px 8px 0 0;
  }

  .cim-tree-node[draggable="true"] > summary {
    cursor: grab;
  }

  .cim-tree-node.dragging {
    opacity: 0.65;
  }

  .cim-tree-node.drop-before > summary {
    box-shadow: inset 0 3px 0 #0b7d3c;
  }

  .cim-tree-node.drop-after > summary {
    box-shadow: inset 0 -3px 0 #0b7d3c;
  }

  .cim-tree-node > summary::-webkit-details-marker {
    display: none;
  }

  .cim-tree-node.active > summary {
    background: #d5eadb;
    box-shadow: inset 0 0 0 2px rgba(0, 102, 44, 0.25);
  }

  .cim-tree-node-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .cim-tree-summary-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
  }

  .cim-tree-remove-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #b7c9bd;
    background: #ffffff;
    color: #8b1f1f;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .cim-tree-remove-btn:hover {
    background: #fff0f0;
    border-color: #d8a1a1;
    color: #b10000;
  }

  .cim-tree-node-sub {
    color: #5d7166;
    font-size: 11px;
  }

  .cim-tree-select {
    color: #1d3b2c;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    user-select: none;
  }

  .cim-tree-link {
    border: none;
    background: transparent;
    color: #005e9c;
    text-decoration: underline;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    text-align: left;
  }

  .cim-tree-link:hover {
    color: #003f69;
    font-weight: 700;
  }

  .cim-tree-body {
    padding: 8px 10px;
    font-size: 12px;
    color: #24323f;
    display: grid;
    gap: 8px;
  }

  .cim-tree-section {
    background: #f8fbf9;
    border: 1px solid #dce9df;
    border-radius: 8px;
    padding: 8px;
  }

  .cim-tree-section > strong {
    display: inline-block;
    margin-bottom: 4px;
    color: #1f4831;
  }

  .cim-tree-section-note {
    margin: 2px 0 10px;
    color: #60736a;
    font-size: 11px;
    line-height: 1.45;
  }

  .cim-tree-section ul {
    list-style: none;
    margin: 6px 0 0 0;
    padding: 0;
  }

  .cim-tree-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 4px;
  }

  .cim-tree-check {
    margin-top: 2px;
  }

  .cim-tree-row-main {
    min-width: 0;
  }

  .cim-tree-meta {
    color: #5e7168;
    font-size: 11px;
    margin-top: 1px;
  }

  .cim-tree-description {
    font-size: 11px;
    color: #4d6058;
    margin-top: 2px;
  }

  .cim-tree-sub {
    margin-top: 6px;
  }

  .cim-tree-empty {
    color: #6c7d70;
    font-size: 11px;
    margin-top: 4px;
  }

  .cim-attr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 8px;
  }

  .cim-attr-card,
  .cim-class-card {
    position: relative;
    min-width: 0;
    border-radius: 14px;
    border: 1px solid #d9e4ef;
    box-shadow: 0 10px 24px rgba(18, 34, 52, 0.08);
    overflow: hidden;
  }

  .cim-attr-card {
    background: linear-gradient(180deg, #f7fbff 0%, #edf5ff 100%);
  }

  .cim-class-card-root {
    background: linear-gradient(180deg, #fff8ec 0%, #f8edd8 100%);
    border-color: #ead7b4;
    min-height: 100px;
    width: 176px;
  }

  .cim-class-card-ancestor {
    background: linear-gradient(180deg, #f8f3ff 0%, #f1e8ff 100%);
    border-color: #ded0f7;
  }

  .cim-class-card-descendant {
    background: linear-gradient(180deg, #eefcf2 0%, #e0f6e8 100%);
    border-color: #cce9d7;
  }

  .cim-class-card-assoc-combined {
    background: linear-gradient(180deg, #eff9ff 0%, #e2f2ff 100%);
    border-color: #c9dff0;
  }

  .cim-class-card-assoc-combined .cim-card-trigger {
    min-height: 64px;
    padding-top: 16px;
    padding-bottom: 10px;
  }

  .cim-card-check {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #d6e1ea;
    border-radius: 6px;
    padding: 1px;
  }

  .cim-card-check input {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
  }

  .cim-card-trigger,
  .cim-card-static {
    width: 100%;
    min-height: 76px;
    box-sizing: border-box;
    border: none;
    background: transparent;
    padding: 18px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
  }

  .cim-card-trigger {
    cursor: pointer;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    padding: 28px 10px 12px 32px;
  }

  .cim-card-trigger:hover {
    background: rgba(255, 255, 255, 0.28);
  }

  .cim-card-trigger:disabled {
    cursor: not-allowed;
    opacity: 0.62;
  }

  .cim-card-name {
    max-width: 100%;
    color: #1a3142;
    width: 100%;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.28;
    word-break: break-word;
    direction: ltr;
    unicode-bidi: isolate;
  }

  .cim-card-sub {
    max-width: 100%;
    width: 100%;
    color: #5f7080;
    font-size: 10px;
    line-height: 1.35;
    word-break: break-word;
  }

  .cim-relationship-graph {
    display: grid;
    gap: 16px;
    margin-top: 10px;
  }

  .cim-graph-cluster {
    display: grid;
    gap: 10px;
  }

  .cim-graph-cluster-title {
    color: #436457;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .cim-graph-middle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
  }

  .cim-graph-side {
    display: grid;
    gap: 8px;
    align-content: start;
    justify-items: center;
  }

  .cim-graph-root-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .cim-uml-lane {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .cim-uml-lane-vertical {
    justify-content: center;
  }

  .cim-uml-lane-side {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(156px, 156px));
    gap: 10px;
    justify-content: center;
    justify-items: center;
  }

  .cim-uml-node-wrap {
    display: grid;
    gap: 6px;
    justify-items: center;
  }

  .cim-class-card {
    width: 156px;
  }

  .cim-uml-connector {
    width: 24px;
    height: 34px;
    overflow: visible;
  }

  .cim-uml-connector path {
    stroke: #6a879d;
    stroke-width: 2;
    fill: #ffffff;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .cim-uml-connector.down {
    margin-top: 2px;
  }

  .cim-uml-connector.up {
    margin-bottom: 2px;
  }
