/* ==========================================================================
   CPIMO components.css [foundation] — 서브 화면은 이 클래스만 조합한다(ARCHITECTURE §6).
   견본: /_dev/kit (개발 환경)
   목차: 본문 틀 · 화면 머리 · 버튼 · 폼 · 상태 배지 · 칩 · 탭·세그먼트 · 표 · 페이저 · 모달·시트
         빈 화면 · kv 요약 · 단계 · 막대 · 2단 레이아웃 · 경고·고지 상자 · 플래시 · 스켈레톤 · 진행 막대
         파일 올리기 · 금지 표현 표시 · 오류 화면 · 글 본문 · 보조 클래스
   ========================================================================== */

/* ---------- 본문 틀 ---------- */
.cp-main { padding-block: 24px 28px; }
.cp-bare { padding: 0; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.stack--sm { gap: 8px; }
.stack--lg { gap: 24px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.box { background: var(--panel); border: 1px solid var(--line-2); padding: 16px; }
.section-title { display: flex; align-items: center; gap: 7px; font-size: 18px; font-weight: 800; letter-spacing: -.035em; }
.section-title .i { color: var(--accent-ink); }

/* ---------- 화면 머리 ---------- */
.page-hd { display: grid; gap: 8px; margin-bottom: 18px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--ink-3); font-size: 12.5px; }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--line-2); }
.crumbs a:hover { color: var(--ink); }
.page-hd__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.page-hd__text { min-width: 0; }
.page-hd__title { font-size: 26px; font-weight: 800; line-height: 1.3; letter-spacing: -.04em; text-wrap: balance; }
.page-hd__desc { max-width: 60em; margin-top: 6px; color: var(--ink-2); font-size: 14.5px; text-wrap: pretty; }
.page-hd__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 버튼 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r); font-size: 14.5px; font-weight: 700; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .1s; }
.btn:active:not([disabled]):not([aria-disabled="true"]) { transform: translateY(1px); }
.btn .i { width: 16px; height: 16px; }
.btn--primary, .btn--navy { background: var(--btn); color: #fff; }
.btn--primary:hover:not([disabled]), .btn--navy:hover:not([disabled]) { background: var(--btn-hover); }
.btn--ghost, .btn--line { border-color: var(--line-2); background: var(--panel); color: var(--ink); }
.btn--ghost:hover:not([disabled]), .btn--line:hover:not([disabled]) { border-color: var(--ink-3); }
.btn--lime { background: var(--lime); color: var(--navy); }
.btn--lime:hover:not([disabled]) { background: var(--lime-hi); }
.btn--danger { border-color: var(--err-line); background: var(--panel); color: var(--err); }
.btn--danger:hover:not([disabled]) { background: var(--err-bg); }
.btn--text { height: auto; padding: 4px 2px; color: var(--accent-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.btn--sm { height: 32px; padding: 0 11px; font-size: 13.5px; }
.btn--sm .i { width: 14px; height: 14px; }
.btn--lg { height: 50px; padding: 0 22px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }
.btn--wide { min-width: 180px; }
.btn--icon { width: 40px; padding: 0; }
.btn--sm.btn--icon { width: 32px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn--line.is-busy::after, .btn--ghost.is-busy::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.linkish { color: var(--accent-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row--end { justify-content: flex-end; }

/* ---------- 폼 ---------- */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.field__label { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 14.5px; font-weight: 700; }
.field__req { padding: 1px 5px; border-radius: var(--r-sm); background: var(--navy); color: var(--lime); font-size: 11px; font-weight: 800; }
:root[data-theme="dark"] .field__req { background: var(--lime); color: var(--navy); }
.field__opt { color: var(--ink-3); font-size: 12px; font-weight: 600; }
.field__hint { color: var(--ink-3); font-size: 13px; line-height: 1.55; text-wrap: pretty; }
.field__error { display: flex; align-items: flex-start; gap: 5px; color: var(--err); font-size: 13px; font-weight: 600; line-height: 1.5; }
.field__error .i { width: 15px; height: 15px; margin-top: 2px; }
.field__counter { justify-self: end; color: var(--ink-3); font: 600 12px var(--font-en); }
.input, .textarea, .select {
  width: 100%; min-width: 0; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--field); color: var(--ink);
  font-size: 15px; line-height: 1.5; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input, .select { height: 44px; }
.textarea { min-height: 180px; padding: 11px 12px; resize: vertical; line-height: 1.7; }
.input::placeholder, .textarea::placeholder { color: #737a89; }
:root[data-theme="dark"] .input::placeholder, :root[data-theme="dark"] .textarea::placeholder { color: #8f98a8; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px #caf88780; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"], .is-error .input, .is-error .textarea { border-color: var(--err); }
.input:disabled, .textarea:disabled, .select:disabled { background: var(--panel-2); color: var(--ink-3); cursor: not-allowed; }
.input--lg { height: 52px; font-size: 16.5px; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23646b7b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-group { display: flex; min-width: 0; }
.input-group .input { flex: 1; border-radius: var(--r) 0 0 var(--r); }
.input-group > .btn { height: auto; min-height: 44px; border-radius: 0 var(--r) var(--r) 0; }
.check, .radio { display: inline-flex; align-items: flex-start; gap: 8px; min-height: 24px; font-size: 14.5px; line-height: 1.5; cursor: pointer; }
.check input, .radio input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--leaf); }
:root[data-theme="dark"] .check input, :root[data-theme="dark"] .radio input { accent-color: var(--lime); }
.check--box { padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); }
.check--box:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice { display: flex; flex-wrap: wrap; gap: 6px; }
.choice label { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); color: var(--ink-2); font-size: 14.5px; font-weight: 700; cursor: pointer; transition: border-color .15s, background .15s; }
.choice input:checked + span { border-color: var(--btn); background: var(--btn); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; }
.switch input { appearance: none; position: relative; flex: none; width: 40px; height: 24px; margin: 0; border-radius: 12px; background: var(--line-2); cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked { background: var(--leaf); }
.switch input:checked::after { transform: translateX(16px); }
.fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.fieldset > legend { margin-bottom: 8px; padding: 0; font-size: 14.5px; font-weight: 700; }

/* ---------- 상태 배지 8종 (경고색은 hidden·closed 만) ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 22px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--r-sm); font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; }
.badge .i { width: 13px; height: 13px; }
.badge--pending { background: var(--chip); color: var(--ink-2); }
.badge--supplement { border-color: var(--line-2); background: var(--panel); color: var(--ink); }
.badge--approved { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .badge--approved { background: #2b3a57; }
.badge--rejected { background: var(--chip); color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.badge--objection { border-color: #c9cfe6; background: #eef0f9; color: #2e3a6b; }
:root[data-theme="dark"] .badge--objection { border-color: #34406a; background: #1e2744; color: #cfd6ff; }
.badge--hidden { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.badge--restored { border-color: var(--line-2); background: var(--panel); color: var(--accent-ink); }
.badge--closed { border-color: var(--err-line); background: var(--err-bg); color: var(--err); }
.badge--muted { background: var(--chip); color: var(--ink-3); }
.badge--brand { background: var(--lime); color: var(--navy); }
.badge--line { border-color: var(--line-2); color: var(--ink-2); }

/* ---------- 칩(필터) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chips--scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"], .chip[aria-current="page"], .chip.is-on, label.chip:has(input:checked) { border-color: var(--btn); background: var(--btn); color: #fff; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip .i { width: 14px; height: 14px; }
.chip__x { display: grid; place-items: center; width: 18px; height: 18px; margin-right: -4px; border-radius: 50%; }
.chip__x:hover { background: #ffffff26; }
.chip--sm { height: 28px; padding: 0 9px; font-size: 13px; }

/* ---------- 탭(주소 이동) · 세그먼트(같은 화면) ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); }
.tabs--scroll { overflow-x: auto; scrollbar-width: none; }
.tabs--scroll::-webkit-scrollbar { display: none; }
.tabs__item { position: relative; display: inline-flex; align-items: center; gap: 5px; flex: none; height: 46px; padding: 0 14px; color: var(--ink-3); font-size: 15px; font-weight: 700; white-space: nowrap; transition: color .15s; }
.tabs__item:hover { color: var(--ink); }
.tabs__item[aria-current="page"], .tabs__item[aria-selected="true"] { color: var(--ink); }
.tabs__item[aria-current="page"]::after, .tabs__item[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--rule); }
:root[data-theme="dark"] .tabs__item[aria-current="page"]::after, :root[data-theme="dark"] .tabs__item[aria-selected="true"]::after { background: var(--lime); }
.tabs__count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--chip); color: var(--ink-2); font: 700 11px/18px var(--font-en); text-align: center; }
.seg { display: inline-flex; flex: none; justify-self: start; max-width: 100%; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel-2); }
.seg button, .seg a { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: var(--r-sm); color: var(--ink-3); font-size: 13px; font-weight: 700; white-space: nowrap; transition: background .15s, color .15s; }
.seg [aria-selected="true"], .seg [aria-pressed="true"], .seg [aria-current="page"] { background: var(--btn); color: #fff; }

/* ---------- 표 ---------- */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line-2); background: var(--panel); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; overflow-wrap: normal; word-break: keep-all; }
.table td { min-width: 4.5em; }
.table th { background: var(--panel-2); color: var(--ink-2); font-size: 13px; font-weight: 700; white-space: nowrap; }
.table tbody tr:hover { background: var(--hover); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num, .table td.num { text-align: right; font-family: var(--font-en); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table--compact th, .table--compact td { padding: 7px 10px; }
.table caption { padding: 10px 14px; caption-side: top; text-align: left; color: var(--ink-3); font-size: 12.5px; }

/* ---------- 페이저 ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; margin-top: 18px; }
.pager a, .pager span { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--r); color: var(--ink-2); font: 700 14px/1 var(--font-en); }
.pager a:hover { border-color: var(--line-2); background: var(--panel); color: var(--ink); }
.pager .is-current { border-color: var(--btn); background: var(--btn); color: #fff; }
.pager .pager__nav .i { width: 16px; height: 16px; }
.pager .is-off { color: var(--line-2); }
.pager__gap { min-width: 20px !important; color: var(--ink-3) !important; }
.pager-more { display: flex; justify-content: center; margin-top: 14px; }

/* ---------- 모달 · 시트 ---------- */
.modal { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 24px; border: 0; border-top: 3px solid var(--lime); border-radius: var(--r); background: var(--panel); color: var(--ink); box-shadow: 0 24px 64px rgba(11, 17, 29, .35); overflow-y: auto; }
.modal--wide { width: min(720px, calc(100vw - 32px)); }
.modal::backdrop, .sheet::backdrop { background: rgba(11, 17, 29, .55); }
.modal[open] { animation: pop .2s cubic-bezier(.16, 1, .3, 1); }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: .4; } to { transform: none; opacity: 1; } }
.modal__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 50%; background: var(--navy); color: var(--lime); }
.modal__icon .i { width: 22px; height: 22px; }
.modal__title, .modal h2 { font-size: 18px; font-weight: 800; line-height: 1.4; letter-spacing: -.035em; text-wrap: balance; }
.modal__body, .modal p { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; line-height: 1.65; text-wrap: pretty; }
.modal p b { color: var(--ink); }
.modal__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.modal__btns .btn { flex: 1 1 auto; }
.modal__x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r); color: var(--ink-3); }
.modal__x:hover { background: var(--hover); color: var(--ink); }
/* 시트: 모바일은 전체 화면, 데스크톱은 오른쪽 패널 */
.sheet { width: min(440px, 100vw); max-width: none; height: 100dvh; max-height: none; margin: 0 0 0 auto; padding: 0; border: 0; background: var(--panel); color: var(--ink); overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; animation: drawerIn .22s cubic-bezier(.16, 1, .3, 1); }
.sheet__hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none; min-height: 56px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); }
.sheet__title { font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.sheet__body { flex: 1; overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.sheet__ft { display: flex; gap: 8px; flex: none; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel-2); }
.sheet__ft .btn { flex: 1; }
@media (max-width: 768px) { .sheet { width: 100vw; } }

/* ---------- 빈 화면 ---------- */
.empty { display: grid; justify-items: center; gap: 8px; padding: 40px 20px; text-align: center; }
.empty--compact { padding: 22px 16px; }
.empty__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--chip); color: var(--ink-3); }
.empty__icon .i { width: 24px; height: 24px; }
/* 빈 화면 일러스트: 화면마다 크기·모서리가 달랐던 것을 한 규칙으로 */
.empty > img { width: 140px; height: 140px; margin-bottom: 4px; border-radius: 18px; object-fit: cover; }
.empty--compact > img { width: 104px; height: 104px; border-radius: 16px; }
.empty__title { font-size: 16px; font-weight: 800; letter-spacing: -.03em; }
.empty__body { max-width: 46ch; color: var(--ink-2); font-size: 14px; text-wrap: pretty; }
.empty .btn { margin-top: 6px; }

/* ---------- kv 요약 패널 ---------- */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0; font-size: 14px; }
.kv dt, .kv dd { padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv dt { padding-right: 16px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.kv dd { color: var(--ink); text-align: right; }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }
.kv--left dd { text-align: left; }
.kv--stack { grid-template-columns: minmax(0, 1fr); }
.kv--stack dt { padding-bottom: 0; border-bottom: 0; }
.kv--stack dd { padding-top: 2px; text-align: left; }

/* ---------- 단계 ---------- */
.steps { display: flex; gap: 0; counter-reset: step; }
.steps__item { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; flex: 1; min-width: 0; color: var(--ink-3); font-size: 12.5px; font-weight: 700; text-align: center; }
.steps__item::before { counter-increment: step; content: counter(step); position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--line-2); border-radius: 50%; background: var(--panel); font: 800 13px/1 var(--font-en); }
.steps__item + .steps__item::after { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--line-2); }
.steps__item.is-done, .steps__item.is-current { color: var(--ink); }
.steps__item.is-done::before { border-color: var(--leaf); background: var(--leaf); color: var(--leaf-ink); content: "✓"; }
.steps__item.is-current::before { border-color: var(--btn); background: var(--btn); color: #fff; }
.steps__item.is-done + .steps__item::after { background: var(--leaf); }
.steps__item small { display: block; color: var(--ink-3); font: 600 11.5px var(--font-en); }
.steps__item.is-warn::before { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.steps__item.is-stop::before { border-color: var(--err-line); background: var(--err-bg); color: var(--err); }
.steps--v { flex-direction: column; gap: 14px; }
.steps--v .steps__item { grid-template-columns: 28px minmax(0, 1fr); justify-items: start; align-items: center; text-align: left; }
.steps--v .steps__item + .steps__item::after { top: auto; bottom: calc(100% - 0px); left: 13px; right: auto; width: 2px; height: 14px; }

/* ---------- 막대(통계) ---------- */
.stat-bar { display: grid; gap: 12px; }
.stat-bar__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; align-items: baseline; }
.stat-bar__k { min-width: 0; overflow: hidden; font-size: 13.5px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.stat-bar__v { color: var(--ink-2); font: 700 13px/1 var(--font-en); white-space: nowrap; }
.stat-bar__v small { margin-left: 4px; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.stat-bar__track { grid-column: 1 / -1; height: 8px; border-radius: 2px; background: var(--line); overflow: hidden; }
.stat-bar__fill { display: block; width: var(--w, 0%); height: 100%; border-radius: 2px; background: var(--bar); transition: width .5s cubic-bezier(.16, 1, .3, 1); }
.meter { height: 6px; overflow: hidden; border-radius: 3px; background: var(--line); }
.meter i { display: block; width: var(--p, 0%); height: 100%; border-radius: 3px; background: var(--bar); }

/* ---------- 2단 레이아웃(본문 + 오른쪽 사이드) ---------- */
.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 24px; align-items: start; }
.layout-2col--wide-side { grid-template-columns: minmax(0, 1fr) 360px; }
.layout-2col > * { min-width: 0; }
.layout-2col__side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.layout-2col__side--sticky { position: sticky; top: calc(var(--hdr-h) + 16px); }
@media (max-width: 1180px) { .layout-2col { grid-template-columns: minmax(0, 1fr) 296px; gap: 20px; } }
@media (max-width: 1023px) {
  .layout-2col, .layout-2col--wide-side { grid-template-columns: minmax(0, 1fr); }
  .layout-2col__side--sticky { position: static; }
}

/* ---------- 경고 상자(금지 표현) · 고지 상자 ---------- */
.warn-box { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--err-line); border-left: 4px solid var(--err); border-radius: var(--r); background: var(--err-bg); color: var(--ink); font-size: 14px; line-height: 1.6; }
.warn-box > .i { margin-top: 2px; color: var(--err); }
.warn-box > div { display: grid; gap: 4px; min-width: 0; }
.warn-box__title { color: var(--err); font-weight: 800; text-wrap: pretty; }
.warn-box p { text-wrap: pretty; }
.warn-box__list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.warn-box__hit { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px; border: 1px solid var(--err-line); border-radius: var(--r-sm); background: var(--panel); color: var(--err); font-size: 13px; font-weight: 700; cursor: pointer; }
.warn-box__hit:hover { border-color: var(--err); }
.warn-box--caution { border-color: var(--warn-line); border-left-color: var(--warn); background: var(--warn-bg); }
.warn-box--caution > .i, .warn-box--caution .warn-box__title { color: var(--warn); }
.notice-box { display: flex; gap: 10px; padding: 13px 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--info-bg); color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.notice-box > .i { margin-top: 3px; color: var(--ink-3); }
.notice-box__body { display: grid; gap: 4px; min-width: 0; }
.notice-box__body ul, .notice-box__body ol { display: grid; gap: 4px; padding-left: 18px; }
.notice-box__body ul { list-style: disc; }
.notice-box__body ol { list-style: decimal; }
.notice-box__body p, .notice-box__body li { text-wrap: pretty; }
.notice-box__title { color: var(--ink); font-weight: 800; }
.notice-box__action { margin-top: 6px; }
.notice-box--brand { border-color: var(--leaf); background: var(--panel); box-shadow: inset 3px 0 0 var(--leaf); }
.notice-box--brand > .i { color: var(--accent-ink); }
.notice-box--plain { background: var(--panel); }

/* ---------- 플래시 ---------- */
.stack > .flash, .flash:last-child { margin-bottom: 0; }
.flash { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); font-size: 14px; line-height: 1.55; }
.flash .i { margin-top: 2px; }
.flash--ok { border-color: var(--leaf); box-shadow: inset 3px 0 0 var(--leaf); }
.flash--ok .i { color: var(--accent-ink); }
.flash--info .i { color: var(--ink-3); }
/* 화면 안내용 주의는 경고색(노랑)을 쓰지 않는다 — 경고색은 임시 비공개·게시 종료·금지 표현 전용 */
.flash--warn { border-color: var(--ink-3); box-shadow: inset 3px 0 0 var(--ink-3); }
.flash--warn .i { color: var(--ink-2); }
.flash--error { border-color: var(--err-line); background: var(--err-bg); }
.flash--error .i { color: var(--err); }

/* ---------- 스켈레톤 ---------- */
.skeleton { display: block; height: 14px; border-radius: 3px; background: linear-gradient(90deg, var(--chip) 25%, var(--hover) 37%, var(--chip) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skeleton--title { height: 20px; width: 60%; }
.skeleton--line { width: 100%; }
.skeleton--short { width: 40%; }
.skeleton--box { height: 120px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 파일 올리기 ---------- */
.dropzone { position: relative; display: grid; justify-items: center; gap: 6px; padding: 22px 16px; border: 2px dashed var(--line-2); border-radius: var(--r); background: var(--panel); color: var(--ink-2); font-size: 14px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--ink-3); background: var(--panel-2); }
.dropzone .i { width: 26px; height: 26px; color: var(--ink-3); }
/* 기본 파일 선택 단추도 사이트 단추 모양으로(안내 문구는 브라우저 언어를 따른다) */
input[type="file"] { font-size: 14px; color: var(--ink-2); }
input[type="file"]::file-selector-button { height: 32px; margin-right: 10px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--panel-2); color: var(--ink); font: 700 13.5px/1 var(--font); cursor: pointer; }
input[type="file"]::file-selector-button:hover { border-color: var(--ink-3); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone > span { text-wrap: balance; }
.dropzone__hint { color: var(--ink-3); font-size: 12.5px; }
.filelist { display: grid; gap: 6px; }
.filelist__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); font-size: 14px; }
.filelist__item .i { color: var(--ink-3); }
.filelist__name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.filelist__size { color: var(--ink-3); font: 600 12px var(--font-en); }

/* ---------- 금지 표현 표시(forbidden.js 의 덮개) ---------- */
.fx { position: relative; }
.fx__mirror { position: absolute; inset: 0; z-index: 0; overflow: hidden; margin: 0; border-color: transparent !important; color: transparent; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; pointer-events: none; }
.fx__mirror mark { border-radius: 2px; background: #f5b2a8; color: transparent; box-shadow: 0 0 0 1px #e0897c; }
:root[data-theme="dark"] .fx__mirror mark { background: #7a2e26; box-shadow: 0 0 0 1px #b4483c; }
.fx > .textarea, .fx > .input { position: relative; z-index: 1; background: transparent; }
.fx { border-radius: var(--r); background: var(--field); }
.fx.is-blocked > .textarea, .fx.is-blocked > .input { border-color: var(--err); }

/* ---------- 오류 화면 ---------- */
.errpage { display: grid; justify-items: center; gap: 10px; max-width: 640px; margin: 24px auto 40px; padding: 40px 24px 36px; border: 1px solid var(--line-2); border-top: 2px solid var(--rule); background: var(--panel); text-align: center; }
.errpage__code { color: var(--ink-3); font: 800 15px/1 var(--font-en); letter-spacing: .12em; }
.errpage__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: var(--lime); }
.errpage__icon .i { width: 26px; height: 26px; }
.errpage__title { margin-top: 4px; font-size: 22px; font-weight: 800; letter-spacing: -.04em; text-wrap: balance; }
.errpage__desc { max-width: 44ch; color: var(--ink-2); font-size: 15px; text-wrap: pretty; }
.errpage__spot { width: 148px; height: 148px; border-radius: 22px; object-fit: cover; }
.errpage__spot + .errpage__code { margin-top: 6px; }
.errpage__search { display: flex; gap: 8px; width: min(100%, 440px); margin-top: 10px; }
.errpage__search .input { flex: 1; min-width: 0; height: 46px; }
.errpage__search .btn { flex: none; height: 46px; }
.errpage__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.errpage__debug { width: 100%; margin-top: 16px; text-align: left; font-size: 12.5px; }
.errpage__debug summary { cursor: pointer; color: var(--ink-3); }
.errpage__debug pre { max-height: 320px; overflow: auto; margin-top: 8px; padding: 12px; background: var(--panel-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- 글 본문(회원·운영자 작성 HTML, sanitize_html 통과분) ---------- */
.prose { color: var(--ink); font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.prose > * + * { margin-top: .9em; }
.prose h2 { font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.prose h3 { font-size: 17.5px; font-weight: 800; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.prose ul { list-style: disc; padding-left: 1.4em; }
.prose ol { list-style: decimal; padding-left: 1.4em; }
.prose li + li { margin-top: .3em; }
.prose blockquote { padding: 4px 0 4px 14px; border-left: 3px solid var(--line-2); color: var(--ink-2); }
.prose img { height: auto; border-radius: var(--r-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th, .prose td { padding: 8px 10px; border: 1px solid var(--line-2); }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.prose--sm { font-size: 15px; line-height: 1.7; }

/* ---------- 업체 공식 답변 상자(S03 5번) ---------- */
.answer-box { border: 2px solid var(--leaf); border-radius: var(--r); background: var(--panel); }
.answer-box__hd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; background: var(--leaf); color: var(--leaf-ink); }
.answer-box__hd .vbadge { margin: 0; background: #1d4334; }
.answer-box__lead { font-size: 14px; font-weight: 700; }
.answer-box__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.answer-box__body { padding: 16px; }

/* ---------- 보조 ---------- */
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.num { font-family: var(--font-en); font-variant-numeric: tabular-nums; }
.text-pretty { text-wrap: pretty; }
.text-balance { text-wrap: balance; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.divider { height: 1px; margin: 16px 0; background: var(--line); }
.code-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--panel-2); font: 800 18px/1.2 var(--font-en); letter-spacing: .04em; white-space: nowrap; }

@media (max-width: 768px) {
  .cp-main { padding-block: 16px 20px; }
  .page-hd__title { font-size: 22px; }
  .table-wrap { border-right: 0; border-left: 0; }
  .seg button, .seg a { height: 36px; padding: 0 14px; }
  .chip { height: 38px; }
  .btn { min-height: 44px; }
  .btn--sm { min-height: 36px; }
  .modal { padding: 20px; }
  .layout-2col { gap: 12px; }
  .steps__item { font-size: 11.5px; }
}
@media (max-width: 480px) {
  .pager { gap: 2px; }
  .pager a, .pager span { min-width: 30px; height: 40px; padding: 0 4px; }
}

/* ---------- 터치 영역(손가락 화면): 보이는 크기는 그대로 두고 누르는 영역을 44px 가까이로 ---------- */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn--sm { min-height: 36px; }
  .btn--sm, .pbadge, .chip, .cm-act, .nick__name, .crumbs a, .ftr__nav a { position: relative; }
  .btn--sm::before { content: ""; position: absolute; inset: -4px 0; }
  .pbadge::before, .chip::before { content: ""; position: absolute; inset: -8px -3px; }
  .cm-act::before { content: ""; position: absolute; inset: -7px -2px; }
  a.nick__name::before { content: ""; position: absolute; inset: -10px -2px; }
  .crumbs a::before { content: ""; position: absolute; inset: -12px -4px; }
  .ftr__nav { gap: 2px 18px; }
  .ftr__nav a { padding-block: 11px; }
}
