/* ChordTool License — 모바일 퍼스트. 테마: 딥 네이비 · 골드 (로고 메달). academy.css 에서 출발 */
:root {
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #eef1f7; --text: #161b2a; --muted: #5d6679; --line: #dde2ec;
  --accent: #14213d; --accent-ink: #ffffff; --accent-soft: #e8ebf3; --gold: #b8860b; --gold-soft: #fbf3dc; --link: #1f4fb8;
  --ok: #1f8a4c; --warn: #b45309; --radius: 14px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0e1220; --surface: #161b2c; --surface-2: #1f2538; --text: #eef1f8; --muted: #9aa3b8; --line: #2b3247; --accent: #7aa2ff; --accent-ink: #0b1430; --accent-soft: #1b2748; --gold: #e2b54a; --gold-soft: #33290f; --link: #8fb1ff; --ok: #4ade80; --warn: #fbbf24; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0e1220; --surface: #161b2c; --surface-2: #1f2538; --text: #eef1f8; --muted: #9aa3b8; --line: #2b3247; --accent: #7aa2ff; --accent-ink: #0b1430; --accent-soft: #1b2748; --gold: #e2b54a; --gold-soft: #33290f; --link: #8fb1ff; --ok: #4ade80; --warn: #fbbf24; color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; }
h2 small { font-size: .8rem; color: var(--muted); font-weight: 600; }
p { margin: 0 0 .8em; }
ul, ol { padding-left: 20px; margin: 0 0 .8em; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }
.lead { color: var(--muted); }
.hint, .muted { color: var(--muted); font-size: .85rem; }
.source { color: var(--muted); font-size: .78rem; margin-top: 18px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-bar { display: flex; align-items: center; gap: 10px; height: 54px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); flex: none; }
.brand:hover { text-decoration: none; }
.brand img { display: block; width: 48px; height: 32px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: 1.02rem; letter-spacing: -.02em; }
.brand-text small { font-size: .68rem; color: var(--gold); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.h-search { flex: 1; min-width: 0; }
.h-search input { width: 100%; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .9rem; }
.icon-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--text); border-radius: 10px; cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.header-menu { display: none; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; }
.header-menu.is-open { display: flex; }
@media (min-width: 760px) { .header-menu { display: flex; } .header-menu.is-closed { display: none; } }
.icon-btn.on { background: var(--accent-soft); color: var(--accent); }
.header-menu a { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: .92rem; }
@media (max-width: 420px) { .brand-text { display: none; } }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: .8rem; color: var(--muted); padding: 10px 0 2px; }
.breadcrumb a { color: var(--muted); }
main.wrap { padding-top: 10px; padding-bottom: 32px; }

/* 공통 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip small { color: var(--muted); font-weight: 700; }
.chip.muted { opacity: .55; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { text-decoration: none; }
.big-search { display: flex; gap: 6px; margin: 12px 0 4px; }
.big-search input { flex: 1; min-width: 0; height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-size: 1rem; }
.big-search button { flex: none; min-width: 76px; height: 50px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 800; cursor: pointer; }

.region-grid, .cat-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 640px) { .region-grid, .cat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.region-grid > li > a, .region-grid > li > span, .cat-grid > li > a { display: flex; flex-direction: column; padding: 10px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); min-width: 0; }
.region-grid a:hover, .cat-grid a:hover { text-decoration: none; border-color: var(--accent); }
.region-grid b, .cat-grid b { font-size: .95rem; }
.region-grid small, .cat-grid small { color: var(--muted); font-size: .78rem; }
.region-grid > li > span.muted { opacity: .6; }
.aca-list { list-style: none; padding: 0; margin: 0; }
.aca-list li + li { border-top: 1px solid var(--line); }
.aca-item { display: flex; flex-direction: column; gap: 2px; padding: 11px 2px; color: var(--text); }
.aca-item:hover { text-decoration: none; background: var(--surface-2); }
.aca-name { font-weight: 800; font-size: 1rem; }
.aca-name .kind { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 2px; }
.aca-meta { font-size: .84rem; color: var(--muted); }
.aca-meta .pub { color: var(--gold); }
.aca-course { font-size: .8rem; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; font-weight: 700; }
.pager a { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); }
.aca-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
@media (min-width: 640px) { .aca-mini { grid-template-columns: 1fr 1fr; } }
.aca-mini a { display: block; padding: 9px 10px; border-radius: 10px; background: var(--surface-2); color: var(--text); font-weight: 700; }
.aca-mini small { color: var(--muted); font-weight: 500; }
.more { margin: 10px 0 0; font-weight: 700; }

.stat-box { border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); background: var(--gold-soft); }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.stat-grid div { display: flex; flex-direction: column; background: var(--surface); border-radius: 12px; padding: 10px; }
.stat-grid small { color: var(--muted); font-size: .76rem; }
.stat-grid b { font-size: 1.05rem; }
@media (max-width: 420px) { .stat-grid { grid-template-columns: 1fr 1fr; } .stat-grid div:first-child { grid-column: 1 / -1; } }
.dong-line { font-size: .9rem; color: var(--muted); line-height: 1.9; }
.dong-line b { color: var(--text); }

/* 학원 상세 */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-size: .8rem; font-weight: 700; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.cat { background: var(--accent-soft); color: var(--accent); }
.notice { padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); font-size: .9rem; }
.notice.ok { background: var(--accent-soft); }
.info { width: 100%; border-collapse: collapse; }
.info th, .info td { text-align: left; vertical-align: top; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: .93rem; }
.info th { width: 92px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.fee { width: 100%; border-collapse: collapse; font-size: .92rem; }
.fee th, .fee td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.fee thead th { color: var(--muted); font-size: .8rem; }
.fee .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tools-box { background: var(--accent-soft); border-color: transparent; }
.prose li { margin-bottom: 6px; }

/* 요청 폼 */
.report-form { display: grid; gap: 12px; }
.report-form label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.report-form input, .report-form select, .report-form textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 400; }
.report-form .hp { position: absolute; left: -9999px; }

/* ads */
.ad-slot { margin: 18px 0; min-height: 100px; text-align: center; overflow: hidden; }
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }

.site-footer { border-top: 1px solid var(--line); padding: 20px 0 36px; color: var(--muted); font-size: .8rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.footer-links a { color: var(--text); font-weight: 600; }

/* ===== License ===== */
/* 자격 유형 배지 — 세 유형을 색과 글자로 항상 구분 (등록민간자격을 공인처럼 보이지 않게) */
.tb { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: .78rem; font-weight: 800; line-height: 1.4; border: 1.5px solid; white-space: nowrap; }
.tb-national { color: #0b5cad; border-color: #0b5cad; background: #e7f1fc; }
.tb-approved { color: #17773e; border-color: #17773e; background: #e6f6ec; }
.tb-registered { color: #5d6679; border-color: #aab2c2; background: var(--surface); }
.tb-dead { color: #b42318; border-color: #b42318; background: #fdecea; }
:root[data-theme="dark"] .tb-national { color: #8cc4ff; border-color: #8cc4ff; background: transparent; }
:root[data-theme="dark"] .tb-approved { color: #6ee7a0; border-color: #6ee7a0; background: transparent; }
:root[data-theme="dark"] .tb-registered { color: #b5bdcc; border-color: #5b6479; }
:root[data-theme="dark"] .tb-dead { color: #fca5a5; border-color: #fca5a5; background: transparent; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tb-national { color: #8cc4ff; border-color: #8cc4ff; background: transparent; }
  :root:not([data-theme="light"]) .tb-approved { color: #6ee7a0; border-color: #6ee7a0; background: transparent; }
  :root:not([data-theme="light"]) .tb-registered { color: #b5bdcc; border-color: #5b6479; }
  :root:not([data-theme="light"]) .tb-dead { color: #fca5a5; border-color: #fca5a5; background: transparent; }
}
.type-grid { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.type-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); height: 100%; }
.type-card:hover { text-decoration: none; border-color: var(--accent); }
.type-card b { font-size: 1.15rem; }
.type-card small { color: var(--muted); font-size: .78rem; }
.type-card .tb { white-space: normal; }
@media (max-width: 420px) { .type-grid { grid-template-columns: 1fr; } .type-card { flex-direction: row; align-items: center; flex-wrap: wrap; } }
.type-note { border-radius: 12px; padding: 12px 14px; margin: 12px 0; border: 1.5px solid; }
.type-note b { display: block; margin-bottom: 4px; }
.type-note p { margin: 0; font-size: .92rem; }
.tn-registered { border-color: #d0a23c; background: var(--gold-soft); }
.tn-approved { border-color: #17773e; background: color-mix(in srgb, #17773e 8%, var(--surface)); }
.tn-national { border-color: #0b5cad; background: color-mix(in srgb, #0b5cad 8%, var(--surface)); }
.notice.warn { background: color-mix(in srgb, #b42318 10%, var(--surface)); }

.q-list { list-style: none; padding: 0; margin: 0; }
.q-list li + li { border-top: 1px solid var(--line); }
.q-item { display: flex; flex-direction: column; gap: 3px; padding: 11px 2px; color: var(--text); }
.q-item:hover { text-decoration: none; background: var(--surface-2); }
.q-item.dead { opacity: .72; }
.q-top { display: flex; flex-wrap: wrap; gap: 4px; }
.q-name { font-weight: 800; font-size: 1rem; }
.q-name em { font-style: normal; font-size: .78rem; font-weight: 700; color: var(--muted); }
.q-meta { font-size: .84rem; color: var(--muted); }
.q-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
@media (min-width: 640px) { .q-mini { grid-template-columns: 1fr 1fr; } }
.q-mini a { display: block; padding: 9px 10px; border-radius: 10px; background: var(--surface-2); color: var(--text); font-weight: 700; }
.q-mini small { color: var(--muted); font-weight: 500; }
.q-page h1 { margin-top: 8px; }
.q-page .badges .tb { font-size: .82rem; }
a.badge.cat:hover { text-decoration: none; }
.info th { width: 104px; }
.ok-t { color: var(--ok); font-weight: 800; }
.warn-t { color: #b42318; font-weight: 800; }
.duties { margin: 0; }
.duties dt { font-weight: 800; margin-top: 8px; }
.duties dd { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
h3 { font-size: 1rem; margin-top: 14px; }
.tbl-wrap { overflow-x: auto; }
.tbl-wrap .fee td, .tbl-wrap .fee th { white-space: nowrap; }
.official { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.hist { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.hist li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hist time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 6px; }
.ad-label { display: block; color: var(--muted); font-size: .7rem; margin-bottom: 4px; }
