/* 한 줄 조건 바형 — 레스토랑 예약처럼 단정한 톤. Hahmlet 제목 + 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: #FAF7F1;
  --card: #FFFFFF;
  --ink: #1D1C1A;
  --soft: #6F6A61;
  --line: #E2DBCF;
  --blue: #1F4C7A;
  --blue-soft: #E3EBF4;
  --red: #A83A2D;
  --serif: 'Hahmlet', 'Noto Serif KR', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 '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, select, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.small { font-size: 13.5px; color: var(--soft); }

/* 머리 */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top__in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { font-family: var(--serif); font-size: 19px; font-weight: 600; text-decoration: none; letter-spacing: -0.4px; }
.top__nav { display: flex; gap: 22px; font-size: 14.5px; }
.top__nav a { text-decoration: none; color: var(--soft); }
.top__nav a:hover { color: var(--ink); }
.top__nav .top__owner { color: var(--blue); font-weight: 600; }

.head { padding-top: 44px; padding-bottom: 26px; }
.head__where { margin: 0 0 8px; font-size: 13.5px; color: var(--soft); }
.head h1 { font-family: var(--serif); font-size: 40px; line-height: 1.2; letter-spacing: -1px; }
.head__lead { margin: 12px 0 0; max-width: 520px; color: #3B3833; }
.head__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; font-size: 14px; color: var(--soft); }
.head__meta span + span::before { content: ''; display: inline-block; width: 3px; height: 3px; margin: 0 14px 3px -10px; border-radius: 50%; background: var(--line); }

/* 조건 바 */
.book { padding-bottom: 40px; }
.bar { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr; background: var(--card); border: 1px solid var(--ink); border-radius: 4px; }
.bar__seg { position: relative; display: block; padding: 10px 16px 9px; cursor: pointer; }
.bar__seg + .bar__seg { border-left: 1px solid var(--line); }
.bar__seg span { display: block; font-size: 12px; font-weight: 600; color: var(--soft); letter-spacing: .2px; }
.bar__seg select { -webkit-appearance: none; appearance: none; width: 100%; padding: 2px 22px 2px 0; border: 0; background: transparent; font-size: 16.5px; font-weight: 600; cursor: pointer; outline: none; }
.bar__seg::after { content: ''; position: absolute; right: 18px; bottom: 19px; width: 7px; height: 7px; border-right: 1.6px solid var(--ink); border-bottom: 1.6px solid var(--ink); transform: rotate(45deg); pointer-events: none; }
.bar__seg:focus-within { box-shadow: inset 0 -3px 0 var(--blue); }

/* 날짜 원 줄 */
.days { display: flex; gap: 6px; margin: 22px 0 0; padding: 4px 2px 8px; overflow-x: auto; scrollbar-width: thin; }
.day { flex: 1 0 56px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer; }
.day__dot { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; transition: background .12s, color .12s; }
.day__sub { font-size: 12px; color: var(--soft); }
.day.is-open .day__dot { background: var(--blue-soft); color: var(--blue); }
.day.is-open:hover .day__dot { background: #CFDCEB; }
.day.is-full .day__dot { border: 1.6px solid var(--red); color: var(--red); }
.day.is-full .day__sub { color: var(--red); }
.day.is-off { cursor: default; }
.day.is-off .day__dot { color: #B9B2A6; border: 1px dashed #D3CBBE; }
.day.is-on .day__dot { background: var(--blue); color: #fff; border-color: var(--blue); }
.day.is-on.is-full .day__dot { background: var(--red); border-color: var(--red); }
.day.is-on .day__sub { color: var(--ink); font-weight: 600; }

.key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 6px 0 0; font-size: 12.5px; color: var(--soft); }
.key span { display: inline-block; width: 12px; height: 12px; margin-left: 10px; border-radius: 50%; }
.key span:first-child { margin-left: 0; }
.key__open { background: var(--blue-soft); border: 1px solid #BCD0E5; }
.key__full { border: 1.6px solid var(--red); }
.key__off { border: 1px dashed #C9C0B2; }

/* 시간 */
.times { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.times__title { font-family: var(--serif); font-size: 22px; margin-bottom: 4px; }
.times__warn { margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--red); background: #F7E7E4; color: var(--red); font-size: 14.5px; }
.times__none { margin: 6px 0 0; font-size: 14.5px; color: var(--soft); }
.link { padding: 0; border: 0; background: none; color: var(--blue); font-weight: 600; text-decoration: underline; cursor: pointer; margin-left: 6px; }
.part { padding: 14px 0 4px; }
.part h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.part h3 span { font-weight: 400; color: var(--soft); margin-left: 6px; font-size: 13px; }
.part__slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { min-width: 96px; padding: 11px 16px; border: 0; border-radius: 4px; background: var(--blue); color: #fff; font-size: 15.5px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.slot:hover { background: #163A5E; }
.slot[disabled] { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.25; padding: 6px 14px; cursor: default; background: transparent; border: 1px solid var(--line); color: var(--soft); font-weight: 500; }
.slot[disabled] s { text-decoration: none; font-size: 14.5px; }
.slot[disabled] span { font-size: 11.5px; }
.slot--taken { border-color: #E6C3BD !important; color: var(--red) !important; }
.slot--taken s { text-decoration: line-through !important; }
.slot--blocked { background: repeating-linear-gradient(135deg, transparent 0 6px, #EFE9DF 6px 7px) !important; }
.slot--past { opacity: .55; }

.price { margin: 22px 0 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; font-size: 15px; }
.price span { display: inline-block; color: var(--soft); font-size: 13.5px; margin-left: 6px; }

/* 수업 안내 */
.info, .visit { padding-top: 48px; padding-bottom: 8px; }
.info h2, .visit h2 { font-family: var(--serif); font-size: 24px; margin-bottom: 16px; }
.info__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
.mrow { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.mrow h3 { font-size: 16px; }
.mrow p { margin: 4px 0 0; font-size: 14px; color: var(--soft); }
.mrow b { white-space: nowrap; font-weight: 600; }
.mrow b i { font-style: normal; font-weight: 400; color: var(--soft); font-size: 13px; }
.info__passes { padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; align-self: start; }
.info__passes h3 { font-size: 15px; margin-bottom: 8px; }
.info__passes ul { margin: 0 0 10px; padding: 0; list-style: none; }
.info__passes li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 14.5px; border-bottom: 1px dotted var(--line); }
.info__passes li i { font-style: normal; color: var(--soft); font-size: 12.5px; display: block; }
.visit dl { display: grid; grid-template-columns: 70px 1fr; gap: 8px 12px; margin: 0; font-size: 15px; }
.visit dt { color: var(--soft); }
.visit dd { margin: 0; }
.maker { margin-top: 40px; }
.maker p { margin: 0; padding: 16px 18px; border: 1px dashed #C9C0B2; border-radius: 4px; font-size: 14px; color: #4A463F; line-height: 1.7; }
.maker a { color: var(--blue); font-weight: 600; white-space: nowrap; }
.foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 40px; font-size: 13.5px; color: var(--soft); }

/* 모달 */
.modal { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 20px; background: rgba(20, 20, 18, .45); }
.modal[hidden] { display: none; }
.modal__box { position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 26px 26px 22px; background: var(--card); border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal__x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; background: none; font-size: 24px; color: var(--soft); cursor: pointer; }
.modal__eyebrow { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; color: var(--blue); }
.modal h2 { font-family: var(--serif); font-size: 23px; }
.modal__sub { margin: 6px 0 16px; font-size: 14.5px; color: var(--soft); }
.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 var(--line); border-radius: 4px; background: #fff; font-size: 16px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: transparent; }
.error { min-height: 1em; margin: 0 0 8px; color: var(--red); font-size: 14px; }
.btn { display: block; width: 100%; padding: 13px 16px; border: 0; border-radius: 4px; background: var(--ink); color: #fff; font-size: 15.5px; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue); }
.btn--line { margin-top: 8px; background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--line:hover { background: var(--bg); }
.badge { display: inline-block; margin: 0 0 10px; padding: 3px 10px; border-radius: 99px; background: #FBEFC6; color: #7A5B07; font-size: 12.5px; font-weight: 700; }
.done { display: grid; grid-template-columns: 64px 1fr; gap: 6px 10px; margin: 16px 0 6px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 15px; }
.done dt { color: var(--soft); }
.done dd { margin: 0; font-weight: 500; word-break: break-all; }

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .top__in { height: 54px; }
  .top__nav { gap: 14px; font-size: 13.5px; }
  .top__nav a:not(.top__owner) { display: none; }
  .head { padding-top: 28px; padding-bottom: 20px; }
  .head h1 { font-size: 30px; }
  .bar { grid-template-columns: 1fr 1fr; }
  .bar__seg:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .bar__seg:nth-child(2) { border-left: 0; }
  .bar__seg select { font-size: 15.5px; }
  .days { gap: 2px; margin-left: -16px; margin-right: -16px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
  .days::-webkit-scrollbar { display: none; }
  .day { flex: 0 0 52px; }
  .day__dot { width: 42px; height: 42px; font-size: 15px; }
  .slot { min-width: 0; flex: 0 0 calc(33.333% - 6px); padding: 11px 6px; }
  .slot[disabled] { padding: 6px; }
  .info__grid { grid-template-columns: 1fr; gap: 20px; }
  .modal { align-items: end; padding: 0; }
  .modal__box { max-width: none; border-radius: 12px 12px 0 0; max-height: 92vh; padding: 24px 18px 20px; }
  .foot { flex-direction: column; gap: 6px; }
}
