.sj-wrap{max-width:1200px;margin:0 auto;font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif}
.sj-controls{display:flex;flex-wrap:wrap;gap:.75rem;align-items:flex-end;margin:.5rem 0 1rem}
.sj-row{display:flex;align-items:center;gap:.5rem}
.sj-file input[type=file]{display:none}
.sj-file span{display:inline-block;background:#111;color:#fff;padding:.5rem .75rem;border-radius:.5rem;cursor:pointer}
.sj-check{display:flex;align-items:center;gap:.5rem}
.sj-actions button{padding:.5rem .75rem;border:0;border-radius:.5rem;background:#0b5;cursor:pointer;color:#fff}
.sj-actions button:disabled{background:#999;cursor:not-allowed}
#sj-svg{width:100%;height:900px;background:#fafafa;border:1px solid #eee;border-radius:.75rem;overflow:visible}
.sj-stage{width:100%;overflow:visible}

/* Segmenter */
.sj-seg{stroke:#d7b3b3;stroke-width:2;fill:#e8eefc}
.sj-seg.inf{fill:#f7e8e8;stroke:#d7b3b3}
.sj-label{font-size:11px;pointer-events:none;fill:#111 !important;line-height:1.1}

/* Popover */
.sj-popover{position:fixed;z-index:9999;max-width:320px;background:#111;color:#fff;padding:.5rem .6rem;border-radius:.5rem;box-shadow:0 8px 24px rgba(0,0,0,.2);font-size:13px;line-height:1.25}
.sj-popover .sj-popover-title{font-weight:600;margin-bottom:.25rem}
.sj-popover .sj-popover-body{opacity:.95}
.sj-popover.hidden{display:none}

/* Focus ring for tastatur */
.sj-node:focus .sj-seg{outline:3px solid #2684ff;outline-offset:2px;stroke:#2684ff}
.sj-node{outline:none}

/* Print */
@media print{
  body{background:#fff}
  .sj-controls,.sj-legend{display:none}
  #sj-svg{height:1100px;border:none}
}

.sj-debug{margin-top:.75rem;padding:.5rem .75rem;border:1px solid #ddd;background:#f7f7f7;font:12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;white-space:pre-wrap}
