/* 합격열쇠 공통 스타일 */
:root {
  --navy: #1f3a68; --navy-d: #14264a; --ink: #1a2233; --sub: #3d4a5f; --muted: #4a5568;
  --line: #e3e8f0; --line2: #c9d3e3; --bg: #f7f9fc; --soft: #eef3fb; --white: #fff;
  --gold: #f5c542; --gold-soft: #fdf3d7; --gold-ink: #5c4300;
  --ok: #1d6b45; --ok-soft: #e8f5ee; --bad: #b42318; --bad-soft: #fdecea;
  --serif: 'Noto Serif KR', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --r: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.6; word-break: keep-all; }
a { color: var(--navy); }
a:hover { color: var(--navy-d); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.35; margin: 0; }
.serif { font-family: var(--serif); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* 머리말 */
.hd { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.hd .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo b { font-family: var(--serif); font-weight: 900; font-size: 23px; color: var(--navy-d); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-weight: 500; }
.nav a { text-decoration: none; padding: 6px 0; }
.nav a.on { color: var(--navy-d); font-weight: 700; border-bottom: 2px solid var(--navy-d); }
.hd-user { display: flex; align-items: center; gap: 10px; font-size: 15px; }

/* 버튼·입력 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 20px; border-radius: 12px;
  border: 1px solid var(--line2); background: var(--white); color: var(--ink); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--navy); color: var(--navy-d); }
.btn-p { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.btn-p:hover { background: var(--navy-d); color: #fff; }
.btn-g { background: var(--gold); border-color: var(--gold); color: var(--navy-d); font-weight: 700; }
.btn-s { min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 15px; }
.field input, .field select { min-height: 48px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 12px; font: inherit; background: #fff; }
.field input:focus, .field select:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.field small { color: var(--muted); font-size: 13px; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* 카드·배지 */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.chip { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--soft); color: var(--navy); }
.chip-gold { background: var(--gold-soft); color: var(--gold-ink); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.sec { padding: 64px 0; }
.sec-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec h2 { font-family: var(--serif); font-size: 32px; color: var(--navy-d); margin-bottom: 10px; }
.sec .lead { color: var(--muted); font-size: 17px; margin: 0 0 32px; }

/* 말풍선 */
.bubble { background: #fff; border: 1px solid #d5deec; border-radius: 16px; padding: 14px 16px; box-shadow: 0 6px 18px rgba(20,38,74,.08); font-size: 15px; }

/* 표 */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 13px; color: var(--muted); font-weight: 700; }
.tbl-box { overflow-x: auto; }

/* 알림 */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--navy-d); color: #fff; padding: 14px 20px;
  border-radius: 12px; font-size: 15px; z-index: 100; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.toast.err { background: var(--bad); }
.msg { padding: 14px 16px; border-radius: 12px; font-size: 15px; }
.msg-ok { background: var(--ok-soft); color: #14532d; }
.msg-bad { background: var(--bad-soft); color: #7a1a12; }
.msg-info { background: var(--soft); color: var(--navy-d); }

/* 꼬리말 */
.ft { background: var(--navy-d); color: #c9d3e3; font-size: 14px; }
.ft .wrap { padding-top: 36px; padding-bottom: 36px; display: flex; flex-direction: column; gap: 8px; }
.ft a { color: #fff; }

/* 대화상자 */
.dlg-bg { position: fixed; inset: 0; background: rgba(20,38,74,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.dlg { background: #fff; border-radius: 20px; padding: 26px; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 16px; }

@media (max-width: 640px) {
  .hd { position: static; }
  .hd .wrap { gap: 8px 16px; }
  .hero-art .bubble { left: 0; }
  .sec { padding: 44px 0; }
  .sec h2 { font-size: 26px; }
  .card { padding: 20px; }
  .nav { gap: 2px 16px; font-size: 15px; }
}
