/* WIFISEC — DECISION DESK(CONTYROS v2.2 화면 체계)의 style.css를 그대로 따르고, 끝에 WiFi 포털·차트 규칙을 덧붙인다. */
@font-face { font-family: Pretendard; src: url(/static/fonts/PretendardVariable.woff2) format('woff2'); font-weight: 45 920; font-display: swap; }

:root {
  --ink: #192b36; --muted: #647681; --line: #dbdfe5; --soft: #f2f4f7; --surface: #fff; --bg: #f7f8f9; --sidebar: #edeef1;
  --accent: #173569; --accent-hover: #122a53; --accent-soft: #ebeff5; --nav-active: #dce0e8;
  --ok: #2f6b45; --ok-bg: #eef7f1; --ok-line: #cfe3d5;
  --warn: #996b16; --warn-bg: #fff8e8; --warn-line: #eadfbe;
  --bad: #9d5845; --bad-bg: #fbf2ee; --bad-line: #ecd7d0;
  --hold: #5b4b8a; --hold-bg: #f1eef8; --hold-line: #dcd5ec;
  color: var(--ink); background: var(--bg);
  font-family: Pretendard, system-ui, 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif; font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-size: 14px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; background: var(--bg); color: var(--ink); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid #8895ab; outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 27px; letter-spacing: -1px; font-weight: 650; line-height: 1.35; }
h2 { font-size: 19px; letter-spacing: -.5px; font-weight: 650; }
h3 { font-size: 15.5px; font-weight: 600; line-height: 1.5; }
small, .muted { color: var(--muted); }
.small { font-size: 12px; }

/* ── 틀: 고정 사이드바 + 상단 바 + 본문 */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; padding: 26px 16px 18px; background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); margin: 0 6px 30px; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; flex: none; display: block; }
.brand b { display: block; font-size: 15.5px; letter-spacing: .4px; line-height: 1.2; font-weight: 750; }
.brand small { display: block; font-size: 9px; letter-spacing: 2px; margin-top: 4px; font-weight: 600; }
.nav-label { font-size: 10px; letter-spacing: 1.6px; color: var(--muted); font-weight: 650; margin: 14px 10px 8px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 11px 12px; border: 0; background: none; text-align: left;
  border-radius: 7px; font-size: 13.5px; color: #344d57; margin-bottom: 3px; text-decoration: none; }
.nav:hover, .nav.active { background: var(--nav-active); color: #11284f; }
.nav.active { font-weight: 650; }
.count { font-size: 11px; min-width: 22px; text-align: center; background: #f6f7fa; border-radius: 4px; padding: 1px 6px; color: #344d57; font-weight: 600; }
.count.alert { background: var(--accent); color: #fff; }
.sidebar-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #d7dce5; color: #283b5b; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.sidebar-bottom strong { display: block; font-size: 12.5px; }
.sidebar-bottom small { display: block; font-size: 10.5px; }
.sidebar-bottom a { font-size: 11px; color: var(--muted); }

.shell { margin-left: 224px; min-height: 100vh; }
.topbar { height: 60px; border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 34px; font-size: 12.5px; position: sticky; top: 0; z-index: 5; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs strong { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs .slash { color: #b5bcc6; }
.content { padding: 30px 34px 140px; max-width: 1120px; }

/* ── 머리말 */
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.page-heading p { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.7; }
.eyebrow { font-size: 10px; letter-spacing: 1.6px; color: var(--accent); margin-bottom: 10px; font-weight: 700; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 34px 0 14px; }
.section-heading p { font-size: 12px; color: var(--muted); }

/* ── 단추 */
/* 입력 칸·단추 높이: 기본 --ctl, 작은 단추 --ctl-sm, 아주 작은 단추 --ctl-xs(테두리 포함). 한 줄에 놓이는 것은 같은 높이로 맞춘다. */
:root { --ctl: 40px; --ctl-sm: 32px; --ctl-xs: 28px; }
.primary, .secondary { box-sizing: border-box; min-height: var(--ctl); display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.2; vertical-align: middle; text-align: center; }
.primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 8px; padding: 0 17px; font-size: 13.5px; font-weight: 600; }
.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.secondary { background: #fff; color: var(--ink); border: 1px solid #cfd5dd; border-radius: 8px; padding: 0 15px; font-size: 13px; font-weight: 500; text-decoration: none; }
.secondary:hover { background: var(--soft); }
.primary.sm, .secondary.sm { min-height: var(--ctl-sm); padding: 0 12px; font-size: 12.5px; border-radius: 7px; }
.primary.xs, .secondary.xs { min-height: var(--ctl-xs); padding: 0 9px; font-size: 12px; border-radius: 6px; }
.secondary.danger { color: var(--bad); border-color: var(--bad-line); }
.secondary.danger:hover { background: var(--bad-bg); }
.secondary:disabled, .primary:disabled { opacity: .55; cursor: default; }
/* 요청 줄의 동작: 글자 나열이 아니라 단추 */
.row-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.row-buttons.person { margin: 4px 0 8px; gap: 4px; }
td .row-buttons:not(.person) { min-width: 170px; }
/* 받는 사람별 설정(요청 보내기·받는 사람 추가) */
.per-recipient { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.per-head { padding: 10px 14px; background: var(--soft); font-size: 13px; display: grid; gap: 2px; }
.per-head small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.per-row { padding: 10px 14px; border-top: 1px solid var(--line); }
.per-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.per-name { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-right: auto; font-size: 13px; }
.per-name small { color: var(--muted); font-size: 12px; }
.check.per-mail { margin: 0; font-size: 12.5px; }
.per-note { margin-top: 8px; }
.per-note textarea, dialog .field > div > textarea { display: block; width: 100%; padding: 9px 11px; border: 1px solid #d7dbe1; border-radius: 7px; font-size: 13px; line-height: 1.7; resize: vertical; }
/* 보낸 뒤 결과 */
.sent-list { list-style: none; margin: 12px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.sent-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.sent-list li:first-child { border-top: 0; }
.copy-row { display: flex; gap: 6px; margin-top: 6px; }
.copy-row input { box-sizing: border-box; height: var(--ctl); flex: 1; min-width: 0; margin: 0; padding: 0 10px; border: 1px solid #d7dbe1; border-radius: 7px; font-size: 12.5px; color: var(--ink); background: var(--soft); }
.copy-row > .primary, .copy-row > .secondary { min-height: var(--ctl); }
.copy-row input[type=date] { flex: 0 1 190px; background: #fff; font-size: 13px; }
.copy-row { align-items: center; flex-wrap: wrap; }
.field-note { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.field-note-inline { font-size: 11.5px; color: var(--muted); }
.alert-banner { margin: 0 0 16px; padding: 11px 14px; border: 1px solid var(--bad-line); background: var(--bad-bg); color: var(--bad); border-radius: 8px; font-size: 13px; line-height: 1.6; }
.alert-banner a { color: inherit; font-weight: 600; margin-left: 6px; }
.gv-panel { padding: 16px 18px; }
.gv-panel > p { margin: 0 0 10px; font-size: 13.5px; }
.gv-form { display: grid; grid-template-columns: minmax(0, 1fr) 180px auto; gap: 10px; align-items: end; margin: 6px 0 10px; }
.gv-form .field { margin: 0; }
.gv-history { margin-top: 12px; }
@media (max-width: 860px) { .gv-form { grid-template-columns: 1fr; } }
.quote-preview { margin-top: 6px; padding: 10px 12px; background: var(--soft); border-radius: 8px; font-size: 13px; color: var(--ink); white-space: pre-wrap; }
.quote-preview small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; white-space: normal; }
.choice-row { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.choice-row .check { margin-top: 6px; }
.danger { color: var(--bad); }
.linkish { background: none; border: 0; padding: 2px 0; color: var(--accent); font-size: 12.5px; }
.linkish:hover { text-decoration: underline; }

/* ── 상태 칩 */
.status { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #d7dbe2; background: var(--soft); border-radius: 5px; padding: 2px 8px; font-size: 11px; color: #5f6672; white-space: nowrap; font-weight: 500; }
.status.answered, .status.done, .status.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.status.unsure, .status.waiting, .status.due { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.status.later { color: var(--hold); background: var(--hold-bg); border-color: var(--hold-line); }
.status.active, .status.others { color: #283b5b; background: var(--accent-soft); border-color: #c9d1df; }
.status.revoked, .status.expired, .status.failed { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
.status.declined { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }

/* ── 카드·지표 */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat small { display: block; font-size: 12px; }
.stat b { display: block; font-size: 26px; letter-spacing: -1px; margin-top: 6px; font-weight: 650; }
.stat b span { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 3px; }
.stat p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.bar { height: 5px; background: var(--soft); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow a { color: var(--ink); text-decoration: none; font-weight: 500; }
.list .grow a:hover { color: var(--accent); }
.list .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.card-link { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; color: var(--ink); }
.card-link:hover { border-color: #b9c2cf; }
.card-link .t { font-weight: 600; font-size: 15px; }
.card-link .s { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.card-link .s.todo { color: var(--warn); font-weight: 500; }
/* 조용한 새로 고침으로 새로 올라오거나 바뀐 질문지: 테두리가 잠깐 남색으로 빛났다가 사라진다 */
.card-link.flash-in { animation: flash-in 2.6s ease-out; }
@keyframes flash-in { 0%, 35% { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } 100% { border-color: var(--line); box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) { .card-link.flash-in { animation: none; border-color: var(--accent); } }
/* 질문지 목록: 단계(진행 중·제출함·마감) → 프로젝트 */
.count-inline { font-size: 14px; color: var(--muted); font-weight: 500; }
.project-group { margin-bottom: 18px; }
.project-name { font-size: 13px; font-weight: 600; color: #344d57; margin: 0 0 8px; letter-spacing: .2px; }
.project-name small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.closed-stage > summary { list-style: none; cursor: pointer; }
.closed-stage > summary::-webkit-details-marker { display: none; }
.closed-stage > summary .section-heading h2::after { content: ' · 펼치기'; font-size: 12px; font-weight: 500; color: var(--muted); }
.closed-stage[open] > summary .section-heading h2::after { content: ' · 접기'; }
dialog .dialog-list { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 5px; font-size: 13px; line-height: 1.6; }
.empty { padding: 56px 24px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.9; }
.empty h2 { color: var(--ink); margin-bottom: 8px; }
.empty .empty-action { margin-top: 18px; }
.empty .empty-action a { display: inline-block; text-decoration: none; }

/* ── 표 */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
table.grid td { padding: 11px 14px; border-top: 1px solid #eef0f3; vertical-align: top; overflow-wrap: break-word; }   /* 칸이 한 글자 폭으로 줄지 않게(넘칠 때만 줄 바꿈) */
table.grid tr:first-child td { border-top: 0; }
table.grid td .sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px 10px; }

/* ── 탭·거르기 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 18px; }
.tab { border: 0; border-bottom: 2px solid transparent; background: none; padding: 10px 14px; font-size: 13.5px; color: var(--muted); margin-bottom: -1px; }
.tab.active { border-color: var(--accent); color: var(--accent); font-weight: 650; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.chip { box-sizing: border-box; min-height: var(--ctl-sm); display: inline-flex; align-items: center; gap: 4px; border: 1px solid #d3d9e1; background: #fff; border-radius: 999px; padding: 0 12px; font-size: 12.5px; color: #344d57; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.toc { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; margin-bottom: 6px; }
.toc a { text-decoration: none; }

/* ── 본문 서식(Markdown) */
.md p { margin: 0 0 8px; }
.md ul { margin: 0 0 8px; padding-left: 20px; }
.md li { margin: 2px 0; }
.md h4 { font-size: 13.5px; margin: 12px 0 4px; }
.md blockquote { margin: 0 0 8px; padding: 8px 12px; background: var(--soft); border-radius: 7px; color: #34444f; }
.md code { font-size: 12.5px; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
.md table, table.evidence { border-collapse: collapse; width: 100%; margin: 4px 0 10px; font-size: 13px; }
.md th, .md td, table.evidence th, table.evidence td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
.md th, table.evidence th { background: #fafbfc; font-weight: 600; }
table.evidence th { width: 34%; }
.scroll-x { overflow-x: auto; }
.intro { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.note-box { background: var(--accent-soft); border: 1px solid #d2dae7; border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.note-box .who { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.note-box p { white-space: pre-wrap; }
.note-box .row-actions { margin-top: 10px; }
.note-box.existing { margin: 10px 0 0; padding: 12px 14px; font-size: 13px; }
.note-box.existing > ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.note-box.existing ul ul { list-style: disc; margin: 4px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.note-box.existing .small { margin-top: 8px; }
.warn-text { margin-top: 4px; font-size: 12.5px; color: var(--warn); }

/* ── 문항 카드 */
.group { margin-top: 26px; }
.group > h2 { margin-bottom: 4px; }
.group > .md { color: var(--muted); font-size: 13px; }
.item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 12px 0; scroll-margin-top: 80px; }
.item.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.item.flash { box-shadow: 0 0 0 3px #c9d1df; }
.item-head { display: flex; gap: 10px; align-items: flex-start; }
.item-head input[type=checkbox] { margin: 5px 0 0; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.iid { flex: none; min-width: 42px; text-align: center; font-size: 11px; font-weight: 700; color: #4d5b66; background: var(--soft); border: 1px solid #e3e7ec; border-radius: 5px; padding: 1px 7px; margin-top: 3px; }
.list .iid { margin-top: 0; }
.item-head .status { flex: none; margin-top: 1px; }
.item h3 { flex: 1; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; font-size: 12.5px; margin: 12px 0 4px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.context { margin: 12px 0 4px; }
.options { border: 0; padding: 0; margin: 14px 0 6px; display: grid; gap: 8px; }
.options legend { font-size: 12px; color: var(--muted); padding: 0; margin-bottom: 6px; }
.opt { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; cursor: pointer; border: 1px solid #d7dbe1; border-radius: 9px; padding: 11px 13px; background: #fff; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt input { margin: 4px 0 0; accent-color: var(--accent); }
.opt b { font-weight: 600; }
.opt .rec { font-size: 11px; font-weight: 600; color: var(--ok); margin-left: 6px; }
/* 다른 사람이 고른 선택지: 오른쪽에 이름표 */
.opt .picks { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 260px; }
.opt .pick { font-size: 11.5px; font-weight: 600; line-height: 1.6; color: #283b5b; background: #fff; border: 1px solid #c9d1df; border-radius: 5px; padding: 1px 8px; white-space: nowrap; }
.opt:has(input:checked) .pick { background: #fff; }
.opt small { display: block; font-size: 12.5px; margin-top: 2px; }
.rec-note { font-size: 12.5px; color: var(--muted); margin: 2px 0 6px; }
.opt.other { border-style: dashed; }
.opt.other small { color: var(--muted); }
.choice-tools { display: flex; justify-content: flex-end; margin: -2px 0 4px; }
.field-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--warn); }
.field { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.field input, .field textarea, .field select { box-sizing: border-box; display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #d7dbe1; border-radius: 7px; background: #fff; font-size: 13.5px; color: var(--ink); }
.field textarea { resize: vertical; line-height: 1.7; }
.field input:not([type=checkbox]):not([type=radio]), .field select { height: var(--ctl); padding-top: 0; padding-bottom: 0; }
.field .copy-row input { margin-top: 0; }   /* 입력 칸 + 단추 줄에서는 위 여백 없이 단추와 같은 선에 */
.states { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.state-btn { box-sizing: border-box; min-height: var(--ctl-sm); border: 1px solid #d3d9e1; background: #fff; border-radius: 7px; padding: 0 12px; font-size: 12.5px; }
.state-btn[aria-pressed="true"].answered { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.state-btn[aria-pressed="true"].unsure { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.state-btn[aria-pressed="true"].later { background: var(--hold-bg); border-color: var(--hold); color: var(--hold); }
.state-btn[aria-pressed="true"].declined { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.item-notes { font-size: 12.5px; color: var(--muted); margin-top: 8px; display: grid; gap: 3px; }
.check-list { display: grid; gap: 2px; margin-top: 6px; max-height: 220px; overflow: auto; }
.check-list .check { margin-top: 4px; }
.field.inline { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.field.inline select { width: auto; margin-top: 0; padding: 0 10px; }
.item-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 12px; }
.saved { color: var(--muted); }
.saved.error { color: var(--bad); }
.req-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
/* 다른 사람이 적은 내용: 의견란 바로 아래, 읽기 전용 입력칸처럼 보인다 */
.fills { margin-top: 10px; }
.fills-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.fill { border: 1px solid #e3e7ec; background: #fafbfc; border-radius: 7px; padding: 9px 12px; margin-bottom: 6px; }
.fill-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; }
.fill-head small { font-size: 11.5px; }
.fill-head .when { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.fill-text { margin-top: 6px; white-space: pre-wrap; font-size: 13.5px; line-height: 1.7; color: var(--ink); }
/* 첨부 */
.files-field { margin-top: 12px; }
.files-field:focus { outline: none; }
/* 붙여넣기 대상 표시: 이 문항의 의견란이나 첨부 칸을 누른 상태면 「지금 붙여 넣으면 이 문항에 올라갑니다」 */
.dz-paste { display: none; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.item.paste-ready .dropzone { border-color: var(--accent); background: #f5f7fb; }
.item.paste-ready .dz-paste { display: inline; }
.item.paste-ready .dz-text { display: none; }
/* 끌어 놓기 자리: 늘 보이게 두고, 파일을 끌고 오면 문항 전체가 받을 자리임을 강하게 표시한다 */
.dropzone { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; padding: 12px 14px; border: 1.5px dashed #c3ccd9; border-radius: 9px; background: #fafbfc; transition: border-color .12s, background-color .12s; }
.dz-text { font-size: 12.5px; color: var(--ink); }
.dz-drag { display: none; font-size: 13.5px; font-weight: 600; color: var(--accent); padding: 4px 0; }
.dz-note { flex-basis: 100%; font-size: 11.5px; color: var(--muted); }
body.drag-files .item.can-drop .dropzone { border-color: var(--accent); background: var(--accent-soft); }
.item.dragging { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.item.dragging .dropzone { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.item.dragging .dropzone > :not(.dz-drag) { display: none; }
.item.dragging .dz-drag { display: inline; }
@media (hover: none) { .dz-text, .dz-paste { display: none !important; } }   /* 휴대폰: 끌어 놓기·붙여넣기 안내는 빼고 「파일 올리기」만 */
.files-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.files-label { font-size: 12px; color: var(--muted); }
.files { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.file { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; padding: 6px 10px; border: 1px solid #e3e7ec; border-radius: 7px; background: #fff; }
.file a { font-weight: 500; }
.file small { color: var(--muted); font-size: 11.5px; }
.file .linkish { margin-left: auto; font-size: 12px; }
.fill .files { margin-top: 8px; }
/* 주인: 다른 사람 답으로 확정 */
.adopt-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.adopted { font-size: 12px; color: var(--ok); margin-top: 8px; }

/* ── 아래 고정 바 */
.dock { position: fixed; left: 224px; right: 0; bottom: 0; z-index: 6; background: #fff; border-top: 1px solid var(--line); padding: 10px 34px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.dock .counts { font-size: 12.5px; color: var(--muted); }
.dock .counts b { color: var(--ink); }
.dock .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dock .bar { flex-basis: 100%; margin: 0; }
.dock.select { background: var(--accent); color: #fff; border-color: var(--accent); }
.dock.select .counts, .dock.select .counts b { color: #fff; }
.dock.select .secondary { background: transparent; color: #fff; border-color: #ffffff80; }
.dock.select .primary { background: #fff; color: var(--accent); border-color: #fff; }

/* ── 대화상자 */
dialog { border: 1px solid var(--line); border-radius: 15px; width: 620px; max-width: calc(100vw - 30px); max-height: 90dvh; overflow: auto; padding: 26px; box-shadow: 0 20px 80px #131b2829; color: var(--ink); }
dialog::backdrop { background: #161b2466; }
dialog h2 { margin-bottom: 6px; }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.picked .person { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); border: 1px solid #c9d1df; border-radius: 999px; padding: 3px 6px 3px 11px; font-size: 12.5px; }
.picked .person button { border: 0; background: none; color: var(--muted); font-size: 14px; line-height: 1; padding: 0 3px; }
.results { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; max-height: 200px; overflow: auto; }
.results li button { width: 100%; text-align: left; border: 0; background: #fff; padding: 8px 12px; font-size: 13px; }
.results li button:hover { background: var(--soft); }
.results li small { margin-left: 6px; }
.chosen-items { margin: 8px 0 0; padding: 0 0 0 18px; font-size: 12.5px; color: #34444f; max-height: 130px; overflow: auto; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-top: 12px; color: var(--ink); }
.check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.result-box { background: var(--soft); border-radius: 9px; padding: 12px 14px; margin-top: 12px; font-size: 13px; }
.result-box code { font-size: 12px; word-break: break-all; }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 20; max-width: calc(100vw - 32px); background: var(--ink); color: #fff; border-radius: 9px; padding: 9px 16px; font-size: 13px; }

/* ── 외부 받는 사람 화면(/x) */
body.external .ext-top { display: flex; align-items: center; gap: 10px; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line); }
body.external .ext-top b { display: block; font-size: 14px; letter-spacing: .4px; font-weight: 750; } body.external .ext-top small { display: block; font-size: 11px; }
body.external .brand-mark { width: 32px; height: 32px; }
.content.ext { margin: 0 auto; max-width: 860px; }
.dock.ext-dock { left: 0; }
.panel.verify { padding: 22px 24px; margin-top: 18px; max-width: 520px; }
.panel.verify h2 { margin-bottom: 8px; }
.panel.verify .row-actions { margin-top: 12px; }
.code-input { font-size: 18px !important; letter-spacing: 4px; font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .sidebar { position: static; width: 100%; padding: 14px 16px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0 0 10px; } .brand small { display: none; }
  .nav-label, .sidebar-bottom { display: none; }
  .sidebar nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
  .nav { width: auto; white-space: nowrap; padding: 8px 11px; margin: 0; }
  .shell { margin-left: 0; }
  .topbar { height: 48px; padding: 0 16px; position: static; }
  .content { padding: 20px 16px 150px; }
  .dock { left: 0; padding: 10px 16px; }
  .cards, .row2 { grid-template-columns: 1fr; }
  .page-heading { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 23px; }
  .item { padding: 15px 14px; }
  .meta { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .bar > span { transition: none; } }
@media print { .sidebar, .topbar, .dock, .states, .item-foot, .filters, .tabs { display: none; } .shell { margin: 0; } .item { break-inside: avoid; } }
/* 새 버전 안내(배포 뒤 열어 둔 화면) */
.new-version { position: fixed; top: 12px; right: 16px; z-index: 30; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 4px 14px rgba(23, 53, 105, .14); padding: 10px 12px 10px 16px; font-size: 13.5px; }
.closed-stage .more-closed { margin-top: 12px; }
/* 들어온 요청·보낸 요청·에이전트 연결 */
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.intake-head .quote { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-size: 13.5px; line-height: 1.7; }
.note-box .quote { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-size: 13.5px; line-height: 1.7; }
.sent-item .sent-options { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }
.sent-item .sent-options li.chosen { font-weight: 700; color: var(--accent); }
.sent-item .sent-answer { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; font-size: 13.5px; }
/* 에이전트 연결 안내 칸(.panel은 안쪽 여백이 없어 여기서 준다) */
.agent-guide { padding: 20px 22px; display: grid; gap: 20px; }
.agent-guide section { min-width: 0; }
.agent-guide .guide-label { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.agent-guide .copy-row { margin-top: 0; }
.agent-guide .how { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 12px 16px; margin: 0 0 10px; font-size: 13.5px; line-height: 1.7; }
.agent-guide .how dt { font-weight: 700; color: var(--ink); }
.agent-guide .how dd { margin: 0; min-width: 0; color: var(--ink); }
.agent-guide .how dd > code { font-size: 12.5px; background: var(--soft); border-radius: 4px; padding: 1px 5px; }
.agent-guide .cmd { margin-top: 8px; }
.agent-guide .cmd-text { flex: 1; min-width: 0; display: block; white-space: normal; overflow-wrap: anywhere; background: var(--soft); border: 1px solid var(--line);
  border-radius: 7px; padding: 7px 10px; font-size: 12.5px; line-height: 1.5; }
.agent-guide p { margin: 0; font-size: 13.5px; line-height: 1.7; }
.agent-guide p.small { font-size: 12.5px; }
.agent-guide p + p { margin-top: 8px; }
@media (max-width: 640px) {
  .agent-guide { padding: 16px; }
  .agent-guide .how { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .agent-guide .how dd { margin-bottom: 12px; }
}
/* 에이전트 허용 화면(로그인 뒤, 앱 밖 단독 화면) */
.consent-page { background: #f7f8f9; }
.consent { max-width: 520px; margin: 48px auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 26px 26px 22px; }
.consent-brand { font-size: 12px; letter-spacing: 1.5px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.consent h1 { font-size: 20px; margin: 0 0 12px; }
.consent ul { padding-left: 20px; line-height: 1.9; }
.consent .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
@media (max-width: 560px) { .consent { margin: 16px; padding: 20px 16px; } }
/* 받는 사람: 답 완료 뒤 상자와 고맙다는 화면 */
.done-box { border-color: var(--ok-line); background: var(--ok-bg); }
.done-box p + p { margin-top: 4px; }
.thanks h2 { margin: 0 0 8px; font-size: 19px; }
.thanks > p { margin: 0 0 12px; font-size: 14px; line-height: 1.7; }
.thanks-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); font-size: 13.5px; }
.thanks-facts dt { color: var(--muted); }
.thanks-facts dd { margin: 0; font-weight: 700; color: var(--ink); }
.thanks .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* 확정하지 않음, 받는 사람 상태 안내 */
.adopt-pair, .adopt-off { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.state-hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

.sub.late { color: var(--warn); }   /* 보낸 지 하루가 넘었는데 안 열어 봄 */
/* 요청 보내는 방식(따로·함께), 받은 요청 묶음 카드 */
.send-mode .check { align-items: flex-start; }
.send-mode .check input { margin-top: 3px; }
.send-mode .check span { line-height: 1.6; }
.group-card { border-color: var(--accent); }
/* 요청 줄 동작: 주요 동작 하나 + 「더 보기」 메뉴 */
.row-actions-menu { display: flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.more-btn .caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; margin-left: 2px; opacity: .7; }
.more-btn[aria-expanded="true"] { background: var(--soft); border-color: #b9c2cd; }
.menu { position: fixed; z-index: 40; min-width: 184px; max-width: calc(100vw - 16px); overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px #131b2826; padding: 6px; }
.menu-label { padding: 6px 10px 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.menu-item { box-sizing: border-box; display: flex; align-items: center; width: 100%; min-height: var(--ctl-sm); padding: 0 10px; border: 0; border-radius: 6px; background: none;
  text-align: left; font-size: 13px; color: var(--ink); }
.menu-item:hover, .menu-item:focus-visible { background: var(--soft); outline: none; }
.menu-item.danger { color: var(--bad); }
.menu-item.danger:hover, .menu-item.danger:focus-visible { background: var(--bad-bg); }
/* 긴 질문지 화면: 고정 도구 줄(거르기·묶음으로 가기·답변 접기), 답변 접기, 맨 위로 */
:root { --sticky-top: 60px; }
.round-toolbar { position: sticky; top: var(--sticky-top); z-index: 5; display: flex; align-items: flex-start; gap: 10px; margin: 4px -34px 12px; padding: 8px 34px;
  background: var(--bg); border-bottom: 1px solid transparent; }
.round-toolbar.stuck { border-bottom-color: var(--line); box-shadow: 0 8px 14px -12px #131b2855; }
.round-toolbar .filters { flex: 1; min-width: 0; margin: 0; }
.round-toolbar .grow { flex: 1; }
.toolbar-right { display: flex; flex: none; gap: 6px; margin-left: auto; }
.chip .caret, .more-btn .caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .7; }
.group-jump { max-width: 280px; gap: 6px; }
.group-jump .gj-label { color: var(--muted); }
.group-jump .gj-now { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item, .group { scroll-margin-top: calc(var(--sticky-top) + var(--toolbar-h, 0px) + 12px); }
.fold-summary { display: none; }
.item.folded { padding-top: 12px; padding-bottom: 12px; }
.item.folded > :not(.item-head):not(.fold-summary) { display: none !important; }
.item.folded .fold-summary { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 6px; padding: 0; border: 0; background: none; text-align: left;
  font-size: 13px; color: var(--muted); }
.item.folded .fold-summary:hover .fold-open { text-decoration: underline; }
.fold-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold-open { flex: none; font-size: 12.5px; color: var(--accent); }
.to-top { position: fixed; right: 20px; bottom: 16px; z-index: 7; display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box; min-height: var(--ctl-sm);
  padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; box-shadow: 0 6px 18px #131b2822; font-size: 12.5px; color: var(--ink); }
.to-top:hover { background: var(--soft); }
.to-top .up { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid currentColor; }
@media (max-width: 1200px) { .dock-hint { display: none; } }
@media (max-width: 860px) {
  :root { --sticky-top: 0px; }
  .round-toolbar { margin: 4px -16px 12px; padding: 8px 16px; align-items: center; }
  .round-toolbar .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .round-toolbar .filters::-webkit-scrollbar { display: none; }
  .round-toolbar .chip { flex: none; }
  .group-jump { max-width: 130px; }
  .to-top { right: 12px; }
}
/* 요청 정리 화면 */
.review-head .review-people { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.review-head .review-people li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.review-note { flex-basis: 100%; }
.review-note small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.review-note .quote { margin: 4px 0 0; }
.review-count { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.review-block { display: grid; gap: 8px; margin-top: 12px; }
.review-answer { border: 1px solid #d2dae7; background: #f7f9fc; border-radius: 9px; padding: 12px 14px; }
.review-answer.off { background: #fafbfc; border-color: #e3e7ec; }
.review-answer.off .fill-text, .review-answer.off .review-choice { color: var(--muted); }
.review-answer.empty { background: #fff; border-style: dashed; }
.review-answer .files { margin-top: 8px; }
.review-choice { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.review-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; padding: 2px 2px 0; }
.review-mine .t { color: var(--ink); white-space: pre-wrap; }
.review-more { display: flex; flex-wrap: wrap; gap: 6px; }
.review-q { margin-top: 12px; }
.review-q > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); width: fit-content; }
.review-q[open] > summary { margin-bottom: 8px; }
.owner-edit.split { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.owner-edit-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.owner-edit:not(.split) > .owner-edit-label { display: none; }
.review-block[hidden] { display: none; }
/* 받는 사람: 전달·반려 선택지(보기와 같은 자리, 같은 모양) */
.alt-choices { display: grid; gap: 8px; margin-top: 4px; }
.field + .alt-choices { margin-top: 12px; }
.alt-label { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.alt-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.opt.alt { grid-template-columns: auto 1fr; width: 100%; text-align: left; font: inherit; color: var(--ink); }
.opt.alt:disabled { cursor: default; opacity: .6; }
.opt.alt small { color: var(--muted); }
.alt-mark { box-sizing: border-box; width: 14px; height: 14px; margin-top: 4px; border: 1.5px solid #9aa3b0; border-radius: 50%; }
.opt.alt.decline[aria-pressed="true"] { border-color: var(--warn); background: var(--warn-bg); }
.opt.alt.decline[aria-pressed="true"] .alt-mark { border: 4px solid var(--warn); }
.opt.alt.fwd[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.opt.alt.fwd[aria-pressed="true"] .alt-mark { border: 4px solid var(--accent); }
.opt.alt.fwd[aria-pressed="true"] small { color: var(--ink); }
.item-head .refold { flex: none; margin-top: 1px; white-space: nowrap; }
/* 의견이 다름 */
.status.split { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.status.split.decided { color: #5f6672; background: var(--soft); border-color: #d7dbe2; }
.split-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 12.5px; color: var(--ink); padding: 8px 12px; border-radius: 8px;
  background: var(--warn-bg); border: 1px solid var(--warn-line); }
.split-line b { color: var(--warn); }
.split-line .muted { color: var(--muted); }
.fieldset.options.multi .opt input, .options.multi .opt input { accent-color: var(--accent); }
/* 설문·투표 */
.scale-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.scale-opt { position: relative; }
.scale-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.scale-opt span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: var(--ctl); border: 1px solid #d7dbe1; border-radius: 8px; background: #fff; font-weight: 600; }
.scale-opt input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; }
.scale-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.scale-end { font-size: 12px; color: var(--muted); }
.survey-send .survey-row { display: flex; flex-wrap: wrap; gap: 0 16px; }
.survey-send .survey-row .field { flex: 1 1 200px; }
.preview-options { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.preview-options li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.preview-options small { flex-basis: 100%; padding-left: 22px; color: var(--muted); }
.preview-options .mark { width: 12px; height: 12px; border: 1.5px solid #9aa3b0; border-radius: 50%; flex: none; transform: translateY(1px); }
.preview-options .mark.sq { border-radius: 3px; }
.rbar { display: grid; grid-template-columns: minmax(120px, 2fr) 3fr auto; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.rlabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtrack { height: 10px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.rfill { display: block; height: 100%; background: #9fb0c8; border-radius: 5px; }
.rbar.lead .rfill { background: var(--accent); }
.rbar.lead .rlabel { font-weight: 700; }
.rnum { color: var(--muted); white-space: nowrap; font-size: 12.5px; }
.vote-decide .row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vote-decide select { min-height: var(--ctl-sm); }
@media (max-width: 560px) { .rbar { grid-template-columns: 1fr auto; } .rtrack { grid-column: 1 / -1; grid-row: 2; } }
.panel.survey-send { padding: 16px 18px; display: grid; gap: 4px; }
.panel.survey-send .actions { display: flex; justify-content: flex-end; margin-top: 4px; }
/* 통합 검색 */
.top-search input { box-sizing: border-box; width: 240px; height: var(--ctl-sm); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: inherit; font-size: 13px; background: var(--soft); }
.top-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: #fff; }
.search-page-form { display: flex; gap: 8px; margin: 0 0 14px; }
.search-page-form input { flex: 1; box-sizing: border-box; min-height: var(--ctl); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: inherit; }
.search-results { display: grid; gap: 10px; }
.search-hit .t { display: flex; gap: 8px; align-items: baseline; }
.hit-answers { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; font-size: 13px; color: var(--ink); }
@media (max-width: 760px) { .top-search input { width: 150px; } }
/* 도움말 */
.help-sec { padding: 16px 20px; margin-bottom: 12px; }
.help-sec h2 { font-size: 15px; margin: 0 0 8px; }
.help-sec ol, .help-sec ul { margin: 6px 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.7; }
.help-sec p { font-size: 13.5px; line-height: 1.7; margin: 6px 0; }

/* ───────────── WIFISEC 추가 규칙 ───────────── */
/* 사용자 포털(캡티브 로그인 창): 외부 수신자 화면(body.external)과 같은 모양, 휴대폰 우선 */
body.portal { min-height: 100vh; display: flex; flex-direction: column; }
body.portal .ext-top small { color: var(--muted); }
.portal-main { width: 100%; padding: 24px 16px 40px !important; max-width: 560px !important; flex: 1; }
.portal-main .panel.verify { max-width: none; margin-top: 8px; }
.portal-main .panel.verify > p { font-size: 14px; line-height: 1.75; margin-top: 8px; }
.portal-main .panel.verify > p.muted { font-size: 12.5px; }
.portal-main form { margin-top: 18px; }
.primary.wide, .secondary.wide { width: 100%; min-height: 46px; font-size: 14.5px; }
.portal-main form > .primary.wide { margin-top: 16px; }
body.portal { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", Roboto, sans-serif; }
body.portal .field input, body.portal .field select, body.portal .field textarea { font-size: 16px; }
.portal-main .panel.verify > a.secondary.wide { margin-top: 18px; }
.sponsor-code { margin-top: 12px; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; font-size: 32px; font-weight: 700; letter-spacing: 4px; font-variant-numeric: tabular-nums; }
.sponsor-hint { margin-top: 14px; }
.portal-main form > .secondary.wide { margin-top: 8px; }
.portal-main .panel.verify .kv { padding: 10px 0 0; }
.portal-main .panel.verify > a.primary.wide { margin-top: 18px; }
a.primary, a.secondary { text-decoration: none; }
.secondary.wide { margin-top: 8px; }
.portal-foot { text-align: center; font-size: 11.5px; color: var(--muted); padding: 16px; }
.ms-mark { width: 16px; height: 16px; display: inline-grid; grid-template-columns: 1fr 1fr; gap: 1px; flex: none; }
.ms-mark i { display: block; background: #fff; opacity: .92; }
.ref-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); font-size: 13px; }
.ref-box b { font-size: 16px; letter-spacing: 3px; color: var(--accent); }
.mail-line { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.mail-line.ok { color: var(--ok); }
.mail-line.bad { color: var(--bad); }
.error-text { margin-top: 10px; padding: 9px 12px; border: 1px solid var(--bad-line); background: var(--bad-bg); color: var(--bad); border-radius: 8px; font-size: 13px; }
.notice-text { margin-top: 10px; padding: 9px 12px; border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn); border-radius: 8px; font-size: 13px; }
.consent-box { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.consent-box summary { cursor: pointer; }
.consent-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0 0; }
.consent-box dt { color: var(--ink); font-weight: 600; }
.consent-box dd { margin: 0; }
.inline-forms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.inline-forms form { margin: 0 !important; }
.state-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 12px; font-size: 20px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.state-icon.ok { background: var(--ok-bg); color: var(--ok); }
.state-icon.bad { background: var(--bad-bg); color: var(--bad); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* 관리 화면 보조 */
.health-row { display: flex; flex-wrap: wrap; gap: 6px; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 16px; padding: 16px 18px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.form-row { display: grid; grid-template-columns: 160px 1fr 1fr 110px auto; gap: 10px; align-items: end; padding: 16px 18px; }
.form-row .field { margin: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
table.grid td.num, table.grid th.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
@media (max-width: 860px) { .form-row, .kv { grid-template-columns: 1fr; } .stats.three { grid-template-columns: 1fr; } }

/* 시간대별 인증 차트: 계열 2개(임직원·게스트), 쌓은 막대, 범례 + 막대별 툴팁 + 표 보기 */
.viz-root { --series-1: #2a78d6; --series-2: #eb6834; --grid: #eef0f3; padding: 16px 18px 12px; }
.viz-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.viz-head h3 { font-size: 14px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .s1 { background: var(--series-1); }
.legend .s2 { background: var(--series-2); }
.hourly { position: relative; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; height: 150px; margin-top: 14px; padding-top: 4px;
  border-bottom: 1px solid #c9ced6; background: repeating-linear-gradient(to top, transparent 0 49px, var(--grid) 49px 50px); }
.hour { position: relative; display: flex; flex-direction: column-reverse; align-items: stretch; height: 100%; cursor: default; }
.hour .seg { display: block; width: 100%; min-height: 0; }
.hour .seg.s1 { background: var(--series-1); }
.hour .seg.s2 { background: var(--series-2); margin-bottom: 2px; }
.hour .seg:last-child { border-radius: 4px 4px 0 0; }
.hour:hover .seg, .hour:focus-visible .seg { filter: brightness(1.08); }
.hour-axis { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.hour-axis span { text-align: center; }
.viz-tip { position: absolute; z-index: 3; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px #131b2826; padding: 7px 10px; font-size: 12px; white-space: nowrap; color: var(--ink); }
.viz-tip b { display: block; margin-bottom: 2px; }
.viz-tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.viz-table { margin-top: 10px; font-size: 12px; }
.viz-table summary { cursor: pointer; color: var(--muted); }
