:root {
  /* 로고에서 추출한 카본링크 브랜드 컬러 */
  --brand-deep: #026B54;
  --brand: #0A8367;
  --brand-light: #119B79;
  --leaf: #76BE57;

  --ink: #16181D;
  --ink-2: #3F454F;
  --muted: #868C97;
  --line: #E6E8EC;
  --line-strong: #D3D7DE;
  --surface: #FFFFFF;
  --surface-2: #F4F6F8;
  --danger: #C7382F;

  --radius: 10px;
  --pane-pad: 40px;
  --focus: 0 0 0 3px rgba(2, 107, 84, .22);
}

* { box-sizing: border-box; }

/* display를 지정한 요소에도 hidden 속성이 먹도록 */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* 한글이 단어 중간에서 끊기지 않도록 */
  word-break: keep-all;
  overflow-wrap: break-word;
}

button, input, textarea { font: inherit; color: inherit; }

svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 레이아웃 ---------- */

/* 예약 폼은 화면 세로 가운데에 둡니다. flex 아이템의 margin:auto를 쓰면
   내용이 화면보다 길어져도 위쪽이 잘리지 않습니다(align-items:center와 다른 점). */
.formBody {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  padding: 32px 20px;
}

.shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-content: start;
  width: 100%;
  max-width: 1180px;
  min-height: 560px;
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 32px -18px rgba(22, 24, 29, .28);
  overflow: hidden;
}

.pane { padding: var(--pane-pad); min-width: 0; }

/* 왼쪽 정보는 한 칸, 나머지는 오른쪽 칸에 위아래로 쌓입니다. */
.pane--info { grid-column: 1; grid-row: 1 / -1; background: var(--surface); }

.pane--date,
.pane--time,
.pane--form,
.pane--done { grid-column: 2; border-left: 1px solid var(--line); }

/* 날짜 아래에 붙는 시간 영역 */
.pane--time { border-top: 1px solid var(--line); padding-top: 28px; }

.pane__title { margin: 0 0 22px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.pane__sub { margin: -14px 0 22px; font-size: 15px; color: var(--ink-2); }

/* ---------- 왼쪽 정보 ---------- */

.backBtn {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 0 0 20px; padding: 8px 14px 8px 10px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.backBtn:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand-deep); }
.backBtn:focus-visible { outline: none; box-shadow: var(--focus); }
.backBtn svg { width: 18px; height: 18px; stroke-width: 2.2; }

.logo { display: block; width: 190px; height: auto; margin-bottom: 26px; }

.info__title { margin: 0 0 16px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1.4; }

.info__meta { margin: 0 0 22px; padding: 0; list-style: none; display: grid; gap: 10px; }
.info__meta li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 14.5px; color: var(--ink-2); }
.info__meta .ico { width: 18px; height: 18px; margin-top: 3px; color: var(--brand-deep); }
.info__meta-picked span { font-weight: 600; color: var(--brand-deep); }

.info__desc { margin: 0; font-size: 14.5px; color: var(--ink-2); white-space: pre-line; }

/* ---------- 달력 ---------- */

.cal__head,
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); }

.cal__head { margin-bottom: 8px; }
.cal__head span { text-align: center; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 6px 0; }

.cal__grid { gap: 4px 0; justify-items: center; }

.cal__grid > * { display: grid; place-items: center; }

.day {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 0; background: none; border-radius: 50%;
  font-size: 15px; color: var(--muted);
  cursor: default;
}
.day--blank { visibility: hidden; }
.day--open {
  background: var(--surface-2); color: var(--ink); font-weight: 600; cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.day--open:hover { background: #E4E9E7; }
.day--open[aria-pressed="true"] { background: var(--brand-deep); color: #fff; }
.day--full { background: var(--surface-2); color: var(--muted); text-decoration: line-through; cursor: not-allowed; }
.day:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- 시간 ---------- */

.timeGroup + .timeGroup { margin-top: 22px; }

.timeGroup__title {
  margin: 0 0 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  color: var(--ink-2);
}

.times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}

/* 고른 시간은 채워서 표시하고, 진행 버튼은 아래 액션 바에 둡니다. */
.chip[aria-checked="true"] {
  background: var(--brand-deep); border-color: var(--brand-deep); color: #fff;
}
.chip[aria-checked="true"]:hover { background: #01543F; border-color: #01543F; color: #fff; }

.timeFooter {
  display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--line);
}
.timeFooter__pick { margin: 0; margin-right: auto; font-size: 14.5px; color: var(--ink-2); }
.timeFooter__pick b { color: var(--brand-deep); font-weight: 700; }

.chip {
  padding: 12px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
  font-size: 15px; font-weight: 600; text-align: center; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.chip:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-deep); }
.chip:disabled { background: var(--surface-2); border-color: var(--line); color: #B7BCC4; cursor: not-allowed; }
.chip:focus-visible { outline: none; box-shadow: var(--focus); }

.nextBtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.nextBtn svg { width: 16px; height: 16px; stroke-width: 2.2; }

.times__empty { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

.slotNotice {
  margin: 0 0 14px; padding: 11px 13px;
  border: 1px solid #F0C4C0; border-radius: var(--radius);
  background: #FDF3F2; color: var(--danger); font-size: 13.5px; line-height: 1.5;
}
.slotNotice:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- 폼 ---------- */

.pane--form form { max-width: 620px; }

/* 성함·회사명 / 부서·직책 / 이메일·연락처 를 2열로 */
.fieldGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  column-gap: 20px;
}

.field { margin-bottom: 22px; }
.field > label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.field > label b { color: var(--leaf); }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
textarea { resize: vertical; min-height: 110px; }

[aria-invalid="true"] { border-color: var(--danger) !important; }

.hint { margin: 6px 0 0; font-size: 13.5px; color: var(--danger); }

.field--full { grid-column: 1 / -1; }

.extras__label { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.extras { display: grid; gap: 10px; }

/* 한 행 = 한 사람. 위쪽 이메일·연락처 칸과 열 너비를 그대로 맞춥니다. */
.extraRow { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; align-items: start; }
/* 삭제 버튼은 입력칸 안쪽 오른쪽에 겹쳐 두어 칸 너비가 줄지 않게 합니다.
   기준을 입력칸으로 한정해야 아래에 오류 문구가 붙어도 버튼이 늘어나지 않습니다. */
.extraRow__field { position: relative; }
.extraRow__phone input { padding-right: 46px; }
.extraRow .hint { margin-top: 6px; }

.removeBtn {
  position: absolute; top: 1px; right: 1px; bottom: 1px; width: 42px;
  display: grid; place-items: center;
  border: 0; border-radius: 0 var(--radius) var(--radius) 0;
  background: transparent; color: var(--muted); cursor: pointer;
}
.removeBtn:hover { color: var(--danger); }
.removeBtn:focus-visible { outline: none; box-shadow: var(--focus); }
.removeBtn svg { width: 17px; height: 17px; }

.addBtn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 0;
  border: 0; background: none; color: var(--brand);
  font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.addBtn:hover { color: var(--brand-deep); }
.addBtn svg { width: 17px; height: 17px; }

/* 동의 항목·질문 안내 문구는 항상 펼쳐서 보여줍니다. */
.consentHelp__body,
.fieldDesc {
  margin: 0 0 10px; padding: 13px 15px;
  background: var(--surface-2); border-radius: var(--radius);
  font-size: 13.5px; line-height: 1.6; color: var(--ink-2);
}
.consentHelp__body p,
.fieldDesc p { margin: 0 0 8px; }
.fieldDesc p:last-child { margin-bottom: 0; }
.consentHelp__body ul { margin: 0; padding-left: 18px; }
.consentHelp__body li { margin-bottom: 3px; }

.radios { display: grid; gap: 8px; }
.radios .opt input { border-radius: 50%; }

/* 복수선택 */
.multi { display: grid; gap: 8px; }
.opt {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start;
  padding: 11px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  cursor: pointer; font-size: 14.5px;
  transition: border-color .12s ease, background .12s ease;
}
.opt:hover { border-color: var(--brand); }
.opt:has(input:checked) { border-color: var(--brand); background: rgba(2, 107, 84, .05); }
.opt input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand-deep); }
.opt:focus-within { box-shadow: var(--focus); }

.formError {
  margin: 0 0 16px; padding: 12px 14px;
  border: 1px solid #F0C4C0; border-radius: var(--radius);
  background: #FDF3F2; color: var(--danger); font-size: 14.5px;
}

.submitRow { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }

.btn {
  padding: 14px 34px; border: 0; border-radius: var(--radius);
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.btn--primary { background: var(--brand-deep); color: #fff; }
.btn--primary:hover:not(:disabled) { background: #01543F; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- 완료 ---------- */

.summary { margin: 0; display: grid; gap: 22px; }
.summary dt { font-size: 14px; color: var(--muted); }
.summary dd { margin: 4px 0 0; font-size: 17px; font-weight: 600; }
.summary dd .guest { display: block; }
.summary dd .guest + .guest { margin-top: 6px; }
.summary dd .guest span { font-weight: 400; color: var(--ink-2); }

.ctaRow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 44px; }
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.cta:hover { border-color: var(--brand); color: var(--brand-deep); background: rgba(2, 107, 84, .04); }
.cta svg { width: 18px; height: 18px; color: var(--brand-deep); flex: none; }

/* ---------- 반응형 ---------- */

@media (max-width: 900px) {
  :root { --pane-pad: 24px; }

  /* 모바일은 기존대로 화면을 꽉 채웁니다. */
  .formBody { display: block; padding: 0; min-height: 0; }

  .shell {
    grid-template-columns: 1fr;
    margin: 0;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .pane--info { grid-row: auto; }

  .pane--date, .pane--time, .pane--form, .pane--done {
    grid-column: 1;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .times { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .timeFooter { flex-direction: column; align-items: stretch; }
  .timeFooter__pick { margin-right: 0; }
  .timeFooter .btn { width: 100%; }

  .logo { width: 168px; margin-bottom: 20px; }
  .day { width: 40px; height: 40px; }
  .ctaRow { grid-template-columns: 1fr; }
  .fieldGrid { grid-template-columns: 1fr; column-gap: 0; }
  .extraRow { grid-template-columns: 1fr; row-gap: 8px; }
  .extraRow .hint { margin-top: 4px; }
  .submitRow .btn { width: 100%; }
}

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