/* 예약 3단계(날짜 · 시간 · 목적·명단)와 완료 화면 — Atelier (2026-09 디자인 개편)
   순서: 뼈대 → 머리말·단계 표시 → 요약 티켓(PC 오른쪽 카드 / 휴대폰 아래 바) → 달력 → 시간표 → 입력 → 완료 → 반응형
   공통 부품(.btn .notice .seg .cat-tile .badge …)은 app.css 것을 그대로 쓰고, 여기서는 rsv- / cal- / tl- / done- 만 만든다. */

/* 빗금 두 가지는 토큰에 없는 색이라 이 파일 안에서만 쓰는 지역 변수로 둔다 (범례 견본과 칸이 같은 값을 쓴다) */
.rsv-page {
    --tl-hatch-pend: rgba(200, 138, 0, .32);     /* 신청중: 호박색 빗금 */
    --tl-hatch-appr: rgba(111, 105, 93, .34);    /* 승인됨: 회갈색 빗금 */
    --rsv-notch: 9px;
    --wh-item: 48px;          /* 휠 한 칸. timeline.js 가 실제 높이를 재서 쓴다 */
}

/* ==========================================================================
   1. 뼈대 — PC 는 본문(최대 640px) + 오른쪽 360px 요약 카드, 1023px 아래는 한 단
   ========================================================================== */
.container.rsv-page { max-width: 1120px; padding-top: 40px; }
.rsv-flow { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; }
.rsv-main { min-width: 0; }
.rsv-side { min-width: 0; margin-top: 28px; }

/* ==========================================================================
   2. 머리말: 분류 타일 + 특별실 이름(Hahmlet) + 오른쪽 날짜 수정 칩, 그 아래 01/02/03 단계 표시
   ========================================================================== */
.rsv-room { display: flex; align-items: center; gap: 12px; }
.rsv-room-text { flex: 1; min-width: 0; }
.rsv-room h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.rsv-room p { margin: 2px 0 0; font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); line-height: 1.4; }
.rsv-datechip {
    flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 14px;
    border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
    color: var(--ink); font-size: var(--fs-sub); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums;
    transition: background-color var(--t-fast), box-shadow var(--t-fast);
}
.rsv-datechip .icon { width: 15px; height: 15px; color: var(--ink-3); vertical-align: 0; }
.rsv-datechip:hover { text-decoration: none; box-shadow: inset 0 0 0 1px var(--ink); }
.rsv-datechip:active { background: var(--paper-2); }
.rsv-datechip:focus-visible { border-radius: var(--r-pill); }
.rsv-datechip .d-short { display: none; }      /* 아주 좁은 화면에서만 "9/21 (월)" 로 바뀐다 */

.rsv-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 20px 0 28px; padding: 0; }
.rsv-steps li { min-width: 0; padding-top: 10px; border-top: 3px solid var(--line); color: var(--ink-3); }
/* 끝난 단계는 통째로 "다시 고르기" 링크다. 누르는 높이 44px */
.rsv-steps li > a, .rsv-steps li > button { display: block; min-height: var(--tap); margin-top: -10px; padding-top: 10px; color: inherit; }
.rsv-steps li > button { width: 100%; padding-inline: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.rsv-steps li > a:hover { text-decoration: none; }
.rsv-steps li > a:hover .val, .rsv-steps li > button:hover .val { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.rsv-steps .no { display: block; font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rsv-steps .lb { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: var(--fs-sub); font-weight: 700; line-height: 1.3; }
.rsv-steps .lb .icon { width: 14px; height: 14px; stroke-width: 2.6; vertical-align: 0; }
/* 고른 값 + 연필: PC(오른쪽 카드 모양)에서는 이것이 "다시 고르기"의 하나뿐인 손잡이다. 그 아래 너비에서는 날짜 칩·아래 바가 같은 값을 보여 주므로 숨긴다(8장) */
.rsv-steps .val { display: flex; align-items: center; gap: 5px; min-width: 0; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rsv-steps .val > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsv-steps .val .icon { flex: none; width: 13px; height: 13px; vertical-align: 0; color: var(--ink-3); }
.rsv-steps li > a:hover .val .icon, .rsv-steps li > button:hover .val .icon { color: var(--ink); }
.rsv-steps li.done { border-top-color: var(--ink); color: var(--ink); }
.rsv-steps li.now { border-top-color: var(--accent); color: var(--accent-ink); }

.rsv-q { margin: 0; font-size: var(--fs-h2); font-weight: 800; letter-spacing: -.025em; line-height: 1.3; }
.rsv-q-help { margin: 6px 0 0; font-size: var(--fs-sub); color: var(--ink-2); line-height: 1.55; }
.rsv-notices { display: grid; gap: 8px; margin-top: 20px; }
.rsv-notices .notice { margin: 0; }

/* 고를 수 없는 날(2단계): 옆 카드 없이 가운데 한 단 — 그림 + 까닭 + 버튼 하나 */
.rsv-blocked { padding: 4px 0 8px; text-align: center; }
.rsv-blocked-art { display: block; width: min(300px, 76%); height: auto; margin: 0 auto 20px; }
.rsv-blocked strong { display: block; font-size: var(--fs-h3); font-weight: 800; letter-spacing: -.02em; line-height: 1.4; color: var(--ink); }
.rsv-blocked-kind { color: var(--st-rejected-fg); }
.rsv-blocked p { margin: 6px 0 0; font-size: var(--fs-sub); color: var(--ink-2); line-height: 1.55; }
.rsv-blocked .btn { margin-top: 20px; }

/* ==========================================================================
   3. 요약 티켓 — 위 조각(고른 것) + 절취선 + 아래 조각(정보·안내·버튼)
      펀칭은 배경색으로 덮지 않고 두 조각의 모서리를 mask 로 실제로 뚫는다 (어느 바탕 위에서도 그대로 쓸 수 있다)
   ========================================================================== */
.rsv-ticket { --rsv-notch: 9px; }
.rsv-ticket-top, .rsv-ticket-body { position: relative; background: var(--surface); border: 1px solid var(--line); padding: 24px; }
.rsv-ticket-top {
    border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; padding-bottom: 20px;
    -webkit-mask: radial-gradient(circle var(--rsv-notch) at 0 100%, transparent 97%, #000) left / 51% 100% no-repeat,
                  radial-gradient(circle var(--rsv-notch) at 100% 100%, transparent 97%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle var(--rsv-notch) at 0 100%, transparent 97%, #000) left / 51% 100% no-repeat,
          radial-gradient(circle var(--rsv-notch) at 100% 100%, transparent 97%, #000) right / 51% 100% no-repeat;
}
.rsv-ticket-body {
    border-top: 1.5px dashed var(--line-2); border-radius: 0 0 var(--r-lg) var(--r-lg); padding-top: 20px;
    -webkit-mask: radial-gradient(circle var(--rsv-notch) at 0 0, transparent 97%, #000) left / 51% 100% no-repeat,
                  radial-gradient(circle var(--rsv-notch) at 100% 0, transparent 97%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle var(--rsv-notch) at 0 0, transparent 97%, #000) left / 51% 100% no-repeat,
          radial-gradient(circle var(--rsv-notch) at 100% 0, transparent 97%, #000) right / 51% 100% no-repeat;
}
/* 뚫린 자리 둘레의 가는 선: 원을 모서리에 걸쳐 두면 mask 가 안쪽을 지우고 바깥 1px 만 남긴다 */
.rsv-ticket-top::before, .rsv-ticket-top::after, .rsv-ticket-body::before, .rsv-ticket-body::after {
    content: ""; position: absolute; width: calc(var(--rsv-notch) * 2 + 2px); height: calc(var(--rsv-notch) * 2 + 2px);
    border: 1px solid var(--line); border-radius: 50%; pointer-events: none;
}
.rsv-ticket-top::before, .rsv-ticket-top::after { bottom: calc(var(--rsv-notch) * -1 - 1px); }
.rsv-ticket-body::before, .rsv-ticket-body::after { top: calc(var(--rsv-notch) * -1 - 2.5px); }
.rsv-ticket-top::before, .rsv-ticket-body::before { left: calc(var(--rsv-notch) * -1 - 2px); }
.rsv-ticket-top::after, .rsv-ticket-body::after { right: calc(var(--rsv-notch) * -1 - 2px); }

.rsv-ticket .k { display: block; font-size: var(--fs-caption); font-weight: 700; letter-spacing: .04em; color: var(--ink-3); line-height: 1.4; }
.rsv-big { display: block; margin-top: 4px; font-size: 28px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rsv-sub { display: block; margin-top: 8px; font-size: var(--fs-small); color: var(--ink-3); line-height: 1.45; }
.rsv-ticket dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 12px; margin: 0; }
.rsv-ticket dl .wide { grid-column: 1 / -1; }
.rsv-ticket dt { font-size: var(--fs-caption); font-weight: 600; color: var(--ink-3); line-height: 1.4; }
.rsv-ticket dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; }
.rsv-ticket .notice { margin: 20px 0 0; }
.rsv-ticket-body > .btn { margin-top: 16px; }
.rsv-ticket-body > .btn + .btn { margin-top: 4px; }

/* 고른 시간 요약 (timeline.js 가 채운다): 큰 시각 + 이용 시간 꼬리표 + 둘째 줄 */
.slot-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 4px; min-width: 0; }
.slot-summary .rng { font-size: 28px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.slot-summary .dur { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-xs); background: var(--accent-wash); color: var(--accent-ink); font-size: var(--fs-caption); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.slot-summary .dur:empty { display: none; }
.slot-summary .sub { flex-basis: 100%; font-size: var(--fs-small); font-weight: 500; color: var(--ink-3); line-height: 1.45; }
.slot-summary.is-empty .rng { font-size: 20px; color: var(--ink-3); letter-spacing: -.02em; line-height: 1.4; }
.slot-summary.danger .rng { color: var(--danger); }
.slot-summary.danger .dur { background: var(--danger-wash); color: var(--danger); }
.slot-summary.danger .sub { color: var(--danger); font-weight: 600; }
/* 겹치는 신청이 있을 때: 호박색 점 + "겹치는 신청 N건" */
.tl-contest-chip { display: inline-flex; align-items: center; gap: 5px; height: 20px; margin-right: 6px; padding: 0 8px 0 7px; border-radius: var(--r-pill); background: var(--st-pending-bg); color: var(--st-pending-fg); font-size: var(--fs-caption); font-weight: 700; white-space: nowrap; vertical-align: 1px; }
.tl-contest-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--st-pending-dot); }

/* ==========================================================================
   4. 달력 (1단계)
   ========================================================================== */
.calendar { margin-top: 20px; min-height: 372px; }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.cal-title { flex: 1; font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cal-nav { width: var(--tap); height: var(--tap); flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--paper-2); color: var(--ink); cursor: pointer; transition: background-color var(--t-fast), transform var(--t-fast) var(--ease); }
.cal-nav:hover { background: var(--paper-3); }
.cal-nav:active { transform: scale(.94); background: var(--paper-3); }
.cal-nav:focus-visible { border-radius: 50%; }
.cal-nav:disabled { background: transparent; color: var(--ink-4); cursor: not-allowed; transform: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { padding: 4px 0 6px; text-align: center; font-size: var(--fs-caption); font-weight: 700; color: var(--ink-3); }
.cal-dow.sun { color: var(--st-rejected-fg); }
.cal-dow.sat { color: var(--st-done-fg); }
.cal-cell {
    position: relative; min-width: 0; height: 52px; border-radius: var(--r-sm);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums;
}
.cal-cell.cal-blank { visibility: hidden; }
/* 고를 수 있는 날만 채운다 — 시간표의 "빈 시간"과 같은 말투 */
a.cal-cell { background: var(--paper-2); transition: background-color var(--t-fast), transform var(--t-fast) var(--ease); -webkit-tap-highlight-color: transparent; }
a.cal-cell:hover { background: var(--paper-3); text-decoration: none; }
a.cal-cell:active { transform: scale(.95); background: var(--accent-wash-2); }
a.cal-cell:focus-visible { border-radius: var(--r-sm); }
a.cal-cell.sun .d { color: var(--st-rejected-fg); }
a.cal-cell.sat .d { color: var(--st-done-fg); }
.cal-cell.past { color: var(--ink-4); font-weight: 500; }
/* 쉬는 날은 "누를 수 없는 것"으로 읽혀야 한다: 채우지 않고 가는 점선 테두리 + 옅은 숫자, 까닭(이름표)만 색으로 */
.cal-cell.blocked { border: 1px dashed rgba(216, 69, 47, .5); color: var(--ink-3); font-weight: 500; cursor: not-allowed; }
.cal-cell.blocked .cal-note { color: var(--st-rejected-fg); }
.cal-cell.blocked.exam { border-color: rgba(200, 138, 0, .6); }
.cal-cell.blocked.exam .cal-note { color: var(--warn-ink); }
.cal-cell.blocked.past { opacity: .55; }
/* 오늘은 잉크 테두리 — 코발트 테두리는 "선택·포커스"의 말투라 고를 수 없는 오늘이 선택된 날처럼 보인다 */
.cal-cell.today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.cal-cell.blocked.today { border-color: transparent; }
.cal-cell.today .cal-note { color: var(--ink-2); }
.cal-cell.blocked.today .cal-note { color: var(--st-rejected-fg); }
.cal-note { max-width: 100%; padding: 0 1px; font-size: 10.5px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 16px 0 0; font-size: var(--fs-caption); font-weight: 500; color: var(--ink-2); line-height: 1.3; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
/* 이 달의 쉬는 날 (칸 안 이름표가 잘려도, 터치 화면에서도 읽을 수 있게 글로 한 번 더) */
.cal-blocked { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: var(--fs-small); color: var(--ink-2); line-height: 1.5; }
.cal-blocked li { display: flex; align-items: baseline; gap: 8px; }
.cal-blocked li::before { content: ""; width: 8px; height: 8px; border-radius: 3px; flex: none; align-self: center; background: var(--st-rejected-dot); }
.cal-blocked li.exam::before { background: var(--st-pending-dot); }
.cal-blocked b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.cal-sw-open { background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); }
.cal-sw-today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.cal-sw-holiday { border: 1px dashed rgba(216, 69, 47, .75); }
.cal-sw-exam { border: 1px dashed rgba(200, 138, 0, .85); }

/* ==========================================================================
   5. 시간 고르기 (2단계, §5.1) — 시작·끝 두 개의 휠
      하루 띠(읽기 전용) → 휠 두 개 → 한 줄 대답. 10분 단위는 휠이라 공짜다.
      고를 수 없는 시각(승인·내 신청·지난 시각·운영 시간 밖)은 줄이 그어진다.
   ========================================================================== */
.tl-stack { display: flex; flex-direction: column; }

/* 하루 한눈에 보기. 띠를 누르면 그 시각으로 가고, 파란 손잡이(.sel)는 끌어서 옮긴다 (2026-09-22).
   띠 높이 24px — 손잡이가 손가락에 잡혀야 하므로 가는 선이 아니라 막대다. touch-action: none 이라 끄는 동안 화면이 딸려 내려가지 않는다 */
.tl-day { margin-top: 20px; min-height: 45px; }
.tl-day.is-quiet { opacity: .5; }
.tl-bar { position: relative; height: 24px; border-radius: 8px; background: var(--paper-2); overflow: hidden; cursor: pointer; touch-action: none; }
.tl-bar i { position: absolute; top: 0; bottom: 0; }
.tl-bar .requested { background-color: var(--st-pending-bg); background-image: repeating-linear-gradient(135deg, var(--tl-hatch-pend) 0 3px, transparent 3px 8px); }
.tl-bar .approved { background-color: var(--paper-3); background-image: repeating-linear-gradient(135deg, var(--tl-hatch-appr) 0 2px, transparent 2px 6px); }
.tl-bar .mine { background: linear-gradient(var(--accent), var(--accent)) bottom / 100% 3px no-repeat var(--accent-wash-2); }
.tl-bar .past { background: rgba(250, 246, 238, .7); }
/* 손잡이. 띠가 overflow:hidden 이라 테두리는 안쪽 링으로 그린다 */
.tl-bar .sel {
    z-index: 1; border-radius: 8px; background: var(--accent); cursor: grab;
    box-shadow: inset 0 0 0 2px var(--surface);
    display: flex; align-items: center; justify-content: center; gap: 3px;
}
/* 손잡이 표시: 흰 세로 홈 두 줄 — "잡고 끄는 것" 의 익숙한 기호 */
.tl-bar .sel::before, .tl-bar .sel::after { content: ""; width: 2px; height: 10px; border-radius: 1px; background: rgba(255, 255, 255, .85); }
.tl-bar .sel.is-drag { cursor: grabbing; background: var(--accent-ink, #1F2FA8); box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 4px var(--accent-wash-2); }
.tl-bar .sel:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 4px var(--coral); }
.tl-bar .sel[hidden] { display: none; }
.tl-ruler { position: relative; height: 16px; margin-top: 5px; font-size: var(--fs-micro); font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; line-height: 16px; }
.tl-ruler span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tl-ruler span.first { transform: none; }
.tl-ruler span.last { transform: translateX(-100%); }
.tl-hint { margin: 6px 0 0; font-size: var(--fs-micro); color: var(--ink-4); }

/* 자바스크립트가 없을 때 쓰는 시각 입력: 한 몸으로 붙은 두 칸 */
.tl-joined { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.tl-joined label { position: relative; display: block; min-width: 0; padding: 9px 14px 10px; cursor: pointer; border-radius: var(--r-md); transition: box-shadow var(--t-fast); }
.tl-joined label + label::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.tl-joined label:focus-within { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px var(--accent-ring); }
.tl-joined label:focus-within::before, .tl-joined label:focus-within + label::before { opacity: 0; }
.tl-joined .k { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--ink-3); line-height: 1.4; }
.tl-select {
    -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; height: 30px; padding: 0; border: 0; background: none;
    font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: var(--ink);
    font-variant-numeric: tabular-nums; line-height: 30px;
}
.tl-select:focus-visible { outline: 0; }
.tl-select.is-blank { color: var(--ink-3); font-weight: 600; }

/* ---- 휠 ---- */
.tl { user-select: none; -webkit-user-select: none; }
.tl-loading { margin: 0; padding: 40px 0; text-align: center; color: var(--ink-3); font-size: var(--fs-sub); }

/* 보이는 줄은 셋(위 하나 · 고른 것 · 아래 하나). 다섯 줄이면 맨 위를 골랐을 때 위쪽이 텅 비어 고장난 것처럼 보인다 */
.wheels { position: relative; display: flex; align-items: stretch; height: calc(var(--wh-item) * 3); margin-top: 18px; }
/* 가운데 한 칸: 고른 값이 앉는 자리. 휠보다 뒤에 있어 숫자가 그 위에 얹힌다 */
.wh-band {
    position: absolute; left: 0; right: 0; top: var(--wh-item); height: var(--wh-item);
    border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent);
}
.wh-tilde {
    position: absolute; left: 0; right: 0; top: var(--wh-item); height: var(--wh-item); z-index: 2;
    font-family: var(--font-display); font-size: 17px; color: var(--ink-4); line-height: var(--wh-item); text-align: center; pointer-events: none;
}
.wh {
    position: relative; z-index: 1; flex: 1; min-width: 0; height: 100%;
    padding: var(--wh-item) 0; overflow-y: scroll; scroll-snap-type: y mandatory;
    overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: none; -ms-overflow-style: none;
}
.wh::-webkit-scrollbar { display: none; }
.wh:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; border-radius: var(--r-md); }
.wh-tick {
    display: flex; align-items: center; justify-content: center; height: var(--wh-item); scroll-snap-align: center;
    font-family: var(--font-display); font-size: 21px; font-weight: 500; letter-spacing: -.02em; color: var(--ink);
    font-variant-numeric: tabular-nums; cursor: pointer;
}
.wh-tick.x { color: var(--ink-4); text-decoration: line-through; text-decoration-color: var(--line-2); }
.wh-legs { display: flex; margin: 6px 0 0; }
.wh-legs span { flex: 1; text-align: center; font-size: var(--fs-caption); font-weight: 600; color: var(--ink-3); }
.wh-legs b { color: var(--accent-ink); font-variant-numeric: tabular-nums; }

/* 고를 수 있는 시간이 하나도 없는 날 */
.wh-blank { padding: 28px 16px 24px; text-align: center; }
.wh-blank p { margin: 0 0 18px; font-size: var(--fs-sub); color: var(--ink-2); line-height: 1.6; }

/* ==========================================================================
   6. 입력 (3단계)
   ========================================================================== */
.rsv-form { margin-top: 20px; }
.rsv-form .seg label { min-height: 52px; }
.seg-row { display: inline-flex; align-items: center; gap: 6px; }
.seg-row .icon { vertical-align: 0; }
/* 휴대폰용 한 장 요약: 왼쪽 날짜(중립색 · Hahmlet 숫자) + 시각 */
.rsv-recap { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.rsv-recap-date { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 12px 0; line-height: 1; text-align: center; }
.rsv-recap .rsv-recap-date { border-right: 1.5px dashed var(--line-2); }
.rsv-recap-date b { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.rsv-recap-date span { font-size: var(--fs-caption); font-weight: 600; color: var(--ink-3); line-height: 1.2; }
.rsv-recap-date .m { font-weight: 700; }
.rsv-recap-main { min-width: 0; padding: 12px 16px; }
.rsv-recap-main b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.rsv-recap-main > span { display: block; margin-top: 2px; font-size: var(--fs-small); color: var(--ink-3); line-height: 1.45; }
[data-rsv-dur]:not(:empty)::after { content: " · "; }
.slot-summary [data-rsv-dur]::after { content: none; }

.members { margin: 0 0 18px; padding: 16px; border-radius: var(--r-lg); background: var(--paper-2); }
.members-head { margin-bottom: 12px; }
.members-head strong { display: block; font-size: 15px; letter-spacing: -.015em; }
.members-head span { display: block; margin-top: 2px; font-size: var(--fs-small); color: var(--ink-3); line-height: 1.45; }
.member-me { display: flex; align-items: center; gap: 8px; min-height: 48px; margin-bottom: 6px; padding: 8px 14px; border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sub); color: var(--ink-2); line-height: 1.4; }
.member-me .icon { color: var(--st-approved-dot); stroke-width: 2.6; }
.member-me strong { color: var(--ink); }
.member-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--tap); gap: 6px; align-items: center; margin-bottom: 6px; }
.rsv-form .member-row input { margin-top: 0; background: var(--surface); }
.member-row .icon-btn { color: var(--ink-3); }
.member-row .icon-btn:hover { background: var(--paper-3); color: var(--danger); }
.members #add-member { min-height: var(--tap); margin-top: 6px; padding-inline: 16px; background: var(--surface); }      /* 명단을 적을 때 가장 자주 누른다 — 위의 삭제 버튼과 같은 44px */
.members #add-member:hover { background: var(--paper-3); }
.rsv-form > .notice { margin: 4px 0 0; }

/* ==========================================================================
   7. 완료 — 차분한 축하: 초록 동그라미와 색종이 몇 점, 그 아래 티켓 한 장
   ========================================================================== */
.done-page { --rsv-notch: 9px; }
.done-head { text-align: center; margin: 8px 0 28px; }
.done-head h1 { margin-bottom: 8px; }
.done-head p { max-width: 24em; margin: 0 auto; color: var(--ink-2); text-wrap: pretty; text-wrap: balance; }      /* 둘째 줄에 두 낱말만 남지 않게 */
.done-head p strong { color: var(--ink); }
.done-mark { position: relative; width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: var(--st-approved-bg); color: var(--st-approved-fg); animation: done-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.done-mark .icon { width: 32px; height: 32px; stroke-width: 2.4; }
/* 색종이: 한 점의 그림자를 여러 개 흩뿌린다 (장식 — 분류 3D 색과 코랄을 빌려 쓴다) */
.done-mark::before {
    content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 2px; transform: rotate(18deg);
    box-shadow: -56px -14px 0 0 var(--coral), 52px -30px 0 0 var(--accent), -44px 26px 0 -1px var(--st-pending-dot),
                60px 16px 0 -1px var(--cat-art-3d), -22px -50px 0 -1.5px var(--cat-media-3d), 84px -6px 0 -2px var(--cat-stage-3d), -82px 6px 0 -2px var(--cat-sci-3d);
    animation: done-confetti .6s var(--ease) .1s backwards;
}
@keyframes done-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes done-confetti { from { transform: rotate(18deg) scale(.3); opacity: 0; } to { transform: rotate(18deg) scale(1); opacity: 1; } }
.done-ticket .rsv-ticket-top { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; padding: 8px 0; }
.done-ticket .rsv-recap-date { border-right: 1px solid var(--line); }
.done-what { min-width: 0; padding: 12px 20px; }
.done-room { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 17px; letter-spacing: -.015em; line-height: 1.3; }
.done-room b { font-family: var(--font-display); font-weight: 700; }
.done-room .cat-tile { width: 28px; height: 28px; border-radius: 9px; }
.done-room .cat-tile .icon { width: 16px; height: 16px; stroke-width: 2; }
.done-room .badge { margin-left: auto; }
.done-time { margin-top: 4px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.done-loc { margin-top: 2px; font-size: var(--fs-small); color: var(--ink-3); line-height: 1.45; }
.next-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 0; }
.next-steps li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 0 0 18px; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
.next-steps li:last-child { padding-bottom: 0; }
.next-steps li b { display: block; margin-top: 3px; font-size: 14.5px; color: var(--ink-2); letter-spacing: -.01em; line-height: 1.5; }
.next-steps li > i { z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-3); font-style: normal; font-size: var(--fs-caption); font-weight: 700; font-variant-numeric: tabular-nums; }
.next-steps li > i .icon { width: 15px; height: 15px; stroke-width: 2.8; vertical-align: 0; }
.next-steps li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.next-steps li.is-done > i { background: var(--st-approved-bg); color: var(--st-approved-fg); }
.next-steps li.is-done::after { background: var(--st-approved-dot); opacity: .45; }
.next-steps li.is-done b { color: var(--ink); }
.next-steps li.is-now { color: var(--ink-2); }
.next-steps li.is-now b { color: var(--ink); }
.next-steps li.is-now > i { background: var(--st-pending-bg); color: var(--st-pending-fg); box-shadow: 0 0 0 4px var(--warn-wash); }
.done-actions { display: flex; flex-direction: row-reverse; justify-content: center; gap: 8px; margin-top: 24px; }
.done-actions .btn { min-width: 160px; }

/* ==========================================================================
   8. 반응형
   ========================================================================== */
/* PC: 두 단. 오른쪽 카드는 떠서 따라온다(그래서 그림자가 있다 — mask 밖에 그려야 해서 drop-shadow) */
@media (min-width: 1024px) {
    .rsv-flow { grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; }
    .rsv-main { max-width: 640px; }
    .rsv-side { position: sticky; top: calc(var(--topbar-h) + 32px); margin-top: 32px; filter: drop-shadow(0 10px 22px rgba(45, 35, 15, .1)); }
    .rsv-room { gap: 16px; }
    .rsv-room .cat-tile { width: 56px; height: 56px; border-radius: 16px; }
    .rsv-room .cat-tile .icon { width: 28px; height: 28px; }
    .rsv-room h1 { font-size: 34px; }
    .rsv-steps { margin: 24px 0 32px; }
    .calendar { min-height: 470px; }
    .cal-grid { gap: 6px; }
    .cal-cell { height: 64px; border-radius: var(--r-md); font-size: 17px; }
    a.cal-cell:focus-visible { border-radius: var(--r-md); }
    .cal-note { font-size: var(--fs-micro); }
    .wh-tick { font-size: 23px; }
    .wheels { max-width: 420px; }      /* 640px 단 전체로 벌리면 두 숫자가 멀어져 한 덩어리로 안 읽힌다 */
    .rsv-bar-only { display: none !important; }       /* 아래 바일 때만 보이는 것 (요약 한 장, 바 안의 날짜) */
    /* 날짜를 고치는 손잡이는 하나만: PC 는 단계 표시의 날짜 + 연필 (오른쪽 카드에도 날짜가 있어 칩까지 두면 세 번 나온다) */
    .rsv-datechip { display: none; }
    .rsv-flow.is-blocked { grid-template-columns: minmax(0, 1fr); }
    .rsv-flow.is-blocked .rsv-main { width: 100%; max-width: 560px; margin-inline: auto; }
}

/* 1023px 아래: 요약 카드가 아래에 붙는 바가 된다 (요약 두 줄 + 전진 버튼 하나). 불투명 바탕 */
@media (max-width: 1023px) {
    .rsv-card-only { display: none !important; }      /* 오른쪽 카드일 때만 보이는 것 */
    .rsv-steps .val { display: none; }                /* 고른 날짜·시각은 날짜 칩과 아래 바가 보여 준다 — 같은 말을 또 하지 않는다 */
    .rsv-flow.is-blocked .rsv-main { width: 100%; max-width: 560px; margin-inline: auto; }
    .container.rsv-page { max-width: 720px; }
    .rsv-page.has-bar { display: flex; flex-direction: column; padding-bottom: 0; }
    .rsv-page.has-bar .rsv-flow { flex: 1 0 auto; grid-template-rows: 1fr auto; }
    .rsv-side.is-bar { position: sticky; bottom: var(--tabbar-h); z-index: 20; margin: 28px calc(var(--gutter) * -1) 0; }
    .is-bar .rsv-ticket {
        display: flex; align-items: center; gap: 14px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom, 0px));
        background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--sh-bar), 0 -1px 0 var(--line);
    }
    .is-bar .rsv-ticket-top, .is-bar .rsv-ticket-body { padding: 0; border: 0; border-radius: 0; background: none; -webkit-mask: none; mask: none; }
    .is-bar .rsv-ticket-top { flex: 1; min-width: 0; }
    .is-bar .rsv-ticket-body { flex: none; }
    .is-bar .rsv-ticket-top::before, .is-bar .rsv-ticket-top::after, .is-bar .rsv-ticket-body::before, .is-bar .rsv-ticket-body::after { display: none; }
    .is-bar .k, .is-bar dl, .is-bar .notice { display: none; }
    .is-bar .rsv-ticket-body > .btn { margin: 0; width: auto; min-width: 116px; }
    .is-bar .slot-summary { margin: 0; gap: 2px 6px; }
    .is-bar .slot-summary .dur { height: 20px; padding: 0 6px; }
    .is-bar .slot-summary .rng { font-size: 18px; line-height: 1.3; letter-spacing: -.02em; }
    .is-bar .slot-summary.is-empty .rng { font-size: 16px; color: var(--ink-2); }
    .is-bar .slot-summary .sub { font-size: 12.5px; line-height: 1.4; }
}

@media (max-width: 767px) {
    .container.rsv-page { padding-top: 16px; }
    .rsv-page .crumb { margin: -8px 0 0; }
    .rsv-room .cat-tile { width: 44px; height: 44px; border-radius: 13px; }
    .rsv-room .cat-tile .icon { width: 22px; height: 22px; }
    .rsv-room h1 { font-size: 22px; }
    .rsv-room p { font-size: 12.5px; }
    .rsv-datechip { padding: 0 12px; font-size: 13.5px; }
    /* 단계 표시는 한 줄로: "01 날짜 ✓" (고른 값은 위 규칙에서 이미 숨겼다) */
    .rsv-steps { margin: 12px 0 16px; }
    .rsv-steps li { display: block; padding-top: 8px; }
    .rsv-steps li > a, .rsv-steps li > button { margin-top: -8px; padding-top: 8px; }
    .rsv-steps .no { display: inline; margin-right: 6px; font-size: 17px; vertical-align: -1px; }
    .rsv-steps .lb { display: inline-flex; margin: 0; }
    .rsv-steps li > a, .rsv-steps li > button { min-height: 36px; }
    /* 3단계: 첫 입력 칸이 첫 화면 위쪽 40% 안에 오도록 한 장 요약은 접는다 (날짜 = 위 칩 + 아래 바, 시각 = 아래 바) */
    .rsv-recap { display: none !important; }
    .rsv-q-help { margin-top: 4px; font-size: 13.5px; }

    .cal-head { margin-bottom: 6px; }
    .cal-title { font-size: 20px; }
    .cal-note { font-size: 10px; letter-spacing: -.05em; }      /* 46px 칸에 다섯 글자("개교기념일")까지 들어가게 */

    /* 휠이 첫 화면 안에서 끝나도록 위 여백은 줄이되, 띠는 손가락으로 잡을 수 있는 20px 를 지킨다 */
    .tl-day { margin-top: 12px; min-height: 0; }
    .tl-bar { height: 20px; border-radius: 7px; }
    .tl-bar .sel { border-radius: 7px; }
    .tl-bar .sel::before, .tl-bar .sel::after { height: 8px; }
    .tl-ruler { margin-top: 3px; height: 14px; line-height: 14px; }
    .wheels { margin-top: 14px; }

    .rsv-form .seg label { min-height: 54px; }
    /* 390×844 첫 화면에 두 버튼이 하단 탭 위로 다 들어오게 위쪽을 조금씩 줄인다 */
    .done-head { margin: 0 0 18px; }
    .done-head h1 { margin-bottom: 6px; }
    .done-mark { width: 56px; height: 56px; margin-bottom: 14px; }
    .done-mark .icon { width: 28px; height: 28px; }
    .next-steps { margin-top: 12px; }
    .next-steps li { padding-bottom: 14px; }
    .done-actions { margin-top: 16px; }
    .rsv-blocked-art { width: min(240px, 70%); margin-bottom: 16px; }
    .done-ticket .rsv-ticket-top { grid-template-columns: 72px minmax(0, 1fr); }
    .done-what { padding: 12px 16px; }
    .done-time { font-size: 20px; }
    .rsv-ticket-top, .rsv-ticket-body { padding: 20px; }
    .rsv-ticket-top { padding-bottom: 16px; }
    .rsv-ticket-body { padding-top: 16px; }
    .done-actions { flex-direction: column; }
    .done-actions .btn { width: 100%; }
}
@media (max-width: 359px) {
    /* 아주 좁은 화면: 연필만 남기면 무엇을 고치는지 알 수 없다 → 짧은 날짜("9/21 (월)")로 바꾼다 */
    .rsv-datechip { padding: 0 10px; gap: 4px; }
    .rsv-datechip .d-full { display: none; }
    .rsv-datechip .d-short { display: inline; }
    /* 아래 바는 두 줄까지만: 날짜는 위 칩에 있으니 빼고, 시각을 조금 줄여 이용 시간과 한 줄에, 둘째 줄 안내는 짧은 말로("선생님" 생략) */
    .is-bar .slot-summary .dur.rsv-bar-only, .is-bar .rsv-roomy { display: none !important; }
    .is-bar .slot-summary .rng { font-size: 16px; }
    .is-bar .rsv-ticket { gap: 10px; }
    .is-bar .rsv-ticket-body > .btn { min-width: 0; padding-inline: 18px; }
    .is-bar #slot-next .icon { display: none; }      /* 화살표를 빼 요약 쪽에 "시각 + 이용 시간"이 한 줄로 들어갈 자리를 만든다 */
    .rsv-page { --wh-item: 40px; }
    .wh-tick { font-size: 19px; }
}
