#node-modal-overlay { display: none; position: fixed; inset: 0; z-index: 10000; }
#node-modal { background: #fff; width: 100%; height: 100%; position: relative;
display: flex; flex-direction: column; overflow: hidden; }
#node-modal-hdr { display: flex; align-items: center; gap: 12px;
padding: 14px 28px 12px; flex-shrink: 0;
border-bottom: 2px solid #1abc9c; background: #fff; }
#node-modal-hdr-title { display: flex; align-items: center; gap: 10px;
flex: 1; min-width: 0; }
#node-modal-close { flex-shrink: 0; background: none; border: none;
font-size: 22px; color: #aaa; cursor: pointer; line-height: 1; padding: 0; }
.nm-cb-wrap { display: flex; align-items: center; flex-shrink: 0; cursor: pointer; padding: 2px 4px; }
.nm-cb-wrap .nt-cb { width: 16px; height: 16px; cursor: pointer; }
#node-modal-close:hover { color: #333; }
#node-modal-main { display: flex; flex: 1; overflow: hidden; }
#node-modal-body { overflow-y: auto; flex: 1; padding: 0 28px 24px; border-right: 1px solid #eee; }
.nm-absent { padding: 28px 4px; color: #888; font-size: 14px; font-style: italic; }
#node-modal-diagram { flex: 2; position: relative; overflow: hidden; background: #f8fafc; }
.nm-diagram-scroll { width: 100%; height: 100%; box-sizing: border-box; padding: 32px;
overflow-y: auto; overflow-x: hidden;
display: flex; align-items: center; justify-content: center; }
.nm-diagram-scroll > svg { margin: auto; }
.nm-title { font-size: 18px; font-weight: 700; color: #2c3e50;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-crumbs { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; min-width: 0; }
.nm-crumb-file { font-size: 15px; color: #2c3e50; }
.nm-badge { display: inline-block; flex-shrink: 0; padding: 2px 10px; border-radius: 12px;
font-size: 12px; font-weight: 600; background: #dbe9f4; color: #2980b9; }
.nm-side { display: inline-block; flex-shrink: 0; padding: 2px 10px; border-radius: 12px;
font-size: 12px; font-weight: 600; background: #eef0f3; color: #6b7c8d;
text-transform: uppercase; letter-spacing: .04em; }
.nm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-top: 12px; }
.nm-col { min-width: 0; }
.nm-sect-label { font-weight: 700; font-size: 11px; text-transform: uppercase;
letter-spacing: .08em; color: #999; padding: 12px 0 4px;
border-top: 1px solid #eee; }
.nm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nm-table .nm-key { color: #777; white-space: nowrap; padding: 4px 12px 4px 0;
vertical-align: top; width: 90px; min-width: 90px; }
.nm-table .nm-val { color: #222; word-break: break-all; padding: 4px 0; }
.nm-table .nm-src { color: #1a73c2; text-decoration: none; white-space: nowrap; }
.nm-table .nm-src:hover { text-decoration: underline; }
.nm-table .nm-sep { font-weight: 700; font-size: 11px; text-transform: uppercase;
letter-spacing: .08em; color: #999; padding: 12px 0 4px;
border-top: 1px solid #eee; }
.nm-has-hint { cursor: default; }
.nm-copy-btn { display: inline-flex; align-items: center; margin-left: 6px;
padding: 1px 5px; background: none; border: 1px solid #d0dcea;
border-radius: 3px; font-size: 12px; color: #999; cursor: pointer;
vertical-align: middle; line-height: 1.4; }
.nm-copy-btn:hover { background: #e8edf2; border-color: #aab; color: #555; }
.mn-card { cursor: default; }
#node-modal-diagram .mn-copy { cursor: copy; }
.mn-copied-msg { display: none; }
.mn-card.copied .mn-card-body { display: none; }
.mn-card.copied .mn-copied-msg { display: block; }
g[data-diag-node] .sn-detail { display: none; }
g[data-diag-node]:hover .sn-simple { display: none; }
g[data-diag-node]:hover .sn-detail { display: inline; }
text.sn-hint, tspan.sn-hint, g.sn-hint { cursor: inherit; }
#nm-tooltip { display: none; position: fixed; z-index: 30000;
background: #2c3e50; color: #ecf0f1;
font-size: 12px; line-height: 1.45;
padding: 6px 10px; border-radius: 6px;
max-width: 280px; white-space: pre-wrap;
box-shadow: 0 3px 12px rgba(0,0,0,.28);
pointer-events: none; }
.size-controls { position: absolute; top: 12px; right: 12px; z-index: 10;
display: flex; flex-direction: column; gap: 4px;
opacity: 0; transition: opacity .15s; pointer-events: none; }
.size-row { display: flex; gap: 4px; justify-content: flex-end; }
.frame-wrap.show-zoom .size-controls { opacity: 1; pointer-events: auto; }
.size-mode-btn { width: 52px; height: 52px; border: 1px solid #bbb; border-radius: 8px;
background: rgba(255,255,255,.95); color: #555; font-size: 12px; font-weight: 600;
cursor: pointer; display: flex; align-items: center; justify-content: center;
box-shadow: 0 1px 4px rgba(0,0,0,.12); user-select: none; }
.size-mode-btn:hover:not(:disabled) { background: #f0f0f0; border-color: #999; }
.size-mode-btn.active { border-color: #1abc9c; color: #1abc9c; }
.size-mode-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.drill-breadcrumb { position: absolute; top: 12px; left: 12px; z-index: 10;
display: flex; align-items: flex-start; gap: 5px; flex-wrap: wrap;
max-width: calc(100% - 24px);
background: rgba(255,255,255,.95); border: 1px solid #ddd;
border-radius: 8px; padding: 6px 12px;
box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.drill-crumb { background: none; border: none; cursor: pointer; font-size: 12px;
font-weight: 600; color: #1abc9c; padding: 0;
height: 20px; line-height: 20px; }
.drill-crumb:hover { text-decoration: underline; }
.drill-sep { font-size: 11px; color: #aaa; height: 20px; line-height: 20px; }
.drill-crumb-cur { font-size: 12px; font-weight: 600; color: #444;
height: 20px; line-height: 20px; display: inline-block; }
.crumb-col { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.crumb-count { font-size: 9px; line-height: 1; color: #999; min-height: 9px;
font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .12s; }
.drill-breadcrumb:hover .crumb-count { opacity: 1; }
.crumb-tier { position: relative; display: inline-flex; align-items: center; gap: 2px; }
.tier-label { white-space: nowrap; }
.tier-toggle { background: none; border: none; cursor: pointer; color: #1abc9c;
font-size: 10px; line-height: 1; padding: 0 2px; }
.tier-toggle:hover { color: #128f76; }
.tier-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20;
display: flex; flex-direction: column; min-width: 84px;
background: #fff; border: 1px solid #ddd; border-radius: 6px;
box-shadow: 0 2px 8px rgba(0,0,0,.16); overflow: hidden; }
.tier-menu[hidden] { display: none; }
.tier-opt { background: none; border: none; cursor: pointer; text-align: left;
font-size: 12px; color: #444; padding: 5px 10px; line-height: 1; }
.tier-opt:hover { background: #f0f0f0; }
.tier-opt.on { font-weight: 700; color: #1abc9c; }
.crumb-lens { display: inline-flex; align-items: flex-start; gap: 6px;
margin-left: 2px; padding-left: 8px; border-left: 1px solid #e2e2e2; }
.lens-btn { background: none; border: 1px solid #d5d5d5; border-radius: 5px;
cursor: pointer; font-size: 13px; font-weight: 700; color: #555;
width: 20px; height: 20px; line-height: 1; padding: 0;
display: inline-flex; align-items: center; justify-content: center; }
.lens-btn:hover:not([disabled]) { background: #f0f0f0; border-color: #bbb; }
.lens-btn[disabled] { opacity: .35; cursor: default; }
.lens-depth { font-size: 11px; font-weight: 600; color: #666; white-space: nowrap;
font-variant-numeric: tabular-nums;
height: 20px; display: inline-flex; align-items: center; }
.frame-wrap:fullscreen .size-controls { z-index: 250; transition: opacity .15s, top .18s ease; }