/* 수원교구청 직원 상조회 — 모바일 우선 반응형 스타일 */
:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --line: #e4e7ee;
  --text: #1b2433;
  --text-2: #5b6576;
  --text-3: #8a93a3;
  --primary: #1f3a5f;
  --primary-2: #2c5282;
  --primary-soft: #e8eef6;
  --accent: #b8893b;
  --accent-soft: #f7efe0;
  --ok: #1f7a4d;   --ok-soft: #e3f3ea;
  --warn: #9a6200; --warn-soft: #fbf0d9;
  --bad: #b3261e;  --bad-soft: #fbe6e4;
  --info: #285ea8; --info-soft: #e5eefb;
  --done: #4b5563; --done-soft: #eceef1;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --side-w: 248px;
  --top-h: 56px;
  --tab-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
p { margin: 0; }
.ic { width: 20px; height: 20px; flex: none; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.hide-m { display: none; }

/* ---------- 레이아웃 ---------- */
.main {
  padding: calc(var(--top-h) + 16px) 16px calc(var(--tab-h) + var(--safe-b) + 24px);
  max-width: 1120px;
  margin: 0 auto;
}
.main-bare { min-height: 100dvh; }

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: var(--top-h);
  display: flex; align-items: center; gap: 8px;
  padding: 0 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; font-size: 17px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-grid; place-items: center;
  border: 0; background: transparent; color: var(--text-2); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.ghost { visibility: hidden; }
.icon-btn.dot::after { content: ""; position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.brand-sm { padding-left: 4px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-grid; place-items: center;
  background: var(--primary); color: #fff;
}
.brand-ic { width: 18px; height: 18px; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font: inherit; font-size: 11px; font-weight: 600;
  color: var(--text-3); background: none; border: 0; cursor: pointer; position: relative;
}
.tabbar .ic { width: 23px; height: 23px; }
.tabbar .on { color: var(--primary); }
.tab-dot { position: absolute; top: 10px; left: calc(50% + 8px); width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 50;
  width: min(84vw, 300px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  transform: translateX(-102%);
  transition: transform .22s ease;
}
body.menu-open .sidebar { transform: none; }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10, 15, 25, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
body.menu-open .scrim { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }

.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.brand b { display: block; font-size: 16px; }
.brand small { display: block; font-size: 12px; color: var(--text-3); }
.side-nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; margin: 1px 0;
  border-radius: 10px; color: var(--text-2); font-weight: 500;
}
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.side-nav a span { flex: 1; }
.side-sep { margin: 16px 12px 6px; font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: .02em; }
.count { font-style: normal; font-size: 12px; font-weight: 700; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--bad); color: #fff; text-align: center; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 14px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.who { flex: 1; min-width: 0; }
.who b { display: block; font-size: 14px; }
.who small { display: block; color: var(--text-3); font-size: 12px; }

@media (min-width: 1024px) {
  .sidebar { transform: none; width: var(--side-w); }
  .scrim, .tabbar { display: none; }
  .topbar { left: var(--side-w); padding: 0 24px; justify-content: flex-start; }
  .topbar .brand-sm, .topbar .icon-btn.ghost { display: none; }
  .topbar-title { text-align: left; font-size: 18px; }
  .main { margin-left: var(--side-w); padding: calc(var(--top-h) + 28px) 32px 48px; max-width: calc(1120px + var(--side-w)); }
  .hide-m { display: initial; }
  .hide-d { display: none !important; }
  body.menu-open { overflow: auto; }
}

/* ---------- 공통 블록 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; font-weight: 800; }
.page-head p { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-head h3 { font-size: 16px; font-weight: 700; }
.section-head a { font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 2px; }
.section-head a .ic { width: 16px; height: 16px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card + .card { margin-top: 12px; }
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.grid { display: grid; gap: 12px; }
/* 그리드 간격은 gap 으로만 준다 (.card + .card 의 위쪽 여백이 겹쳐 칸이 어긋나지 않게) */
.grid > .card + .card { margin-top: 0; }
.grid > * { min-width: 0; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-main { grid-template-columns: 1.6fr 1fr; align-items: start; } }

.hero {
  padding: 20px; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, #1f3a5f 0%, #2c5282 70%, #3a6aa5 100%);
  position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.07); }
.hero small { opacity: .8; font-size: 13px; }
.hero .big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 12px; }
.hero-row { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.hero-row b { display: block; font-size: 15px; }
.hero-row span { opacity: .85; }

.stat { padding: 16px; }
.stat small { color: var(--text-2); font-size: 13px; display: block; }
.stat b { font-size: 22px; font-weight: 800; letter-spacing: -.01em; display: block; margin-top: 2px; }
.stat em { font-style: normal; font-size: 12px; color: var(--text-3); }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 640px) { .quick { grid-template-columns: repeat(5, 1fr); } }
.quick a {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; text-align: center;
}
.quick a:hover { border-color: var(--primary); }
.quick .qi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.quick .qi .ic { width: 22px; height: 22px; }

/* 리스트 */
.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 56px; }
a.list-item:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .s { font-size: 13px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; }
.list-item .end { text-align: right; flex: none; }
.list-item .end b { display: block; font-variant-numeric: tabular-nums; }
.lead-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.pin-tag { color: var(--accent); font-weight: 700; }

/* 배지 */
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-ok   { background: var(--ok-soft);   color: var(--ok); }
.badge-bad  { background: var(--bad-soft);  color: var(--bad); }
.badge-done { background: var(--done-soft); color: var(--done); }
.badge-gold { background: var(--accent-soft); color: var(--accent); }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; padding: 0 18px; border-radius: 12px;
  font: inherit; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  background: var(--primary); color: #fff;
}
.btn:hover { background: var(--primary-2); }
.btn-line { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-line:hover { background: var(--surface-2); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn .ic { width: 18px; height: 18px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row.end { justify-content: flex-end; }
.sticky-actions {
  position: sticky; bottom: calc(var(--tab-h) + var(--safe-b)); z-index: 5;
  margin: 20px -16px 0; padding: 12px 16px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
@media (min-width: 1024px) { .sticky-actions { position: static; margin: 20px 0 0; padding: 0; background: none; } }

/* 폼 */
.form .field { margin-bottom: 16px; }
.form label, .label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form .req::after { content: " *"; color: var(--bad); }
.form .hint { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.input, .form input[type=text], .form input[type=password], .form input[type=date], .form input[type=number],
.form input[type=email], .form input[type=tel], .form select, .form textarea {
  width: 100%; min-height: 46px; padding: 11px 13px;
  font: inherit; font-size: 16px; /* iOS 확대 방지 */
  color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 11px;
  outline: none; appearance: none; -webkit-appearance: none;
}
.form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px;
}
.form textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.form input:focus, .form select:focus, .form textarea:focus, .input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form input[readonly] { background: var(--surface-2); color: var(--text-2); }
.form .row { display: grid; gap: 0 12px; }
@media (min-width: 640px) { .form .row-2 { grid-template-columns: 1fr 1fr; } .form .row-3 { grid-template-columns: repeat(3, 1fr); } }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 640px) { .choice-grid { grid-template-columns: repeat(3, 1fr); } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: 14px; cursor: pointer;
}
.choice small { font-weight: 500; color: var(--text-3); font-size: 12px; }
.choice input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.choice input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.calc {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px; background: var(--accent-soft);
}
.calc small { color: var(--text-2); display: block; font-size: 13px; }
.calc b { font-size: 20px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.file-drop {
  display: flex; align-items: center; gap: 10px; padding: 14px; border: 1.5px dashed var(--line); border-radius: 12px;
  color: var(--text-2); cursor: pointer; font-size: 14px;
}
.file-drop input { display: none; }
.file-drop:hover { border-color: var(--primary); color: var(--primary); }
.file-names { font-size: 13px; color: var(--text-2); margin-top: 6px; }

/* 안내 */
.notice-box { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.notice-box ul { margin: 0; padding-left: 18px; }
.notice-box li + li { margin-top: 4px; }
.notice-box.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.notice-box.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.notice-box.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.flash { margin-bottom: 14px; padding: 13px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-err { background: var(--bad-soft); color: var(--bad); }

/* 키-값 */
.kv { display: grid; grid-template-columns: minmax(80px, max-content) 1fr; gap: 10px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 500; }

/* 표: 모바일에서는 카드형 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--text-3); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num, .table .right { text-align: right; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }
@media (max-width: 767px) {
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table.stack tr:last-child { border-bottom: 0; }
  .table.stack td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table.stack td::before { content: attr(data-label); color: var(--text-3); font-size: 13px; text-align: left; flex: none; }
  .table.stack td.primary { font-weight: 700; font-size: 15px; text-align: left; padding-bottom: 6px; }
  .table.stack td.primary::before { display: none; }
  .table.stack td:empty { display: none; }
  .table.stack tfoot tr { background: var(--surface-2); }
}

/* 필터 칩 */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; height: 34px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.chips a.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .input { width: auto; flex: 1; min-width: 140px; min-height: 40px; padding: 8px 12px; font-size: 15px; }
.toolbar select.input { flex: none; }

/* 본문 */
.article h2 { font-size: 20px; font-weight: 800; }
.article .meta { color: var(--text-3); font-size: 13px; margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.article .body { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); line-height: 1.75; }
.answer { margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--primary-soft); }
.answer b { color: var(--primary); }

.files { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.files a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.files a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files small { color: var(--text-3); }
.files .ic { width: 16px; height: 16px; color: var(--text-3); }

.empty { text-align: center; padding: 40px 16px; color: var(--text-3); }
.empty-ic { width: 40px; height: 40px; margin-bottom: 8px; opacity: .6; }
.pager { display: flex; justify-content: center; gap: 4px; margin-top: 16px; }
.pager a { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-weight: 600; color: var(--text-2); }
.pager a.on { background: var(--primary); color: #fff; }

/* 진행 단계 */
.steps { display: flex; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.steps li { flex: 1; text-align: center; font-size: 12px; color: var(--text-3); position: relative; padding-top: 16px; }
.steps li::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--line); }
.steps li.on { color: var(--primary); font-weight: 700; }
.steps li.on::before { background: var(--primary); }
.steps li.bad { color: var(--bad); font-weight: 700; }
.steps li.bad::before { background: var(--bad); }

/* 막대 차트 */
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 150px; padding-top: 10px; }
.bar { display: flex; gap: 2px; align-items: end; height: 100%; position: relative; }
.bar i { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; }
.bar i.in { background: var(--primary); }
.bar i.out { background: var(--accent); }
.bar-labels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; font-size: 11px; color: var(--text-3); text-align: center; margin-top: 6px; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.meter { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; background: var(--primary); border-radius: 8px; }

/* 규정 */
.rule-table td:nth-child(2) { white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.rule-text { font-size: 14px; line-height: 1.8; color: var(--text-2); }
.rule-text h4 { color: var(--text); font-size: 15px; margin: 18px 0 6px; }
.rule-text p + p { margin-top: 6px; }
.toc { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
details.card > summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "+"; font-size: 20px; color: var(--text-3); }
details.card[open] > summary::after { content: "−"; }
details.card > .card-pad { padding-top: 0; }

/* 로그인 */
.login {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 500px at 50% -10%, #2c5282 0%, #1f3a5f 45%, #14263f 100%);
}
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 20px; padding: 28px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-card .brand-mark { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 14px; }
.login-card h1 { font-size: 22px; font-weight: 800; }
.login-card p.sub { color: var(--text-2); margin: 4px 0 22px; font-size: 14px; }
.login-foot { text-align: center; color: rgba(255,255,255,.7); font-size: 12px; margin-top: 18px; }

/* 인쇄 */
@media print {
  .sidebar, .topbar, .tabbar, .scrim, .no-print, .sticky-actions, .flash { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .main { padding: 0; margin: 0; max-width: none; }
  .card { border: 0; box-shadow: none; }
  .print-form { border: 2px solid #000 !important; padding: 28px !important; }
  .table.stack thead { display: table-header-group; }
}
.print-only { display: none; }
@media print { .print-only { display: block; } }
.text-bad { color: var(--bad) !important; font-weight: 600; }
.text-ok { color: var(--ok) !important; }
.pager a.on, .login-card .brand-mark { color: var(--surface); }
button:disabled { opacity: .45; cursor: not-allowed; }

/* 통계 타일: 모바일 2열, 데스크톱 4열 */
.grid-stats { grid-template-columns: repeat(2, 1fr); }
.grid-stats-3 > :first-child { grid-column: 1 / -1; }
@media (min-width: 1024px) { .grid-stats { grid-template-columns: repeat(4, 1fr); } .grid-stats-3 { grid-template-columns: repeat(3, 1fr); } .grid-stats-3 > :first-child { grid-column: auto; } }
@media (max-width: 639px) { .stat { padding: 14px; } .stat b { font-size: 18px; } }
@media (max-width: 767px) { .table.stack td.m-hide { display: none; } }

/* 총회 투표 */
.vote-card .vote-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.vote-timer { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.vote-timer .ic { width: 20px; height: 20px; }
.vote-timer.big { font-size: 44px; line-height: 1; }
.vote-timer b.urgent { color: var(--bad); }
.vote-title { font-size: 20px; line-height: 1.4; margin: 6px 0 8px; }
.vote-desc { color: var(--text-2); font-size: 15px; line-height: 1.7; margin-bottom: 16px; }
.vote-options { display: grid; gap: 10px; margin: 14px 0 6px; }
.vote-opt { position: relative; display: block; }
.vote-opt input { position: absolute; opacity: 0; inset: 0; }
.vote-opt span {
  display: flex; align-items: center; min-height: 60px; padding: 14px 18px; border-radius: var(--radius);
  border: 2px solid var(--line); background: var(--surface); font-size: 18px; font-weight: 700; cursor: pointer;
}
.vote-opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.vote-opt input:focus-visible + span { outline: 3px solid var(--primary-2); outline-offset: 2px; }
.vote-submit { min-height: 56px; font-size: 17px; margin-top: 8px; }
.ok-hint { color: var(--ok) !important; font-weight: 600; }
.vote-count { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.vote-count-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 14px; color: var(--text-2); }
.vote-count-row b { font-size: 20px; color: var(--text); }
.meter i { transition: width .4s ease; }
.vote-bars { display: grid; gap: 14px; }
.vb-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 15px; }
.vote-bar.win .meter i { background: var(--ok); }
.vote-bar .meter { height: 14px; }
.vote-optlist { margin: 0 0 8px; padding-left: 20px; }
.vote-optlist li + li { margin-top: 4px; }

/* 참석 체크 */
.att-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: sticky; top: calc(var(--top-h) + 6px); z-index: 5; }
@media (min-width: 1024px) { .att-summary { top: 8px; } }
.att-summary small { display: block; color: var(--text-3); font-size: 12px; }
.att-summary b { font-size: 20px; }
.att-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .att-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .att-list { grid-template-columns: repeat(3, 1fr); } }
.att-list li[hidden] { display: none; }
.att-item {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; text-align: left;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
}
.att-item .grow small { display: block; color: var(--text-3); font-size: 12px; font-weight: 500; }
.att-item b { font-size: 16px; }
.att-box { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; }
.att-box .ic { width: 18px; height: 18px; stroke-width: 3; }
.att-item.on { border-color: var(--ok); background: var(--ok-soft); }
.att-item.on .att-box { background: var(--ok); border-color: var(--ok); color: #fff; }

/* 규정 개정 이력 */
.rev { margin-bottom: 14px; }
.rev-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.rev-head h3 { margin: 6px 0 0; }
.rev-reason { margin: 10px 0 4px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: 14px; color: var(--text-2); }
.rev-diff { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.rev-diff > summary { cursor: pointer; display: flex; align-items: center; gap: 10px; }
.rev-diff > summary > b { flex: 1; }
.diff-table .diff-old { color: var(--bad); text-decoration: line-through; text-decoration-color: rgba(179,38,30,.4); }
.diff-table .diff-new { color: var(--ok); font-weight: 700; }
.diff-text { margin-top: 14px; }
.diff-text h4 { margin-bottom: 6px; font-size: 14px; }
.diff-text div { display: flex; gap: 10px; padding: 4px 10px; font-size: 14px; line-height: 1.6; border-radius: 6px; }
.diff-text b { width: 12px; flex: none; text-align: center; }
.diff-add { background: var(--ok-soft); color: var(--ok); }
.diff-del { background: var(--bad-soft); color: var(--bad); text-decoration: line-through; text-decoration-color: rgba(179,38,30,.4); }
.diff-ctx { color: var(--text-3); }
.rule-edit-item { padding: 14px 0; border-top: 1px solid var(--line); }
.form textarea { width: 100%; }

/* 사용 설명서 · AI 도우미 · 통장 가져오기 */
.manual-quick { background: var(--primary-soft); border-color: transparent; margin-bottom: 4px; }
.manual-quick h3 { margin-bottom: 8px; }
.manual-sec { margin-top: 14px; scroll-margin-top: calc(var(--top-h) + 10px); }
.manual-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.manual-head > div { flex: 1; min-width: 200px; }
.manual-head h3 { margin: 0 0 2px; }
.manual-head p { margin: 0; font-size: 14px; }
.manual-steps { margin: 0; padding-left: 22px; line-height: 1.75; font-size: 15px; }
.manual-steps li + li { margin-top: 6px; }
.manual-tips { margin-top: 12px; }
.manual-tips b { display: block; margin-bottom: 4px; }
.ai-box { max-width: 760px; }
.ai-examples { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chip { height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.ai-answer { margin-top: 14px; line-height: 1.8; font-size: 15px; }
.ai-answer p + p { margin-top: 6px; }
.ai-answer a { color: var(--primary); font-weight: 700; text-decoration: underline; }
.ai-answer.ai-error { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.ai-note { margin-top: 12px; }
.bank-table select.input, .bank-table input.input { min-height: 38px; padding: 6px 8px; font-size: 14px; }
.bank-table td { vertical-align: top; }
.bank-table input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); }

/* 신청 목록 카드 */
.card-link { display: flex; align-items: center; gap: 14px; }
.card-link:hover { border-color: var(--primary); }
.card-link .qi { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.card-link .qi .ic { width: 22px; height: 22px; }
.card-link-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card-link-body b { font-size: 16px; line-height: 1.35; }
.card-link-body .small { line-height: 1.55; overflow-wrap: anywhere; }
.card-link .chev { flex: none; }
