/* Machining-code viewer shell (specs/028-nc-viewer): design tokens, theme, page layout, header, file
   tabs, job list, op list, info tabs, status bar, viewport chips, toasts, drop zone, empty state and
   dialogs. The scene, code and player stylesheets style their own internals with the --nc-* tokens
   defined here. The shell sets <html data-theme="light|dark"> before any module mounts; every
   dark value is keyed on :root[data-theme="dark"] (not on prefers-color-scheme). */

:root {
  color-scheme: light;
  --nc-bg: #eef2f6;
  --nc-panel: #ffffff;
  --nc-panel-2: #f5f7fa;
  --nc-border: #d8e0e9;
  /* Inputs, segmented controls and overlay buttons: >= 3:1 against panels (D-07). */
  --nc-border-strong: #7d8799;
  --nc-text: #172033;
  --nc-text-dim: #566377;
  /* Dimmer than --nc-text-dim yet >= 4.5:1 on panel-2 (op 0 file tab names, NU-05). */
  --nc-text-faint: #657184;
  --nc-accent: #0d73d9;
  --nc-accent-contrast: #ffffff;
  /* Text on filled badges and danger buttons. */
  --nc-on-fill: #ffffff;
  --nc-danger: #d0303c;
  /* >= 4.5:1 for 11px badges on tinted rows too (4.81 on its badge, 4.92 on a selected row). */
  --nc-warning: #8f5400;
  --nc-success: #127556;
  --nc-format-pgi: #7c3aed;
  /* No font files are shipped: name only the faces the systems have (RU-08). */
  --nc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --nc-mono: "SF Mono", SFMono-Regular, Menlo, Consolas, D2Coding, "Liberation Mono", monospace;
  /* Type scale (readability round 2026-10-01, every module uses these). Korean text is >= 12px;
     micro (11px) is for Latin / number chips and badges only. Weights are 400/500/600/700 only. */
  /* Text size setting (follow-up F5): the shell sets --nc-ui-scale on <html> (1 | 1.125 | 1.25). */
  --nc-ui-scale: 1;
  --nc-fs-micro: calc(11px * var(--nc-ui-scale));
  --nc-fs-sm: calc(12px * var(--nc-ui-scale));
  --nc-fs-md: calc(13px * var(--nc-ui-scale));
  --nc-fs-lg: calc(14px * var(--nc-ui-scale));
  /* The op detail title (B-25): one step above the 14px values under it. */
  --nc-fs-lg2: calc(16px * var(--nc-ui-scale));
  --nc-fs-xl: calc(18px * var(--nc-ui-scale));
  --nc-fw-regular: 400;
  --nc-fw-medium: 500;
  --nc-fw-semibold: 600;
  --nc-fw-bold: 700;
  /* "Where the machine is now" (nc/model PLAYBACK_COLORS): fill + outline. */
  --nc-playback: #f5b700;
  --nc-playback-outline: #111827;
  --nc-radius: 6px;
  --nc-viewport-bg: #e8ecf1;
  --nc-header-h: 44px;

  /* Secondary tokens (shell-defined, available to every module). */
  --nc-accent-soft: rgba(13, 115, 217, 0.11);
  /* The playback row of the op list (RP-11): a little stronger than accent-soft. */
  --nc-current-bg: rgba(13, 115, 217, 0.14);
  --nc-selected: rgba(13, 115, 217, 0.16);
  /* Secondary text on a selected row: >= 4.5:1 on --nc-selected over the panel (round 2 N-03). */
  --nc-selected-dim: #3f4b5e;
  --nc-accent-strong: #0a5fb4;
  --nc-hover: rgba(23, 32, 51, 0.055);
  --nc-border-soft: #e8edf3;
  --nc-shadow: 0 10px 28px rgba(15, 23, 42, 0.14), 0 1px 3px rgba(15, 23, 42, 0.08);
  /* Focus: 2px solid accent outline (D-06). --nc-focus stays for modules that still use box-shadow. */
  --nc-focus-color: var(--nc-accent);
  --nc-focus: 0 0 0 2px var(--nc-accent);
  --nc-tabs-h: 34px;
  /* Every panel head band (left switch, code head, op head, info tabs) is this tall, borders
     included, so their lines meet across the panels (B-26). */
  --nc-band-h: 34px;
  --nc-status-h: 24px;
  --nc-left-w: 320px;
  --nc-right-w: 300px;
  /* Axis colours, one set for the DRO letters and the 3D axes (B-12): >= 4.5:1 on panel, panel-2
     and the viewport background. */
  --nc-axis-x: #c03a3a;
  --nc-axis-y: #147b3a;
  --nc-axis-z: #2f63c9;
  /* Filled danger badges (breakout count, B-08): 6.6:1 with --nc-on-fill on any row tint. */
  --nc-danger-fill: #b42318;
  /* Small red numbers (the file table's breakout count, U3-17): >= 4.5:1 on the panel and on a
     selected row in both themes (--nc-danger is 4.0:1 on a selected row). */
  --nc-danger-text: #b42318;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --nc-bg: #0c1016;
  --nc-panel: #141a22;
  --nc-panel-2: #19202a;
  --nc-border: #29323e;
  --nc-border-strong: #5d6b7e;
  --nc-text: #e1e7ef;
  --nc-text-dim: #8e9aab;
  --nc-text-faint: #7c8899;
  --nc-accent: #3d95f2;
  --nc-accent-contrast: #0b1220;
  --nc-on-fill: #0b1220;
  --nc-danger: #f06a74;
  --nc-warning: #f0b03c;
  --nc-success: #3ccb92;
  --nc-format-pgi: #b39afc;
  --nc-viewport-bg: #10151c;
  --nc-accent-soft: rgba(61, 149, 242, 0.17);
  --nc-current-bg: rgba(61, 149, 242, 0.2);
  --nc-playback: #ffd23f;
  --nc-playback-outline: #111827;
  --nc-selected: rgba(61, 149, 242, 0.24);
  --nc-selected-dim: #b4bfcd;
  --nc-accent-strong: #6aaff5;
  --nc-hover: rgba(255, 255, 255, 0.055);
  --nc-border-soft: #1f2731;
  --nc-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
  --nc-axis-x: #f07474;
  --nc-axis-y: #4cc38a;
  --nc-axis-z: #6ea8ff;
  --nc-danger-fill: #f06a74;
  --nc-danger-text: #fb7f87;
}

/* ------------------------------------------------------------------ base */

html,
body.nc-viewer {
  height: 100%;
  margin: 0;
  /* UX3-16: a sideways two-finger swipe or a pull at the top over the panels is not the browser's
     back / forward gesture or pull-to-refresh (both would leave the viewer). */
  overscroll-behavior: none;
}

body.nc-viewer {
  overflow: hidden;
  background: var(--nc-bg);
  color: var(--nc-text);
  font: var(--nc-fs-md)/1.45 var(--nc-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Korean breaks between words, never inside one (U3-14); a word longer than its line still breaks
     (break-word, not anywhere: min-content widths stay as they were). Code lines are white-space: pre. */
  word-break: keep-all;
  overflow-wrap: break-word;
}

#nc-app,
#nc-app *,
#nc-app *::before,
#nc-app *::after {
  box-sizing: border-box;
}

#nc-app [hidden] {
  display: none !important;
}

/* UX3-35: the ring every control gets, at the specificity of :focus-visible alone (:where() adds
   none), so a component's own ring rule — "outline-offset: -2px" inside a scroller or a clipped box
   such as the code view — wins over it. */
:where(#nc-app) :focus-visible {
  outline: 2px solid var(--nc-focus-color);
  outline-offset: 2px;
}

#nc-app ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
#nc-app ::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 10px;
  background: color-mix(in srgb, var(--nc-text-dim) 70%, transparent) padding-box;
}
#nc-app ::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in srgb, var(--nc-text-dim) 85%, transparent);
}
#nc-app ::-webkit-scrollbar-track {
  background: transparent;
}

.nc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.nc-mono {
  font-family: var(--nc-mono);
  font-size: var(--nc-fs-sm);
  font-variant-numeric: tabular-nums;
}
.nc-muted {
  color: var(--nc-text-dim);
}
.nc-small {
  font-size: var(--nc-fs-sm);
}
.nc-note {
  margin: 0 0 10px;
  color: var(--nc-text-dim);
}

.nc-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  line-height: 0;
}
.nc-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nc-icon svg .f {
  fill: currentColor;
  stroke: none;
}

/* ---------------------------------------------------------------- layout */

#nc-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}

/* Widths come from the shell (ratios clamped so the 3D view keeps >= 50%). */
#nc-main {
  display: grid;
  grid-template-columns: var(--nc-left-w) 4px minmax(0, 1fr) 4px var(--nc-right-w);
  min-height: 0;
  min-width: 0;
}

#nc-left,
#nc-right {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--nc-panel);
}
#nc-left {
  grid-template-rows: auto minmax(0, 1fr) auto;
}
#nc-left > .nc-left-switch {
  grid-row: 1;
}
#nc-left > #nc-code,
#nc-left > .nc-jobs-panel {
  grid-row: 2;
}
#nc-left > #nc-dro {
  grid-row: 3;
}
/* op list | 4px splitter | info. The shell sets the split (default 3 : 2, draggable, RU-23). */
#nc-right {
  grid-template-rows: minmax(120px, var(--nc-ops-fr, 3fr)) 4px minmax(150px, var(--nc-info-fr, 2fr));
}
.nc-resizer.nc-resizer-row {
  cursor: row-resize;
  background: linear-gradient(to bottom, transparent 1.5px, var(--nc-border) 1.5px, var(--nc-border) 2.5px, transparent 2.5px);
}
.nc-resizer.nc-resizer-row:hover,
.nc-resizer.nc-resizer-row.is-dragging,
.nc-resizer.nc-resizer-row:focus-visible {
  background: var(--nc-accent);
}
body.nc-resizing-rows,
body.nc-resizing-rows * {
  cursor: row-resize !important;
  user-select: none !important;
}

#nc-code {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--nc-panel);
}
#nc-dro {
  min-width: 0;
  border-top: 1px solid var(--nc-border);
  background: var(--nc-panel-2);
}
#nc-dro:empty {
  display: none;
}

#nc-viewport {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--nc-viewport-bg);
  /* UX3-23 (I-5): no finger on the 3D area — the legend, the transport, the cube, the chips — pans or
     zooms the page; what must still scroll there says touch-action: pan-y itself. */
  touch-action: none;
}
#nc-transport {
  position: absolute;
  z-index: 20;
  right: 12px;
  bottom: 12px;
  left: 12px;
}
#nc-transport:empty {
  display: none;
}
/* No file: no DRO numbers and no transport (D-23). */
#nc-app[data-state="empty"] #nc-dro,
#nc-app[data-state="empty"] #nc-transport {
  display: none;
}

#nc-ops,
#nc-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
#nc-ops {
  container: nc-ops / inline-size;
}
#nc-info {
  container: nc-info / inline-size;
}
/* The row splitter above it draws the line (the narrow layout has no splitter: see below). */
#nc-info {
  border-top: 0;
}

.nc-resizer {
  position: relative;
  z-index: 5;
  cursor: col-resize;
  touch-action: none;
  background: linear-gradient(to right, transparent 1.5px, var(--nc-border) 1.5px, var(--nc-border) 2.5px, transparent 2.5px);
  transition: background-color 0.12s;
}
/* The line stays 4px; the grab area is 12px (B-11). */
.nc-resizer::before {
  content: "";
  position: absolute;
  inset: 0 -4px;
}
.nc-resizer.nc-resizer-row::before {
  inset: -4px 0;
}
.nc-resizer:hover,
.nc-resizer.is-dragging,
.nc-resizer:focus-visible {
  background: var(--nc-accent);
  opacity: 0.85;
}
#nc-app .nc-resizer:focus-visible {
  outline-offset: -2px;
}
#nc-main[data-left-collapsed="true"] #nc-left-resizer,
#nc-main[data-right-collapsed="true"] #nc-right-resizer {
  pointer-events: none;
  cursor: default;
}
body.nc-resizing,
body.nc-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}
body.nc-resizing #nc-viewport canvas,
body.nc-resizing iframe {
  pointer-events: none;
}

/* Collapsed panels become a 28px rail with an expand button. */
.nc-rail {
  display: none;
}
#nc-left[data-collapsed="true"],
#nc-right[data-collapsed="true"] {
  grid-template-rows: minmax(0, 1fr);
  background: var(--nc-panel-2);
}
#nc-left[data-collapsed="true"] > :not(.nc-rail),
#nc-right[data-collapsed="true"] > :not(.nc-rail) {
  display: none !important;
}
#nc-left[data-collapsed="true"] > .nc-rail,
#nc-right[data-collapsed="true"] > .nc-rail {
  display: flex;
  grid-row: 1 / -1;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  cursor: pointer;
}
.nc-rail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--nc-border-strong);
  border-radius: var(--nc-radius);
  background: var(--nc-panel);
  color: var(--nc-text);
  cursor: pointer;
}
.nc-rail-btn:hover {
  background: var(--nc-accent-soft);
  color: var(--nc-accent-strong);
}
.nc-rail-label {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
}

/* Collapse handles on the 3D view edges, vertically centred (clear of chips, cube, legend, toasts). */
.nc-edge-handle {
  position: absolute;
  z-index: 8;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 48px;
  margin-top: -24px;
  padding: 0;
  border: 1px solid var(--nc-border);
  background: color-mix(in srgb, var(--nc-panel) 86%, transparent);
  color: var(--nc-text-dim);
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.12s, color 0.12s;
}
.nc-edge-handle.is-left {
  left: 0;
  border-left: 0;
  border-radius: 0 8px 8px 0;
}
.nc-edge-handle.is-right {
  right: 0;
  border-right: 0;
  border-radius: 8px 0 0 8px;
}
.nc-edge-handle:hover,
.nc-edge-handle:focus-visible {
  opacity: 1;
  color: var(--nc-text);
  border-color: var(--nc-border-strong);
}
#nc-app[data-state="empty"] .nc-edge-handle {
  display: none;
}

/* ---------------------------------------------------------------- header */

#nc-header {
  position: relative;
  z-index: 30;
  min-width: 0;
  background: var(--nc-panel);
  border-bottom: 1px solid var(--nc-border);
}

.nc-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--nc-header-h);
  padding: 0 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  /* Bigger text (uiScale) stops at 14px in the header so its buttons still fit a 1024px window. */
  font-size: min(var(--nc-fs-md), 14px);
}
.nc-toolbar::-webkit-scrollbar {
  display: none;
}
.nc-toolbar-spacer {
  flex: 1 1 auto;
  min-width: 0;
}
/* Still too wide after both compact steps (B-10): fade the cut-off end like the file tabs do. */
.nc-toolbar[data-overflow="true"] {
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28px);
  mask-image: linear-gradient(to left, transparent 0, #000 28px);
}

.nc-brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 4px;
  border-radius: var(--nc-radius);
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.nc-brand:hover .nc-brand-prisme {
  color: var(--nc-accent-strong);
}
/* The PRISME mark on its white tile, as on the 2D CAD page (cad2d_icons.js "app-logo"); a hairline
   ring keeps the tile visible on the light header (B-32). */
.nc-brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--nc-border);
}
.nc-brand-name {
  font-size: var(--nc-fs-lg);
  font-weight: var(--nc-fw-semibold);
  letter-spacing: -0.01em;
}
.nc-brand-prisme {
  font-weight: var(--nc-fw-bold);
  letter-spacing: 0.01em;
}
.nc-env {
  flex: none;
  padding: 1px 7px;
  border: 1px solid var(--nc-border-strong);
  border-radius: 999px;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  white-space: nowrap;
}
.nc-env:not([data-environment="production"]) {
  border-color: color-mix(in srgb, var(--nc-warning) 55%, transparent);
  background: color-mix(in srgb, var(--nc-warning) 12%, transparent);
  color: var(--nc-warning);
}

.nc-toolgroup {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--nc-border);
}
.nc-toolgroup-end {
  padding-left: 0;
  border-left: 0;
}
/* 인쇄 · 화면 캡처, then a line, then the settings and help (B-21). */
.nc-toolgroup-output {
  padding-right: 10px;
  border-right: 1px solid var(--nc-border);
}
.nc-brand + .nc-toolgroup,
.nc-env + .nc-toolgroup {
  border-left: 0;
  padding-left: 0;
}

.nc-btn {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: var(--nc-radius);
  background: transparent;
  color: var(--nc-text);
  font: inherit;
  font-weight: var(--nc-fw-medium);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.1s, border-color 0.1s, color 0.1s;
}
.nc-btn:hover:not(:disabled) {
  background: var(--nc-hover);
}
.nc-btn:active:not(:disabled) {
  background: color-mix(in srgb, var(--nc-text) 10%, transparent);
}
.nc-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.nc-btn[aria-expanded="true"] {
  background: var(--nc-accent-soft);
  color: var(--nc-accent-strong);
}
/* A header toggle that is on (측정, B-03): the same tint as an open menu plus a ring, so it reads
   as pressed even with only its icon left. */
.nc-toolgroup > .nc-btn[aria-pressed="true"] {
  background: var(--nc-accent-soft);
  color: var(--nc-accent-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nc-accent) 55%, transparent);
}
.nc-btn-primary {
  border-color: var(--nc-accent);
  background: var(--nc-accent);
  color: var(--nc-accent-contrast);
}
.nc-btn-primary:hover:not(:disabled) {
  background: var(--nc-accent-strong);
  border-color: var(--nc-accent-strong);
}
.nc-btn-danger {
  border-color: var(--nc-danger);
  background: var(--nc-danger);
  color: var(--nc-on-fill);
}
.nc-btn-danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--nc-danger) 85%, #000);
}
.nc-btn-ghost {
  border-color: var(--nc-border);
}
.nc-btn-sm {
  height: 24px;
  padding: 0 7px;
  font-size: var(--nc-fs-sm);
}
.nc-btn-sm .nc-icon {
  width: 15px;
  height: 15px;
}
.nc-btn-lg {
  height: 34px;
  padding: 0 16px;
  font-size: var(--nc-fs-md);
}
.nc-btn.is-attention:not(:disabled) {
  border-color: color-mix(in srgb, var(--nc-accent) 55%, transparent);
  background: var(--nc-accent-soft);
  color: var(--nc-accent-strong);
}
.nc-btn:not(:has(.nc-btn-label)) {
  width: 28px;
  padding: 0;
}
/* Two button sizes only (B-27): 28px in the header and on the 3D view, 24px inside panels
   (`nc-btn nc-btn-sm nc-btn-ghost`, labels 500); an icon-only small button is square. */
.nc-btn.nc-btn-sm:not(:has(.nc-btn-label)) {
  width: 24px;
}
/* UX2-35: the help button shows the "?" that opens it, after the keyboard sign. */
.nc-btn.nc-btn-help {
  gap: 2px;
  width: auto;
  padding: 0 6px;
}
.nc-btn-glyph {
  font-size: var(--nc-fs-md);
  font-weight: var(--nc-fw-bold);
  line-height: 1;
}
.nc-btn-caret {
  width: 13px;
  height: 13px;
  margin-left: -2px;
  color: var(--nc-text-dim);
}
.nc-btn-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--nc-panel);
  border-radius: 50%;
  background: var(--nc-accent);
}
.nc-show-narrow {
  display: none !important;
}

.nc-segmented {
  display: inline-flex;
  flex: none;
  margin-left: 2px;
  border: 1px solid var(--nc-border-strong);
  border-radius: var(--nc-radius);
  overflow: hidden;
}
.nc-segmented .nc-btn {
  height: 26px;
  padding: 0 9px;
  border: 0;
  border-radius: 0;
}
.nc-segmented .nc-btn + .nc-btn {
  border-left: 1px solid var(--nc-border);
}
.nc-segmented + .nc-segmented {
  margin-left: 4px;
}
/* The camera looks this way now (scene view:state) — RU-22. */
.nc-segmented .nc-btn[aria-pressed="true"] {
  background: var(--nc-accent-soft);
  color: var(--nc-accent-strong);
  font-weight: var(--nc-fw-semibold);
}
/* Top/bottom view lock (RU-32): open lock + "고정" when off, filled accent + closed lock when on. */
.nc-btn-lock .nc-lock-icon {
  display: inline-flex;
}
.nc-btn-lock .nc-icon {
  width: 15px;
  height: 15px;
}
.nc-segmented .nc-btn-lock.is-locked {
  background: var(--nc-accent);
  color: var(--nc-accent-contrast);
}
.nc-segmented .nc-btn-lock.is-locked:hover:not(:disabled) {
  background: var(--nc-accent-strong);
}
/* One width for "고정" / "위 고정" / "아래 고정", so 등각 · 보기 never move (NU-07). */
.nc-segmented .nc-btn-lock {
  min-width: 92px;
}
.nc-btn-short {
  display: none;
}
#nc-app .nc-segmented .nc-btn:focus-visible {
  outline-offset: -2px;
}

/* ------------------------------------------------------ popovers, menus */

.nc-popover {
  position: fixed;
  z-index: 60;
  top: calc(var(--nc-header-h) + 4px);
  right: 10px;
  width: 300px;
  max-height: calc(100vh - var(--nc-header-h) - 24px);
  padding: 10px 12px 12px;
  overflow: auto;
  border: 1px solid var(--nc-border);
  border-radius: 8px;
  background: var(--nc-panel);
  box-shadow: var(--nc-shadow);
}
#nc-app .nc-popover:focus-visible {
  outline: none;
}
.nc-popover.nc-help {
  width: min(760px, calc(100vw - 20px));
}
.nc-help-groups {
  column-count: 2;
  column-gap: 24px;
}
.nc-help-group {
  break-inside: avoid;
  padding-bottom: 8px;
}
.nc-popover-title {
  margin-bottom: 6px;
  font-size: var(--nc-fs-md);
  font-weight: var(--nc-fw-semibold);
}
.nc-popover-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.nc-settings-group + .nc-settings-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--nc-border-soft);
}
.nc-settings-heading {
  margin: 0 0 4px;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  letter-spacing: 0.02em;
}
.nc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
}
.nc-check:hover {
  background: var(--nc-hover);
}
.nc-check input {
  flex: none;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--nc-accent);
  cursor: pointer;
}
/* A checkbox with a 12px second line (「조작」 group, D-24): the box sits on the first line. */
.nc-check.has-sub {
  align-items: flex-start;
}
.nc-check.has-sub input {
  margin-top: 3px;
}
.nc-check.has-sub .nc-setting-dot {
  margin-top: 7px;
}
.nc-check-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nc-check-sub {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  line-height: 1.35;
}
/* Never taller than the window (B-28, A-31): the groups scroll, the title and 「기본값으로」 stay. */
.nc-popover.nc-settings {
  display: flex;
  flex-direction: column;
  width: 340px;
  max-height: calc(100vh - 56px);
  padding: 0;
  overflow: hidden;
}
.nc-settings > .nc-popover-title {
  flex: none;
  margin: 0;
  padding: 10px 12px 6px;
}
.nc-settings-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 12px 8px;
  overflow: auto;
  overscroll-behavior: contain;
}
.nc-settings > .nc-popover-actions {
  flex: none;
  margin: 0;
  padding: 8px 12px;
  border-top: 1px solid var(--nc-border-soft);
  background: var(--nc-panel);
}
/* Select rows line up with the checkbox labels (22px = checkbox + gap) and read as bright as them
   (RU-24). One select column width, so every select starts at the same x (B-28); a long label
   keeps a short name and says the rest on a 12px line under it. */
.nc-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 2px 4px 2px 26px;
}
.nc-field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--nc-text);
}
/* Under the whole row, so it stays one line next to a fixed select column. */
.nc-field-sub {
  grid-column: 1 / -1;
  margin-top: -4px;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  line-height: 1.35;
}
.nc-field select {
  width: 100%;
  min-width: 0;
}
.nc-jobs-search::placeholder {
  color: var(--nc-text-dim);
  opacity: 1;
}
.nc-field select,
.nc-jobs-search {
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--nc-border-strong);
  border-radius: 5px;
  background: var(--nc-panel);
  color: var(--nc-text);
  font: inherit;
}
.nc-setting-dot {
  flex: none;
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--nc-accent);
}
.nc-field-label .nc-setting-dot {
  margin-left: 0;
}

/* The key column is as wide as its widest keys (UX2-35: 「Shift/Ctrl」+「왼쪽 끌기」 no longer runs into
   the words), at least 110 px at text size 1; the keys never wrap. */
.nc-help-list {
  display: grid;
  grid-template-columns: minmax(calc(110px * var(--nc-ui-scale)), max-content) minmax(0, 1fr);
  gap: 5px 12px;
  margin: 0;
}
.nc-help-list dt {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.nc-help-list kbd {
  white-space: nowrap;
}
.nc-help-list dd {
  margin: 0;
  color: var(--nc-text-dim);
}
.nc-help-sep {
  color: var(--nc-text-dim);
}
.nc-help-note {
  margin: 10px 0 0;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
}
kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 5px;
  border: 1px solid var(--nc-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--nc-panel-2);
  color: var(--nc-text);
  font: var(--nc-fs-sm)/1.4 var(--nc-mono);
  text-align: center;
}

.nc-popover.nc-menu {
  width: auto;
  min-width: 200px;
  max-width: calc(100vw - 16px);
  padding: 4px;
}
.nc-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--nc-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.nc-menu-item:hover:not(:disabled),
.nc-menu-item:focus-visible {
  background: var(--nc-accent-soft);
}
#nc-app .nc-menu-item:focus-visible {
  outline-offset: -2px;
}
.nc-menu-item:disabled {
  cursor: default;
}
/* A disabled item fades its name, not the reason under it (B-21): the reason is meant to be read. */
.nc-menu-item:disabled > :not(.nc-menu-label),
.nc-menu-item:disabled .nc-menu-text {
  opacity: 0.55;
}
.nc-menu-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nc-menu-reason {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  line-height: 1.3;
}
.nc-menu-item:has(.nc-menu-reason) {
  padding-top: 3px;
  padding-bottom: 3px;
}
/* Checkable menus (보기 ▾): a 16px ✓ column in front of every label (RU-22). */
.nc-menu.has-checks .nc-menu-item {
  justify-content: flex-start;
  gap: 6px;
  padding-left: 6px;
}
.nc-menu-check {
  flex: none;
  width: 16px;
  color: var(--nc-accent-strong);
  font-weight: var(--nc-fw-bold);
  text-align: center;
}
.nc-menu.has-checks .nc-menu-label {
  flex: 1 1 auto;
}
.nc-menu-item.is-checked .nc-menu-label {
  font-weight: var(--nc-fw-semibold);
}
.nc-menu.has-checks .nc-menu-hint {
  margin-left: 16px;
}
.nc-menu-hint {
  min-width: 0;
  border-bottom-width: 1px;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-micro);
}
.nc-menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--nc-border-soft);
}

/* ------------------------------------------------------------- file tabs */

.nc-tabbar {
  position: relative;
  display: flex;
  align-items: stretch;
  height: var(--nc-tabs-h);
  border-top: 1px solid var(--nc-border-soft);
  background: var(--nc-panel-2);
}
.nc-filetabs {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  gap: 1px;
  min-width: 0;
  padding: 0 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.nc-filetabs::-webkit-scrollbar {
  display: none;
}
/* Fade only the edge that has more tabs behind it. */
.nc-tabbar.fade-start .nc-filetabs {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px);
  mask-image: linear-gradient(to right, transparent 0, #000 16px);
}
.nc-tabbar.fade-end .nc-filetabs {
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 16px);
  mask-image: linear-gradient(to left, transparent 0, #000 16px);
}
.nc-tabbar.fade-start.fade-end .nc-filetabs {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}
.nc-tabs-scroll {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nc-text-dim);
  cursor: pointer;
}
.nc-tabs-scroll:hover:not(:disabled) {
  background: var(--nc-hover);
  color: var(--nc-text);
}
.nc-tabs-scroll:disabled {
  opacity: 0.35;
  cursor: default;
}
.nc-filetab {
  display: flex;
  flex: none;
  align-items: center;
  /* Grows with the text size; nc/app fits the names to the same width (tabMainMax). */
  min-width: calc(120px * var(--nc-ui-scale));
  max-width: calc(250px * var(--nc-ui-scale));
  border-top: 2px solid transparent;
  color: var(--nc-text-dim);
}
.nc-filetab:hover {
  background: var(--nc-hover);
}
.nc-filetab.is-active {
  border-top-color: var(--nc-accent);
  background: var(--nc-panel);
  color: var(--nc-text);
  box-shadow: 1px 0 0 var(--nc-border-soft), -1px 0 0 var(--nc-border-soft);
}
.nc-filetab-main {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 100%;
  padding: 0 4px 0 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
#nc-app .nc-filetab-main:focus-visible {
  outline-offset: -2px;
}
.nc-filetab-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* A file without ops: a fainter name and a hollow dot instead of an "op 0" badge (RU-31, NU-05). */
.nc-filetab.is-empty .nc-filetab-name {
  color: var(--nc-text-faint);
}
.nc-filetab.is-empty.is-active .nc-filetab-name {
  color: var(--nc-text-dim);
}
/* REV-A-02: the 3D view's keyboard ring (F6, UX3-38) is drawn over the scene like the code view's — an
   outline inside its box is covered by .nc-scene (inset 0) — above the scene's overlays, under the
   edge handles; presses go through it. Only a keyboard focus shows it (:focus-visible). */
#nc-app #nc-viewport:focus-visible {
  outline: none;
}
#nc-viewport:focus-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  border: 2px solid var(--nc-focus-color);
  pointer-events: none;
}
.nc-empty-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--nc-text-dim);
  border-radius: 50%;
}
.nc-filetab.is-active .nc-filetab-name {
  font-weight: var(--nc-fw-semibold);
}
.nc-filetab-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--nc-text-dim);
  cursor: pointer;
  opacity: 0.75;
}
.nc-filetab-close .nc-icon {
  width: 13px;
  height: 13px;
}
.nc-filetab:hover .nc-filetab-close,
.nc-filetab.is-active .nc-filetab-close {
  opacity: 1;
}
.nc-filetab-close:hover {
  background: var(--nc-hover);
  color: var(--nc-text);
}
.nc-dirty-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--nc-warning);
}
.nc-switcher-btn {
  align-self: center;
  margin: 0 6px 0 2px;
  border-color: var(--nc-border);
  background: var(--nc-panel);
}
.nc-switcher-btn .nc-icon:first-child {
  width: 14px;
  height: 14px;
}

.nc-file-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  border-radius: 4px;
  font: var(--nc-fw-semibold) var(--nc-fs-micro)/16px var(--nc-mono);
  white-space: nowrap;
}
.nc-file-badge .nc-icon {
  width: 12px;
  height: 12px;
}
.nc-file-badge.is-warning {
  background: color-mix(in srgb, var(--nc-warning) 12%, transparent);
  color: var(--nc-warning);
}
.nc-file-badge.is-error {
  background: color-mix(in srgb, var(--nc-danger) 12%, transparent);
  color: var(--nc-danger);
}
.nc-format-chip {
  flex: none;
  padding: 0 4px;
  border: 1px solid currentColor;
  border-radius: 3px;
  color: var(--nc-accent-strong);
  font: var(--nc-fw-semibold) var(--nc-fs-micro)/15px var(--nc-mono);
  letter-spacing: 0.02em;
}
.nc-format-chip[data-format="mpr"] {
  color: var(--nc-success);
}
.nc-format-chip[data-format="wangs_pgi"] {
  color: var(--nc-format-pgi);
}
.nc-format-chip[data-format="wangs_xml"] {
  color: var(--nc-warning);
}

/* --------------------------------------------------------------- job list */

/* The file table's whole layout lives here (round 2 S2-01: one place, the SHELL-A block keeps only
   the check mark's look). The 「열린 파일」 popover grows with the text size so its table can stay one
   line at 1.25 too (U2-20). */
.nc-popover.nc-switcher {
  display: flex;
  flex-direction: column;
  width: calc(560px * var(--nc-ui-scale));
  max-width: calc(100vw - 16px);
  max-height: min(560px, calc(100vh - 120px));
  padding: 0;
  overflow: hidden;
}
.nc-jobs-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
/* Column widths: the number columns grow with the text size (their mono text does), so a value is
   never cut by its column at 1.25 (U2-01, S2-10). The size fits 12 characters ("2440×1220×18"), the
   faces "12/12/12", the time "≈12:34" / "≈1h22m". */
.nc-jobs {
  --nc-job-check-w: 18px;
  --nc-job-size-w: calc(88px * var(--nc-ui-scale));
  --nc-job-ops-w: calc(26px * var(--nc-ui-scale));
  --nc-job-faces-w: calc(54px * var(--nc-ui-scale));
  --nc-job-time-w: calc(42px * var(--nc-ui-scale));
  --nc-job-risk-w: calc(22px * var(--nc-ui-scale));
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  container: nc-jobs / inline-size;
}
.nc-jobs-tools {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--nc-border);
}
.nc-jobs-search {
  flex: 1 1 150px;
  min-width: 0;
  padding: 0 8px;
}
/* The three file filters are one row of short chips (S2-23), like the face chips: the checkbox stays
   (keyboard, screen readers) but is drawn as the chip; the long sentence is the title. */
.nc-jobs-filters {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 4px;
}
.nc-jobs-hide {
  position: relative;
  flex: none;
  gap: 0;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--nc-border-strong);
  border-radius: 999px;
  background: var(--nc-panel);
  color: var(--nc-text);
  font-size: var(--nc-fs-sm);
  white-space: nowrap;
}
.nc-jobs-hide input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.nc-jobs-hide:has(input:checked) {
  border-color: var(--nc-accent);
  background: var(--nc-accent);
  color: var(--nc-accent-contrast);
  font-weight: var(--nc-fw-semibold);
}
.nc-jobs-hide:has(input:focus-visible) {
  outline: 2px solid var(--nc-focus-color);
  outline-offset: 1px;
}
/* One line: ✓ | name (with format chip and any warning badge) | size | op | 위/아래/옆 | 시간 | 터짐.
   The warning badge lives in the name cell, so only rows that have one give up name width (RU-03). */
.nc-job-row {
  display: grid;
  grid-template-columns: var(--nc-job-check-w) minmax(0, 1fr) var(--nc-job-size-w) var(--nc-job-ops-w) var(--nc-job-faces-w) var(--nc-job-time-w) var(--nc-job-risk-w);
  align-items: center;
  column-gap: 6px;
  --nc-job-row-h: calc(34px * var(--nc-ui-scale));
  height: var(--nc-job-row-h);
  padding: 0 8px 0 10px;
  border-bottom: 1px solid var(--nc-border-soft);
  cursor: pointer;
  user-select: none;
}
/* UX5-31: a row off the view is not laid out (332 rows: a sort, a panel drag or a window resize lays
   out only what is seen); its height is the row's own, so the scroll and revealRow stay where they
   were. Not the sticky head; not the file tabs (they are all put in at once when files open). */
.nc-job-row:not(.nc-jobs-head) {
  content-visibility: auto;
  contain-intrinsic-size: auto var(--nc-job-row-h);
}
.nc-job-row > .nc-job-check {
  grid-column: 1;
  grid-row: 1;
}
/* Every cell has its place (U3-01): size, time and breakouts are in .nc-job-line2, a display:
   contents box in the one-line table and the second line of the two-line one. */
.nc-job-row > .nc-job-name {
  grid-column: 2;
  grid-row: 1;
}
.nc-job-row > .nc-job-ops {
  grid-column: 4;
  grid-row: 1;
}
.nc-job-row > .nc-job-faces {
  grid-column: 5;
  grid-row: 1;
}
.nc-job-line2 {
  display: contents;
}
.nc-job-line2 > .nc-job-size {
  grid-column: 3;
  grid-row: 1;
}
.nc-job-line2 > .nc-job-time {
  grid-column: 6;
  grid-row: 1;
}
.nc-job-line2 > .nc-job-risk {
  grid-column: 7;
  grid-row: 1;
}
/* Every open file of one format: the rows leave the chip out, the head says "모두 MPR" once. */
.nc-jobs[data-format] .nc-job-row:not(.nc-jobs-head) > .nc-job-name > .nc-format-chip {
  display: none;
}
.nc-jobs-head > .nc-jobs-format {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  pointer-events: none;
}
.nc-jobs-head > .nc-jobs-format[hidden] {
  display: none;
}
.nc-job-row:hover {
  background: var(--nc-hover);
}
.nc-job-row.is-active {
  background: var(--nc-selected);
  box-shadow: inset 3px 0 0 var(--nc-accent);
}
.nc-job-row.is-active .nc-job-num.is-zero,
.nc-job-row.is-active .nc-job-size,
.nc-job-row.is-active .nc-job-num.nc-job-time,
.nc-job-row.is-active .nc-job-sep,
.nc-job-row.is-active .nc-job-file,
.nc-job-row.is-active.is-empty .nc-job-title {
  color: var(--nc-selected-dim);
}
.nc-jobs-options:focus-visible .nc-job-row.is-active {
  outline: 2px solid var(--nc-focus-color);
  outline-offset: -2px;
}
#nc-app .nc-jobs-options:focus-visible {
  outline-offset: -2px;
}
/* Column heads: the first child of the scrolling list, sticky, so they share the list's scrollbar
   gutter and line up with the values (RU-02). */
.nc-jobs-head.nc-job-row {
  position: sticky;
  z-index: 1;
  top: 0;
  height: calc(28px * var(--nc-ui-scale));
  border-bottom: 1px solid var(--nc-border);
  background: var(--nc-panel-2);
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  cursor: default;
}
.nc-jobs-head:hover {
  background: var(--nc-panel-2);
}
.nc-jobs-head .nc-job-num,
.nc-jobs-head .nc-job-size {
  overflow: visible;
  font: inherit;
}
/* Sort buttons (MW-06): the head words, a ▴/▾ on the sorted column. */
.nc-job-sort {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.nc-job-sort.nc-job-name {
  justify-content: flex-start;
}
/* UX2-36: a sort word narrower than 24 px is pressed 24 px wide (the 위/아래/옆 words share their
   column, so theirs reach the slashes between them). */
.nc-job-sort::before {
  content: "";
  position: absolute;
  inset: 0 min(0px, calc((100% - 24px) / 2));
}
/* RU-07: the 위/아래/옆 words reach over the slashes between them (each at least 5 px wide), never into
   the next word: 위 and 아래 meet in the middle of the first; the second is 옆's up to 1 px before 아래
   (the list's edge leaves 옆 little room on its other side). 위 and 옆 widen outward as above. */
.nc-job-sort.nc-job-face-sort::before {
  inset: 0 -2.5px;
}
.nc-job-sort.nc-job-face-sort:first-child::before {
  left: min(0px, calc((100% - 24px) / 2));
}
.nc-job-sort.nc-job-face-sort:not(:first-child):not(:last-child)::before {
  right: 0;
}
.nc-job-sort.nc-job-face-sort:last-child::before {
  left: -4px;
  right: min(0px, calc((100% - 24px) / 2));
}
.nc-job-sort:hover {
  color: var(--nc-text);
}
.nc-job-sort.is-sorted {
  color: var(--nc-accent-strong);
}
#nc-app .nc-job-sort:focus-visible {
  outline-offset: 0;
}
.nc-job-sort-mark {
  font-size: var(--nc-fs-micro);
}
.nc-job-sort-mark:empty {
  display: none;
}
.nc-job-name {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}
.nc-job-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.nc-job-row.is-active .nc-job-title {
  font-weight: var(--nc-fw-semibold);
}
/* "가구05 · 하 코너 우 · 뒷판": the furniture gives way first, then the part's end (U3-01). */
.nc-job-title.is-split {
  display: flex;
}
/* UX3-07 (U3-01 바뀜): "가구13" is never cut — "가구13 · 우측…", "가구13 · 우…", "가구13 · …". The words after
   the number go first ("가구05 · 하 코너 우"), then the part (always with its "…"), then long words before
   the number (four characters or fewer stay); a furniture name without a number after the part. The
   numbered body's pieces are the title's own flex items (display: contents). */
.nc-job-body {
  flex: 0 1 auto;
}
.nc-job-part {
  flex: 0 1000 auto;
}
.nc-job-body,
.nc-job-part {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nc-job-body-name.is-short {
  flex-shrink: 0;
}
.nc-job-body.is-numbered {
  display: contents;
}
.nc-job-body-name,
.nc-job-body-rest {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nc-job-body-name {
  flex: 0 1 auto;
}
.nc-job-body-rest {
  flex: 0 100000 auto;
}
.nc-job-body-num,
.nc-job-body-sep {
  flex: none;
  white-space: nowrap;
}
.nc-job-num {
  overflow: hidden;
  font: var(--nc-fs-micro) var(--nc-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* "6/0/0": the three face counts in one cell (U2-20), a zero dim; the head has three sort buttons. */
.nc-job-faces {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}
.nc-job-faces > .is-zero,
.nc-job-sep {
  color: var(--nc-text-dim);
}
.nc-job-row.is-active .nc-job-faces > .is-zero {
  color: var(--nc-selected-dim);
}
.nc-jobs-head .nc-job-faces {
  font-size: var(--nc-fs-micro);
}
.nc-jobs-head .nc-job-sep {
  align-self: center;
  min-width: 5px;
  padding: 0 1px;
  font-weight: var(--nc-fw-regular);
  text-align: center;
}
/* Time (S2-10, U2-15): short forms ("12:34", "1h22m", "82h", "≈" for an estimate) that fit the
   column; the whole value is the title. */
.nc-job-num.nc-job-time {
  color: var(--nc-text-dim);
}
.nc-job-num.nc-job-risk.is-risk {
  color: var(--nc-danger-text);
  font-weight: var(--nc-fw-bold);
}
/* With work order data (F1): "가구05 · D1 도어" is the row name; the program number ("10122", what tells
   the file from the others — U3-01) sits beside it in the one-line table and on the second line,
   before the size, in the two-line one. It is never cut: the name gives way. */
.nc-job-file {
  flex: none;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nc-job-ids {
  display: grid;
  gap: 1px;
  overflow-wrap: anywhere;
}
/* The size is never cut (U2-01), nor the program number in front of it on the two-line table's second
   line (U3-01: "10122 · 556×312×18"); the line runs under the op and face columns too so both fit. */
.nc-job-size {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  overflow: hidden;
  color: var(--nc-text-dim);
  font: var(--nc-fs-sm) var(--nc-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nc-job-size-file,
.nc-job-size-sep {
  display: none;
  font-family: var(--nc-font);
}
.nc-job-size-file {
  flex: none;
  color: var(--nc-text);
  font-variant-numeric: tabular-nums;
}
.nc-job-size-sep {
  flex: none;
  white-space: pre;
}
.nc-job-size-num {
  flex: none;
}
.nc-job-num.is-zero,
.nc-job-row.is-empty .nc-job-title {
  color: var(--nc-text-dim);
}
.nc-job-name .nc-file-badge {
  padding: 0 2px;
}
.nc-jobs-list {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.nc-job-name .nc-format-chip {
  padding: 0 3px;
  font-size: var(--nc-fs-micro);
  line-height: 14px;
}
/* Two lines below 36.5em of the table's own text (S2-01: ~475 px at text size 1, 593 px at 1.25 —
   the one-line columns plus a 160 px name): name · op · 위/아래/옆 over "number · size" and the time
   with the breakouts (U2-20). Every panel width the defaults give (280–440 px) is two lines; a
   dragged-wide panel and the popover are one line. */
@container nc-jobs (max-width: 36.5em) {
  .nc-job-row {
    grid-template-columns: var(--nc-job-check-w) minmax(0, 1fr) var(--nc-job-ops-w) var(--nc-job-faces-w);
    grid-template-rows: auto auto;
    row-gap: 0;
    --nc-job-row-h: calc(44px * var(--nc-ui-scale));
    height: var(--nc-job-row-h);
  }
  .nc-job-row > .nc-job-check {
    grid-row: 1 / span 2;
  }
  .nc-job-row > .nc-job-ops {
    grid-column: 3;
  }
  .nc-job-row > .nc-job-faces {
    grid-column: 4;
  }
  /* "10122 · 556×312×18 … ≈0:12  2" (U3-01): the second line runs under the op and face columns too,
     so the number, the size and the time all fit a 280 px panel at text size 1.25. The breakout count
     keeps a two-digit room so the times line up whether a file has breakouts or not; in a narrower
     panel that room is what gives way (down to the count's own digits), never the number or the size. */
  .nc-job-line2 {
    display: flex;
    grid-column: 2 / -1;
    grid-row: 2;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
  }
  .nc-job-line2 > .nc-job-size {
    flex: none;
    justify-content: flex-start;
    margin-right: auto;
  }
  .nc-job-line2 > .nc-job-time,
  .nc-job-line2 > .nc-job-risk {
    flex: none;
  }
  .nc-job-line2 > .nc-job-risk {
    flex: 0 1 calc(18px * var(--nc-ui-scale));
    overflow: visible;
  }
  .nc-jobs-head.nc-job-row {
    height: auto;
    min-height: calc(28px * var(--nc-ui-scale));
    padding-top: 2px;
    padding-bottom: 2px;
  }
  .nc-jobs-head > .nc-job-name {
    grid-row: 1 / span 2;
  }
  .nc-jobs-head > .nc-job-line2 {
    grid-column: 3 / -1;
    justify-content: flex-end;
  }
  /* The head's 터짐 is wider than the two-digit room: it runs on into the row's right padding. */
  .nc-jobs-head .nc-job-line2 > .nc-job-risk {
    width: calc(18px * var(--nc-ui-scale));
    justify-content: flex-start;
  }
  .nc-jobs-head .nc-job-size {
    display: none;
  }
  /* Work order names: the program number goes to the second line, before the size. */
  .nc-job-name .nc-job-file {
    display: none;
  }
  .nc-job-size .nc-job-size-file,
  .nc-job-size .nc-job-size-sep {
    display: block;
  }
  /* The machining remark is a ✎ here (its words are the title). */
  .nc-job-memo {
    font-size: 0;
  }
  .nc-job-memo::before {
    content: "✎";
    font-size: var(--nc-fs-micro);
  }
}
.nc-jobs-empty {
  padding: 18px 12px;
  color: var(--nc-text-dim);
  text-align: center;
}
/* "파일 166개 · 확인 0/166" beside 「모두 닫기」, the totals under both (U3-21: the whole width, so
   "op 1,847 · ≈53:22 · 터짐 38판" is not cut in a 280 px panel at text size 1.25). */
.nc-jobs-foot {
  display: grid;
  flex: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  min-height: calc(40px * var(--nc-ui-scale));
  padding: 4px 10px;
  border-top: 1px solid var(--nc-border);
  background: var(--nc-panel-2);
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-variant-numeric: tabular-nums;
}

.nc-left-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  height: var(--nc-band-h);
  padding: 0 6px;
  border-bottom: 1px solid var(--nc-border);
  background: var(--nc-panel-2);
}
.nc-left-switch-btn {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: var(--nc-radius);
  background: transparent;
  color: var(--nc-text-dim);
  font: inherit;
  font-weight: var(--nc-fw-medium);
  cursor: pointer;
}
.nc-left-switch-btn .nc-icon {
  width: 14px;
  height: 14px;
}
.nc-left-switch-btn:hover {
  color: var(--nc-text);
}
.nc-left-switch-btn.is-active {
  border-color: var(--nc-border);
  background: var(--nc-panel);
  color: var(--nc-text);
  font-weight: var(--nc-fw-semibold);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.nc-left-switch-count {
  color: var(--nc-text-dim);
  font: var(--nc-fs-micro) var(--nc-mono);
}
.nc-left-switch-count:empty {
  display: none;
}

/* ------------------------------------------------------------ panel head */

.nc-panel-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: var(--nc-band-h);
  padding: 0 8px 0 10px;
  border-bottom: 1px solid var(--nc-border);
  background: var(--nc-panel-2);
}
.nc-panel-heading {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
/* Area heads read as labels, a step below the items (B-25): 12px / 600 dim, the number in text
   colour ("op 6개"). */
.nc-panel-title {
  overflow: hidden;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.nc-panel-count {
  color: var(--nc-text);
}
/* UX2-40: "· 숨김 3" after the op count while ops are hidden; pressing it shows them all (24 px hit). */
.nc-ops-hidden {
  position: relative;
  flex: none;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--nc-accent-strong);
  font: inherit;
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  white-space: nowrap;
  cursor: pointer;
}
.nc-ops-hidden::before {
  content: "· ";
  color: var(--nc-text-dim);
}
.nc-ops-hidden::after {
  content: "";
  position: absolute;
  inset: -5px -4px;
}
.nc-ops-hidden:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* "모두 아랫면" (B-18): the face every op of the file shares, said once at the head's end instead of
   as a chip on every row. Bottom stays the face that stands out (RU-06): text colour, not dim. */
.nc-panel-actions {
  align-items: center;
}
.nc-ops-face {
  margin-right: 4px;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  white-space: nowrap;
}
.nc-ops-face[data-face="bottom"] {
  color: var(--nc-text);
  font-weight: var(--nc-fw-semibold);
}
.nc-panel-actions {
  display: flex;
  flex: none;
  gap: 4px;
}
.nc-panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 16px;
  color: var(--nc-text-dim);
  text-align: center;
}
.nc-empty-ok {
  width: 22px;
  height: 22px;
  color: var(--nc-success);
}

.nc-face-chips {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 3px;
  padding: 6px 6px;
  border-bottom: 1px solid var(--nc-border-soft);
}
.nc-face-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--nc-border-strong);
  border-radius: 999px;
  background: var(--nc-panel);
  color: var(--nc-text);
  font: inherit;
  font-size: var(--nc-fs-sm);
  cursor: pointer;
}
.nc-face-chip:hover {
  background: var(--nc-hover);
}
/* No op on that face: dashed and dim, so it does not look like a chip with something behind it (B-18). */
.nc-face-chip.is-zero {
  border-style: dashed;
  color: var(--nc-text-dim);
}
/* The face filter followed the user into another file (A-28): a short ring says it is still on. */
.nc-face-chip.is-flash,
.nc-vchip.is-flash {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nc-accent) 45%, transparent);
}
.nc-face-chip.is-active {
  border-color: var(--nc-accent);
  background: var(--nc-accent);
  color: var(--nc-accent-contrast);
  font-weight: var(--nc-fw-semibold);
}
.nc-face-chip-count {
  font: var(--nc-fs-sm) var(--nc-mono);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- op list */

.nc-ops-list {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  contain: strict;
}
#nc-app .nc-ops-list:focus-visible {
  outline-offset: -2px;
}
.nc-ops-spacer {
  width: 1px;
}
/* Two lines: [face chip] name / position · depth · tool … time. The eye button overlays the right
   end of the first line (it takes no column), so the second line gets the full width (RU-01). */
.nc-op-row {
  position: absolute;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 12px 22px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 0 6px 0 10px;
  border-bottom: 1px solid var(--nc-border-soft);
  cursor: pointer;
  user-select: none;
}
.nc-op-row:hover {
  background: var(--nc-hover);
}
/* UX2-23: the op under the 3D hover — the hover tint and a thin bar in the op colour; the playback
   and selected rows below keep their own look. */
.nc-op-row.is-hover {
  background: var(--nc-hover);
  box-shadow: inset 2px 0 0 var(--nc-op-color, var(--nc-accent));
}
/* Playback position (distinct from the selection): a stronger tint, a 3px bar in the op colour,
   ▶ in the playback colour where the swatch was, and a 2px progress bar (RP-11, RU-07). */
.nc-op-row.is-current {
  background: var(--nc-current-bg);
  box-shadow: inset 3px 0 0 var(--nc-op-color, var(--nc-accent));
}
.nc-op-row.is-selected {
  background: var(--nc-selected);
  box-shadow: inset 3px 0 0 var(--nc-accent);
}
.nc-op-row.is-selected .nc-op-num,
.nc-op-row.is-selected .nc-op-pos,
.nc-op-row.is-selected .nc-op-meta,
.nc-op-row.is-selected .nc-op-time,
.nc-op-row.is-selected .nc-op-eye,
.nc-op-row.is-selected.is-hidden .nc-op-name,
.nc-op-row.is-selected.is-hidden .nc-op-kind,
.nc-op-row.is-selected.is-disabled .nc-op-name,
.nc-op-row.is-selected.is-disabled .nc-op-kind {
  color: var(--nc-selected-dim);
}
.nc-ops-list:focus-visible .nc-op-row.is-selected {
  outline: 2px solid var(--nc-focus-color);
  outline-offset: -2px;
}
.nc-op-lead {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
}
.nc-op-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--nc-op-color, var(--nc-accent));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.nc-op-lead .nc-op-play {
  display: none;
  width: 12px;
  height: 12px;
}
.nc-icon svg .p {
  fill: var(--nc-playback);
  stroke: var(--nc-playback-outline);
  stroke-width: 2;
}
.nc-op-row.is-current .nc-op-lead .nc-op-swatch,
.nc-op-row.is-current .nc-op-lead .nc-op-warn {
  display: none;
}
.nc-op-row.is-current .nc-op-lead .nc-op-play {
  display: inline-flex;
}
/* Unsupported ops have no path: a hatched grey swatch instead of a palette colour. */
.nc-op-swatch.is-unsupported {
  background: repeating-linear-gradient(135deg, var(--nc-text-dim) 0 1.5px, transparent 1.5px 3.5px);
  box-shadow: inset 0 0 0 1px var(--nc-text-dim);
}
.nc-op-num {
  color: var(--nc-text-dim);
  font: var(--nc-fs-sm) var(--nc-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.nc-op-row.is-current .nc-op-num {
  color: var(--nc-text);
  font-weight: var(--nc-fw-semibold);
}
.nc-op-main {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.nc-op-line1,
.nc-op-line2 {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.nc-op-line1 {
  gap: 4px;
  line-height: calc(19px * var(--nc-ui-scale));
}
.nc-op-line2 {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  line-height: calc(17px * var(--nc-ui-scale));
}
/* Face chip: the one place the face is named in the row (RU-06). The bottom face stands out: it is
   the side the operator cannot see on the machine. */
.nc-op-face {
  flex: none;
  align-self: center;
  padding: 0 4px;
  border: 1px solid var(--nc-border-strong);
  border-radius: 4px;
  color: var(--nc-text);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  line-height: 16px;
  white-space: nowrap;
}
.nc-op-face[data-face="bottom"] {
  border-color: var(--nc-text);
  background: var(--nc-text);
  color: var(--nc-panel);
}
.nc-op-face[data-face="side"] {
  border-style: dashed;
}
.nc-op-kind {
  flex: none;
  font-weight: var(--nc-fw-semibold);
}
.nc-op-kind:empty {
  display: none;
}
.nc-tool-chip {
  flex: none;
  align-self: center;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--nc-panel-2);
  box-shadow: inset 0 0 0 1px var(--nc-border);
  color: var(--nc-text);
  font: var(--nc-fw-semibold) var(--nc-fs-micro)/16px var(--nc-mono);
  white-space: nowrap;
}
/* "수직 드릴 Ø4.5 × 16.9": the words give way, the size and depth at the end never do (U3-04 — two ops
   at one place told apart by depth alone; the second line no longer repeats the depth). */
.nc-op-name {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.nc-op-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nc-op-dims {
  flex: none;
}
.nc-op-name.is-strong {
  font-weight: var(--nc-fw-semibold);
}
/* The second line (U2-03): X · Y never gives way; the rest after it ("· 깊이 12 · T101") goes first.
   The list's relation notation (data-rel-form, by its width) keeps the chips whole on the demo plates;
   a row that still does not fit drops its time, then cuts its chips' words (fitOpRelations). */
.nc-op-pos {
  flex: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.nc-op-pos[hidden] {
  display: none;
}
.nc-op-meta {
  flex: 1 1000 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.nc-op-time {
  flex: none;
  margin-left: auto;
  color: var(--nc-text-dim);
  font: var(--nc-fs-sm) var(--nc-mono);
  font-variant-numeric: tabular-nums;
}
.nc-op-rel:not([hidden]) ~ .nc-op-time {
  margin-left: 4px;
}
/* A warning about this op (e.g. its hole meets one from the other face inside the panel). */
.nc-op-diag {
  display: inline-flex;
  flex: none;
  align-self: center;
  color: var(--nc-warning);
}
.nc-op-diag .nc-icon {
  width: 14px;
  height: 14px;
}
.nc-op-diag.is-error {
  color: var(--nc-danger);
}
/* Breakout risk corners of the op with its spindle rotation (Engine analysis), after the name.
   Filled (B-08) so the count keeps >= 4.5:1 on selected and playback rows too (6.6 / 6.3). */
.nc-op-breakout {
  flex: none;
  align-self: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--nc-danger-fill);
  color: var(--nc-on-fill);
  font-size: var(--nc-fs-micro, 11px);
  font-weight: var(--nc-fw-semibold, 600);
  line-height: 16px;
  white-space: nowrap;
}
/* Relations to other ops at the end of the second line (A-11, U2-03, U2-09): facts, not warnings,
   so a small mono chip — not the outlined face chip, not the filled risk pill. 중복 is dashed and
   dim (the shallower op of a hole drilled again, U2-12). One notation for the whole list, by its
   width (nc/shellrules.relationForm): words "양면 관통 #2·3", short words "양면 #2·3", or signs
   "⇅#2·3"; the words stay for screen readers. */
.nc-op-rel {
  display: inline-flex;
  flex: 0 1 auto;
  align-self: center;
  gap: 3px;
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
}
.nc-op-rel[hidden] {
  display: none;
}
.nc-rel {
  flex: none;
  padding: 0 3px;
  border: 1px solid var(--nc-border-strong);
  border-radius: 3px;
  color: var(--nc-text);
  font: var(--nc-fs-micro) / calc(14px * var(--nc-ui-scale)) var(--nc-mono);
  white-space: nowrap;
}
.nc-rel.is-duplicate {
  border-style: dashed;
  color: var(--nc-text-dim);
}
/* UX2-34: a chip that names ops is a button — pressing it selects that op. */
button.nc-rel {
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.nc-rel.is-link:hover {
  border-color: var(--nc-accent);
  color: var(--nc-accent-strong);
}
.nc-op-row.is-selected .nc-rel {
  color: var(--nc-text);
}
.nc-rel-short,
.nc-rel-sign {
  display: none;
}
.nc-ops-list[data-rel-form="short"] .nc-rel-short,
.nc-ops-list[data-rel-form="symbol"] .nc-rel-sign {
  display: inline;
}
.nc-ops-list:is([data-rel-form="short"], [data-rel-form="symbol"]) .nc-rel-full {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* A list between 280 and 328 px (text size 1) says short words and hides every row's op time
   (relationLayout; the time is in the row's title and the op details). A row that does not fit in
   the list's notation: first its time goes, then its chips' words are cut with "…" — never X · Y. */
.nc-ops-list[data-op-time-hidden] .nc-op-time,
.nc-op-row.is-rel-tight .nc-op-time {
  display: none;
}
.nc-op-row.is-rel-clip .nc-rel {
  flex: 0 1 auto;
  min-width: 3ch;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nc-op-breakout[hidden] {
  display: none;
}
.nc-op-warn {
  width: 13px;
  height: 13px;
  color: var(--nc-warning);
}
/* Reference-only machining (external file, machine NC code): a plain file mark, no path colour. */
.nc-op-ref {
  width: 13px;
  height: 13px;
  color: var(--nc-text-dim);
}
.nc-op-row.is-current .nc-op-lead .nc-op-ref {
  display: none;
}
.nc-op-row.is-reference .nc-op-meta {
  color: var(--nc-text-dim);
}
.nc-op-row.is-unsupported .nc-op-name {
  font-family: var(--nc-mono);
  font-size: var(--nc-fs-sm);
}
.nc-op-row.is-unsupported .nc-op-meta {
  color: var(--nc-warning);
}
/* Off and hidden ops: dim text colour and marks, not transparency (D-07). */
.nc-op-row.is-disabled .nc-op-name,
.nc-op-row.is-disabled .nc-op-kind {
  color: var(--nc-text-dim);
  text-decoration: line-through;
  text-decoration-color: var(--nc-text-dim);
}
.nc-op-row.is-hidden .nc-op-name,
.nc-op-row.is-hidden .nc-op-kind {
  color: var(--nc-text-dim);
}
.nc-op-row.is-hidden .nc-op-swatch {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--nc-op-color, var(--nc-accent));
}
.nc-op-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--nc-op-color, var(--nc-accent));
  pointer-events: none;
}
.nc-op-eye {
  position: absolute;
  top: 2px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--nc-text-dim);
  cursor: pointer;
}
.nc-op-eye:hover {
  background: var(--nc-hover);
  color: var(--nc-text);
}
.nc-op-eye .nc-icon {
  width: 15px;
  height: 15px;
}
.nc-op-row.is-hidden .nc-op-eye {
  color: var(--nc-text);
}
/* The first line makes room for the eye only while the eye shows. */
.nc-op-row.is-hidden .nc-op-line1,
.nc-op-row.is-selected .nc-op-line1 {
  padding-right: 24px;
}
@media (hover: hover) {
  .nc-op-eye {
    opacity: 0;
  }
  .nc-op-row:hover .nc-op-eye,
  .nc-op-row.is-selected .nc-op-eye,
  .nc-op-row.is-hidden .nc-op-eye,
  .nc-op-eye:focus-visible {
    opacity: 1;
  }
  .nc-op-row:hover .nc-op-line1 {
    padding-right: 24px;
  }
}
@media (hover: none) {
  .nc-op-row:not(.is-unsupported):not(.is-reference) .nc-op-line1 {
    padding-right: 24px;
  }
}
/* A narrow op panel (<= 280px: 1280 and 1024 wide windows) drops the op time from the row (it is in
   the row's title and the op details) so the position and depth always fit. */
@container nc-ops (max-width: 280px) {
  .nc-op-time {
    display: none;
  }
}

/* ------------------------------------------------------------ info panel */

.nc-info-tabs {
  position: relative;
  display: flex;
  flex: none;
  gap: 2px;
  height: var(--nc-band-h);
  padding: 0 6px;
  border-bottom: 1px solid var(--nc-border);
  background: var(--nc-panel-2);
  /* Round 4 review: 「깎기」·「비교」 and bigger text overflow the 260 px panel of 1280 / 1024 windows — the bar
     scrolls sideways like the file tabs: no scroll bar, a wheel turns it, the cut-off ends fade and nc/app
     keeps the active tab in view (showActiveInfoTab). */
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.nc-info-tabs::-webkit-scrollbar {
  display: none;
}
/* The fades: the band's own colour over the bar's first and last 16px while tabs go on past them (sticky
   at the ends, no room taken — a mask would fade the band and its line too). */
.nc-info-tabs::before,
.nc-info-tabs::after {
  content: "";
  position: sticky;
  z-index: 1;
  flex: none;
  width: 16px;
  pointer-events: none;
  opacity: 0;
}
.nc-info-tabs::before {
  left: 0;
  margin-right: -18px;
  background: linear-gradient(to right, var(--nc-panel-2), transparent);
}
.nc-info-tabs::after {
  right: 0;
  margin-left: -18px;
  background: linear-gradient(to left, var(--nc-panel-2), transparent);
}
.nc-info-tabs.fade-start::before,
.nc-info-tabs.fade-end::after {
  opacity: 1;
}
.nc-info-tab {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--nc-text-dim);
  font: inherit;
  /* An area head (B-25): 12px / 600, dim until chosen. */
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  white-space: nowrap;
  cursor: pointer;
}
#nc-app .nc-info-tab:focus-visible {
  outline-offset: -2px;
}
.nc-info-tab:hover {
  color: var(--nc-text);
}
.nc-info-tab.is-active {
  border-bottom-color: var(--nc-accent);
  color: var(--nc-text);
  font-weight: var(--nc-fw-semibold);
}
.nc-badge {
  min-width: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--nc-text-dim);
  color: var(--nc-on-fill);
  font: var(--nc-fw-semibold) var(--nc-fs-micro)/16px var(--nc-mono);
  text-align: center;
}
.nc-badge[data-severity="warning"] {
  background: var(--nc-warning);
}
.nc-badge[data-severity="error"] {
  background: var(--nc-danger);
}
/* Information only: an outlined badge that does not call for attention (D-14). */
.nc-badge[data-severity="info"] {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--nc-border-strong);
  color: var(--nc-text-dim);
}
.nc-info-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 12px 14px;
  overflow: auto;
}
#nc-app .nc-info-body:focus-visible {
  outline-offset: -2px;
}

/* One label column width in every section, so values start at the same x; values are not smaller
   than their labels (RU-11). */
.nc-props {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 12px;
  margin: 0;
}
.nc-props dt {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.nc-props dd {
  min-width: 0;
  margin: 0;
  font-size: var(--nc-fs-md);
  overflow-wrap: anywhere;
}
.nc-props dd.nc-mono {
  font-size: var(--nc-fs-sm);
}
.nc-bounds {
  display: grid;
  gap: 1px;
  font-family: var(--nc-mono);
  font-size: var(--nc-fs-sm);
  white-space: nowrap;
}
.nc-props dt.is-wide,
.nc-props dd.is-wide {
  grid-column: 1 / -1;
}
.nc-props dd.is-wide {
  margin-top: -2px;
}
/* Fixed sections ("통계", "참고") and folding ones ("경로 통계") share one heading style: a rule
   above, 12px / 600, the same 30px heading row (RU-29). */
.nc-info-section {
  margin-top: 8px;
  border-top: 1px solid var(--nc-border-soft);
}
.nc-info-heading {
  display: flex;
  align-items: center;
  min-height: 30px;
  margin: 0;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
}
.nc-info-section > .nc-info-heading + * {
  margin-top: 2px;
}
.nc-info-body > .nc-info-section:first-child {
  margin-top: -6px;
  border-top: 0;
}

.nc-op-detail-head {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: start;
  gap: 4px 8px;
  margin-bottom: 10px;
}
.nc-op-detail-head .nc-op-swatch {
  width: 12px;
  height: 12px;
  margin-top: 5px;
}
.nc-op-detail-head .nc-op-ref {
  margin-top: 2px;
}
.nc-op-detail-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* The one 16px line in the panels (B-25): the op the details are about. */
.nc-op-detail-title strong {
  font-size: var(--nc-fs-lg2);
  font-weight: var(--nc-fw-semibold);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.nc-op-detail-kind {
  color: var(--nc-text-dim);
}
.nc-tags {
  display: flex;
  flex-wrap: wrap;
  grid-column: 2;
  gap: 4px;
}
.nc-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 6px;
  border: 1px solid var(--nc-border);
  border-radius: 999px;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  line-height: 18px;
}
.nc-tag .nc-icon {
  width: 12px;
  height: 12px;
}
.nc-tag.is-accent {
  border-color: color-mix(in srgb, var(--nc-accent) 45%, transparent);
  color: var(--nc-accent-strong);
}
.nc-tag.is-warning {
  border-color: color-mix(in srgb, var(--nc-warning) 45%, transparent);
  color: var(--nc-warning);
}
/* UX2-34: a relation that names ops (양면 관통 #2·3, 중복 → #3, 반대면 만남 #7) is a button. */
button.nc-tag {
  position: relative;
  margin: 0;
  background: transparent;
  font: inherit;
  font-size: var(--nc-fs-sm);
  cursor: pointer;
}
button.nc-tag::after {
  content: "";
  position: absolute;
  inset: -3px 0;
}
.nc-tag.is-link:hover {
  border-color: var(--nc-accent);
  color: var(--nc-accent-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nc-tag.is-link.is-warning:hover {
  color: var(--nc-warning);
}

.nc-op-where {
  display: grid;
  gap: 1px;
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--nc-accent) 28%, var(--nc-border));
  border-left: 3px solid var(--nc-accent);
  border-radius: var(--nc-radius);
  background: var(--nc-accent-soft);
}
.nc-op-where-label {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
}
.nc-op-where-value {
  font-size: var(--nc-fs-lg);
  font-weight: var(--nc-fw-semibold);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
/* Bottom-face op: where it is on the panel turned over (2026-10-02 1.9). */
.nc-op-where-flip {
  color: var(--nc-text);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  font-variant-numeric: tabular-nums;
}
.nc-op-detail-title .nc-op-face {
  display: inline-block;
  margin-right: 6px;
  vertical-align: 1px;
}
.nc-op-where-extra {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
}
/* UX2-37: a hole's depth, through or blind with what is left, on its first card. */
.nc-op-where-depth {
  color: var(--nc-text);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
/* Routing, pockets and grooves (A-19): where the cut runs, next to its start point. */
.nc-op-where-range {
  color: var(--nc-text);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.nc-keygrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 8px;
}
.nc-keygrid-item {
  min-width: 0;
  padding: 4px 8px 5px;
  border-radius: var(--nc-radius);
  background: var(--nc-panel-2);
}
.nc-keygrid-item.is-wide {
  grid-column: 1 / -1;
}
/* A wide info panel: three cards a row (B-31). Measured: at 340px a third is ~100px and "3,000
   mm/min" breaks, so three columns start where a card keeps ~130px (420px); below that the wider
   default panel (clamp 300–380) already gives two cards of ~150px, enough for "1,500–6,000 mm/min". */
@container nc-info (min-width: 420px) {
  .nc-keygrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.nc-keygrid dt {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
}
.nc-keygrid dd {
  margin: 0;
  font-weight: var(--nc-fw-semibold);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.nc-fold {
  margin-top: 8px;
  border-top: 1px solid var(--nc-border-soft);
}
.nc-fold-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  list-style: none;
  cursor: pointer;
}
.nc-fold-summary::-webkit-details-marker {
  display: none;
}
.nc-fold-summary::before {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 3px 0 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.12s;
}
.nc-fold[open] > .nc-fold-summary::before {
  transform: rotate(45deg);
}
.nc-fold-summary:hover {
  color: var(--nc-text);
}
.nc-fold-body {
  padding: 2px 0 6px;
}
.nc-fold-body > * + * {
  margin-top: 8px;
}

.nc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--nc-fs-sm);
}
.nc-table th {
  padding: 4px 6px;
  border-bottom: 1px solid var(--nc-border);
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  text-align: left;
}
.nc-table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--nc-border-soft);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.nc-table .is-num {
  text-align: right;
  white-space: nowrap;
}
/* Key columns and heads never break inside a word ("STUFEN", "T600", "공구") — RU-10. */
.nc-table th,
.nc-table td:first-child {
  white-space: nowrap;
  overflow-wrap: normal;
}
/* Values take at most 9 characters (full value in the title) so descriptions keep the width
   (NU-02); a narrow panel stacks the description under key and value instead. */
.nc-params:not(.is-stacked) td:nth-child(2) {
  width: 1%;
  white-space: nowrap;
}
.nc-params:not(.is-stacked) .nc-param-value {
  display: block;
  max-width: 9ch;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nc-params.is-stacked td:nth-child(2) {
  overflow-wrap: anywhere;
}
.nc-params.is-stacked tr.nc-table-note td {
  padding-left: 14px;
}
.nc-nowrap {
  white-space: nowrap;
}
/* Korean words stay whole when a value wraps ("외곽선 기준 · 공구 반지름 3 mm 반영"). */
.nc-keep-words {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.nc-table tr.has-note td {
  border-bottom: 0;
  padding-bottom: 0;
}
.nc-table tr.nc-table-note td {
  padding-top: 0;
  white-space: normal;
  font-size: var(--nc-fs-sm);
}
.nc-param-note {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
}
.nc-notes {
  margin: 0;
  padding-left: 18px;
}
.nc-notes li + li {
  margin-top: 3px;
}
/* The NC code a reference op sends to the machine as it is (Engine `reference.lines`). */
.nc-ref-lines {
  max-height: 240px;
  margin: 0;
  padding: 6px 8px;
  overflow: auto;
  border: 1px solid var(--nc-border-soft);
  border-radius: 6px;
  background: var(--nc-panel-2);
  font: var(--nc-fs-sm) / 1.5 var(--nc-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.nc-cards {
  display: grid;
  gap: 8px;
}
.nc-card {
  padding: 8px 10px;
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius);
  background: var(--nc-panel-2);
}
.nc-card-title {
  margin-bottom: 4px;
  font-weight: var(--nc-fw-semibold);
}
/* G-code: the box inferred from the cutting moves is tentative (dashed, no fill). */
.nc-card.is-inferred {
  border-style: dashed;
  background: transparent;
}
.nc-card.is-inferred .nc-note {
  margin: 6px 0 0;
}
/* The card's border + padding (11px) come off the label column, so values start at the same x as
   in the other sections (NU-04). */
.nc-card .nc-props {
  grid-template-columns: 65px minmax(0, 1fr);
}
/* The cutting list's machining remark ("위쪽 우라홈", A-04): first in 부재, where it is checked
   against the 3D view. */
.nc-job-remark {
  display: grid;
  gap: 1px;
  margin: 2px 0 8px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--nc-warning) 35%, var(--nc-border));
  border-left: 3px solid var(--nc-warning);
  border-radius: var(--nc-radius);
  background: color-mix(in srgb, var(--nc-warning) 8%, var(--nc-panel));
}
.nc-job-remark-label {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
}
.nc-job-remark-value {
  font-weight: var(--nc-fw-semibold);
  overflow-wrap: anywhere;
}
/* UX4-42 · REV-A4-12: a 「구멍 표」 row narrows the op list — it looks pressable. */
.nc-hole-row.is-link {
  cursor: pointer;
}
.nc-hole-row.is-link:hover {
  background: var(--nc-hover, rgba(127, 127, 127, 0.12));
}
.nc-hole-row.is-link:focus-visible {
  outline: 2px solid var(--nc-accent, Highlight);
  outline-offset: -2px;
}
/* Tool table (B-33, D-31): a colour swatch when paths are coloured by tool, then the tool's cut
   length, time and spindle speed. Scrolls sideways in a narrow panel instead of breaking numbers. */
.nc-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.nc-tool-cell {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.nc-tool-swatch {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 0.2em;
  border-radius: 3px;
  background: var(--nc-op-color, var(--nc-accent));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.nc-tools th,
.nc-tools td {
  padding-right: 4px;
  padding-left: 4px;
}
/* 2026-11-03 R2: the deepest Z (tool table cell, 통계 row) — a link-like button to the line reaching it. */
.nc-tool-minz {
  padding: 0;
  border: 0;
  background: none;
  color: var(--nc-accent-strong);
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}
.nc-tool-minz:hover {
  text-decoration: underline;
}
.nc-table-caption {
  margin: 6px 0 0;
}

.nc-diagnostics {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nc-diagnostic {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--nc-text);
  font: inherit;
  text-align: left;
}
button.nc-diagnostic {
  cursor: pointer;
}
button.nc-diagnostic:hover {
  background: var(--nc-hover);
}
.nc-diagnostic-icon {
  margin-top: 1px;
  color: var(--nc-text-dim);
}
.nc-diagnostic.is-warning .nc-diagnostic-icon {
  color: var(--nc-warning);
}
.nc-diagnostic.is-error .nc-diagnostic-icon {
  color: var(--nc-danger);
}
.nc-diagnostic-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nc-diagnostic-message {
  overflow-wrap: anywhere;
}
/* A diagnostic about two ops (holes from both faces meeting): one button per op. */
.nc-diagnostics li {
  display: grid;
}
/* The op's breakout corners in the op details: a click selects the move. */
.nc-breakouts {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nc-breakout-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--nc-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.nc-breakout-item:hover,
.nc-breakout-item:focus-visible {
  background: var(--nc-hover, rgba(15, 23, 42, 0.06));
}
.nc-breakout-mark {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 3px;
  background: var(--nc-danger);
  clip-path: polygon(50% 0%, 63% 31%, 98% 29%, 73% 54%, 86% 89%, 50% 70%, 14% 89%, 27% 54%, 2% 29%, 37% 31%);
}
.nc-breakout-text {
  display: grid;
  gap: 1px;
}
/* Two weights a size (B-25): 13px titles are 600, like the op names. */
.nc-breakout-text strong {
  font-weight: var(--nc-fw-semibold);
}
.nc-diagnostic-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 8px 4px 32px;
}
.nc-diagnostic-op {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--nc-border-strong);
  border-radius: 999px;
  background: var(--nc-panel);
  color: var(--nc-text);
  font: inherit;
  font-size: var(--nc-fs-sm);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.nc-diagnostic-op:hover {
  border-color: var(--nc-accent);
  color: var(--nc-accent-strong);
}
.nc-diagnostic-where {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
}

/* ------------------------------------------------------------ status bar */

#nc-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nc-status-h);
  padding: 0 10px;
  overflow: hidden;
  border-top: 1px solid var(--nc-border);
  background: var(--nc-panel-2);
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  white-space: nowrap;
}
.nc-status-left {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.nc-status-item {
  overflow: hidden;
  text-overflow: ellipsis;
}
.nc-status-item:empty {
  display: none;
}
/* Mouse position: reserves its width only while it has a value (RU-14). */
.nc-status-hover {
  flex: none;
  min-width: 250px;
  color: var(--nc-text);
  font-family: var(--nc-mono);
  font-size: var(--nc-fs-sm);
}
.nc-status-hover.is-idle {
  min-width: 0;
  color: var(--nc-text-dim);
  font-family: var(--nc-font);
}
.nc-status-selection {
  min-width: 0;
  color: var(--nc-text);
  font-variant-numeric: tabular-nums;
}
/* Two-point measure result (F4). */
.nc-status-measure {
  flex: none;
  color: var(--nc-text);
  font-weight: var(--nc-fw-semibold);
  font-variant-numeric: tabular-nums;
}
.nc-status-measure.is-active {
  color: var(--nc-accent-strong);
}
/* UX2-20: the last result after the measure ended, faint. */
.nc-status-measure.is-last {
  color: var(--nc-text-dim);
  font-weight: var(--nc-fw-medium, 500);
}

/* --------------------------------------------- viewport chips and toasts */

.nc-vchips {
  position: absolute;
  z-index: 8;
  top: 10px;
  left: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 140px);
  pointer-events: none;
}
.nc-vchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 6px 0 10px;
  border: 1px solid color-mix(in srgb, var(--nc-accent) 50%, var(--nc-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--nc-panel) 92%, transparent);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  color: var(--nc-text);
  font: inherit;
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
  pointer-events: auto;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.nc-vchip:hover {
  border-color: var(--nc-accent);
  color: var(--nc-accent-strong);
}
.nc-vchip-x {
  width: 13px;
  height: 13px;
  color: var(--nc-text-dim);
}
.nc-vchip.is-all {
  padding: 0 10px;
  border-color: var(--nc-border-strong);
  font-weight: var(--nc-fw-medium);
}
/* The view lock chip: filled accent, always first, not part of "모두 되돌리기" (RU-32). */
.nc-vchip.is-lock {
  padding-left: 8px;
  border-color: var(--nc-accent);
  background: var(--nc-accent);
  color: var(--nc-accent-contrast);
}
.nc-vchip.is-lock:hover {
  border-color: var(--nc-accent-strong);
  background: var(--nc-accent-strong);
  color: var(--nc-accent-contrast);
}
.nc-vchip.is-lock .nc-vchip-x {
  color: inherit;
}
/* Measuring (B-03): a click in 3D picks a point, not an op — said on the 3D view itself. */
.nc-vchip.is-measure {
  padding-left: 8px;
  border-color: var(--nc-accent);
  background: var(--nc-accent);
  color: var(--nc-accent-contrast);
}
.nc-vchip.is-measure:hover {
  border-color: var(--nc-accent-strong);
  background: var(--nc-accent-strong);
  color: var(--nc-accent-contrast);
}
.nc-vchip.is-measure .nc-vchip-x {
  color: inherit;
}
.nc-vchip-ruler {
  width: 14px;
  height: 14px;
}
/* 2026-11-04 R3 review: X · Y · Z beside the measuring chip while the second point is aimed — the axis
   lock without a key (a touch screen; Windows, where an overlay may take Alt+Z). Pressed: the axis colour
   (the band's), the panel colour on it (>= 4.5:1 on both themes' axis tokens). */
.nc-vchip.is-axis-lock {
  gap: 2px;
  padding: 0 2px;
  cursor: default;
}
.nc-vchip-axis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 22px;
  padding: 0 5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.nc-vchip-axis:hover {
  color: var(--nc-accent-strong);
}
.nc-vchip-axis[aria-pressed="true"] {
  color: var(--nc-panel);
}
.nc-vchip-axis[data-axis="x"][aria-pressed="true"] {
  background: var(--nc-axis-x);
}
.nc-vchip-axis[data-axis="y"][aria-pressed="true"] {
  background: var(--nc-axis-y);
}
.nc-vchip-axis[data-axis="z"][aria-pressed="true"] {
  background: var(--nc-axis-z);
}
/* The scene may add .is-flash for 0.3 s on the first locked drag ("끌면 이동합니다", RU-32). */
.nc-vchip.is-lock.is-flash {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nc-accent) 45%, transparent), 0 1px 3px rgba(15, 23, 42, 0.12);
}
.nc-vchip-lock {
  width: 14px;
  height: 14px;
}
/* "아랫면 가공 19개 · 아래에서 보기" (R3-06): the body switches the view, × only closes the hint. */
.nc-vchip.is-hint {
  gap: 0;
  padding: 0;
  border-style: dashed;
  cursor: default;
}
.nc-vchip-main,
.nc-vchip-close {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.nc-vchip-main {
  padding: 0 4px 0 9px;
  border-radius: 999px 0 0 999px;
}
.nc-vchip-close {
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 6px 0 3px;
  border-radius: 0 999px 999px 0;
}
.nc-vchip-main:hover,
.nc-vchip-close:hover {
  color: var(--nc-accent-strong);
}
.nc-vchip-close:hover .nc-vchip-x {
  color: var(--nc-text);
}
.nc-vchip-info {
  width: 14px;
  height: 14px;
  color: var(--nc-accent-strong);
}

/* Playback HUD (RP-13): what is being machined now, top centre of the 3D view. The shell places it
   (clear of the status chips and the view cube); [data-nc-overlay] keeps the scene's fit clear. */
.nc-hud {
  position: absolute;
  z-index: 9;
  top: 10px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 24px);
  height: calc(28px * var(--nc-ui-scale));
  padding: 0 10px 0 8px;
  overflow: hidden;
  border: 1px solid var(--nc-border-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--nc-panel) 94%, transparent);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.16);
  color: var(--nc-text);
  font-size: var(--nc-fs-md);
  font-weight: var(--nc-fw-semibold);
  white-space: nowrap;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: box-shadow 0.3s, border-color 0.3s;
}
.nc-hud-play {
  width: 13px;
  height: 13px;
}
.nc-hud-count {
  flex: none;
  font-family: var(--nc-mono);
  font-variant-numeric: tabular-nums;
}
.nc-hud-swatch {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.nc-hud-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nc-hud-meta {
  flex: none;
  color: var(--nc-text);
  font-weight: var(--nc-fw-medium);
  font-variant-numeric: tabular-nums;
}
/* 급송 ↔ F 3,000 changes many times per op: a fixed-width cell keeps the chip still (NP-06). */
.nc-hud-feed {
  flex: none;
  min-width: 9ch;
  color: var(--nc-text);
  font-weight: var(--nc-fw-medium);
  font-variant-numeric: tabular-nums;
}
.nc-hud-feed:empty {
  display: none;
}
/* " · 줄 3,378" (D-30): the shell sets a min-width for the file's longest line number. */
.nc-hud-line {
  flex: none;
  color: var(--nc-text);
  font-weight: var(--nc-fw-medium);
  font-variant-numeric: tabular-nums;
}
.nc-hud-line:empty {
  display: none;
}
/* A dual-plan pane narrower than the pill even with its op name cut (FINAL-QA R-1): the feed and the
   code line go (the pill's title keeps them; the DRO and the status bar show them too). */
.nc-hud.is-tight .nc-hud-feed,
.nc-hud.is-tight .nc-hud-line {
  display: none;
}
.nc-hud-count {
  text-align: right;
}
/* Between two ops (CR-13) and on a link move to the next op (MP-01): the op dimmed with "이동"
   (.7 keeps 13px / 600 text >= 4.5:1, MU-08); a link move shows → instead of ▶. */
.nc-hud.is-between .nc-hud-count,
.nc-hud.is-between .nc-hud-swatch,
.nc-hud.is-between .nc-hud-name,
.nc-hud.is-between .nc-hud-meta {
  opacity: 0.7;
}
.nc-hud-arrow {
  display: none;
  flex: none;
  width: 13px;
  font-size: var(--nc-fs-sm);
  text-align: center;
}
.nc-hud.is-transit .nc-hud-play {
  display: none;
}
.nc-hud.is-transit .nc-hud-arrow {
  display: inline;
}
/* No position yet: the HUD keeps its place (the scene's fit avoids it) but is not seen (1.3). */
.nc-hud.is-idle {
  visibility: hidden;
}
/* A new op: 300 ms highlight in the playback colour. */
.nc-hud.is-flash {
  border-color: var(--nc-playback-outline);
  box-shadow: 0 0 0 3px var(--nc-playback), 0 1px 4px rgba(15, 23, 42, 0.16);
  transition: none;
}
#nc-app[data-state="empty"] .nc-hud {
  display: none;
}
#nc-app[data-state="empty"] .nc-vchips {
  display: none;
}

/* Toasts: bottom right of the 3D view, above the transport bar (the shell moves #nc-toast here). */
#nc-toast {
  position: absolute;
  z-index: 30;
  right: 12px;
  bottom: 72px; /* the shell sets the exact offset above the transport bar and legend */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: min(400px, calc(100% - 24px));
  pointer-events: none;
}
.nc-toast-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
  padding: 8px 6px 8px 10px;
  border: 1px solid var(--nc-border);
  border-left: 3px solid var(--nc-accent);
  border-radius: 7px;
  background: var(--nc-panel);
  box-shadow: var(--nc-shadow);
  pointer-events: auto;
  animation: nc-toast-in 0.16s ease-out;
}
.nc-toast-item.is-error {
  border-left-color: var(--nc-danger);
}
.nc-toast-item.is-warning {
  border-left-color: var(--nc-warning);
}
.nc-toast-item.is-success {
  border-left-color: var(--nc-success);
}
.nc-toast-item.is-progress {
  align-items: center;
  width: 340px;
}
.nc-toast-icon {
  margin-top: 1px;
  color: var(--nc-accent);
}
.is-error > .nc-toast-icon {
  color: var(--nc-danger);
}
.is-warning > .nc-toast-icon {
  color: var(--nc-warning);
}
.is-success > .nc-toast-icon {
  color: var(--nc-success);
}
.nc-toast-text {
  min-width: 0;
  /* Break a long file name only when it cannot fit on its own line (RU-30). */
  overflow-wrap: break-word;
}
.nc-toast-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}
.nc-toast-item.is-progress .nc-toast-body {
  align-items: stretch;
}
.nc-toast-body .nc-toast-text {
  font-variant-numeric: tabular-nums;
}
.nc-toast-item.is-progress .nc-toast-text {
  font-weight: var(--nc-fw-semibold);
}
.nc-toast-sub {
  overflow: hidden;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Collapsible open summary: a small pill until clicked (does not keep covering the 3D view). */
.nc-toast-pill {
  display: none;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nc-text);
  font: inherit;
  font-weight: var(--nc-fw-semibold);
  text-align: left;
  cursor: pointer;
}
.nc-toast-item.is-collapsed {
  align-items: center;
  padding-top: 4px;
  padding-bottom: 4px;
}
.nc-toast-item.is-collapsed .nc-toast-pill {
  display: block;
}
.nc-toast-item.is-collapsed .nc-toast-body > :not(.nc-toast-pill) {
  display: none !important;
}
.nc-toast-link {
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nc-accent-strong);
  font: inherit;
  font-weight: var(--nc-fw-semibold);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.nc-toast-details {
  display: grid;
  gap: 1px;
  width: 100%;
  max-height: min(40vh, 260px);
  margin: 2px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.nc-toast-detail {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 3px 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--nc-text);
  font: inherit;
  font-size: var(--nc-fs-sm);
  text-align: left;
  overflow-wrap: anywhere;
}
.nc-toast-detail.is-link {
  cursor: pointer;
}
.nc-toast-detail.is-link:hover {
  background: var(--nc-hover);
}
.nc-toast-detail-icon {
  width: 14px;
  height: 14px;
  color: var(--nc-text-dim);
}
.nc-toast-detail-icon.is-error {
  color: var(--nc-danger);
}
.nc-toast-detail-icon.is-warning {
  color: var(--nc-warning);
}
.nc-toast-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--nc-text-dim);
  cursor: pointer;
}
.nc-toast-close:hover {
  background: var(--nc-hover);
  color: var(--nc-text);
}
.nc-toast-close .nc-icon {
  width: 13px;
  height: 13px;
}
.nc-progress {
  position: relative;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--nc-border-soft);
}
.nc-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 2px;
  background: var(--nc-accent);
  transition: width 0.15s;
}
.nc-progress[data-phase="parse"]::after,
.nc-progress[data-phase="print"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--nc-accent) 45%, transparent), transparent);
  animation: nc-progress-sweep 1.1s linear infinite;
}

@keyframes nc-toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@keyframes nc-progress-sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

/* ------------------------------------------------- empty state, dropzone */

.nc-empty {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}
.nc-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 440px;
  text-align: center;
}
.nc-empty-card .nc-btn {
  pointer-events: auto;
}
.nc-empty-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  color: var(--nc-accent);
}
.nc-empty-icon svg {
  stroke-width: 1.2;
}
.nc-empty-title {
  margin: 0 0 6px;
  font-size: var(--nc-fs-xl);
  font-weight: var(--nc-fw-bold);
  letter-spacing: -0.01em;
}
.nc-empty-text {
  margin: 0 0 12px;
  color: var(--nc-text-dim);
}
.nc-empty-formats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.nc-empty-formats li {
  padding: 2px 9px;
  border: 1px solid var(--nc-border);
  border-radius: 999px;
  background: var(--nc-panel);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
}
.nc-empty-hint {
  margin: 12px 0 4px;
  color: var(--nc-text-dim);
}
.nc-empty-ext {
  margin: 0;
  color: var(--nc-text-dim);
  font: var(--nc-fs-sm) var(--nc-mono);
}

/* No file (B-09): nothing to search, edit or hide yet; the code head and the op head keep their
   bands but not their buttons. The 3D cube and tools are hidden by the scene stylesheet. */
#nc-app[data-state="empty"] .nc-code-actions,
#nc-app[data-state="empty"] #nc-ops .nc-panel-actions {
  display: none;
}

#nc-dropzone {
  position: fixed;
  z-index: 900;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--nc-accent) 10%, color-mix(in srgb, var(--nc-bg) 70%, transparent));
  backdrop-filter: blur(2px);
  pointer-events: none;
}
#nc-dropzone::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px dashed var(--nc-accent);
  border-radius: 14px;
}
.nc-dropzone-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 32px;
  border-radius: 12px;
  background: var(--nc-panel);
  box-shadow: var(--nc-shadow);
}
.nc-dropzone-icon {
  width: 36px;
  height: 36px;
  color: var(--nc-accent);
}
.nc-dropzone-title {
  font-size: var(--nc-fs-xl);
  font-weight: var(--nc-fw-bold);
}
.nc-dropzone-text {
  color: var(--nc-text-dim);
}

/* ---------------------------------------------------------------- dialog */

.nc-dialog-backdrop {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 12, 18, 0.4);
}
.nc-dialog {
  width: min(420px, 100%);
  padding: 18px 18px 14px;
  border: 1px solid var(--nc-border);
  border-radius: 10px;
  background: var(--nc-panel);
  box-shadow: var(--nc-shadow);
}
.nc-dialog-title {
  margin: 0 0 8px;
  font-size: var(--nc-fs-lg);
  font-weight: var(--nc-fw-bold);
}
.nc-dialog-text {
  margin: 0 0 16px;
  color: var(--nc-text-dim);
  overflow-wrap: anywhere;
}
.nc-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Print sheet panel (LR-01): over the inert viewer while the sheet is made and until 「인쇄」 or
   「닫기」. It lives on <body>, outside #nc-app, so it brings the app's base rules with it. */
.nc-print-backdrop {
  z-index: 1200;
  font: var(--nc-fs-md) / 1.45 var(--nc-font);
  color: var(--nc-text);
}
.nc-print-backdrop,
.nc-print-backdrop *,
.nc-print-backdrop *::before,
.nc-print-backdrop *::after {
  box-sizing: border-box;
}
.nc-print-backdrop [hidden] {
  display: none !important;
}
.nc-print-backdrop :focus-visible {
  outline: 2px solid var(--nc-focus-color);
  outline-offset: 2px;
}
.nc-print-panel-status {
  margin: 0 0 10px;
  font-variant-numeric: tabular-nums;
}
.nc-print-panel-bar {
  margin: 0 0 16px;
}
.nc-print-panel-detail {
  margin: 0 0 16px;
  color: var(--nc-text-dim);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.nc-print-panel.is-attention {
  animation: nc-print-attention 0.6s ease;
}
@keyframes nc-print-attention {
  30% {
    box-shadow:
      0 0 0 3px color-mix(in srgb, var(--nc-accent) 55%, transparent),
      var(--nc-shadow);
  }
}

#nc-app[data-busy="true"] .nc-toolbar {
  cursor: progress;
}

/* ---------------------------------------------------- narrow screens */

/* op | 코드 | 정보 under the 3D view (B-22): only on narrow screens. */
.nc-narrow-switch {
  display: none;
}

/* Header compact steps (B-10, round 2 U2-18): the shell sets data-compact when the bar overflows
   (fitHeader), whatever the window width or text size, and labels go in the order they are used
   least: 1 다시 그리기 while it is off (nothing to re-plot); 2 내려받기, and 「테스트 서버」 becomes a
   dot (its words in the title); 3 선택 맞춤 and 표시 설정; 4 인쇄 and 측정 (the per-panel actions),
   and 다시 그리기 even when it is on; 5 every other button but 열기 and 전체 맞춤, the lock to its
   short label; 6 the mark stands for the name and 전체 맞춤 goes to its icon too. Titles keep the
   words at every step. */
.nc-toolbar:not([data-compact="0"]) .nc-toolgroup .nc-btn.nc-btn-replot:disabled .nc-btn-label,
.nc-toolbar:is([data-compact="2"], [data-compact="3"], [data-compact="4"], [data-compact="5"], [data-compact="6"]) .nc-toolgroup .nc-btn.nc-btn-save .nc-btn-label,
.nc-toolbar:is([data-compact="3"], [data-compact="4"], [data-compact="5"], [data-compact="6"]) .nc-toolgroup .nc-btn:is(.nc-btn-fit-selection, .nc-btn-settings) .nc-btn-label,
.nc-toolbar:is([data-compact="4"], [data-compact="5"], [data-compact="6"]) .nc-toolgroup .nc-btn:is(.nc-btn-replot, .nc-btn-print, .nc-btn-measure) .nc-btn-label,
.nc-toolbar:is([data-compact="5"], [data-compact="6"]) .nc-toolgroup > .nc-btn:not(.nc-btn-primary):not(.nc-btn-fit) .nc-btn-label,
.nc-toolbar[data-compact="6"] .nc-toolgroup > .nc-btn.nc-btn-fit .nc-btn-label {
  display: none;
}
.nc-toolbar:not([data-compact="0"]) .nc-toolgroup .nc-btn.nc-btn-replot:disabled,
.nc-toolbar:is([data-compact="2"], [data-compact="3"], [data-compact="4"], [data-compact="5"], [data-compact="6"]) .nc-toolgroup .nc-btn.nc-btn-save,
.nc-toolbar:is([data-compact="3"], [data-compact="4"], [data-compact="5"], [data-compact="6"]) .nc-toolgroup .nc-btn:is(.nc-btn-fit-selection, .nc-btn-settings),
.nc-toolbar:is([data-compact="4"], [data-compact="5"], [data-compact="6"]) .nc-toolgroup .nc-btn:is(.nc-btn-replot, .nc-btn-print, .nc-btn-measure),
.nc-toolbar:is([data-compact="5"], [data-compact="6"]) .nc-toolgroup > .nc-btn:not(.nc-btn-primary):not(.nc-btn-fit),
.nc-toolbar[data-compact="6"] .nc-toolgroup > .nc-btn.nc-btn-fit {
  width: 28px;
  padding: 0;
}
.nc-toolbar:is([data-compact="2"], [data-compact="3"], [data-compact="4"], [data-compact="5"], [data-compact="6"]) .nc-env {
  width: 10px;
  height: 10px;
  padding: 0;
  border-color: var(--nc-warning);
  border-radius: 50%;
  background: var(--nc-warning);
}
.nc-toolbar:is([data-compact="2"], [data-compact="3"], [data-compact="4"], [data-compact="5"], [data-compact="6"]) .nc-env[data-environment="production"] {
  border-color: var(--nc-border-strong);
  background: var(--nc-border-strong);
}
.nc-toolbar:is([data-compact="2"], [data-compact="3"], [data-compact="4"], [data-compact="5"], [data-compact="6"]) .nc-env-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.nc-toolbar:is([data-compact="5"], [data-compact="6"]) .nc-brand-name {
  font-size: var(--nc-fs-md);
}
.nc-toolbar:is([data-compact="5"], [data-compact="6"]) .nc-toolgroup > .nc-btn.nc-btn-fit,
.nc-toolbar:is([data-compact="5"], [data-compact="6"]) .nc-segmented .nc-btn {
  padding: 0 7px;
}
/* The lock button keeps one narrow width: its icon, plus "위" / "아래" while locked (NU-07). */
.nc-toolbar:is([data-compact="5"], [data-compact="6"]) .nc-segmented .nc-btn-lock {
  width: 56px;
  min-width: 0;
  padding: 0 4px;
  gap: 4px;
}
.nc-toolbar:is([data-compact="5"], [data-compact="6"]) .nc-btn-lock .nc-btn-label {
  display: none;
}
.nc-toolbar:is([data-compact="5"], [data-compact="6"]) .nc-btn-lock .nc-btn-short:not(:empty) {
  display: inline;
}
.nc-toolbar[data-compact="6"] .nc-brand-name {
  display: none;
}
.nc-toolbar[data-compact="6"] .nc-toolgroup > .nc-btn.nc-btn-fit {
  padding: 0;
}
.nc-toolbar[data-compact="6"] {
  gap: 6px;
}

@media (max-width: 899px) {
  body.nc-viewer {
    overflow: auto;
  }
  #nc-app {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }
  #nc-header {
    position: sticky;
    top: 0;
  }
  .nc-toolbar {
    gap: 6px;
    padding: 0 8px;
  }
  .nc-brand-name {
    display: none;
  }
  .nc-hide-narrow {
    display: none !important;
  }
  .nc-show-narrow {
    display: inline-flex !important;
  }
  .nc-toolgroup > .nc-btn,
  .nc-toolgroup-end > .nc-btn {
    min-width: 32px;
    height: 32px;
  }
  .nc-toolgroup > .nc-btn:not(.nc-btn-primary) {
    width: 32px;
    padding: 0;
  }
  .nc-toolgroup > .nc-btn:not(.nc-btn-primary) .nc-btn-label {
    display: none;
  }
  .nc-filetab-main {
    min-height: 32px;
  }
  #nc-main {
    display: flex;
    flex-direction: column;
  }
  .nc-resizer,
  .nc-edge-handle,
  .nc-rail {
    display: none !important;
  }
  #nc-viewport {
    order: 1;
    height: 56vh;
    min-height: 300px;
  }
  /* One panel at a time under the 3D view, picked by the segment right below it (B-22). */
  .nc-narrow-switch {
    order: 2;
    display: flex;
    gap: 2px;
    height: 36px;
    padding: 3px 6px;
    border-top: 1px solid var(--nc-border);
    border-bottom: 1px solid var(--nc-border);
    background: var(--nc-panel-2);
  }
  .nc-narrow-tab {
    flex: 1 1 0;
    border: 1px solid transparent;
    border-radius: var(--nc-radius);
    background: transparent;
    color: var(--nc-text-dim);
    font: inherit;
    font-weight: var(--nc-fw-semibold);
    cursor: pointer;
  }
  .nc-narrow-tab[aria-selected="true"] {
    border-color: var(--nc-border);
    background: var(--nc-panel);
    color: var(--nc-text);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  }
  #nc-left,
  #nc-right {
    order: 3;
  }
  #nc-left {
    grid-template-rows: auto minmax(260px, 46vh) auto;
  }
  #nc-right {
    grid-template-rows: minmax(0, 1fr);
    height: 46vh;
    min-height: 280px;
  }
  #nc-main[data-narrow-panel="ops"] #nc-left,
  #nc-main[data-narrow-panel="info"] #nc-left,
  #nc-main[data-narrow-panel="code"] #nc-right,
  #nc-main[data-narrow-panel="ops"] #nc-info,
  #nc-main[data-narrow-panel="info"] #nc-ops {
    display: none;
  }
  #nc-transport {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }
  #nc-toast {
    right: 8px;
    width: calc(100% - 16px);
  }
  .nc-vchips {
    max-width: calc(100% - 100px);
  }
  #nc-status {
    position: sticky;
    bottom: 0;
    gap: 10px;
  }
  .nc-status-hover {
    display: none;
  }
  .nc-popover,
  .nc-popover.nc-help,
  .nc-popover.nc-settings,
  .nc-popover.nc-switcher {
    right: 8px;
    left: 8px;
    width: auto;
  }
  .nc-help-groups {
    column-count: 1;
  }
  .nc-popover.nc-switcher {
    top: calc(var(--nc-header-h) + var(--nc-tabs-h) + 4px);
  }
  .nc-popover.nc-menu {
    right: auto;
    left: auto;
  }
  .nc-menu-item {
    min-height: 36px;
  }
  /* The eye shows on every row here, so every first line keeps its room (U2-13: on a narrow
     window with a mouse it sat on the breakout badge). */
  .nc-op-eye {
    opacity: 1;
  }
  .nc-op-row:not(.is-unsupported):not(.is-reference) .nc-op-line1 {
    padding-right: 24px;
  }
}
/* UX5-34: a narrow and low window (200 % zoom on a laptop: 720×450) — the page scrolls under the
   header, so the 3D view stays under it (sticky) while the keyboard works in the op list or the code
   below; the panels scroll on under it. The header is the toolbar and the file tabs (one row each,
   + its 1 px border; no tabs before a file is open). */
@media (max-width: 899px) and (max-height: 599px) {
  #nc-viewport {
    position: sticky;
    z-index: 5;
    top: calc(var(--nc-header-h) + var(--nc-tabs-h) + 1px);
    height: clamp(160px, 42vh, 300px);
    min-height: 0;
  }
  #nc-app:has(.nc-tabbar[hidden]) #nc-viewport {
    top: calc(var(--nc-header-h) + 1px);
  }
  /* What the focus or a reveal scrolls to lands below the header and the 3D view, not under them. */
  html:has(#nc-app) {
    scroll-padding-top: calc(var(--nc-header-h) + var(--nc-tabs-h) + 1px + clamp(160px, 42vh, 300px));
  }
}

/* --------------------------------------------------------- print plan (F2) */

#nc-print {
  display: none;
}
/* Only while the shell prints the plan (`body.nc-printing`, FR-06): the browser's own print
   (Ctrl/Cmd+P) keeps printing the screen, and a sheet left from a test build never prints. The A4
   landscape page is a named page so it does not change the browser's default print either. */
@page nc-plan {
  size: A4 landscape;
  margin: 10mm;
}
@media print {
  body.nc-viewer.nc-printing {
    height: auto;
    overflow: visible;
    background: #fff;
    color: #111;
  }
  html:has(body.nc-printing) {
    height: auto;
  }
  body.nc-viewer.nc-printing > :not(#nc-print) {
    display: none !important;
  }
  body.nc-printing #nc-print {
    display: block;
    page: nc-plan;
    color: #111;
    font: 10pt/1.35 var(--nc-font);
  }
  .nc-print-omitted {
    margin: 0;
    padding: 2px 6px;
    border-top: 1px solid #999;
    font-size: 8.5pt;
  }
  .nc-print-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1.5px solid #111;
  }
  .nc-print-title {
    margin: 0;
    font-size: 15pt;
    font-weight: 700;
  }
  .nc-print-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    margin: 0;
  }
  .nc-print-fact {
    display: inline-flex;
    gap: 4px;
    white-space: nowrap;
  }
  .nc-print-facts dt {
    color: #555;
  }
  .nc-print-facts dd {
    margin: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .nc-print-plans {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6mm;
    margin-bottom: 6px;
    break-inside: avoid;
  }
  .nc-print-plans.is-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nc-print-plan {
    margin: 0;
    border: 1px solid #999;
  }
  .nc-print-plan figcaption {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 6px;
    border-bottom: 1px solid #999;
    font-weight: 700;
  }
  .nc-print-scale {
    flex: none;
    color: #444;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
  }
  /* Fixed printed sizes (1400 × 1000 pictures): the shell's scale line is worked out from these
     widths (PRINT_IMAGE_MM in nc_viewer_app.js). */
  .nc-print-plan img {
    display: block;
    width: 154mm;
    height: 110mm;
    margin: 0 auto;
    object-fit: contain;
  }
  .nc-print-plans.is-two .nc-print-plan img {
    width: 133mm;
    height: 95mm;
  }
  /* A zoomed plan: one page each, under a one-line head; the op table follows on its own page. */
  .nc-print-page {
    break-before: page;
    break-inside: avoid;
  }
  .nc-print-plan.is-zoom img {
    width: 210mm;
    height: 150mm;
  }
  .nc-print-head.is-compact {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
  }
  .nc-print-head.is-compact .nc-print-title {
    font-size: 11pt;
    white-space: nowrap;
  }
  .nc-print-head.is-compact .nc-print-facts {
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .nc-print-ops.is-paged {
    break-before: page;
  }
  .nc-print-missing {
    padding: 20mm 6mm;
    color: #555;
    text-align: center;
  }
  .nc-print-ops {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
  }
  .nc-print-ops th,
  .nc-print-ops td {
    padding: 1.5px 4px;
    border: 1px solid #bbb;
    text-align: left;
  }
  .nc-print-ops th {
    background: #eee;
  }
  .nc-print-ops .is-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .nc-print-ops tr {
    break-inside: avoid;
  }
  .nc-print-ops tr.is-bottom td {
    background: #f4f4f4;
  }
  .nc-print-note {
    margin: 4px 0 0;
    color: #444;
    font-size: 8.5pt;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nc-toast-item,
  .nc-progress[data-phase="parse"]::after,
  .nc-progress[data-phase="print"]::after,
  .nc-print-panel.is-attention {
    animation: none;
  }
  .nc-fold-summary::before,
  .nc-edge-handle,
  .nc-hud {
    transition: none;
  }
}

/* === SHELL-A: 작업 흐름 (1회차) === */

/* 「열기」 + ▾ (A-02): one split button, files or a whole folder. */
.nc-split {
  display: inline-flex;
  flex: none;
  align-items: stretch;
}
.nc-split > .nc-btn:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.nc-btn.nc-btn-open-menu {
  width: 24px;
  min-width: 24px;
  padding: 0;
  border-left-color: color-mix(in srgb, var(--nc-accent-contrast) 35%, transparent);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.nc-btn-open-menu .nc-icon {
  width: 14px;
  height: 14px;
}
.nc-btn.nc-btn-open-menu[aria-expanded="true"] {
  border-color: var(--nc-accent-strong);
  background: var(--nc-accent-strong);
  color: var(--nc-accent-contrast);
}

/* Edit marks (D-06): filled = code not drawn in 3D; hollow = drawn again, not downloaded. */
.nc-dirty-dot.is-unsaved {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--nc-warning);
}

/* File table check mark (A-23). The table's columns and its one-/two-line layout are in the job
   list section above (round 2 S2-01; the check column is --nc-job-check-w there). */
.nc-job-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--nc-border-strong);
  border-radius: 3px;
  color: var(--nc-accent-contrast);
  font-size: 10px;
  font-weight: var(--nc-fw-bold);
  line-height: 1;
  cursor: pointer;
}
.nc-job-check.is-on {
  border-color: var(--nc-success);
  background: var(--nc-success);
}
.nc-job-check:hover {
  border-color: var(--nc-accent);
}
.nc-jobs-head .nc-job-check.is-head {
  border: 0;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-micro);
  cursor: default;
}
.nc-job-row.is-checked .nc-job-title {
  color: var(--nc-text-dim);
}
.nc-job-row.is-checked.is-active .nc-job-title {
  color: inherit;
}
/* A-04: the cut list's machining remark ("위쪽 우라홈") — the words are in the title. */
.nc-job-memo {
  flex: none;
  padding: 0 4px;
  border: 1px solid color-mix(in srgb, var(--nc-warning) 55%, transparent);
  border-radius: 999px;
  color: var(--nc-warning);
  font-size: var(--nc-fs-micro);
  line-height: 14px;
}
.nc-jobs-foot-text {
  display: contents;
}
.nc-jobs-count {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.nc-jobs-foot > .nc-btn {
  grid-column: 2;
  grid-row: 1;
}
.nc-jobs-totals {
  grid-column: 1 / -1;
  grid-row: 2;
  overflow: hidden;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-micro);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Empty state (A-14, B-09): job data line, two buttons, the extensions over the size limit. */
.nc-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.nc-empty-job {
  margin-top: 4px;
}
.nc-empty-limit {
  margin: 2px 0 0;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
}
.nc-empty-help {
  min-height: 24px;
  margin-top: 8px;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: var(--nc-accent-strong);
  font: inherit;
  font-size: var(--nc-fs-sm);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Questions live on <body> (E-17): above the print panel, with the app's base text rules. */
.nc-dialog-backdrop.nc-dialog-layer {
  z-index: 1250;
  font: var(--nc-fs-md) / 1.45 var(--nc-font);
  color: var(--nc-text);
}
.nc-dialog-layer,
.nc-dialog-layer *,
.nc-dialog-layer *::before,
.nc-dialog-layer *::after {
  box-sizing: border-box;
}
.nc-dialog-layer [hidden] {
  display: none !important;
}
.nc-dialog-layer :focus-visible {
  outline: 2px solid var(--nc-focus-color);
  outline-offset: 2px;
}
.nc-dialog-actions {
  flex-wrap: wrap;
}
.nc-dialog-spacer {
  flex: 1 1 auto;
}
.nc-print-panel {
  width: min(460px, 100%);
}

/* Print plan colour legend (A-08). */
#nc-print .nc-print-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  margin: 0 0 6px;
  font-size: 8.5pt;
  break-inside: avoid;
}
#nc-print .nc-print-legend-title {
  font-weight: 700;
}
#nc-print .nc-print-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
#nc-print .nc-print-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--nc-print-swatch, #888);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

/* --- SHELL2-A: 작업 흐름 (2회차) --- */

/* 확인 mark (U2-19, S2-21): a round mark, not a selection box — empty circle, then ✓ in a green
   circle. A real button (role=checkbox) whose hit area is 24 px around the 14 px circle. */
.nc-jobs .nc-job-check:not(.is-head) {
  position: relative;
  justify-self: center;
  box-sizing: border-box;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--nc-border-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--nc-accent-contrast);
  font: var(--nc-fw-bold) 10px/1 var(--nc-font);
}
/* UX2-36: the whole check cell presses it — the row's height, from the row's left edge (its 10 px
   padding) to the middle of the gap after the column. The 15 px mark sits in the middle of its 18 px
   column and the inset counts from inside its 1.5 px border. */
.nc-jobs .nc-job-check:not(.is-head)::before {
  content: "";
  position: absolute;
  inset: calc((15px - var(--nc-job-row-h, 34px)) / 2 - 1.5px) -6px calc((15px - var(--nc-job-row-h, 34px)) / 2 - 1.5px) -13px;
}
.nc-jobs .nc-job-check.is-on {
  border-color: var(--nc-success);
  background: var(--nc-success);
}
.nc-jobs .nc-job-check:not(.is-head):hover {
  border-color: var(--nc-success);
}
.nc-jobs .nc-job-check.is-on:hover {
  background: color-mix(in srgb, var(--nc-success) 85%, var(--nc-text));
}
.nc-jobs .nc-job-check:not(.is-head):focus-visible {
  outline: 2px solid var(--nc-focus-color);
  outline-offset: 2px;
}
/* The head says 확인; the word may reach into the column gaps (the column is a mark wide). */
.nc-jobs-head .nc-job-check.is-head {
  justify-self: center;
  width: auto;
  height: auto;
  overflow: visible;
  white-space: nowrap;
}

/* A small ✓ before a checked file's tab name (U2-19). */
.nc-filetab-check {
  flex: none;
  color: var(--nc-success);
  font-size: var(--nc-fs-micro);
  font-weight: var(--nc-fw-bold);
  line-height: 1;
}

/* A file's warnings blink its tab ⚠ for a second instead of a toast (U2-08). */
.nc-file-badge.is-flash {
  animation: nc-badge-flash 0.5s ease-in-out 2;
}
@keyframes nc-badge-flash {
  50% {
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 45%, transparent);
    background: color-mix(in srgb, currentColor 22%, transparent);
  }
}

/* A key or drop the top question does not take: it asks for a look (S2-11, S2-16, S2-17). */
.nc-dialog-layer .nc-dialog.is-attention {
  animation: nc-print-attention 0.6s ease;
}

/* 지난 작업 다시 열기 (A-10 ③): under the open buttons of the empty screen. */
.nc-lastjob {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  max-width: 100%;
  margin-top: 10px;
}
.nc-lastjob[hidden] {
  display: none;
}
/* No percentage max-width here: a button's percentage size collapses its intrinsic width to nothing. */
.nc-btn.nc-lastjob-open {
  height: auto;
  min-height: 34px;
  border-color: var(--nc-accent);
  color: var(--nc-accent-strong);
  font-weight: var(--nc-fw-semibold);
  text-align: center;
  white-space: normal;
}
.nc-lastjob-clear {
  min-height: 24px;
  pointer-events: auto;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: var(--nc-text-dim);
  font: inherit;
  font-size: var(--nc-fs-sm);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.nc-lastjob-clear:hover {
  color: var(--nc-text);
}

@media (prefers-reduced-motion: reduce) {
  .nc-file-badge.is-flash,
  .nc-dialog-layer .nc-dialog.is-attention {
    animation: none;
  }
  .nc-file-badge.is-flash {
    outline: 2px solid currentColor;
    outline-offset: 1px;
  }
}

/* === INT-UI: 1회차 통합 (Engine 새 필드·모듈 연결) === */

/* Engine's manufacturing warnings say their word next to the sign ("깊이 넘침", "판 밖 구멍"). */
/* The name keeps its room: the word gives way first (down to the sign alone, the title says it all). */
.nc-op-diag.has-text {
  flex: 0 1000 auto;
  min-width: 18px;
  overflow: hidden;
  gap: 2px;
  padding: 0 4px 0 2px;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
  border-radius: 4px;
  font-size: var(--nc-fs-micro, 11px);
  font-weight: var(--nc-fw-semibold, 600);
  line-height: 14px;
  white-space: nowrap;
}
.nc-op-diag.has-text .nc-icon {
  flex: none;
  width: 12px;
  height: 12px;
}
.nc-op-diag-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nc-op-changed[hidden] {
  display: none;
}
/* An op whose time or cut length moved with the last re-plot (D-05 (2)). */
.nc-op-changed {
  flex: none;
  align-self: center;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nc-accent);
}
/* A file cut short (A-05): the badge says so in words. */
.nc-file-badge.is-truncated {
  font-family: var(--nc-font, inherit);
}
/* Values Engine computed from expressions (D-16): under the value as written. */
.nc-param-computed {
  display: block;
  color: var(--nc-text-dim);
  white-space: nowrap;
}
.nc-vars .nc-var-expr {
  color: var(--nc-text-dim);
}
.nc-var-name {
  padding: 0;
  border: 0;
  background: none;
  color: var(--nc-accent-strong);
  font: inherit;
  cursor: pointer;
}
button.nc-var-name:hover {
  text-decoration: underline;
}
/* 「다음 곳」 of a diagnostic about several lines (D-08) and the ops it does not list. */
.nc-diagnostic-next {
  font-weight: var(--nc-fw-semibold, 600);
}
.nc-diagnostic-more {
  align-self: center;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
}

/* === SHELL2-P: 인쇄 (2회차) === */

/* 「인쇄 ▾」 (A-17): the plate choices, joined to 인쇄 (the output group's 4 px gap taken back).
   A direct child of the output group; it stays 18 px at every compact step (the selector outranks
   the steps' 28 px icon-button rule). */
.nc-toolbar[data-compact] .nc-toolgroup.nc-toolgroup-output > .nc-btn.nc-btn-print-menu:not(.nc-btn-primary) {
  width: 18px;
  min-width: 18px;
  margin-left: -4px;
  padding: 0;
}
.nc-btn-print-menu .nc-icon {
  width: 12px;
  height: 12px;
}
/* UX2-36: pressed wider — over the group's 4 px gap after it up to the next button (the inset counts
   from inside its 1 px border). RU-07: not over 인쇄's edge: its own border only, 22 px in all. */
.nc-btn.nc-btn-print-menu::before {
  content: "";
  position: absolute;
  inset: -1px -5px -1px -1px;
}
.nc-btn.nc-btn-print-menu[aria-expanded="true"] {
  background: var(--nc-hover);
}

/* The panel of a batch: which plate (12/40 · …), the time left, a filling bar; the ready lines. */
.nc-print-panel-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 12px;
  margin: 0 0 6px;
  font-variant-numeric: tabular-nums;
}
.nc-print-panel-plate {
  min-width: 0;
  overflow-wrap: anywhere;
}
.nc-print-panel-time {
  flex: none;
  color: var(--nc-text-dim);
}
.nc-print-panel-bar .nc-progress-bar {
  transition: width 0.3s;
}
.nc-print-panel-line {
  display: block;
}
.nc-print-panel-line + .nc-print-panel-line {
  margin-top: 4px;
}

@media print {
  /* A batch: every plate from a new page, its number at the head's right (3/40). */
  #nc-print .nc-print-plate + .nc-print-plate {
    break-before: page;
  }
  #nc-print .nc-print-title.has-counter {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
  }
  #nc-print .nc-print-counter {
    flex: none;
    font-variant-numeric: tabular-nums;
  }
  /* Insets (U2-11): one or two zoomed plans inside their plan's cell — beside a single plan,
     under each of two. The ring on the plan and the inset's caption carry the same number. */
  #nc-print .nc-print-plan-body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4mm;
  }
  #nc-print .nc-print-plans.is-two .nc-print-plan-body {
    flex-direction: column;
    align-items: center;
    gap: 2mm;
  }
  #nc-print .nc-print-shot {
    position: relative;
    flex: none;
  }
  #nc-print .nc-print-shot > img {
    margin: 0;
  }
  #nc-print .nc-print-insets {
    display: flex;
    flex: none;
    flex-direction: column;
    gap: 3mm;
  }
  #nc-print .nc-print-plans.is-two .nc-print-insets {
    flex-direction: row;
  }
  /* As wide as its picture: the caption wraps instead of widening the frame. */
  #nc-print .nc-print-inset {
    width: calc(62mm + 2px);
    margin: 0;
    border: 1px solid #999;
    break-inside: avoid;
  }
  #nc-print .nc-print-inset figcaption {
    flex-wrap: wrap;
    gap: 0 6px;
    padding: 1px 4px;
    font-size: 7.5pt;
    line-height: 1.3;
  }
  #nc-print .nc-print-inset img {
    display: block;
    width: 62mm;
    height: 44.3mm;
    margin: 0;
  }
  #nc-print .nc-print-ring {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--d);
    aspect-ratio: 1;
    border: 0.45mm dashed #111;
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }
  #nc-print .nc-print-ring > .nc-print-mark {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -0.6mm);
  }
  #nc-print .nc-print-mark {
    display: inline-grid;
    place-items: center;
    min-width: 3.4mm;
    height: 3.4mm;
    margin-right: 4px;
    padding: 0 0.8mm;
    border: 1px solid #111;
    border-radius: 1.7mm;
    background: #fff;
    color: #111;
    font-size: 6.5pt;
    font-weight: 700;
    line-height: 1;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  #nc-print .nc-print-ring > .nc-print-mark {
    margin-right: 0;
  }
  /* A range keeps "X −4 ~ 60" on one line per axis (the no-break spaces of nc/model.rangeLabel). */
  #nc-print .nc-print-ops td.is-range {
    word-break: keep-all;
  }
  #nc-print .nc-print-note.is-table-only {
    margin: 0 0 6px;
    font-weight: 600;
  }
  /* Round 3 (FIX3-PR). The plate on top of its op table, repeated with the head rows on every page
     the table runs to (U3-02). */
  #nc-print .nc-print-ops-plate th {
    padding: 0 0 2px;
    border: 0;
    border-bottom: 1px solid #bbb;
    background: #fff;
    color: #333;
    font-size: 8.5pt;
    font-weight: 600;
    text-align: left;
  }
  /* The breakout count leads the head facts, the marks' meaning sits under the plans (U3-13). */
  #nc-print .nc-print-fact.is-risk dt,
  #nc-print .nc-print-fact.is-risk dd,
  #nc-print .nc-print-fact.is-flag dt,
  #nc-print .nc-print-fact.is-flag dd {
    color: #b42318;
    font-weight: 700;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  #nc-print .nc-print-breakout {
    width: 14pt;
    height: 10pt;
    flex: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* === CMP: 같은 판 비교 (3회차) === */
/* An MPR and a PGI of one program number compared (A-15): the file table's 「비교」 chip, the info tab
   「비교」 and the 3D marks' colour (nc/scene reads --nc-compare-other / --nc-compare-here). */
:root {
  --nc-compare-other: #c026d3;
  --nc-compare-here: #7c3aed;
}
:root[data-theme="dark"] {
  --nc-compare-other: #f0abfc;
  --nc-compare-here: #c4b5fd;
}
/* The chip sits at the right end of the name column in the one-line table (the name gives way); it is
   a child of .nc-job-line2, a display: contents box there. */
.nc-job-line2 > .nc-job-compare {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}
/* Placed explicitly too, or the one-line row's auto-placed cells would move past the chip's cell. */
.nc-job-row:has(> .nc-job-line2 > .nc-job-compare) > .nc-job-name {
  grid-column: 2;
  grid-row: 1;
  padding-right: calc(36px * var(--nc-ui-scale));
}
/* UX5-32: in the two-line table (both formats open — the only tables with the chip) it goes on the
   second line before the time, so the name keeps the whole first line (K2-10: at 280 px most part
   names were cut). Its 24 px press there: 6 px above, 4 below — the row's bottom edge. */
@container nc-jobs (max-width: 36.5em) {
  .nc-jobs:not([data-format]) .nc-job-line2 > .nc-job-compare {
    align-self: center;
  }
  .nc-jobs:not([data-format]) .nc-job-line2 > .nc-job-compare::before {
    inset: -6px -2px -4px;
  }
  .nc-jobs:not([data-format]) .nc-job-row:has(> .nc-job-line2 > .nc-job-compare) > .nc-job-name {
    padding-right: 0;
  }
}
/* The number, the size and the time are still never cut (FIX3-PR): a table dragged narrower than the
   second line with the chip (~240 px at text size 1) leaves the chip out — the tab menu has 「비교」. */
@container nc-jobs (max-width: 18.5em) {
  .nc-jobs:not([data-format]) .nc-job-line2 > .nc-job-compare {
    display: none;
  }
}
.nc-job-compare {
  position: relative;
  flex: none;
  padding: 0 5px;
  border: 1px solid color-mix(in srgb, var(--nc-compare-other) 60%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--nc-compare-other);
  font: var(--nc-fw-medium) var(--nc-fs-micro) / 14px var(--nc-font);
  cursor: pointer;
}
/* UX2-36: a 24 px high hit area around the 16 px chip. RU-07: 4 px above (the chip sits 4 px under
   its row's top in the two-line table — never into the row above), 6 px below. */
.nc-job-compare::before {
  content: "";
  position: absolute;
  inset: -4px -2px -6px;
}
.nc-job-compare:hover {
  background: color-mix(in srgb, var(--nc-compare-other) 12%, transparent);
}
.nc-job-compare.is-done {
  background: color-mix(in srgb, var(--nc-compare-other) 14%, transparent);
}
.nc-cmp {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px 12px;
  font-size: var(--nc-fs-md);
}
.nc-cmp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.nc-cmp-files {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.nc-cmp-arrow {
  color: var(--nc-text-dim);
}
.nc-cmp-stem {
  overflow: hidden;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nc-cmp-actions {
  display: inline-flex;
  gap: 4px;
}
.nc-cmp-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.nc-cmp-chip {
  padding: 1px 7px;
  border: 1px solid var(--nc-border);
  border-radius: 999px;
  font-size: var(--nc-fs-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nc-cmp-chip.is-same {
  border-color: color-mix(in srgb, var(--nc-success) 50%, transparent);
  color: var(--nc-success);
}
.nc-cmp-chip.is-other {
  border-color: var(--nc-compare-other);
  color: var(--nc-compare-other);
}
.nc-cmp-chip.is-here {
  border-color: var(--nc-compare-here);
  color: var(--nc-compare-here);
}
.nc-cmp-chip.is-depth {
  border-color: color-mix(in srgb, var(--nc-warning) 55%, transparent);
  color: var(--nc-warning);
}
.nc-cmp-chip.is-zero {
  border-color: var(--nc-border);
  color: var(--nc-text-faint);
}
.nc-cmp-transform,
.nc-cmp-note {
  margin: 0;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  overflow-wrap: anywhere;
}
.nc-cmp-note.is-error,
.nc-cmp-note.is-stale {
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--nc-warning) 45%, transparent);
  border-radius: var(--nc-radius);
  background: color-mix(in srgb, var(--nc-warning) 8%, transparent);
  color: var(--nc-text);
}
.nc-cmp-note.is-warning {
  color: var(--nc-warning);
}
.nc-cmp-note.is-same {
  color: var(--nc-success);
}
.nc-cmp-marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: var(--nc-fs-sm);
}
/* Legend swatches: a dashed ring (only the other file) and a solid one (only this file), like the 3D. */
.nc-cmp-legend {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  border: 2px dashed var(--nc-compare-other);
  border-radius: 50%;
}
.nc-cmp-legend.is-here {
  border: 1.5px solid var(--nc-compare-here);
}
.nc-cmp-legend-text {
  color: var(--nc-text-dim);
}
.nc-cmp-group > .nc-fold-summary {
  font-size: var(--nc-fs-sm);
}
.nc-cmp-group.is-only-a > .nc-fold-summary,
.nc-cmp-group.is-only-b > .nc-fold-summary {
  color: var(--nc-compare-other);
}
.nc-cmp-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.nc-cmp-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  border-radius: 5px;
}
.nc-cmp-row.is-selected {
  background: var(--nc-selected);
}
.nc-cmp-item {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--nc-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.nc-cmp-item:hover {
  background: var(--nc-hover);
}
.nc-cmp-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nc-cmp-item-where {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-variant-numeric: tabular-nums;
}
.nc-cmp-jump {
  flex: none;
  align-self: center;
  padding: 1px 6px;
  border: 1px solid var(--nc-border);
  border-radius: 999px;
  background: var(--nc-panel);
  color: var(--nc-accent-strong);
  font: var(--nc-fs-micro) / 16px var(--nc-font);
  white-space: nowrap;
  cursor: pointer;
}
.nc-cmp-jump:hover {
  border-color: var(--nc-accent);
}
.nc-cmp-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
}
.nc-cmp-note-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}
/* UX5-39 (Engine UX5-66, N-01 open): a place the Engine counts as different that would be the same with
   the bottom-face compensation side read from above — a machine check, in the warning colour like
   「깊이 다름」: the summary chip, the note under it, the row's mark, the 「참고」 item and the file
   table's 「비교」 chip. 「폭만 다름」 (counted as the same) keeps the plain chip. */
.nc-cmp-chip.is-check {
  border-color: color-mix(in srgb, var(--nc-warning) 55%, transparent);
  color: var(--nc-warning);
}
.nc-cmp-note.is-check {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--nc-warning) 45%, transparent);
  border-radius: var(--nc-radius);
  background: color-mix(in srgb, var(--nc-warning) 8%, transparent);
  color: var(--nc-text);
}
.nc-cmp-note.is-check > .nc-icon,
.nc-cmp-check > .nc-icon {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--nc-warning);
}
.nc-cmp-check {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  margin-right: 4px;
  color: var(--nc-warning);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-semibold);
}
.nc-cmp-notes > li.is-check::marker {
  color: var(--nc-warning);
}
.nc-job-compare.is-check {
  border-color: var(--nc-warning);
  background: color-mix(in srgb, var(--nc-warning) 12%, transparent);
  color: var(--nc-warning);
}

/* === FIX3-WF (3회차) === */
/* Work flow, round 3 (FIX3-WF): the tab's "no ops" mark, the last job's card, the end of 「미확인만」. */

/* U3-05: a file without ops is a short dash in its tab — round marks are the 확인 marks only
   (empty circle = not checked in the file table, ✓ = checked). */
.nc-filetab .nc-empty-dot {
  width: 8px;
  height: 0;
  border: 0;
  border-top: 2px solid var(--nc-text-dim);
  border-radius: 1px;
}

/* U3-07: the last job's name and its checks, a quieter second line inside the card's button. The name
   wraps anywhere on a narrow screen (a long connector folder name must not widen the empty card). */
.nc-btn.nc-lastjob-open {
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
  padding-block: 5px;
}
.nc-btn.nc-lastjob-open .nc-btn-label {
  max-width: 100%;
}
.nc-lastjob-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  max-width: 100%;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-medium);
  white-space: normal;
}
.nc-lastjob-facts[hidden] {
  display: none;
}
.nc-lastjob-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.nc-lastjob-name[hidden] {
  display: none;
}
.nc-lastjob-name:not([hidden]) + .nc-lastjob-progress:not(:empty)::before {
  content: "·";
  margin: 0 0.45em;
}
.nc-lastjob-progress {
  flex: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* U3-08: 「미확인만」 with every file checked — the job is done, not "no match". */
.nc-jobs-empty.nc-jobs-done {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  color: var(--nc-text);
  word-break: keep-all;
}
.nc-jobs-done-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--nc-success);
  color: var(--nc-accent-contrast);
  font-size: var(--nc-fs-micro);
  font-weight: var(--nc-fw-bold);
}
.nc-jobs-done-text {
  font-weight: var(--nc-fw-semibold);
}
.nc-jobs-done-off {
  min-height: 24px;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: var(--nc-accent-strong);
  font: inherit;
  font-weight: var(--nc-fw-semibold);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* ------------------------------------------------- real-use round (UX3) */

/* UX3-07: the cut list's remark is a ✎ in a one-line table up to 52em wide too (its words are the
   title), so the furniture and part names keep that room. */
@container nc-jobs (max-width: 52em) {
  .nc-job-memo {
    font-size: 0;
  }
  .nc-job-memo::before {
    content: "✎";
    font-size: var(--nc-fs-micro);
  }
}

/* UX3-32: 「이 op만 보기」 (Shift+H without a keyboard) / 「모두 보이기」, last in the op details' tags. */
.nc-tags > .nc-op-solo {
  height: 22px;
  margin-left: auto;
}

/* UX3-30: a long press on a button, a tab, a chip or a list row selects no words and brings no callout
   (the code, the info values and the op details stay selectable to copy). */
:is(.nc-btn, .nc-filetab, .nc-info-tab, .nc-left-switch-btn, .nc-narrow-tab, .nc-face-chip, .nc-menu-item, .nc-vchip, .nc-job-row, .nc-op-row, .nc-edge-handle, .nc-rail, .nc-resizer, .nc-toast-link, .nc-toast-pill, .nc-fold-summary) {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* UX3-27 · UX3-29: a finger's sizes (touch screens; the look is the same, only bigger to press). The
   header and its buttons 52 / 44 px, file tabs 44 px with a 32 px ×, menu rows 44 px, panel heads
   40 px, other buttons 40 px (small ones 32), chips 32 px. Hit areas around small marks: the op eye
   36 px wide, relation chips 28 px high, a panel border 32 px wide. Narrow windows (1024 px) fold the
   header labels as before (data-compact): nothing runs past the window. */
@media (pointer: coarse) {
  :root {
    --nc-header-h: 52px;
    --nc-tabs-h: 44px;
    --nc-band-h: 40px;
  }
  .nc-btn {
    height: 40px;
  }
  .nc-btn.nc-btn-sm {
    height: 32px;
  }
  .nc-toolbar .nc-btn {
    height: 44px;
    min-width: 40px;
  }
  .nc-toolbar .nc-segmented .nc-btn {
    height: 42px;
    min-width: 40px;
  }
  .nc-toolbar .nc-btn:is(.nc-btn-open-menu, .nc-btn-print-menu) {
    min-width: 32px;
  }
  /* 「인쇄 ▾」's own 18 px rule outranks the line above. */
  .nc-toolbar[data-compact] .nc-toolgroup.nc-toolgroup-output > .nc-btn.nc-btn-print-menu:not(.nc-btn-primary) {
    width: 32px;
    min-width: 32px;
  }
  .nc-panel-actions .nc-btn {
    min-width: 32px;
  }
  .nc-menu-item {
    min-height: 44px;
  }
  .nc-filetab-close {
    width: 32px;
    height: 32px;
  }
  .nc-left-switch-btn {
    height: 34px;
  }
  .nc-face-chip {
    height: 32px;
  }
  .nc-vchip,
  .nc-vchip-main,
  .nc-vchip-close,
  .nc-vchip-axis {
    min-height: 32px;
  }
  .nc-vchip-close,
  .nc-vchip-axis {
    min-width: 32px;
  }
  .nc-edge-handle {
    width: 32px;
    height: 56px;
    margin-top: -28px;
  }
  .nc-fold-summary,
  .nc-check {
    min-height: 40px;
  }
  .nc-op-eye {
    right: 2px;
    width: 36px;
  }
  .nc-op-row:not(.is-unsupported):not(.is-reference) .nc-op-line1,
  .nc-op-row.is-hidden .nc-op-line1,
  .nc-op-row.is-selected .nc-op-line1 {
    padding-right: 36px;
  }
  button.nc-rel.is-link {
    position: relative;
  }
  button.nc-rel.is-link::before {
    content: "";
    position: absolute;
    inset: -7px -2px;
  }
  /* UX3-29: a finger 9 px off the 4 px line still takes the panel border — on the panel's side all the
     way (::before, 14 px), on the 3D view's side 4 px as with a mouse and, below the top band, 14 px
     (::after, 10 px more). REV-S-02: the top band — down to the view tools' end + 8 px, which the
     scene keeps on #nc-main (--nc-scene-nav-bottom) — holds the view tools (right) and the state
     chips (left, they end above it), so there the border never covers them. The edge handle's own
     56 px band is left out too (clip-path): the handle takes its whole width. The op / details border
     keeps its 12 px: wider, it would take the top of the info tabs. */
  #nc-left-resizer::before {
    inset: 0 -4px 0 -14px;
  }
  #nc-right-resizer::before {
    inset: 0 -14px 0 -4px;
  }
  #nc-left-resizer::after,
  #nc-right-resizer::after {
    --nc-border-band: calc(var(--nc-scene-nav-bottom, 0px) + 8px);
    content: "";
    position: absolute;
    top: var(--nc-border-band);
    bottom: 0;
    width: 10px;
    /* the handle's middle in this box's own height (it starts at the band): the view's 50 %, or for the
       right one at least 28 px below the band (.nc-edge-handle.is-right below) */
    clip-path: polygon(0 0, 100% 0, 100% calc(var(--nc-handle-y) - 30px), 0 calc(var(--nc-handle-y) - 30px), 0 calc(var(--nc-handle-y) + 30px), 100% calc(var(--nc-handle-y) + 30px), 100% 100%, 0 100%);
  }
  #nc-left-resizer::after {
    --nc-handle-y: calc(50% - var(--nc-border-band) / 2);
    left: calc(100% + 4px);
  }
  #nc-right-resizer::after {
    --nc-handle-y: max(calc(50% - var(--nc-border-band) / 2), 28px);
    right: calc(100% + 4px);
  }
  /* REV-S-02: on a short touch screen the right panel's handle keeps below the 3D view tools (the
     scene says where they end, --nc-scene-nav-bottom) instead of the view's middle, on them. */
  .nc-edge-handle.is-right {
    top: max(50%, calc(var(--nc-scene-nav-bottom, 0px) + 36px));
  }
}

/* UX3-36: Windows high contrast (forced colours) keeps what is chosen, pressed or coloured: a chosen
   row or tab has a Highlight ring, a pressed button or chip is filled with Highlight, and the op
   colour swatches keep their colours (they are what ties a row to its path in 3D). */
@media (forced-colors: active) {
  .nc-op-row.is-selected,
  .nc-job-row.is-active,
  .nc-cmp-row.is-selected {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
  .nc-filetab.is-active,
  .nc-info-tab.is-active,
  .nc-narrow-tab[aria-selected="true"] {
    border-color: Highlight;
    color: Highlight;
  }
  /* The left panel's 「파일 / 코드」 switch is a pair of buttons: a Highlight border alone showed the
     shown one by 1 px (FINAL N2) — filled like a pressed button. */
  .nc-btn[aria-pressed="true"],
  .nc-segmented .nc-btn[aria-pressed="true"],
  .nc-toolgroup > .nc-btn[aria-pressed="true"],
  .nc-btn[aria-expanded="true"],
  .nc-face-chip.is-active,
  .nc-left-switch-btn.is-active,
  .nc-jobs .nc-job-check.is-on {
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }
  .nc-left-switch-btn.is-active .nc-left-switch-count {
    color: HighlightText;
  }
  .nc-op-swatch,
  .nc-op-lead,
  .nc-op-progress {
    forced-color-adjust: none;
  }
  .nc-op-swatch {
    border: 1px solid CanvasText;
  }
  /* Round 4 review: the info tab bar's fades are the band's own colour, which high contrast replaces. */
  .nc-info-tabs::before,
  .nc-info-tabs::after {
    display: none;
  }
}

/* ------------------------------------------------ round 4 (2026-10-14 스키퍼 실사용, A2) --- */

/* UX4-41: the panel's nameplate — top left of the 3D view, one line in the label's order; the number
   large and bold. Clicks pass to the 3D view except on the ⚑ button. The chips sit under it
   (placeChipsBelowPlate); the scene's fit keeps the top band (UX4-02). */
.nc-nameplate {
  position: absolute;
  z-index: 8;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 140px);
  min-height: calc(30px * var(--nc-ui-scale));
  padding: 0 4px 0 12px;
  overflow: hidden;
  border: 1px solid var(--nc-border-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--nc-panel) 94%, transparent);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.16);
  color: var(--nc-text);
  font-size: var(--nc-fs-md);
  font-weight: var(--nc-fw-semibold);
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.nc-nameplate[hidden] {
  display: none;
}
#nc-app[data-state="empty"] .nc-nameplate {
  display: none;
}
/* REV-A4-16 ③: the number grows with the UI scale like the words after it. REV-A4-11: the number
   and the part show the whole line as their title (the plate lets the pointer through elsewhere). */
.nc-nameplate-number {
  flex: none;
  font-family: var(--nc-mono);
  font-size: calc(16px * var(--nc-ui-scale));
  pointer-events: auto;
  font-weight: var(--nc-fw-bold);
  font-variant-numeric: tabular-nums;
}
.nc-nameplate-title {
  flex: 0 1 auto;
  min-width: 0;
  pointer-events: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: var(--nc-fw-bold);
}
.nc-nameplate-size {
  flex: none;
  font-variant-numeric: tabular-nums;
}
.nc-nameplate-material,
.nc-nameplate-loading {
  flex: none;
}
.nc-nameplate-loading {
  color: var(--nc-accent-strong);
}
.nc-nameplate-sep {
  flex: none;
  color: var(--nc-text-faint);
}
.nc-nameplate-checked {
  flex: none;
  color: var(--nc-success);
  font-weight: var(--nc-fw-bold);
}
.nc-nameplate-flag {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--nc-text-faint);
  font: inherit;
  font-size: 15px;
  pointer-events: auto;
  cursor: pointer;
}
.nc-nameplate-flag:hover {
  background: var(--nc-hover);
  color: var(--nc-text);
}
.nc-nameplate-flag.is-on {
  color: var(--nc-danger);
}
.nc-nameplate-flag:focus-visible {
  outline: var(--nc-focus);
  outline-offset: -2px;
}

/* UX4-43: 문제 표시 — ⚑ on tabs, rows and in the note form. */
.nc-filetab-flag,
.nc-job-flag {
  flex: none;
  color: var(--nc-danger);
  font-size: var(--nc-fs-sm);
  font-weight: var(--nc-fw-bold);
  line-height: 1;
}
.nc-popover.nc-flag-pop {
  width: 300px;
}
.nc-flag-pop-title {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  font-weight: var(--nc-fw-semibold);
}
.nc-flag-pop-title .nc-flag-mark {
  color: var(--nc-danger);
}
.nc-flag-note {
  width: 100%;
  box-sizing: border-box;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--nc-border-strong);
  border-radius: 6px;
  background: var(--nc-bg);
  color: var(--nc-text);
  font: inherit;
}
.nc-flag-pop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}

/* UX4-30: the job's name on a row while two jobs are open. */
.nc-job-jobname {
  flex: 0 1 auto;
  min-width: 3em;
  max-width: 6em;
  padding: 0 5px;
  overflow: hidden;
  border: 1px solid var(--nc-border-strong);
  border-radius: 4px;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-micro);
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* UX4-45: the foot's 「확인 n/N」 opens 「확인 현황」. */
.nc-jobs-checks {
  padding: 0 2px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}
.nc-jobs-checks:hover {
  background: var(--nc-hover);
}
.nc-popover.nc-check-overview {
  width: 320px;
  max-height: min(70vh, 560px);
}
.nc-overview-title {
  margin-bottom: 6px;
  font-size: var(--nc-fs-md);
  font-weight: var(--nc-fw-semibold);
}
.nc-overview-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  margin-bottom: 8px;
}
.nc-overview-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--nc-danger);
  font: inherit;
  font-size: var(--nc-fs-sm);
  text-decoration: underline;
  cursor: pointer;
}
.nc-overview-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 2px 10px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  font-size: var(--nc-fs-sm);
}
.nc-overview-groups li {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.nc-overview-groups li.is-done {
  color: var(--nc-success);
}
.nc-overview-count {
  font-variant-numeric: tabular-nums;
}
.nc-overview-subtitle {
  margin: 4px 0;
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
}
.nc-overview-left {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.nc-overview-item {
  max-width: 100%;
  padding: 2px 8px;
  overflow: hidden;
  border: 1px solid var(--nc-border);
  border-radius: 999px;
  background: var(--nc-panel-2);
  color: var(--nc-text);
  font: inherit;
  font-size: var(--nc-fs-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.nc-overview-item:hover,
.nc-overview-item.is-active {
  border-color: var(--nc-accent);
}
.nc-overview-more {
  color: var(--nc-text-dim);
  font-size: var(--nc-fs-sm);
}
@media (max-width: 899px) {
  .nc-nameplate {
    left: 8px;
    max-width: calc(100% - 100px);
  }
}
@media (forced-colors: active) {
  .nc-nameplate {
    border-color: CanvasText;
  }
  /* REV-A4-06: a marker fill (Mark is yellow: as text it vanishes on a light theme). */
  .nc-nameplate-flag.is-on,
  .nc-filetab-flag,
  .nc-job-flag {
    background: Mark;
    color: MarkText;
    forced-color-adjust: none;
  }
}
