:root {
  --bg: #f6f5f4;
  --card: #ffffff;
  --ink: #1f1d1d;
  --muted: #6f6a6a;
  --line: #e7e2e2;
  --brand: #9E0B0F;        /* Jump 로고 레드 */
  --brand-dark: #7a080b;   /* hover */
  --brand-tint: #fbecec;   /* 연한 레드 배경 */
  --brand-tint2: #f4d8d8;  /* 연한 레드 hover */
  --brand-bd: #efcccc;     /* 연한 레드 보더 */
  --ok: #18a957;
  --danger: #c0392b;
  --radius: 12px;
  --shadow: 0 2px 14px rgba(40, 20, 20, 0.07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 32px 20px 64px; }

.head { text-align: center; margin-bottom: 28px; }
.brand { font-size: 13px; font-weight: 700; color: var(--brand); letter-spacing: 0.04em; }
.head h1 { font-size: 26px; margin: 6px 0 8px; }
.sub { color: var(--muted); font-size: 15px; margin: 0 auto; max-width: 480px; }

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
}
.step h2 { font-size: 17px; margin: 0 0 14px; display: flex; align-items: center; gap: 9px; }
.num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 700;
}
.muted { color: var(--muted); font-size: 14px; }

/* 날짜 스트립 */
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.date-btn {
  flex: 0 0 auto; min-width: 64px; padding: 10px 6px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  cursor: pointer; text-align: center; transition: 0.12s;
}
.date-btn .dow { font-size: 12px; color: var(--muted); }
.date-btn .day { font-size: 18px; font-weight: 700; margin-top: 2px; }
.date-btn.sun .dow { color: var(--danger); }
.date-btn:hover { border-color: var(--brand); }
.date-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.date-btn.active .dow, .date-btn.active.sun .dow { color: rgba(255,255,255,0.85); }

/* 슬롯 그리드 */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot-btn {
  padding: 11px 0; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; cursor: pointer; font-size: 15px; font-weight: 600; transition: 0.12s;
}
.slot-btn:hover { border-color: var(--brand); color: var(--brand); }
.slot-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.empty { color: var(--muted); text-align: center; padding: 16px 0; }

/* 폼 */
.picked {
  background: var(--brand-tint); border: 1px solid var(--brand-bd); color: var(--brand-dark);
  border-radius: 9px; padding: 10px 14px; font-weight: 600; margin: 0 0 16px;
}
form label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.req { color: var(--danger); }
input, textarea {
  width: 100%; margin-top: 6px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 9px; font-size: 15px; font-family: inherit;
  background: #fff; color: var(--ink);
}
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(158,11,15,0.14); }
textarea { resize: vertical; }

.submit {
  width: 100%; padding: 13px; margin-top: 4px;
  background: var(--brand); color: #fff; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.12s;
}
.submit:hover { background: var(--brand-dark); }
.submit:disabled { opacity: 0.6; cursor: not-allowed; }
.form-error { color: var(--danger); font-size: 14px; margin-top: 12px; text-align: center; }

/* 완료 */
.done { text-align: center; }
.check {
  width: 56px; height: 56px; margin: 4px auto 12px; border-radius: 50%;
  background: var(--ok); color: #fff; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
}
.link {
  display: inline-block; margin-top: 12px; padding: 11px 20px;
  background: var(--brand); color: #fff; border-radius: 9px;
  text-decoration: none; font-weight: 600;
}

.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 28px; }
.foot a { color: var(--muted); }

/* ===== 캘린더형 예약 화면 ===== */
.cal-wrap { max-width: 1000px; }
.cal-card {
  display: grid; grid-template-columns: 290px 1fr 250px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
@media (max-width: 820px) { .cal-card { grid-template-columns: 1fr; } }

/* 좌: 정보 */
.cal-info { padding: 26px 24px; border-right: 1px solid var(--line); }
@media (max-width: 820px) { .cal-info { border-right: none; border-bottom: 1px solid var(--line); } }
.host { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.host span { font-size: 14px; font-weight: 600; color: var(--muted); }
.cal-info h1 { font-size: 22px; margin: 0 0 12px; line-height: 1.3; }
.dur-badge { margin-bottom: 14px; }
.dur-badge span { display: inline-block; background: var(--brand-tint); color: var(--brand-dark); border-radius: 20px; padding: 5px 13px; font-size: 13px; font-weight: 700; }
.desc { font-size: 14px; color: #495264; line-height: 1.6; white-space: pre-line; max-height: 7.6em; overflow: hidden; margin: 0; }
.desc.expanded { max-height: none; }
.desc-more { background: none; border: none; color: var(--brand); font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 0 0; }
.info-opts { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }

/* 중: 월 달력 */
.cal-month { padding: 26px 24px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-head span { font-size: 16px; font-weight: 700; }
.cal-nav { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; font-size: 18px; color: var(--ink); }
.cal-nav:disabled { opacity: 0.3; cursor: default; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 6px; }
.cal-dow span { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal-dow span:first-child { color: var(--danger); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day { aspect-ratio: 1; border: none; background: none; border-radius: 50%; font-size: 14px; font-weight: 600; cursor: default; color: var(--ink); }
.cal-day.off { color: #c7cedb; }
.cal-day.open { color: var(--brand-dark); background: var(--brand-tint); cursor: pointer; }
.cal-day.open:hover { background: var(--brand-tint2); }
.cal-day.open.sun { color: var(--danger); }
.cal-day.sel { background: var(--brand) !important; color: #fff !important; }

/* 우: 시간 */
.cal-times { padding: 26px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
@media (max-width: 820px) { .cal-times { border-left: none; border-top: 1px solid var(--line); } }
.times-head { font-size: 15px; font-weight: 700; }
.times-tz { font-size: 12px; color: var(--muted); margin: 2px 0 14px; }
.times-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.time-btn { padding: 12px; border: 1px solid var(--brand); border-radius: 9px; background: #fff; color: var(--brand-dark); font-size: 15px; font-weight: 600; cursor: pointer; transition: 0.12s; }
.time-btn:hover { background: var(--brand); color: #fff; }
.time-d { font-size: 11px; color: var(--muted); }
.time-btn:hover .time-d { color: rgba(255,255,255,0.85); }

/* 폼 카드 (슬롯 선택 후) */
.form-card { max-width: 560px; margin: 0 auto; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.form-actions .submit { flex: 1; margin-top: 0; }
.ghost { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 13px 16px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.turnstile-box { margin: 4px 0 14px; min-height: 65px; }

/* 임베드(모달) 모드 — 푸터 숨기고 여백 축소 */
.embed .foot { display: none; }
.embed .wrap { padding: 16px 14px 28px; }

/* 옵션 바 (길이/플랫폼/시간대) */
.opts { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; }
.opt { display: flex; flex-direction: column; gap: 7px; }
.opt-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg-btn {
  padding: 9px 16px; border: none; background: #fff; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink); border-right: 1px solid var(--line);
}
.seg-btn:last-child { border-right: none; }
.seg-btn.active { background: var(--brand); color: #fff; }
.tz-select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); min-width: 200px;
}
.slot-d { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 500; }
.slot-btn.active .slot-d { color: rgba(255,255,255,0.85); }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; }

/* 로딩 오버레이 */
.loading {
  position: fixed; inset: 0; background: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.spinner {
  width: 40px; height: 40px; border: 4px solid var(--line);
  border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
