/* 교육용 가상 행사 · 실제 모집 아님 — 휴대폰 먼저, 사진 없이 색 블록과 글자만 */
:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --tint: #fdf0e1;
  --ink: #2b2420;
  --muted: #6d625a;
  --line: #e9dccd;
  --primary: #c8502d;
  --primary-ink: #ffffff;
  --primary-dark: #a63f20;
  --c1: #f2a541;
  --c2: #3c8d7f;
  --c3: #6c5ba7;
  --c4: #e26d5a;
  --ok-bg: #e3f3ee;
  --ok-ink: #1f6b5c;
  --warn-bg: #fff1d6;
  --warn-ink: #7a4b00;
  --err-bg: #fde7e3;
  --err-ink: #a12a12;
  --band-bg: #2b2420;
  --band-ink: #ffe7b8;
  --radius: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img, svg { max-width: 100%; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .6em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); font-size: .95rem; }
a { color: var(--primary-dark); }

/* 맨 위 띠 */
.notice-band {
  position: sticky; top: 0; z-index: 20;
  background: var(--band-bg); color: var(--band-ink);
  text-align: center; font-weight: 700; font-size: 1rem;
  padding: 10px 16px;
}

/* 첫 화면 */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #fbe3c8 0%, #f8cfa8 55%, #f3b98d 100%);
  padding: 40px 0 48px;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-host { font-weight: 700; color: var(--primary-dark); margin-bottom: .3em; }
.hero h1 { font-size: 2.2rem; letter-spacing: -0.02em; }
.hero-lead { font-size: 1.1rem; }
.hero-facts { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; }
.hero-facts li {
  display: flex; gap: 12px; align-items: baseline;
  background: rgba(255,255,255,.75); border-radius: 12px; padding: 12px 14px;
}
.fact-label { flex: 0 0 4.2em; font-weight: 700; color: var(--primary-dark); }
.hero-facts small { color: var(--muted); }
.hero-shapes span { position: absolute; border-radius: 50%; opacity: .35; }
.hero-shapes span:nth-child(1) { width: 180px; height: 180px; background: var(--c1); right: -60px; top: -40px; }
.hero-shapes span:nth-child(2) { width: 110px; height: 110px; background: var(--c2); right: 40px; bottom: -30px; border-radius: 24px; transform: rotate(18deg); }
.hero-shapes span:nth-child(3) { width: 70px; height: 70px; background: var(--c3); left: -20px; bottom: 30px; }
.hero-shapes span:nth-child(4) { width: 46px; height: 46px; background: var(--c4); right: 120px; top: 30px; border-radius: 12px; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 24px; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: #b9a79a; cursor: wait; }
.btn-ghost { background: transparent; color: var(--primary-dark); border-color: var(--primary); }
.btn-big { font-size: 1.15rem; min-height: 58px; padding: 14px 32px; }
.btn-block { width: 100%; }
.btn:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--c3); outline-offset: 2px;
}

/* 분위기 예시 사진 (Pixabay · 실제 행사 사진 아님) */
.photo-band { margin: 0; position: relative; background: var(--tint); }
.photo-band img { display: block; width: 100%; height: 140px; object-fit: cover; }
.photo-band figcaption, .program-photo figcaption {
  font-size: .78rem; color: var(--muted); padding: 4px 16px; text-align: right;
}
.program-photo { margin: 12px 0 0; }
.program-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; background: var(--tint); }
.program-photo figcaption { padding: 4px 0 0; }

/* 바로 가기 */
.quick-nav {
  position: sticky; top: 44px; z-index: 15;
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px;
  background: var(--bg); border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.quick-nav::-webkit-scrollbar { display: none; }
.quick-nav a {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-size: .95rem;
}

/* 섹션 */
.section { padding: 40px 0; scroll-margin-top: 100px; }
.section-tint { background: var(--tint); }
.section-note { color: var(--muted); font-size: .95rem; }
.sub { margin-top: 1.6em; }
.big-quote {
  font-size: 1.15rem; font-weight: 600;
  border-left: 6px solid var(--c1); padding: 6px 0 6px 14px; margin: 0 0 20px;
}
.info-list { margin: 0 0 16px; display: grid; gap: 8px; }
.info-list > div {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.info-list dt { flex: 0 0 4.2em; font-weight: 700; color: var(--primary-dark); }
.info-list dd { margin: 0; flex: 1 1 12em; }

/* 태그 */
.tag {
  display: inline-block; font-size: .75rem; font-weight: 700; vertical-align: middle;
  padding: 2px 10px; border-radius: 999px; margin-left: 4px; white-space: nowrap;
}
.tag-ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag-common { background: #eee7df; color: var(--muted); }

/* 프로그램 카드 */
.program-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.program-card {
  display: grid; grid-template-columns: 1fr; gap: 4px;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line); border-left: 8px solid #d8cabb;
  padding: 16px 16px 12px;
}
.program-card.c1 { border-left-color: var(--c1); }
.program-card.c2 { border-left-color: var(--c2); }
.program-card.c3 { border-left-color: var(--c3); }
.program-time { font-weight: 800; font-size: 1.05rem; color: var(--primary-dark); }
.program-body h3 { margin-bottom: .2em; }
.program-zone { color: var(--muted); font-size: .95rem; margin-bottom: .3em; }
.program-body p:last-child { margin-bottom: 0; }

/* 참가 안내 */
.steps { padding-left: 1.4em; margin: 0; }
.steps li { margin-bottom: 8px; }
.tbd-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tbd-list li {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px;
  background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px;
}
.tbd-list em { font-style: normal; font-weight: 700; color: var(--warn-ink); background: var(--warn-bg); padding: 0 10px; border-radius: 999px; }

.activity-list, .contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.activity-list li { background: var(--surface); border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 8px solid #d8cabb; }
.activity-list li.a1 { border-left-color: var(--c1); }
.activity-list li.a2 { border-left-color: var(--c2); }
.activity-list li.a3 { border-left-color: var(--c3); }
.activity-list li.a4 { border-left-color: var(--c4); }
.activity-list strong { display: block; }
.activity-list small { display: block; color: var(--muted); font-size: .9rem; }
.activity-list span { display: block; }
.activity-list em { display: block; font-style: normal; color: var(--muted); font-size: .92rem; margin-top: 4px; }
.mt { margin-top: 12px; }
.org-note { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: .95rem; }
.plain-list { padding-left: 1.3em; margin: 0; }
.plain-list li { margin-bottom: 6px; }
.info-list.wide-dt dt { flex-basis: 7.5em; }
.info-list.wide-dt > div { margin: 0; }
.contact-list li { color: var(--muted); }

/* 신청 폼 */
.section-apply { background: #fff3e6; }
.practice-note {
  background: var(--warn-bg); color: var(--warn-ink); font-weight: 600;
  border-radius: 12px; padding: 12px 14px;
}
form { margin-top: 16px; }
.field { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.field > label, .field legend { display: block; font-weight: 700; margin-bottom: 8px; padding: 0; }
.req { font-size: .75rem; color: var(--err-ink); background: var(--err-bg); padding: 1px 8px; border-radius: 999px; margin-left: 4px; vertical-align: middle; }
input[type="text"], input[type="tel"], input[type="number"], input[type="password"] {
  width: 100%; min-height: 54px; padding: 12px 14px;
  font: inherit; font-size: 1.1rem; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: 12px;
}
input:focus { border-color: var(--c3); outline: none; }
.field.has-error input[type="text"], .field.has-error input[type="tel"], .field.has-error input[type="number"] { border-color: var(--err-ink); }
.hint { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.field-error { color: var(--err-ink); font-weight: 600; font-size: .95rem; margin: 6px 0 0; }
.field-error:empty { display: none; }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper input { width: 5em; text-align: center; flex: 0 0 auto; }
.step-btn {
  width: 54px; height: 54px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--surface); font-size: 1.5rem; font-weight: 700; color: var(--ink); cursor: pointer;
}
.unit { font-weight: 700; }

.choice {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  background: var(--surface); border: 2px solid var(--line); border-radius: 12px;
  padding: 14px; margin-bottom: 10px; font-weight: 400;
}
.choice input { width: 24px; height: 24px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--primary); }
.choice small { display: block; color: var(--muted); font-size: .9rem; }
.choice:has(input:checked) { border-color: var(--primary); background: #fff7f0; }
.field.has-error .choice { border-color: #efb3a6; }

.privacy details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 10px; font-size: .95rem;
}
.privacy summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.privacy ul { margin: 8px 0 0; padding-left: 1.2em; }
.consent span { font-size: .98rem; }

.form-status { border-radius: 12px; padding: 14px; margin-bottom: 16px; font-weight: 600; }
.form-status.error { background: var(--err-bg); color: var(--err-ink); }
.form-status.unknown { background: var(--warn-bg); color: var(--warn-ink); }
.form-status.info { background: #eee7df; color: var(--ink); }

/* 접수 완료 */
.done-panel {
  background: var(--surface); border: 3px solid var(--c2); border-radius: var(--radius);
  padding: 24px 18px; text-align: center; margin-top: 16px;
}
.done-panel:focus { outline: none; }
.done-badge {
  display: inline-block; background: var(--ok-bg); color: var(--ok-ink);
  font-weight: 800; font-size: 1.2rem; padding: 6px 18px; border-radius: 999px;
}
.receipt-label { margin: 16px 0 0; color: var(--muted); }
.receipt-no { font-size: 2rem; font-weight: 800; letter-spacing: .06em; color: var(--ink); margin-bottom: 12px; }

/* 바닥글 */
.site-footer { background: var(--band-bg); color: #e9dccd; padding: 28px 0 40px; font-size: .95rem; }
.site-footer p { margin-bottom: .4em; }
.footer-admin { color: #ffd59a; }

/* 관리자 */
.admin-main { padding: 28px 0 48px; }
.admin-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px; margin-bottom: 16px; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.admin-toolbar .btn { min-height: 44px; padding: 8px 18px; font-size: 1rem; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.stat { background: var(--tint); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: .9rem; }
.app-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.app-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.app-item .row1 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-weight: 700; }
.app-item .receipt { font-family: ui-monospace, Consolas, monospace; color: var(--primary-dark); }
.app-item .meta { color: var(--muted); font-size: .92rem; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }

@media (min-width: 640px) {
  body { font-size: 18px; }
  .hero { padding: 64px 0 72px; }
  .hero h1 { font-size: 2.8rem; }
  .hero-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-facts li { flex-direction: column; gap: 2px; }
  .program-card { grid-template-columns: 8.5em 1fr; gap: 12px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .btn-block { width: auto; min-width: 280px; }
  .done-panel .btn-block { width: 100%; }
}
