/* 예약 신청 /reservation — 클래스 접두사: rsv- */
.rsv__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    row-gap: 40px;
    align-items: start;
}
.rsv__main { grid-column: 1 / span 8; min-width: 0; }
.rsv__aside { grid-column: 9 / span 4; display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 24px); }
body:has(.site-header.is-hidden) .rsv__aside { top: 24px; }
.rsv__blocks { margin-top: clamp(64px, 7vw, 104px); }

/* ---------------------------------------------------------------- 진행 단계 */
.rsv-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}
.rsv-steps__item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-3);
}
.rsv-steps__item::before {                  /* 진행 막대 */
    content: "";
    display: block;
    height: 4px;
    border-radius: 4px;
    background: var(--line);
}
.rsv-steps__item.is-done::before,
.rsv-steps__item.is-current::before { background: var(--accent); }
.rsv-steps__no {
    position: absolute;
    left: 0; top: 14px;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.rsv-steps__label { padding-left: 16px; line-height: 1.4; }
.rsv-steps__item.is-current { color: var(--accent); }
.rsv-steps__now { display: none; margin-bottom: 16px; font-size: 14.5px; font-weight: 700; color: var(--accent); }
.rsv-steps__item.is-done { color: var(--ink-2); }

/* ---------------------------------------------------------------- 패널 */
.rsv-panel {
    padding: clamp(24px, 3.2vw, 44px);
    border-radius: var(--radius);
    background: var(--bg);
    box-shadow: inset 0 0 0 1px var(--line-2);
}
.rsv-panel__title { font-size: clamp(24px, 2.2vw, 32px); font-weight: 700; line-height: 1.35; letter-spacing: -.035em; }
.rsv-panel__text { max-width: 40em; margin-top: 10px; font-size: 16.5px; line-height: 1.75; color: var(--ink-2); }
.rsv-panel__note { margin-top: 18px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.rsv-panel__foot { margin-top: 16px; font-size: 14px; line-height: 1.65; color: var(--ink-3); }
.rsv-fieldset { margin-top: 28px; }
.rsv-fieldset > .field__label { margin-bottom: 12px; }

/* 신청 방식 — 큰 선택 타일 3개 */
.rsv-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rsv-mode { position: relative; display: flex; cursor: pointer; }
.rsv-mode input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rsv-mode > span {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    min-height: 84px;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--bg);
    box-shadow: inset 0 0 0 1px var(--line-2);
    transition: box-shadow .2s, background-color .2s;
}
.rsv-mode strong { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.rsv-mode small { font-size: 14px; color: var(--ink-3); }
.rsv-mode:hover > span { box-shadow: inset 0 0 0 1px var(--accent); }
.rsv-mode input:checked + span { background: var(--sage); box-shadow: inset 0 0 0 2px var(--accent); }
.rsv-mode input:checked + span strong { color: var(--accent-ink); }
.rsv-mode input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.rsv-mode input[aria-invalid="true"] + span { box-shadow: inset 0 0 0 1px var(--error); }

.rsv-groups { display: grid; gap: 16px; }
.rsv-group { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; align-items: start; padding-top: 14px; border-top: 1px solid var(--line); }
.rsv-group__label { padding-top: 12px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.choice input[aria-invalid="true"] + span { border-color: var(--error); }

.rsv-picked {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-s);
    background: var(--sage);
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-2);
}
.rsv-picked strong { color: var(--accent-ink); }
.rsv-picked a { margin-left: 6px; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.rsv-picked--note { background: var(--bg-soft); margin-top: 24px; }

/* 달력 — 월 · 토 6칸, 일요일 휴진 */
.rsv-calendar { max-width: 520px; }
.rsv-calendar__head,
.rsv-calendar__week { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.rsv-calendar__head span { padding-bottom: 6px; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.rsv-calendar__week + .rsv-calendar__week,
.rsv-calendar__month + .rsv-calendar__week { margin-top: 6px; }
.rsv-calendar__month { margin: 10px 0 6px; font-size: 13.5px; font-weight: 700; color: var(--accent); }
.rsv-day { position: relative; display: flex; cursor: pointer; }
.rsv-day input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rsv-day > span,
.rsv-day--off {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    border-radius: var(--radius-s);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.rsv-day > span { box-shadow: inset 0 0 0 1px var(--line-2); background: var(--bg); transition: box-shadow .2s, background-color .2s; }
.rsv-day small { margin-top: 3px; font-size: 10.5px; font-weight: 600; color: var(--ink-3); }
.rsv-day:hover > span { box-shadow: inset 0 0 0 1px var(--accent); }
.rsv-day input:checked + span { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.rsv-day input:checked + span small { color: var(--on-accent-2); }
.rsv-day input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rsv-day--off { color: var(--line-2); font-weight: 500; cursor: default; }
.rsv-later { margin-top: 12px; }

/* 확인 */
.rsv-review { margin-top: 24px; }
.rsv-review dd { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.rsv-review__message { white-space: pre-line; }
.rsv-edit {
    flex: none;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px var(--line-2);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}
.rsv-edit:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.rsv-alert { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-s); background: #FBEFEC; color: var(--error); font-size: 15px; font-weight: 500; }

/* 개인정보 동의 */
.rsv-privacy { margin-top: 32px; padding: 22px 24px; border-radius: var(--radius); background: var(--bg-soft); }
.rsv-privacy__title { font-size: 16.5px; font-weight: 700; }
.rsv-privacy .facts { margin-top: 12px; }
.rsv-privacy .facts > div { font-size: 15px; padding: 11px 0; }
.rsv-privacy__note { margin: 12px 0 16px; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.rsv-privacy__note a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.rsv-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.rsv-actions .button[type="submit"] { margin-left: auto; }

/* 완료 */
.rsv-done .rsv-panel__title { margin-top: 14px; }
.rsv-demo {
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: var(--radius-s);
    background: var(--accent-ink);
    color: var(--on-accent);
    font-size: 15px;
    line-height: 1.65;
}
.rsv-demo strong { display: block; margin-bottom: 2px; color: var(--on-accent-2); font-size: 13.5px; }
.rsv-receipt { margin-top: 24px; }
.rsv-done__subtitle { margin: 32px 0 16px; font-size: 18px; font-weight: 700; }
.rsv-done__process .timeline__item.is-done .timeline__dot { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.rsv-done__links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 32px; }

/* ---------------------------------------------------------------- 옆 안내 */
.rsv-aside { padding: 24px; border-radius: var(--radius); background: var(--sage); }
.rsv-aside--plain { background: var(--bg-soft); }
.rsv-aside__title { font-size: 16px; font-weight: 700; }
.rsv-aside__tel { display: inline-block; margin-top: 6px; font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.rsv-aside__text { margin-top: 6px; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.rsv-aside__hours { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--sage-2); font-size: 14.5px; line-height: 1.8; }
.rsv-aside__flow { margin-top: 10px; counter-reset: flow; }
.rsv-aside__flow li { position: relative; padding: 6px 0 6px 28px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); counter-increment: flow; }
.rsv-aside__flow li::before {
    content: counter(flow);
    position: absolute;
    left: 0; top: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 11.5px;
    font-weight: 700;
}

@media (max-width: 1099px) {
    .rsv__main { grid-column: 1 / -1; }
    .rsv__aside { grid-column: 1 / -1; position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .rsv-steps { gap: 4px; }
    .rsv-steps { margin-bottom: 8px; }
    .rsv-steps__label,
    .rsv-steps__no { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .rsv-steps__now { display: block; }
    .rsv-panel { padding: 22px 16px; }
    .rsv-modes { grid-template-columns: minmax(0, 1fr); }
    .rsv-mode > span { min-height: 64px; }
    .rsv-group { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
    .rsv-group__label { padding-top: 0; }
    .rsv-calendar__head,
    .rsv-calendar__week { gap: 4px; }
    .rsv-day > span,
    .rsv-day--off { min-height: 48px; font-size: 15px; }
    .rsv-review dd { flex-direction: column; align-items: flex-start; gap: 6px; }
    .rsv-actions .button { flex: 1 1 auto; }
    .rsv-privacy { padding: 18px 16px; }
    .rsv__aside { grid-template-columns: minmax(0, 1fr); }
}

/* 공휴일 휴진일 — 고를 수 없는 칸에 '휴진' */
.rsv-day--closed { background: var(--bg-soft); color: var(--ink-3); }
.rsv-day--closed small { margin-top: 3px; font-size: 10.5px; font-weight: 600; color: var(--ink-3); }
