  .uml-with-definition {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 12px;
    align-items: stretch;
  }

  .uml-main-panel {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .uml-iframe-shell {
    flex: 1;
    min-height: 0;
    border: 1px solid #d6dee8;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
  }

  .uml-iframe-shell iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
  }

  .uml-definition-panel {
    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
    border: 1px solid #d6dee8;
    border-radius: 8px;
    background: #fbfdfb;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
  }

  .uml-definition-title {
    margin: 0 0 8px 0;
    color: #1f3447;
    font-size: 18px;
    font-weight: 800;
  }

  .uml-definition-body {
    margin: 0;
    color: #294155;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 140px;
    overflow: auto;
    padding-right: 4px;
  }

  .uml-action-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
    flex: 0 0 auto;
    max-height: none;
    overflow: hidden;
    padding-right: 2px;
  }

  .uml-action-list .schema-action-item {
    grid-template-columns: 120px 1fr;
    gap: 8px;
    align-items: start;
  }

  .uml-action-list .schema-action-item.schema-action-button-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }

  .uml-action-list .schema-action-chip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 6px;
    align-items: center;
  }

  .uml-action-list .schema-action-item.schema-action-button-row .action-btn {
    width: 100%;
    min-width: 0;
    padding: 9px 8px;
    margin-top: 0;
  }

  .schema-help-trigger {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid #9eb9a8;
    background: linear-gradient(180deg, #f8fdf9 0%, #dcefe2 100%);
    color: #1f5e36;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(29, 86, 53, 0.16);
  }

  .schema-help-trigger:hover {
    border-color: #6f9d80;
    background: linear-gradient(180deg, #ffffff 0%, #d2e9da 100%);
  }

  .schema-action-overlay {
    position: absolute;
    inset: 0;
    z-index: 18;
    background: rgba(11, 22, 31, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }

  .schema-action-overlay[hidden] {
    display: none;
  }

  .schema-action-overlay-card {
    width: min(92%, 420px);
    border-radius: 12px;
    border: 1px solid #c6d6ca;
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
    padding: 12px 12px 10px;
  }

  .schema-action-overlay-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
  }

  .schema-action-overlay-title {
    color: #184933;
    font-size: 14px;
    font-weight: 800;
  }

  .schema-action-overlay-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #cad8cf;
    background: #f7fbf8;
    color: #2a3f34;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }

  .schema-action-overlay-body {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #2d4859;
  }

  .uml-interactive-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 10px;
    height: 100%;
    min-height: 0;
  }

  .uml-canvas-shell {
    min-width: 0;
    min-height: 0;
    border: 1px solid #c8d8ce;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
  }

  .uml-canvas-toolbar {
    border-bottom: 1px solid #d8e6dc;
    padding: 10px 176px 9px 12px;
    background: linear-gradient(180deg, #f8fcf9 0%, #edf6ef 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    min-height: 42px;
  }

  .uml-canvas-title {
    font-size: 14px;
    font-weight: 800;
    color: #163b2a;
  }

  .uml-canvas-copy {
    margin-top: 4px;
    font-size: 12px;
    color: #4e6475;
    line-height: 1.35;
  }

  .uml-async-inline-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(190, 121, 14, 0.38);
    border-radius: 999px;
    background: #fff9f0;
    color: #8a520a;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    padding: 5px 10px;
    white-space: nowrap;
  }

  .uml-async-inline-legend[hidden] {
    display: none;
  }

  .uml-async-inline-swatch {
    width: 18px;
    height: 12px;
    border-radius: 4px;
    border: 1px solid rgba(190, 121, 14, 0.45);
    background: rgba(243, 156, 18, 0.18);
    flex: 0 0 auto;
  }

  .uml-canvas-stage {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: #fcfefe;
    padding: 6px;
    position: relative;
    touch-action: none;
    cursor: default;
  }

  .uml-canvas-zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    display: inline-flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #c6d8cc;
    border-radius: 999px;
    padding: 5px;
    box-shadow: 0 4px 12px rgba(18, 58, 36, 0.16);
  }

  .uml-zoom-btn {
    border: 1px solid #9fbea9;
    background: #f9fdf9;
    color: #174931;
    border-radius: 999px;
    min-width: 30px;
    height: 30px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
  }

  .uml-zoom-btn.reset {
    min-width: 50px;
    font-size: 12px;
    letter-spacing: 0.01em;
  }

  .uml-zoom-btn:hover {
    border-color: #6f9e7f;
    background: #edf7ef;
  }

  .uml-controls-panel {
    min-width: 0;
    min-height: 0;
    border: 1px solid #c8d8ce;
    border-radius: 10px;
    background: #f8fbf9;
    padding: 10px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .uml-controls-title {
    margin: 0;
    font-size: 14px;
    color: #173d2b;
    font-weight: 800;
  }

  .uml-control-status {
    border: 1px solid #cde3d3;
    background: #ecf8ef;
    color: #1f5f39;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.35;
    padding: 8px 9px;
  }

  .uml-control-status.error {
    border-color: #e4c0c0;
    background: #fdeeee;
    color: #8f1f1f;
  }

  .uml-control-block {
    border: 1px solid #d5e3d8;
    border-radius: 8px;
    background: #ffffff;
    padding: 7px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .uml-control-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .uml-control-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .uml-control-section-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #274a3a;
    text-transform: uppercase;
  }

  .uml-control-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #4d6558;
    text-transform: uppercase;
  }

  .uml-tool-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    margin: 0 auto;
  }

  .uml-tool-btn {
    border: 1px solid #b8cfbf;
    border-radius: 10px;
    background: #ffffff;
    color: #1f3d2f;
    font-size: 16px;
    line-height: 1;
    width: 34px;
    height: 34px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .uml-tool-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
    pointer-events: none;
  }

  .uml-tool-btn.active {
    border-color: #0d6f3f;
    background: #e8f6ec;
    box-shadow: 0 0 0 2px rgba(13, 111, 63, 0.12);
  }

  .uml-control-note {
    font-size: 11px;
    line-height: 1.35;
    color: #567060;
  }

  .uml-control-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
  }

  .uml-control-input,
  .uml-control-select {
    border: 1px solid #bcd1c3;
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 11px;
    color: #1d3948;
    background: #ffffff;
    min-width: 0;
  }

  .uml-control-input:focus,
  .uml-control-select:focus {
    outline: none;
    border-color: #6a9a7a;
    box-shadow: 0 0 0 2px rgba(56, 125, 82, 0.14);
  }

  .uml-control-textarea {
    border: 1px solid #bcd1c3;
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 11px;
    color: #1d3948;
    background: #ffffff;
    min-width: 0;
    min-height: 46px;
    max-height: 84px;
    resize: vertical;
    font-family: inherit;
  }

  .uml-control-textarea:focus {
    outline: none;
    border-color: #6a9a7a;
    box-shadow: 0 0 0 2px rgba(56, 125, 82, 0.14);
  }

  .uml-available-actors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 96px;
    overflow: auto;
    padding-right: 2px;
  }

  .uml-available-actor-chip {
    border: 1px solid #b7ceb8;
    background: #f2faf4;
    color: #1f5f39;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
  }

  .uml-available-actor-chip:hover {
    background: #e8f5eb;
    border-color: #7faa8a;
  }

  .uml-available-empty {
    font-size: 11px;
    color: #5a6e63;
    line-height: 1.3;
    padding: 2px 0;
  }

  .uml-custom-exchange-list {
    display: grid;
    gap: 6px;
  }

  .uml-custom-item {
    border: 1px solid #d0dfd5;
    border-radius: 8px;
    background: #f7fcf8;
    padding: 7px 8px;
    display: grid;
    gap: 4px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
  }

  .uml-custom-item:hover {
    border-color: #97bd9f;
    background: #f0f8f2;
  }

  .uml-custom-item.selected {
    border-color: #4d9a69;
    background: #e7f6ec;
  }

  .uml-custom-item-title {
    font-size: 11px;
    font-weight: 800;
    color: #234e37;
  }

  .uml-custom-item-copy {
    font-size: 12px;
    color: #315267;
    line-height: 1.3;
  }

  .uml-custom-remove-btn {
    justify-self: end;
    border: 1px solid #d8c2c2;
    background: #fff7f7;
    color: #842222;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 700;
  }

  .uml-custom-remove-btn:hover {
    background: #fdecec;
  }

  .uml-sequence-svg {
    width: 100%;
    min-width: 0;
    height: auto;
    display: block;
  }

  .uml-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #8bb49a;
    background: #f4fbf6;
    color: #145233;
    font-size: 18px;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .uml-icon-btn:hover {
    background: #e6f5ea;
    border-color: #67947a;
  }

  .uml-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f4f7f5;
  }

  .uml-svg-bg {
    fill: #ffffff;
  }

  .uml-async-band {
    fill: rgba(243, 156, 18, 0.12);
    stroke: rgba(190, 121, 14, 0.45);
    stroke-width: 1.5;
    pointer-events: none;
  }

  .uml-async-legend {
    fill: rgba(255, 249, 240, 0.95);
    stroke: rgba(190, 121, 14, 0.4);
    stroke-width: 1.1;
    pointer-events: none;
  }

  .uml-async-legend-swatch {
    fill: rgba(243, 156, 18, 0.18);
    stroke: rgba(190, 121, 14, 0.45);
    stroke-width: 1;
    pointer-events: none;
  }

  .uml-async-band-label {
    fill: #9a5b0b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    pointer-events: none;
  }

  .uml-lane-line {
    stroke: #d2e2da;
    stroke-width: 2;
  }

  .uml-lane-hit {
    fill: transparent;
    cursor: grab;
  }

  .uml-lane-hit.selected {
    fill: rgba(53, 118, 77, 0.06);
  }

  .uml-actor-pill {
    fill: #e7f2eb;
    stroke: #7fa78f;
    stroke-width: 1.2;
    cursor: grab;
  }

  .uml-actor-pill.custom {
    fill: #e3f5e8;
    stroke: #5e9d75;
  }

  .uml-actor-pill.selected {
    stroke: #2f7d4c;
    stroke-width: 1.7;
  }

  .uml-actor-label {
    fill: #163f2f;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
  }

  .uml-row-bg {
    fill: #f8fbfa;
    stroke-width: 1;
  }

  .uml-row-bg.locked {
    stroke: #d1dde5;
  }

  .uml-row-bg.custom {
    stroke: #c4dccd;
    fill: #f0faf3;
  }

  .uml-row-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .uml-row-badge.locked {
    fill: #5f7486;
  }

  .uml-row-badge.custom {
    fill: #1f6e43;
  }

  .uml-arrow-line {
    stroke-width: 2;
    fill: none;
  }

  .uml-arrow-hitline {
    stroke: transparent;
    stroke-width: 18;
    fill: none;
    pointer-events: stroke;
  }

  .uml-arrow-hitline.custom {
    cursor: ns-resize;
  }

  .uml-arrow-hitline.locked {
    cursor: ns-resize;
  }

  .uml-arrow-line.locked {
    stroke: #2f668a;
  }

  .uml-arrow-line.locked.selected {
    stroke: #184f72;
    stroke-width: 3;
  }

  .uml-arrow-line.locked.reverse {
    stroke-dasharray: 5 4;
  }

  .uml-arrow-line.custom {
    stroke: #1f7e4d;
  }

  .uml-arrow-line.custom.selected {
    stroke: #0d6f3f;
    stroke-width: 3;
  }

  .uml-arrow-line.preview {
    stroke: #209257;
    stroke-width: 2;
    stroke-dasharray: 7 5;
  }

  .uml-arrow-label {
    fill: #233f50;
    font-size: 11px;
    font-weight: 700;
  }

  .uml-arrow-label-static {
    fill: #5f6f7c;
    font-size: 10.5px;
    font-weight: 600;
  }

  .uml-exchange-text {
    fill: #1f4f6f;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    cursor: pointer;
  }

  .uml-data-object-text {
    fill: #1f5f39;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    cursor: pointer;
  }

  .uml-data-object-text.selected {
    fill: #0a6f40;
    font-weight: 800;
    text-decoration-thickness: 2px;
  }

  .uml-arrow-subtext {
    fill: #4f6475;
    font-size: 10px;
    font-weight: 600;
  }

  .uml-row-hit {
    cursor: pointer;
  }

  .uml-row-hit.selected .uml-arrow-label {
    fill: #173f59;
  }

  .uml-selection-row {
    display: grid;
    gap: 2px;
  }

  .uml-selection-value {
    border: 1px solid #d2e3d8;
    border-radius: 7px;
    background: #f4faf6;
    color: #244b38;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 7px;
    min-height: 29px;
    word-break: break-word;
  }

  .uml-selection-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .uml-empty-note,
  .uml-empty-label {
    color: #6a7f8e;
    font-size: 12px;
    line-height: 1.4;
  }
