/* 공용 부품 — includes/ui.php 가 이 마크업을 만든다. 화면 이름(.dashboard-…)을 넣지 않는다.
   틀: mih_tool components.css(토큰 이름 같음). 콘솔 밀도 — 단추는 둥근 사각, 테두리 1px, 그림자는 아주 얕게. */

/* ── 단추 ── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control-h-md); padding: 0 var(--space-4);
  border: 1px solid transparent; border-radius: var(--r); cursor: pointer;
  font-size: var(--text-sm); font-weight: var(--weight-semibold); line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
  touch-action: manipulation; user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.icon-btn:active, .copy-btn:active { transform: scale(.94); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn-danger:hover { filter: brightness(.94); color: var(--on-danger); }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: var(--control-h-sm); padding: 0 var(--space-3); border-radius: var(--r-sm); }
.btn-sm svg { width: 15px; height: 15px; }
.btn-lg { min-height: var(--control-h-lg); padding: 0 var(--space-6); font-size: var(--text-md); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; pointer-events: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading svg { opacity: 0; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--on-primary); border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after, .btn-danger-ghost.is-loading::after { border-color: var(--text-2); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--r); background: transparent; color: var(--text-2); cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn[aria-pressed="true"] { color: var(--primary-ink); background: var(--primary-soft); }

/* 복사 단추 — 누르면 체크로 1.6초 바뀐다(app.js) */
.copy-btn { flex: none; display: inline-grid; grid-auto-flow: column; align-items: center; gap: 6px; place-content: center; min-width: 40px; height: 40px; padding: 0 var(--space-2);
  border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--text-3); cursor: pointer; font-size: var(--text-xs); font-weight: var(--weight-semibold);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.copy-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn .done-ico { display: none; }
.copy-btn.is-done { color: var(--st-ok); }
.copy-btn.is-done .copy-ico { display: none; }
.copy-btn.is-done .done-ico { display: block; }
.copy-btn-text { border-color: var(--border-strong); color: var(--text-2); background: var(--surface); padding: 0 var(--space-3); }

/* ── 입력 ── */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field-label { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text); }
.field-label .req { color: var(--danger); margin-left: 2px; }
.field-label .opt { font-weight: var(--weight-normal); color: var(--text-3); margin-left: var(--space-1); }
.field-hint { font-size: var(--text-xs); color: var(--text-3); line-height: 1.5; }
.field-error { font-size: var(--text-sm); color: var(--danger); font-weight: var(--weight-medium); }
.input, .textarea {
  width: 100%; min-height: var(--control-h-md); padding: 0 var(--space-3);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r);
  font-size: var(--text-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input.mono { font-size: var(--text-sm); }
.textarea { padding: var(--space-3); min-height: 96px; resize: vertical; line-height: var(--leading-normal); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: .85; }
.input:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--primary-soft); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input-suffix { position: relative; }
.input-suffix > .input { padding-right: 48px; }
.pw-toggle { position: absolute; right: 1px; top: 50%; transform: translateY(-50%); }
.check { display: flex; gap: var(--space-3); align-items: center; min-height: 40px; cursor: pointer; font-size: var(--text-sm); }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary-ink); flex: none; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-2); }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.radio-card span {
  display: grid; gap: 2px; min-height: 56px; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.radio-card strong { font-size: var(--text-sm); }
.radio-card small { font-size: var(--text-xs); color: var(--text-3); }
.radio-card span:hover { border-color: var(--text-3); }
.radio-card input:checked + span { border-color: var(--focus); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--focus); }
.radio-card input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.form-grid { display: grid; gap: var(--space-4); }
@media (min-width: 600px) { .form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; }

/* ── 판(패널) ── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--space-5); box-shadow: var(--shadow-card); min-width: 0; }
.panel.narrow { max-width: 520px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); flex-wrap: wrap; }
.panel-title { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-md); font-weight: var(--weight-bold); margin-bottom: var(--space-4); letter-spacing: -0.01em; }
.panel-title svg { width: 17px; height: 17px; color: var(--text-3); }
.panel-head .panel-title { margin-bottom: 0; }
.section-title { font-size: var(--text-md); font-weight: var(--weight-bold); letter-spacing: -0.01em; }
.disclosure-panel { padding: 0; }
.disclosure-panel > summary { list-style: none; display: flex; align-items: center; min-height: 56px; padding: 0 var(--space-5); cursor: pointer; border-radius: var(--r-lg); }
.disclosure-panel > summary::-webkit-details-marker { display: none; }
.disclosure-panel > summary .panel-title { margin: 0; }
.disclosure-panel > summary:hover { background: var(--surface-2); }
.disclosure-panel[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.disclosure-body { padding: var(--space-5); }

/* ── 상태 표시(색 + 아이콘 + 글자) ── */
.st { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 8px 0 6px; border-radius: var(--r-full); font-size: var(--text-xs); font-weight: var(--weight-semibold); white-space: nowrap; vertical-align: middle; line-height: 1; }
.st svg { width: 14px; height: 14px; flex: none; }
.st-note { font-weight: var(--weight-normal); opacity: .85; margin-left: 2px; }
.st-neutral { color: var(--st-neutral); background: var(--st-neutral-bg); }
.st-info    { color: var(--st-info);    background: var(--st-info-bg); }
.st-ok      { color: var(--st-ok);      background: var(--st-ok-bg); }
.st-warn    { color: var(--st-warn);    background: var(--st-warn-bg); }
.st-bad     { color: var(--st-bad);     background: var(--st-bad-bg); }
.st-report  { color: var(--st-report);  background: var(--st-report-bg); }

/* ── 배지 ── */
.badge { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 var(--space-2); border-radius: var(--r-sm); font-size: var(--text-xs); font-weight: var(--weight-semibold); white-space: nowrap; background: var(--surface-3); color: var(--text-2); vertical-align: middle; }
.badge svg { width: 13px; height: 13px; }
.badge-primary { background: var(--st-info-bg); color: var(--st-info); }
.badge-warn { background: var(--st-warn-bg); color: var(--st-warn); }
.badge-danger { background: var(--st-bad-bg); color: var(--st-bad); }
.badge-success { background: var(--st-ok-bg); color: var(--st-ok); }
.badge-report { background: var(--st-report-bg); color: var(--st-report); }

/* ── 알림 상자 ── */
.alert { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--r); background: var(--surface-2); color: var(--text); font-size: var(--text-sm); border: 1px solid var(--border); }
.alert > svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-body { display: grid; gap: 2px; min-width: 0; }
.alert-info { background: var(--st-info-bg); border-color: color-mix(in srgb, var(--st-info) 18%, transparent); }
.alert-info > svg { color: var(--st-info); }
.alert-warn { background: var(--st-warn-bg); border-color: color-mix(in srgb, var(--st-warn) 22%, transparent); }
.alert-warn > svg { color: var(--st-warn); }
.alert-error { background: var(--st-bad-bg); border-color: color-mix(in srgb, var(--st-bad) 20%, transparent); }
.alert-error > svg { color: var(--st-bad); }
.alert-success { background: var(--st-ok-bg); border-color: color-mix(in srgb, var(--st-ok) 20%, transparent); }
.alert-success > svg { color: var(--st-ok); }
.alert strong { display: block; }

/* ── 빈 상태 ── */
.empty { text-align: center; padding: var(--space-8) var(--space-4); display: grid; gap: var(--space-2); justify-items: center; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--surface); }
.empty-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); background: var(--surface-2); color: var(--text-3); margin-bottom: var(--space-1); flex: none; }
.empty-ico svg { width: 22px; height: 22px; }
.empty-title { font-size: var(--text-md); font-weight: var(--weight-bold); }
.empty p { color: var(--text-2); max-width: 46ch; font-size: var(--text-sm); }
.empty-actions { margin-top: var(--space-3); display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }
.panel .empty { border: 0; padding: var(--space-6) var(--space-3); background: transparent; }
.empty-inline { display: flex; gap: var(--space-4); align-items: flex-start; margin-bottom: var(--space-5); }
.empty-inline .panel-title { margin-bottom: var(--space-1); }
.empty-inline p { font-size: var(--text-sm); max-width: 64ch; }

/* ── 값 표 ── */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-3) var(--space-5); margin: 0; font-size: var(--text-sm); align-items: center; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: var(--weight-medium); min-width: 0; }
.kv-stack { grid-template-columns: 1fr; gap: 2px; }
.kv-stack dd { margin-bottom: var(--space-2); display: flex; align-items: center; gap: var(--space-1); flex-wrap: wrap; }

/* ── 표(모바일에선 카드로 — 안쪽 가로 스크롤 없음, §9-1) ── */
.table-wrap { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); min-width: 0; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th, .table td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { color: var(--text-3); font-weight: var(--weight-semibold); font-size: var(--text-xs); white-space: nowrap; }
.table th.t-num, .table td.t-num { text-align: right; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur) var(--ease); }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.strong-link { color: var(--text); font-weight: var(--weight-semibold); text-decoration: none; }
.strong-link:hover { color: var(--primary-ink); text-decoration: underline; }
.cell-sub { display: flex; align-items: center; gap: var(--space-1); flex-wrap: wrap; margin-top: 2px; font-size: var(--text-xs); color: var(--text-3); }
.warn-text-sm { display: inline-flex; align-items: center; gap: 4px; color: var(--st-warn); font-weight: var(--weight-semibold); font-size: var(--text-xs); }
.warn-text-sm svg { width: 14px; height: 14px; }
@media (max-width: 767px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: var(--space-3); align-items: center; text-align: right; }
  .table-cards td > * { min-width: 0; }
  .table-cards td.t-num { text-align: right; }
  .table-cards td::before { content: attr(data-label); color: var(--text-3); font-weight: var(--weight-medium); flex: none; font-size: var(--text-xs); text-align: left; }
  .table-cards td:first-child { display: block; text-align: left; padding-bottom: var(--space-2); }
  .table-cards td:first-child::before { display: none; }
  .table-cards .cell-sub { justify-content: flex-start; }
}

/* ── 탭(링크·버튼) ── */
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: var(--r); background: var(--surface-3); flex-wrap: wrap; width: fit-content; max-width: 100%; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-h-sm); padding: 0 var(--space-3); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); text-decoration: none; font-size: var(--text-sm); font-weight: var(--weight-semibold); cursor: pointer; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs a[aria-current="page"], .tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
/* 안쪽 모서리 = 바깥 모서리 - 안쪽 여백(3px) — 겹친 둥근 면이 같은 곡선으로 보이게 */
.tabs a, .tabs button, .seg-toggle button { border-radius: calc(var(--r) - 3px); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.tab-n { min-width: 20px; padding: 0 5px; border-radius: var(--r-full); background: color-mix(in srgb, var(--text-3) 16%, transparent); color: var(--text-2); font-size: var(--text-xs); text-align: center; line-height: 20px; }

/* 두 값 바꿔 보기(가비아식 호스트 / 전체 이름) */
.seg-toggle { display: inline-flex; padding: 3px; border-radius: var(--r); background: var(--surface-3); gap: 2px; flex-wrap: wrap; }
.seg-toggle button { min-height: var(--control-h-sm); padding: 0 var(--space-3); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.seg-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

/* ── 숫자 카드 + 기준선 막대 ── */
.metric { display: grid; gap: 6px; align-content: start; padding: var(--space-4) var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-card); min-width: 0; }
.panel .metric { padding: 0; border: 0; box-shadow: none; background: transparent; }
.metric-label { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--text-3); letter-spacing: .01em; }
.metric-value { font-size: 28px; font-weight: var(--weight-bold); letter-spacing: -0.02em; line-height: 1.15; white-space: nowrap; }
.metric-unit { margin-left: 6px; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-3); letter-spacing: 0; }
.metric-hint { display: flex; align-items: center; gap: 5px; font-size: var(--text-xs); color: var(--text-3); }
.metric-hint svg { width: 14px; height: 14px; flex: none; }
.metric-ok .metric-hint { color: var(--st-ok); }
.metric-warn .metric-hint, .metric-warn .metric-value { color: var(--st-warn); }
.metric-bad .metric-hint, .metric-bad .metric-value { color: var(--st-bad); }
.gauge { position: relative; height: 6px; border-radius: var(--r-full); background: var(--surface-3); margin: 4px 0 2px; }
.gauge-fill { position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%); border-radius: inherit; background: var(--text-3); }
.metric-ok .gauge-fill { background: var(--st-ok); }
.metric-warn .gauge-fill, .gauge-fill.is-warn { background: var(--st-warn); }
.metric-bad .gauge-fill { background: var(--st-bad); }
.gauge-mark { position: absolute; top: -4px; bottom: -4px; left: var(--mark, 50%); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--text); opacity: .55; }
.gauge-sm { height: 4px; margin: 0; }

/* ── 코드 블록(복사 단추) ── */
.codeblock { border-radius: var(--r); overflow: hidden; background: var(--code-bg); border: 1px solid color-mix(in srgb, var(--code-text) 10%, transparent); }
.codeblock-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 4px 4px 4px var(--space-3); border-bottom: 1px solid color-mix(in srgb, var(--code-text) 12%, transparent); color: color-mix(in srgb, var(--code-text) 70%, transparent); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.codeblock .copy-btn-text { background: transparent; color: var(--code-text); border-color: color-mix(in srgb, var(--code-text) 22%, transparent); }
.codeblock .copy-btn-text:hover { background: color-mix(in srgb, var(--code-text) 10%, transparent); }
.codeblock .copy-btn.is-done { color: #6ee7a8; }
.codeblock pre { padding: var(--space-4); color: var(--code-text); font-family: var(--font-mono); font-size: var(--text-sm); line-height: 1.65; white-space: pre-wrap; word-break: break-all; }

/* ── 쪽 넘김 ── */
.pager { display: flex; align-items: center; justify-content: center; gap: var(--space-3); flex-wrap: wrap; }
.pager-at { font-size: var(--text-sm); color: var(--text-3); }

/* ── 작은 목록(이름 + 상태 + 설명) ── */
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; }
.mini-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); min-height: 48px; padding: var(--space-2) 0; border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li > .faint { margin-left: auto; }
.mini-list .inline-form { margin-left: auto; }
.quiet-ok { display: flex; align-items: center; gap: var(--space-2); color: var(--text-2); font-size: var(--text-sm); }
.quiet-ok svg { width: 18px; height: 18px; color: var(--st-ok); }

/* ── 토스트 ── */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--space-5) + env(safe-area-inset-bottom)); z-index: 90; display: grid; gap: var(--space-2); width: min(92vw, 440px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); min-height: 48px; border-radius: var(--r); background: var(--tip-bg); color: var(--tip-text); box-shadow: var(--shadow-2); font-size: var(--text-sm); animation: toast-in .2s var(--ease); }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast-error svg { color: var(--tip-err); }
.toast-success svg { color: var(--tip-ok); }
.toast-warn svg { color: var(--tip-warn); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ── 대화상자(브라우저 confirm 대신) ── */
.dialog { border: 0; padding: 0; background: transparent; max-width: min(92vw, 460px); width: 100%; color: var(--text); }
.dialog::backdrop { background: var(--overlay); }
.dialog[open] { animation: dlg-in .16s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.dialog-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-2); display: flex; flex-direction: column; max-height: 86vh; max-height: 86dvh; }
.dialog-body { padding: var(--space-6) var(--space-6) var(--space-4); overflow-y: auto; overscroll-behavior: contain; display: grid; gap: var(--space-3); }
.dialog-title { font-size: var(--text-lg); line-height: 1.45; }
.dialog-text { color: var(--text-2); font-size: var(--text-sm); }
.dialog-actions { display: flex; gap: var(--space-2); justify-content: flex-end; padding: var(--space-3) var(--space-6) var(--space-6); flex-wrap: wrap; }
.dialog-actions .btn { flex: 0 1 auto; min-width: 96px; }
@media (max-width: 420px) { .dialog-actions .btn { flex: 1 1 120px; } }

/* 키 한 번 보기(대화상자 안·JS 없는 화면 맨 위 둘 다) */
.key-once { display: grid; gap: var(--space-3); padding: var(--space-5); border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--st-warn) 35%, transparent); background: var(--st-warn-bg); }
.dialog .key-once { padding: 0; border: 0; background: transparent; }
.key-once-head { display: flex; align-items: center; gap: var(--space-2); color: var(--st-warn); }
.key-once-head svg { width: 18px; height: 18px; }
.key-once-head h2 { font-size: var(--text-md); color: var(--text); }
.key-once-val { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); border-radius: var(--r); background: var(--surface); border: 1px solid var(--border-strong); }
.key-once-val code { flex: 1 1 auto; min-width: 0; font-size: var(--text-sm); line-height: 1.5; word-break: break-all; user-select: all; }
.key-warn { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-3); border-radius: var(--r); background: var(--st-warn-bg); color: var(--text); font-size: var(--text-sm); }
.key-warn svg { width: 17px; height: 17px; color: var(--st-warn); flex: none; margin-top: 2px; }

/* ── 콤보박스(기본 select 펼침 대신 — 규칙서 §8-1) ── */
.cbx { position: relative; }
.cbx-native { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cbx-input { padding-right: 40px; cursor: text; }
.cbx-arrow { position: absolute; right: 1px; top: 1px; width: 38px; height: calc(var(--control-h-md) - 2px); display: grid; place-items: center; color: var(--text-3); pointer-events: none; }
.cbx-arrow svg { width: 16px; height: 16px; }
.cbx-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; margin: 0; padding: var(--space-1); list-style: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); box-shadow: var(--shadow-2); max-height: 280px; overflow-y: auto; overscroll-behavior: contain; }
.cbx.is-up .cbx-list { top: auto; bottom: calc(100% + 4px); }
.cbx-opt { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 40px; padding: 0 var(--space-3); border-radius: var(--r-sm); cursor: pointer; font-size: var(--text-sm); }
.cbx-hint { color: var(--text-3); font-size: var(--text-xs); white-space: nowrap; }
.cbx-opt[aria-selected="true"] { font-weight: var(--weight-bold); color: var(--primary-ink); }
.cbx-opt.is-active { background: var(--surface-2); }
.cbx-empty { padding: var(--space-3); color: var(--text-3); font-size: var(--text-sm); }

/* ── 툴팁(기본 title 대신 — 규칙서 §8-1) ── */
.tip { position: fixed; z-index: 100; max-width: 260px; padding: 6px var(--space-3); border-radius: var(--r-sm); background: var(--tip-bg); color: var(--tip-text); font-size: var(--text-xs); line-height: 1.5; box-shadow: var(--shadow-2); pointer-events: none; opacity: 0; transition: opacity 120ms var(--ease); }
.tip.is-on { opacity: 1; }

/* ── 아이콘·아바타 ── */
.icon { width: 18px; height: 18px; flex: none; }
.icon-xs { width: 14px; height: 14px; vertical-align: -2px; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r); background: var(--surface-3); color: var(--text); font-weight: var(--weight-bold); font-size: var(--text-sm); }
