/* broodev app-core — 공통 스타일(원본 · 2026-10-26). 각 앱의 css/site.css 는 이 파일의 사본(앱마다 Pages 프로젝트가 따로라 런타임 공유 불가).
   앱 고유 색은 index.html <style>:root{--accent:…}</style> 로 덮어쓰고, 앱 전용 규칙은 같은 <style> 안이나 css/app.css 에 둔다 — 이 사본은 손대지 않는다(다음 동기화 때 덮어씀).
   밝은 바탕 · 카드 · 시스템 글꼴(CJK 폴백 포함) · 모바일 1열 · 인쇄(A4) 기본 규칙. */
:root {
  --accent: #2563eb; --accent-ink: #ffffff; --accent-soft: color-mix(in srgb, var(--accent) 12%, #ffffff);
  --bg: #f4f6f8; --card: #ffffff; --line: #e2e6eb; --text: #1b2430; --muted: #65718a; --soft: #f0f2f5;
  --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --info: #0284c7;
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans KR", "Noto Sans JP", "Malgun Gothic", "Yu Gothic UI", "Hiragino Sans", "Apple SD Gothic Neo", "Noto Sans Thai", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .9em; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg, canvas { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }

/* ── 헤더 ── */
.hd { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.hd-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.brand h1 { font-size: 1.12rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand h1::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.brand .sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* 언어 메뉴 */
.lang { position: relative; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; max-height: 70vh; overflow: auto; margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); display: none; z-index: 40; }
.lang.open .lang-menu { display: block; }
.lang-menu li { padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: .95rem; }
.lang-menu li:hover, .lang-menu li:focus { background: var(--soft); outline: none; }
.lang-menu li[aria-selected="true"] { color: var(--accent); font-weight: 600; }

/* ── 레이아웃 ── */
.main { max-width: 1120px; margin: 0 auto; padding: 18px 16px 40px; }
.lead { color: var(--muted); font-size: .98rem; max-width: 70ch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 14px; }
.card h2 { display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid > * { min-width: 0; }
.two { display: grid; gap: 16px; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .mono { font-family: var(--mono); }
.center { text-align: center; } .right { text-align: right; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ── 폼 ── */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field > label, .label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field .hint { font-size: .8rem; color: var(--muted); }
input[type="text"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; min-height: 40px; }
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
.check { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; cursor: pointer; }
.check input { margin-top: 4px; flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
.check.done { color: var(--muted); text-decoration: line-through; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 7px 12px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ── 버튼 · 칩 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; min-height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--soft); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, #fff); }
.btn-sm { padding: 5px 10px; min-height: 30px; font-size: .88rem; }
.btn-lg { padding: 12px 22px; min-height: 48px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .8rem; }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.ok { background: #e8f7ee; color: var(--ok); } .chip.warn { background: #fff4e0; color: var(--warn); } .chip.bad { background: #fde8e8; color: var(--bad); }
.pill-list { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: .9rem; }
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ── 탭 ── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: transparent; padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 600; }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

/* ── 표 ── */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: .82rem; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ── 상태 · 알림 ── */
.note { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text); font-size: .9rem; }
.note.warn { background: #fff4e0; } .note.bad { background: #fde8e8; } .note.ok { background: #e8f7ee; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1b2430; color: #fff; padding: 10px 16px; border-radius: 999px; font-size: .9rem; box-shadow: var(--shadow); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.show { opacity: 1; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--soft); min-width: 0; }
.stat b { font-size: 1.35rem; line-height: 1.1; }
.stat span { font-size: .78rem; color: var(--muted); }
.display { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; line-height: 1; letter-spacing: .02em; }
.bar { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* ── 모달 ── */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .5); }
.modal-box { background: var(--card); border-radius: var(--radius); max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; padding: 20px; box-shadow: var(--shadow); position: relative; }
.modal-close { position: absolute; right: 10px; top: 10px; border: 0; background: transparent; font-size: 1.4rem; line-height: 1; padding: 6px 10px; cursor: pointer; color: var(--muted); border-radius: 8px; }
.modal-close:hover { background: var(--soft); }

/* ── SEO 본문 · 푸터 ── */
/* 절(하는 일 · 기능 · 사용법 · FAQ)은 아코디언. 사용법만 기본으로 열림. FAQ 안 질문은 한 번 더 눌러야 답이 보임. */
.seo { max-width: 1120px; margin: 0 auto; padding: 8px 16px 32px; color: var(--text); }
.seo-acc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 10px 0; padding: 0 14px; }
.seo-acc > summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; padding: 12px 0; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seo-acc > summary::-webkit-details-marker { display: none; }
.seo-acc > summary::after { content: "▸"; color: var(--muted); font-weight: 400; flex: none; }
.seo-acc[open] > summary::after { content: "▾"; }
.seo-acc > .seo-body { padding-bottom: 12px; }
.seo h2 { font-size: 1.15rem; margin-top: 22px; }
.seo ul, .seo ol { padding-left: 1.2em; }
.seo .faq { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); padding: 0 12px; margin: 8px 0; }
.seo .faq summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.seo .faq p { padding-bottom: 10px; margin: 0; color: var(--muted); }
.ft { max-width: 1120px; margin: 0 auto; padding: 14px 16px 36px; color: var(--muted); font-size: .82rem; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); }
.ft a { color: var(--muted); }

/* ── 404 ── */
.nf { max-width: 560px; margin: 10vh auto; text-align: center; padding: 0 16px; }
.nf .code { font-size: 4rem; font-weight: 800; color: var(--accent); line-height: 1; }

/* ── 인쇄 ── */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff; color: #000; font-size: 11pt; }
  .hd, .seo, .ft, .no-print, .toast, .modal, #lang-suggest-bar { display: none !important; }
  .print-only { display: block; }
  .main { max-width: none; padding: 0; }
  .card { box-shadow: none; border-color: #bbb; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
@media (max-width: 600px) {
  .hd-in { padding: 8px 12px; gap: 8px; }
  .brand .sub { display: none; }
  .main { padding: 14px 12px 32px; }
  .card { padding: 13px; border-radius: 12px; }
  .btn { padding: 8px 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
