#nc-app {
  --nc-bg: var(--bg, #fffdf8);
  --nc-panel: var(--bg-2, #f6f1e8);
  --nc-panel2: var(--bg-3, #ece5d8);
  --nc-field: var(--card, var(--nc-bg));
  --nc-fg: var(--fg, #2a2420);
  --nc-dim: var(--fg-dim, #4d443d);
  --nc-mut: var(--fg-muted, #6f655c);
  --nc-rule: var(--rule, #d9d0c2);
  --nc-line: color-mix(in oklab, var(--control, #978f87) 45%, var(--nc-rule));
  --nc-acc: var(--primary, #e38f00);
  --nc-accfg: var(--primary-fg, #1c140c);
  --nc-ink: var(--primary-text, #a15200);
  --nc-hov: color-mix(in srgb, var(--nc-fg) 7%, transparent);
  --nc-pressed: color-mix(in srgb, var(--nc-fg) 12%, transparent);
  --nc-ok: var(--ok, #2f7d4f);
  --nc-bad: var(--error-text, #c0392b);
  --nc-warn: var(--primary-text, #a15200);
  --nc-node: color-mix(in srgb, var(--nc-panel) 55%, var(--nc-bg));
  --nc-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  --nc-s1: 4px;
  --nc-s2: 8px;
  --nc-s3: 12px;
  --nc-s4: 16px;
  --nc-h: 32px;
  --nc-hs: 26px;
  --nc-r: 8px;
  --nc-rl: 12px;
  --nc-kb: 0px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  height: clamp(520px, 78vh, 860px);
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--nc-fg);
  background: var(--nc-bg);
  border: 1px solid var(--nc-rule);
  border-radius: var(--nc-rl);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  -webkit-tap-highlight-color: transparent;

  & *, & *::before, & *::after { box-sizing: border-box; }
  & [hidden] { display: none !important; }
  & svg { flex: none; max-width: none; }
  & h2, & h3, & p, & dl, & dd, & dt { margin: 0; }
  & code, & .nc-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

  & .nc-offscreen { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

  & button {
    font: inherit;
    font-size: 13px;
    color: var(--nc-fg);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--nc-r);
    margin: 0;
    padding: 0;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.2;
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
  }
  & button:disabled { opacity: 0.4; cursor: default; }
  & :focus-visible, & button:focus-visible { outline: 2px solid var(--nc-ink); outline-offset: 1px; }

  & .nc-bar {
    flex: none;
    display: flex;
    align-items: center;
    gap: var(--nc-s1);
    min-height: 44px;
    padding: 6px 10px;
    background: var(--nc-panel);
    border-bottom: 1px solid var(--nc-rule);
    overflow: hidden;
    white-space: nowrap;
  }
  & .nc-spacer { flex: 1 1 8px; min-width: 0; }
  & .nc-bar .nc-spacer + .nc-savestate + .nc-ib { margin-left: var(--nc-s1); }
  & .nc-savestate { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: var(--nc-mut); padding: 0 6px; }
  & .nc-ib {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: var(--nc-h);
    height: var(--nc-h);
    padding: 0 var(--nc-s2);
    flex: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
  }
  & .nc-ib svg, & .nc-pbtn svg { width: 18px; height: 18px; }
  & .nc-ib.nc-sm { min-width: 28px; width: 28px; height: 28px; padding: 0; color: var(--nc-mut); }
  & .nc-ib.nc-sm svg { width: 16px; height: 16px; }
  & .nc-ib.nc-idanger { color: var(--nc-mut); }
  & .nc-ib[aria-pressed="true"] { background: var(--nc-pressed); border-color: transparent; }
  & .nc-ib.nc-primary { background: var(--nc-acc); color: var(--nc-accfg); border-color: transparent; font-weight: 600; padding: 0 12px; }
  & .nc-ib.nc-primary[aria-pressed="true"] { background: var(--nc-acc); }
  & .nc-ib .nc-btext, & .nc-ib svg { pointer-events: none; }
  & .nc-bar .nc-btext { font-size: 13px; font-weight: inherit; }
  & .nc-pbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: var(--nc-h);
    padding: 0 10px;
    max-width: 220px;
    min-width: 0;
    flex: 0 1 auto;
    font-size: 13px;
    font-weight: 600;
  }
  & .nc-pbname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  & .nc-mob, & .nc-bottom, & .nc-sheetclose { display: none; }

  & .nc-banner {
    flex: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--nc-s2);
    padding: var(--nc-s2) var(--nc-s3);
    background: color-mix(in srgb, var(--nc-bad) 12%, var(--nc-bg));
    border-bottom: 1px solid color-mix(in srgb, var(--nc-bad) 45%, var(--nc-rule));
    font-size: 13px;
  }
  & .nc-banner span { flex: 1 1 240px; }

  & .nc-main { flex: 1 1 auto; min-height: 0; display: flex; position: relative; }
  & .nc-rail {
    flex: none;
    width: 220px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--nc-panel);
    border-right: 1px solid var(--nc-rule);
  }
  &.nc-rail-off .nc-rail { display: none; }
  & .nc-railwrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  & .nc-tabs { flex: none; display: flex; border-bottom: 1px solid var(--nc-rule); }
  & .nc-tab {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--nc-s1);
    height: 40px;
    border-radius: 0;
    border-width: 0 0 2px;
    border-color: transparent;
    position: relative;
    color: var(--nc-dim);
  }
  & .nc-tab svg { width: 18px; height: 18px; }
  & .nc-tab .nc-tablabel { display: none; font-size: 12px; }
  & .nc-tab.nc-on { border-bottom-color: var(--nc-ink); background: var(--nc-bg); color: var(--nc-fg); }
  & .nc-tab .nc-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--nc-pressed);
    color: var(--nc-dim);
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
  }
  & .nc-tab .nc-count[data-level="error"] { background: color-mix(in srgb, var(--nc-bad) 16%, var(--nc-bg)); color: var(--nc-bad); }
  & .nc-tab .nc-count[data-level="warn"] { background: color-mix(in srgb, var(--nc-acc) 22%, var(--nc-bg)); color: var(--nc-fg); }
  & .nc-tab .nc-count[data-level="hint"] { background: var(--nc-pressed); color: var(--nc-dim); font-weight: 500; }
  & .nc-railbody { flex: 1 1 auto; min-height: 0; overflow: auto; padding: var(--nc-s2); overscroll-behavior: contain; }
  & .nc-railhead { margin: var(--nc-s3) var(--nc-s1) 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--nc-mut); }
  & .nc-railhead:first-child { margin-top: var(--nc-s1); }
  & .nc-railintro { margin: 0 var(--nc-s1) var(--nc-s2); font-size: 12px; line-height: 1.45; color: var(--nc-mut); }
  & .nc-pal { display: flex; flex-direction: column; gap: 2px; }
  & .nc-palitem { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--nc-h); padding: var(--nc-s1) var(--nc-s2); text-align: left; font-size: 13px; font-weight: 400; cursor: grab; }
  & .nc-palitem.nc-palextra { color: var(--nc-dim); }
  & .nc-paldot { flex: none; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; color: color-mix(in oklab, var(--nc-c, var(--nc-mut)) 50%, var(--nc-fg)); background: none; }
  & .nc-paldot svg { width: 18px; height: 18px; }
  & .nc-palname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  & .nc-wide { width: 100%; margin-top: var(--nc-s3); }

  & .nc-view {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    background-color: var(--nc-bg);
    cursor: default;
  }
  & .nc-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, color-mix(in srgb, var(--nc-fg) 20%, transparent) 1px, transparent 1.3px);
    background-size: var(--nc-gs, 20px) var(--nc-gs, 20px);
    background-position: var(--nc-gx, 0) var(--nc-gy, 0);
  }
  & .nc-view.nc-nogrid .nc-grid { background-image: none; }
  & .nc-view.nc-panning, & .nc-view.nc-space { cursor: grab; }
  & .nc-view.nc-panning { cursor: grabbing; }
  & .nc-view.nc-connecting { cursor: crosshair; }
  & .nc-view:focus-visible { outline-offset: -2px; }
  & .nc-world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
  & .nc-wires { position: absolute; left: 0; top: 0; width: 1px; height: 1px; max-width: none; max-height: none; overflow: visible; pointer-events: none; }
  & .nc-world img, & .nc-world svg, & .nc-map canvas, & canvas { max-width: none; }
  & .nc-frames, & .nc-nodes { position: absolute; left: 0; top: 0; width: 0; height: 0; }
  & .nc-arrowhead { fill: var(--nc-mut); }
  & .nc-edge { pointer-events: none; }
  & .nc-hit { fill: none; stroke: transparent; stroke-width: 16px; pointer-events: stroke; cursor: pointer; }
  & .nc-wire { fill: none; stroke: var(--nc-mut); stroke-width: 2px; pointer-events: none; }
  & .nc-edge.nc-esel .nc-wire { stroke: var(--nc-ink); stroke-width: 3px; }
  & .nc-elabel { fill: var(--nc-fg); font-size: 12px; paint-order: stroke; stroke: var(--nc-bg); stroke-width: 4px; text-anchor: middle; pointer-events: none; }
  & .nc-tmpwire { fill: none; stroke: var(--nc-ink); stroke-width: 2px; stroke-dasharray: 6 4; pointer-events: none; }

  & .nc-frame {
    position: absolute;
    border: 2px dashed var(--nc-c, #6b7280);
    border-radius: var(--nc-rl);
    background: color-mix(in srgb, var(--nc-c, #6b7280) 8%, transparent);
    pointer-events: none;
  }
  & .nc-frame.nc-sel { border-style: solid; box-shadow: 0 0 0 2px color-mix(in srgb, var(--nc-ink) 45%, transparent); }
  & .nc-frame-title {
    position: absolute;
    left: var(--nc-s2);
    top: var(--nc-s2);
    max-width: calc(100% - 40px);
    padding: 2px 10px;
    border-radius: 6px;
    background: var(--nc-c, #6b7280);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: auto;
    cursor: move;
  }
  & .nc-frame-resize { position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; pointer-events: auto; cursor: nwse-resize; background: linear-gradient(135deg, transparent 55%, var(--nc-c, #6b7280) 55%, var(--nc-c, #6b7280) 65%, transparent 65%, transparent 78%, var(--nc-c, #6b7280) 78%, var(--nc-c, #6b7280) 88%, transparent 88%); }

  & .nc-node {
    position: absolute;
    min-width: 120px;
    background: var(--nc-node);
    border: 1px solid color-mix(in srgb, var(--nc-c, #888) 45%, var(--nc-rule));
    border-radius: var(--nc-r);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    font-size: 13px;
    cursor: grab;
    outline: none;
    touch-action: none;
  }
  & .nc-node.nc-sel { box-shadow: 0 0 0 2px var(--nc-ink), 0 4px 14px rgba(0, 0, 0, 0.22); z-index: 2; }
  & .nc-node:focus-visible { box-shadow: 0 0 0 2px var(--nc-ink); }
  & .nc-node.nc-playing { box-shadow: 0 0 0 3px var(--nc-ok), 0 4px 14px rgba(0, 0, 0, 0.22); z-index: 3; }
  & .nc-node.nc-dimmed { opacity: 0.4; }
  & .nc-node.nc-validtarget { box-shadow: 0 0 0 2px var(--nc-ok); }
  & .nc-node.nc-hot { box-shadow: 0 0 0 3px var(--nc-ok); }
  & .nc-node.nc-locked { cursor: default; }
  & .nc-nh {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border-radius: 7px 7px 0 0;
    background: color-mix(in srgb, var(--nc-c, #888) 20%, var(--nc-node));
    box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--nc-c, #888) 22%, transparent);
    font-weight: 600;
    font-size: 12px;
    color: var(--nc-fg);
  }
  & .nc-nicon { width: 14px; height: 14px; color: color-mix(in oklab, var(--nc-c, #888) 50%, var(--nc-fg)); flex: none; display: inline-flex; }
  & .nc-nicon svg { width: 14px; height: 14px; }
  & .nc-nt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  & .nc-badge { flex: none; font-size: 10px; font-weight: 600; padding: 0 6px; border-radius: 8px; background: var(--nc-panel2); color: var(--nc-dim); }
  & .nc-nb { padding: var(--nc-s2) 0; display: flex; flex-direction: column; gap: 6px; }
  & .nc-nb > :not(.nc-prow) { margin: 0 10px; }
  & .nc-ftext { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 18px; }
  & .nc-ftext.nc-empty, & .nc-plabel.nc-empty, & .nc-speaker.nc-empty { color: var(--nc-mut); font-style: italic; }
  & .nc-ftext.nc-code, & .nc-nb .nc-code { font-size: 12px; }
  & .nc-speaker { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; }
  & .nc-sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--nc-mut); flex: none; }
  & .nc-fkv { font-size: 12px; color: var(--nc-dim); }
  & .nc-flist { margin: 0 10px; padding-left: 18px; font-size: 12px; }
  & .nc-imgwrap { margin: 0 !important; }
  & .nc-img { display: block; width: 100%; height: auto; border-radius: 0; pointer-events: none; }
  & .nc-prow { position: relative; display: flex; align-items: center; flex-wrap: wrap; column-gap: 6px; padding: 4px 12px; min-height: 26px; line-height: 18px; }
  & .nc-prow + .nc-prow { border-top: 1px solid color-mix(in srgb, var(--nc-rule) 70%, transparent); }
  & .nc-prow.nc-pout { justify-content: flex-end; text-align: right; }
  & .nc-plabel { overflow-wrap: anywhere; }
  & .nc-pcond { flex-basis: 100%; font-size: 11px; color: var(--nc-mut); font-family: ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
  & .nc-port {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--nc-bg);
    border: 2px solid color-mix(in oklab, var(--nc-c, #888) 70%, var(--nc-fg));
    z-index: 4;
    cursor: crosshair;
    touch-action: none;
  }
  & .nc-port::after { content: ""; position: absolute; inset: -8px; }
  & .nc-port[data-side="l"] { left: -7px; margin-top: -6px; }
  & .nc-port[data-side="r"] { right: -7px; margin-top: -6px; }
  & .nc-port[data-side="t"] { top: -7px; margin-left: -6px; }
  & .nc-port[data-side="b"] { bottom: -7px; margin-left: -6px; }
  & .nc-prow > .nc-port { top: 50%; }
  & .nc-port.nc-hot, & .nc-port.nc-armed { background: var(--nc-ink); border-color: var(--nc-ink); transform: scale(1.3); }
  & .nc-node.nc-isnote { background: color-mix(in srgb, var(--nc-c, #e9c46a) 28%, var(--nc-bg)); border-color: color-mix(in srgb, var(--nc-c, #e9c46a) 70%, var(--nc-rule)); min-width: 100px; }
  & .nc-node.nc-issticky { transform: rotate(-0.8deg); box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.2); }
  & .nc-node.nc-issticky .nc-nh { background: color-mix(in srgb, var(--nc-c, #e9c46a) 45%, var(--nc-bg)); }
  & .nc-notebody { padding: 10px 0; }
  & .nc-view.nc-lod .nc-nb { opacity: 0; }
  & .nc-view.nc-lod .nc-node { background: color-mix(in srgb, var(--nc-c, #888) 30%, var(--nc-node)); }
  & .nc-view.nc-lod .nc-nh { font-size: 14px; }
  & .nc-prevnode { position: relative; width: 220px; cursor: default; }
  & .nc-pcount { padding: 0 10px 8px; font-size: 12px; }

  & .nc-marquee { position: absolute; border: 1px dashed var(--nc-ink); background: color-mix(in srgb, var(--nc-ink) 14%, transparent); pointer-events: none; z-index: 5; }
  & .nc-map { position: absolute; right: 10px; bottom: 10px; width: 180px; height: 120px; background: color-mix(in srgb, var(--nc-panel) 90%, transparent); border: 1px solid var(--nc-rule); border-radius: var(--nc-r); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); z-index: 6; touch-action: none; cursor: pointer; }
  & .nc-zoom { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 2px; padding: 2px; background: color-mix(in srgb, var(--nc-panel) 94%, transparent); border: 1px solid var(--nc-rule); border-radius: 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); z-index: 6; }
  & .nc-zoom .nc-ib { height: var(--nc-h); min-width: var(--nc-h); padding: 0 6px; }
  & .nc-zpct { min-width: 52px; height: var(--nc-h); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--nc-dim); }
  & .nc-hint {
    position: absolute;
    left: 50%;
    top: 44%;
    transform: translate(-50%, -50%);
    max-width: 380px;
    width: calc(100% - 48px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--nc-s2);
    padding: var(--nc-s4);
    text-align: center;
    color: var(--nc-mut);
    pointer-events: none;
    font-size: 13px;
  }
  & .nc-hintt { font-size: 15px; font-weight: 600; color: var(--nc-fg); }
  & .nc-hintp { line-height: 1.5; }
  & .nc-hintrow { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--nc-s2); margin-top: var(--nc-s1); pointer-events: auto; }

  & .nc-side {
    flex: none;
    width: 300px;
    display: none;
    flex-direction: column;
    min-height: 0;
    background: var(--nc-panel);
    border-left: 1px solid var(--nc-rule);
    overflow: hidden;
  }
  &.nc-side-on .nc-side { display: flex; }
  & .nc-inspector { flex: 1 1 auto; min-height: 0; overflow: auto; padding: var(--nc-s4); overscroll-behavior: contain; }
  & .nc-playhost { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

  & .nc-insp { display: flex; flex-direction: column; gap: var(--nc-s4); min-width: 0; }
  & .nc-ihead { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
  & .nc-itype {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--nc-r);
    background: color-mix(in srgb, var(--nc-c, #888) 14%, var(--nc-panel));
    border: 1px solid color-mix(in srgb, var(--nc-c, #888) 28%, transparent);
    color: color-mix(in oklab, var(--nc-c, #888) 45%, var(--nc-fg));
  }
  & .nc-itype svg { width: 18px; height: 18px; }
  & .nc-ihtext { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
  & .nc-ititle { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--nc-fg); letter-spacing: normal; }
  & .nc-iabout { font-size: 12px; line-height: 1.45; color: var(--nc-mut); }
  & .nc-ifields { display: flex; flex-direction: column; gap: var(--nc-s4); min-width: 0; }
  & .nc-fpair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--nc-s2); }
  & .nc-iacts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--nc-s2);
    padding-top: var(--nc-s4);
    border-top: 1px solid var(--nc-rule);
  }
  & .nc-iacts > .nc-btn { width: 100%; min-width: 0; }
  & .nc-iacts > .nc-iplay, & .nc-iacts > .nc-btn:only-child { grid-column: 1 / -1; }
  & .nc-iacts > .nc-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  & .nc-fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
  & .nc-fld.nc-fldrow { flex-direction: row; align-items: center; gap: var(--nc-s2); }
  & .nc-fld.nc-finline { display: grid; grid-template-columns: minmax(0, 1fr) 112px; align-items: center; column-gap: var(--nc-s2); }
  & .nc-fld.nc-finline > .nc-fhint { grid-column: 1 / -1; }
  & .nc-flabel { display: block; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--nc-dim); }
  & .nc-fhint, & .nc-dim { font-size: 12px; line-height: 1.45; color: var(--nc-mut); }
  & .nc-dp { margin: 0; font-size: 13px; line-height: 1.5; }
  & .nc-ferr { font-size: 12px; line-height: 1.4; color: var(--nc-bad); }
  & .nc-fwrap { position: relative; min-width: 0; }
  & .nc-row { display: flex; gap: var(--nc-s2); align-items: center; min-width: 0; }
  & .nc-row.nc-wrap { flex-wrap: wrap; }
  & .nc-check { display: inline-flex; align-items: center; gap: var(--nc-s2); cursor: pointer; font-size: 13px; line-height: 1.35; color: var(--nc-fg); }
  & input.nc-check, & .nc-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--nc-ink); flex: none; }
  & .nc-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  & .nc-sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--nc-rule); padding: 0; }
  & .nc-sw.nc-on, & .nc-sw[aria-pressed="true"] { border-color: var(--nc-fg); box-shadow: inset 0 0 0 2px var(--nc-panel); }
  & .nc-thumb { display: block; max-width: 100%; max-height: 120px; border-radius: 6px; border: 1px solid var(--nc-rule); }

  & .nc-optlist { display: flex; flex-direction: column; gap: var(--nc-s2); }
  & .nc-opt { display: flex; flex-direction: column; gap: 6px; padding: var(--nc-s2); background: var(--nc-bg); border: 1px solid var(--nc-rule); border-radius: var(--nc-r); min-width: 0; }
  & .nc-opttop { display: flex; align-items: center; gap: 6px; min-width: 0; }
  & .nc-opttop > .nc-in { flex: 1 1 auto; }
  & .nc-optnum { flex: none; width: 18px; text-align: center; font-size: 11px; font-weight: 600; color: var(--nc-mut); font-variant-numeric: tabular-nums; }
  & .nc-opttools { flex: none; display: flex; gap: 0; }
  & .nc-opt .nc-xf { padding-left: 24px; }
  & .nc-optempty { padding: var(--nc-s1) 0; }
  & .nc-addopt { align-self: flex-start; }

  & input.nc-in, & select.nc-in, & textarea.nc-in {
    display: block;
    width: 100%;
    min-width: 0;
    height: var(--nc-h);
    min-height: 0;
    margin: 0;
    padding: 0 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--nc-fg);
    background: var(--nc-field);
    border: 1px solid var(--nc-line);
    border-radius: var(--nc-r);
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
  }
  & input.nc-in.nc-code, & textarea.nc-in.nc-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
  & input.nc-in::placeholder, & textarea.nc-in::placeholder { color: var(--nc-mut); opacity: 0.85; }
  & select.nc-in { padding-right: 26px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--nc-mut) 50%), linear-gradient(135deg, var(--nc-mut) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; text-overflow: ellipsis; }
  & textarea.nc-in { height: auto; min-height: 72px; resize: vertical; padding: 7px 10px; line-height: 1.45; }
  & input.nc-in[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--nc-ink); }
  & input.nc-in[type="number"] { -moz-appearance: textfield; }
  & input.nc-in.nc-locked { background: transparent; color: var(--nc-mut); border-style: dashed; cursor: default; }
  & input.nc-in:focus, & select.nc-in:focus, & textarea.nc-in:focus { outline: 2px solid color-mix(in srgb, var(--nc-ink) 55%, transparent); outline-offset: 0; border-color: var(--nc-ink); }
  & input.nc-in.nc-locked:focus { outline: none; border-color: var(--nc-line); }
  & input.nc-colourin { width: 36px; height: var(--nc-h); padding: 2px; border: 1px solid var(--nc-line); border-radius: var(--nc-r); background: var(--nc-field); flex: none; cursor: pointer; }

  & .nc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: var(--nc-h);
    min-height: 0;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--nc-fg);
    background: var(--nc-field);
    border: 1px solid var(--nc-line);
  }
  & .nc-btn svg { width: 16px; height: 16px; color: var(--nc-dim); }
  & .nc-btn.nc-primary { background: var(--nc-acc); border-color: transparent; color: var(--nc-accfg); font-weight: 600; }
  & .nc-btn.nc-primary svg { color: currentColor; }
  & .nc-btn.nc-danger { color: var(--nc-bad); background: transparent; border-color: transparent; }
  & .nc-btn.nc-danger svg { color: currentColor; }
  & .nc-btn.nc-small { height: var(--nc-hs); padding: 0 var(--nc-s2); font-size: 12px; gap: var(--nc-s1); }
  & .nc-btn.nc-small svg { width: 14px; height: 14px; }
  & .nc-btn.nc-choice { width: 100%; height: auto; min-height: var(--nc-h); justify-content: flex-start; text-align: left; white-space: normal; padding: var(--nc-s2) var(--nc-s3); font-weight: 500; line-height: 1.35; }
  & .nc-btn.nc-choice:disabled { opacity: 0.5; text-decoration: line-through; }
  & .nc-linkbtn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--nc-ink); font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; text-align: left; }
  & .nc-linkbtn svg { width: 14px; height: 14px; }

  & .nc-xf { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  & .nc-xf[data-state="error"] .nc-xin { border-color: color-mix(in srgb, var(--nc-bad) 70%, var(--nc-line)); }
  & .nc-xstat { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.45; color: var(--nc-dim); min-width: 0; }
  & .nc-xsicon { width: 15px; height: 15px; margin-top: 1px; flex: none; }
  & .nc-xstat[data-state="ok"] .nc-xsicon { color: var(--nc-ok); }
  & .nc-xstat[data-state="error"] { color: var(--nc-bad); }
  & .nc-xstat[data-state="warn"] .nc-xsicon { color: var(--nc-warn); }
  & .nc-xstat[data-state="empty"] { color: var(--nc-mut); }
  & .nc-xsbody { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
  & .nc-xoffer { display: flex; flex-wrap: wrap; gap: 6px; }
  & .nc-xchips { display: flex; flex-direction: column; gap: 6px; }
  & .nc-xcg { display: flex; flex-wrap: wrap; align-items: center; gap: var(--nc-s1); }
  & .nc-xcl { font-size: 11px; color: var(--nc-mut); margin-right: 2px; }
  & .nc-chips { display: flex; flex-wrap: wrap; gap: var(--nc-s1); }
  & .nc-chipbtn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--nc-hs); height: var(--nc-hs); padding: 0 var(--nc-s2); font-size: 12px; line-height: 1; color: var(--nc-fg); background: var(--nc-field); border: 1px solid var(--nc-rule); border-radius: 6px; }
  & .nc-chipbtn.nc-xvar { color: var(--nc-ink); border-color: color-mix(in srgb, var(--nc-ink) 30%, var(--nc-rule)); }
  & .nc-xhelp, & .nc-xbuild, & .nc-tref { font-size: 12px; min-width: 0; }
  & .nc-xhelpsum, & .nc-tref summary { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; color: var(--nc-ink); font-weight: 600; cursor: pointer; list-style: none; border-radius: 6px; }
  & .nc-xhelpsum::-webkit-details-marker, & .nc-tref summary::-webkit-details-marker { display: none; }
  & .nc-xhelpsum svg { width: 15px; height: 15px; }
  & .nc-xhelpbody, & .nc-xbbody { margin-top: 6px; padding: 10px; background: var(--nc-bg); border: 1px solid var(--nc-rule); border-radius: var(--nc-r); display: flex; flex-direction: column; gap: var(--nc-s2); }
  & .nc-xhelpp { line-height: 1.5; color: var(--nc-dim); }
  & .nc-xex { display: grid; grid-template-columns: 1fr; gap: 2px; }
  & .nc-xex dt { margin-top: 6px; font-size: 12px; color: var(--nc-fg); font-weight: 600; overflow-wrap: anywhere; }
  & .nc-xex dt:first-child { margin-top: 0; }
  & .nc-xex dd { color: var(--nc-mut); line-height: 1.45; }
  & .nc-xbrow { display: flex; gap: 6px; min-width: 0; }
  & .nc-xbrow > .nc-in { flex: 1 1 0; }
  & .nc-xbrow > .nc-xjoin { flex: 0 0 64px; }
  & .nc-xbrow > .nc-btn { flex: none; height: var(--nc-h); }
  & .nc-xnovars { display: flex; flex-direction: column; gap: var(--nc-s2); padding: 10px; background: color-mix(in srgb, var(--nc-acc) 9%, var(--nc-bg)); border: 1px solid color-mix(in srgb, var(--nc-acc) 30%, var(--nc-rule)); border-radius: var(--nc-r); }
  & .nc-xnvtext { font-size: 12px; line-height: 1.45; color: var(--nc-dim); }
  & .nc-xnvrow { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 6px; }
  & .nc-xnvrow > .nc-btn { height: var(--nc-h); }

  & .nc-vars, & .nc-chars { display: flex; flex-direction: column; }
  & .nc-vrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--nc-h); gap: 6px; align-items: center; padding: var(--nc-s2) 0; border-bottom: 1px solid var(--nc-rule); }
  & .nc-vrow > .nc-code { grid-column: 1 / 3; }
  & .nc-vrow > .nc-ferr { grid-column: 1 / -1; }
  & .nc-vrow > :nth-child(4) { grid-column: 2 / -1; }
  & .nc-vbool { min-height: var(--nc-h); font-size: 12px; }
  & .nc-crow { display: grid; grid-template-columns: 36px minmax(0, 1fr) var(--nc-h); gap: 6px; align-items: center; padding: var(--nc-s2) 0; border-bottom: 1px solid var(--nc-rule); }
  & .nc-vrow .nc-ib, & .nc-crow .nc-ib { color: var(--nc-mut); }

  & .nc-probs { display: flex; flex-direction: column; gap: var(--nc-s1); }
  & .nc-probok { display: flex; align-items: flex-start; gap: var(--nc-s2); padding: var(--nc-s2) var(--nc-s1); font-size: 12px; line-height: 1.45; color: var(--nc-dim); }
  & .nc-probok svg { width: 16px; height: 16px; color: var(--nc-ok); flex: none; }
  & .nc-psec { display: flex; flex-direction: column; gap: 2px; }
  & .nc-psec + .nc-psec { margin-top: var(--nc-s2); }
  & .nc-pg { display: flex; flex-direction: column; }
  & .nc-prob { display: flex; align-items: flex-start; gap: var(--nc-s2); width: 100%; min-height: var(--nc-h); padding: 7px var(--nc-s2); text-align: left; font-size: 12.5px; line-height: 1.4; font-weight: 400; }
  & .nc-prob .nc-plvl { width: 16px; height: 16px; margin-top: 1px; color: var(--nc-mut); }
  & .nc-prob.nc-error .nc-plvl { color: var(--nc-bad); }
  & .nc-prob.nc-warn .nc-plvl { color: var(--nc-warn); }
  & .nc-prob.nc-hint { color: var(--nc-dim); }
  & .nc-prob:disabled { opacity: 1; cursor: default; }
  & .nc-ptext { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
  & .nc-pchev { width: 14px; height: 14px; margin-top: 2px; color: var(--nc-mut); transition: transform 0.12s; }
  & .nc-pg.nc-open .nc-pchev { transform: rotate(90deg); }
  & .nc-probitems { display: none; flex-direction: column; margin: 0 0 var(--nc-s1) 24px; padding-left: var(--nc-s2); border-left: 1px solid var(--nc-rule); }
  & .nc-pg.nc-open .nc-probitems { display: flex; }
  & .nc-probitem { display: block; width: 100%; min-height: 28px; padding: var(--nc-s1) var(--nc-s2); text-align: left; font-size: 12px; line-height: 1.35; color: var(--nc-dim); border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  & .nc-pfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: var(--nc-s3); padding: var(--nc-s3) var(--nc-s1) 0; border-top: 1px solid var(--nc-rule); }

  & .nc-phead { flex: none; display: flex; align-items: center; gap: var(--nc-s2); padding: var(--nc-s3) var(--nc-s3) var(--nc-s2) var(--nc-s4); }
  & .nc-phead .nc-ititle { flex: 1 1 auto; }
  & .nc-ptools { display: flex; gap: var(--nc-s1); align-items: center; padding: 0 var(--nc-s3) var(--nc-s2) var(--nc-s4); }
  & .nc-ptools > select.nc-in { flex: 1 1 auto; }
  & .nc-popts { flex: none; padding: 0 var(--nc-s4) var(--nc-s2); display: flex; flex-wrap: wrap; column-gap: var(--nc-s4); row-gap: var(--nc-s1); }
  & .nc-popts .nc-check { font-size: 12px; color: var(--nc-dim); }
  & .nc-pvars { flex: none; display: flex; flex-direction: column; gap: 6px; margin: 0 var(--nc-s4) var(--nc-s2); padding: 10px; background: var(--nc-bg); border: 1px solid var(--nc-rule); border-radius: var(--nc-r); max-height: 30%; overflow: auto; }
  & .nc-ptrans { flex: 1 1 auto; min-height: 0; overflow: auto; padding: var(--nc-s2) var(--nc-s4); display: flex; flex-direction: column; gap: var(--nc-s2); overscroll-behavior: contain; border-top: 1px solid var(--nc-rule); }
  & .nc-pact { flex: none; display: flex; flex-direction: column; gap: 6px; padding: var(--nc-s3) var(--nc-s4) var(--nc-s4); border-top: 1px solid var(--nc-rule); }
  & .nc-bubble { align-self: flex-start; max-width: 92%; padding: var(--nc-s2) 10px; border-radius: 10px 10px 10px 4px; background: var(--nc-field); border: 1px solid var(--nc-rule); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
  & .nc-bubble.nc-bpick { align-self: flex-end; border-radius: 10px 10px 4px 10px; background: color-mix(in srgb, var(--nc-acc) 18%, var(--nc-bg)); border-color: color-mix(in srgb, var(--nc-acc) 40%, var(--nc-rule)); }
  & .nc-bspeaker { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
  & .nc-blogic { font-size: 11.5px; color: var(--nc-mut); font-family: ui-monospace, Menlo, Consolas, monospace; padding: 0 var(--nc-s1); overflow-wrap: anywhere; }
  & .nc-blogic.nc-bbad { color: var(--nc-bad); }
  & .nc-bend { text-align: center; color: var(--nc-mut); font-weight: 600; font-size: 12px; padding: var(--nc-s2); border-top: 1px dashed var(--nc-rule); }
  & .nc-ccond { margin-left: auto; padding-left: var(--nc-s2); font-size: 11px; color: var(--nc-mut); }
  & .nc-pvhead { display: flex; align-items: center; justify-content: space-between; gap: var(--nc-s2); }
  & .nc-pvrow { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 6px; align-items: center; min-height: 28px; }
  & .nc-pvname { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
  & input.nc-in.nc-pvin { height: 28px; }
  & input.nc-in.nc-pvin[type="checkbox"] { justify-self: end; width: 18px; height: 18px; }

  & .nc-menu {
    position: absolute;
    z-index: 40;
    min-width: 200px;
    max-width: calc(100% - 16px);
    padding: var(--nc-s1);
    background: var(--nc-field);
    border: 1px solid var(--nc-rule);
    border-radius: 10px;
    box-shadow: var(--nc-shadow);
  }
  & button.nc-mi, & div.nc-mi { display: flex; align-items: center; gap: var(--nc-s2); width: 100%; min-height: var(--nc-h); padding: var(--nc-s1) 10px; text-align: left; font-size: 13px; font-weight: 400; border: 0; border-radius: 6px; outline: none; }
  & .nc-mi:focus-visible, & .nc-mi:focus { outline: none; }
  & .nc-mi:focus-visible { background: var(--nc-pressed); }
  & .nc-mi.nc-cur { background: var(--nc-pressed); }
  & .nc-mi.nc-mdanger, & .nc-mi.nc-mdanger .nc-mic { color: var(--nc-bad); }
  & .nc-mi.nc-empty { color: var(--nc-mut); cursor: default; }
  & .nc-mic { width: 16px; height: 16px; color: var(--nc-dim); }
  & .nc-mlabel { flex: 1 1 auto; min-width: 0; }
  & .nc-mhint { font-size: 11px; color: var(--nc-mut); }
  & .nc-msep { height: 1px; margin: var(--nc-s1) 2px; background: var(--nc-rule); }
  & .nc-menu.nc-quick { width: 280px; padding: 6px; }
  & .nc-qlist { max-height: 260px; overflow: auto; margin-top: var(--nc-s1); }
  & .nc-qsw { width: 8px; height: 8px; border-radius: 50%; flex: none; opacity: 0.85; }

  & .nc-toast {
    position: absolute;
    left: 50%;
    bottom: 20px;
    z-index: 60;
    max-width: min(440px, calc(100% - 24px));
    padding: 10px 14px;
    transform: translate(-50%, 8px);
    background: var(--nc-fg);
    color: var(--nc-bg);
    border-radius: 10px;
    box-shadow: var(--nc-shadow);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
  }
  & .nc-toast.nc-show { opacity: 1; transform: translate(-50%, 0); }

  & dialog.nc-dlg {
    width: min(560px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: min(86vh, 860px);
    margin: auto;
    padding: 0;
    color: var(--nc-fg);
    background: var(--nc-bg);
    border: 1px solid var(--nc-rule);
    border-radius: 14px;
    box-shadow: var(--nc-shadow);
    overflow: hidden;
    font-size: 13px;
  }
  & dialog.nc-dlg[open] { display: flex; flex-direction: column; }
  & dialog.nc-dlg::backdrop { background: rgba(0, 0, 0, 0.45); }
  & dialog.nc-wide-dlg { width: min(980px, calc(100vw - 24px)); }
  & .nc-dhead { flex: none; display: flex; align-items: center; gap: var(--nc-s2); min-height: 52px; padding: var(--nc-s2) var(--nc-s2) var(--nc-s2) 20px; border-bottom: 1px solid var(--nc-rule); background: var(--nc-panel); }
  & .nc-dtitle { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: normal; color: var(--nc-fg); }
  & .nc-dbody { flex: 1 1 auto; min-height: 0; overflow: auto; padding: var(--nc-s4) 20px 20px; display: flex; flex-direction: column; gap: var(--nc-s3); }
  & .nc-drow { display: flex; justify-content: flex-end; align-items: center; gap: var(--nc-s2); flex-wrap: wrap; }
  & .nc-dbody > .nc-railhead { margin: var(--nc-s1) 0 calc(var(--nc-s1) * -1); }

  & .nc-plist { display: flex; flex-direction: column; gap: 6px; }
  & .nc-pnew { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--nc-s2); }
  & .nc-newcard { display: flex; align-items: flex-start; gap: 10px; min-height: 56px; padding: 10px var(--nc-s3); text-align: left; background: var(--nc-field); border: 1px solid var(--nc-rule); }
  & .nc-newic { width: 18px; height: 18px; margin-top: 1px; color: var(--nc-ink); flex: none; }
  & .nc-newtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  & .nc-newname { font-weight: 600; font-size: 13px; }
  & .nc-newabout { font-size: 12px; color: var(--nc-mut); line-height: 1.4; }
  & .nc-prow2 { display: flex; align-items: center; gap: var(--nc-s2); min-height: 48px; padding: var(--nc-s1) var(--nc-s1) var(--nc-s1) var(--nc-s1); border: 1px solid var(--nc-rule); border-radius: var(--nc-r); background: var(--nc-field); }
  & .nc-prow2.nc-on { border-color: color-mix(in srgb, var(--nc-ink) 60%, var(--nc-rule)); box-shadow: inset 3px 0 0 var(--nc-ink); }
  & button.nc-pinfo { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px var(--nc-s2); text-align: left; text-decoration: none; color: var(--nc-fg); }
  & .nc-pname { max-width: 100%; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  & .nc-pmeta { font-size: 12px; color: var(--nc-mut); }
  & .nc-prow2 .nc-ptools { padding: 0; gap: 0; }
  & .nc-prow2 .nc-ib { color: var(--nc-mut); }

  & .nc-exp { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; min-height: 0; }
  & .nc-explist { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  & .nc-explist .nc-titem, & .nc-tlist .nc-titem, & .nc-tl .nc-titem { display: flex; align-items: center; gap: var(--nc-s2); width: 100%; min-height: var(--nc-h); padding: var(--nc-s1) 10px; text-align: left; }
  & .nc-titem.nc-on { background: color-mix(in srgb, var(--nc-acc) 16%, transparent); border-color: color-mix(in srgb, var(--nc-acc) 40%, transparent); font-weight: 600; }
  & .nc-exppane { display: flex; flex-direction: column; gap: var(--nc-s3); min-width: 0; }
  & .nc-expopts { display: flex; flex-direction: column; gap: var(--nc-s3); }
  & .nc-expopts:empty { display: none; }
  & .nc-expprev { margin: 0; max-height: 300px; overflow: auto; padding: var(--nc-s3); background: var(--nc-panel); border: 1px solid var(--nc-rule); border-radius: var(--nc-r); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; color: var(--nc-fg); }
  & .nc-expprev.nc-tplout { max-height: 200px; }
  & .nc-expimg { max-width: 100%; max-height: 300px; overflow: auto; border: 1px solid var(--nc-rule); border-radius: var(--nc-r); background: var(--nc-panel); }
  & .nc-expimg img { max-width: 100%; display: block; }
  & .nc-expwarn { display: flex; flex-direction: column; gap: 6px; padding: 10px var(--nc-s3); border-radius: var(--nc-r); background: color-mix(in srgb, var(--nc-acc) 10%, var(--nc-bg)); border: 1px solid color-mix(in srgb, var(--nc-acc) 35%, var(--nc-rule)); font-size: 12px; line-height: 1.45; }
  & .nc-warnlist { margin: 0; padding-left: 18px; }
  & .nc-expinfo { font-size: 12px; }
  & .nc-ext { font-size: 11px; margin-left: auto; font-weight: 400; }

  & .nc-ted { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; min-height: 0; }
  & .nc-tlist { display: flex; flex-direction: column; gap: var(--nc-s2); min-width: 0; }
  & .nc-tl { display: flex; flex-direction: column; gap: 2px; }
  & .nc-trow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  & .nc-trow .nc-titem { flex: 1 1 auto; min-width: 0; }
  & .nc-tlist > .nc-trow { padding-top: var(--nc-s2); border-top: 1px solid var(--nc-rule); }
  & .nc-tlist > .nc-trow > .nc-btn { height: var(--nc-hs); padding: 0 var(--nc-s2); font-size: 12px; gap: var(--nc-s1); }
  & .nc-tlist > .nc-trow > .nc-btn svg { width: 14px; height: 14px; }
  & .nc-tform { display: flex; flex-direction: column; gap: var(--nc-s4); min-width: 0; }
  & .nc-tsec { display: flex; flex-direction: column; gap: var(--nc-s2); padding-top: var(--nc-s3); border-top: 1px solid var(--nc-rule); }
  & .nc-tsec > .nc-btn { align-self: flex-start; }
  & .nc-tsech { margin: 0; font-size: 13px; font-weight: 700; color: var(--nc-fg); letter-spacing: normal; }
  & .nc-ttable { display: flex; flex-direction: column; gap: var(--nc-s2); }
  & .nc-trw { display: grid; grid-template-columns: minmax(80px, 1fr) minmax(70px, 1fr) minmax(90px, 120px) minmax(0, 1fr) minmax(0, 1fr) auto auto; gap: 6px; align-items: end; }
  & .nc-trw.nc-trp { grid-template-columns: minmax(80px, 1fr) minmax(80px, 140px) auto auto; }
  & .nc-trw.nc-locked .nc-tcl { color: var(--nc-mut); }
  & .nc-ttools { display: flex; gap: 0; align-items: center; height: var(--nc-h); }
  & .nc-ttools .nc-ib, & .nc-trw > .nc-ib { color: var(--nc-mut); }
  & .nc-tcell { display: flex; flex-direction: column; gap: var(--nc-s1); min-width: 0; }
  & .nc-tcell > input.nc-check { height: var(--nc-h); margin: 0 auto; }
  & .nc-tcl { font-size: 11px; font-weight: 600; color: var(--nc-mut); }
  & .nc-tprev { padding: var(--nc-s4); background: var(--nc-panel); border: 1px solid var(--nc-rule); border-radius: var(--nc-r); }
  & .nc-tfoot { padding-top: var(--nc-s3); border-top: 1px solid var(--nc-rule); }
  & .nc-tmsg { flex: 1 1 200px; min-height: 1em; }
  & .nc-tref .nc-railhead { margin-left: 0; }
  & .nc-tplbody { min-height: 220px; font-size: 12px; white-space: pre; tab-size: 2; }
  & .nc-tpl-error { color: var(--nc-bad); }

  &.nc-full {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    z-index: 2147483000;
    overflow: hidden;
    color: var(--nc-fg);
    background: var(--nc-bg);
  }
}

.tpanel #nc-app:not(.nc-full) { margin: -20px; width: calc(100% + 40px); }
@media (min-width: 768px) {
  .tpanel #nc-app:not(.nc-full) { margin: -32px; width: calc(100% + 64px); }
}
.nc-noscroll { overflow: hidden; }

@media (hover: hover) {
  #nc-app {
    & .nc-ib:hover, & .nc-pbtn:hover, & .nc-tab:hover, & .nc-mi:hover, & .nc-palitem:hover, & .nc-titem:hover, & .nc-zpct:hover, & .nc-prob:not(:disabled):hover, & .nc-probitem:hover, & .nc-pinfo:hover { background: var(--nc-hov); }
    & .nc-ib.nc-idanger:hover { color: var(--nc-bad); }
    & .nc-ib.nc-primary:hover, & .nc-btn.nc-primary:hover { background: color-mix(in srgb, var(--nc-acc) 88%, #fff); }
    & .nc-btn:hover, & .nc-chipbtn:hover, & .nc-newcard:hover { border-color: var(--control, var(--nc-mut)); }
    & .nc-btn.nc-primary:hover { border-color: transparent; }
    & .nc-btn.nc-danger:hover { background: color-mix(in srgb, var(--nc-bad) 10%, transparent); border-color: transparent; }
    & .nc-chipbtn:hover { background: var(--nc-panel); }
    & .nc-linkbtn:hover { color: var(--nc-fg); }
    & .nc-xhelpsum:hover, & .nc-tref summary:hover { color: var(--nc-fg); }
    & .nc-hit:hover + .nc-wire, & .nc-edge:hover .nc-wire { stroke: var(--nc-ink); }
    & .nc-node:hover { border-color: var(--nc-ink); }
    & .nc-port:hover { background: var(--nc-ink); border-color: var(--nc-ink); }
    & .nc-sw:hover { border-color: var(--nc-fg); }
  }
}

@media (max-width: 1180px) {
  #nc-app .nc-bar .nc-labelled:not(.nc-keep):not(.nc-primary) .nc-btext { display: none; }
}
@media (max-width: 1060px) {
  #nc-app .nc-savestate { max-width: 90px; }
  #nc-app .nc-pbtn { max-width: 150px; }
}
@media (max-width: 999px) {
  #nc-app .nc-rail { width: 184px; }
  #nc-app .nc-side { width: 272px; }
  #nc-app .nc-map { display: none; }
}

@media (pointer: coarse) {
  #nc-app {
    --nc-h: 44px;
    --nc-hs: 40px;
    & .nc-ib { min-width: 44px; height: 44px; }
    & .nc-ib.nc-primary { padding: 0 14px; }
    & .nc-ib.nc-sm { width: 40px; min-width: 40px; height: 40px; }
    & .nc-pbtn, & .nc-tab { height: 44px; }
    & .nc-mi, & .nc-palitem { min-height: 44px; }
    & .nc-titem, & .nc-prow2 { min-height: 44px; }
    & .nc-zoom .nc-ib, & .nc-zpct { height: 44px; min-width: 44px; }
    & input.nc-in, & select.nc-in, & textarea.nc-in { font-size: 16px; }
    & input.nc-in.nc-code { font-size: 16px; }
    & textarea.nc-in { height: auto; min-height: 88px; }
    & input.nc-in.nc-pvin { height: 40px; }
    & input.nc-colourin { width: 44px; }
    & .nc-sw { width: 40px; height: 40px; }
    & .nc-check { min-height: 40px; }
    & .nc-check input, & input.nc-check, & input.nc-in[type="checkbox"] { width: 24px; height: 24px; }
    & .nc-port::after { inset: -16px; }
    & .nc-hit { stroke-width: 28px; }
    & .nc-prob { min-height: 44px; }
    & .nc-probitem { min-height: 44px; display: flex; align-items: center; }
    & .nc-chipbtn { font-size: 14px; padding: 0 12px; }
    & .nc-xhelpsum, & .nc-tref summary, & .nc-linkbtn { min-height: 40px; }
    & .nc-opttools { gap: 0; }
    & .nc-opt .nc-xf { padding-left: 0; }
    & .nc-xnvrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    & .nc-xnvrow > .nc-btn { grid-column: 1 / -1; }
  }
}

#nc-app.nc-phone {
  height: calc(100dvh - 150px);
  min-height: 420px;
  & .nc-dsk { display: none !important; }
  & .nc-mob { display: inline-flex; }
  & .nc-savestate { display: none; }
  & .nc-bar { gap: 2px; padding: 4px 6px; }
  & .nc-pbtn { max-width: none; flex: 1 1 auto; }
  & .nc-bottom {
    flex: none;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    min-height: 56px;
    padding: 4px 4px max(4px, env(safe-area-inset-bottom));
    background: var(--nc-panel);
    border-top: 1px solid var(--nc-rule);
  }
  & .nc-bottom .nc-ib { flex: 1 1 0; flex-direction: column; gap: 2px; height: auto; min-height: 48px; font-size: 11px; padding: 2px; }
  & .nc-bottom .nc-btext { font-size: 11px; }
  & .nc-rail, & .nc-side {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--nc-kb, 0px);
    top: auto;
    width: auto;
    max-height: 62%;
    height: 62%;
    z-index: 20;
    border: 0;
    border-top: 1px solid var(--nc-rule);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.28);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.2s, visibility 0.2s;
    display: flex;
  }
  & .nc-side { max-height: 70%; height: 70%; }
  &.nc-rail-open .nc-rail { transform: none; visibility: visible; z-index: 21; }
  &.nc-side-on .nc-side { transform: none; visibility: visible; }
  & .nc-sheetclose { display: inline-flex; position: absolute; top: 2px; right: 4px; z-index: 3; }
  & .nc-tabs { padding-right: 48px; }
  & .nc-tab .nc-tablabel { display: inline; }
  & .nc-inspector { padding: 14px var(--nc-s4) var(--nc-s4); }
  & .nc-inspector .nc-ihead { padding-right: 44px; }
  & .nc-playhost { padding-top: var(--nc-s2); }
  & .nc-phead { padding-right: 52px; }
  & .nc-zoom { bottom: 10px; }
  & .nc-map { display: none; }
  & .nc-hint { top: 40%; }
  & dialog.nc-dlg, & dialog.nc-wide-dlg {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
    border-width: 1px 0 0;
  }
  & .nc-dbody { padding: var(--nc-s3) var(--nc-s4) var(--nc-s4); }
  & .nc-dhead { padding-left: var(--nc-s4); }
  & .nc-exp, & .nc-ted { grid-template-columns: minmax(0, 1fr); gap: var(--nc-s3); }
  & .nc-pnew { grid-template-columns: minmax(0, 1fr); }
  & .nc-trw { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
  & .nc-trw > .nc-ttools { grid-column: 1 / -1; justify-content: flex-end; height: auto; }
  & .nc-trw.nc-trp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  & .nc-drow > .nc-btn { flex: 1 1 auto; }
}
#nc-app.nc-phone.nc-full { height: 100dvh; min-height: 0; }

@media (max-width: 759px) {
  #nc-app { height: calc(100dvh - 150px); min-height: 420px; }
  #nc-app.nc-full { height: 100dvh; min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #nc-app, #nc-app * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
