:root {
  color-scheme: light;
  --bg: #f7f0e2;
  --surface: #fffbf2;
  --surface-muted: #f0e4cd;
  --ink: #241c12;
  --ink-muted: #6f6252;
  --ink-faint: #96897487;
  --accent: #d9803d;
  --accent-strong: #b7652a;
  --on-accent: #fffaf1;
  --line: #e7d9bd;
  --success: #3f7d55;
  --success-soft: #e2f0e5;
  --danger: #b5432c;
  --danger-soft: #fbe8e1;
  --info: #3d6b8f;
  --info-soft: #e7eef4;
  --shadow: 0 10px 28px -14px rgba(60, 40, 12, 0.28);
  --radius-lg: 22px;
  --radius-md: 16px;
  --sans: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #18130e; --surface: #241c14; --surface-muted: #2e2419;
  --ink: #f5ecdb; --ink-muted: #bcac95; --ink-faint: #8c7f6a;
  --accent: #e2984f; --accent-strong: #edb073; --on-accent: #241505;
  --line: #4d3f2c; --success: #7cbf8f; --success-soft: #1f3324;
  --danger: #e2836f; --danger-soft: #3a231c;
  --info: #7fa8c9; --info-soft: #1e2a33;
  --shadow: 0 10px 28px -14px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
button, a, label, input, select { touch-action: manipulation; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select { font-family: var(--sans); }
a { color: var(--accent-strong); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 20px; }
.masthead { padding: 28px 0 6px; }
.masthead .eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.masthead .org-name { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }

main { padding-bottom: 56px; }

.card { margin-top: 18px; background: var(--surface); border-radius: var(--radius-lg); padding: 24px 22px; box-shadow: var(--shadow); }
.card h2 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.print-form-link { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 14px; font-size: 12.5px; font-weight: 700; color: var(--ink-muted); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .print-form-link:hover { color: var(--accent-strong); } }

.hero-heading { margin: 0 0 10px; font-size: 23px; font-weight: 800; line-height: 1.4; text-wrap: balance; }
.hero-desc { margin: 0 0 22px; color: var(--ink-muted); font-size: 14.5px; }
.section-subtitle { margin: 0 0 4px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 19px; font-weight: 800; }
.card > p.desc { margin: 0 0 16px; color: var(--ink-muted); font-size: 13.5px; }

.category-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 16px; }
.category-tab { display: inline-flex; align-items: center; background: var(--surface-muted); border: 1.5px solid var(--line); color: var(--ink-muted); font-family: var(--sans); font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.category-tab.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.landing-hint { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-muted); }

.promo-panel p.promo-intro { margin: 0 0 20px; color: var(--ink-muted); font-size: 13.5px; }
.promo-hero { margin: 0 0 22px; }
.promo-hero h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; line-height: 1.4; text-wrap: balance; }
.promo-hero p { margin: 0; color: var(--accent-strong); font-weight: 700; font-size: 13px; }
.promo-block { margin: 0 0 22px; }
.promo-block-title { margin: 0 0 12px; font-size: 14.5px; font-weight: 800; color: var(--ink); }
.promo-purpose { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.promo-purpose li { display: flex; gap: 10px; align-items: flex-start; }
.promo-num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.promo-purpose li span:last-child { padding-top: 1px; font-size: 13.5px; color: var(--ink-muted); line-height: 1.55; }
.promo-info-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.promo-info-box { background: var(--surface-muted); border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.promo-info-label { font-size: 11.5px; font-weight: 700; color: var(--accent-strong); margin-bottom: 4px; }
.promo-info-value { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.promo-info-note { margin-top: 4px; font-size: 11.5px; color: var(--ink-faint); }
.promo-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.promo-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.promo-steps li:last-child { border-bottom: none; padding-bottom: 0; }
.promo-step-num { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-muted); border: 1.5px solid var(--line); color: var(--accent-strong); font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.promo-step-body strong { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.promo-step-body span { font-size: 12px; color: var(--ink-muted); }
.promo-cta { display: block; text-align: center; text-decoration: none; margin: 4px 0 16px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px; padding: 13px; border-radius: 12px; }
@media (hover: hover) and (pointer: fine) { .promo-cta:hover { background: var(--accent-strong); } }
.promo-footer-note { text-align: center; font-size: 12.5px; color: var(--ink-muted); }
.promo-footer-note strong { display: block; color: var(--ink); font-size: 13.5px; margin-bottom: 4px; }

.inquiry-subtabs { display: flex; gap: 8px; margin-bottom: 20px; }
.inquiry-subtab { flex: 1; text-align: center; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-muted); font-family: var(--sans); font-size: 13.5px; font-weight: 700; padding: 10px; border-radius: 10px; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.inquiry-subtab.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.lookup-item { background: var(--surface-muted); border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; margin-top: 12px; }
.lookup-item-date { font-size: 11.5px; color: var(--ink-faint); margin-bottom: 6px; }
.lookup-item-message { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; line-height: 1.55; }
.lookup-item-reply { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.lookup-item-reply-label { font-size: 11.5px; font-weight: 700; color: var(--accent-strong); margin-bottom: 4px; }
.lookup-item-reply-text { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; line-height: 1.55; }
.lookup-item-pending { margin-top: 10px; font-size: 12px; color: var(--ink-faint); }

.course-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.course-card { background: var(--surface-muted); border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; transition: border-color .15s ease; }
.course-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }
.course-card.full { opacity: 0.75; }
.course-card .course-name { font-weight: 700; font-size: 15.5px; }
.course-card .course-meta { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-muted); }
.course-card .course-desc { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-muted); }
.course-card-header { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer; }
.course-card-header-text { flex: 1; min-width: 0; }
.course-card-chevron { flex-shrink: 0; font-size: 20px; line-height: 1; color: var(--ink-faint); transition: transform .15s ease; }
.course-card.expanded .course-card-chevron { transform: rotate(90deg); color: var(--accent-strong); }
.course-card-details { margin-top: 12px; }
.course-card-details[hidden] { display: none; }
.closed-pill { margin-left: 6px; background: var(--danger-soft); color: var(--danger); vertical-align: middle; }
.list-apply-btn { display: block; margin-top: 6px; text-align: center; text-decoration: none; background: var(--accent); color: var(--on-accent); border: none; border-radius: 12px; font-family: var(--sans); font-size: 15px; font-weight: 700; padding: 14px; }
@media (hover: hover) and (pointer: fine) { .list-apply-btn:hover { background: var(--accent-strong); } }
.pill-row { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--surface); color: var(--ink-muted); white-space: nowrap; }
.pill-accent { background: var(--accent); color: var(--on-accent); }
.course-contact { margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-muted); }
.seats-line { margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.seats-line.warn { color: var(--accent-strong); }
.seats-line.closed { color: var(--danger); }
.notice-row { margin: 10px 0 16px; padding: 10px 14px; background: var(--info-soft); border: 1px solid var(--info); border-radius: 10px; display: flex; flex-wrap: wrap; row-gap: 4px; column-gap: 14px; font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.card-actions > * { flex: 1; }
.apply-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 4px; background: var(--accent); color: var(--on-accent); border: none; border-radius: 10px; font-family: var(--sans); font-size: 13.5px; font-weight: 700; padding: 10px; cursor: pointer; text-decoration: none; text-align: center; transition: background .15s ease, opacity .15s ease; }
@media (hover: hover) and (pointer: fine) { .apply-btn:hover { background: var(--accent-strong); } }
.apply-btn:disabled { background: var(--surface); color: var(--ink-faint); cursor: not-allowed; }
.call-btn { display: flex; align-items: center; justify-content: center; gap: 5px; background: var(--surface); color: var(--accent-strong); border: 1.5px solid var(--line); border-radius: 10px; font-family: var(--sans); font-size: 13.5px; font-weight: 700; padding: 10px; text-decoration: none; white-space: nowrap; transition: border-color .15s ease, background .15s ease; }
@media (hover: hover) and (pointer: fine) { .call-btn:hover { border-color: var(--accent); background: var(--surface-muted); } }
.empty { color: var(--ink-faint); font-size: 13px; text-align: center; padding: 6px 0; }

.selected-course { margin: -2px 0 18px; font-size: 13.5px; color: var(--ink-muted); }
.selected-course strong { color: var(--ink); }

.field { margin-bottom: 16px; }
.field:last-of-type { margin-bottom: 0; }
.field label { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field .req { color: var(--danger); margin-left: 2px; }
.field input, .field select {
  width: 100%; font-size: 16px; padding: 12px 13px; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--surface-muted); color: var(--ink); appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%), linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%); background-position: calc(100% - 20px) center, calc(100% - 15px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field textarea {
  width: 100%; font-size: 15px; padding: 12px 13px; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--surface-muted); color: var(--ink); font-family: var(--sans);
  resize: vertical; min-height: 100px;
}
.field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field-hint { margin: 6px 2px 0; font-size: 12px; line-height: 1.45; color: var(--ink-muted); }
.field-hint.warn { color: var(--danger); font-weight: 600; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip { display: inline-flex; align-items: center; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface-muted); font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--ink-muted); cursor: pointer; user-select: none; }
.check-chip input { -webkit-appearance: none; appearance: none; flex-shrink: 0; align-self: center; display: inline-block; width: 16px; height: 16px; min-width: 16px; margin: 0 8px 0 0; padding: 0; border: 1.5px solid var(--ink-faint); border-radius: 5px; background: var(--surface); position: relative; top: 0; cursor: pointer; }
.check-chip input:checked { background: var(--accent); border-color: var(--accent); }
.check-chip input[type="checkbox"]:checked::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check-chip input[type="radio"] { border-radius: 50%; }
.check-chip input[type="radio"]:checked::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--on-accent); transform: translate(-50%, -50%); }
.check-chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-muted)); color: var(--ink); }

.consent { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-muted); border-radius: 10px; padding: 12px 13px; font-size: 12.5px; color: var(--ink-muted); margin-bottom: 14px; }
.consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex-shrink: 0; }

button.submit {
  width: 100%; background: var(--accent); color: var(--on-accent); border: none; border-radius: 12px;
  font-family: var(--sans); font-size: 16px; font-weight: 700; padding: 15px; cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
}
@media (hover: hover) and (pointer: fine) { button.submit:hover { background: var(--accent-strong); } }
button.submit:disabled { opacity: 0.6; cursor: progress; }

.banner { margin-top: 12px; font-size: 12.5px; padding: 10px 12px; border-radius: 10px; display: none; }
.banner.err { display: block; background: var(--danger-soft); color: var(--danger); }
.banner.ok { display: block; background: var(--success-soft); color: var(--success); }

footer.site { text-align: center; padding: 24px 20px 40px; font-size: 12px; color: var(--ink-faint); }
footer.site a { color: var(--ink-faint); text-decoration: underline; }

.toast-overlay { position: fixed; inset: 0; background: rgba(24, 19, 14, 0.55); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 100; }
.toast-overlay[hidden] { display: none; }
.toast-card { background: var(--surface); border-radius: 18px; padding: 26px 24px; max-width: 340px; width: 100%; text-align: center; box-shadow: var(--shadow); }
.toast-card .icon { width: 46px; height: 46px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 22px; }
.toast-card h3 { font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.toast-card p { font-size: 13.5px; color: var(--ink-muted); margin: 0; }
.toast-card button { margin-top: 18px; width: 100%; background: var(--accent); color: var(--on-accent); border: none; border-radius: 10px; padding: 12px; font-weight: 700; font-size: 14.5px; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
