:root {
  --main: #03c75a;          /* 선택 색(초록) */
  --avail: #3182f6;         /* 예약 가능 칸(파랑) */
  --avail-bg: #e8f1fe;
  --main-dark: #02a64b;
  --main-bg: #eafaf1;
  --text: #222;
  --sub: #666;
  --muted: #999;
  --line: #ebebeb;
  --gray-bg: #f5f6f8;
  --sun: #f0443a;
  --sat: #2f7bf5;
  --safe: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  color: var(--text); background: #e9ebee; font-size: 15px; line-height: 1.5; letter-spacing: -0.2px;
}
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 480px; margin: 0 auto; background: #fff; min-height: 100vh; position: relative; padding-bottom: calc(96px + var(--safe)); }

/* 상단 바 */
.top { position: sticky; top: 0; z-index: 20; height: 52px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; }
.top-back { position: absolute; left: 6px; width: 44px; height: 44px; display: grid; place-items: center; }
.top-title { font-size: 17px; font-weight: 700; }
.top-link { position: absolute; right: 16px; font-size: 14px; color: var(--sub); }

.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* 업체 정보 */
.hero { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; display: block; background: var(--gray-bg); }
.biz { padding: 20px 20px 22px; }
.biz-cat { font-size: 13px; color: var(--muted); }
.biz-name { font-size: 22px; font-weight: 700; margin-top: 2px; }
.biz-addr { font-size: 14px; color: var(--sub); margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.biz-addr svg { flex: none; }
.notice { margin: 0 20px 4px; padding: 14px 16px; border-radius: 8px; background: var(--gray-bg); font-size: 13.5px; color: #444; }
.notice b { color: var(--text); }
.notice li { list-style: none; padding-left: 10px; position: relative; }
.notice li + li { margin-top: 3px; }
.notice li::before { content: ''; position: absolute; left: 0; top: 9px; width: 3px; height: 3px; border-radius: 50%; background: #999; }

.gap { height: 10px; background: var(--gray-bg); border-top: 1px solid var(--line); margin-top: 22px; }
.sec { padding: 24px 20px 4px; }
.sec-h { font-size: 18px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.sec-h small { font-size: 13px; color: var(--muted); font-weight: 400; }

/* 오픈 전 */
.closed { margin: 16px 20px 0; padding: 20px; border-radius: 10px; border: 1px solid var(--line); text-align: center; }
.closed-t { font-size: 14px; color: var(--sub); }
.closed-when { font-size: 18px; font-weight: 700; margin-top: 4px; }
.closed-count { font-size: 26px; font-weight: 700; color: var(--main-dark); margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* 상품(연습실) 목록 */
.items { margin-top: 14px; border-top: 1px solid var(--text); }
.item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 2px; border-bottom: 1px solid var(--line); text-align: left; }
.item-radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #ccc; display: grid; place-items: center; }
.item.on .item-radio { border-color: var(--main); background: var(--main); }
.item.on .item-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.item-body { flex: 1; min-width: 0; }
.item-name { font-size: 16px; font-weight: 600; }
.item-desc { font-size: 13px; color: var(--muted); margin-top: 1px; }
.item-left { flex: none; font-size: 13px; color: var(--main-dark); font-weight: 600; }
.item-left.none { color: var(--muted); font-weight: 400; }

/* 달력 */
.cal { margin-top: 14px; }
.cal-head { display: flex; align-items: center; justify-content: center; gap: 18px; height: 40px; }
.cal-month { font-size: 17px; font-weight: 700; min-width: 90px; text-align: center; font-variant-numeric: tabular-nums; }
.cal-nav { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #333; }
.cal-nav:disabled { color: #ddd; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; margin-top: 8px; text-align: center; }
.cal-dow { font-size: 12.5px; color: var(--sub); padding: 6px 0; }
.cal-dow.sun { color: var(--sun); } .cal-dow.sat { color: var(--sat); }
.cal-day { height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 3px; font-size: 15px; font-variant-numeric: tabular-nums; }
.cal-day .n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.cal-day .t { font-size: 10.5px; line-height: 1; margin-top: 1px; color: var(--muted); height: 11px; white-space: nowrap; }
.cal-day.sun .n, .cal-day.hol .n { color: var(--sun); }
.cal-day.sat .n { color: var(--sat); }
.cal-day.off .n { color: #d3d3d3 !important; }
.cal-day.off { cursor: default; }
.cal-day.today .t { color: var(--text); font-weight: 600; }
.cal-day.on .n { background: var(--main); color: #fff !important; font-weight: 700; }
.cal-day.full .t { color: var(--muted); }
.cal-legend { display: flex; gap: 14px; justify-content: flex-end; font-size: 12px; color: var(--muted); margin-top: 6px; }
.cal-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }

/* 시간 */
.times-label { font-size: 13.5px; color: var(--sub); margin: 18px 0 8px; }
.times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tm { height: 44px; border: 1px solid #dcdcdc; border-radius: 6px; font-size: 14.5px; font-variant-numeric: tabular-nums; background: #fff; letter-spacing: 0; }
.tm:disabled { background: #f6f6f6; color: #c6c6c6; border-color: #eee; cursor: default; text-decoration: line-through; }
.tm.on { background: var(--main); border-color: var(--main); color: #fff; font-weight: 700; }
.tm-hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.empty { padding: 26px 0 10px; text-align: center; color: var(--muted); font-size: 14px; }

/* 안내 */
.info { margin-top: 12px; }
.info li { list-style: none; display: flex; gap: 12px; padding: 7px 0; font-size: 14px; }
.info li b { flex: none; width: 74px; color: var(--sub); font-weight: 400; }

/* 하단 고정 */
.bottom { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px;
  background: #fff; border-top: 1px solid var(--line); padding: 10px 16px calc(10px + var(--safe)); box-shadow: 0 -4px 16px rgba(0,0,0,.04); }
.bottom-sum { font-size: 13.5px; color: var(--sub); margin: 0 2px 8px; min-height: 20px; display: flex; justify-content: space-between; gap: 8px; }
.bottom-sum b { color: var(--text); font-weight: 600; }
.btn { width: 100%; height: 52px; border-radius: 8px; background: var(--main); color: #fff; font-size: 17px; font-weight: 700; }
.btn:disabled { background: #dfe2e6; color: #fff; cursor: default; }
.btn.line { background: #fff; color: var(--text); border: 1px solid #d5d5d5; }
.btn-row { display: flex; gap: 8px; }

/* 폼 */
.sum-card { margin: 18px 20px 0; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.sum-card .t { font-size: 13px; color: var(--muted); }
.sum-card .v { font-size: 17px; font-weight: 700; margin-top: 2px; }
.sum-card .r { font-size: 14px; color: var(--sub); margin-top: 2px; }
.field { margin-top: 16px; }
.field label { display: block; font-size: 14px; color: var(--sub); margin-bottom: 6px; }
.field label em { color: var(--main-dark); font-style: normal; }
.inp { width: 100%; height: 50px; border: 1px solid #dcdcdc; border-radius: 6px; padding: 0 14px; font-size: 16px; outline: 0; background: #fff; }
textarea.inp { height: 90px; padding: 12px 14px; resize: none; line-height: 1.5; }
.inp:focus { border-color: var(--main); }
.inp.bad { border-color: var(--sun); }
.help { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.agree { margin: 22px 20px 0; border: 1px solid var(--line); border-radius: 10px; }
.agree-all { display: flex; align-items: center; gap: 10px; padding: 16px; font-weight: 700; cursor: pointer; }
.agree-box { margin: 0 16px 16px; padding: 12px 14px; background: var(--gray-bg); border-radius: 6px; font-size: 12.5px; color: var(--sub); line-height: 1.6; }
.chk { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #ccc; display: grid; place-items: center; margin: 0; cursor: pointer; }
.chk:checked { background: var(--main); border-color: var(--main); }
.chk:checked::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.rules { margin: 20px 20px 0; font-size: 13px; color: var(--sub); }
.rules h3 { font-size: 14px; color: var(--text); margin-bottom: 6px; }
.rules li { list-style: none; padding-left: 10px; position: relative; margin-top: 3px; }
.rules li::before { content: '·'; position: absolute; left: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* 완료 */
.done { padding: 48px 20px 10px; text-align: center; }
.done-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--main); display: grid; place-items: center; margin: 0 auto; }
.done h2 { font-size: 22px; margin-top: 16px; }
.done p { color: var(--sub); font-size: 14px; margin-top: 4px; }
.kv { margin: 26px 20px 0; border-top: 1px solid var(--text); }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.kv dt { color: var(--sub); flex: none; }
.kv dd { font-weight: 600; text-align: right; }
.code { letter-spacing: 1px; font-variant-numeric: tabular-nums; }

/* 예약 확인 */
.my-list { margin-top: 18px; }
.my { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-top: 10px; }
.my-top { display: flex; justify-content: space-between; align-items: center; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 4px; background: var(--main-bg); color: var(--main-dark); }
.badge.cancel { background: #f1f1f1; color: #999; }
.badge.past { background: #f1f1f1; color: #777; }
.my-when { font-size: 16px; font-weight: 700; margin-top: 8px; }
.my-sub { font-size: 13.5px; color: var(--sub); margin-top: 2px; }
.my-btn { margin-top: 12px; height: 40px; width: 100%; border: 1px solid #d5d5d5; border-radius: 6px; font-size: 14px; }
.my-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

.toast { position: fixed; left: 50%; bottom: calc(130px + var(--safe)); transform: translate(-50%, 10px); background: rgba(30,30,30,.92); color: #fff;
  padding: 12px 18px; border-radius: 22px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: calc(100% - 40px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { padding: 28px 20px 10px; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* 시간 바 (좌우 스크롤) */
.tbar { overflow-x: auto; margin: 12px -20px 0; padding: 0 20px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.tbar::-webkit-scrollbar { display: none; }
.trow { display: flex; width: max-content; padding: 24px 24px 0 6px; }
.tcol { position: relative; flex: none; width: 42px; }
.tcol.end { width: 0; }
.tcol.hr::before { content: ''; position: absolute; left: 0; top: -6px; height: 6px; border-left: 1px solid #bbb; }
.tl { position: absolute; top: -24px; left: 0; transform: translateX(-50%); font-size: 12px; color: var(--sub); white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -0.3px; }
.tc { display: block; width: 100%; height: 52px; background: var(--avail-bg); border: 1px solid #a9c8f7; border-left: 0; }
.tc:not(:disabled):not(.on) { box-shadow: inset 0 -4px 0 var(--avail); }
.tcol:not(.hr) .tc { border-left: 0; }
.tcol:first-child .tc { border-left: 1px solid #a9c8f7; border-radius: 6px 0 0 6px; }
.tcol:nth-last-child(2) .tc { border-radius: 0 6px 6px 0; }
.tcol.hr:not(:first-child) .tc:disabled { box-shadow: inset 1px 0 0 #c4c4c4; }
.tcol.hr:not(:first-child) .tc:not(:disabled):not(.on) { box-shadow: inset 1px 0 0 #7aa9f2, inset 0 -4px 0 var(--avail); }
.tc:disabled { background: repeating-linear-gradient(135deg, #ececec 0 4px, #f6f6f6 4px 8px); border-color: #ddd; cursor: default; }
.tc.on { background: var(--main); border-color: var(--main); box-shadow: none !important; }
.tc.on + .tc, .tcol:has(.tc.on) + .tcol .tc { border-left-color: var(--main); }
.tlegend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.tlegend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.lg-on { background: var(--main); } .lg-ok { background: var(--avail-bg); border: 1px solid var(--avail); } .lg-no { background: #e9e9e9; }
.tsel { margin-top: 14px; padding: 14px 16px; background: var(--gray-bg); border-radius: 8px; font-size: 14px; color: var(--sub); text-align: center; }
.tsel b { color: var(--text); font-size: 15.5px; }

/* 로그인 */
.login { padding: 44px 24px 40px; }
.login-logo { width: 140px; height: auto; display: block; }
.login-t { font-size: 26px; margin-top: 20px; }
.login-s { color: var(--sub); font-size: 14px; margin: 6px 0 10px; }
.login-agree { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 20px; font-size: 14px; font-weight: 600; cursor: pointer; }
.login-agree small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.me { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; background: var(--gray-bg); border-radius: 10px; font-size: 16px; }
.me-p { font-size: 13px; color: var(--sub); }
.me-out { flex: none; font-size: 13px; color: var(--sub); border: 1px solid #d5d5d5; background: #fff; border-radius: 6px; padding: 7px 10px; }
.tcol:first-child .tl { transform: none; left: -1px; }
/* 가능 칸: 진한 파랑, 칸 사이 흰 줄 (선택은 초록) */
.tc:not(:disabled):not(.on) { background: var(--avail); border-color: var(--avail); box-shadow: inset -1px 0 0 rgba(255,255,255,.55) !important; }
.tcol.hr:not(:first-child) .tc:not(:disabled):not(.on) { box-shadow: inset 1px 0 0 #fff, inset -1px 0 0 rgba(255,255,255,.55) !important; }
.tc.on { box-shadow: inset -1px 0 0 rgba(255,255,255,.35) !important; }
.lg-ok { background: var(--avail) !important; border: 0 !important; }
