/*
 * 화면 부품 — 값은 전부 tokens.css 의 변수로만 쓴다(생 색값 금지 · tests/run.php 가 검사).
 * 부품 목록과 실제 모양은 관리자 «디자인 시스템»(/design-system)이 이 파일로 그린다.
 */

/* ── 바탕 ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}
a { color: var(--color-accent); }
a:hover { color: var(--color-accent-strong); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; color: var(--color-text); }
p { margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--color-text-muted); }
.icon { width: 16px; height: 16px; flex: none; }
/* hidden 속성은 언제나 이긴다 — .banner-row·.stack-* 처럼 display 를 정한 클래스가 붙어도(2026-10-07 실측: 숨긴 배너·탭 칸이 보였다) */
[hidden] { display: none !important; }

/* ── 머리(관리자·평가자 공통 틀) ─────────────────────── */
.topbar { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.topbar-inner {
  max-width: var(--content-max); margin: 0 auto; padding: 0 var(--space-6);
  min-height: 60px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-7);
}
.topbar-inner.is-narrow { max-width: var(--form-max); padding: 0 var(--space-5); justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--color-text); text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--color-accent);
  display: inline-flex; align-items: center; justify-content: center; color: var(--color-text-inverse);
}
.nav { display: flex; flex-wrap: wrap; gap: var(--space-1); flex: 1 1 auto; }
.nav a, .nav-more > summary { white-space: nowrap; }   /* 머리 2줄 → 1줄(오너 지시 2026-10-20 — «개선 상담» 메뉴가 늘어) */
.nav a { padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--color-text-label); text-decoration: none; }
.nav a:hover { background: var(--color-surface-muted); color: var(--color-text); }
.nav a[aria-current="page"] { background: var(--color-accent-soft); color: var(--color-accent); font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: var(--space-3); color: var(--color-text-label); margin-left: auto; }
.topbar-user form { margin: 0; }
/* 회사 전환(024) — 지금 보는 회사가 늘 보이게. 바꾸면 모든 화면이 그 회사로 */
.company-switch { display: inline-flex; align-items: center; gap: 4px; color: var(--color-text-label); }
.company-switch .select { width: auto; max-width: 160px; font-weight: 600; }

/* ── 본문 틀 ────────────────────────────────────────── */
.page { max-width: var(--content-max); margin: 0 auto; padding: var(--space-7) var(--space-6) 64px; display: flex; flex-direction: column; gap: var(--space-7); }
.page.is-narrow { max-width: var(--form-max); padding: var(--space-7) var(--space-5) 64px; gap: var(--space-5); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3); }
.page-title { font-size: var(--text-3xl); font-weight: 700; }
.page-sub { margin-top: var(--space-1); color: var(--color-text-muted); }
.section { display: flex; flex-direction: column; gap: var(--space-4); }
.section-title { font-size: var(--text-xl); font-weight: 700; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); }
.grid-summary { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }   /* 현황판 요약 6장(입사 기간 추가 2026-10-14) — 1152 폭에서 한 줄(190 이면 6번째가 혼자 아랫줄) */
.tenure-rows { display: flex; flex-direction: column; gap: 2px; }
/* 평가자 찾기(028) — 고른 사람 칩 · 검색 결과 */
.evaluator-picker { display: flex; flex-direction: column; gap: 8px; }
.ev-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ev-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-quiet); }
.ev-results { list-style: none; margin: 4px 0 0; padding: 0; max-height: 220px; overflow-y: auto; }
.ev-result { width: 100%; text-align: left; padding: 6px 10px; border: 0; border-bottom: 1px solid var(--color-divider); background: none; font: inherit; cursor: pointer; }
.ev-result:hover, .ev-result:focus-visible { background: var(--color-surface-quiet); }
.tenure-rows .stat-value { font-size: 26px; line-height: 1.2; }
.tenure-label { font-size: 12px; color: var(--color-text-muted); }
.tenure-item > summary { cursor: pointer; list-style: none; }   /* 입사 기간 숫자를 누르면 명단(2026-10-26) */
.tenure-item > summary::-webkit-details-marker { display: none; }
.tenure-item:not([data-empty]) > summary .stat-value { text-decoration: underline dotted; text-underline-offset: 4px; }
.tenure-item[data-empty] > summary { cursor: default; }
.tenure-people { list-style: none; margin: 4px 0 6px; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }   /* 현황판 요약 5장 — 1152 폭에서 한 줄(220 이면 5번째가 혼자 아랫줄) */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); gap: var(--space-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

/* ── 카드 ───────────────────────────────────────────── */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 18px var(--space-5);
}
.card.is-accent { border-color: var(--color-border-accent); }
.card.is-quiet { background: var(--color-surface-quiet); border-color: var(--color-border-accent); }
.stat-label { color: var(--color-text-muted); font-weight: 500; }
.stat-value { font-size: var(--text-4xl); font-weight: 700; }
.stat-unit { color: var(--color-text-muted); }
.stat-sub { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ── 버튼 ───────────────────────────────────────────── */
.btn {
  font: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-text-body);
  cursor: pointer; text-decoration: none;
  white-space: nowrap;   /* 버튼 글자는 한 줄 — 좁은 칸에서 «처\n리»로 쪼개지지 않게(2026-10-07 오너 지적) */
}
.btn:hover { background: var(--color-surface-muted); }
.btn-primary { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-text-inverse); font-weight: 600; }
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.btn-outline-accent { border-color: var(--color-accent); color: var(--color-accent); font-weight: 600; }
.btn-danger { border-color: var(--color-fail); color: var(--color-fail); }
.btn-sm { min-height: 34px; padding: var(--space-1) var(--space-3); }
.btn-lg { min-height: var(--touch-min); padding: 10px 22px; }
.btn-block { width: 100%; }
/* 로그인·가입 화면의 주 버튼 줄 — 주 동작(채움)과 옆 이동(테두리)을 같은 크기로 나란히(오너 지시 2026-10-07) */
.auth-actions { display: flex; gap: var(--space-2); }
.auth-actions > .btn { flex: 1 1 0; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .55; cursor: not-allowed; }
.btn-icon { width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--color-text-muted); }

/* ── 상태 배지 — 색과 문구를 «함께» ──────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px 10px;
  border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
}
.badge-ok { background: var(--color-ok-soft); color: var(--color-ok); }
.badge-wait { background: var(--color-wait-soft); color: var(--color-wait); }
.badge-fail { background: var(--color-fail-soft); color: var(--color-fail); }
.badge-na { background: var(--color-na-soft); color: var(--color-na); font-weight: 500; }
.badge-accent { background: var(--color-accent-soft); color: var(--color-accent); }

/* ── 알림(배너) ─────────────────────────────────────── */
.banner { border-radius: var(--radius-md); padding: 10px 14px; font-size: var(--text-md); border: 1px solid transparent; }
.banner-info { background: var(--color-accent-soft); border-color: var(--color-accent-line); color: var(--color-accent-strong); }
.banner-warn { background: var(--color-wait-soft); border-color: var(--color-wait-line); color: var(--color-wait-strong); }
.banner-error { background: var(--color-fail-soft); border-color: var(--color-fail-line); color: var(--color-fail-strong); }
.banner-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

/* ── 폼 ─────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 600; color: var(--color-text); }
.field-help { color: var(--color-text-muted); font-size: var(--text-sm); }
.select-search { display: flex; align-items: center; gap: var(--space-2, 8px); margin-bottom: var(--space-2, 8px); }
.select-search .input { flex: 1; min-width: 0; }
.select-search .field-help { flex: none; }
.req { color: var(--color-fail); }
.input, .textarea, .select {
  font: inherit; width: 100%; padding: 10px var(--space-3); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); min-height: var(--touch-min);
}
.textarea { resize: vertical; min-height: 96px; }
.input.is-short { width: 140px; }
.is-invalid { border-color: var(--color-fail); background: var(--color-fail-bg); }
.field-error { color: var(--color-fail); font-size: var(--text-md); display: flex; align-items: center; gap: 6px; }
.check { display: flex; align-items: center; gap: var(--space-2); min-height: 32px; color: var(--color-text-body); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--color-accent); }
.check.is-disabled { color: var(--color-text-muted); cursor: not-allowed; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 48px; }
.pw-toggle { position: absolute; right: 2px; top: 2px; width: 40px; height: 40px; border: 0; background: transparent; color: var(--color-text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
/* 문항 묶음(fieldset) — 선택지(.choice)와 이름을 나눈다: 같은 이름이면 «체크된 선택지가 있는 칸» 규칙(:has)이 묶음 전체를 칠한다(2026-10-07 실측) */
fieldset.choice-set { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
fieldset.choice-set legend { font-weight: 600; padding: 0; margin-bottom: var(--space-1); }

/* 척도·등급 선택 — 네이티브 라디오를 감추지 않고 시각만 바꾼다(키보드 화살표 그대로) */
.choice-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); max-width: 520px; }
.choice-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.choice {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: var(--touch-min); min-width: 56px; padding: 0 var(--space-3); border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong); background: var(--color-surface); font-weight: 700; cursor: pointer;
}
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice small { font-size: var(--text-xs); font-weight: 400; color: var(--color-text-muted); }
.choice:not(fieldset):has(input:checked) { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-text-inverse); }
.choice:has(input:checked) small { color: var(--color-accent-soft); }
.choice:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* 진행 막대 */
.progress { height: 8px; border-radius: var(--radius-pill); background: var(--color-track); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--color-accent); }

/* ── 표 ─────────────────────────────────────────────── */
.table-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.table-card-title { padding: 14px var(--space-5); border-bottom: 1px solid var(--color-divider); font-weight: 600; }
.table-scroll { overflow-x: auto; position: relative; }   /* relative 필수 — 표 안 .sr-only(절대 위치)가 이 상자를 기준 삼아야 잘린다. 없으면 «동작» 같은 숨은 머리가 페이지를 넓혀 390 폭에서 가로로 밀렸다(2026-10-07 운영 실측 556px) */
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th { background: var(--color-surface-muted); color: var(--color-text-label); text-align: left; font-weight: 600; padding: 10px var(--space-3); white-space: nowrap; }
.table td { border-top: 1px solid var(--color-divider); padding: 10px var(--space-3); vertical-align: top; }
.table th:first-child, .table td:first-child { padding-left: var(--space-4); }
.table th:last-child, .table td:last-child { padding-right: var(--space-4); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.table th.num { text-align: right; }
/* 넓은 결과표는 첫 칸(대상자)을 붙여 둔다 — 휴대폰에서 오른쪽 점수로 밀어도 누구의 행인지 보이게(Codex B6) */
.table-wide th:first-child, .table-wide td:first-child { position: sticky; left: 0; z-index: 1; background: var(--color-surface); box-shadow: 1px 0 0 var(--color-divider); }
.table-wide th:first-child { background: var(--color-surface-muted); }   /* .table th 의 left 가 이겨 숫자 칸 머리만 왼쪽에 붙던 것 — 머리와 값이 같은 쪽에 */
.cell-sub { color: var(--color-text-muted); }
.missing { color: var(--color-text-muted); font-style: normal; }

/* ── 모달(골격 D-7b — 네이티브 dialog) ────────────────── */
dialog.dialog {
  width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 0;
  border-radius: var(--radius-xl); box-shadow: var(--shadow-modal); background: var(--color-surface); color: var(--color-text);
}
dialog.dialog::backdrop { background: var(--color-overlay); }
/* 모달이 열려 있는 동안 뒤 페이지는 스크롤되지 않는다 — 모달 안의 스크롤만(오너 2026-10-13 버그 지적).
   html 의 scrollbar-gutter: stable 이 스크롤바 자리를 지켜 열고 닫을 때 화면이 옆으로 밀리지 않는다.
   overscroll-behavior: contain = 모달 안 스크롤이 끝에 닿아도 바깥으로 이어지지 않는다(스크롤 체이닝). */
html:has(dialog.dialog[open]) { overflow: hidden; }
/* 모달 틀 = 머리(고정) · 내용(여기만 스크롤) · 버튼 줄(고정) — 오너 2026-10-13 «헤더·푸터 기본, 내용만 스크롤».
   전에는 dialog 전체가 스크롤돼 제목과 [저장]이 함께 밀려 사라졌다(운영 실측: dialog scrollHeight 1032 / 보이는 636).
   조각마다 모양이 둘이다 — (머리 + form(내용 + 버튼)) 또는 (머리 + 내용 + 버튼). 둘 다 flex 세로 + min-height 0 으로 내용 칸이 남은 높이를 갖는다.
   [open] 일 때만 flex — 닫힌 dialog 의 display:none 을 덮으면 안 된다. */
dialog.dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog.dialog [data-dialog-content] { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
/* 이 사이의 «감싸개»(form · div.is-wide-dialog 등)도 전부 세로 flex — 하나라도 빠지면 본문이 스크롤 없이 잘리고 바닥이 사라진다(발송 «입력 화면 미리보기» 2026-10-14). */
dialog.dialog [data-dialog-content] :has(.dialog-body) { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
dialog.dialog .dialog-head, dialog.dialog .dialog-foot { flex: none; }
dialog.dialog .dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
dialog.dialog .dialog-body > * { flex-shrink: 0; }   /* 내용 칸도 세로 flex 라, 높이가 모자라면 안의 칸들이 «눌려» 겹친다 — 줄이지 말고 스크롤 */
.dialog-head { padding: 18px 22px; border-bottom: 1px solid var(--color-divider); display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.dialog-title { font-size: var(--text-lg); font-weight: 700; }
/* 모달·상세를 열 때 제목으로 옮긴 포커스(읽기 시작점) — 테두리는 숨긴다. 키보드로 옮기는 칸이 아니다 */
h2[tabindex="-1"]:focus, .dialog-title[tabindex="-1"]:focus { outline: none; }
.dialog-body { padding: 18px 22px; display: flex; flex-direction: column; gap: var(--space-4); overflow-y: auto; }
.dialog-foot { padding: 14px 22px; border-top: 1px solid var(--color-divider); display: flex; justify-content: flex-end; gap: var(--space-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: var(--space-1) 6px var(--space-1) var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-pill); background: var(--color-surface-quiet); }

/* ── 토스트 ─────────────────────────────────────────── */
/* 오른쪽 «위» — 오른쪽 아래의 «개선 상담» 버튼·창과 겹치지 않게(2026-10-22 오너) */
.toast-stack { position: fixed; right: var(--space-6); top: 72px; display: flex; flex-direction: column; gap: var(--space-2); z-index: 50; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--color-toast); color: var(--color-text-inverse); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); box-shadow: var(--shadow-toast); }
.toast .icon { color: var(--color-toast-ok); }
.toast.is-error .icon { color: var(--color-fail-soft); }

/* ── 로그인 ─────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px var(--space-4); }
.auth-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: var(--space-5); }
.auth-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.auth-head .brand-mark { width: 44px; height: 44px; border-radius: var(--radius-lg); }
.auth-title { font-size: var(--text-2xl); font-weight: 700; }
.auth-card { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); }

/* ── 평가 대조(상급자) — 넓으면 나란히, 좁으면 탭 ─────── */
.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.compare-tabs { display: none; gap: 6px; background: var(--color-track); padding: var(--space-1); border-radius: var(--radius-md); }
.compare-tabs button { font: inherit; flex: 1; border: 0; background: transparent; border-radius: var(--radius-sm); min-height: 40px; color: var(--color-text-label); cursor: pointer; }
.compare-tabs button[aria-selected="true"] { background: var(--color-surface); color: var(--color-text); font-weight: 600; }
.answer-list { display: flex; flex-direction: column; gap: 14px; }
.answer-item { display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--color-divider); padding-bottom: var(--space-3); }
.answer-q { color: var(--color-text-muted); font-size: var(--text-sm); font-weight: 500; }
.answer-a { white-space: pre-line; }
.card-actions { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); }
.answer-block > summary { cursor: pointer; list-style: none; gap: var(--space-2); flex-wrap: wrap; }
.answer-block[open] > summary { margin-bottom: var(--space-3); }
.empty-box { border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); padding: var(--space-6); text-align: center; color: var(--color-text-label); }

@media (max-width: 820px) {
  .compare { grid-template-columns: minmax(0, 1fr); }
  .compare-tabs { display: flex; }
}
@media (max-width: 520px) {
  .page, .page.is-narrow { padding: var(--space-4) var(--space-4) 48px; }
  .topbar-inner { padding: 0 var(--space-4); }
  .choice-grid { gap: 6px; }
  .toast-stack { left: var(--space-4); right: var(--space-4); }
}

/* ── 운영 메뉴(접기) — JS 없이 details 로 ─────────────── */
.nav-more { position: relative; }
.nav-more > summary { list-style: none; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--color-text-label); cursor: pointer; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: ' ▾'; }
.nav-more > summary[aria-current="page"] { background: var(--color-accent-soft); color: var(--color-accent); font-weight: 600; }
.nav-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; min-width: 180px; display: flex; flex-direction: column;
  padding: var(--space-1); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-modal);
}
.nav-menu a { padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--color-text-body); text-decoration: none; }
.nav-menu a:hover { background: var(--color-surface-muted); }
.nav-menu a[aria-current="page"] { color: var(--color-accent); font-weight: 600; }
@media (max-width: 520px) { .nav-menu { position: static; box-shadow: none; } }

/* ── 디자인 시스템 화면 전용 견본 틀 ───────────────────── */
.ds-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); }
.ds-swatch { display: flex; flex-direction: column; gap: var(--space-1); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3); font-size: var(--text-sm); }
.ds-chip { height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--color-border); }
.ds-form { display: flex; flex-direction: column; gap: var(--space-4); max-width: 640px; }
.ds-dialog-preview { max-width: 560px; background: var(--color-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-modal); }
.ds-scales { display: flex; flex-direction: column; gap: var(--space-3); }
.ds-scale-row { display: grid; grid-template-columns: 120px auto 1fr; align-items: center; gap: var(--space-3); }
.ds-bar { display: block; height: 12px; background: var(--color-accent); border-radius: 2px; }
.ds-radius, .ds-shadow { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; min-height: 56px; padding: var(--space-2); background: var(--color-surface-muted); border: 1px solid var(--color-border); font-size: var(--text-xs); }
.ds-shadow { background: var(--color-surface); border: 0; border-radius: var(--radius-md); }
.ds-icon { display: inline-flex; align-items: center; gap: 6px; padding: var(--space-1) var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: var(--text-xs); }
code { font-family: var(--font-mono); font-size: .85em; letter-spacing: 0; background: var(--color-surface-muted); padding: 1px 5px; border-radius: 4px; }
.cell-time { white-space: nowrap; font-variant-numeric: tabular-nums; }   /* 표의 시각 칸 — 날짜·시각이 두 줄로 갈리지 않게 */
.col-setting { min-width: 300px; }   /* 설정 표 첫 칸 — 키 이름과 «임시값» 배지가 한 줄에 */
.cell-stack { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; }
/* 조직도 트리 들여쓰기(인라인 style 금지 — 깊이를 data 속성으로) */
.org-name { display: inline-flex; align-items: center; gap: 6px; }
.org-name[data-depth="1"] { padding-left: 20px; } .org-name[data-depth="2"] { padding-left: 40px; }
.org-name[data-depth="3"] { padding-left: 60px; } .org-name[data-depth="4"] { padding-left: 80px; }
.org-name[data-depth="5"], .org-name[data-depth="6"], .org-name[data-depth="7"] { padding-left: 100px; }
.org-branch { color: var(--color-text-muted); }
/* 사람 고르기(공용) — 부서별 묶음 + 검색 + 고른 수 */
.picker { display: flex; flex-direction: column; gap: var(--space-2); }
.picker-head { gap: var(--space-3); }
.picker-search { flex: 1 1 200px; min-width: 0; }
.picker-list { display: flex; flex-direction: column; gap: 2px; max-height: 380px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.picker [data-picker-count].is-over { color: var(--color-fail); font-weight: 600; }
.sup-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.peer-list { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }

/* ── RelScope(시스템 구성 도식) 토큰 다리 — 사이트 토큰을 그대로 쓴다(생 색값 없음) ── */
.relscope {
  --rm-bg: var(--color-bg); --rm-surface: var(--color-surface); --rm-surface-2: var(--color-surface-muted);
  --rm-border: var(--color-border); --rm-border-strong: var(--color-border-strong);
  --rm-text: var(--color-text); --rm-text-muted: var(--color-text-muted);
  --rm-accent: var(--color-accent); --rm-on-accent: var(--color-text-inverse);
  --rm-ok: var(--color-ok); --rm-ok-soft: var(--color-ok-soft);
  --rm-warn: var(--color-wait); --rm-warn-soft: var(--color-wait-soft);
  --rm-fail: var(--color-fail); --rm-fail-soft: var(--color-fail-soft);
  --rm-idle: var(--color-na); --rm-idle-soft: var(--color-na-soft);
  --rm-up: var(--color-ok); --rm-up-soft: var(--color-ok-soft);
  --rm-down: var(--color-fail); --rm-down-soft: var(--color-fail-soft);
  --rm-font: var(--font-sans);
  --rm-sp-1: var(--space-1); --rm-sp-2: var(--space-2); --rm-sp-3: var(--space-3); --rm-sp-4: var(--space-4);
  --rm-radius: var(--radius-md); --rm-radius-sm: var(--radius-sm);
}
.diagram-box { min-height: 420px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }

/* ── 배치 도우미 — 뷰에 인라인 style 을 쓰지 않는다(CSP default-src 'self' 가 막는다, 2026-10-07 브라우저 실측) ── */
.t-2xl { font-size: var(--text-2xl); } .t-lg { font-size: var(--text-lg); } .fw-500 { font-weight: 500; }
.card-name { font-size: 16px; font-weight: 600; }
.between { justify-content: space-between; } .end { justify-content: flex-end; } .top { align-items: flex-start; }
.self-start { align-self: flex-start; } .center { text-align: center; } .mb-6 { margin-bottom: 6px; }
.stack-8, .stack-12, .stack-14, .stack-18, .stack-20, .stack-28 { display: flex; flex-direction: column; }
.stack-8 { gap: var(--space-2); } .stack-12 { gap: var(--space-3); } .stack-14 { gap: 14px; } .stack-18 { gap: 18px; } .stack-20 { gap: var(--space-5); } .stack-28 { gap: var(--space-7); }
.wrap { white-space: normal; } .w-460 { max-width: 460px; } .w-420 { max-width: 420px; }
.w-100 { max-width: 100px; } .w-130 { max-width: 130px; } .w-160 { max-width: 160px; } .w-170 { max-width: 170px; } .w-180 { max-width: 180px; }
.w-200 { max-width: 200px; } .w-220 { max-width: 220px; } .w-260 { max-width: 260px; } .w-280 { max-width: 280px; } .w-160c { width: 160px; }
.pad-note { padding: var(--space-3) var(--space-4); } .indent { padding-left: var(--space-5); } .table-wide { min-width: 880px; }
.progress-box { min-width: 200px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.role-line { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; min-height: 32px; }
.head-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); }
.card-foot { border-top: 1px solid var(--color-divider); padding-top: var(--space-3); gap: 6px 18px; }
.banner-inset { margin: 22px; }

/* ── 조직도(트리 + 부서 상세) · 이름 머리글자 · 사람 고르기 트리 — 설계 = 디자인 캔버스 «조직도»·«배정 편집 — 조직도에서 고르기» ── */
.avatar { width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 12px; font-weight: 600; letter-spacing: -0.02em; }
.avatar-sm { width: 24px; height: 24px; font-size: 11px; }
.avatar-c0 { background: var(--color-avatar-0); color: var(--color-avatar-0-ink); }
.avatar-c1 { background: var(--color-avatar-1); color: var(--color-avatar-1-ink); }
.avatar-c2 { background: var(--color-avatar-2); color: var(--color-avatar-2-ink); }
.avatar-c3 { background: var(--color-avatar-3); color: var(--color-avatar-3-ink); }
.avatar-c4 { background: var(--color-avatar-4); color: var(--color-avatar-4-ink); }
.person-cell { display: inline-flex; align-items: center; gap: var(--space-2); }
.wrap-row { flex-wrap: wrap; gap: var(--space-2); }
.link-btn { font: inherit; border: 0; background: transparent; color: var(--color-accent); cursor: pointer; padding: 0; text-decoration: underline; }
.search-box { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--space-2); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); padding: 0 10px; min-height: 40px; color: var(--color-text-muted); background: var(--color-surface); }
.search-box:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.search-input { font: inherit; border: 0; outline: none; flex: 1 1 auto; min-width: 0; background: transparent; color: var(--color-text); }
.seg { display: flex; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); overflow: hidden; flex: 0 0 auto; }
.seg-btn { font: inherit; border: 0; background: var(--color-surface); color: var(--color-text-label); padding: 0 12px; min-height: 38px; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--color-border-strong); }
.seg-btn[aria-pressed="true"] { background: var(--color-accent-soft); color: var(--color-accent); font-weight: 600; }

.org-layout { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-start; }
.org-tree-card { flex: 1 1 340px; max-width: 440px; min-width: 0; padding: 0; }
.org-detail-card { flex: 999 1 480px; min-width: 0; padding: 0; }
/* 구성원 화면(참여자 + 조직도) — 오른쪽 칸 = 고른 조직 정보 + 사람 목록. 좁은 폭에서는 나무가 위로 올라가고 접힌다 */
.members-main { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.members-unit { padding: 0; }
.org-fold-btn { display: none; width: 100%; justify-content: flex-start; border-radius: 0; border: 0; border-bottom: 1px solid var(--color-divider); }
.org-scope { padding: 6px 6px 0; }
.org-scope-link { display: flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 10px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 600; }
.org-scope-link:hover { background: var(--color-surface-muted); text-decoration: none; color: inherit; }
.org-scope-link.is-selected { background: var(--color-accent-soft); color: var(--color-accent-strong); box-shadow: inset 0 0 0 1px var(--color-accent-line); }
.org-unassigned .org-scope-link { display: inline-flex; min-height: 32px; padding: 0 6px; }
@media (max-width: 860px) {
  .org-tree-card { flex-basis: 100%; max-width: none; }
  .org-fold-btn { display: flex; }
  .org-tree-card.is-folded [data-refresh-url] { display: none; }
  .org-tree-card.is-folded .org-fold-btn { border-bottom: 0; }
}
.org-tools { padding: 12px; border-bottom: 1px solid var(--color-divider); display: flex; flex-direction: column; gap: var(--space-2); }
.org-tools-row { gap: var(--space-2); }
.org-summary { margin: 0; font-size: 13px; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree { padding: 6px; max-height: 70vh; overflow-y: auto; }
.org-tree [role="treeitem"] { outline: none; }
.org-tree [role="treeitem"]:focus-visible > .org-row, .org-person:focus-visible { box-shadow: inset 0 0 0 2px var(--color-accent); border-radius: 8px; }
.org-row { display: flex; align-items: center; gap: 2px; min-height: 40px; border-radius: 8px; padding-right: 6px; }
.org-row:hover { background: var(--color-surface-muted); }
.org-row.is-selected { background: var(--color-accent-soft); color: var(--color-accent-strong); box-shadow: inset 0 0 0 1px var(--color-accent-line); }
.org-caret { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 6px; color: var(--color-text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.org-caret svg { transition: transform .15s; }
.org-node[aria-expanded="true"] > .org-row > .org-caret svg { transform: rotate(90deg); }
.org-caret.is-leaf { visibility: hidden; }
.org-unit-link { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--space-2); padding: 8px 4px; color: inherit; text-decoration: none; }
.org-unit-link:hover { text-decoration: none; color: inherit; }
.org-unit-link .org-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-count { color: var(--color-text-muted); font-size: 12px; white-space: nowrap; }
.org-flag { white-space: nowrap; }
.org-tree ul[role="group"] { padding-left: 20px; }
.org-person { display: flex; align-items: center; gap: var(--space-2); min-height: 40px; padding-left: 30px; border-radius: 8px; }
.org-person .org-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-tree mark, .org-list mark { background: var(--color-highlight); color: inherit; border-radius: 3px; padding: 0 1px; }
.org-empty { margin: 0; padding: 20px 12px; text-align: center; color: var(--color-text-label); }
.org-unassigned { margin: 6px 12px 12px; padding: 10px 12px; border-radius: 8px; background: var(--color-surface-muted); color: var(--color-text-label); display: flex; flex-direction: column; gap: 2px; }
.org-list { padding: 0 0 6px; }
.org-detail-head { padding: 18px 22px; border-bottom: 1px solid var(--color-divider); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.org-detail-title { min-width: 0; }
.org-crumb { font-size: 13px; }
.org-detail-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 22px; }
.org-delete-note { margin: 0; font-size: 13px; }
.org-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: var(--space-3); }
.org-fact { border: 1px solid var(--color-divider); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.fact-num { font-size: 18px; }
.org-warn { color: var(--color-wait); }
.org-block { display: flex; flex-direction: column; gap: var(--space-2); }
.org-block-title { margin: 0; font-size: 15px; font-weight: 700; }
.org-detail-empty { padding: 32px 22px; color: var(--color-text-label); }
.picker-search-box { flex: 1 1 220px; }
.picker-group { display: flex; flex-direction: column; gap: 0; }
.picker-group-head { display: flex; align-items: center; gap: 4px; min-height: 40px; }
.picker-unit { flex: 1 1 auto; font-weight: 600; min-width: 0; }
.picker-body { padding-left: 20px; display: flex; flex-direction: column; }
.picker-items { display: flex; flex-direction: column; }
.picker-item { display: flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 8px 0 10px; border-radius: 8px; }
.picker-item:hover { background: var(--color-surface-muted); }
.picker-item:has(input:checked) { background: var(--color-picked); }
.picker-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.picker-chips:empty { display: none; }
.picker-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border: 1px solid var(--color-border-strong); border-radius: 999px; background: var(--color-surface-quiet); }
.picker-chip .muted { font-size: 12px; }
.picker-chip-x { width: 28px; height: 28px; border: 0; background: transparent; color: var(--color-text-muted); border-radius: 999px; cursor: pointer; font-size: 16px; line-height: 1; }
.picker-chip-x:hover { background: var(--color-surface-muted); color: var(--color-text); }
.picker-warn { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--color-wait-soft); color: var(--color-wait-strong); }
.picker-nohit { margin: 8px 0; }
.picker [role="treeitem"] { outline: none; }
.picker-item:focus-visible, .picker-group:focus-visible > .picker-group-head { box-shadow: inset 0 0 0 2px var(--color-accent); border-radius: 8px; }

.picker-group[aria-expanded="true"] > .picker-group-head .org-caret svg { transform: rotate(90deg); }
.picker-group-head .org-caret svg { transition: transform .15s; }

/* 사람 카드(조직도에서 사람을 누르면) */
.avatar-lg { width: 44px; height: 44px; font-size: 15px; }
.org-person-btn, .person-link { font: inherit; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; text-align: left; display: inline-flex; align-items: center; gap: var(--space-2); min-height: 32px; border-radius: 6px; }
.org-person-btn { flex: 1 1 auto; min-width: 0; padding: 4px 6px 4px 0; }
.org-person-btn:hover .org-name, .person-link:hover { color: var(--color-accent); text-decoration: underline; }
.person-card-head { display: flex; align-items: center; gap: var(--space-3); }
.person-card { display: flex; flex-direction: column; gap: var(--space-4); }
.person-facts { margin: 0; display: grid; gap: 10px; }
.person-facts div { display: grid; grid-template-columns: 140px 1fr; gap: var(--space-2); }
.person-facts dt { color: var(--color-text-label); }
.person-facts dd { margin: 0; }
.person-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.person-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 480px) { .person-facts div { grid-template-columns: 1fr; gap: 2px; } }

/* 발송 — 메일 상태 줄 · 회차 칩 · 아래 고정 선택 바 */
.send-confirm-channels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
/* 보낼 방법 스위치 — 선택 바 바로 위 한 줄(오너 2026-10-14 «컴팩트하게 · 스위치»). 잠긴 스위치는 흐리게, 사유 글자는 늘 보인다. */
.send-switches { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0; padding: 10px 16px; border: 0; border-top: 1px solid var(--color-divider); font-size: 13px; }
.send-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.send-switch-note { color: var(--color-text-muted); min-width: 0; }
.send-switch-set { font-size: 12px; white-space: nowrap; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--color-text); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: var(--color-text-muted); transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--color-surface); box-shadow: var(--shadow-card); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--color-accent); }
.switch input:checked + .switch-track::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.switch input:disabled + .switch-track { opacity: .55; }
.switch:has(input:disabled) { cursor: default; }
/* 설정 화면의 켜기/끄기(ui-design §4 v0.4.3) — 같은 스위치에 상태 글자(켜짐/꺼짐)를 붙여 색만으로 구분하지 않는다. */
.switch.is-setting { min-height: 44px; font-weight: 400; color: var(--color-text-body); }
.switch-state { flex: none; min-width: 2.6em; font-weight: 600; color: var(--color-text-muted); }
.switch-state::before { content: '꺼짐'; }
.switch input:checked ~ .switch-state { color: var(--color-accent); }
.switch input:checked ~ .switch-state::before { content: '켜짐'; }
.switch.is-setting:has(input:disabled) { color: var(--color-text-muted); }
.send-switch.is-off .switch-label { color: var(--color-text-muted); }
/* 발송 확인 — 대상자마다 묶음 머리줄 · 연락처 끝 4자리 · 넓은 창에서 칸이 줄바꿈되지 않게(오너 2026-10-14) */
dialog.dialog:has(.is-mid-dialog) { width: min(920px, calc(100% - 32px)); }
.send-confirm-table th, .send-confirm-table td { white-space: nowrap; }
.send-group-head th { background: var(--color-surface-quiet); border-top: 2px solid var(--color-border); text-align: left; font-weight: 400; }
.send-group:first-of-type .send-group-head th { border-top: 0; }
.send-group-name { font-weight: 700; color: var(--color-text); margin-right: 6px; }
.contact-tail { font-variant-numeric: tabular-nums; color: var(--color-text-body); }
/* 발송 확인 — 줄마다 고르기 · 전체 편집 · 보내기 전 확인 패널(오너 2026-10-15 시안 승인) */
.banner-ok { background: var(--color-ok-soft); border-color: var(--color-ok); color: var(--color-ok); }
.send-confirm { position: relative; }
.send-confirm:not(.is-editing) .send-edit-only, .send-confirm.is-editing .send-view-only { display: none; }
.send-edit-start { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; background: var(--color-accent-soft); }
.send-edit-start:hover { background: var(--color-accent); color: var(--color-text-inverse); }
.send-pick { width: 40px; }
.send-cb { width: 18px; height: 18px; accent-color: var(--color-accent); cursor: pointer; }
.send-cb:disabled { cursor: not-allowed; }
.send-confirm-table .input { min-width: 210px; min-height: 34px; padding: 4px 10px; }
.send-confirm-table .input.is-changed { background: var(--color-wait-soft); border-color: var(--color-wait-line); }
.send-confirm-table .field-error { display: block; white-space: normal; max-width: 260px; }
.send-selected { margin-right: auto; align-self: center; color: var(--color-text-body); }
.send-confirm-panel { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--color-overlay); }
.send-confirm-panel[hidden] { display: none; }
.send-confirm-box { width: min(520px, 100%); background: var(--color-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-modal); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.send-panel-title { font-size: var(--text-lg); font-weight: 700; }
.send-panel-list { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.send-panel-list div { display: flex; gap: 10px; }
.send-panel-list dt { flex: none; width: 76px; color: var(--color-text-muted); }
.send-panel-list dd { margin: 0; }
.send-when { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.send-when legend { font-weight: 600; padding: 0; margin-bottom: 2px; }
.send-when-at { display: flex; flex-direction: column; gap: 4px; padding-left: 22px; }
.send-panel-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.status-dot { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 auto; }
.status-ok { background: var(--color-ok); }
.status-fail { background: var(--color-fail); }
.send-filters { align-items: center; }
.spacer { flex: 1 1 auto; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; border: 1px solid var(--color-border-strong); border-radius: 999px; background: var(--color-surface); color: var(--color-text-body); text-decoration: none; }
.chip:hover { text-decoration: none; background: var(--color-surface-muted); }
.chip.is-on { border-color: var(--color-accent); background: var(--color-accent-soft); color: var(--color-accent); font-weight: 600; }
.col-check { width: 44px; }
.table tr.is-picked { background: var(--color-picked); }
.send-bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: 12px 16px; background: var(--color-surface); border-top: 1px solid var(--color-border); }

/* 참여자 거르기 */
.people-filters { align-items: center; }
.people-search { flex: 1 1 240px; max-width: 360px; }
.field-inline { gap: var(--space-2); align-items: center; }
.people-chips { align-items: center; }
.chip-count { margin-left: 6px; color: var(--color-text-muted); font-weight: 400; }
.chip.is-on .chip-count { color: var(--color-accent); }

/* 평가 상세 — 머리(아바타) · 진행 단계(실제 기록 그대로) */
.crumb { margin: 0; }
.eval-title { display: flex; align-items: center; gap: var(--space-3); }
.eval-title .page-title .person-link { font-size: inherit; font-weight: inherit; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.steps li + li::before { content: "›"; color: var(--color-text-muted); margin-right: 4px; }
.fw-400 { font-weight: 400; }

/* 회차·문항 — 역할별 문항 카드 */
.q-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--space-3); }
.q-card { display: flex; flex-direction: column; gap: 10px; }
.q-note { margin: 0; font-size: 13px; }
.q-history summary { cursor: pointer; color: var(--color-text-label); }

/* 설정 — 묶음별 */
.settings-group { display: flex; flex-direction: column; }
.settings-group + .settings-group { border-top: 1px solid var(--color-divider); }
.settings-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 16px 16px 8px; }

/* 설정 항목 모달 — 이름·가중치·구간처럼 «줄마다 이름 + 입력»인 종류(2026-10-08 설정 확장) */
.setting-rows { display: flex; flex-direction: column; gap: 8px; }
.setting-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 1.4fr); align-items: center; gap: 10px; }
.setting-row-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.setting-row-name code { font-size: 12px; color: var(--color-text-muted); }
.input-suffix { display: inline-flex; align-items: center; gap: 6px; }
.placeholder-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.setting-preview { white-space: pre-wrap; font-size: 13px; color: var(--color-text-muted); max-width: 46ch; }
@media (max-width: 520px) { .setting-row { grid-template-columns: 1fr; } }
/* 동료별 점수(평가 상세 — 이름 없이 높은 순) */
.peer-scores { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip-score { font-size: 12px; font-variant-numeric: tabular-nums; padding: 1px 8px; border-radius: 999px; background: var(--color-divider); }

/* 이력(2026-10-08) — 평가 상세의 세로 타임라인 · 전체 이력 */
.timeline, .timeline-list { list-style: none; margin: 0; padding: 0; }
.timeline-day + .timeline-day { margin-top: 14px; }
.timeline-date { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
.timeline-list { border-left: 2px solid var(--color-divider); margin-left: 6px; }
.timeline-item { display: grid; grid-template-columns: 12px 48px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; width: 100%;
  padding: 7px 10px 7px 0; margin-left: -7px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.timeline-item:hover, .timeline-item:focus-visible { background: var(--color-accent-soft); }
.timeline-dot { width: 12px; height: 12px; border-radius: 999px; background: var(--color-divider); border: 2px solid var(--color-surface); align-self: center; }
.timeline-dot.tone-ok { background: var(--color-ok); }
.timeline-dot.tone-fail { background: var(--color-fail-strong); }
.timeline-dot.tone-wait { background: var(--color-wait-strong); }
.timeline-dot.tone-accent { background: var(--color-accent-strong); }
.timeline-time { font-variant-numeric: tabular-nums; color: var(--color-text-muted); font-size: 13px; }
.timeline-who { font-size: 13px; white-space: nowrap; }
.link-button { border: 0; background: none; padding: 0; font: inherit; color: var(--color-accent-strong); text-align: left; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.history-filters { margin-bottom: 12px; }
@media (max-width: 640px) { .timeline-item { grid-template-columns: 12px 44px minmax(0, 1fr); } .timeline-who { grid-column: 3; white-space: normal; } }
.work-review-text { margin: 0; white-space: normal; line-height: 1.7; }

/* 부서 카드 · 모달 안 이동(2026-10-08 UX) */
.dialog-back { margin-right: 8px; }
.org-card-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.org-card-tree, .org-card-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.org-card-tree li { padding-left: 14px; border-left: 2px solid var(--color-divider); }
.org-card-people { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.unit-link { border: 0; background: none; padding: 0; font: inherit; color: var(--color-text-muted); text-align: left; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.unit-link:hover { color: var(--color-accent-strong); }

/* 공용 거르기 막대(2026-10-08 UX) — 모든 거르기 화면이 같은 높이·한 줄. 라벨은 sr-only, select 는 고르면 바로 적용 */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.filter-bar > .input, .filter-bar > .select, .filter-bar > .btn, .filter-bar > .search-box, .filter-bar > .chip { min-height: 40px; height: 40px; box-sizing: border-box; margin: 0; }
.filter-bar > .select { width: auto; min-width: 150px; max-width: 260px; }
.filter-bar > .filter-search, .filter-bar > .search-box { width: 280px; max-width: 100%; }
.filter-bar .filter-label { color: var(--color-text-muted); }
.btn-ghost { background: none; border-color: transparent; color: var(--color-text-muted); }
.btn-ghost:hover { color: var(--color-text-body); }
.pad-note-sm { margin: 0; font-size: 13px; }
.cell-actions { white-space: nowrap; }
.progress-text { font-variant-numeric: tabular-nums; }
td .progress { margin-top: 6px; width: 96px; }

/* 상태 카드 = 거르기(평가·배정) */
.stat-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat-filter { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); color: inherit; text-decoration: none; border-top: 3px solid var(--color-divider); }
.stat-filter:hover { text-decoration: none; border-color: var(--color-border-strong); }
.stat-filter .stat-value { font-size: 26px; line-height: 1.2; }
.stat-filter.tone-wait { border-top-color: var(--color-wait-strong); }
.stat-filter.tone-accent { border-top-color: var(--color-accent); }
.stat-filter.tone-fail { border-top-color: var(--color-fail-strong); }
.stat-filter.tone-na { border-top-color: var(--color-text-muted); }
.stat-filter.is-on { outline: 2px solid var(--color-accent); outline-offset: -1px; background: var(--color-accent-soft); }

/* 표 → 휴대폰 카드(.table-stack) — 640px 밑에서 줄마다 카드, 칸 이름은 data-label */
@media (max-width: 640px) {
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 12px 14px; border-top: 1px solid var(--color-divider); }
  .table-stack td { padding: 4px 0; border: 0; text-align: left; }
  .table-stack td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--color-text-muted); }
  .table-stack td.num { text-align: left; }
  .table-stack .cell-actions { padding-top: 8px; }
}
/* 사람 칸 안의 부서 줄 — 이름 옆에 붙지 않게(발송 «김민재글로벌 마케팅», 2026-10-08) */
.person-cell .cell-sub { display: block; }
.filter-bar > a.chip { height: auto; }
.calc-version { margin-top: 4px; font-size: 13px; } .calc-version summary { cursor: pointer; color: var(--color-text-muted); } .calc-version code { word-break: break-all; }
/* 페이지 머리 — 설명이 길어도 주요 버튼이 제목 줄 오른쪽에 남게(넓은 화면). 휴대폰은 의도대로 쌓인다(2026-10-08) */
.page-head { flex-wrap: nowrap; align-items: flex-start; }
.page-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.page-head > .btn, .page-head > .row { flex: 0 0 auto; margin-top: 4px; }
@media (max-width: 640px) { .page-head { flex-wrap: wrap; } .page-head > .row { flex: 1 1 100%; min-width: 0; } }
.progress-mini { display: block; width: 96px; height: 6px; margin-top: 6px; border: 0; border-radius: 999px; background: var(--color-track); appearance: none; overflow: hidden; }
.progress-mini::-webkit-progress-bar { background: var(--color-track); border-radius: 999px; }
.progress-mini::-webkit-progress-value { background: var(--color-accent); border-radius: 999px; }
.progress-mini::-moz-progress-bar { background: var(--color-accent); border-radius: 999px; }
@media (max-width: 640px) { .table-stack td:first-child, .table-stack td:last-child { padding-left: 0; padding-right: 0; } }

/* 설정 — 왼쪽 묶음 탭 + 항목 카드(2026-10-08 오너 «탭으로 구분 · 줄바꿈으로 허접해 보임») */
.settings-layout { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 24px; align-items: start; }
/* 사이드 메뉴 — 묶음(아이콘·굵은 제목·구분선) 아래 하위 메뉴(왼쪽 세로줄 안쪽으로 들여 씀), 지금 메뉴는 세로줄이 색으로 바뀐다 */
.settings-nav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 12px; }
.settings-nav-title { padding: 0 4px 4px; }
.settings-nav-section { display: flex; flex-direction: column; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 10px 8px 8px; }
.settings-nav-group { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--color-text); padding: 2px 6px 8px; margin-bottom: 6px; border-bottom: 1px solid var(--color-divider); }
.settings-nav-group .icon { color: var(--color-accent); flex: none; }
.settings-nav-item { display: block; margin-left: 13px; padding: 7px 10px 7px 12px; border-left: 2px solid var(--color-divider); color: var(--color-text-body); font-size: 14px; text-decoration: none; white-space: nowrap; }
.settings-nav-item:hover { background: var(--color-surface-muted); color: var(--color-text); text-decoration: none; }
.settings-nav-item.is-on { border-left-color: var(--color-accent); background: var(--color-accent-soft); color: var(--color-accent-strong); font-weight: 600; border-radius: 0 8px 8px 0; }
.settings-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.settings-head .settings-crumb { font-size: 12px; }
.settings-title { margin: 2px 0 4px; font-size: 20px; font-weight: 700; }
.setting-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; }
.setting-card-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.setting-card-main > p { margin: 0; max-width: 78ch; font-size: 13px; line-height: 1.6; }
.setting-card-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; }
.setting-card-name strong { white-space: nowrap; }
.setting-card-actions { display: flex; gap: 8px; flex-wrap: nowrap; }
.setting-card-actions .btn { white-space: nowrap; }
.setting-card-time { font-size: 12px; color: var(--color-text-muted); }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--color-accent-soft); color: var(--color-accent-strong); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pill.is-off { background: var(--color-surface-muted); color: var(--color-text-muted); text-decoration: line-through; }
.pill-sub { opacity: .7; font-size: 12px; }
.pill.is-missing { background: var(--color-fail-soft); color: var(--color-fail); }
.pill.is-ok { background: var(--color-ok-soft); color: var(--color-ok); }
.pill.is-wait { background: var(--color-wait-soft); color: var(--color-wait); }
/* 설정 모달 — 칸 이름 옆의 저장 상태(저장됨 앞…끝 · 길이 / 미설정) */
.field-label-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.key-state { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.key-mask { font-size: var(--text-sm); color: var(--color-text-muted); overflow-wrap: anywhere; }
.status-dot.status-ok, .status-dot.status-fail { display: inline-block; width: 10px; height: 10px; border-radius: 999px; }
@media (max-width: 760px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; }
  .settings-nav-section { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px; }
  .settings-nav-group { border-bottom: 0; margin: 0; padding: 2px 8px 2px 4px; width: 100%; }
  .settings-nav-item { margin-left: 0; border-left: 0; border-radius: 8px; padding: 6px 10px; }
  .settings-nav-item.is-on { border-radius: 8px; }
  .setting-card { grid-template-columns: 1fr; }
}
/* 재집계 안내 패널 */
.explain-title { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.explain p, .explain ul { margin: 0; font-size: 13px; line-height: 1.65; }
.explain ul { padding-left: 18px; }
.explain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.explain-box { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 10px; font-size: 13px; }
.explain-box.is-change { border-color: var(--color-accent-line); background: var(--color-accent-soft); }
@media (max-width: 520px) { .explain-grid { grid-template-columns: 1fr; } }
/* 직급 관리 줄 */
.rank-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto 48px auto; align-items: center; gap: 8px; }
.rank-row.is-new { opacity: .85; }
.rank-order { color: var(--color-text-muted); font-variant-numeric: tabular-nums; text-align: center; }
.rank-move { display: inline-flex; gap: 4px; }
.rank-people { font-size: 12px; text-align: right; }
.rank-row .field-error { grid-column: 2 / -1; }

/* 부서 카드(시안 «부서 카드 · 사람 카드 모달») */
.org-card-head { align-items: flex-start; background: linear-gradient(180deg, var(--color-accent-soft) 0%, var(--color-surface) 100%); }
.org-card-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.org-card-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; color: var(--color-text-muted); }
.org-card-path .link-button { font-size: 12px; color: var(--color-text-muted); }
.org-card-heading .dialog-title { font-size: 22px; }
.org-card-summary { margin: 4px 0 0; font-size: 13px; color: var(--color-text-muted); }
.org-card-summary strong { color: var(--color-text); }
.org-section-title { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--color-text-muted); letter-spacing: .02em; }
.org-section-title .muted { font-weight: 400; }
.org-section-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.org-section-row .org-section-title { margin: 0; }
.input-sm { min-height: 32px; height: 32px; padding: 4px 10px; width: 160px; font-size: 13px; }
.org-leader { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.org-leader:hover, .org-leader:focus-visible { border-color: var(--color-accent-line); background: var(--color-accent-soft); }
.org-leader.is-empty { justify-content: space-between; cursor: default; background: var(--color-surface-quiet); }
.org-leader-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 13px; }
.org-leader-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rank-badge { font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 999px; background: var(--color-accent-soft); color: var(--color-accent-strong); white-space: nowrap; }
.rank-badge.is-empty { background: var(--color-surface-muted); color: var(--color-text-muted); }
.org-chev { color: var(--color-text-muted); }
.org-members { border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; margin-top: 8px; }
.org-rank-title { margin: 0; padding: 6px 14px; font-size: 12px; font-weight: 600; background: var(--color-surface-muted); color: var(--color-text-body); border-top: 1px solid var(--color-divider); }
.org-rank-group:first-child .org-rank-title { border-top: 0; }
.org-rank-group ul { list-style: none; margin: 0; padding: 0; }
.org-member { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; border: 0; border-top: 1px solid var(--color-divider); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.org-rank-group li:first-child .org-member { border-top: 0; }
.org-member:hover, .org-member:focus-visible { background: var(--color-accent-soft); }
.org-member-name { font-weight: 500; }
.org-member-meta { display: flex; gap: 6px; align-items: center; justify-content: flex-end; font-size: 12px; flex-wrap: wrap; }
.org-children { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.org-child { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.org-child:hover, .org-child:focus-visible { border-color: var(--color-accent-line); background: var(--color-accent-soft); }
.org-child .muted { font-size: 12px; }
.stack-18 { display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 560px) { .org-member { grid-template-columns: auto minmax(0, 1fr) auto; } .org-member-meta { grid-column: 2 / 3; justify-content: flex-start; } }
/* 휴대폰: 이름 칸이 한 줄을 다 쓰고, 사용·인원·옮기기는 그 아래 «한 줄»에 */
@media (max-width: 480px) { .rank-row { grid-template-columns: 24px auto 1fr auto; row-gap: 6px; } .rank-row > .input { grid-column: 2 / -1; } .rank-active { grid-column: 2; } .rank-people { grid-column: 3; text-align: left; } .rank-move { grid-column: 4; } .rank-rows { gap: 14px; } }
/* 카카오톡 받기(2026-10-08) — 카카오 로그인 버튼 색(카카오 디자인 가이드: 노랑 바탕 · 검정 글자) */
.btn-kakao { border-color: var(--color-kakao); background: var(--color-kakao); color: var(--color-kakao-text); font-weight: 600; }
.btn-kakao:hover { background: var(--color-kakao-hover); border-color: var(--color-kakao-hover); }
.badge-kakao { background: var(--color-kakao-soft); color: var(--color-kakao-soft-text); }
.kakao-steps, .kakao-guide { margin: 0; padding-left: 20px; }
.kakao-steps li, .kakao-guide li { line-height: 1.6; }
.kakao-guide code { word-break: break-all; }
.inline-form { display: inline-flex; margin-left: 6px; vertical-align: middle; }
.kakao-offer { margin-top: 12px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
/* 스크롤바 자리를 늘 비워 둔다 — 내용이 긴 화면(스크롤바 생김)과 짧은 화면에서 틀 폭·위치가 바뀌지 않게(Windows 의 고정 스크롤바, 2026-10-08 오너 지적) */
html { scrollbar-gutter: stable; }
/* 작동 방식 — 업무 순서 카드(번호 원 + 설명 + 그 메뉴로) */
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); }
.guide-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; }
.guide-step-no { width: 28px; height: 28px; border-radius: 50%; background: var(--color-accent-soft); color: var(--color-accent-strong); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tpl-button { margin: 0; }
/* 입력 화면 미리보기(발송) — 넓은 모달 · 역할·버전 탭 · PC/휴대폰 폭 */
dialog.dialog:has(.is-wide-dialog) { width: min(1100px, calc(100% - 32px)); }
/* 일괄 등록 미리보기 — 표 안에서 고치는 칸(좁게) · 표만 스크롤(머리 고정) */
.import-grid { max-height: min(56vh, 560px); overflow: auto; }
.import-grid thead th { position: sticky; top: 0; background: var(--color-surface); z-index: 1; }
.import-grid .input { min-width: 90px; min-height: 34px; padding: 4px 8px; font-size: 14px; }
.import-grid .input[data-col="email"], .import-grid .input[data-col="org"] { min-width: 190px; }
.import-grid td { vertical-align: top; }
.preview-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.preview-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: var(--color-text-body); cursor: pointer; font: inherit; }
.preview-tab.is-on { border-color: var(--color-accent); background: var(--color-accent-soft); color: var(--color-accent-strong); }
.preview-bar { align-items: center; }
.preview-frame { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4); background: var(--color-bg); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); }
.preview-frame.is-phone { max-width: 390px; margin: 0 auto; width: 100%; }
.preview-frame.is-phone .compare { grid-template-columns: 1fr; }
.preview-flag { margin: 0; font-size: 13px; color: var(--color-wait-strong); }

/* 설정 카드 «단계표»(setup-steps) — 지금 상태 + 다음 할 일, 단계마다 한 줄: 아이콘 · 이름·값 · 버튼 (오너 2026-10-13) */
.setup-card { display: block; padding: 0; overflow: hidden; }
.setup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: 16px 18px; border-bottom: 1px solid var(--color-border); }
.setup-head-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.setup-next { margin: 0; font-size: 13px; color: var(--color-text-body); }
.setup-next .muted { font-weight: 600; margin-right: 4px; }
.status-dot.status-wait { display: inline-block; width: 10px; height: 10px; border-radius: 999px; background: var(--color-wait); }
.setup-steps { list-style: none; margin: 0; padding: 0; }
.setup-step { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--color-divider); }
.setup-step:last-child { border-bottom: 0; }
.setup-step-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px; background: var(--color-surface-muted); color: var(--color-text-muted); }
.setup-step.is-done .setup-step-icon { background: var(--color-ok-soft); color: var(--color-ok); }
.setup-step.is-wait .setup-step-icon { background: var(--color-wait-soft); color: var(--color-wait); }
.setup-step.is-fail .setup-step-icon { background: var(--color-fail-soft); color: var(--color-fail); }
.setup-step-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.setup-step-name { font-weight: 600; color: var(--color-text); display: flex; align-items: center; gap: 8px; }
.setup-step-no { font-size: 12px; font-weight: 600; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.setup-step-body { font-size: 13px; }
.setup-step-body p { margin: 0; }
.setup-step-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.setup-step-actions .btn { white-space: nowrap; gap: 4px; }
.setup-foot { display: flex; flex-direction: column; gap: 6px; padding: 12px 18px; background: var(--color-surface-quiet); border-top: 1px solid var(--color-border); font-size: 13px; color: var(--color-text-body); }
.setup-foot details summary { cursor: pointer; color: var(--color-text-muted); }
.setup-foot details p { margin: 6px 0 0; }
@media (max-width: 640px) {
  .setup-step { grid-template-columns: 28px minmax(0, 1fr); }
  .setup-step-actions { grid-column: 2; justify-content: flex-start; }
}

/* 미리보기 — 알림톡 말풍선(카톡 대화방 흉내)·메일 한 통 (오너 2026-10-13 «설정된 내용이 실제 어떻게 보이는지 검수») */
.preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-6); }
.preview-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.preview-col h3, .preview-col p { margin: 0; }
.small { font-size: 12px; }
.plain-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.phone-frame { background: var(--color-kakao-chat); border-radius: 16px; padding: 16px 14px 20px; max-width: 360px; }
.phone-frame.is-compact { max-width: 340px; margin-top: 8px; }
.kt-chat { display: flex; flex-direction: column; gap: 6px; }
.kt-sender { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-text); }
.kt-avatar { width: 34px; height: 34px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--color-kakao); color: var(--color-kakao-text); font-weight: 700; }
.kt-bubble { margin-left: 42px; background: var(--color-surface); border-radius: 4px 14px 14px 14px; overflow: hidden; box-shadow: var(--shadow-card); max-width: 280px; }
.kt-head { background: var(--color-kakao); color: var(--color-kakao-text); font-weight: 700; font-size: 13px; padding: 10px 14px; }
.kt-body { padding: 12px 14px; font-size: 14px; line-height: 1.6; color: var(--color-text); overflow-wrap: anywhere; }
.kt-btn { margin: 0 12px 12px; padding: 9px; text-align: center; border-radius: 6px; background: var(--color-surface-muted); color: var(--color-text); font-size: 13px; }
.mail-frame { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; }
.mail-head { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; padding: 14px 18px; background: var(--color-surface-quiet); border-bottom: 1px solid var(--color-border); font-size: 13px; }
.mail-head dt { color: var(--color-text-muted); }
.mail-head dd { margin: 0; overflow-wrap: anywhere; }
.mail-body { padding: 18px; font-size: 14px; line-height: 1.7; color: var(--color-text); overflow-wrap: anywhere; }
.mail-link { color: var(--color-accent-strong); text-decoration: underline; }
fieldset.field { border: 0; margin: 0; padding: 0; }
/* 메일 설정 — «구글로 빠르게»·SMTP 설명 */
.mail-quick { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-quiet); }
.mail-quick-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.mail-quick-head h3 { margin: 0; }
.mail-quick-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-quick p { margin: 0; font-size: 13px; }
.mail-howto summary { cursor: pointer; color: var(--color-text-muted); font-size: 13px; }


/* ── 목록 쪽·정렬(ListQuery · partial/pager · partial/sort-th, 2026-10-14) ── */
.sort-link { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link:hover { color: var(--color-accent); text-decoration: none; }
.sort-link.is-on { color: var(--color-accent); }
.sort-mark { font-size: 10px; color: var(--color-text-muted); }
.sort-link.is-on .sort-mark { color: var(--color-accent); }
th.num .sort-link { justify-content: flex-end; }
.pager-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 12px var(--space-4); border-top: 1px solid var(--color-divider); }
.pager-sum { margin: 0; color: var(--color-text-muted); font-size: 13px; }
.pager-sum strong { color: var(--color-text-body); }
.pager { display: flex; align-items: center; gap: 4px; }
.pager-nums { display: inline-flex; align-items: center; gap: 4px; }
.pager-btn, .pager-num { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; padding: 0 10px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text-body); text-decoration: none; font-size: 13px; }
.pager-btn:hover, .pager-num:hover { background: var(--color-surface-muted); text-decoration: none; }
.pager-num.is-on { border-color: var(--color-accent); background: var(--color-accent-soft); color: var(--color-accent); font-weight: 600; }
.pager-btn.is-off { color: var(--color-text-muted); background: transparent; cursor: default; }
.pager-gap { padding: 0 4px; color: var(--color-text-muted); }
.pager-where { display: none; font-size: 13px; color: var(--color-text-muted); padding: 0 6px; }
.pager-opts { display: flex; gap: var(--space-2); align-items: center; }
.pager-sort { display: none; }
.pager-sort.is-always { display: inline-block; }
.select-sm { min-height: 36px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
/* 순번 — 쪽·묶음을 넘겨도 이어지는 자리(오너 지시 2026-10-14). 휴대폰 카드에서는 «순번 3» 한 줄로 */
.col-seq { width: 1%; white-space: nowrap; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .table-stack td.col-seq { font-size: 12px; } .table-stack td.col-seq::before { display: inline; margin-right: 6px; } }
/* 휴대폰: 번호 창 대신 «이전 · 3 / 12쪽 · 다음», 표 머리가 숨으니 정렬은 고르기로 */
@media (max-width: 640px) {
  .pager-nums { display: none; }
  .pager-where { display: inline; }
  .pager-sort { display: inline-block; }
  .pager-bar { justify-content: center; }
}
/* 알림톡 반려 사유 — 카카오가 보낸 줄바꿈 그대로 */
.pre-line { white-space: pre-line; }
.tpl-reason { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: var(--color-surface-muted); font-size: 13px; }
.tpl-reason p { margin: 4px 0 0; }

/* 개선 상담(/consult) — 왼쪽 대화 목록 · 가운데 대화 · 오른쪽 내 요청(좁은 화면은 한 줄로 쌓인다) */
.consult-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 240px; gap: 20px; align-items: start; }
.consult-list, .consult-side { display: flex; flex-direction: column; gap: 10px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 12px; }
.consult-threads { display: flex; flex-direction: column; gap: 2px; }
.consult-thread-link { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--color-text-body); text-decoration: none; }
.consult-thread-link:hover { background: var(--color-surface-muted); }
.consult-thread-link.is-on { background: var(--color-accent-soft); color: var(--color-accent-strong); }
.consult-thread-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.consult-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.consult-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.consult-head .section-title { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.consult-messages { display: flex; flex-direction: column; gap: 10px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 14px; max-height: 60vh; overflow-y: auto; }
.consult-messages.is-readonly { max-height: none; }
.consult-msg { max-width: 85%; display: flex; flex-direction: column; gap: 4px; }
.consult-msg.is-user { align-self: flex-end; }
.consult-msg.is-ai { align-self: flex-start; flex-direction: row; align-items: flex-start; gap: 8px; }
.consult-msg-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.consult-msg-avatar { width: 28px; height: 28px; border-radius: 9px; background: var(--color-accent); color: var(--color-text-inverse); display: grid; place-items: center; flex: none; }
.consult-msg-name { font-size: 11.5px; }
.consult-msg-meta { font-size: 11px; }
.consult-msg-body { padding: 10px 12px; border-radius: var(--radius-md); line-height: 1.6; font-size: 14px; overflow-wrap: anywhere; }
.consult-msg.is-user .consult-msg-body { background: var(--color-accent-soft); color: var(--color-text); }
.consult-msg.is-ai .consult-msg-body { background: var(--color-surface-muted); color: var(--color-text-body); }
.consult-msg.is-user .consult-msg-meta { text-align: right; }
.consult-msg-note { padding: 0 4px; }
.consult-msg-note.is-fail, .is-fail { color: var(--color-fail); }
.consult-form { display: flex; flex-direction: column; gap: 8px; }
.consult-form-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.consult-form-bar .btn { margin-left: auto; }
.consult-requests li { display: flex; flex-direction: column; gap: 3px; padding: 8px 0; border-bottom: 1px solid var(--color-divider); }
.consult-requests li .badge { align-self: flex-start; }
.consult-empty { margin: 0; }
@media (max-width: 960px) { .consult-layout { grid-template-columns: minmax(0, 1fr); } .consult-msg { max-width: 100%; } }

/* 설정 › AI 구독 로그인 모달(mint Claude 모달 모양) — 번호 단계 3개 + 남은 시간 */
.ai-steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ai-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.ai-step-n { width: 26px; height: 26px; border-radius: var(--radius-pill); background: var(--color-accent-soft); color: var(--color-accent-strong); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.ai-step-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ai-step-body p { margin: 0; }
.ai-timer { margin: 8px 0 0; font-size: 13px; color: var(--color-text-muted); }

/* 떠 있는 개선 상담 — 오른쪽 아래 채팅 단추 + 비모달 패널(데스크톱 380×560 카드 · 폭 640 이하 전체 화면 시트) */
.consult-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 52px; height: 52px; border-radius: var(--radius-pill); border: 0; background: var(--color-accent); color: var(--color-text-inverse); box-shadow: var(--shadow-modal); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.consult-fab:hover { background: var(--color-accent-strong); }
.consult-fab:focus-visible { outline: 3px solid var(--color-accent-line); outline-offset: 2px; }
.consult-fab-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; justify-content: center; box-shadow: 0 0 0 2px var(--color-surface); }   /* 057 새 답변 수 */
.consult-panel { position: fixed; right: 20px; bottom: 84px; z-index: 41; width: 380px; height: 560px; max-height: calc(100vh - 104px); display: flex; flex-direction: column; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; box-shadow: var(--shadow-modal); overflow: hidden; }
.consult-panel[hidden] { display: none; }
.consult-panel-head { display: flex; align-items: center; gap: 8px; padding: 12px 8px 12px 16px; border-bottom: 1px solid var(--color-divider); }
.cw-headicon { width: 36px; height: 36px; border-radius: var(--radius-lg); background: var(--color-accent); color: var(--color-text-inverse); display: grid; place-items: center; flex: none; }
.cw-headtext { flex: 1; min-width: 0; }
.consult-panel-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-status { margin: 2px 0 0; font-size: 12px; color: var(--color-text-muted); display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; }
/* 상태는 한 줄 — 머리줄에 버튼이 늘어도 세 줄로 꺾여 머리줄이 출렁이지 않게 말줄임(2026-10-21 브라우저 검증) */
.cw-status [data-consult-statustext] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cw-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-ok); flex: none; }
.cw-status.is-typing { color: var(--color-accent); font-weight: 500; }
.cw-status.is-typing .cw-status-dot { background: var(--color-accent); }
.cw-headbtn { width: 36px; height: 36px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--color-text-muted); display: grid; place-items: center; cursor: pointer; flex: none; text-decoration: none; }
.cw-headbtn:hover { background: var(--color-surface-muted); color: var(--color-text); }
.consult-panel-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.consult-widget { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* 대화 영역 — 안내·배너·대화·답변 중 표시가 «함께» 스크롤된다(고정 안내 영역 없음) */
.consult-widget .consult-widget-messages { flex: 1; min-height: 0; max-height: none; border: 0; border-radius: 0; background: var(--color-surface-muted); padding: 16px; gap: 14px; }
.consult-widget .banner { margin: 0; flex: none; }
.cw-note { flex: none; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 12px 14px; display: flex; gap: 10px; font-size: 12.5px; line-height: 19px; color: var(--color-text-body); }
.cw-note-icon { flex: none; margin-top: 1px; color: var(--color-wait-strong); }
.cw-note p + p { margin-top: 4px; }
.cw-note-title { font-weight: 700; color: var(--color-text); }
.consult-widget .consult-empty { font-size: 12.5px; }
.consult-widget .consult-msg { max-width: 78%; gap: 4px; position: relative; }
.consult-widget .consult-msg.is-user { align-self: flex-end; max-width: 78%; }
.consult-widget .consult-msg.is-ai { max-width: 90%; }
.consult-widget .consult-msg-meta { font-size: 11px; }
.consult-widget .consult-msg-body { padding: 10px 12px; font-size: 13.5px; line-height: 21px; }
.consult-widget .consult-msg.is-user .consult-msg-body { background: var(--color-accent); color: var(--color-text-inverse); border-radius: 14px 4px 14px 14px; }
.consult-widget .consult-msg.is-ai .consult-msg-body { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-radius: 4px 14px 14px 14px; }
.consult-widget .consult-msg-note:not(.is-fail) { display: none; }   /* «답을 쓰는 중…» 글줄은 아래 점 3개 표시로 대체 */
/* 답변 중 표시 — 기존 판정(STARTED) 또는 보내는 동안(JS 가 .is-typing). 점은 reduced-motion 이면 멈춘다 */
.cw-typing { display: none; gap: 8px; align-items: flex-end; flex: none; }
.cw.is-typing .cw-typing { display: flex; }
.cw-avatar { width: 28px; height: 28px; border-radius: 9px; background: var(--color-accent); color: var(--color-text-inverse); font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; }
.cw-typing-bubble { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 4px 14px 14px 14px; padding: 12px 14px; display: flex; gap: 4px; align-items: center; width: fit-content; }
.cw-typing-note { display: block; font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }
@keyframes cwdot { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }
.cw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-text-muted); display: inline-block; animation: cwdot 1.2s infinite ease-in-out; }
.cw-dot:nth-child(2) { animation-delay: .15s; }
.cw-dot:nth-child(3) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .cw-dot { animation: none; opacity: .6; } }
.cw-closed { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--color-text-muted); flex: none; }
.cw-closed > span:nth-child(2) { display: flex; align-items: center; gap: 6px; }
.cw-closed-line { flex: 1; height: 1px; background: var(--color-border); }
/* 입력줄 — 둥근 상자 안에 클립 · 자동 높이 글칸 · 보내기. 첨부 미리보기는 상자 위 */
.consult-widget .cw-form { border-top: 1px solid var(--color-divider); padding: 10px 12px 12px; background: var(--color-surface); gap: 8px; flex: none; }
.cw-previews { gap: 8px; }
.cw-box { display: flex; align-items: flex-end; gap: 4px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-xl); padding: 6px 6px 6px 4px; background: var(--color-surface); }
.cw-box:focus-within { border-color: var(--color-accent); outline: 2px solid var(--color-accent-line); outline-offset: 0; }
.cw-iconbtn { width: 36px; height: 36px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--color-text-muted); display: grid; place-items: center; cursor: pointer; flex: none; }
.cw-iconbtn:hover { background: var(--color-surface-muted); color: var(--color-text); }
.cw-input { flex: 1; min-width: 0; border: 0; outline: none; resize: none; font: inherit; font-size: 14px; line-height: 22px; padding: 7px 0; min-height: 22px; max-height: 132px; background: transparent; color: var(--color-text); }
.cw-send { width: 36px; height: 36px; border: 0; border-radius: var(--radius-md); background: var(--color-accent); color: var(--color-text-inverse); display: grid; place-items: center; cursor: pointer; flex: none; }
.cw-send:hover { background: var(--color-accent-strong); }
.cw-send:disabled { opacity: .5; cursor: default; }
.cw-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--color-text-muted); }
.cw-link { border: 0; background: transparent; padding: 0; font: inherit; color: var(--color-text-muted); cursor: pointer; display: flex; align-items: center; gap: 4px; }
.cw-link:hover { color: var(--color-accent); }
.cw-foot-closed { border-top: 1px solid var(--color-divider); background: var(--color-surface); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; text-align: center; flex: none; }
.cw-newbtn { height: 44px; border: 0; border-radius: var(--radius-md); background: var(--color-accent); color: var(--color-text-inverse); font: inherit; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.cw-newbtn:hover { background: var(--color-accent-strong); }
/* 상담 마치기 — 머리줄 버튼(36px) · 입력줄 자리 확인 카드(alertdialog, 44px 버튼 2열) */
.cw-endbtn { height: 36px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: transparent; color: var(--color-text-body); display: flex; align-items: center; gap: 6px; padding: 0 10px; font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; flex: none; }
.cw-endbtn[hidden] { display: none; }
/* 떠 있는 창은 늘 380px 폭이라 머리줄에 글자 버튼까지 넣으면 제목이 «현황판 …»으로 잘린다 — 아이콘만(aria-label·title 로 이름) */
.cw-endbtn { width: 36px; padding: 0; justify-content: center; } .cw-endbtn-tx { display: none; }
.cw-confirm-err { margin: 0; font-size: 12.5px; color: var(--color-fail-strong); }
.cw-confirm-err[hidden] { display: none; }
.cw-endbtn:hover { background: var(--color-surface-muted); color: var(--color-text); }
.cw-confirm { border-top: 1px solid var(--color-divider); background: var(--color-surface); padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-modal); flex: none; }
.cw-confirm[hidden] { display: none; }
.cw-confirm-body { display: flex; gap: 12px; }
.cw-confirm-icon { width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--color-accent-soft); color: var(--color-accent); display: grid; place-items: center; flex: none; }
.cw-confirm-title { margin: 0; font-size: 14.5px; font-weight: 700; }
.cw-confirm-desc { margin: 4px 0 0; font-size: 12.5px; line-height: 19px; color: var(--color-text-muted); }
.cw-confirm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cw-confirm-actions button { height: 44px; border-radius: var(--radius-md); font: inherit; font-size: 14px; cursor: pointer; }
.cw-confirm-cancel { border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-text-body); font-weight: 500; }
.cw-confirm-go { border: 0; background: var(--color-accent); color: var(--color-text-inverse); font-weight: 700; }
.cw-confirm-go:hover { background: var(--color-accent-strong); }
.cw-confirm-actions button:disabled { opacity: .5; cursor: default; }
.consult-main > .cw-closed { margin-top: 4px; }
@media (max-width: 640px) {
  .consult-panel { top: 8px; right: 8px; bottom: 8px; left: 8px; width: auto; height: auto; max-height: none; }
  .consult-fab { right: 16px; bottom: 16px; }
}

/* 상담 첨부 이미지 — 보내기 전 미리보기(빼기 단추)·대화 속 썸네일·끌어놓기 표시 */
.consult-attach-note { margin: 0; }
.consult-attach-list { display: flex; flex-wrap: wrap; gap: 6px; }
.consult-attach-list:empty { display: none; }
.consult-attach-item { position: relative; display: inline-flex; }
.consult-attach-item img, .consult-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-border); background: var(--color-surface-muted); }
.consult-attach-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: var(--radius-pill); border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); cursor: pointer; line-height: 1; }
.consult-thumb { display: inline-flex; }
.consult-attach-btn { align-self: flex-start; }
.consult-form.is-drop { outline: 2px dashed var(--color-accent-line); outline-offset: 4px; }

/* ── 면접자(050 · 시안 interviewee-v7) — 두 칸 폼·상세, 할 일 칩, 주간·월간 달력(일~토, 일요일 빨강·토요일 파랑) ── */
.iv-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
@media (max-width: 720px) { .iv-2col { grid-template-columns: minmax(0, 1fr); } }
.iv-todo { align-items: center; margin-bottom: var(--space-3); }
.chip.chip-danger { border-color: var(--color-fail); color: var(--color-fail); }
.chip.chip-danger.is-on { background: var(--color-fail-soft); }
a.seg-btn { display: inline-flex; align-items: center; text-decoration: none; }
.iv-cal-nav { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-3) 0; flex-wrap: wrap; }
.iv-cal-nav .iv-cal-title { font-weight: 700; font-size: var(--text-lg, 1.125rem); }
.iv-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); }
.iv-cal-head { padding: 8px; font-weight: 600; text-align: center; border-bottom: 1px solid var(--color-border); background: var(--color-surface-muted); }
.iv-cal-day { min-height: 120px; padding: 6px; border-right: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.iv-cal-day:nth-child(7n) { border-right: 0; }
.iv-cal.is-week .iv-cal-day { min-height: 320px; }
.iv-cal-day.is-other, .iv-cal-day.is-past { background: var(--color-surface-quiet, var(--color-surface-muted)); }
.iv-cal-day.is-other .iv-cal-date { opacity: .5; }
.iv-cal-day.is-today { box-shadow: inset 0 0 0 2px var(--color-accent); }
.iv-cal-date { font-weight: 600; font-size: var(--text-sm); display: flex; justify-content: space-between; gap: 4px; }
.iv-sun { color: var(--color-fail); }
.iv-sat { color: var(--color-accent); }
.iv-cal-item { display: block; width: 100%; text-align: left; font: inherit; font-size: var(--text-sm); border: 1px solid var(--color-border); border-left: 3px solid var(--color-wait); border-radius: var(--radius-sm); background: var(--color-surface); padding: 3px 6px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-body); }
.iv-cal-item.is-ok { border-left-color: var(--color-ok); }
.iv-cal-item.is-no { border-left-color: var(--color-fail); }
.iv-cal-item.is-failsend { color: var(--color-fail); }
.iv-cal-item .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-cal-add { margin-top: auto; align-self: flex-start; }
@media (max-width: 720px) { .iv-cal { grid-template-columns: minmax(0, 1fr); } .iv-cal-head { display: none; } .iv-cal-day.is-other { display: none; } .iv-cal-day, .iv-cal.is-week .iv-cal-day { min-height: 0; border-right: 0; } }

/* 면접자 메시지 템플릿 — 종류별 편집과 예시 말풍선 */
.ivt-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.ivt-units { min-height: 150px; }
.ivt-preview-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.ivt-preview-button { display: block; margin-top: var(--space-3); text-align: center; }
.ivt-preview-button[hidden] { display: none; }
.ivt-kind .phone-frame { max-width: 100%; }
@media (max-width: 720px) { .ivt-editor { grid-template-columns: minmax(0, 1fr); } }

/* 면접자 발송 — 결과 실패 강조·사람별 미리보기 */
.table tr.ivs-failed > td { background: var(--color-fail-soft); color: var(--color-fail); }
[data-iv-send] .phone-frame { max-width: 100%; }
[data-iv-send] [hidden] { display: none; }
[data-iv-send] select.input { width: auto; max-width: 100%; }

/* 지원자 참석 응답 — JS 없이 두 단추로 답하는 모바일 공개 화면 */
.iv-response { max-width: 480px; margin-inline: auto; }
.iv-response .btn { min-height: 44px; width: 100%; white-space: normal; }
.iv-response .input { min-height: 44px; }
