/* 세계문화 어울림 축제 · 교육용 가상 행사 · 실제 모집 아님 */

:root {
  --paper: #F6F7FA;   /* 맑은 바탕 */
  --ink: #1E2A4A;     /* 먹남색 */
  --indigo: #2F5DA8;  /* 쪽빛 */
  --p01: #F2A541;     /* 귤빛 조각 */
  --p02: #3E9E77;     /* 풀빛 조각 */
  --p03: #E46F8C;     /* 분홍 조각 */
  --white: #FFFFFF;
  --line: #D5DAE5;
  --ink-soft: #44506E;

  --f-display: "Jua", "IBM Plex Sans KR", system-ui, sans-serif;
  --f-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;

  --gutter: 20px;
  --measure: 40rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.25;
  margin-bottom: 16px;
}
h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  margin: 32px 0 10px;
}
p + p { margin-top: 10px; }

.small { font-size: 16px; color: var(--ink-soft); }

:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
}

.wrap {
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* 1. 맨 위 띠 */
.edu-band {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0;
  padding: 10px var(--gutter);
  background: var(--ink);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

/* 2. 첫 화면 */
.hero { padding-top: 40px; padding-bottom: 48px; }
.hero-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.15;
}
.hero-lead {
  margin-top: 14px;
  font-size: 20px;
  line-height: 1.6;
  max-width: 22em;
}

.strip {
  display: flex;
  height: 28px;
  margin: 28px 0 24px;
}
.strip > span { flex: var(--m) 1 0; }
.strip-piece { border-radius: 4px; }
.strip-piece.is-common { border: 2px solid var(--ink); background: var(--white); }
.strip-piece.is-p01 { background: var(--p01); }
.strip-piece.is-p02 { background: var(--p02); }
.strip-piece.is-p03 { background: var(--p03); }

.hero-facts li + li { margin-top: 4px; }
.fact-date { font-size: 28px; font-weight: 700; line-height: 1.3; }
.fact-time { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fact-note { font-size: 16px; color: var(--ink-soft); }
.hero-facts li:last-child { margin-top: 10px; }

.hero .btn { margin-top: 28px; }

/* 버튼 */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  font-family: var(--f-body);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--indigo); color: var(--white); }
.btn-primary:hover { background: #274F91; }
.btn-primary[disabled] { background: var(--ink-soft); cursor: progress; }
.btn-secondary {
  background: var(--white);
  color: var(--indigo);
  border: 3px solid var(--indigo);
}

/* 꼬리표 */
.tag {
  display: inline-block;
  padding: 2px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.tag-free { font-size: 18px; background: var(--white); }

/* 섹션 */
.section {
  padding-top: 48px;
  padding-bottom: 48px;
  border-top: 2px solid var(--line);
}

/* 4. 프로그램: 오후 한 장 조각보 */
.day { margin-top: 24px; }
.day-row {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  column-gap: 12px;
}
.day-row + .day-row { margin-top: 20px; } /* 10분 틈 또는 이음새 */
.day-row:nth-child(2) { margin-top: 0; }  /* 13:20은 바로 이어짐 */
.day-row:last-child { margin-top: 0; }    /* 16:40도 바로 이어짐 */
.day-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  padding-top: 2px;
}
.piece {
  min-height: calc(var(--m) * 2.4px + 24px);
  padding: 14px 14px 14px;
  border-radius: 4px;
}
.piece.is-common { background: var(--white); border: 2px dashed var(--ink); }
.piece.is-p01 { background: var(--p01); }
.piece.is-p02 { background: var(--p02); }
.piece.is-p03 { background: var(--p03); }
.piece-title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.25;
}
.piece-meta {
  margin-top: 2px;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.piece-body {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--white);
  border-radius: 4px;
}
.piece.is-common .piece-body { padding: 0; margin-top: 4px; }
.piece-kind { font-size: 16px; font-weight: 700; color: var(--ink-soft); }
.day-end {
  margin-top: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 5. 참가 안내 */
.steps { counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  min-height: 36px;
}
.steps li + li { margin-top: 14px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  line-height: 34px;
  text-align: center;
}
.tbd li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

/* 6. 주최·주관 */
.host { margin-bottom: 16px; }
.host div + div { margin-top: 6px; }
.host dt { font-size: 16px; color: var(--ink-soft); }
.host dd { font-size: 20px; font-weight: 700; }
.acts li + li, .contact li + li { margin-top: 12px; }
.contact li { font-weight: 500; }

/* 7. 신청 폼 */
.notice {
  padding: 16px;
  background: var(--white);
  border-left: 6px solid var(--ink);
  border-radius: 4px;
}
.notice-band { font-weight: 700; }

form { margin-top: 24px; }
.field { margin: 0 0 28px; padding: 0; border: 0; min-width: 0; }
.field > label, legend, .consent-head {
  display: block;
  padding: 0;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
}
.hint { font-size: 16px; color: var(--ink-soft); margin: -4px 0 8px; }

input[type="text"], input[type="tel"], input[type="number"], input[type="password"] {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 20px;
}
input::placeholder { color: #7A849C; }
input[aria-invalid="true"] { border-width: 3px; border-color: var(--ink); background: #FFF4F6; }

.stepper { display: flex; align-items: center; gap: 10px; }
.stepper input { width: 5.5rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper-unit { font-size: 20px; font-weight: 700; margin-right: auto; }
.step-btn {
  flex: 0 0 56px;
  height: 56px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  margin-bottom: 10px;
  padding: 10px 14px 10px 0;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  overflow: hidden;
}
.choice::before {
  content: "";
  align-self: stretch;
  flex: 0 0 14px;
  margin: -10px 0;
}
.choice.is-p01::before { background: var(--p01); }
.choice.is-p02::before { background: var(--p02); }
.choice.is-p03::before { background: var(--p03); }
.choice:has(input:checked) { border: 3px solid var(--indigo); background: #EEF3FB; }
.choice input, .consent input {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin: 0;
  accent-color: var(--indigo);
  cursor: pointer;
}
.choice-text { display: flex; flex-direction: column; line-height: 1.4; }
.choice-text span { font-size: 16px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.consent-info { margin-bottom: 12px; padding-left: 0; }
.consent-info li + li { margin-top: 4px; }
.consent {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
}
.consent input { margin-top: 2px; }

.field-error:empty { display: none; }
.field-error {
  margin-top: 8px;
  padding-left: 10px;
  border-left: 4px solid var(--ink);
  font-weight: 700;
}

.error-summary {
  margin-top: 20px;
  padding: 16px;
  background: #FFF4F6;
  border: 3px solid var(--ink);
  border-radius: 10px;
}
.error-summary p { font-weight: 700; }
.error-summary ul { margin-top: 8px; list-style: disc; padding-left: 1.2em; }
.error-summary a { color: var(--indigo); font-weight: 700; }

.unknown {
  margin-top: 20px;
  padding: 16px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 10px;
}
.unknown .btn { margin-top: 14px; }

/* 8. 접수 완료 */
.done {
  padding: 20px;
  background: var(--white);
  border: 3px solid var(--indigo);
  border-radius: 12px;
}
.done h3 {
  margin: 0 0 6px;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 32px;
}
.done-label { margin-top: 20px; font-size: 16px; color: var(--ink-soft); }
.done-number {
  margin-top: 0;
  font-family: var(--f-display);
  font-size: 36px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.done-sum { margin: 20px 0 16px; }
.done-sum div + div { margin-top: 10px; }
.done-sum dt { font-size: 16px; color: var(--ink-soft); }
.done-sum dd { font-weight: 700; }

/* 꼬리말 */
.foot {
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 2px solid var(--line);
  font-size: 16px;
  color: var(--ink-soft);
}

/* 9. 관리자 */
.admin-list { margin-top: 16px; }
.admin-item {
  padding: 14px 16px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 10px;
}
.admin-item + .admin-item { margin-top: 12px; }
.admin-item dl div { display: flex; flex-wrap: wrap; gap: 0 10px; }
.admin-item dt { flex: 0 0 7.5em; color: var(--ink-soft); font-size: 16px; padding-top: 2px; }
.admin-item dd { flex: 1 1 10em; font-weight: 500; overflow-wrap: anywhere; }
.admin-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.admin-bar .btn { flex: 1 1 10rem; width: auto; }
.status-msg { margin-top: 14px; font-weight: 700; }
.status-msg:empty { display: none; }

/* 넓은 화면 */
@media (min-width: 768px) {
  .hero-title { font-size: 56px; }
  .strip { height: 36px; }
  .day-row { grid-template-columns: 4.5rem 1fr; column-gap: 20px; }
  .day-time { font-size: 20px; }
  .piece { min-height: calc(var(--m) * 3px + 24px); padding: 18px 20px; }
  .hero .btn, .apply .btn-primary { max-width: 22rem; }
}
