@font-face { font-family: "SUIT"; src: url("../../assets/fonts/SUIT-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
/* 외부고객과 소통의 날 — 모바일 우선, 큰 글씨, 고대비 */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #111827;
  --muted: #4b5563;
  --line: #c9d1dc;
  --primary: #1a56a8;
  --primary-text: #ffffff;
  --primary-soft: #e3edfb;
  --ok: #11743b;
  --ok-soft: #e1f4e8;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn-soft: #fff5d6;
  --focus: #f59e0b;
  --radius: 4px;
  --gutter: 16px;
  --tap: 52px;
  --bar-h: calc(var(--tap) + 24px + env(safe-area-inset-bottom, 0px));
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1720;
    --surface: #18222e;
    --surface-2: #223041;
    --text: #f3f4f6;
    --muted: #b6c0cc;
    --line: #3a4a5e;
    --primary: #6aa5ff;
    --primary-text: #0b1320;
    --primary-soft: #1d3250;
    --ok: #5fd08f;
    --ok-soft: #173627;
    --danger: #ff8a80;
    --danger-soft: #3d1c1a;
    --warn-soft: #3a3117;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.no-scroll, html.no-scroll body { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "SUIT", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}
.boot { padding: 40px var(--gutter); text-align: center; color: var(--muted); }
/* 시작 스크립트 자체가 도착하지 않아도 HTML의 복구 링크가 나타난다. */
.startup-recovery { visibility:hidden; animation:startup-reveal 0s 15s forwards; }
.startup-loading { animation:startup-hide 0s 15s forwards; }
#startup.failed .startup-loading { display:none; }
#startup.failed .startup-recovery { animation:none; visibility:visible; }
@keyframes startup-reveal { to { visibility:visible; } }
@keyframes startup-hide { to { visibility:hidden; } }
h1, h2, h3 { line-height: 1.3; margin: 0; }
p { margin: 0 0 12px; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── 뼈대 ── */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 4px;
  min-height: 60px;
  padding: env(safe-area-inset-top, 0px) 6px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { flex: 1; min-width: 0; font-size: 20px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar h1:focus { outline: none; }
.icon-spacer { width: 52px; flex: none; }
.content { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 16px var(--gutter) 28px; }
.shell.has-actions .content { padding-bottom: calc(var(--bar-h) + 20px); }
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: none;
}
.actionbar-inner { max-width: 720px; margin: 0 auto; display: flex; gap: 10px; }
.actionbar-inner > * { flex: 1; }

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap);
  padding: 10px 18px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit; font-weight: 700; font-size: 18px;
  text-align: center; text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
.btn:active { transform: translateY(1px); filter: brightness(.96); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: var(--surface); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.block { display: flex; width: 100%; }
.btn.small { min-height: 44px; padding: 6px 14px; font-size: 16px; }
.icon-btn {
  flex: none; width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 4px; background: transparent; color: var(--text);
  font: inherit; font-size: 24px; cursor: pointer;
}
.icon-btn.text-btn { font-size: 17px; font-weight: 700; color: var(--muted); }
.icon-btn.remove { width: 44px; height: 44px; font-size: 20px; color: var(--muted); border: 2px solid var(--line); }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.section { margin-top: 24px; }
.section > h2 { font-size: 20px; margin-bottom: 12px; }
.section-title { font-size: 19px; margin: 24px 0 10px; }

/* ── 입력 ── */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 700; font-size: 17px; }
.req { color: var(--danger); font-weight: 600; font-size: 15px; }
.hint { color: var(--muted); font-size: 16px; margin: 0; }
input[type=text], input[type=tel], input[type=date], input:not([type]), textarea, select {
  width: 100%; min-width: 0;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit; font-size: 18px;
}
input[type=date] { appearance: none; -webkit-appearance: none; display: block; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: none; }
.readonly-text { background: var(--surface-2); }

.segmented { display: flex; gap: 6px; padding: 4px; border-radius: 4px; background: var(--surface-2); }
.segmented button {
  flex: 1; min-height: 48px; border: 0; border-radius: 4px;
  background: transparent; color: var(--text); font: inherit; font-weight: 700; cursor: pointer;
}
.segmented button[aria-checked=true] { background: var(--primary); color: var(--primary-text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 6px 14px;
  border: 2px solid var(--primary); border-radius: 4px;
  background: var(--primary-soft); color: var(--text);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
details.more { border: 2px dashed var(--line); border-radius: 4px; padding: 10px 14px; }
details.more summary { cursor: pointer; font-weight: 700; min-height: 36px; }
details.more[open] > div { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }

fieldset.group { border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 12px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
fieldset.group legend { font-weight: 800; padding: 0 6px; }
.att-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 44px; gap: 6px; align-items: center; }
.btn.add { align-self: flex-start; }
.items { display: flex; flex-direction: column; gap: 10px; }
.item-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 44px; gap: 6px; align-items: start; }
.item-num { font-weight: 800; color: var(--muted); padding-top: 13px; text-align: center; }

/* ── 카드·목록 ── */
.lead { font-size: 18px; color: var(--muted); }
.privacy { margin-top: 12px; padding: 12px 14px; border-radius: 4px; background: var(--ok-soft); font-size: 16px; }
.warn { padding: 12px 14px; border-radius: 4px; background: var(--warn-soft); font-size: 16px; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
}
.contract-card { border-width: 2px; }
.contract-card:active { background: var(--surface-2); }
.card-title { font-size: 20px; }
.card-sub { color: var(--muted); font-size: 16px; display: block; }
.info-card .btn { align-self: flex-start; margin-top: 6px; }
.error-card p { white-space: pre-line; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.badge { padding: 3px 10px; border-radius: 4px; font-size: 15px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.done { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }

.menu { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.menu-item, .list-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px;
  min-height: 64px; padding: 10px 16px;
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.menu-item:last-child, .list li:last-child .list-item { border-bottom: 0; }
.menu-text, .list-main { font-weight: 700; grid-column: 1; }
.menu-desc, .list-sub { color: var(--muted); font-size: 15px; grid-column: 1; }
.chev { grid-column: 2; grid-row: 1 / span 2; font-size: 28px; color: var(--muted); }
.list { list-style: none; margin: 0 0 12px; padding: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--surface); }

dl.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 8px 0; }
dl.kv dt { color: var(--muted); font-size: 16px; }
dl.kv dd { margin: 0; font-weight: 600; }

/* ── 단계 ── */
.step { margin-top: 16px; padding: 14px 16px 16px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); }
.step.done { border-color: var(--ok); }
.step-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.step-num {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--primary-text); font-weight: 800;
}
.step.done .step-num { background: var(--ok); color: var(--surface); }
.step-title { font-size: 19px; }
.step-status { color: var(--muted); font-size: 16px; margin: 2px 0 0; }
.step-body { display: flex; flex-direction: column; gap: 10px; }

.progress { display: flex; gap: 6px; margin-bottom: 8px; }
.progress span { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); }
.progress span.on { background: var(--primary); border-color: var(--primary); }
.step-label { font-weight: 800; font-size: 20px; margin-bottom: 2px; }
.context-line { color: var(--muted); font-size: 16px; }

/* ── 서한문 ── */
.letter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; font-size: 20px; line-height: 1.75; margin-bottom: 16px; }
.letter-title { text-align: center; font-size: 26px; letter-spacing: .2em; margin-bottom: 18px; }
.letter p { text-indent: .6em; }
.letter-date { text-align: center; margin-top: 20px; text-indent: 0 !important; }
.letter-signer { text-align: center; font-weight: 800; font-size: 22px; text-indent: 0 !important; }
.letter-notice { margin-top: 18px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 4px; font-size: 17px; line-height: 1.6; }
.letter-notice ul { margin: 6px 0 0; padding-left: 20px; }
.done-note { color: var(--ok); font-weight: 800; text-align: center; }

/* ── 서명 슬롯 ── */
.sig-slots { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.signing-group h3 { margin: 10px 0 6px; font-size: 16px; }
.signing-groups .sig-slots { margin-bottom: 8px; }
.sig-slot {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 8px; align-items: center;
  padding: 10px 12px; border-radius: 4px; border: 2px solid var(--line); background: var(--surface);
}
.sig-slot-who { display: flex; flex-direction: column; min-width: 0; }
.sig-slot-role { color: var(--muted); font-size: 15px; }
.sig-thumb { width: 110px; height: 52px; object-fit: contain; background: #fff; border-radius: 4px; border: 1px solid var(--line); }
.sig-missing { font-size: 15px; color: var(--muted); text-align: center; }
ul.sig-slots .sig-slot { grid-template-columns: minmax(0, 1fr) 110px; }

/* ── 전체 화면 서명 ── */
.sig-view {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column;
  background: var(--bg);
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.sig-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.sig-who { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.sig-counter { font-size: 15px; color: var(--muted); font-weight: 700; }
.sig-role { font-size: 17px; color: var(--muted); }
.sig-name { font-size: 22px; }
.sig-rotate { margin: 6px 12px 0; font-size: 15px; color: var(--muted); text-align: center; }
@media (orientation: landscape) { .sig-rotate { display: none; } }
.sig-surface {
  position: relative; flex: 1; min-height: 180px;
  margin: 10px 12px;
  border-radius: 4px; border: 2px dashed var(--line);
  background: #ffffff; /* 잉크가 검정이므로 항상 흰 바탕 (저장 이미지는 투명) */
  overflow: hidden;
}
.sig-surface::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: 28%; border-bottom: 2px solid #c9d1dc; pointer-events: none; }
.sig-area { position: absolute; inset: 0; z-index: 2; }
.sig-guide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9aa5b1; font-size: 22px; pointer-events: none; }
.sig-existing { position: absolute; inset: 10%; width: 80%; height: 80%; object-fit: contain; pointer-events: none; }
.sig-actions { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; padding: 8px 12px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.sig-actions .btn[hidden] { display: none; }
.sig-actions:has(> .btn[hidden]) { grid-template-columns: 1fr 1.6fr; }
@media (orientation: landscape) and (max-height: 500px) {
  .sig-head { padding: 2px 10px; }
  .sig-head .icon-btn { height: 44px; }
  .sig-surface { margin: 6px 10px; }
  .sig-actions { padding: 6px 10px 8px; }
  .sig-actions .btn { min-height: 46px; }
}

/* ── 보고 ── */
.range { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ledger-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ledger-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; padding: 10px 12px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); }
.ledger-no { font-weight: 800; color: var(--muted); text-align: center; }
.ledger-remark { display: block; font-size: 15px; }
.copy-block { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.copy-head { display: flex; align-items: center; justify-content: space-between; }

/* ── 대화상자 ── */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgb(0 0 0 / 55%); display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.modal { width: 100%; max-width: 480px; background: var(--surface); color: var(--text); border-radius: 4px; padding: 20px 18px calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: none; }
.modal h2 { font-size: 21px; margin-bottom: 10px; }
.modal-msg { white-space: pre-line; font-size: 18px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.modal-actions.stack { display: flex; flex-direction: column; }
@media (min-width: 600px) { .modal-backdrop { align-items: center; } }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 16px); z-index: 300;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 4px;
  background: #111827; color: #fff; font-weight: 700; text-align: center;
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.busy { position: fixed; inset: 0; z-index: 250; background: rgb(0 0 0 / 55%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; font-weight: 700; font-size: 19px; }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 5px solid rgb(255 255 255 / 30%); border-top-color: #fff; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } #toast { transition: none; } }

@media (max-width: 380px) {
  .sig-slot { grid-template-columns: minmax(0, 1fr) 84px auto; }
  .sig-thumb { width: 84px; }
  ul.sig-slots .sig-slot { grid-template-columns: minmax(0, 1fr) 84px; }
}
/* PRD 4.1 readable forms */
.topbar { position: static; }
.topbar h1 { white-space: normal; overflow: visible; text-overflow: clip; padding: 12px 0; }
.actionbar { position: static; box-shadow: none; }
.shell.has-actions .content { padding-bottom: 24px; }
.content { max-width: 760px; padding-top: 24px; }
.form { gap: 24px; }
.field { gap: 8px; }
.field label, .label, .req, .sig-slot-role, .sig-missing, .sig-counter, .sig-rotate { font-size: 16px; }
input[type=password], input[type=email], input[type=number] { width:100%; min-width:0; min-height:52px; padding:12px 14px; border:2px solid var(--line); border-radius: 4px; background:var(--surface); color:var(--text); font:inherit; }
input,textarea,select { scroll-margin-block: 24px; }
textarea { min-height: 112px; resize: vertical; }
::placeholder { color: var(--muted); opacity:1; }
input:focus,textarea:focus,select:focus { outline:3px solid var(--primary); outline-offset:2px; box-shadow: none; }
.field-error { color:var(--danger); font-size:16px; margin:0; font-weight:700; }
[aria-invalid=true] { border-color:var(--danger) !important; }
.save-status { padding:16px; border:1px solid var(--line); border-radius: 4px; background:var(--surface); margin-bottom:20px; }
.save-status p { margin:0; }
.save-status.failed { border-color:var(--danger); }
.save-status.failed p { color:var(--danger); margin-bottom:12px; }
.segmented { flex-wrap:wrap; }
.segmented button { min-width:120px; padding:10px; }
.att-row { align-items:end; gap:12px; padding-block:10px; }
.item-row { grid-template-columns:minmax(0,1fr) 44px; gap:12px; }
.item-row .item-num { display:none; }
.sig-guide { color:#4b5563; }
.modal { max-height:90dvh; overflow:auto; }
.modal .field { margin-top:16px; }
details.more summary { min-height:44px; }
#toast { position:fixed; bottom:16px; font-size:16px; }
body:has(input:focus) #toast, body:has(textarea:focus) #toast { display:none; }
@media(max-width:600px) {
 .form .row2, .range .row2 { grid-template-columns:1fr; }
 .att-row { grid-template-columns: minmax(0,1fr); border-bottom:1px solid var(--line); }
 .att-row .remove { justify-self:end; }
 .sig-slot { grid-template-columns:minmax(0,1fr) 84px; }
 .sig-slot .btn { grid-column:1/-1; width:100%; }
 .sig-thumb { width:84px; }
 .modal-actions { grid-template-columns:1fr; }
}
input[type=search] { width:100%; min-width:0; min-height:52px; padding:12px 14px; border:2px solid var(--line); border-radius: 4px; background:var(--surface); color:var(--text); font:inherit; }
.check-row { display:flex; align-items:center; gap:12px; min-height:44px; padding:8px; }
.check-row input { width:24px; height:24px; flex:none; }
.menu { display:flex; flex-direction:column; gap:14px; }
.menu-item { background:var(--surface); border:1px solid var(--line); border-radius: 4px; padding:20px; }
.modal.preview { max-width:1000px; height:90dvh; display:flex; flex-direction:column; gap:12px; }
.modal.preview iframe { flex:1; width:100%; border:0; min-height:300px; }
input[type=file] { font:inherit; width:100%; min-width:0; }
input[type=file]::file-selector-button { font:inherit; min-height:44px; padding:8px; margin-right:8px; }
.review-content { margin:16px 0 28px; padding:20px; background:var(--surface); border:1px solid var(--line); border-radius: 4px; }
.review-content dt { font-weight:700; margin-top:16px; }
.review-content dt:first-child { margin-top:0; }
.review-content dd { margin:6px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.sig-guide { color:#4b5563; }
.sig-view { overflow-y:auto; }
.sig-head,.sig-actions { flex-shrink:0; }
/* Pastel navigation and three-step journal flow. */
.home-screen { max-width: 880px; margin: 0 auto; }
.home-intro { margin: 16px 0 28px; }
.home-intro h2 { font-size: clamp(1.35rem, 4vw, 1.8rem); line-height: 1.5; margin: 6px 0; }
.eyebrow { color: var(--muted); font-size: .95rem; }
.home-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.home-card { display: flex; align-items: flex-start; gap: 14px; min-height: 142px; padding: 24px; border-radius: 4px; color: #202936; text-decoration: none; border: 0; }
.home-card.blue { background:#A2C0E5; }.home-card.yellow { background:#FEE9B4; }.home-card.green { background:#8CC66C; }.home-card.pink { background:#EF9099; }
.home-card.purple { grid-column: 1 / -1; min-height: 100px; background:#f2e2fb; }
.home-card.wide { grid-column: 1 / -1; min-height: 100px; }
/* 첫 화면 업무 카드: 아이콘·제목·설명을 가로·세로 가운데 정렬, 두 카드 크기 동일 */
.task-menu { grid-auto-rows: 1fr; }
.home-card.task { flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 200px; padding: 24px 16px; text-align: center; }
.home-card.task .menu-icon { width: 44px; height: 44px; }
.home-card.task > div { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.home-card.task strong { margin: 0; text-align: center; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.home-card.task .menu-desc { margin: 0; text-align: center; word-break: keep-all; overflow-wrap: anywhere; }
.org-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; margin:12px 0 4px; border-radius:4px; background:var(--surface); }
.org-bar strong { font-size:1.1rem; }.org-bar .eyebrow { margin:0 0 2px; }
.home-card .menu-icon { display:grid; place-items:center; flex-shrink:0; width:34px; height:34px; background:#ffffff80; border-radius: 4px; font-size:1.35rem; }
.home-card strong { display:block; font-size:1.15rem; margin:2px 0 8px; }
.home-card .menu-desc { color:#24364b; display:block; font-size:.95rem; line-height:1.5; }
.home-card:hover { outline:2px solid #556173; outline-offset:2px; }
.flow-steps {
  --step-gap: clamp(12px, 3vw, 20px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--step-gap);
  list-style: none; margin: 0 0 14px; padding: 0;
}
.flow-steps li { position: relative; min-width: 0; }
.flow-steps li + li::before {
  content: ''; position: absolute; top: 50%; left: calc(var(--step-gap) / -2);
  width: 5px; height: 5px; border-top: 1px solid var(--muted); border-right: 1px solid var(--muted);
  transform: translate(-65%, -50%) rotate(45deg); pointer-events: none;
}
.flow-step-button {
  width: 100%; height: 44px; padding: 0 2px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text);
  font: inherit; font-size: clamp(13px, 3.9vw, 16px); font-weight: 650; text-align: center; white-space: nowrap;
  cursor: pointer;
}
.flow-step-button[aria-current="step"] { background: var(--primary-soft); color: var(--text); font-weight: 750; }
.flow-step-button:disabled { opacity: 1; cursor: default; }
.flow-step-button:not([aria-current]):disabled { color: var(--muted); }
.content-sections { display:grid; gap:28px; }.input-section { padding:24px; border-radius: 4px; background:var(--surface); }.input-section h2 { margin:0 0 20px; font-size:1.2rem; }
.form-heading { margin:0 0 24px; font-size:1.35rem; }
@media(max-width:520px) { .home-menu { gap:12px; }.home-card { flex-direction:column; min-height:172px; padding:18px; gap:10px; }.home-card.purple, .home-card.wide { flex-direction:row; min-height:100px; }.home-card.task { flex-direction:column; min-height:190px; padding:20px 12px; gap:12px; }.home-card strong { font-size:1.05rem; }.home-card .menu-desc { font-size:.9rem; }.input-section { padding:18px 14px; } }


input[type=file]::file-selector-button { border-radius:4px; }
button, input, textarea, select { border-radius:4px; }

/* 기관정보 설정 화면: 안내 문장만 가운데, 라벨·입력칸·오류는 왼쪽 정렬(위에서 아래로 훑어 읽기 쉽게).
   예시 문구(placeholder)는 연하게·입력값은 진하게 */
.org-section .lead { text-align: center; }
.org-section .field label, .org-section .field-error, .org-section .hint { text-align: left; }
.org-section input { text-align: left; color: #111111; }
.org-section input::placeholder { color: #A0A8B3; opacity: 1; text-align: left; }
.org-section .opt { color: var(--muted); font-weight: 400; }
/* 화면 전체 안내: 마지막 입력칸 설명처럼 보이지 않게 띄운다 */
.org-section .org-note { margin-top: 28px; }
@media (prefers-color-scheme: dark) { .org-section input { color: var(--text); } }

/* 기관정보 설정: 첫 화면으로 돌아가기 버튼 (흰 배경·연한 회색 테두리·검은 글씨, 저장 버튼과 같은 너비) */

/* 공사 작성 화면: 기관명은 한 줄 읽기 전용, 자동저장 상태는 입력창 아래 작은 문구 */
.org-line { display: flex; align-items: baseline; gap: 10px; margin: 0; color: var(--muted); font-size: 16px; }
.org-line strong { color: var(--text); font-size: 17px; }
.save-status.compact { padding: 0; border: 0; background: transparent; margin: 4px 0 0; }
.save-status.compact p { font-size: 14px; color: var(--muted); }
.save-status.compact.failed p { color: var(--danger); font-size: 15px; }

/* 공사 2단계: 현재 단계 강조, 소통일시 영역 여백 축소, 장소 콤보박스 */
.input-section.tight { padding: 14px 18px; }
.input-section.tight h2 { margin: 0 0 12px; }
.input-section.tight .form { gap: 12px; }
.combo { position: relative; }
.combo input { width: 100%; padding-right: 48px; }
.combo-toggle { position: absolute; top: 0; right: 0; width: 44px; height: 100%; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.combo-list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 2px); margin: 0; padding: 4px; list-style: none; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.combo-list[hidden] { display: none; }
.combo-list li { padding: 12px 14px; border-radius: 4px; font-size: 17px; cursor: pointer; text-align: left; }
.combo-list li:hover, .combo-list li[aria-selected="true"] { background: var(--surface-2); }

/* 공사 1단계: 공사명 입력창은 한 줄 높이(52px)에서 시작해 자동으로 늘어남 */
textarea.auto-grow { resize: none; overflow: hidden; height: 52px; min-height: 52px; }

/* 공사 2단계: 협의 및 안내 내용 체크박스 그룹, 서한문 연결 영역 */
fieldset.group.discuss { gap: 6px; padding: 8px 12px 10px; }
fieldset.group.discuss legend { font-weight: 700; padding: 0 6px; }
.letter-panel { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 8px 32px; }
.letter-panel[hidden] { display: none; }

/* 공사 2단계: 학교·기관 측(①③)과 업체 측(②) 영역을 파스텔 색 띠로 구분 */
.input-section.side-org { box-shadow: inset 6px 0 0 #A2C0E5; }
.input-section.side-vendor { box-shadow: inset 6px 0 0 #FEE9B4; }

/* 하위 화면 공통 이동 버튼 */
.screen-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.btn.screen-nav-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; font-size: 16px; }
.screen-nav-btn span { font-size: 18px; line-height: 1; }
@media (max-width: 360px) {
  .btn.screen-nav-btn { padding-inline: 8px; font-size: 15px; gap: 4px; }
}
/* 직접 입력 항목 */
.custom-row { display: flex; align-items: center; gap: 8px; }
.custom-row input { flex: 1; min-width: 0; }
fieldset.group.discuss.custom { gap: 8px; }

/* 공사 2단계 입력창(업체 의견·기관 답변·직접 입력 항목): 예시 문구는 연하게, 입력값은 진하게 */
.input-section.side-vendor textarea,
.input-section.side-org textarea,
fieldset.custom .custom-row input { color: #111111; }
.input-section.side-vendor textarea::placeholder,
.input-section.side-org textarea::placeholder,
fieldset.custom .custom-row input::placeholder { color: #A0A8B3; opacity: 1; }
@media (prefers-color-scheme: dark) {
  .input-section.side-vendor textarea,
  .input-section.side-org textarea,
  fieldset.custom .custom-row input { color: var(--text); }
}

.info-card dd.sched-overdue { color: var(--danger); font-weight: 700; }

/* 공사 관계자 소통 협의회 날 관리 화면: 새 소통일지 작성 + 2열×2행 동일 카드 */
.fac-task .fac-org { margin: 0 0 12px; text-align: center; color: var(--muted); font-size: 1rem; }
.fac-task .fac-new { min-height: 52px; margin-bottom: 16px; }
.fac-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: 112px; gap: 16px; }
.fac-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-width: 0; height: 112px; padding: 8px 12px; border-radius: 4px; box-shadow: none; text-decoration: none; text-align: center; color: #111111; }
.fac-card.green { background: #8CC66C; }.fac-card.pink { background: #EF9099; }.fac-card.yellow { background: #FEE9B4; }.fac-card.purple { background: #EED9F7; }
.fac-card .menu-icon { display: grid; place-items: center; width: auto; height: auto; background: none; border-radius: 0; color: #111111; }
.fac-card strong { margin: 0; color: #111111; font-weight: 700; font-size: 1.1rem; word-break: keep-all; overflow-wrap: anywhere; }
.fac-card:hover { outline: 2px solid #556173; outline-offset: 2px; }
.fac-task .fac-menu { grid-auto-rows: minmax(140px,auto); }
.fac-task .fac-card { height: 100%; min-height: 140px; border: 0; border-radius: 0; font: inherit; cursor: pointer; }
.fac-task .fac-card .menu-desc { color: #343b43; font-size: .9rem; line-height: 1.4; }
.fac-sub { display: grid; gap: 10px; margin-top: 20px; }
.fac-task .fac-card:focus-visible { outline: 3px solid #345c87; outline-offset: 3px; }
@media (max-width: 520px) { .fac-task .fac-menu { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 340px) { .fac-menu { grid-template-columns: minmax(0,1fr); gap: 12px; } }
@media (max-width: 520px) { .fac-menu { gap: 12px; } }

/* 작성내역 선택 삭제: 기본 목록은 그대로, 선택 모드에서만 체크박스 표시 */
.sel-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.sel-bar:empty { display: none; }
.sel-bar.mode { justify-content: space-between; padding: 6px 4px; }
.sel-all { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; cursor: pointer; }
.sel-all input, .sel-check input { width: 24px; height: 24px; flex: none; accent-color: var(--primary, #1a56a8); }
.sel-count { color: var(--muted); font-weight: 700; }
.sel-row { display: flex; align-items: stretch; gap: 8px; }
.sel-row > .menu-item { flex: 1; min-width: 0; }
.sel-check { display: grid; place-items: center; width: 48px; flex: none; cursor: pointer; }
.sel-spacer { width: 48px; flex: none; }
.sel-row.on > .menu-item { outline: 2px solid #556173; outline-offset: -2px; }
.menu-item.sel-off { opacity: .55; cursor: default; }
.sel-foot { position: sticky; bottom: 0; padding: 12px 0 4px; background: var(--bg, transparent); }
.sel-foot[hidden] { display: none; }

/* 2단계(소통내용·협의 내용) 가독성: 길이·반복 설명·여백 축소. 공사·일반 두 업무가 함께 쓴다 */
.fac-step2 { gap: 18px; }
.fac-step2 .input-section { padding: 20px 22px; }
.fac-step2 .input-section h2 { margin: 0 0 14px; font-size: 18px; }
.fac-step2 .input-section.tight { padding: 20px 22px; }
.fac-step2 .input-section.tight h2 { margin: 0 0 14px; }
.fac-step2 .form { gap: 14px; }
.fac-step2 .field { gap: 6px; }
.fac-step2 .field label, .fac-step2 .label { font-size: 15px; font-weight: 700; }
.fac-step2 input[type=text], .fac-step2 input[type=date], .fac-step2 select, .fac-step2 textarea { font-size: 16px; }
.fac-step2 .hint { font-size: 13px; line-height: 1.5; color: var(--muted); }
.fac-step2 .check-row { font-size: 16px; min-height: 44px; padding: 4px 8px; }
.fac-step2 .check-group { display: flex; flex-direction: column; gap: 12px; }
.fac-step2 fieldset.group.discuss { gap: 12px; padding: 10px 14px 14px; }
.fac-step2 fieldset.group.discuss legend { font-size: 15px; }
.fac-step2 .pre-notice { display: flex; flex-direction: column; gap: 4px; }
.fac-step2 textarea { min-height: 72px; resize: none; overflow: hidden; line-height: 1.5; padding: 10px 14px; }
@media (max-width: 600px) { .fac-step2 .input-section { padding: 18px 16px; } }
/* 참석자: 직위·성명을 한 행에, 추가·삭제 버튼 크기 통일, 빈 그룹은 한 줄 */
.fac-step2 fieldset.group { gap: 8px; padding: 8px 12px 12px; }
.fac-step2 fieldset.group legend { font-size: 15px; font-weight: 800; }
.fac-step2 .att-row { grid-template-columns: minmax(0,1.1fr) minmax(0,1.3fr) 44px; align-items: end; gap: 8px; padding-block: 0; border-bottom: 0; }
.fac-step2 .att-row input { padding-inline: 8px; }
.fac-step2 .att-row .field label { font-size: 14px; }
.fac-step2 .att-row .remove { justify-self: end; width: 44px; height: 44px; min-height: 44px; padding: 0; }
.fac-step2 .btn.small.add { align-self: flex-start; min-height: 44px; }
.fac-step2 .att-empty { margin: 0; }
.fac-step2 .custom-row .remove { width: 44px; height: 44px; min-height: 44px; padding: 0; }
.fac-step2 textarea, .fac-step2 input[type=text], .fac-step2 input[type=date] { color: #111111; }
.fac-step2 input::placeholder, .fac-step2 textarea::placeholder { color: #A0A8B3; opacity: 1; }
@media (prefers-color-scheme: dark) { .fac-step2 textarea, .fac-step2 input[type=text], .fac-step2 input[type=date] { color: var(--text); } }

.journal-detail { display: grid; gap: 12px; min-width: 0; }
.journal-detail-title, .journal-detail-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.journal-detail-title h2 { margin: 0; font-size: 20px; min-width: 0; overflow-wrap: anywhere; }
.journal-detail-state, .journal-detail-meta { margin: 0; color: var(--muted); font-size: 15px; }
.journal-detail-state.complete { color: var(--ok); }
.journal-detail-meta { overflow-wrap: anywhere; }
.inline-pdf-preview { min-width: 0; background: #fff; border: 1px solid #d8dde5; border-radius: 4px; color: #111827; }
.inline-pdf-preview .paged-pdf { display: block; width: 100%; height: 72vh; height: clamp(380px, 74dvh, 900px); border: 0; border-radius: 3px 3px 0 0; }
.pdf-preview-open { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px; color: #1a56a8; font-size: 16px; }
.pdf-preview-message { margin: 0; padding: 20px 12px; color: #4b5563; }
.inline-pdf-preview > .btn { margin: 0 12px 10px; }
.journal-detail-options > .stack { margin-top: 12px; }
@media (max-width: 520px) {
  .inline-pdf-preview .paged-pdf { height: 70vh; height: clamp(320px, 70dvh, 660px); }
}

/* 참석자 행: 소속 입력은 한 줄 전체 폭, 그 아래 직위·성명·삭제 */
.att-row .att-aff { grid-column: 1 / -1; }
.fac-step2 .att-row .att-aff .field label { font-size: 14px; }

/* 첫 화면 세 번째 카드(청렴이행서약서): 2열 그리드 아래 한 줄 전체 폭 */
.home-card.lilac { background: #EED9F7; }
.home-card.task.span2 { grid-column: 1 / -1; min-height: 140px; }
.task-menu { grid-auto-rows: auto; }

/* 계약금액 입력: 오른쪽에 '원' 표시 */
.amount-wrap { position: relative; }
.amount-wrap input { width: 100%; padding-right: 44px; text-align: right; }
.amount-wrap .won { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-weight: 700; }

/* 공사 2단계 체크박스: 세로 간격 약 30% 축소(항목 높이 56→40px), 큰 글씨·터치 영역 유지 */
.fac-step2 .check-row { min-height: 40px; padding: 2px 8px; gap: 12px; align-items: center; line-height: 1.4; }
.fac-step2 .check-group { gap: 0; }
.fac-step2 fieldset.group.discuss { gap: 0; padding: 6px 12px 8px; }
.fac-step2 .form { gap: 12px; }
/* 청렴서한문 영역: 선택했을 때만 보이는 연한 회색 상자 */
.letter-panel[hidden] { display: none; }
.fac-step2 .letter-panel { margin: 4px 0 8px; padding: 12px; border-radius: 4px; background: #f1f3f5; }
.fac-step2 .letter-panel .warn, .fac-step2 .letter-panel .hint { margin: 0 0 8px; }
@media (prefers-color-scheme: dark) { .fac-step2 .letter-panel { background: var(--surface-2, #232b36); } }
/* 직접 입력: 항목이 없으면 상자 없이 추가 버튼만 */
.fac-step2 fieldset.group.discuss.custom.is-empty { border: 0; padding: 0; margin: 0; }
.fac-step2 fieldset.group.discuss.custom.is-empty legend { display: none; }
.fac-step2 fieldset.group.discuss.custom { gap: 8px; }

/* 참석자 서명 목록: 소속·직위(첫 줄) 아래 이름. 길면 줄바꿈하고 서명 버튼·이미지와 겹치지 않는다 */
.sig-slot-who { overflow-wrap: anywhere; word-break: keep-all; }
.sig-slot-role { line-height: 1.4; }
.sig-slot-who strong { line-height: 1.4; }

/* 첫 화면 업무 카드 두 개: PC·태블릿은 가로 2열, 모바일은 세로 1열(남는 여백 없이 간결하게) */
@media (max-width: 520px) {
  .home-menu.task-menu { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .home-menu.task-menu .home-card.task { min-height: 150px; padding: 20px 16px; }
}

/* 공사 관리 화면: 2×2 카드 아래 가로로 긴 청렴이행서약서 카드 */
.fac-card.blue { background: #A2C0E5; }
.fac-menu .fac-wide { grid-column: 1 / -1; flex-direction: row; gap: 14px; }

/* 외부고객 소통의 날 운영 일지 */
.ext-log { display: grid; gap: 22px; }
.ext-log .form { gap: 18px; }
.ext-log textarea.auto { min-height: 52px; resize: none; overflow: hidden; }
.ext-log .ext-rows textarea.auto { min-height: 80px; }
.ext-log .ext-place { gap: 10px; }
.ext-log .row2 { gap: 18px 12px; }
.ext-log .row2 input { height: 52px; }
/* 협의장소 빠른 선택: 같은 크기, 기본은 연회색 테두리, 고른 장소만 파란색 */
.ext-places { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.ext-places .chip { min-height: 48px; padding: 6px 8px; border-color: var(--line); background: var(--surface); color: var(--text); word-break: keep-all; }
.ext-places .chip[aria-pressed=true] { border-color: var(--primary); background: var(--primary); color: var(--primary-text); }
input[type=time] { width: 100%; min-width: 0; min-height: var(--tap); padding: 10px 14px; border: 2px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); font: inherit; font-size: 18px; }
.ext-rows { display: flex; flex-direction: column; gap: 8px; }
.ext-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; align-items: start; }
.ext-cell { min-width: 0; }
.ext-cell-label { display: none; }
.ext-head { font-weight: 700; font-size: 16px; text-align: center; }
.ext-head span:not(:empty) { padding: 10px 6px; border-radius: 4px; background: var(--surface-2); }
.ext-row .remove:disabled { opacity: .35; cursor: not-allowed; }
.ext-log .segmented button { min-width: 130px; }
.ext-log textarea::placeholder, .ext-log input::placeholder { color: #A0A8B3; }
@media (max-width: 600px) {
  .ext-head { display: none; }
  .ext-row { grid-template-columns: minmax(0, 1fr) 44px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .ext-cell { grid-column: 1; }
  .ext-cell-label { display: block; margin-bottom: 4px; font-size: 16px; font-weight: 700; }
  .ext-row .remove { grid-column: 2; grid-row: 1; }
}

/* 계약상대자 만족도 조사 명단(청렴 외부고객과 소통의 날) 화면 */
.ledger-screen { gap: 18px; }
.ledger-screen .range { margin: 0; }
.ledger-screen .form { gap: 14px; }
.ledger-screen fieldset.group { gap: 2px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
@media (max-width: 600px) { .row3 { grid-template-columns: minmax(0, 1fr); } }

/* 청렴 외부고객과 소통의 날 1단계(계약 기본정보): 입력창 높이·너비 통일, 간격 정리, 가운데 정렬 */
.gen-basics, .basics-actions { width: 100%; max-width: 650px; margin-inline: auto; }
.content:has(.gen-basics) { max-width: 682px; }
/* 카드는 650px, 입력창은 기존 너비(552px) 유지 */
@media (min-width: 700px) { .gen-basics .input-section.form { padding-inline: 49px; } }
/* 진행 단계: 카드 너비에 맞춰 같은 간격으로 */
.gen-basics .input-section.form { gap: 22px; }
.gen-basics .input-section h2 { margin: 0; }
.gen-basics .field { gap: 8px; }
.gen-basics .field input, .gen-basics .field textarea { width: 100%; min-height: 52px; padding: 10px 14px; font-size: 18px; line-height: 1.5; }
.gen-basics .field input { height: 52px; }
.gen-basics .save-status.compact { margin: 0; }
.gen-basics .save-status.compact:not(.failed) p { color: #9CA3AF; }
/* 화면이 낮아도 다음 버튼이 보이도록 아래에 붙인다(입력칸을 가리지 않게 여백 확보) */
.shell:has(.gen-basics) .actionbar { position: sticky; bottom: 0; }
.gen-basics input, .gen-basics textarea { scroll-margin-bottom: 110px; }
.actionbar-inner > .basics-actions { flex: 0 1 650px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px; }
.basics-actions .btn { padding-inline: 8px; }
@media (max-width: 400px) { .basics-actions .btn { font-size: 16px; } }

/* 첫 화면 업무 카드: 높이를 약 12% 줄이고 두 카드의 크기·간격·글자 크기를 통일 */
.home-menu.task-menu { grid-auto-rows: 1fr; gap: 16px; }
.home-menu.task-menu .home-card.task { min-height: 175px; padding: 18px 16px; gap: 12px; }
.home-menu.task-menu .home-card.task strong { font-size: 1.15rem; line-height: 1.4; }
.home-menu.task-menu .home-card.task .menu-desc { font-size: .95rem; line-height: 1.5; }
@media (max-width: 520px) {
  .home-menu.task-menu { gap: 12px; }
  .home-menu.task-menu .home-card.task { min-height: 132px; padding: 12px 16px; gap: 8px; }
  .home-menu.task-menu .home-card.task > div { gap: 4px; }
}

/* 청렴 외부고객과 소통의 날 메인: 같은 크기 카드 2×2(모바일 1열) + 보조 메뉴 */
.gen-task .home-intro { margin: 8px 0 16px; }
.gen-task .home-intro .eyebrow { margin: 0 0 4px; }
.segmented[aria-label="출력 문서"] button { min-width: 0; padding-inline: 4px; }

/* 계약상대자 만족도 조사 명단 */
.survey { display: grid; gap: 8px; min-width: 0; }
.survey-roster { display:grid; gap:8px; min-width:0; padding:14px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.survey-roster-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; }
.survey-roster-head h2 { margin:0; font-size:19px; line-height:1.4; }
.survey-roster-head .btn.document-button { min-height:44px; margin-inline-start:auto; }
.survey-roster > .hint { margin:0; }
#survey-kedu-import { min-width:0; }
#survey-kedu-import:empty, .survey-contacts-host:empty, .actionbar:has(.survey-export[hidden]) { display:none; }
.survey-selection { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.survey-select-all { padding: 0 8px; gap: 8px; }
.survey-select-all input { margin: 0; }
.survey-list { display: flex; flex-direction: column; gap: 8px; }
.survey-card { border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.survey-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 8px; }
.survey-head .sel-check { width: 32px; min-height: 40px; }
.survey-head .sel-check input { margin: 0; }
.survey-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.survey-title strong, .survey-vendor { overflow-wrap: anywhere; line-height: 1.35; }
.survey-vendor { font-size: 16px; font-weight: 400; color: var(--text); }
.survey-head .badges { grid-column: 2 / -1; margin: 0; }
@media (max-width: 380px) {
  .survey-head { grid-template-columns: auto minmax(0,1fr); }
  .survey-head > .btn { grid-column: 2; justify-self: start; }
}
.survey-head .badges:empty { display: none; }
.btn.survey-edit { min-height: 36px; padding: 4px 8px; font-size: 14px; white-space: nowrap; color: var(--primary); }
.btn.survey-edit[aria-expanded=true] { background: var(--primary-soft); }
.badge.need { background: var(--warn-soft); color: var(--text); border-color: #e3b341; }
.survey-body { display: flex; flex-direction: column; gap: 16px; padding: 12px; border-top: 1px solid var(--line); }
.survey-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; align-items: start; }
.survey-field label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 28px; }
.survey-field input { height: 52px; font-size: 18px; width: 100%; min-width: 0; padding: 10px 14px; border: 2px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); font-family: inherit; }
.survey-field.missing input { border-color: #e3b341; background: var(--warn-soft); }
.survey-field.auto input { background: var(--surface-2); }
.survey-tag { padding: 1px 8px; border-radius: 4px; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.survey-tag.auto { background: var(--primary-soft); color: var(--text); }
.survey-tag.missing { background: #FEE9B4; color: #202936; }
.survey-revert { border: 0; background: transparent; color: var(--primary); font: inherit; font-size: 14px; text-decoration: underline; min-height: 28px; padding: 0 4px; cursor: pointer; }
.survey-note { font-size: 14px; }
.survey-body > .btn { align-self: flex-start; }
.modal.wide { max-width: 760px; }
.survey-picks { max-height: 50dvh; overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
.survey-pick { border-bottom: 1px solid var(--line); align-items: flex-start; }
.survey-pick strong { overflow-wrap: anywhere; }
.survey-pick.used { background: var(--surface-2); }
.survey-table { overflow-x: auto; max-height: 45dvh; overflow-y: auto; border: 1px solid var(--line); margin-bottom: 12px; }
.survey-table table { border-collapse: collapse; width: 100%; font-size: 15px; }
.survey-table th, .survey-table td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; overflow-wrap: anywhere; min-width: 64px; }
.survey-table th { background: var(--surface-2); position: sticky; top: 0; }
.survey-table tr.no td { color: var(--muted); }
@media (max-width: 600px) {
  .survey-grid { grid-template-columns: minmax(0, 1fr); }
}

/* 작성 화면 공통(공사·일반): 저장 상태는 작은 연회색 글씨, 진행 단계는 같은 간격 */
.wiz .context-line { margin-bottom: 10px; }
.wiz .save-status.compact { margin: 10px 0 0; }
.wiz .save-status.compact:not(.failed) p { color: #9CA3AF; }
.wiz > .warn { margin: 0 0 14px; font-weight: 700; }
/* 일반 업무: 1단계 카드와 같은 650px */
.content:has(.gen-wiz) { max-width: 682px; }
.shell:has(.gen-wiz) .actionbar-inner { max-width: 650px; }
/* 협의 장소 버튼: 기본은 연회색 테두리, 고른 장소만 파란색 */
.fac-step2 .chip { min-height: 44px; border-color: var(--line); background: var(--surface); font-size: 16px; }
.issue-examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); grid-auto-rows: 1fr; }
.issue-examples .chip { min-width: 0; padding-inline: 8px; word-break: keep-all; }
.issue-examples .chip[aria-disabled=true] { color: var(--muted); cursor: default; }
.fac-step2 .chip[aria-pressed=true] { border-color: var(--primary); background: var(--primary-soft); color: var(--text); font-weight: 700; }
.fac-step2 .item-row .field label { font-size: 15px; }
.fac-step2 input[type=file] { font-size: 16px; }

/* 작성 중인 협의회 이어서 작성 선택 */
.btn.resume { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; overflow-wrap: anywhere; }
.resume-list { max-height: 65dvh; overflow-y: auto; }

/* 청렴서한문 작성 */
.letter-write { display: grid; gap: 18px; }
.letter-write .form { gap: 16px; }
.letter-write .letter-info { display: grid; gap: 8px; padding-block: 12px; min-width: 0; }
.letter-head, .letter-head-actions { display: flex; align-items: center; gap: 6px; }
.letter-head { flex-wrap: wrap; }
.letter-head h2 { margin: 0; }
.letter-head-actions { margin-inline-start: auto; }
.letter-info > .btn { justify-self: start; }
.letter-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.letter-fields > * { min-width: 0; }
.letter-write-date { width: min(100%, 340px); }
.letter-picker-slot { display: contents; }
.letter-picker .stack { margin-block-start: 6px; max-height: 20rem; overflow: auto; padding: 4px; }
.letter-choice { display: grid; gap: 4px; text-align: start; overflow-wrap: anywhere; }
.letter-choice span { color: var(--muted); font-size: .875em; }
.letter-write .letter { overflow-wrap: anywhere; }
.letter-write .letter-title { font-size: 32px; font-weight: 800; }
.letter-write :is(input[type=text], input[type=search]) { min-height: 42px; padding-block: 6px; line-height: 1.4; }
.letter-fields input::placeholder { color: #949ba5; opacity: 1; }
.letter-write .btn, .letter-write .date-quick, .letter-write .date-cal-btn:not(.date-cal-icon-btn),
.document-actions.letter-write-actions > .btn { min-height: 42px; padding: 6px 10px; font-size: 15px; white-space: nowrap; }
.letter-write .letter-choice { white-space: normal; }
.letter-output, .sms-output { display: grid; gap: 6px; min-width: 0; }
.external-action.btn, .sms-output > .btn { min-height: 42px; padding: 6px 10px; font-size: 15px; gap: 8px; }
.letter-output .external-action { white-space: nowrap; }
.sms-output { grid-auto-rows: 1fr; }
.sms-output .external-action { word-break: keep-all; }
.letter-mail-icon, .sms-system-icon, .external-action-icon { position: relative; flex: none; }
.letter-mail-icon { width: 16px; height: 12px; border: 1.5px solid currentColor; border-radius: 2px; overflow: hidden; }
.letter-mail-icon::before { content: ''; position: absolute; width: 9px; height: 9px; top: -5px; left: 2px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.sms-system-icon { width: 16px; height: 12px; border: 1.5px solid currentColor; border-radius: 3px; }
.sms-system-icon::before { content: ''; position: absolute; top: 3px; left: 3px; width: 8px; border-top: 1px solid currentColor; }
.sms-system-icon::after { content: ''; position: absolute; bottom: -3px; left: 2px; width: 4px; height: 4px; border: solid currentColor; border-width: 0 0 1.5px 1.5px; background: var(--surface); transform: skewY(-35deg); }
.external-action-icon { width: 14px; height: 14px; border: 1.5px solid currentColor; border-block-start-color: transparent; border-inline-end-color: transparent; border-radius: 2px; }
.external-action-icon::before { content: ''; position: absolute; inset: 0 1px auto auto; width: 6px; height: 6px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; }
.external-action-icon::after { content: ''; position: absolute; right: 2px; top: 1px; width: 10px; border-top: 1.5px solid currentColor; transform: rotate(-45deg); transform-origin: right; }
.letter-topic-placeholder { color: #707780; }
@media (prefers-color-scheme: dark) {
  .letter-topic-placeholder { color: #b6c0cc; }
}
@media (max-width: 520px) {
  .letter-fields { grid-template-columns: minmax(0, 1fr); }
}
.letter-write .letter { margin-bottom: 0; }

/* 외부고객 소통의 날 운영 일지: 작성 화면 상단(작성내역 링크)·기관명·빈 서식 접힘 영역 */
.ext-orgname { margin: 0; padding: 12px 14px; border-radius: 4px; background: var(--surface-2); font-weight: 700; overflow-wrap: anywhere; }

/* 청렴 외부고객과 소통의 날 첫 화면: 업무 흐름별 두 묶음(작은 제목) */

/* 청렴 외부고객과 소통의 날 첫 화면 가독성: 단계 제목(18px 굵게)·설명(16px)을 구분하고 카드 높이는 내용에 맞춘다(터치 영역 44px 이상 유지) */
.gen-task .home-intro { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; margin: 4px 0 0; }
.gen-task .home-intro .eyebrow { margin: 0; font-weight: 700; }
.gen-group, .gen-sub { margin-top: 22px; }
.gen-group-title { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 800; color: var(--text); }
.gen-sub { padding-top: 16px; border-top: 1px solid var(--line); }
.gen-menu.home-menu { grid-auto-rows: 1fr; gap: 10px; }
.gen-menu.home-menu.one { grid-template-columns: minmax(0, 1fr); }
.gen-new + .gen-menu.home-menu { margin-top: 10px; }
@media (max-width: 520px) {
  .gen-menu.home-menu { grid-template-columns: minmax(0, 1fr); }
}

/* 외부고객 소통 기록: 단계 표시(완료 ✓는 중립색, 현재 단계만 강조색)·소통일자 확인 표시 */

/* 외부고객 2단계 건의사항·답변 쌍: 좁은 화면은 위아래, 1024px 이상에서만 건의사항 | 답변 2열 */
.issue-pairs { display: flex; flex-direction: column; gap: 14px; margin: 12px 0; }
.issue-pair { display: grid; grid-template-columns: 28px minmax(0, 1fr) 44px; gap: 8px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.issue-pair .pair-cells { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.issue-pair .item-num { padding-top: 40px; font-weight: 800; color: var(--muted); text-align: center; }
.issue-pair .remove { margin-top: 28px; }
.issue-pair .remove:disabled { opacity: .35; cursor: not-allowed; }
@media (min-width: 1024px) { .issue-pair .pair-cells { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; } }

/* 외부고객 메인 메뉴 */
.gen-task :is(.home-card,.gen-new) {
  display: grid; grid-template-columns: 40px minmax(0,1fr); grid-column: auto;
  align-items: center; gap: 12px; min-height: 82px; padding: 12px 14px;
  border: 1px solid #61758c33; border-radius: 4px; text-align: start; color: #192638;
}
.gen-task .home-card.butter { background: #fcf1cf; }
.gen-task .home-card.mint { background: #dff3eb; }
.gen-task .home-card.green { background: #e7f2df; }
.gen-task .home-card.pink { background: #f9e7ed; }
.gen-task .home-card.purple { background: #f0e7f9; }
.gen-task .home-card.blue { background: #e3effc; }
.gen-task .home-card.neutral { background: var(--surface); color: var(--text); border-color: var(--line); }
.gen-task .gen-new { background: #1a56a8; color: white; border-color: transparent; }
.gen-task .menu-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:4px; background:#ffffff9c; }
.gen-task .gen-new .menu-icon { background:#ffffff24; }
.gen-task .neutral .menu-icon { background:var(--surface-2); }
.gen-task :is(.home-card,.gen-new) strong,
.gen-task :is(.home-card,.gen-new) .menu-desc { display:block; margin:0; color:inherit; line-height:1.4; word-break:keep-all; overflow-wrap:anywhere; }
.gen-task :is(.home-card,.gen-new) strong { font-size:19px; font-weight:800; margin-bottom:2px; }
.gen-task :is(.home-card,.gen-new) .menu-desc { font-size:16px; font-weight:500; }
.gen-task :is(.home-card,.gen-new):hover { outline:2px solid var(--muted); outline-offset:1px; }
.gen-task :is(.home-card,.gen-new):focus-visible { outline:3px solid var(--text); outline-offset:2px; }

/* 단계 제목 한 줄(설명글 없음) + 제목 옆 ? 도움말(터치 영역 44px, 보이는 모양은 26px) */
.gen-group-head { display: flex; align-items: center; gap: 2px; margin: 0 0 10px; min-height: 28px; }
.gen-group-head .gen-group-title { margin: 0; }
.help-btn { width: 44px; height: 44px; margin: -8px 0; padding: 0; border: 0; background: transparent; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.help-btn span { width: 26px; height: 26px; border: 1.5px solid var(--text); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; line-height: 1; }
.help-btn:focus-visible { outline: 4px solid var(--focus); outline-offset: 0; }
.help-btn[aria-expanded=true] span { background: var(--text); color: var(--bg); }
.hint-help { display: flex; align-items: center; gap: 2px; min-height: 28px; }
.hint-help > :first-child { margin: 0; }
.gen-help { margin: 0 0 8px; padding: 8px 12px; border-radius: 4px; background: var(--surface-2); color: var(--text); font-size: 16px; line-height: 1.5; }

/* 공통 날짜 입력·달력(브라우저 기본 달력 대신): 입력칸 + 달력/오늘/어제 버튼, 달력은 입력칸 아래에서 펼쳐진다 */
.date-control { display: grid; gap: 6px; min-width: 0; }
.date-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.date-row .date-input { flex: 1 1 150px; width: auto; }
.date-cal-btn, .date-quick, .cal-nav, .cal-close { min-height: 44px; min-width: 44px; padding: 0 12px; border: 2px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.date-cal-btn[aria-expanded=true] { border-color: var(--primary); }
.date-cal-btn:focus-visible, .date-quick:focus-visible, .cal-nav:focus-visible, .cal-close:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.date-row.with-calendar-icon { flex-wrap: nowrap; }
.date-input-wrap { position: relative; flex: 1; min-width: 0; }
.date-input-wrap .date-input { width: 100%; padding-inline-end: 44px; }
.date-cal-btn.date-cal-icon-btn { display: grid; place-items: center; position: absolute; inset-block: 2px; inset-inline-end: 2px; width: 38px; min-width: 0; min-height: 0; border: 0; padding: 0; background: transparent; }
.date-cal-icon-btn[aria-expanded=true] { color: var(--primary); }
.date-calendar-icon { position: relative; width: 17px; height: 16px; border: 1.5px solid currentColor; border-radius: 2px; }
.date-calendar-icon::before { content: ''; position: absolute; inset: 4px 0 auto; border-top: 1.5px solid currentColor; }
.date-calendar-icon::after { content: ''; position: absolute; top: -3px; left: 3px; width: 2px; height: 4px; background: currentColor; box-shadow: 7px 0 currentColor; }
.cal-panel { width: 100%; max-width: 420px; padding: 10px; border: 2px solid var(--line); border-radius: 4px; background: var(--surface); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cal-title { font-size: 18px; text-align: center; flex: 1; }
.cal-nav { font-size: 22px; line-height: 1; padding: 0; }
.cal-dows, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { text-align: center; font-size: 16px; font-weight: 800; padding: 6px 0; border-bottom: 3px solid transparent; }
.cal-dow.sun { color: var(--danger); border-bottom: 3px solid var(--danger); }
.cal-dow.sat { color: var(--primary); border-bottom: 3px dotted var(--primary); }
.cal-day { min-height: 44px; min-width: 0; padding: 0; border: 2px solid transparent; border-radius: 4px; background: transparent; color: var(--text); font: inherit; font-size: 16px; cursor: pointer; }
.cal-day.sun { color: var(--danger); }
.cal-day.sat { color: var(--primary); }
.cal-day.out { color: var(--muted); }
.cal-day.today { border-color: var(--text); font-weight: 800; }
.cal-day.selected { background: var(--primary); border-color: var(--primary); color: var(--primary-text); font-weight: 800; }
.cal-day.selected.today { box-shadow: inset 0 0 0 2px var(--primary-text); }
.cal-day:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.cal-foot { display: flex; justify-content: flex-end; margin-top: 6px; }
@media (max-width: 400px) { .cal-panel { padding: 8px 4px; } }

/* 오프라인 상태 안내: 화면 맨 위 한 곳. 평소에는 숨고, 있을 때만 한 줄로 나타나 아래 화면을 밀어 내린다(입력칸·버튼을 가리지 않음) */
.app-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; padding: 6px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 16px; line-height: 1.5; text-align: center; }
.app-status[hidden] { display: none; }
.app-status .btn { min-height: 44px; }

/* 청렴문자 문자 내용 칸: 높이는 문구 전체에 맞춰 자동으로 늘어난다(스크롤 없이 마지막 줄까지 보임, 글자 크기는 그대로) */
textarea.fit-text { resize: none; min-height: 52px; }

/* 선택 버튼(variant choice): 선택 안 된 쪽도 흰 바탕+테두리, 선택된 쪽은 파란색+✓. 부연은 둘째 줄 작은 글씨 */
.choice-label { display: block; margin-bottom: 6px; font-size: 17px; font-weight: 800; color: var(--text); }
.segmented.choice { gap: 10px; padding: 0; background: transparent; flex-wrap: nowrap; }
.segmented.choice button { flex: 1 1 0; min-width: 0; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); font-size: 17px; font-weight: 800; cursor: pointer; }
.segmented.choice button:hover { border-color: var(--primary); }
.segmented.choice button:focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; }
.segmented.choice button[aria-checked=true] { border-color: var(--primary); background: var(--primary); color: var(--primary-text); }
.segmented.choice .seg-check { display: none; margin-right: 6px; }
.segmented.choice button[aria-checked=true] .seg-check { display: inline; }
.segmented.choice .seg-sub { color: var(--muted); font-size: 15px; font-weight: 400; }
.segmented.choice button[aria-checked=true] .seg-sub { color: var(--primary-text); }

/* 장소 추천 목록: 항목 높이 44px 이상, 항목이 많으면 목록 안에서 스크롤 */
.combo-list { max-height: min(55vh, 460px); overflow-y: auto; }
.combo-list li { display: flex; align-items: center; min-height: 44px; }

.history-total { margin-right: auto; font-weight: 700; }
.sel-bar .btn { min-height: 44px; }
.sel-row.on > .menu-item { background: #eef2fa; }

/* 개별 결과보고: 선택 여부와 무관하게 편집 화면 크기를 유지한다. */
.draft-editor.form { gap: 16px; }
.draft-editor .copy-block { margin-top: 0; }
.report-ending { margin-top: 6px; line-height: 1.65; }
.report-ending-line { display: grid; grid-template-columns: 3em var(--number-column, 0px) minmax(0, 1fr); }
.report-ending-line > :last-child { grid-column: 3; overflow-wrap: anywhere; }
.draft-editor .section-title { margin-top: 0; }
.draft-editor fieldset { margin: 0; min-width: 0; }
.draft-editor input, .draft-editor textarea, .draft-editor select { min-width: 0; }
fieldset.group.delivery-methods { gap: 12px; padding: 4px 12px 8px; }
.delivery-method-row { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.delivery-method-row > .check-row { gap: 8px; min-height: 32px; padding: 0; white-space: nowrap; }
.delivery-method-row > .check-row input { margin: 0; }

/* 기관 설정의 백업 버튼은 같은 크기로 배치한다. */
.org-settings { display: grid; gap: 16px; }
.org-settings > section { min-width: 0; border: 1px solid var(--line); }
.org-settings h2, .org-section h2 { margin-bottom: 14px; }
.org-section .org-fields { display: grid; gap: 14px 16px; }
.org-fields > *, .org-fields input, .org-fields select { min-width: 0; }
.org-fields .field { gap: 4px; }
.org-fields .org-signer { display: grid; gap: 4px; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius); }
.org-signer output { color: var(--text); font-size: 18px; }
.org-section > .btn.primary { margin-top: 16px; }
.org-settings .org-danger { border-inline-start: 4px solid var(--danger); }
.org-danger h2 { color: var(--danger); }
@media (min-width: 600px) {
  .org-section .org-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org-fields > :nth-last-child(-n+2) { grid-column: 1 / -1; }
}
.org-data-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.org-data-actions .btn { margin: 0; height: 100%; }
@media (max-width: 520px) { .org-data-actions { grid-template-columns: 1fr; } }

.activity-photo-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px; }
.activity-photo { min-width:0;display:grid;align-content:start;gap:6px; }
.activity-photo-actions { display:flex;flex-wrap:wrap;gap:6px; }
.photo-caption { min-width:0;width:100%; }
.photo-caption::placeholder { color:#A0A8B3;opacity:1; }
@media (max-width: 480px) { .activity-photo-grid { grid-template-columns:1fr; } }
.photo-thumb { padding:0;border:1px solid var(--line);background:var(--surface);cursor:zoom-in;height:130px; }
.photo-thumb img { width:100%;height:100%;object-fit:contain; }
.photo-large { display:block;max-width:100%;max-height:65vh;object-fit:contain;margin:auto auto 12px; }
.photo-camera { display:none; }
@media (pointer:coarse) { .photo-camera { display:flex; } }

.activity-photos > .row2 { display:flex; flex-wrap:wrap; }
.activity-photos > .row2 > .btn { flex:1; }

.report-downloads { display: grid; gap: 6px; }
.journal-count-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.report-file { display: grid; grid-template-columns: minmax(0, 1fr) min(54%, 340px); align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--border, #dbe1e8); }
.report-file > span { min-width: 0; overflow-wrap: anywhere; }
.document-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--doc-button-min, 138px)), 1fr));
  gap: 6px;
  min-width: 0;
}
.document-actions:has(> .document-action-wide) { display: flex; flex-wrap: wrap; }
.document-actions:has(> .document-action-wide) > .btn { flex: 1 0 138px; }
.document-actions:has(> .document-action-wide) > .document-action-wide { flex-basis: 100%; }
.document-actions > .btn, .btn.document-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 4px 6px;
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
}
.document-actions.survey-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.survey-tools.document-actions > .btn { min-height:44px; font-size:16px; white-space:normal; }
.document-selection { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px 12px; }
.document-selection .check-row, .document-card .check-row { padding:0; cursor:pointer; }
.document-selection > span, .card-extra summary { font-size:15px; color:var(--muted); }
.document-card { min-width:0; display:grid; gap:8px; padding:12px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.document-card h3 { margin:0; font-size:17px; line-height:1.4; word-break:keep-all; overflow-wrap:anywhere; }
.document-card .card-actions { --doc-button-min:108px; }
.document-card .btn { min-height:44px; font-size:15px; }
.card-extra summary { cursor:pointer; }
.card-extra[open] > .btn { margin-top:8px; }
@media (max-width: 580px) {
  .document-actions.survey-tools { grid-template-columns: minmax(0, 1fr); }
}
.document-actions.report-formats { --doc-button-min: 76px; width: min(100%, 340px); justify-self: end; }
.document-actions.report-formats:has(> :only-child) { width: 108px; }
.external-downloads .report-formats { grid-template-columns:repeat(3,minmax(0,1fr)); }
.external-downloads .report-formats [data-action="pdf"] { grid-column:3; }
.external-downloads .report-file > span { word-break:keep-all; }
.external-downloads .report-formats:has(> .device-share:not([hidden])) { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (max-width: 640px) {
  .report-file { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  .document-actions.report-formats:has(> .device-share:not([hidden])) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .external-downloads .report-formats:has(> .device-share:not([hidden])) [data-action="pdf"] { grid-column:auto; }
}

.document-preview-head, .pdf-controls, .pdf-controls > div { display: flex; align-items: center; gap: 6px; }
.document-preview-head { justify-content: space-between; }
.document-preview-head strong { overflow-wrap: anywhere; min-width: 0; }
.document-preview-head .btn { flex: none; }
.pdf-controls { justify-content: center; flex-wrap: wrap; column-gap: 18px; }
.pdf-controls[hidden] { display: none; }
.pdf-controls span { text-align: center; min-width: 4em; }
.paged-pdf { flex: 1; min-height: 0; overflow: auto; background: #e6e9ed; scrollbar-gutter: stable; }
.paged-pdf canvas { display: block; margin-inline: auto; background: #fff; }
.paged-pdf iframe { height: 100%; }
@media (max-width: 480px) {
  .document-preview-head { align-items: flex-start; }
  .modal.preview { padding: 10px; }
}

.sms-preview { margin: 0; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; font: inherit; line-height: 1.65; }
.report-bundles { --doc-button-min: 178px; margin-top: 8px; }

.history-report-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px; }
@media (max-width:440px) { .history-report-row { grid-template-columns:1fr; } .history-report-row > button { justify-self:end; } }

.share-filename { overflow-wrap:anywhere; margin-block:8px; }
.share-status:empty { display:none; }

.actionbar-inner > .survey-export { flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sheet-viewer { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; gap: 6px; }
.sheet-summary { margin: 0; font-size: 14px; }
.sheet-viewport { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; background: #eef1f4; }
.sheet-grid { table-layout: fixed; border-collapse: separate; border-spacing: 0; color: #111; line-height: 1.2; }
.sheet-grid th { position: sticky; background: #edf1f4; color: #424950; font: 12px/1 sans-serif; text-align: center; }
.sheet-grid thead th { top: 0; height: 22px; z-index: 2; }
.sheet-grid tbody th, .sheet-grid thead th:first-child { left: 0; z-index: 1; }
.sheet-grid thead th:first-child { z-index: 3; }
.sheet-grid :is(th, td) { box-sizing: border-box; padding: 0 2px; border-right: 1px solid #d5dbdf; border-bottom: 1px solid #d5dbdf; }
.sheet-grid td > div { overflow: hidden; overflow-wrap: anywhere; }
.sheet-grid .sheet-issue { box-shadow: inset 0 0 0 2px #995500; background-color: #fff2c9 !important; }
.sheet-tabs { display: flex; overflow-x: auto; gap: 4px; }
.sheet-tabs[hidden] { display: none; }
.sheet-tabs .btn { flex: none; }
.sheet-tabs [aria-pressed="true"] { border-color: var(--primary); font-weight: bold; }

.report-photo-groups { display: grid; gap: 12px; }
.report-photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr)); gap: 8px; margin-block-start: 6px; }
.report-photo-item { display: grid; align-content: start; gap: 5px; min-width: 0; }
.report-photo-item .check-row { overflow-wrap: anywhere; }
.report-photo-item .photo-thumb { width: 100%; }

.kedu-upload { padding:10px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.kedu-files { list-style:none; margin:8px 0 0; padding:0; }
.kedu-files li { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; align-items:center; padding:4px 0; }
.kedu-import .kedu-files button[aria-pressed] { white-space:normal; overflow-wrap:anywhere; text-align:left; }
.kedu-row-file { overflow-wrap:anywhere; }
.kedu-files button[aria-pressed="true"] { background:var(--primary-soft); }
.kedu-drop { display:grid; justify-items:center; gap:5px; padding:12px; border:2px dashed var(--primary); border-radius:var(--radius); background:var(--primary-soft); text-align:center; font-size:16px; line-height:1.4; }
.kedu-file-icon { display:grid; place-items:center; color:var(--primary); }
.kedu-drop .kedu-file-types { font-size:15px; color:var(--muted); }
.kedu-drop.dragging { outline:2px solid var(--primary); }
.kedu-import { display:grid; gap:10px; min-width:0; }
.kedu-import .btn { min-height:36px; padding:4px 10px; font-size:15px; white-space:nowrap; }
.kedu-import .kedu-drop .btn { min-height:44px; padding-inline:16px; font-size:16px; }
.kedu-import :is(p, fieldset) { margin:0; }
.kedu-import > [role=status]:empty { display:none; }
.kedu-export-guide { display:grid; gap:6px; padding:4px 2px; font-size:16px; line-height:1.5; }
.kedu-export-guide h2, .kedu-results h3 { font-size:18px; }
.kedu-export-guide h2 { margin:0; }
.kedu-steps { list-style:none; margin:0; padding:0; }
.kedu-export-guide details ol { margin:8px 0; padding-inline-start:24px; }
.kedu-export-guide details li + li { margin-block-start:14px; }
.kedu-guide-image { display:block; width:min(100%, 420px); margin-top:6px; padding:0; background:white; border:1px solid var(--line); cursor:zoom-in; }
.kedu-guide-image img { display:block; width:100%; height:auto; }
.modal.kedu-image-dialog { max-width:1200px; }
.kedu-image-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.kedu-image-head h2 { margin:0; font-size:18px; }
.kedu-image-head .btn { flex:none; min-height:44px; }
.kedu-image-dialog > img { display:block; width:100%; height:auto; }
.kedu-import details.more summary { min-height:32px; }
.kedu-form { display:grid; gap:12px; min-width:0; }
.kedu-grid { display:grid; gap:8px; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); }
.kedu-form details.more[open] > .kedu-grid { display:grid; }
.kedu-form fieldset { min-width:0; }
.kedu-grid > .field { min-width:0; margin:0; }
.kedu-grid :is(select,input) { width:100%; min-width:0; }
.kedu-results { display:grid; gap:6px; min-width:0; }
.kedu-results h3 { scroll-margin-top:76px; }
.kedu-results .survey-table { overflow-x:auto; max-height:none; margin:0; }
.kedu-results th { position:static; }
.kedu-results td:is([data-label="계약일자"],[data-label="계약금액(원)"]) { white-space:nowrap; }
.kedu-results .kedu-pick input { width:20px; height:20px; margin:0; vertical-align:middle; }
.kedu-results :is(td,th):first-child { width:48px; min-width:0; text-align:center; }
.kedu-actions { justify-self:end; grid-template-columns:repeat(2,minmax(110px,1fr)); }
.kedu-pager { display:flex; justify-content:center; align-items:center; gap:12px; margin-block:10px; }
.shell.has-actions .content:has(.survey-contacts) { max-width:1400px; }
.survey-contacts { display:grid; gap:12px; min-width:0; }
.survey-contacts h2 { font-size:20px; }
.contact-grid { border-collapse:collapse; width:100%; table-layout:fixed; font-size:15px; }
.contact-grid th, .contact-grid td { padding:6px; border-bottom:1px solid var(--line); text-align:left; overflow-wrap:anywhere; }
.contact-grid th { background:var(--surface-2); }
.contact-grid th:first-child { width:4em; }
.contact-grid th:nth-child(4) { width:10%; }
.contact-grid th:nth-child(6) { width:20%; }
.contact-grid input, .contact-grid select { width:100%; min-width:0; min-height:40px; padding:6px; font:inherit; }
.contact-reuse > .field { max-width:48rem; }
.contact-reuse select, .contact-verify input { width:100%; min-width:0; }
.contact-reuse, .contact-reuse .field { min-width:0; }
.contact-verify { display:flex; flex-flow:row wrap; align-items:end; gap:8px; }
.contact-verify .field { margin:0; }
.contact-targets small { display:block; }
.contact-targets .check-row { align-items:start; }
@media (max-width:900px) {
  .contact-grid, .contact-grid tbody { display:block; }
  .contact-grid thead { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
  .contact-grid tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 12px; border-bottom:1px solid var(--line); padding:10px 0; }
  .contact-grid td { border:0; padding:0; }
  .contact-grid td[data-label]::before { content:attr(data-label); display:block; font-size:13px; color:var(--muted); }
  .contact-grid td:first-child { grid-column:1/-1; }
}
@media (max-width:440px) {
  .contact-grid td:nth-child(n+4) { grid-column:1/-1; }
}
@media (max-width:760px) {
  .kedu-results .survey-table { border:0; }
  .kedu-results table, .kedu-results tbody { display:block; }
  .kedu-results thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .kedu-results tbody tr { display:grid; grid-template-columns:auto minmax(0,1fr) minmax(0,1fr); gap:4px 12px; padding:8px; border-bottom:1px solid var(--line); }
  .kedu-results .survey-table td { border:0; min-width:0; padding:0; }
  .kedu-results td[data-label]::before { content:attr(data-label); display:block; color:var(--muted); font-size:13px; }
  .kedu-results td.kedu-pick { grid-column:1; grid-row:1 / span 4; align-self:start; width:auto; }
  .kedu-results td:last-child { grid-column:2 / -1; }
}
