/* 나우다 제휴사 안내 — 화면 스타일 */
:root {
  color-scheme: light;
  --brand: #ff6b35;
  --brand-dark: #e2541f;
  --brand-soft: #fff1ea;
  --ink: #1d2433;
  --ink-2: #4a5468;
  --muted: #7b8496;
  --line: #e5e8ee;
  --line-2: #f0f2f6;
  --bg: #f6f7f9;
  --card: #ffffff;
  --red: #e5383b;
  --red-soft: #fdecec;
  --green: #1f9d55;
  --green-soft: #e7f6ee;
  --blue: #2f6fed;
  --blue-soft: #eaf1ff;
  --amber: #b7791f;
  --amber-soft: #fdf4e3;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.35; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.boot { padding: 80px 20px; text-align: center; color: var(--muted); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 24px; padding-bottom: 56px; min-height: calc(100vh - 160px); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--line-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--red); border-color: #f5c2c3; }
.btn.danger:hover { background: var(--red-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.block { display: flex; width: 100%; }
.text-btn { background: none; border: 0; padding: 2px 4px; color: var(--ink-2); cursor: pointer; font-size: 14px; text-align: left; }
.text-btn:hover { color: var(--brand-dark); text-decoration: underline; }
.text-btn.strong { font-weight: 700; color: var(--ink); }
.icon-btn { background: none; border: 0; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 16px; color: var(--muted); }
.icon-btn:hover { background: var(--line-2); }

/* 배지 */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; vertical-align: 1px; margin-right: 4px; }
.badge.urgent { background: var(--red); color: #fff; }
.badge.pin { background: var(--brand-soft); color: var(--brand-dark); }
.badge.new { background: var(--brand); color: #fff; padding: 0 6px; }
.badge.popup { background: var(--blue-soft); color: var(--blue); }
.badge.done { background: var(--green-soft); color: var(--green); }
.badge.doing { background: var(--blue-soft); color: var(--blue); }
.badge.open { background: var(--amber-soft); color: var(--amber); }
.badge.muted { background: var(--line-2); color: var(--muted); }

/* 머리말 */
.mock-banner { background: #2b2f3a; color: #ffd8c7; font-size: 13px; text-align: center; padding: 6px 16px; }
.site-head { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.head-row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; letter-spacing: -0.02em; }
.brand.big { font-size: 20px; margin-bottom: 4px; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; display: inline-grid; place-items: center; font-weight: 800; font-size: 16px; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a { padding: 8px 12px; border-radius: 8px; font-weight: 600; color: var(--ink-2); }
.main-nav a:hover { background: var(--line-2); }
.main-nav a.on { color: var(--brand-dark); background: var(--brand-soft); }
.me { display: flex; align-items: center; gap: 8px; }
.me-name { font-weight: 600; font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-foot { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px; }
.site-foot .wrap { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }

/* 로그인 */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #fff7f2 0%, var(--bg) 60%); }
.login-page.admin { background: linear-gradient(160deg, #eef1f7 0%, var(--bg) 60%); }
.login-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; box-shadow: 0 10px 30px rgba(16, 24, 40, .06); display: flex; flex-direction: column; gap: 14px; }
.login-card .muted { margin: 0 0 4px; }
.check-line { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }

/* 입력 */
.field { display: flex; flex-direction: column; gap: 6px; }
.field .label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field .hint, .hint { font-size: 12px; color: var(--muted); margin: 0; }
input:not([type=checkbox]):not([type=file]), select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 9px 12px; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:not([type=checkbox]):not([type=file]), select { height: 42px; }
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 107, 53, .15); }
input:disabled { background: var(--line-2); color: var(--muted); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; flex: none; }
.form-error { color: var(--red); background: var(--red-soft); border-radius: 8px; padding: 10px 12px; margin: 0; font-size: 14px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.form-actions.left { justify-content: flex-start; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.file-pick { display: inline-flex; align-items: center; gap: 6px; width: fit-content; height: 36px; padding: 0 14px; border: 1px dashed #c9cfda; border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); background: #fafbfc; }
.file-pick:hover { border-color: var(--brand); color: var(--brand-dark); }
.file-pick input { display: none; }
.file-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.switch { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; cursor: pointer; }
.switch input { margin-top: 2px; }
.switch small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.search { max-width: 280px; }

/* 카드·목록 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.more { font-size: 13px; color: var(--muted); font-weight: 600; }
.more:hover { color: var(--brand-dark); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; }
.page-desc { margin: -6px 0 18px; font-size: 14px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.chip small { color: var(--muted); font-weight: 600; margin-left: 2px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on small { color: #c9cfda; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty a { color: var(--brand-dark); font-weight: 600; }
.empty.soft { padding: 24px; margin-top: 12px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 16px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { text-align: center; padding: 40px 16px; background: var(--red-soft); color: var(--red); border-radius: var(--radius); }
.error-box p { margin: 0 0 12px; }
.back { display: inline-block; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.back:hover { color: var(--brand-dark); }

/* 홈 */
.urgent-bar { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.urgent-bar a { display: flex; align-items: center; gap: 10px; background: var(--red-soft); border: 1px solid #f7caca; color: #a8201a; border-radius: 10px; padding: 12px 16px; font-weight: 600; }
.urgent-bar strong { background: var(--red); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 6px; flex: none; }
.urgent-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urgent-bar .arrow { flex: none; }
.hello { margin-bottom: 20px; }
.hello p { margin: 4px 0 0; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.side-col { display: flex; flex-direction: column; gap: 20px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat-row > div { background: var(--line-2); border-radius: 10px; padding: 12px; text-align: center; }
.stat-row .num { display: block; font-size: 24px; font-weight: 800; }
.stat-row .lbl { font-size: 13px; color: var(--muted); }
.mini-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mini-list a { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.mini-list .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick a { display: flex; align-items: center; gap: 12px; }
.quick strong { display: block; }
.quick small { color: var(--muted); }
.q-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }

/* 소식 목록 */
.notice-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.notice-list.compact { border: 0; border-radius: 0; }
.notice-list li + li { border-top: 1px solid var(--line-2); }
.notice-list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.notice-list.compact a { padding: 12px 0; }
.notice-list a:hover .title { color: var(--brand-dark); }
.notice-list .cat { flex: none; width: 56px; font-size: 13px; color: var(--muted); font-weight: 600; }
.notice-list .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.notice-list time { flex: none; font-size: 13px; color: var(--muted); }
.notice-list li.is-urgent .title { color: #a8201a; font-weight: 700; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: #fff; }
.view-toggle button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.view-toggle button.on { background: var(--ink); color: #fff; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.notice-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.notice-card:hover { box-shadow: 0 8px 24px rgba(16, 24, 40, .08); transform: translateY(-2px); }
.notice-card.is-urgent { border-color: #f3b7b8; }
.thumb { aspect-ratio: 16 / 9; background: var(--line-2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.none { display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-soft), #fff); }
.thumb.none span { font-size: 32px; font-weight: 800; color: #ffc4ad; }
.nc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nc-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.nc-body h3 { font-size: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nc-body p { margin: 0; color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.nc-body time { font-size: 12px; color: var(--muted); }
.pager { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.pager button { min-width: 36px; height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; font-weight: 600; }
.pager button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager button:disabled { opacity: .4; cursor: default; }

/* 글 보기 */
.article { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px 36px; max-width: 820px; }
.modal .article { border: 0; padding: 0; max-width: none; }
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 24px; }
.article-head h1 { margin: 8px 0 6px; font-size: 26px; }
.meta-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.meta-line .cat, .meta-line .type { color: var(--brand-dark); font-weight: 700; }
.prose { font-size: 16px; line-height: 1.8; }
.prose > * { margin: 0 0 14px; }
.prose h2 { font-size: 21px; margin-top: 28px; }
.prose h3 { font-size: 18px; margin-top: 22px; }
.prose h4 { font-size: 16px; margin-top: 18px; }
.prose p.blank { min-height: 8px; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 4px 0; }
.prose li > ul, .prose li > ol { margin: 4px 0; }
.prose ul.checklist { list-style: none; padding-left: 4px; }
.prose li.check { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.prose li.check .box { width: 18px; height: 18px; border: 1.5px solid #c9cfda; border-radius: 4px; display: inline-grid; place-items: center; font-size: 12px; margin-top: 5px; flex: none; }
.prose li.check.on .box { background: var(--brand); border-color: var(--brand); color: #fff; }
.prose li.check.on > span:nth-child(2) { color: var(--muted); text-decoration: line-through; }
.prose figure { margin: 20px 0; }
.prose figure img { border-radius: 10px; margin: 0 auto; }
.prose figure.border img { border: 1px solid var(--line); }
.prose figure.bg { background: var(--line-2); padding: 16px; border-radius: 12px; }
.prose figure.bg img { max-width: 60%; }
.prose figcaption, .prose .caption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
.prose blockquote { border-left: 4px solid var(--brand); background: #fffaf7; padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--ink-2); }
.prose blockquote cite { display: block; margin-top: 6px; font-size: 13px; font-style: normal; color: var(--muted); }
.prose blockquote cite::before { content: '— '; }
.prose hr { border: 0; text-align: center; margin: 28px 0; }
.prose hr::before { content: '···'; letter-spacing: 12px; color: var(--muted); font-size: 20px; }
.prose mark { background: #fff1a8; padding: 0 2px; border-radius: 2px; }
.prose code { background: var(--line-2); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--line-2); font-weight: 700; }
.attach-box { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 16px; }
.attach-box h3 { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.attach-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.attach-box a { color: var(--blue); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-item.open { border-color: #ffd0bd; }
.faq-q { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: none; border: 0; text-align: left; cursor: pointer; font-size: 15px; font-weight: 600; }
.qmark, .amark { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.qmark { background: var(--brand-soft); color: var(--brand-dark); }
.amark { background: var(--line-2); color: var(--ink-2); }
.qt { flex: 1; }
.chev { color: var(--muted); transition: transform .2s; font-size: 18px; line-height: 1; }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { display: flex; gap: 12px; padding: 0 18px 18px; color: var(--ink-2); }
.faq-a a { color: var(--blue); text-decoration: underline; }

/* 문의 */
.inq-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.inq-list li + li { border-top: 1px solid var(--line-2); }
.inq-list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.inq-list a:hover .title { color: var(--brand-dark); }
.inq-list .type { flex: none; font-size: 13px; color: var(--muted); width: 96px; }
.inq-list .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inq-list time { flex: none; font-size: 13px; color: var(--muted); }
.inq-view h1 { font-size: 21px; margin: 8px 0 4px; }
.inq-content { margin-top: 18px; white-space: normal; }
.inq-content a, .answer a { color: var(--blue); text-decoration: underline; }
.answer { margin-top: 14px; background: #fffaf7; border-color: #ffd9c9; }
.answer-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.answer-head strong { color: var(--brand-dark); }
.inq-admin { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.answer-form { position: sticky; top: 20px; }

/* 팝업·모달 */
.modal-back { position: fixed; inset: 0; background: rgba(15, 20, 30, .5); z-index: 100; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0, 0, 0, .2); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px; overflow-y: auto; }
.popup { background: #fff; border-radius: 16px; width: 100%; max-width: 440px; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); position: relative; }
.popup-count { position: absolute; top: 10px; right: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; z-index: 1; }
.popup-main { display: block; }
.popup-main img { width: 100%; max-height: 70vh; object-fit: contain; background: #f3f4f6; }
.popup-text { padding: 32px 26px 26px; background: linear-gradient(160deg, #fff4ee, #fff 70%); }
.popup-badges { margin-bottom: 10px; }
.popup-text h3 { font-size: 20px; margin-bottom: 10px; }
.popup-text p { color: var(--ink-2); margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.popup-text .link { color: var(--brand-dark); font-weight: 700; }
.popup-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); background: #fafbfc; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #1d2433; color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; z-index: 200; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); max-width: calc(100vw - 32px); }
.toast.err { background: var(--red); }
.warn-text { background: var(--amber-soft); color: #8a5a10; padding: 10px 12px; border-radius: 8px; font-size: 14px; margin: 0 0 12px; }

/* 관리자 */
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: #1d2433; color: #cfd5e1; padding: 20px 14px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; }
.admin-side .brand { color: #fff; padding: 0 6px; }
.admin-side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-side nav a { padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.admin-side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-side nav a.on { background: var(--brand); color: #fff; }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px; }
.side-foot .muted { color: #9aa3b5; }
.side-foot .btn.ghost { color: #cfd5e1; }
.side-foot .btn.ghost:hover { background: rgba(255, 255, 255, .08); }
.admin-main { padding: 28px 32px 56px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.kpi:hover { border-color: #cfd5e1; }
.kpi .num { font-size: 28px; font-weight: 800; line-height: 1.2; }
.kpi .num small { font-size: 15px; color: var(--muted); font-weight: 600; }
.kpi .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi.warn .num { color: var(--brand-dark); }
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.table-wrap > table.data { border: 1px solid var(--line); border-radius: var(--radius); }
.card .table-wrap > table.data { border: 0; }
table.data th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: #fafbfc; }
table.data tr.dim td { color: var(--muted); }
table.data .num { text-align: right; }
table.data .chk { width: 36px; }
.title-cell { min-width: 220px; }
.title-cell a:hover { color: var(--brand-dark); }
.actions-cell { text-align: right; }
.actions-cell .btn + .btn { margin-left: 4px; }
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; color: var(--ink-2); }
.codes { max-height: 50vh; overflow-y: auto; }

/* 소식 편집 */
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.edit-main { display: flex; flex-direction: column; gap: 12px; }
.title-input { font-size: 22px !important; font-weight: 700; height: 56px !important; }
.editor-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 20px 64px; min-height: 420px; }
.editor-holder { font-size: 16px; }
.editor-holder .ce-block__content, .editor-holder .ce-toolbar__content { max-width: none; }
.editor-holder .ce-paragraph[data-placeholder]:empty::before { color: #b0b7c3; }
.edit-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }
.edit-side .card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.img-prev { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.img-prev img { width: 100%; max-height: 180px; object-fit: cover; }
.img-prev .text-btn { position: absolute; top: 6px; right: 6px; background: rgba(255, 255, 255, .92); border-radius: 6px; padding: 2px 8px; }

/* 반응형 */
@media (max-width: 900px) {
  .home-grid, .edit-grid, .inq-admin { grid-template-columns: 1fr; }
  .edit-side, .answer-form { position: static; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; gap: 8px; }
  .admin-side nav { flex-direction: row; overflow-x: auto; order: 3; flex-basis: 100%; }
  .admin-side nav a { white-space: nowrap; }
  .side-foot { margin-left: auto; }
  .admin-main { padding: 20px 16px 48px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: 21px; }
  .head-row { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 8px 12px; }
  .main-nav { order: 3; flex-basis: 100%; overflow-x: auto; margin: 0 -16px; padding: 0 16px 8px; }
  .main-nav a { white-space: nowrap; }
  .me { margin-left: auto; }
  .me-name { max-width: 110px; }
  .brand-text { font-size: 15px; }
  .article { padding: 20px 18px 28px; }
  .article-head h1 { font-size: 22px; }
  .notice-list .cat { display: none; }
  .notice-list a { flex-wrap: wrap; gap: 4px 10px; }
  .notice-list .title { flex-basis: 100%; white-space: normal; order: -1; }
  .inq-list a { flex-wrap: wrap; gap: 4px 8px; }
  .inq-list .title { flex-basis: 100%; white-space: normal; order: 5; }
  .inq-list .type { width: auto; }
  .inq-list time { margin-left: auto; }
  .search { max-width: none; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .row2 { grid-template-columns: 1fr; }
  .editor-box { padding: 14px 14px 14px 14px; }
  .card { padding: 16px; }
  .login-card { padding: 26px 20px; }
}
