/* 시간대 3열 + 주문 요약형 — 짙은 청록 덮개 위에 흰 예약 시트. 제목 Gowun Batang, 본문 Nanum Gothic. 알약 버튼 */
:root {
  --deep: #123C40;
  --deep-2: #1D5459;
  --sheet: #FFFFFF;
  --soft: #F3F6F4;
  --ink: #1A2426;
  --ink-2: #4F5D5F;
  --muted: #8E9A9B;
  --line: #E1E7E5;
  --teal: #16666B;
  --teal-soft: #DDEEEC;
  --saffron: #F2B544;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--deep); color: var(--ink);
  font: 400 15px/1.6 'Nanum Gothic', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  word-break: keep-all; overflow-wrap: anywhere;
}
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2 { margin: 0; }
[hidden] { display: none !important; }

.backdrop { padding: 28px 24px 40px; background: radial-gradient(circle at 15% 0, var(--deep-2), var(--deep) 60%); }
.sheet { max-width: 1120px; margin: 0 auto; border-radius: 22px; background: var(--sheet); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6); overflow: hidden; }
.sheet__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; border-bottom: 1px solid var(--line); }
.sheet__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sheet__mark { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-family: 'Gowun Batang', serif; font-weight: 700; font-size: 20px; }
.sheet__name { margin: 0; font-weight: 800; font-size: 16px; }
.sheet__addr { margin: 0; font-size: 12.5px; color: var(--muted); }
.sheet__owner { padding: 8px 16px; border-radius: 99px; border: 1.5px solid var(--teal); color: var(--teal); font-weight: 700; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.sheet__owner:hover { background: var(--teal); color: #fff; }

.sheet__body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.pick { padding: 26px 30px 30px; min-width: 0; }
.pick__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pick__month { font-family: 'Gowun Batang', serif; font-weight: 700; font-size: 28px; letter-spacing: -0.5px; }
.calbtn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--sheet); font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.calbtn svg { width: 17px; height: 17px; }
.calbtn:hover, .calbtn.is-on { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }

/* 날짜 원 7개 */
.week { display: flex; align-items: center; gap: 8px; }
.arrow { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--soft); font-size: 20px; line-height: 1; cursor: pointer; }
.arrow:hover:not(:disabled) { background: var(--teal-soft); }
.arrow:disabled { opacity: .3; cursor: default; }
.dots { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dot { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; border: 0; background: none; cursor: pointer; }
.dot__dow { font-size: 12px; color: var(--muted); }
.dot__num { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 18px; font-weight: 800; }
.dot__sub { height: 14px; font-size: 10.5px; line-height: 14px; color: var(--teal); font-weight: 800; }
.dot:hover:not(:disabled) .dot__num { border-color: var(--teal); }
.dot.is-today .dot__num { border-color: var(--ink); }
.dot.is-on .dot__num { background: var(--teal); border-color: var(--teal); color: #fff; }
.dot:disabled { cursor: default; }
.dot.is-off .dot__num { border-color: transparent; background: var(--soft); color: #B7C0C0; font-weight: 400; }
.dot.is-full .dot__num { border-style: dashed; color: var(--muted); font-weight: 400; }
.dot.is-off .dot__sub, .dot.is-full .dot__sub { color: var(--muted); font-weight: 400; }

/* 펼친 2주 보기 */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 460px; }
.month__h { text-align: center; font-size: 11.5px; color: var(--muted); }
.month__d { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 46px; border: 0; border-radius: 10px; background: var(--teal-soft); font-weight: 800; font-size: 15px; cursor: pointer; line-height: 1.1; }
.month__d i { font-style: normal; font-weight: 400; font-size: 10.5px; color: var(--teal); }
.month__d.is-on { background: var(--teal); color: #fff; }
.month__d.is-on i { color: #CDE8E6; }
.month__d.is-off { background: none; color: #C3CBCB; font-weight: 400; cursor: default; }
.month__note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

.pick__day { margin: 20px 0 12px; font-size: 14px; font-weight: 700; color: var(--ink-2); }

/* 오전·오후·저녁 3열 */
.parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.part { padding: 14px 14px 4px; border-left: 1px solid var(--line); }
.part:first-child { border-left: 0; padding-left: 0; }
.part__name { margin-bottom: 12px; font-family: 'Gowun Batang', serif; font-size: 17px; font-weight: 700; }
.part__pills { display: flex; flex-direction: column; gap: 8px; }
.pill { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 99px; font-size: 15px; font-weight: 700; }
button.pill { border: 1.5px solid var(--teal); background: var(--sheet); color: var(--teal); cursor: pointer; }
button.pill:hover { background: var(--teal-soft); }
button.pill.is-on { background: var(--teal); color: #fff; }
.pill s { text-decoration: line-through; font-weight: 400; }
.pill em { font-style: normal; font-size: 12px; font-weight: 400; }
.pill--taken { background: var(--soft); color: #A2ADAD; border: 1.5px solid transparent; }
.pill--blocked { border: 1.5px dashed #BAC6C5; color: var(--ink-2); }
.pill--blocked s { text-decoration: none; }
.pill--past { color: #C3CBCB; border: 1.5px solid transparent; }
.keys { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 18px 0 0; font-size: 12.5px; color: var(--muted); }
.k { display: inline-block; width: 18px; height: 10px; margin-right: 5px; border-radius: 99px; vertical-align: 0; }
.k--open { border: 1.5px solid var(--teal); }
.k--taken { background: #E3E9E8; }
.k--blocked { border: 1.5px dashed #BAC6C5; }
.k--past { background: #F1F4F3; }

/* 정보 입력 */
.back { border: 0; background: none; padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 13.5px; color: var(--teal); cursor: pointer; }
.form { max-width: 480px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 5px; font-weight: 700; font-size: 13.5px; }
.field i { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--soft); font-size: 16px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); background: var(--sheet); }
.field textarea { resize: vertical; }
.error { margin: 0 0 10px; color: #B03A2B; font-weight: 800; font-size: 13.5px; }
.error:empty { display: none; }
.error--top { padding: 10px 14px; border-radius: 10px; background: #FBE6E1; }
.fine { margin: 0; font-size: 13px; color: var(--muted); }

/* 완료 */
.done__tag { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 99px; background: #FDEFC9; color: #6F4E05; font-size: 12.5px; font-weight: 800; }
.done__title { font-family: 'Gowun Batang', serif; font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.done__lead { margin: 0 0 20px; color: var(--ink-2); max-width: 34em; }
.done__dl { display: grid; grid-template-columns: 72px 1fr; gap: 8px 12px; max-width: 460px; margin: 0 0 24px; padding: 16px 18px; border-radius: 14px; background: var(--soft); }
.done__dl dt { color: var(--muted); font-size: 14px; }
.done__dl dd { margin: 0; font-weight: 700; }
.done__act { display: flex; flex-wrap: wrap; gap: 10px; }
.ghost { min-height: 48px; padding: 0 20px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--sheet); font-weight: 700; cursor: pointer; }
.ghost:hover { border-color: var(--teal); }

/* 주문 내역 카드 */
.order { padding: 26px 24px 28px; background: var(--soft); border-left: 1px solid var(--line); }
.order__title { margin-bottom: 14px; font-family: 'Gowun Batang', serif; font-size: 20px; font-weight: 700; }
.order__svcs { display: grid; gap: 6px; margin-bottom: 16px; }
.svc { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1.5px solid transparent; border-radius: 14px; background: var(--sheet); cursor: pointer; }
.svc input { position: absolute; opacity: 0; pointer-events: none; }
.svc.is-on { border-color: var(--teal); }
.svc:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.svc:has(input:disabled) { cursor: default; }
.svc:has(input:disabled):not(.is-on) { opacity: .5; }
.svc__name { font-weight: 800; font-size: 14px; }
.svc__name small, .svc__price small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.svc__price { text-align: right; font-weight: 800; font-size: 14px; white-space: nowrap; }
.order__dl { display: grid; grid-template-columns: 40px 1fr; gap: 4px 10px; margin: 0 0 14px; font-size: 13.5px; }
.order__dl dt { color: var(--muted); }
.order__dl dd { margin: 0; font-weight: 700; }
.order__dl dd.is-empty { font-weight: 400; color: var(--ink-2); }
.order__calc { margin: 0; text-align: right; font-size: 12.5px; color: var(--muted); }
.order__total { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.order__total span { font-size: 14px; font-weight: 700; }
.order__total b { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.order__pay { margin: 2px 0 16px; font-size: 12px; color: var(--muted); }
.order__state { margin: 0; padding: 12px; border-radius: 12px; background: #FDEFC9; color: #6F4E05; text-align: center; font-weight: 800; font-size: 14px; }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border: 0; border-radius: 99px; background: var(--teal); color: #fff; font-weight: 800; font-size: 15.5px; text-decoration: none; cursor: pointer; }
.cta:hover:not(:disabled) { background: var(--deep); }
.cta:disabled { background: #B9C6C5; cursor: default; }
.cta--wide { width: 100%; }

.maker { padding: 0 28px; }
.maker p { margin: 0; padding: 16px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.maker b { color: var(--teal); margin-right: 3px; }
.maker a { font-weight: 800; color: var(--teal); }
.foot { padding: 0 28px 22px; font-size: 12px; color: var(--muted); }

.mbar { display: none; }

@media (max-width: 900px) {
  .sheet__body { grid-template-columns: 1fr; }
  .order { border-left: 0; border-top: 1px solid var(--line); }
  .order .cta, .order__state { display: none; }
  .mbar:not([hidden]) { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--sheet); border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -16px rgba(0, 0, 0, .35); }
  .mbar__txt { flex: 1; min-width: 0; line-height: 1.35; }
  .mbar__txt b { display: block; font-size: 18px; }
  .mbar__txt span { display: block; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .backdrop { padding-bottom: 96px; }
}
@media (max-width: 600px) {
  .backdrop { padding: 12px 8px 96px; }
  .sheet { border-radius: 16px; }
  .sheet__top { padding: 14px 16px; }
  .sheet__addr { display: none; }
  .sheet__mark { width: 36px; height: 36px; font-size: 17px; }
  .sheet__owner { padding: 6px 11px; font-size: 12.5px; }
  .pick { padding: 18px 14px 22px; }
  .pick__month { font-size: 23px; }
  .calbtn { padding: 6px 10px; font-size: 12px; }
  .week { gap: 2px; margin: 0 -6px; }
  .arrow { width: 26px; height: 30px; background: none; }
  .dots { gap: 2px; }
  .dot__num { width: 38px; height: 38px; font-size: 15px; }
  /* 3열 → 시간대 제목 아래 칩 줄 */
  .parts { grid-template-columns: 1fr; border-top: 0; }
  .part, .part:first-child { padding: 10px 0 6px; border-left: 0; border-top: 1px solid var(--line); }
  .part__name { margin-bottom: 8px; font-size: 15px; }
  .part__pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .pill { min-height: 42px; padding: 0 4px; font-size: 14px; flex-direction: column; gap: 0; line-height: 1.15; }
  .pill em { font-size: 10.5px; }
  .order { padding: 18px 14px 20px; }
  .done__title { font-size: 27px; }
  .done__act > * { width: 100%; }
  .maker { padding: 0 14px; }
  .foot { padding: 0 14px 18px; }
}
