/* 예약 · 내 예약 · 트레이너 · 사장님 화면 — 간결하게(회색 바탕 · 흰 카드 · 보라 버튼), 브랜드는 머리띠에만 */
:root {
  --ink: #121212;
  --text: #1d1d1f;
  --sub: #6e6e73;
  --faint: #a1a1a6;
  --bg: #F5F5F7;
  --card: #fff;
  --line: #e5e5ea;
  --purple: #6B3FD0;
  --purple-l: #F1ECFF;
  --yellow: #FFD400;
  --red: #E8232B;
  --red-l: #FFEDEE;
  --orange: #F07800;
  --orange-l: #FFF3E3;
  --green: #1E9E57;
  --green-l: #E6F7EE;
  --sky: #29B6E8;
  --r: 14px;
  --body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  --hand: 'Black Han Sans', 'Pretendard Variable', sans-serif;
  --pop: 'Lilita One', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
body.no-scroll { overflow: hidden; }
a { color: var(--purple); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { width: min(760px, 100% - 32px); margin: 0 auto; }
.wide .wrap, .wrap.wide { width: min(1200px, 100% - 32px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--sub); }
.small { font-size: 14px; }

.demo-bar { background: var(--ink); color: var(--yellow); font-size: 13px; text-align: center; padding: 7px 16px; font-weight: 600; }
.demo-bar a { color: #fff; }

/* 머리띠 */
.bar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.bar .wrap { display: flex; align-items: center; gap: 12px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); min-width: 0; }
.brand img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; flex: none; }
.brand b { font-family: var(--pop); font-size: 19px; color: var(--purple); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; line-height: 1; }
.brand span { font-size: 13px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* 탭 */
.tabs { display: flex; gap: 4px; background: #e8e8ed; border-radius: 10px; padding: 3px; margin: 16px 0; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 8px; font-weight: 700; font-size: 15px; cursor: pointer; color: var(--sub); position: relative; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tabs .dot { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11.5px; margin-left: 4px; vertical-align: 1px; }

/* 카드 */
.card { background: var(--card); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card h2, .card h3 { margin: 0 0 12px; font-size: 18px; }
.card h2 small, .card h3 small { font-weight: 500; color: var(--sub); font-size: 14px; margin-left: 6px; }
.page-title { font-size: 26px; margin: 22px 0 6px; letter-spacing: -.3px; }
.page-sub { margin: 0 0 18px; color: var(--sub); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; }
.btn.soft { background: var(--purple-l); border-color: transparent; color: var(--purple); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.big { min-height: 56px; font-size: 18px; border-radius: 14px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns .btn { flex: 1; }
.link { background: none; border: 0; padding: 0; color: var(--purple); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* 입력 */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
label.f > span small { font-weight: 500; color: var(--sub); }
.in { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #d2d2d7; border-radius: 12px; background: #fff; font-size: 17px; }
.in:focus { outline: 3px solid rgba(107,63,208,.25); border-color: var(--purple); }
textarea.in { min-height: 84px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; margin: 6px 0 16px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--purple); flex: none; }
.err { color: var(--red); font-weight: 700; font-size: 14.5px; margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid #d2d2d7; background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }

/* 상태 표 */
.pill { display: inline-block; font-size: 12.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: #eee; color: #444; white-space: nowrap; }
.pill.ok { background: var(--green-l); color: var(--green); }
.pill.wait { background: var(--orange-l); color: var(--orange); }
.pill.no { background: var(--red-l); color: var(--red); }
.pill.first { background: var(--purple-l); color: var(--purple); }
.pill.gray { background: #f0f0f2; color: var(--sub); }

/* 목록 */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t1 { font-weight: 700; }
.list .t2 { font-size: 14px; color: var(--sub); }
.list button.rowlink { all: unset; display: flex; align-items: center; gap: 12px; width: 100%; cursor: pointer; }
.list li.tap { cursor: pointer; }
.list li.tap:hover .t1 { color: var(--purple); }
.list li.tap:focus-visible { outline: 3px solid rgba(107,63,208,.35); outline-offset: 2px; border-radius: 8px; }
.list .chev { color: #c7c7cc; font-size: 24px; line-height: 1; flex: none; }
.btn.danger.ghost { background: #fff; border-color: #f3c2c4; color: var(--red); }
.empty { color: var(--sub); text-align: center; padding: 22px 0; font-size: 15px; }

/* 작은 창 */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0); display: flex; align-items: flex-end; justify-content: center; transition: background .2s; }
.sheet-wrap.in { background: rgba(0,0,0,.38); }
.sheet { position: relative; background: #fff; width: min(560px, 100%); max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); transform: translateY(30px); opacity: 0; transition: transform .22s, opacity .22s; }
.sheet.wide { width: min(720px, 100%); }
.sheet-wrap.in .sheet { transform: none; opacity: 1; }
.sheet-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f0f0f2; cursor: pointer; font-size: 15px; }
.sheet h3 { margin: 0 34px 14px 0; font-size: 20px; }
.confirm-msg { font-size: 17px; font-weight: 600; margin: 8px 30px 20px 0; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 20px; } }

.toast-box { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(420px, 100% - 32px); }
.toast { background: rgba(29,29,31,.94); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; text-align: center; transition: opacity .3s; }
.toast.bad { background: var(--red); }
.toast.out { opacity: 0; }

.notice { border-radius: 12px; padding: 12px 14px; font-size: 14.5px; font-weight: 600; margin-bottom: 14px; }
.notice.warn { background: var(--orange-l); color: #8a4600; }
.notice.info { background: var(--purple-l); color: #3f2394; }
.notice.good { background: var(--green-l); color: #146b3b; }

/* 큰 숫자 */
.big-num { font-family: var(--hand); font-size: 48px; line-height: 1; letter-spacing: -.5px; }
.big-num small { font-family: var(--body); font-size: 16px; font-weight: 700; color: var(--sub); margin-left: 4px; }

/* 로그인 */
.login { max-width: 400px; margin: 40px auto; }
.login .card { padding: 24px; }
.login h1 { font-size: 24px; margin: 0 0 4px; }
.login p.muted { margin: 0 0 20px; }

/* 예약: 선생님 고르기 */
.trow { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.tpick { flex: none; width: 104px; scroll-snap-align: start; border: 2px solid transparent; background: #fff; border-radius: 14px; padding: 8px; cursor: pointer; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.tpick[aria-pressed="true"] { border-color: var(--purple); background: var(--purple-l); }
.tpick .av { width: 72px; height: 72px; margin: 0 auto 6px; border-radius: 50%; overflow: hidden; background: var(--purple); border: 2px solid var(--ink); display: grid; place-items: center; color: #fff; font-family: var(--hand); font-size: 22px; }
.tpick .av img { width: 100%; height: 100%; object-fit: cover; }
.tpick b { display: block; font-size: 15px; }
.tpick small { display: block; font-size: 11.5px; color: var(--sub); line-height: 1.3; margin-top: 2px; }
.tinfo { display: flex; gap: 14px; align-items: center; }
.tinfo .av { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 2px solid var(--ink); flex: none; background: var(--purple); display: grid; place-items: center; color: #fff; font-family: var(--hand); font-size: 20px; }
.tinfo .av img { width: 100%; height: 100%; object-fit: cover; }
.tinfo q { display: block; font-weight: 700; quotes: '“' '”'; }

/* 예약: 날짜 · 시간 */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; -webkit-overflow-scrolling: touch; }
.day { flex: none; width: 58px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 7px 0; text-align: center; cursor: pointer; }
.day b { display: block; font-size: 19px; line-height: 1.2; }
.day small { display: block; font-size: 12px; color: var(--sub); }
.day i { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: var(--green); height: 15px; }
.day[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.day[aria-pressed="true"] small, .day[aria-pressed="true"] i { color: #fff; }
.day:disabled { opacity: .38; cursor: default; }
.day.sun small { color: var(--red); }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.time { min-height: 48px; border: 1px solid #d2d2d7; background: #fff; border-radius: 12px; font-weight: 700; font-size: 15.5px; cursor: pointer; }
.time[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.pick-sum { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; background: var(--purple-l); color: #3f2394; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; }

/* 완료 */
.done-mark { width: 84px; height: 84px; margin: 6px auto 12px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); display: grid; place-items: center; font-size: 40px; transform: rotate(-6deg); }
.done h2 { text-align: center; font-family: var(--hand); font-weight: 400; font-size: 34px; margin: 0 0 6px; }
.done p.c { text-align: center; margin: 0 0 18px; }

/* 트레이너 캘린더 */
.weeknav { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
.weeknav h2 { font-size: 18px; margin: 0; flex: 1; }
.weeknav .btn { min-height: 38px; padding: 0 12px; }
.wstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 12px; }
.wday { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 6px 0 7px; text-align: center; cursor: pointer; }
.wday small { display: block; font-size: 12px; color: var(--sub); }
.wday b { display: block; font-size: 18px; line-height: 1.25; }
.wday .cnt { display: flex; justify-content: center; gap: 3px; height: 8px; margin-top: 3px; }
.wday .cnt i { width: 6px; height: 6px; border-radius: 50%; background: var(--purple); }
.wday .cnt i.w { background: var(--orange); }
.wday[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.wday[aria-pressed="true"] small { color: #ccc; }
.wday.today b { color: var(--purple); }
.wday[aria-pressed="true"].today b { color: var(--yellow); }
.cal { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cal .col { display: none; }
.cal .col.sel { display: block; }
.col-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.col-h b { font-size: 16px; }
.col-h .off-btn { margin-left: auto; }
.slots { display: grid; gap: 6px; }
.slot { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 10px 12px; min-height: 56px; border: 1px solid var(--line); }
.slot .tm { width: 52px; flex: none; font-weight: 800; font-variant-numeric: tabular-nums; }
.slot .what { flex: 1; min-width: 0; }
.slot .what .nm { font-weight: 800; }
.slot .what .nm button { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #ccc; }
.slot .what .sub { font-size: 13px; color: var(--sub); }
.slot .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.slot.free { background: transparent; border-style: dashed; }
.slot.free .what { color: var(--faint); font-weight: 600; }
.slot.blocked { background: repeating-linear-gradient(-45deg, #f2f2f4 0 8px, #e9e9ec 8px 16px); }
.slot.blocked .what { color: var(--sub); font-weight: 700; }
.slot.req { border-color: var(--orange); background: var(--orange-l); }
.slot.ok { border-left: 5px solid var(--purple); }
.slot.ok.first { border-left-color: var(--sky); }
.slot.noshow { border-left: 5px solid var(--red); opacity: .8; }
.slot.past { opacity: .62; }
.slot.past.ok { opacity: .8; }
.day-off { text-align: center; padding: 28px 12px; color: var(--sub); background: repeating-linear-gradient(-45deg, #f2f2f4 0 8px, #e9e9ec 8px 16px); border-radius: 12px; font-weight: 700; }
@media (min-width: 1000px) {
  .cal { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
  .cal .col { display: block; }
  .cal .col.sel .col-h b { color: var(--purple); }
  .wstrip { display: none; }
  .slot { flex-direction: column; align-items: stretch; gap: 4px; padding: 8px; min-height: 0; }
  .slot .tm { width: auto; font-size: 13px; }
  .slot .acts { justify-content: flex-start; }
  .slot .acts .btn { min-height: 30px; padding: 0 8px; font-size: 12.5px; }
  .col-h { flex-wrap: wrap; }
  .col-h .off-btn { margin-left: 0; }
}

/* 요청 대기 */
.req-card { border: 2px solid var(--orange); }
.req-card .list li { flex-wrap: wrap; }

/* 회원 목록 */
.flags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.flag { border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 800; border: 0; cursor: pointer; background: #fff; }
.flag.away { color: var(--red); }
.flag.low { color: var(--orange); }
.flag.none { color: var(--sub); }
.flag[aria-pressed="true"] { background: var(--ink); color: #fff; }
.mrow .left { text-align: right; flex: none; }
.mrow .left b { font-size: 20px; font-variant-numeric: tabular-nums; }
.mrow .left small { display: block; font-size: 12px; color: var(--sub); }
.mrow .left.low b { color: var(--orange); }
.mrow .left.zero b { color: var(--red); }
.tag-away { color: var(--red); font-weight: 800; }
.tag-low { color: var(--orange); font-weight: 800; }

/* 회원 상세 */
.mhead { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
.mhead .grow { flex: 1; }
.mhead .nm { font-size: 22px; font-weight: 800; }
.plus { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 4px; }
.hist { font-size: 14px; }
.hist li { padding: 8px 0; }

/* 사장님 한눈에 */
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.total { background: #fff; border-radius: var(--r); padding: 14px; }
.total small { display: block; font-size: 13px; color: var(--sub); font-weight: 700; }
.total b { font-size: 30px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.total.red b { color: var(--red); }
.total.orange b { color: var(--orange); }
.total.purple b { color: var(--purple); }
@media (min-width: 900px) { .totals { grid-template-columns: repeat(6, 1fr); } }
.trow-m { background: #fff; border-radius: var(--r); padding: 14px; margin-bottom: 10px; display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; cursor: pointer; text-align: left; border: 0; width: 100%; }
.trow-m:hover { box-shadow: 0 0 0 2px var(--purple-l); }
.trow-m .av { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--purple); border: 2px solid var(--ink); display: grid; place-items: center; color: #fff; font-family: var(--hand); }
.trow-m .av img { width: 100%; height: 100%; object-fit: cover; }
.trow-m .nm { font-weight: 800; font-size: 17px; }
.trow-m .stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--sub); margin-top: 2px; }
.trow-m .stats b { color: var(--text); }
.trow-m .stats .r b { color: var(--red); }
.trow-m .stats .o b { color: var(--orange); }
.trow-m .stats .w b { color: var(--orange); }
.trow-m .go { color: var(--faint); font-size: 22px; }
.tl { grid-column: 1 / -1; position: relative; height: 22px; background: #f0f0f2; border-radius: 6px; overflow: hidden; }
.tl .hrs { position: absolute; top: 0; bottom: 0; background: #e3e3e8; }
.tl .ls { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; background: var(--purple); }
.tl .ls.requested { background: var(--orange); }
.tl .ls.noshow { background: var(--red); }
.tl .ls.first { background: var(--sky); }
.tl .bk { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, #d0d0d6 0 4px, transparent 4px 8px); }
.tl-axis { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: -8px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; margin-top: 14px; }

/* 요일별 시간 */
.hours-row { display: grid; grid-template-columns: 44px 52px 1fr 1fr; gap: 8px; align-items: center; padding: 6px 0; }
.hours-row b { font-size: 16px; }
.hours-row input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--purple); }
.hours-row .in { min-height: 42px; padding: 6px 8px; font-size: 16px; }

.foot { text-align: center; color: var(--faint); font-size: 13px; padding: 30px 0 50px; }
.foot a { color: var(--sub); }
