/* 설정 화면은 캡처를 확대하지 않고 실제 orke의 글자·SVG·중성 표면으로 그린다.
   설치 상태는 설명용이며, 내부 요소는 조작하거나 초점을 받지 않는다. */
@layer components {
  .runtime-settings-preview {
    container: runtime-preview / inline-size;
    width: 100%;
    max-width: 640px;
    min-width: 0;
    margin: 0;
  }

  .rp-window {
    --rp-chrome: #1b1f26;
    --rp-overlay: #1e232a;
    --rp-terminal: #0d1116;
    --rp-border: rgba(255, 255, 255, .10);
    --rp-text: #e8ebef;
    --rp-muted: #9aa3ae;
    --rp-dim: #838c99;
    --rp-live: #56d69a;
    --rp-low: #ffb4ab;
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--rp-border);
    border-radius: 12px;
    background: var(--rp-overlay);
    color: var(--rp-text);
    box-shadow: 0 20px 56px rgba(0, 0, 0, .28);
    font: 400 13px/1.5 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
    letter-spacing: 0;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .rp-window *, .rp-window *::before, .rp-window *::after { box-sizing: border-box; }
  .rp-window p { margin: 0; }
  .rp-window strong { font-weight: 600; }
  .rp-close { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 32px; height: 32px; color: var(--rp-muted); }
  .rp-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-width: 0; }
  .rp-side { min-width: 0; padding: 0 6px 12px; background: var(--rp-chrome); border-right: 1px solid var(--rp-border); }
  .rp-side-title { display: flex; align-items: center; height: 56px; padding: 0 10px; font-size: 15px; font-weight: 600; }
  .rp-nav { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .rp-nav-item { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 40px; padding: 8px 10px; border-radius: 6px; color: var(--rp-muted); font-size: 13px; }
  .rp-nav-active { background: rgba(255, 255, 255, .10); color: var(--rp-text); font-weight: 600; }
  .rp-nav-icon { flex: 0 0 auto; width: 16px; height: 16px; object-fit: contain; color: var(--rp-dim); }
  .rp-nav-active .rp-nav-icon { color: var(--rp-text); }
  .rp-pane { min-width: 0; padding: 22px 18px 20px; }
  .rp-pane-head { display: flex; align-items: center; gap: 10px; padding-right: 28px; }
  .rp-pane-icon { flex: 0 0 auto; width: 20px; height: 20px; color: var(--rp-dim); }
  .rp-pane-title { font-size: 20px; font-weight: 600; line-height: 28px; letter-spacing: -.01em; }
  .rp-flow { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; min-width: 0; }
  .rp-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--rp-live) 55%, var(--rp-border)); border-radius: 6px; background: var(--rp-terminal); }
  .rp-status-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .rp-status-text > strong { display: flex; align-items: center; gap: 8px; font-size: 13px; }
  .rp-status-text > strong::before { content: ''; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--rp-live); }
  .rp-status-text > span { color: var(--rp-muted); font-size: 12px; }
  .rp-action { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 32px; padding: 5px 10px; border: 1px solid var(--rp-border); border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--rp-text); font-size: 13px; white-space: nowrap; }
  .rp-action-primary { background: var(--rp-text); border-color: var(--rp-text); color: var(--rp-terminal); }
  .rp-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--rp-border); border-radius: 8px; background: var(--rp-terminal); }
  .rp-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; min-width: 0; }
  .rp-card-title { font-size: 15px; font-weight: 600; line-height: 22px; }
  .rp-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 6px; border: 1px solid var(--rp-border); border-radius: 4px; color: var(--rp-muted); font-size: 12px; white-space: nowrap; }
  .rp-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
  .rp-choice { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border: 1px solid var(--rp-border); border-radius: 8px; }
  .rp-choice-active { background: rgba(255, 255, 255, .05); border-color: rgba(232, 235, 239, .55); }
  .rp-choice-label { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: 10px; }
  .rp-choice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .rp-choice-text > strong { font-size: 13px; line-height: 20px; }
  .rp-choice-text > span { color: var(--rp-muted); font-size: 12px; }
  .rp-choice-unavailable .rp-choice-text { color: var(--rp-dim); }
  .rp-choice-unavailable .rp-choice-text > span { color: var(--rp-dim); }
  .rp-radio { display: block; flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; border: 1px solid var(--rp-dim); border-radius: 50%; background: transparent; }
  .rp-radio-selected { border-color: var(--rp-text); background: var(--rp-text); box-shadow: inset 0 0 0 4px var(--rp-terminal); }
  .rp-choice-status { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding-left: 26px; font-size: 12px; }
  .rp-choice-status > span:first-child { display: flex; align-items: baseline; gap: 6px; }
  .rp-choice-status > span:first-child::before { content: ''; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--rp-low); }
  .rp-options { display: flex; flex-direction: column; min-width: 0; }
  .rp-option { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: start; gap: 4px 10px; min-height: 44px; padding: 8px 0; border-bottom: 1px solid var(--rp-border); }
  .rp-option:last-child { border-bottom: 0; }
  .rp-option > .rp-radio { grid-row: 1 / 3; }
  .rp-option-name { font-size: 13px; line-height: 20px; }
  .rp-option-selected .rp-option-name { font-weight: 600; }
  .rp-option-meta { grid-column: 2; min-width: 0; color: var(--rp-muted); font-size: 12px; }
  .rp-option-found .rp-option-meta, .rp-option-missing .rp-option-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; }
  .rp-found { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 6px; }
  .rp-found::before { content: ''; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--rp-live); }
  .rp-option-missing .rp-found::before { background: var(--rp-low); }
  .rp-option-missing > .rp-radio { opacity: .45; }
  .rp-link { color: var(--rp-text); text-decoration: underline; text-underline-offset: 3px; }
  .rp-option-meta > code { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 12px/1.5 'Cascadia Mono', Consolas, monospace; color: var(--rp-dim); }
  .rp-window .rp-note { color: var(--rp-muted); font-size: 12px; line-height: 1.5; }
  .rp-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-width: 0; }
  .rp-help { display: inline-flex; align-items: center; gap: 5px; color: var(--rp-muted); font-size: 12px; }
  .rp-help > svg { flex: 0 0 auto; }
  .rp-caption { margin-top: 12px; color: #9aa3ae; font: 400 12px/1.7 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif; letter-spacing: 0; word-break: keep-all; }

  @container runtime-preview (max-width: 620px) {
    .rp-body { grid-template-columns: minmax(0, 1fr); }
    .rp-side { padding: 8px 10px 10px; border-right: 0; border-bottom: 1px solid var(--rp-border); }
    .rp-side-title { height: 32px; padding: 0 8px; }
    .rp-nav { flex-direction: row; flex-wrap: wrap; gap: 2px 4px; margin-top: 6px; }
    .rp-nav-item { min-height: 32px; padding: 6px 8px; }
    .rp-pane { padding: 18px 16px 20px; }
    .rp-pane-head { padding-right: 0; }
    .rp-flow { margin-top: 16px; }
  }

  @container runtime-preview (max-width: 420px) {
    .rp-pane { padding: 16px 12px; }
    .rp-status { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
    .rp-status > .rp-action { margin-left: auto; }
    .rp-card { padding: 12px; }
    .rp-choices { grid-template-columns: minmax(0, 1fr); }
    .rp-nav-item { font-size: 12px; gap: 6px; }
    .rp-caption { margin-top: 10px; }
  }
}
