/* ADR 0105: 네이버 입찰 최적화·키워드 발굴 공통 구조.
   ux-spec §9.1. 색·서체는 셸 변수와 아래 --nbo-* 간접 변수만 쓴다.
   브랜드 값은 각 스코프(web/brands/bemove/theme.css,
   apps/musclefactory/adapter/adapter.css)에서만 매핑한다.
   스코프 없는 전역 선택자에 브랜드 색을 넣지 않는다. */
.fx-nbo-root {
  --nbo-card: var(--card, #ffffff);
  --nbo-bg-sub: var(--bg-sub, #f8fafc);
  --nbo-text: var(--text, #1e293b);
  --nbo-text-sub: var(--text-sub, #64748b);
  --nbo-border: var(--border, #e2e8f0);
  --nbo-border-table: var(--border, #e2e8f0);
  --nbo-fill: var(--primary-fill, #7c3aed);
  --nbo-fill-fg: #ffffff;
  --nbo-fill-border: var(--primary-fill, #7c3aed);
  --nbo-outline-ink: var(--primary-fill, #7c3aed);
  --nbo-outline-border: var(--primary, #6366f1);
  --nbo-accent-line: var(--primary, #6366f1);
  --nbo-ok: #15803d;
  --nbo-info: #1d4ed8;
  --nbo-warn: #b45309;
  --nbo-danger: #b91c1c;
  --nbo-focus: 0 0 0 3px rgba(99, 102, 241, 0.35);
  --nbo-r-ctl: 8px;
  --nbo-r-card: 12px;
  --nbo-r-sheet: 16px;
  --nbo-shadow-sheet: 0 -10px 44px -14px rgba(15, 23, 42, 0.4);
  --nbo-shadow-raised: 0 2px 4px rgba(15, 23, 42, 0.08), 0 20px 44px -20px rgba(15, 23, 42, 0.34);
  --nbo-font-display: inherit;
  --nbo-font-body: inherit;
  --nbo-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

/* Formula 다크(머슬팩토리 다크도 같은 축): 칩 뜻색만 밝게. */
:root[data-formula-theme="dark"] .fx-nbo-root {
  --nbo-ok: #86efac;
  --nbo-info: #93c5fd;
  --nbo-warn: #fcd34d;
  --nbo-danger: #fca5a5;
  --nbo-focus: 0 0 0 3px rgba(129, 140, 248, 0.5);
}

/* hidden 강제: display 지정이 UA [hidden]을 이겨 닫힌 시트·빈 저장 바·
   빈 띠·숨긴 select가 보이는 실측 결함을 막는다(모든 브랜드·테마 공통). */
.fx-nbo-root [hidden] {
  display: none !important;
}

/* 입력 기본(시안 .form-control): 셸은 .form-group 안에서만 입력 스타일을
   두므로 NBO 범위에서 기본을 둔다. 브랜드 색 없이 --nbo-* 만 쓴다. */
.fx-nbo-root .form-control {
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--nbo-border);
  border-radius: var(--nbo-r-ctl);
  background: var(--nbo-card);
  color: var(--nbo-text);
  min-height: 36px;
  width: 100%;
}

.fx-nbo-root .form-control:focus-visible {
  outline: none;
  box-shadow: var(--nbo-focus);
}

.fx-nbo-root .form-control:disabled {
  background: var(--nbo-bg-sub);
  color: var(--nbo-text-sub);
}

.fx-nbo-root .form-control::placeholder {
  color: var(--nbo-text-sub);
}

/* 셸 .btn-primary{width:100%}가 NBO 하단 바·시트 하단의 flex 행에서
   형제 버튼을 짜그러뜨려 글자가 세로로 줄바꿈되는 실측 결함을 막는다. */
.fx-nbo-root .btn-primary {
  width: auto;
}

.fx-nbo-root .fx-nbo-title {
  font-family: var(--nbo-font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: var(--nbo-text);
}

.fx-nbo-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.fx-nbo-head-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.fx-nbo-basis {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--nbo-text-sub);
}

.fx-nbo-rulebar {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 12px;
  align-items: start;
}

.fx-nbo-rule-pick {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.fx-nbo-acct-name,
.fx-nbo-norule {
  margin: 0;
  font-size: 13px;
  color: var(--nbo-text-sub);
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fx-nbo-guards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.fx-nbo-guard {
  border: 1px solid var(--nbo-border);
  border-radius: var(--nbo-r-ctl);
  padding: 7px 12px;
  font-size: 13px;
  color: var(--nbo-text-sub);
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  align-items: baseline;
  align-content: center;
  min-height: 36px;
}

.fx-nbo-guard b {
  font-family: var(--nbo-font-mono);
  font-weight: 600;
  color: var(--nbo-text);
  font-variant-numeric: tabular-nums;
}

.fx-nbo-guard.is-warn {
  border-color: var(--nbo-warn);
  color: var(--nbo-warn);
}

.fx-nbo-guard.is-warn b {
  color: var(--nbo-warn);
}

.fx-nbo-acctline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fx-nbo-acctline .form-control {
  width: auto;
  min-width: 200px;
}

.fx-nbo-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--nbo-text-sub);
}

/* 세그먼트: 활성은 하단 2px 선, 채움 없음. */
.fx-nbo-seg {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--nbo-border);
}

.fx-nbo-seg-btn {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--nbo-text-sub);
  cursor: pointer;
}

.fx-nbo-seg-btn[aria-selected="true"] {
  color: var(--nbo-text);
  border-bottom-color: var(--nbo-accent-line);
}

.fx-nbo-seg-btn:focus-visible {
  outline: none;
  box-shadow: var(--nbo-focus);
  border-radius: var(--nbo-r-ctl);
}

.fx-nbo-count {
  font-family: var(--nbo-font-mono);
  font-weight: 500;
  margin-left: 4px;
}

.fx-nbo-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.fx-nbo-filters .form-control {
  width: auto;
  min-width: 140px;
}

.fx-nbo-filters .fx-nbo-grow {
  flex: 1 1 220px;
}

.fx-nbo-spacer {
  flex: 1 1 auto;
}

.fx-nbo-sort-m {
  display: none;
}

.fx-nbo-body {
  min-width: 0;
}

/* 표: 머리 둘째 줄은 항상 보이는 기준 줄(툴팁 아님). */
.fx-nbo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--nbo-card);
  color: var(--nbo-text);
}

.fx-nbo-root .table-wrap {
  border: 1px solid var(--nbo-border-table);
  border-radius: var(--nbo-r-ctl);
  overflow: hidden;
}

.fx-nbo-table th,
.fx-nbo-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--nbo-border-table);
  text-align: left;
  vertical-align: middle;
}

.fx-nbo-table th {
  font-weight: 600;
  color: var(--nbo-text-sub);
  background: var(--nbo-bg-sub);
  font-size: 12px;
  line-height: 1.3;
}

.fx-nbo-table th small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--nbo-text-sub);
}

.fx-nbo-table th.num,
.fx-nbo-table td.num {
  text-align: right;
}

.fx-nbo-table td.num,
.fx-nbo-table .fx-nbo-mono,
.fx-nbo-mono {
  font-family: var(--nbo-font-mono);
  font-variant-numeric: tabular-nums;
}

.fx-nbo-table td.fx-nbo-kw,
.fx-nbo-kw {
  font-weight: 600;
  color: var(--nbo-text);
  overflow-wrap: anywhere;
}

.fx-nbo-sub {
  color: var(--nbo-text-sub);
}

.fx-nbo-table tbody tr:last-child td {
  border-bottom: 0;
}

.fx-nbo-hint {
  display: block;
  font-family: var(--nbo-font-body);
  font-size: 11px;
  color: var(--nbo-warn);
}

.fx-nbo-th-sort {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.fx-nbo-th-sort:focus-visible {
  outline: none;
  box-shadow: var(--nbo-focus);
  border-radius: var(--nbo-r-ctl);
}

.fx-nbo-check-col {
  width: 44px;
}

.fx-nbo-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--nbo-fill);
}

.fx-nbo-root .fx-nbo-cap-input {
  width: 110px;
  text-align: right;
  font-family: var(--nbo-font-mono);
  padding: 5px 8px;
  min-height: 32px;
  margin-left: auto;
  display: block;
}

/* 상태 칩: 테두리 1px, 채움 없음, 점 + 글자. */
.fx-nbo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid currentColor;
  border-radius: var(--nbo-r-ctl);
  padding: 2px 8px;
  line-height: 1.5;
  white-space: nowrap;
}

.fx-nbo-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.fx-nbo-chip.is-ok { color: var(--nbo-ok); }
.fx-nbo-chip.is-info { color: var(--nbo-info); }
.fx-nbo-chip.is-warn { color: var(--nbo-warn); }
.fx-nbo-chip.is-danger { color: var(--nbo-danger); }
.fx-nbo-chip.is-muted { color: var(--nbo-text-sub); }

.fx-nbo-expand {
  appearance: none;
  background: none;
  border: 0;
  color: var(--nbo-text-sub);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--nbo-r-ctl);
  min-width: 32px;
  min-height: 32px;
}

.fx-nbo-expand:focus-visible {
  outline: none;
  box-shadow: var(--nbo-focus);
}

.fx-nbo-expand-cell {
  width: 48px;
  text-align: right;
}

.fx-nbo-row-detail td {
  background: var(--nbo-bg-sub);
  padding: 14px 16px;
}

.fx-nbo-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.fx-nbo-detail-grid h4 {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--nbo-text);
}

.fx-nbo-cap {
  font-size: 12px;
  color: var(--nbo-text-sub);
  margin: 0 0 8px;
}

.fx-nbo-detail-loading {
  font-size: 12px;
  color: var(--nbo-text-sub);
  margin: 0 0 8px;
}

.fx-nbo-mini {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.fx-nbo-mini th,
.fx-nbo-mini td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--nbo-border-table);
  text-align: right;
  font-family: var(--nbo-font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--nbo-text);
}

.fx-nbo-mini th {
  font-family: var(--nbo-font-body);
  font-weight: 600;
  color: var(--nbo-text-sub);
}

.fx-nbo-mini th:first-child,
.fx-nbo-mini td:first-child {
  text-align: left;
  font-family: var(--nbo-font-body);
}

.fx-nbo-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}

.fx-nbo-list li {
  padding: 4px 0;
  border-bottom: 1px solid var(--nbo-border-table);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--nbo-text-sub);
}

.fx-nbo-list .fx-nbo-mono {
  color: var(--nbo-text);
}

.fx-nbo-detail-links {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.fx-nbo-fail-detail {
  margin: 0;
  font-size: 13px;
  color: var(--nbo-text);
}

.fx-nbo-ops {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.fx-nbo-delta {
  font-family: var(--nbo-font-mono);
  font-size: 11px;
  color: var(--nbo-text-sub);
  margin-left: 6px;
}

/* 셸에 없는 글자 버튼(브랜드 외곽선 잉크로). */
.fx-nbo-root .btn-text {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--nbo-outline-ink);
  font-weight: 600;
  cursor: pointer;
}

.fx-nbo-root .btn-text:focus-visible {
  outline: none;
  box-shadow: var(--nbo-focus);
}

.fx-nbo-root .btn-text.fx-nbo-danger-text {
  color: var(--nbo-danger);
}

.fx-nbo-linkbtn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--nbo-outline-ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.fx-nbo-linkbtn:focus-visible {
  outline: none;
  box-shadow: var(--nbo-focus);
  border-radius: var(--nbo-r-ctl);
}

/* 하단 고정 바: 화면당 채움 하나. */
.fx-nbo-savebar {
  position: sticky;
  bottom: 0;
  background: var(--nbo-card);
  border-top: 1px solid var(--nbo-border);
  margin: 12px -16px -16px;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  box-shadow: var(--nbo-shadow-raised);
  border-radius: 0 0 var(--nbo-r-card) var(--nbo-r-card);
  z-index: 2;
}

.fx-nbo-savebar-lead {
  font-weight: 600;
  color: var(--nbo-text);
}

.fx-nbo-savebar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.fx-nbo-savebar-actions .form-control {
  width: auto;
}

/* 띠: 테두리 1px 의미색, 채움 없음. */
.fx-nbo-band {
  border: 1px solid var(--nbo-border);
  border-radius: var(--nbo-r-ctl);
  padding: 10px 12px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.fx-nbo-band.is-warn {
  border-color: var(--nbo-warn);
  color: var(--nbo-warn);
}

.fx-nbo-band.is-danger {
  border-color: var(--nbo-danger);
  color: var(--nbo-danger);
}

.fx-nbo-band .btn-text {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 모바일 카드(1050px 이하에서 표 대신). */
.fx-nbo-cards {
  display: none;
  grid-template-columns: 1fr;
  gap: 10px;
}

.fx-nbo-card {
  border: 1px solid var(--nbo-border);
  border-radius: var(--nbo-r-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--nbo-card);
}

.fx-nbo-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.fx-nbo-card-kw {
  font-weight: 700;
  font-size: 15px;
  color: var(--nbo-text);
  overflow-wrap: anywhere;
}

.fx-nbo-card-sub {
  font-size: 12px;
  color: var(--nbo-text-sub);
}

.fx-nbo-card-cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.fx-nbo-card-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fx-nbo-card-cell span {
  font-size: 11px;
  color: var(--nbo-text-sub);
}

.fx-nbo-card-cell b {
  font-family: var(--nbo-font-mono);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--nbo-text);
}

.fx-nbo-card-cell .form-control {
  min-height: 40px;
  font-family: var(--nbo-font-mono);
  text-align: right;
  width: 100%;
}

.fx-nbo-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--nbo-text-sub);
}

.fx-nbo-card-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fx-nbo-card-btns-1 {
  grid-template-columns: 1fr;
}

.fx-nbo-card-change b {
  font-family: var(--nbo-font-mono);
  font-weight: 600;
  color: var(--nbo-text);
}

.fx-nbo-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  accent-color: var(--nbo-fill);
  flex-shrink: 0;
}

.fx-nbo-pick {
  display: flex;
  align-items: center;
  cursor: pointer;
  min-width: 0;
}

/* 시드 칩 입력. */
.fx-nbo-seedbox {
  border: 1px solid var(--nbo-border);
  border-radius: var(--nbo-r-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fx-nbo-seedrow {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.fx-nbo-seedrow .fx-nbo-grow {
  flex: 1 1 320px;
}

.fx-nbo-seed-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--nbo-border);
  border-radius: var(--nbo-r-ctl);
  padding: 6px 8px;
  min-height: 44px;
  background: var(--nbo-card);
}

.fx-nbo-seed-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--nbo-accent-line);
  color: var(--nbo-text);
  border-radius: var(--nbo-r-ctl);
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 500;
}

.fx-nbo-seed-chip button {
  appearance: none;
  background: none;
  border: 0;
  color: var(--nbo-text-sub);
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.fx-nbo-seed-chip button:focus-visible {
  outline: none;
  box-shadow: var(--nbo-focus);
  border-radius: var(--nbo-r-ctl);
}

.fx-nbo-seed-chips input {
  flex: 1 1 160px;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--nbo-text);
  min-width: 120px;
  outline: none;
}

.fx-nbo-seed-cnt {
  font-size: 12px;
  color: var(--nbo-text-sub);
}

.fx-nbo-quick {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--nbo-text-sub);
}

.fx-nbo-quick .form-control {
  width: auto;
  min-width: 200px;
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.fx-nbo-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--nbo-text-sub);
}

.fx-nbo-summary-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fx-nbo-summary-right .form-control {
  width: auto;
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.fx-nbo-excluded {
  border: 1px solid var(--nbo-border);
  border-radius: var(--nbo-r-ctl);
  padding: 10px 12px;
}

.fx-nbo-excluded-list {
  margin: 0;
  font-size: 12px;
  color: var(--nbo-text-sub);
}

/* 시트: 데스크톱 오른쪽 드로어 440px, 680px 이하 바텀시트.
   층(NAVER-STRUCT-0106-SHEETFIX): 모달이라 공용 style.css 의 상단 메뉴
   (#main-nav sticky 100)·지식 대시보드 떠 있는 버튼(9999)보다 위다.
   구 60·61 은 메뉴 아래에 깔려 머리·닫기가 안 보였다. bemove 승인 모달
   (10080) 등 앱 모달과는 동시 사용이 없어 순서 선점만 둔다. */
.fx-nbo-sheet-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 10100;
}

.fx-nbo-sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100%;
  background: var(--nbo-card);
  color: var(--nbo-text);
  box-shadow: var(--nbo-shadow-sheet);
  z-index: 10110;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--nbo-border);
}

.fx-nbo-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--nbo-border);
}

.fx-nbo-sheet-head h3 {
  margin: 0;
  font-family: var(--nbo-font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--nbo-text);
}

.fx-nbo-sheet-body {
  padding: 16px 20px;
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fx-nbo-sheet-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--nbo-border);
}

.fx-nbo-sheet-foot-right {
  display: flex;
  gap: 8px;
}

/* 하단 버튼 글자 줄바꿈 금지(취소→취/소 실측 결함). */
.fx-nbo-sheet-foot .btn,
.fx-nbo-savebar .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.fx-nbo-sheet .fx-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fx-nbo-sheet .fx-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--nbo-text-sub);
}

.fx-nbo-sheet .fx-nbo-err .form-control {
  border-color: var(--nbo-danger);
}

.fx-nbo-msg {
  font-size: 12px;
  color: var(--nbo-danger);
  margin: 0;
}

.fx-nbo-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fx-nbo-radio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--nbo-border);
  border-radius: var(--nbo-r-ctl);
  overflow: hidden;
}

.fx-nbo-radio label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--nbo-text);
}

.fx-nbo-radio label + label {
  border-left: 1px solid var(--nbo-border);
}

.fx-nbo-radio input {
  accent-color: var(--nbo-fill);
  margin: 0;
}

.fx-nbo-stepper-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--nbo-text-sub);
}

.fx-nbo-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--nbo-border);
  border-radius: var(--nbo-r-ctl);
  overflow: hidden;
}

.fx-nbo-stepper button {
  appearance: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: var(--nbo-bg-sub);
  color: var(--nbo-text);
  font-size: 18px;
  cursor: pointer;
}

.fx-nbo-stepper button:focus-visible {
  outline: none;
  box-shadow: inset var(--nbo-focus);
}

.fx-nbo-stepper output {
  min-width: 56px;
  text-align: center;
  font-family: var(--nbo-font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--nbo-text);
}

.fx-nbo-unit {
  font-size: 13px;
  color: var(--nbo-text-sub);
}

.fx-nbo-rule-summary {
  border: 1px solid var(--nbo-border);
  border-radius: var(--nbo-r-ctl);
  padding: 10px 12px;
  font-size: 13px;
  background: var(--nbo-bg-sub);
  color: var(--nbo-text);
}

.fx-nbo-rule-summary .fx-nbo-lbl {
  display: block;
  margin-bottom: 4px;
}

.fx-nbo-sheet .form-control.fx-nbo-num {
  font-family: var(--nbo-font-mono);
  text-align: right;
}

.fx-nbo-confirm-note {
  font-size: 13px;
  color: var(--nbo-text-sub);
  margin: 12px 0 0;
}

.fx-nbo-revert-table th:first-child {
  width: 40px;
}

/* 스켈레톤·빈 상태·토스트. */
.fx-nbo-skel {
  height: 36px;
  border-radius: var(--nbo-r-ctl);
  background: var(--nbo-bg-sub);
}

.fx-nbo-skel-line {
  display: block;
  height: 16px;
  border-radius: var(--nbo-r-ctl);
  background: var(--nbo-bg-sub);
  width: 100%;
}

.fx-nbo-empty {
  padding: 24px 12px;
}

.fx-nbo-loading {
  padding: 40px;
}

.fx-nbo-fullstate {
  padding: 40px 16px;
  text-align: center;
  color: var(--nbo-text-sub);
}

.fx-nbo-fullstate p {
  margin: 0 0 8px;
  color: var(--nbo-text);
}

/* 시트 동작 확인 토스트는 시트·스크림 위(0105부터 토스트 70 > 시트 61, 유지). */
.fx-nbo-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10120;
  align-items: center;
  pointer-events: none;
}

.fx-nbo-toast-item {
  background: var(--nbo-text);
  color: var(--nbo-card);
  border-radius: var(--nbo-r-ctl);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--nbo-shadow-raised);
  max-width: min(90vw, 560px);
}

.fx-nbo-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.fx-nbo-root .fx-nbo-bid-input {
  width: 140px;
  font-family: var(--nbo-font-mono);
  text-align: right;
}

/* ── 반응형: 시안의 컨테이너 쿼리를 @media 1050·680으로 ── */
@media (max-width: 1050px) {
  .fx-nbo-root .table-wrap {
    display: none;
  }

  .fx-nbo-cards {
    display: grid;
  }

  .fx-nbo-rulebar {
    grid-template-columns: 1fr;
  }

  .fx-nbo-guards {
    grid-template-columns: 1fr;
  }

  .fx-nbo-detail-grid {
    grid-template-columns: 1fr;
  }

  .fx-nbo-seg-btn {
    flex: 1;
    text-align: center;
  }

  .fx-nbo-filters .form-control {
    min-width: 0;
    flex: 1 1 40%;
  }

  .fx-nbo-filters .fx-nbo-grow {
    flex: 1 1 100%;
  }

  .fx-nbo-filters .fx-nbo-spacer {
    display: none;
  }

  .fx-nbo-sort-m {
    display: block;
  }

  .fx-nbo-savebar {
    flex-direction: column;
    align-items: stretch;
  }

  .fx-nbo-savebar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .fx-nbo-savebar-actions.fx-nbo-savebar-3 {
    grid-template-columns: 1fr;
  }

  .fx-nbo-savebar-actions .form-control {
    width: 100%;
  }

  .fx-nbo-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .fx-nbo-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .fx-nbo-seedrow .btn {
    width: 100%;
  }

  .fx-nbo-quick .form-control {
    min-width: 0;
    flex: 1;
  }
}

@media (max-width: 680px) {
  .fx-nbo-root {
    padding: 12px;
  }

  .fx-nbo-head {
    flex-direction: column;
  }

  .fx-nbo-head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .fx-nbo-head-actions .btn {
    white-space: normal;
  }

  .fx-nbo-radio {
    grid-template-columns: 1fr;
  }

  .fx-nbo-radio label + label {
    border-left: 0;
    border-top: 1px solid var(--nbo-border);
  }

  .fx-nbo-radio label {
    white-space: nowrap;
  }

  .fx-nbo-sheet {
    top: 12px;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    border-left: 0;
    border-top: 1px solid var(--nbo-border);
    border-radius: var(--nbo-r-sheet) var(--nbo-r-sheet) 0 0;
  }

  .fx-nbo-sheet-foot {
    flex-wrap: wrap;
  }

  .fx-nbo-sheet-foot-right {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .fx-nbo-savebar {
    margin: 12px -12px -12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .fx-nbo-2col {
    grid-template-columns: 1fr;
  }
}
