:root {
  --bg: #f8f4ef;  /* common.css 사이트 공용 배경색이랑 통일 - 예전엔 #efe9dd 로 따로 박아둬서 미묘하게 안 맞았음 */
  --bg-raised: #f7f3ea;
  --ink: #2a2620;
  --ink-soft: #5b5346;
  --ink-faint: #8b8272;
  --line: #d9d0bd;
  --line-soft: #e4dccb;
  --pine: #3d5646;
  --pine-deep: #2b3e33;
  --pine-tint: #e2e8e0;
  --gold: #a9822f;
  --gold-tint: #f1e6c8;
  --red: #96432f;
  --red-tint: #f0ded6;
  --shadow: 0 1px 2px rgba(42,38,32,0.06), 0 8px 24px -12px rgba(42,38,32,0.18);
  --blue: #3c5a72;
  --blue-tint: #dfe6ea;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #211d18;
    --bg-raised: #2a251e;
    --ink: #eee7d8;
    --ink-soft: #bcb199;
    --ink-faint: #8b8272;
    --line: #3d372c;
    --line-soft: #332e25;
    --pine: #8fae9b;
    --pine-deep: #b7cbbe;
    --pine-tint: #29352e;
    --gold: #d8b866;
    --gold-tint: #362d1c;
    --red: #d8917d;
    --red-tint: #3a241f;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px -12px rgba(0,0,0,0.5);
    --blue: #8fb2c9;
    --blue-tint: #263038;
  }
}
:root[data-theme="dark"] {
  --bg: #211d18;
  --bg-raised: #2a251e;
  --ink: #eee7d8;
  --ink-soft: #bcb199;
  --ink-faint: #8b8272;
  --line: #3d372c;
  --line-soft: #332e25;
  --pine: #8fae9b;
  --pine-deep: #b7cbbe;
  --pine-tint: #29352e;
  --gold: #d8b866;
  --gold-tint: #362d1c;
  --red: #d8917d;
  --red-tint: #3a241f;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px -12px rgba(0,0,0,0.5);
  --blue: #8fb2c9;
  --blue-tint: #263038;
}

* { box-sizing: border-box; }
a {
  color: inherit;
  text-decoration: none;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.65;
  font-size: 15.5px;
}

h1, h2, h3 {
  font-family: "Noto Serif KR", "Batang", serif;
  color: var(--ink);
  text-wrap: balance;
  font-weight: 700;
  margin: 0;
}

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

button { font-family: inherit; }

/* ---------- Header ---------- */
/* header >> body > header : 공통 헤더 fragment 안의 <header>에도 걸릴 수 있어서 페이지 헤더로 범위 좁힘 */
body > header {
  padding: 110px 24px 0;   /* 48px >> 110px : fixed 공통 헤더(74px)에 TEMPLESTAY RESERVATION이 가려져서 */
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(60% 60% at 50% 0%, var(--pine-tint), transparent 70%);
}
body > header > h1 {       /* header h1 >> body > header > h1 */
  font-size: clamp(26px, 4vw, 34px);
}
body > header > h1::before {   /* header h1::before >> body > header > h1::before */
  content: "TEMPLESTAY RESERVATION";
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--pine);
  font-weight: 600;
  margin-bottom: 16px;
}

/* ---------- Progress steps ---------- */
#progress-steps {
  display: flex;
  justify-content: center;
  gap: 0;
  list-style: none;
  margin: 28px auto 0;
  padding: 0;
  max-width: 560px;
}
#progress-steps li {
  position: relative;
  flex: 1;
  text-align: center;
  padding: 22px 8px 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
  font-family: "Noto Sans KR", sans-serif;  /* 폰트교체 */
  letter-spacing: -0.01em;   /* 0.02em >> -0.01em*/
}
#progress-steps li::before {
  content: "";
  position: absolute;
  top: 5px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
#progress-steps li:first-child::before { display: none; }
#progress-steps li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 2px solid var(--line);
  z-index: 1;
}
#progress-steps li.active {
  color: var(--pine-deep);
}
#progress-steps li.active::before {
  background: var(--pine);
}
#progress-steps li.active::after {
  border-color: var(--pine);
  background: var(--pine);
}
#progress-steps li:has(~ li.active)::before {
  background: var(--pine);
}
#progress-steps li:has(~ li.active)::after {
  background: var(--pine);
}

main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

section[data-step] {
  transition: opacity 0.18s ease, transform 0.18s ease;
}
section[data-step].step-fade {
  opacity: 0;
  transform: translateY(4px);
}
@media (prefers-reduced-motion: reduce) {
  section[data-step] { transition: none; }
}

section > h2 {
  font-size: 22px;
  margin-bottom: 20px;
}

/* ---------- Filter form ---------- */
#filter-form {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
@media (max-width: 720px) {
  #filter-form { grid-template-columns: 1fr 1fr; }
}
.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-item label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}
select, input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea {
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  width: 100%;
}
select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 18%, transparent);
}

/* ---------- Program list ---------- */
#program-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

#program-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
}
#program-pagination button {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-raised);
  color: inherit;
  cursor: pointer;
  font-size: 13px;
}
#program-pagination button.active {
  background: var(--pine);
  border-color: var(--pine);
  color: var(--bg-raised);
  font-weight: 700;
}
#program-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.program-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
  background: var(--bg-raised);
  transition: border-color 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;     /* 썸네일 모서리가 카드 radius 밖으로 안 삐져나오게 */
}
.program-card-thumb {
  width: 100%;
  height: 160px;
  background-color: var(--line-soft);
  background-image:
          radial-gradient(circle at 21px 21px, transparent 9px, color-mix(in srgb, var(--gold) 20%, transparent) 10px, color-mix(in srgb, var(--gold) 20%, transparent) 10.6px, transparent 11.6px),
          radial-gradient(circle at 21px 21px, transparent 3px, color-mix(in srgb, var(--pine) 30%, transparent) 3.6px, transparent 4.6px);
  background-size: 42px 42px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.program-card-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: scale-down;
  border-radius: 8px;
  display: block;
  filter: saturate(0.9) sepia(0.08) contrast(1.03);
  box-shadow: 0 8px 18px -8px rgba(42, 38, 32, 0.3);
  transition: transform 0.2s ease;
}
.program-card:hover .program-card-thumb img {
  transform: translateY(-2px) scale(1.02);
}

.program-card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.program-card[data-type="체험형"] { --card-color: var(--pine); --card-tint: var(--pine-tint); }
.program-card[data-type="휴식형"] { --card-color: var(--blue); --card-tint: var(--blue-tint); }
.program-card[data-type="당일형"] { --card-color: var(--gold); --card-tint: var(--gold-tint); }

.program-card:hover {
  border-color: var(--card-color, var(--pine));
  transform: translateY(-2px);
}
.program-card.picked {
  border: 2px solid var(--card-color, var(--pine));
  background-color:  var(--card-tint, var(--pine-tint));
}
@media (prefers-reduced-motion: reduce) {
  .program-card { transition: none; }
  .program-card:hover { transform: none; }
}

.program-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.program-type-badge {
  display: inline-flex;
  align-self: flex-start;
  font-family: "Noto Sans KR", sans-serif;  /* IBM Plex Mono >> Noto Sans KR : 한글 글리프 없어서 폴백됨 */
  font-size: 11.5px;
  font-weight: 600;
  color: var(--badge-color, var(--gold));
  background: var(--badge-tint, var(--gold-tint));
  border-radius: 100px;
  padding: 3px 10px;
}
.program-type-badge[data-type="체험형"] {
  --badge-color: var(--pine-deep);
  --badge-tint: var(--pine-tint); }
.program-type-badge[data-type="휴식형"] {
  --badge-color: var(--blue);
  --badge-tint: var(--blue-tint);
}
.program-type-badge[data-type="당일형"] {
  --badge-color: var(--gold);
  --badge-tint: var(--gold-tint);
}
.lang-badge {
  display: inline-flex;
  align-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: #1a1a1a;
  background: transparent;
  border: 1px solid #1a1a1a;
  border-radius: 999px;
  padding: 2px 9px;
}
.badge-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.program-title {
  font-family: "Noto Serif KR", serif;
  font-size: 17px;
  font-weight: 700;
  /* 전역 h1~h3에 text-wrap:balance가 걸려있는데, 카드 폭이 좁으면 balance가
     단어를 이상한 지점에서 끊어서 줄바꿈함(예: "휴식형"의 "형"만 다음 줄로) -
     제목은 기본 줄바꿈(끝까지 채우고 넘치면 다음 줄)으로 되돌림. */
  text-wrap: wrap;
  /* 제목이 1줄/2줄로 갈리면 카드마다 높이가 들쑥날쑥해짐 - 항상 2줄 자리를
     미리 확보해서(짧은 제목은 아래에 여백만 남음) 카드 높이를 통일함. */
  line-height: 1.4;
  min-height: calc(1.4em * 2);
}
.program-temple-region {
  font-size: 13px;
  color: var(--ink-soft);
  margin: -6px 0 0;
}
.program-capacity {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0;
}
.capacity-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.capacity-dot.open { background: var(--pine); }
.capacity-dot.full { background: var(--red); }
.program-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.price-adult {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--pine-deep);
  font-size: 15px;
}
.price-minor {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-left: 6px;
}
.price-note {
  font-size: 11.5px;
  color: var(--ink-faint);
  font-weight: 500;
  margin-left: 4px;
}
.program-detail-btn {
  align-self: flex-start;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.program-detail-btn:hover {
  border-color: var(--pine);
  color: var(--pine-deep);
}

/* ---------- Buttons (shared) ---------- */
.btn-primary, #go-to-reserve-btn, #step2-submit-btn, #go-to-my-reservations-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pine);
  color: var(--bg-raised);
  font-weight: 700;
  font-size: 15px;
  border: none;
  padding: 13px 26px;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-primary:hover, #go-to-reserve-btn:not(:disabled):hover,
#step2-submit-btn:hover, #go-to-my-reservations-btn:hover {
  transform: translateY(-1px);
}
#go-to-reserve-btn:disabled {
  background: var(--line);
  color: var(--ink-faint);
  cursor: not-allowed;
  box-shadow: none;
}
#go-to-reserve-btn { margin-top: 24px; display: flex; margin-left: auto; }

/* 예약 신청 중복 클릭 방지용 로딩 스피너 - 서버 응답 올 때까지 버튼 비활성 + 원형 스피너 표시 */
#step2-submit-btn:disabled {
  opacity: .75;
  cursor: not-allowed;
  transform: none;
}
.btn-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.btn-ghost, #step2-back-btn,
#step3-back-to-list-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 100px;
  cursor: pointer;
}
.btn-ghost:hover, #step2-back-btn:hover,
#step3-back-to-list-btn:hover {
  border-color: var(--pine);
  color: var(--pine-deep);
}
.step3-actions #step3-back-to-list-btn {
  padding: 13px 26px;
  font-size: 15px;
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary, #go-to-reserve-btn, #step2-submit-btn, #go-to-my-reservations-btn { transition: none; }
}

/* ---------- Step 2 ---------- */
#selected-program-summary {
  background: var(--card-tint, var(--pine-tint));
  border: 1px solid color-mix(in srgb, var(--pine) 30%, var(--line));
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#selected-program-summary .summary-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 18px;
}
#selected-program-summary[data-type="체험형"] { --card-color: var(--pine); --card-tint: var(--pine-tint); }
#selected-program-summary[data-type="휴식형"] { --card-color: var(--blue); --card-tint: var(--blue-tint); }
#selected-program-summary[data-type="당일형"] { --card-color: var(--gold); --card-tint: var(--gold-tint); }
#selected-program-summary .program-title { font-size: 16px; }
#selected-program-summary .program-temple-region { margin: 0; font-size: 13px; }
#selected-program-summary .program-price {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  color: var(--pine-deep);
  font-size: 13.5px;
}

#reservation-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.form-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
/* .form-item의 display:flex가 [hidden] 기본 스타일(display:none)보다 나중에 선언돼서
   덮어써버림(동일 명시도라 소스 순서로 이김) - 결제수단 전환 시 payment-field가 안 숨겨지던
   원인. 명시도를 올려서 hidden이 항상 이기게 함. */
.form-item[hidden] {
  display: none;
}
.form-item label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
textarea { min-height: 80px; resize: vertical; }

/* ---------- Calendar ---------- */
#reservation-calendar {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: var(--bg-raised);
}
.cal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.cal-head button {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1;
}
.cal-head button:hover { border-color: var(--pine); color: var(--pine-deep); }
#cal-month-label {
  font-family: "Noto Sans KR", sans-serif;  /* IBM Plex Mono >> Noto Sans KR : "2026년 10월" 한글 폴백 */
  font-weight: 600;
  font-size: 14px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}
.cal-dow {
  font-size: 12.5px;
  color: var(--ink-faint);
  padding: 6px 0;
  font-weight: 600;
}
.cal-day {
  padding: 12px 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
.cal-day:hover { background-color: var(--pine-tint); }
.cal-day.disabled {
  color: var(--ink-faint);
  opacity: 0.45;
  cursor: not-allowed;
}
.cal-day.disabled:hover { background: none; }
.cal-day.empty { visibility: hidden; }
.cal-day.selected {
  background-color: var(--pine);
  color: var(--bg-raised);
  font-weight: 700;
}
#cal-selected-range {
  margin: 12px 2px 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Participants & payment ---------- */
fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  background: var(--bg-raised);
}
legend {
  font-family: "Noto Serif KR", serif;
  font-weight: 700;
  font-size: 15px;
  padding: 0 6px;
}
.participant-row {
  display: grid;
  grid-template-columns: 1fr 120px 1.4fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.participant-row:last-child { border-bottom: none; }
@media (max-width: 640px) {
  .participant-row { grid-template-columns: 1fr; }
}

#representative-info {
  border-color: color-mix(in srgb, var(--pine) 30%, var(--line));
  background: var(--pine-tint);
}
.representative-row {
  grid-template-columns: 1fr 100px 1.3fr 1.1fr;
  border-bottom: none;
  padding: 4px 0 0;
}
@media (max-width: 720px) {
  .representative-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .representative-row { grid-template-columns: 1fr; }
}
.fieldset-hint {
  margin: -4px 0 12px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

#payment-section .form-item { margin-bottom: 14px; }
#payment-total-amount {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 15px;
  color: var(--pine-deep);
  background: var(--pine-tint);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 8px;
}

#reservation-form > div:last-of-type,
#reservation-form > fieldset + div {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
#step2-back-btn, #step2-submit-btn { margin-top: 4px; }

/* ---------- Step 3 ---------- */
#reservation-result-summary {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#step-3 {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.step3-actions {
  margin-top: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
}
#step-3[hidden] {
  display: none;
}
#reservation-result-summary p { margin: 0 0 10px; font-size: 14.5px; color: var(--ink-soft); }
#result-reservation-id {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  color: var(--pine-deep);
  padding-bottom: 14px;
  margin-bottom: 14px !important;
  border-bottom: 1px solid var(--line-soft);
  font-size: 17px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.result-row:last-child { border-bottom: none; }
.result-label {
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.result-row > span:last-child { text-align: right; }
#result-program-title { font-family: "Noto Serif KR", serif; font-weight: 700; font-size: 19px; color: var(--ink); }
#result-date-range {
  font-weight: 700;
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
}
#result-total-amount {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-size: 17px;
  color: var(--pine-deep);
}
#result-status {
  display: inline-block;
  width: fit-content;
  font-family: "Noto Sans KR", sans-serif;  /* IBM Plex Mono >> Noto Sans KR : 예약 상태 한글 폴백 */
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-tint);
  border-radius: 100px;
  padding: 4px 12px;
}
#result-applied-at,
#result-participant-count,
#result-payment-method {
  color: var(--ink-faint);
  font-size: 13.5px;
}
.result-row:has(#result-date-range) {
  margin-top: 6px;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}
.result-row:has(#result-total-amount) {
  margin-top: 6px;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}
.result-section { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.result-section .result-label { display: block; margin-bottom: 10px; }
#result-map {
  width: 100%;
  height: 250px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-top: 4px;
}
.result-participant-table {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 13.5px;
}
.result-participant-table th {
  text-align: left;
  padding: 9px 10px;
  background: var(--pine-tint);
  color: var(--pine-deep);
  font-family: "Noto Sans KR", sans-serif;  /* IBM Plex Mono >> Noto Sans KR : 이름/성별/이메일/연락처 한글 폴백 */
  letter-spacing: 0;         /* 0.04em >> 0 : 한글엔 자간 넓히면 어색함 */
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
}
.result-participant-table td {
  text-align: left;
  padding: 10px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
}
.result-participant-table td:first-child {
  font-weight: 600;
  color: var(--ink);
}
.result-participant-table tbody tr:nth-child(even) {
  background: var(--bg);
}
.result-participant-table tbody tr:last-child td {
  border-bottom: none;
}
.consent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 4px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.consent-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--pine);
  cursor: pointer;
}

.consent-row label {
  cursor: pointer;
}

.consent-row a {
  color: var(--pine-deep);
  font-weight: 600;
  text-decoration: underline;
}

.terms-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.terms-modal {
  width: min(480px, 90vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terms-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.terms-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.terms-modal-header button {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-faint);
  cursor: pointer;
}

.terms-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.terms-modal-body section + section {
  margin-top: 18px;
}

.terms-modal-body h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pine-deep);
  margin: 0 0 6px;
}

.terms-modal-body ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.terms-modal-body li {
  margin-bottom: 4px;
}

.terms-modal-footer {
  padding: 14px 22px 20px;
  display: flex;
  justify-content: flex-end;
}

.terms-modal-footer button {
  background: var(--pine);
  color: var(--bg-raised);
  font-weight: 700;
  font-size: 14px;
  border: none;
  padding: 10px 22px;
  border-radius: 100px;
  cursor: pointer;
}
.terms-modal-overlay[hidden] {
  display: none;
}