/* 수업 먼저 → 달력 창형 — 어두운 바탕의 차분한 상품 목록 + 밝은 창. Gowun Batang 제목 + Pretendard, 먹색·종이색·놋쇠색 */
@font-face {
  font-family: 'Pretendard Variable';
  src: url('/fonts/PretendardVariable.woff2') format('woff2-variations');
  font-weight: 45 920; font-style: normal; font-display: swap;
}
:root {
  --bg: #1C1B19;
  --bg2: #252320;
  --text: #EEE7DB;
  --dim: #A69E90;
  --rule: #3A3732;
  --brass: #C9A464;
  --paper: #F6F1E8;
  --ink: #24221E;
  --soft: #6F685D;
  --line: #E1D9CB;
  --serif: 'Gowun Batang', 'Noto Serif KR', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.7 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif; letter-spacing: -0.2px; word-break: keep-all; }
body.is-locked { overflow: hidden; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 28px; }
.small { font-size: 13.5px; color: var(--dim); }

.top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding-top: 26px; padding-bottom: 26px; border-bottom: 1px solid var(--rule); }
.brand { font-family: var(--serif); font-size: 19px; line-height: 1.2; font-weight: 700; text-decoration: none; color: var(--brass); }
.top__meta { margin: 0; font-size: 13px; line-height: 1.6; color: var(--dim); }
.top__owner { font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--brass); padding-bottom: 2px; }

.intro { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; padding: 56px 0 40px; }
.intro h1 { font-family: var(--serif); font-size: 36px; line-height: 1.35; letter-spacing: -0.6px; }
.intro p { margin: 0; color: var(--dim); font-size: 15.5px; }

.offers__h { font-size: 13px; font-weight: 700; letter-spacing: 1px; color: var(--brass); padding-bottom: 12px; border-bottom: 1px solid var(--brass); }
.offer { display: grid; grid-template-columns: 56px 1fr 200px; gap: 24px; padding: 30px 0; border-bottom: 1px solid var(--rule); }
.offer__no { margin: 4px 0 0; font-family: var(--serif); font-size: 15px; color: var(--dim); }
.offer h3 { font-family: var(--serif); font-size: 24px; letter-spacing: -0.4px; }
.offer__body p { margin: 8px 0 0; color: #CFC7B9; font-size: 15px; max-width: 520px; }
.offer__cond { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px !important; }
.offer__cond span { padding: 2px 10px; border: 1px solid var(--rule); border-radius: 99px; font-size: 12.5px; color: var(--dim); }
.offer__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 16px; }
.offer__price { margin: 0; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.offer__price small { font-size: 13px; font-weight: 400; color: var(--dim); }
.offer__btn { padding: 12px 22px; border: 0; border-radius: 2px; background: var(--brass); color: #1C1B19; font-weight: 700; font-size: 15px; cursor: pointer; }
.offer__btn:hover { background: #E0BD7C; }

.passes, .visit { padding-top: 52px; }
.passes ul { margin: 0 0 10px; padding: 0; list-style: none; }
.passes li { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.passes li i { font-style: normal; font-size: 13px; color: var(--dim); margin-left: 10px; }
.visit dl { display: grid; grid-template-columns: 70px 1fr; gap: 10px 12px; margin: 16px 0 0; font-size: 15px; }
.visit dt { color: var(--dim); }
.visit dd { margin: 0; }
.maker { margin-top: 52px; padding: 18px 20px; border: 1px solid var(--rule); background: var(--bg2); }
.maker p { margin: 0; font-size: 14px; color: #CFC7B9; line-height: 1.75; }
.maker a { color: var(--brass); font-weight: 700; white-space: nowrap; }
.foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 30px; padding-bottom: 44px; font-size: 13.5px; color: var(--dim); }

/* 창 */
.modal { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 24px; background: rgba(10, 9, 8, .72); }
.modal[hidden] { display: none; }
.modal__box { width: 100%; max-width: 760px; max-height: calc(100vh - 48px); overflow-y: auto; background: var(--paper); color: var(--ink); border-radius: 4px; }
.modal__head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 26px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.modal__kicker { margin: 0 0 2px; font-size: 12.5px; color: var(--soft); }
.modal__head h2 { font-family: var(--serif); font-size: 23px; }
.modal__x { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: none; font-size: 22px; line-height: 1; cursor: pointer; }
#calView, #formView, #doneView { padding: 18px 26px 26px; }

.who { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.who__label { font-weight: 700; font-size: 14px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid #CFC5B4; border-radius: 99px; }
.stepper button { width: 36px; height: 34px; border: 0; background: none; font-size: 18px; cursor: pointer; }
.stepper button:disabled { color: #C4BBAC; cursor: default; }
.stepper output { min-width: 24px; text-align: center; font-weight: 700; }
.who__hint { font-size: 13.5px; color: var(--soft); }

.cal { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 16px; }
.month__head { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 15px; }
.mnav { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: none; font-size: 18px; cursor: pointer; }
.mnav:disabled { opacity: .3; cursor: default; }
.month__dow, .month__grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.month__dow span { font-size: 12px; color: var(--soft); padding: 4px 0; }
.month__grid { gap: 3px; }
.c { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 42px; border: 0; border-radius: 3px; background: none; font-size: 14.5px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.c em { font-style: normal; font-size: 9.5px; }
.c--out { color: #C8BFB1; }
.c--off { color: #B3A99A; background: repeating-linear-gradient(135deg, transparent 0 5px, #ECE5D8 5px 6px); }
.c--open { background: #fff; border: 1px solid #DCD2C1; font-weight: 700; cursor: pointer; }
.c--open::after { content: ''; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: #8A6A2E; }
.c--open:hover { border-color: var(--ink); }
.c--full { color: #A04A36; text-decoration: line-through; cursor: pointer; }
.c--full em { text-decoration: none; }
.c.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.c.is-on::after { background: var(--brass); }
.cal__key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 12px 0 0; font-size: 12px; color: var(--soft); }
.cal__key i { display: inline-block; width: 12px; height: 12px; margin-left: 10px; border-radius: 2px; }
.cal__key i:first-child { margin-left: 0; }
.k-open { background: #fff; border: 1px solid #DCD2C1; }
.k-full { background: linear-gradient(transparent 45%, #A04A36 45% 55%, transparent 55%); border: 1px solid #E3D3C9; }
.k-off { background: repeating-linear-gradient(135deg, transparent 0 3px, #DCD2C1 3px 4px); }

.rows { margin-top: 20px; border-top: 1px solid var(--line); }
.rows__h { font-family: var(--serif); font-size: 18px; padding: 14px 0 6px; }
.rows__empty { color: var(--soft); font-size: 14.5px; padding-top: 14px; }
.row { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.row b { font-size: 16px; font-variant-numeric: tabular-nums; }
.row__calc { font-size: 14.5px; color: var(--soft); font-variant-numeric: tabular-nums; }
.row__btn { padding: 9px 20px; border: 0; border-radius: 2px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 14px; cursor: pointer; }
.row__btn:hover { background: #4A3A20; }
.row--taken b { text-decoration: line-through; color: #A99F90; }
.row--taken .row__calc { color: #A04A36; }
.row--blocked, .row--past { color: #A99F90; }
.row--blocked b, .row--past b { color: #A99F90; font-weight: 500; }
.row--blocked { background: repeating-linear-gradient(135deg, transparent 0 6px, #EFE8DC 6px 7px); }
.warn { margin: 12px 0 0; padding: 9px 12px; background: #F4DED6; color: #8A3524; font-size: 14px; }

.back { padding: 0; margin-bottom: 12px; border: 0; background: none; color: var(--soft); font-size: 14px; cursor: pointer; }
.picked { margin: 0 0 16px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); font-size: 15px; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; margin-bottom: 4px; font-size: 13.5px; font-weight: 600; }
.field i { font-style: normal; font-weight: 400; color: var(--soft); }
.field input, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid #D3C9B8; border-radius: 2px; background: #fff; font-size: 16px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.error { min-height: 1em; margin: 0 0 8px; color: #A04A36; font-size: 14px; }
.btn { display: block; width: 100%; padding: 13px; border: 0; border-radius: 2px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 15px; text-align: center; text-decoration: none; cursor: pointer; }
.btn:hover { background: #4A3A20; }
.btn--line { margin-top: 8px; background: transparent; color: var(--ink); border: 1px solid #CFC5B4; }
#formView .small, .receipt .small { color: var(--soft); margin: 10px 0 0; }

.receipt { max-width: 420px; margin: 0 auto 18px; padding: 22px 22px 18px; background: #fff; border: 1px solid var(--line); }
.badge { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 99px; background: #FBEFC6; color: #7A5B07; font-size: 12.5px; font-weight: 700; }
.receipt h3 { font-family: var(--serif); font-size: 21px; padding-bottom: 14px; border-bottom: 1px dashed #CFC5B4; }
.receipt dl { display: grid; grid-template-columns: 60px 1fr; gap: 6px 10px; margin: 14px 0; font-size: 14.5px; }
.receipt dt { color: var(--soft); }
.receipt dd { margin: 0; text-align: right; font-weight: 600; word-break: break-all; }
.receipt__total { display: flex; justify-content: space-between; margin: 0; padding-top: 12px; border-top: 1px dashed #CFC5B4; font-size: 15px; }
.receipt__total b { font-size: 18px; }
#doneView > .btn { max-width: 420px; margin-left: auto; margin-right: auto; }

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .top { grid-template-columns: 1fr auto; gap: 10px; padding-top: 18px; padding-bottom: 18px; }
  .top__meta { grid-column: 1 / -1; grid-row: 2; }
  .intro { grid-template-columns: 1fr; gap: 14px; padding: 34px 0 28px; }
  .intro h1 { font-size: 28px; }
  .offer { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .offer__no { margin: 0; }
  .offer h3 { font-size: 21px; }
  .offer__side { flex-direction: row; align-items: center; }
  .offer__btn { padding: 11px 18px; }
  .foot { flex-direction: column; gap: 6px; }
}
@media (max-width: 640px) {
  .modal { padding: 0; place-items: stretch; }
  .modal__box { max-width: none; max-height: none; height: 100%; border-radius: 0; }
  .modal__head { padding: 14px 16px 12px; }
  #calView, #formView, #doneView { padding: 14px 16px 24px; }
  .cal { grid-template-columns: 1fr; }
  .month__head { justify-content: space-between; }
  .row { grid-template-columns: 58px 1fr auto; gap: 8px; }
  .row__calc { font-size: 13.5px; }
  .row__btn { padding: 9px 14px; }
}
