:root {
  --ivory: #F7F1E6; --paper: #FFFDF8; --bar: #FBF7EF; --cream: #EFE6D6; --line: #E5D9C9; --full: #E3DDD4;
  --wine: #7A1E33; --wine-d: #55121F; --wine-t: #F3E2E1;
  --ink: #2B1F22; --mute: #8B7C76; --soft: #B3A59F;
  --sage: #4E6A55; --sage-t: #E3EBE1; --amber: #94600F; --amber-t: #F6E7CB;
  --serif: 'Gowun Batang', 'AppleMyungjo', serif;
  --sans: 'IBM Plex Sans KR', -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --band: 34px; --h: 32px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: #E8DECE; color: var(--ink); font: 15px/1.5 var(--sans); word-break: keep-all; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }

.demo { height: var(--band); background: #111418; color: #C9CCD1; font-size: 13px; line-height: 18px; text-align: center; padding: 8px 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 20; }
.demo a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.demo b { color: #FF5A36; font-family: Menlo, monospace; }

/* 무대: 데스크톱은 가운데 폰 + 양옆 설명 */
.stage { min-height: calc(100vh - var(--band)); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 56px; align-items: center; padding: 24px 40px; }
/* 휴대폰 기기: 390×844 화면을 그대로 두고 창이 낮으면 통째로 줄인다(app.js fit) */
.device { position: relative; zoom: var(--s, 1); padding: 12px; background: #15100F; border-radius: 62px; box-shadow: inset 0 0 0 1.5px #3B3234, 0 0 0 2px #8C807B, 0 0 0 3.5px #2B2325, 0 50px 90px -35px rgba(70, 30, 38, .5); }
.device::before { content: ''; position: absolute; left: -5.5px; top: 150px; width: 3px; height: 188px; border-radius: 2px 0 0 2px; background: linear-gradient(to bottom, #7A6D69 0 28px, transparent 28px 60px, #7A6D69 60px 116px, transparent 116px 132px, #7A6D69 132px 188px); }
.device::after { content: ''; position: absolute; right: -5.5px; top: 250px; width: 3px; height: 92px; border-radius: 0 2px 2px 0; background: #7A6D69; }
.phone { width: 390px; height: 844px; border-radius: 50px; overflow: hidden; position: relative; background: var(--ivory); display: flex; flex-direction: column; isolation: isolate; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.phone input, .phone textarea, .phone select { -webkit-user-select: text; user-select: text; }

.side { max-width: 300px; font-size: 14px; color: #5D4F4B; }
.side-l { justify-self: end; }
.side-r { justify-self: start; max-width: 250px; }
.side-brand { display: flex; align-items: center; gap: 8px; }
.side-brand b { font: 700 24px/1 var(--serif); color: var(--wine); }
.side-brand span { font-size: 13px; color: var(--mute); border: 1px solid #D3C5B3; border-radius: 99px; padding: 1px 8px; margin-left: 2px; }
.side-lead { margin-top: 14px; line-height: 1.65; }
.side-role { margin-top: 22px; display: inline-flex; background: #DED2BF; border-radius: 10px; padding: 3px; }
.side-role a { padding: 6px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; color: #6E5F59; }
.side-role a.on { background: var(--paper); color: var(--wine); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.side-desc { margin-top: 26px; border-top: 1px solid #D3C5B3; padding-top: 18px; }
.side-desc small { font-size: 12px; letter-spacing: .08em; color: var(--mute); }
.side-desc h3 { font: 700 21px/1.3 var(--serif); color: var(--ink); margin: 4px 0 8px; }
.side-desc p { line-height: 1.65; }
.side-desc.mid { display: none; margin: 0 0 22px; border: 0; padding: 0; }
.side-h { font-size: 12px; letter-spacing: .08em; color: var(--mute); font-weight: 600; }
.jump { margin-top: 10px; display: grid; }
.jump h4 { font-size: 12px; color: var(--soft); font-weight: 500; margin: 12px 0 2px; }
.jump a { padding: 6px 10px; margin: 0 -10px; border-radius: 8px; color: #5D4F4B; display: flex; justify-content: space-between; }
.jump a:hover { background: #E0D5C3; }
.jump a.on { background: var(--wine); color: #fff; }
.jump a code { font: 11px Menlo, monospace; opacity: .55; align-self: center; }
.side-reset { margin-top: 20px; border: 1px solid #CDBFAC; border-radius: 10px; padding: 8px 14px; font-size: 14px; color: #5D4F4B; }
.side-reset:hover { background: #E0D5C3; }
.side-note { margin-top: 10px; font-size: 12px; color: var(--mute); }

@media (max-width: 1159px) {
  .stage { grid-template-columns: auto minmax(0, 260px); justify-content: center; gap: 44px; }
  .side-l { display: none; }
  .side-desc.mid { display: block; }
}

/* 폰 상단·하단 (데스크톱 프레임에만) */
.statusbar { height: 54px; flex: none; display: grid; grid-template-columns: 1fr 126px 1fr; align-items: center; padding: 0 10px; font-weight: 600; letter-spacing: -.01em; position: relative; z-index: 6; background: var(--ivory); }
.sb-time { justify-self: center; font-size: 17px; font-family: -apple-system, 'SF Pro Text', var(--sans); font-variant-numeric: tabular-nums; }
.island { width: 126px; height: 37px; border-radius: 20px; background: #0A0708; justify-self: center; }
.sb-r { justify-self: center; display: flex; align-items: center; gap: 6px; }
.wifi { display: block; }
.sig { display: flex; align-items: flex-end; gap: 1.5px; height: 11px; }
.sig i { width: 3px; background: currentColor; border-radius: 1px; }
.sig i:nth-child(1) { height: 4px; } .sig i:nth-child(2) { height: 6px; } .sig i:nth-child(3) { height: 8.5px; } .sig i:nth-child(4) { height: 11px; }
.bat { width: 24px; height: 12px; border: 1.5px solid rgba(43,31,34,.45); border-radius: 4px; position: relative; padding: 1.5px; display: block; }
.bat::before { content: ''; display: block; height: 100%; width: 78%; background: var(--ink); border-radius: 1.5px; }
.bat::after { content: ''; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; background: rgba(43,31,34,.45); border-radius: 0 1px 1px 0; }
.homebar { flex: none; height: 22px; background: var(--bar); display: grid; place-items: center; }
.homebar i { width: 134px; height: 5px; border-radius: 3px; background: var(--ink); opacity: .85; }

@media (max-width: 719px) {
  body { background: var(--ivory); overflow: hidden; }
  .stage { display: block; padding: 0; min-height: 0; }
  .side { display: none; }
  .device { zoom: 1; padding: 0; background: none; border-radius: 0; box-shadow: none; }
  .device::before, .device::after { display: none; }
  .phone { width: 100%; height: calc(100vh - var(--band)); height: calc(100dvh - var(--band)); border-radius: 0; }
  .statusbar, .homebar { display: none; }
  .tabbar { height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
}

/* 화면 틀 */
/* 화면 전환: 새 화면이 오른쪽에서 밀려 들어오고 이전 화면(.ghost)은 왼쪽으로 물러난다 */
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; z-index: 1; background: var(--ivory); }
.view.push { animation: push .36s cubic-bezier(.2, .85, .25, 1); box-shadow: -10px 0 28px rgba(43, 31, 34, .10); }
.view.pop { animation: pop .32s cubic-bezier(.2, .85, .25, 1); }
.view.tabsw { animation: fade .16s ease-out; }
@keyframes push { from { transform: translateX(100%); } }
@keyframes pop { from { transform: translateX(-30%); } }
.ghost { position: absolute; left: 0; right: 0; z-index: 0; pointer-events: none; }
.ghost.push { animation: ghost-out .36s cubic-bezier(.2, .85, .25, 1) forwards; }
.ghost.pop { z-index: 2; box-shadow: -10px 0 28px rgba(43, 31, 34, .10); animation: ghost-away .32s cubic-bezier(.2, .85, .25, 1) forwards; }
@keyframes ghost-out { to { transform: translateX(-30%); filter: brightness(.95); } }
@keyframes ghost-away { to { transform: translateX(100%); } }

/* 내비게이션 바: 뿌리 화면은 큰 제목, 내리면 가운데 작은 제목과 바 */
.nav { height: 44px; flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; padding: 0 8px; position: relative; z-index: 3; border-bottom: .5px solid transparent; transition: background-color .2s, border-color .2s; }
.nav.solid { background: var(--ivory); border-bottom-color: var(--line); }
.nav-t { font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.nav.lg .nav-t { opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s; }
.nav.lg.solid .nav-t { opacity: 1; transform: none; }
.back { justify-self: start; display: inline-flex; align-items: center; height: 44px; padding-right: 8px; color: var(--wine); font-size: 17px; white-space: nowrap; }
.back svg { width: 28px; height: 28px; margin-right: -2px; }
.back:active, .nav-r a:active, .nav-r button:active { opacity: .45; }
.nav-r { justify-self: end; display: flex; align-items: center; gap: 2px; padding-right: 6px; font-size: 15px; color: var(--wine); }
.nav-ic { width: 36px; height: 36px; display: grid; place-items: center; color: var(--wine); }
.nav-btn { padding: 0 8px; height: 36px; display: grid; place-items: center; font-size: 16px; color: var(--wine); }
.loc { font-size: 13px; color: var(--mute); padding-right: 8px; }
.scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 20px 28px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroll::-webkit-scrollbar, .sheet::-webkit-scrollbar { display: none; }
.large { font: 700 32px/1.2 var(--serif); letter-spacing: -.01em; margin: 0 0 14px; display: flex; align-items: baseline; gap: 10px; }
.large small { font: 500 14px var(--sans); color: var(--mute); }
.large .logo { font-size: 32px; gap: 9px; }
.large .logo-mark { width: 16px; height: 22px; border-radius: 8px 8px 5px 5px; }
.large .logo small { font-size: 11px; }
.cta { flex: none; padding: 12px 20px; background: var(--bar); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.cta-t { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.cta-t b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta-t small { font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta-t.muted { color: var(--mute); }
.cta .btn { flex: none; }
.cta .btn.wide { flex: 1; }

/* 하단 탭바 */
.tabbar { flex: none; height: 58px; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bar); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 500; color: #A5968F; position: relative; }
.tab.on { color: var(--wine); }
.tab svg { width: 25px; height: 25px; }
.tab .dot { position: absolute; top: 5px; left: calc(50% + 7px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--amber); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bar); }

/* 공통 부품 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 50px; padding: 0 22px; border-radius: 14px; background: var(--wine); color: #fff; font-weight: 600; font-size: 16px; white-space: nowrap; }
.btn:active { background: var(--wine-d); }
.btn:disabled, .btn[aria-disabled="true"] { background: #D8CCC4; color: #FBF7F2; }
.btn.sm { height: 46px; padding: 0 20px; font-size: 15px; }
.btn.line { background: transparent; color: var(--wine); box-shadow: inset 0 0 0 1.5px #D9C4BF; }
.btn.line:disabled { color: var(--soft); box-shadow: inset 0 0 0 1.5px var(--line); background: transparent; }
.btn.danger { background: #8E2A2A; }
.btn.line.danger { background: transparent; color: #8E2A2A; box-shadow: inset 0 0 0 1.5px #E2BDB8; }
.btn.block { display: flex; width: 100%; }
.sec { font-size: 13px; font-weight: 600; color: var(--mute); margin: 26px 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sec small { font-weight: 400; }
.sec a { color: var(--wine); font-weight: 600; }
.hint { font-size: 13px; color: var(--mute); }
.err-msg { color: #A3262A; font-size: 13px; font-weight: 500; margin-top: 6px; }
.empty { text-align: center; padding: 44px 10px; color: var(--mute); }
.empty b { display: block; font: 700 18px var(--serif); color: var(--ink); margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.card + .card { margin-top: 12px; }
.card-t { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--wine-t); color: var(--wine); }
.badge.now { background: var(--wine); color: #fff; }
.badge.check { background: var(--amber-t); color: var(--amber); }
.badge.done { background: var(--sage-t); color: var(--sage); }
.badge.ns { background: #E4DFDB; color: #5B504C; }
.badge.cx { background: transparent; color: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--cream); border-radius: 11px; padding: 3px; }
.seg > * { height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; font-weight: 500; color: #6E5F59; white-space: nowrap; }
.seg > .on { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(60, 35, 30, .12); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-size: 13.5px; color: #5D4F4B; display: inline-flex; align-items: center; gap: 4px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip em { font-style: normal; opacity: .6; font-size: 12px; }
textarea, input[type="text"], input[type="search"], input[type="date"], input:not([type]), select { width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 11px 13px; font-size: 15px; }
textarea { resize: none; min-height: 76px; line-height: 1.5; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--wine); outline-offset: -1px; border-color: transparent; }
.field-err { outline: 2px solid #C0474A !important; outline-offset: -1px; border-color: transparent !important; }
.count { font-size: 12px; color: var(--soft); text-align: right; margin-top: 4px; }

/* 손톱 견본 칩: 사진 대신 색 */
.nail { --c: #B98A8C; display: inline-block; flex: none; width: 20px; height: 26px; border-radius: 10px 10px 7px 7px; background: var(--c); position: relative; box-shadow: inset 0 -3px 0 rgba(0,0,0,.07), inset 0 0 0 1px rgba(60,30,30,.10); }
.nail::after { content: ''; position: absolute; left: 25%; top: 16%; width: 16%; height: 34%; border-radius: 3px; background: rgba(255,255,255,.38); }
.nail.grad { background: linear-gradient(to bottom, var(--c) 18%, #EFDDD0 88%); }
.nail.french { --c: #FBF8F2; background: radial-gradient(ellipse 72% 80% at 50% 100%, #EBCFC2 0 98%, var(--c) 100%); }
.nail.art { background: radial-gradient(circle at 62% 34%, #F6E8D2 0 1.6px, transparent 2.2px), radial-gradient(circle at 36% 58%, #F6E8D2 0 1.2px, transparent 1.8px), linear-gradient(115deg, transparent 0 62%, #D9B46A 62% 67%, transparent 67%), var(--c); }
.nail.bare { background: #F1E5DA; box-shadow: inset 0 0 0 1.5px #CDB9A9; }
.nail.bare::after { display: none; }
.nail.care { background: linear-gradient(to bottom, #F7EDE6 0 22%, #EBCFC2 22%); }
.nail.lg { width: 34px; height: 44px; border-radius: 17px 17px 11px 11px; }

/* 로고 */
.logo { display: inline-flex; align-items: center; gap: 7px; font: 700 22px/1 var(--serif); color: var(--wine); }
.logo small { font: 600 9.5px/1 var(--sans); letter-spacing: .28em; color: var(--mute); margin-left: 1px; }
.logo-mark { display: inline-block; width: 12px; height: 16px; border-radius: 6px 6px 4px 4px; background: var(--wine); }

/* 홈 */
.hello { font: 400 21px/1.45 var(--serif); margin: 0 0 14px; }
.hello b { color: var(--wine); font-weight: 700; }
.home-cta { margin-top: 12px; }
.days { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 4px; scrollbar-width: none; }
.days::-webkit-scrollbar, .dates::-webkit-scrollbar, .palette-row::-webkit-scrollbar { display: none; }
.day-card { flex: none; width: 66px; border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 9px 0 8px; display: grid; justify-items: center; gap: 1px; }
.day-card small { font-size: 12px; color: var(--mute); }
.day-card b { font: 700 22px/1.2 var(--serif); }
.day-card em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--wine); }
.day-card.closed { background: transparent; border-style: dashed; }
.day-card.closed b, .day-card.closed em { color: var(--soft); }
.palette-row { display: flex; gap: 14px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px; scrollbar-width: none; }
.pc { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: #5D4F4B; width: 64px; flex: none; text-align: center; line-height: 1.3; }

/* 티켓 (예약 요약) */
.ticket { display: grid; grid-template-columns: 72px 1fr auto; align-items: stretch; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; position: relative; color: inherit; }
.ticket::before, .ticket::after { content: ''; position: absolute; left: 63px; width: 18px; height: 18px; border-radius: 50%; background: var(--ivory); border: 1px solid var(--line); }
.ticket::before { top: -10px; clip-path: inset(50% 0 0 0); }
.ticket::after { bottom: -10px; clip-path: inset(0 0 50% 0); }
.t-date { border-right: 1.5px dashed var(--line); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 12px 0; }
.t-date small { font-size: 12px; color: var(--mute); }
.t-date b { font: 700 30px/1.1 var(--serif); color: var(--wine); }
.t-date span { font-size: 12px; }
.t-body { padding: 13px 14px; display: grid; gap: 1px; min-width: 0; align-content: center; }
.t-body b { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.t-body span { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-body small { color: var(--mute); font-size: 13px; }
.t-nail { display: grid; place-items: center; padding-right: 16px; }
.tickets { display: grid; gap: 12px; }

/* 예약 단계 */
.steps { display: flex; gap: 6px; margin: 2px 0 6px; list-style: none; font-size: 12.5px; color: var(--soft); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps li + li::before { content: ''; width: 14px; height: 1px; background: var(--line); }
.steps li.on { color: var(--wine); font-weight: 600; }
.steps li.done { color: var(--mute); }
.svc-list { display: grid; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.svc { display: grid; grid-template-columns: 30px 1fr auto 22px; align-items: center; gap: 12px; padding: 13px 14px; text-align: left; }
.svc + .svc { border-top: 1px solid var(--line); }
.svc-t { display: grid; min-width: 0; }
.svc-t b { font-weight: 600; font-size: 15.5px; }
.svc-t small { color: var(--mute); font-size: 13px; }
.svc-p { font-size: 14.5px; font-weight: 500; }
.tick { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #D3C4B6; position: relative; }
.svc.on { background: #FBF0EE; }
.svc.on .tick { background: var(--wine); box-shadow: none; }
.svc.on .tick::after { content: ''; position: absolute; left: 7.5px; top: 4.5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.svc:disabled { opacity: .45; }
.svc:disabled .svc-t small::after { content: ' · 젤 시술에 포함'; }
.palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 8px 14px; }
.palette .pc { width: auto; }
.pc .nail { transition: transform .15s; }
.pc.on .nail { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--wine); }
.pc.on span { color: var(--wine); font-weight: 600; }
.color-skip { margin-top: 10px; }

/* 디자이너·날짜·시간 */
.pick-sum { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.pick-sum div { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.pick-sum b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-sum small { color: var(--mute); font-size: 13px; }
.pick-sum a { color: var(--wine); font-size: 13.5px; font-weight: 600; }
.who { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.who-b { display: grid; justify-items: center; gap: 2px; padding: 10px 2px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); text-align: center; }
.who-b b { font-size: 13.5px; font-weight: 600; }
.who-b small { font-size: 11.5px; color: var(--mute); line-height: 1.3; }
.ava { width: 40px; height: 40px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; font: 700 14px var(--serif); color: var(--wine-d); font-style: normal; margin-bottom: 4px; }
.ava.any { background: transparent; box-shadow: inset 0 0 0 1.5px #D3C4B6; color: var(--mute); font: 500 12px var(--sans); }
.who-b.on { border-color: var(--wine); background: #FBF0EE; box-shadow: inset 0 0 0 1px var(--wine); }
.who-b.on .ava { background: var(--wine); color: #fff; }
.who-b.on .ava.any { box-shadow: none; }
.dates { position: relative; display: flex; gap: 6px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 4px; scrollbar-width: none; }
.date { flex: none; width: 50px; height: 70px; border-radius: 14px; display: grid; justify-items: center; align-content: center; gap: 0; background: var(--paper); border: 1px solid var(--line); }
.date small { font-size: 12px; color: var(--mute); }
.date b { font: 700 20px/1.25 var(--serif); }
.date em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--soft); height: 14px; }
.date.on { background: var(--wine); border-color: var(--wine); color: #fff; }
.date.on small, .date.on em { color: #F1D6D6; }
.date.off { background: transparent; border-style: dashed; }
.date.off b, .date.off small { color: var(--soft); }
.date.none b { color: var(--soft); }
.month { font: 700 15px var(--serif); color: var(--ink); }
.slot-h { font-size: 12.5px; color: var(--mute); margin: 16px 0 8px; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.slot { height: 42px; border-radius: 11px; border: 1px solid #DCCDBD; background: var(--paper); font-size: 15px; font-weight: 500; text-align: center; font-variant-numeric: tabular-nums; }
.slot.full { background: var(--full); border-color: var(--full); color: #A69A93; }
.slot.short { background: repeating-linear-gradient(-45deg, var(--paper) 0 5px, #ECE3D8 5px 7px); border-color: #E2D6C8; color: #A69A93; }
.slot.on { background: var(--wine); border-color: var(--wine); color: #fff; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--mute); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid #DCCDBD; background: var(--paper); }
.legend i.full { background: var(--full); border-color: var(--full); }
.legend i.short { background: repeating-linear-gradient(-45deg, var(--paper) 0 3px, #E2D6C8 3px 5px); }
.now-note { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--cream); font-size: 13.5px; }

/* 결제 */
.receipt { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px; }
.receipt > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 14.5px; }
.receipt > div + div { border-top: 1px solid var(--line); }
.receipt span { color: var(--mute); }
.receipt .sub { padding-top: 0; border-top: 0 !important; margin-top: -6px; font-size: 13px; }
.receipt .total b { font-size: 18px; color: var(--wine); }
.receipt .minus { color: var(--wine); }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; }
.toggle-row span { display: grid; line-height: 1.4; }
.toggle-row small { font-size: 13px; color: var(--mute); }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 50px; height: 30px; border-radius: 15px; background: #DDD2C6; position: relative; cursor: pointer; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch:checked { background: var(--wine); }
.switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: .5; }
.demo-pay { margin-top: 10px; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: #6E5F59; background: var(--cream); padding: 10px 12px; border-radius: 12px; }
.demo-pay b { flex: none; font-size: 11px; background: var(--ink); color: #fff; padding: 1px 6px; border-radius: 4px; margin-top: 1px; }
.policy { list-style: none; display: grid; gap: 6px; font-size: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.policy li { padding-left: 14px; position: relative; }
.policy li::before { content: ''; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--wine); }
.agree { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 15px; font-weight: 500; cursor: pointer; }
.agree input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid #CDBFAF; background: var(--paper); flex: none; display: grid; place-items: center; cursor: pointer; }
.agree input:checked { background: var(--wine); border-color: var(--wine); }
.agree input:checked::after { content: ''; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.agree.bad input { border-color: #C0474A; box-shadow: 0 0 0 3px #F4D9D7; }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* 완료 */
.done-top { text-align: center; padding: 22px 0 18px; }
.done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--wine); margin: 0 auto 14px; position: relative; }
.done-mark::after { content: ''; position: absolute; left: 24px; top: 15px; width: 13px; height: 25px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.done-top h2 { font: 700 26px var(--serif); }
.done-top p { color: var(--mute); margin-top: 4px; font-size: 14px; font-variant-numeric: tabular-nums; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }

/* 내 예약·상세 */
.my-seg { margin-bottom: 16px; }
.hist { display: grid; gap: 10px; }
.h-row { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 12px; align-items: start; }
.h-row .nail { margin-top: 3px; }
.h-row b { font-size: 15px; font-weight: 600; display: block; }
.h-row small { font-size: 13px; color: var(--mute); display: block; }
.h-amt { text-align: right; font-size: 14px; font-weight: 500; }
.h-amt small { color: var(--sage); font-weight: 600; }
.h-act { grid-column: 2 / -1; display: flex; gap: 8px; margin-top: 8px; }
.h-act .btn { height: 36px; font-size: 13.5px; padding: 0 14px; border-radius: 10px; }
.state-bar { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; font-size: 14px; }
/* 목록 셀: 왼쪽 항목, 오른쪽 값 */
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0; font-size: 15px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; margin-top: 12px; }
.kv dt, .kv dd { padding: 12px 0; }
.kv dt { color: var(--mute); white-space: nowrap; padding-right: 18px; }
.kv dd { min-width: 0; text-align: right; }
.kv dt ~ dt, .kv dt ~ dt + dd { border-top: 1px solid var(--line); }
.kv dd small { display: block; color: var(--mute); font-size: 13px; }
.kv .ln { display: flex; justify-content: space-between; gap: 12px; text-align: left; }
.kv .ln + .ln { margin-top: 4px; }
.kv .with-nail { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.kv .with-nail .nail { width: 15px; height: 20px; }
.rule-note { margin-top: 12px; font-size: 13.5px; padding: 12px 14px; border-radius: 12px; background: var(--cream); color: #5D4F4B; }
.rule-note.warn { background: var(--amber-t); color: #6D4A10; }
.act-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }

/* 마이 */
.me-card { display: flex; align-items: center; gap: 14px; }
.me-card .ava { width: 52px; height: 52px; font-size: 16px; margin: 0; }
.me-card b { font-size: 18px; }
.me-card small { display: block; color: var(--mute); font-size: 13px; }
.pt-big { font: 700 32px/1.2 var(--serif); color: var(--wine); margin-top: 2px; }
.ledger { margin-top: 12px; border-top: 1px solid var(--line); }
.ledger div { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; padding: 9px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.ledger div:last-child { border-bottom: 0; }
.ledger time { color: var(--mute); font-variant-numeric: tabular-nums; }
.ledger span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ledger b.plus { color: var(--sage); }
.fav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 16px 8px; }
.fav span { display: grid; justify-items: center; align-content: start; gap: 6px; font-size: 12px; color: #5D4F4B; text-align: center; line-height: 1.3; }
.fav .hint { grid-column: 1 / -1; }
.rows { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 12px; }
.rows > * { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 14px 16px; font-size: 15px; }
.rows > * + * { border-top: 1px solid var(--line); }
.rows svg { color: var(--soft); }

/* 원장: 오늘 타임라인 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.stats div { padding: 9px 0 8px; text-align: center; display: grid; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { font: 700 19px/1.2 var(--serif); font-variant-numeric: tabular-nums; }
.stats small { font-size: 11.5px; color: var(--mute); }
.sales { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--mute); margin: 8px 2px 0; }
.sales b { color: var(--ink); font-weight: 600; }
.alert { margin-top: 12px; display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border-radius: 12px; background: var(--amber-t); color: #6D4A10; font-size: 14px; font-weight: 500; text-align: left; }
.alert b { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--amber); color: #fff; font-size: 12px; display: grid; place-items: center; }
.alert span { flex: 1; }
.tl { margin: 14px -20px 0; }
.tl-head, .tl-body { display: grid; grid-template-columns: 44px repeat(3, minmax(0, 1fr)); padding-right: 10px; }
.tl-head { position: sticky; top: 0; z-index: 3; background: var(--ivory); border-bottom: 1px solid var(--line); padding-top: 6px; padding-bottom: 8px; }
.tl-head div { text-align: center; font-size: 13px; font-weight: 600; line-height: 1.25; }
.tl-head small { display: block; font-size: 11px; font-weight: 400; color: var(--mute); }
.tl-body { position: relative; height: calc(20 * var(--h) + 16px); padding-top: 8px; }
.tl-times { position: relative; }
.tl-times span { position: absolute; right: 7px; font-size: 10.5px; color: var(--mute); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.tl-col { position: relative; border-left: 1px solid var(--line); height: calc(20 * var(--h)); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(#EFE7DB 1px, transparent 1px); background-size: 100% calc(var(--h) * 2), 100% var(--h); }
.tl-col.off { background: repeating-linear-gradient(-45deg, transparent 0 6px, #ECE3D7 6px 8px); display: grid; place-items: center; color: var(--mute); font-size: 13px; }
.blk { position: absolute; left: 3px; right: 3px; border-radius: 7px; padding: 3px 6px; font-size: 11.5px; line-height: 1.3; overflow: hidden; background: var(--wine-t); border-left: 3px solid var(--wine); text-align: left; display: flex; flex-direction: column; justify-content: flex-start; }
.blk b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk span { display: block; color: #6E5F59; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.now { background: var(--wine); color: #fff; border-left-color: var(--wine-d); }
.blk.now span { color: #F1D6D6; }
.blk.check { background: var(--amber-t); border-left-color: var(--amber); }
.blk.done { background: var(--sage-t); border-left-color: var(--sage); }
.blk.ns { background: repeating-linear-gradient(-45deg, #EFEAE5 0 5px, #E4DDD6 5px 7px); border-left-color: #8F837E; color: #7A6E69; }
.blk.ns b { text-decoration: line-through; }
.blk.short-b { padding-top: 1px; }
.blk.short-b span { display: none; }
.nowline { position: absolute; left: 40px; right: 10px; height: 2px; background: #C2402F; z-index: 2; pointer-events: none; }
.nowline::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #C2402F; }
.nowline span { position: absolute; left: -40px; top: -8px; width: 34px; text-align: right; font-size: 10.5px; font-weight: 700; color: #C2402F; background: var(--ivory); }
.closed-day { margin-top: 18px; }

/* 원장: 예약 목록 */
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--soft); }
.search input { padding-left: 38px; }
.ol-tools { display: grid; gap: 10px; margin-bottom: 6px; }
.ol-tools .chips { flex-wrap: nowrap; gap: 5px; }
.ol-tools .chip { padding: 0 10px; }
.ol-count { font-size: 13px; color: var(--mute); margin: 14px 0 0; }
.ol-date { font-size: 13px; font-weight: 600; color: var(--mute); margin: 18px 0 8px; display: flex; justify-content: space-between; }
.ol-group { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ol-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; width: 100%; text-align: left; }
.ol-row + .ol-row { border-top: 1px solid var(--line); }
.ol-time { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.ol-main { min-width: 0; display: grid; }
.ol-main b { font-size: 15px; font-weight: 600; }
.ol-main small { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
mark { background: #F6DCA0; color: inherit; border-radius: 2px; }

/* 원장: 휴무 */
.wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wk-d { height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; font-weight: 500; text-align: center; }
.wk-d.on { background: var(--wine); border-color: var(--wine); color: #fff; }
.wk.sm .wk-d { height: 32px; font-size: 13px; border-radius: 8px; }
.wk-d.shop { background: repeating-linear-gradient(-45deg, transparent 0 4px, #ECE3D7 4px 6px); color: var(--soft); border-style: dashed; }
.dz-row { padding: 12px 0; }
.dz-row + .dz-row { border-top: 1px solid var(--line); }
.dz-n { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.dz-n b { font-size: 15px; font-weight: 600; }
.dz-n small { font-size: 12.5px; color: var(--mute); }
.warn-t { margin-top: 8px; font-size: 13px; color: var(--amber); font-weight: 500; }
.off-list { display: grid; }
.off-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.off-item b { font-size: 15px; font-weight: 600; }
.off-item small { display: block; font-size: 13px; color: var(--mute); }
.off-item small.warn-t { color: var(--amber); margin: 0; }
.off-item button { font-size: 13px; color: #8E2A2A; padding: 6px 10px; border-radius: 8px; border: 1px solid #E2BDB8; }
.off-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.off-form .btn { grid-column: 1 / -1; height: 44px; }

/* 시트 모달 */
.sheet-wrap { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-bg { position: absolute; inset: 0; background: rgba(43, 31, 34, .42); animation: fade .2s ease-out; }
.sheet { position: relative; background: var(--paper); border-radius: 24px 24px 0 0; padding: 8px 20px 26px; max-height: 90%; overflow-y: auto; animation: up .3s cubic-bezier(.2, .85, .25, 1); box-shadow: 0 -10px 30px rgba(43, 31, 34, .12); }
.sheet-wrap.out .sheet-bg { animation: fade .18s reverse forwards; }
.sheet-wrap.out .sheet { animation: down .2s ease-in forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
.grab { width: 38px; height: 5px; border-radius: 3px; background: #DCD0C2; margin: 0 auto 14px; }
.sheet h3 { font: 700 21px/1.35 var(--serif); }
.sheet .sub-t { color: var(--mute); font-size: 14px; margin-top: 2px; }
.sheet .kv { background: var(--ivory); border-color: transparent; }
.sheet-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 18px; }
.sheet-btns.even { grid-template-columns: 1fr 1fr; }
.sheet .btn.block { margin-top: 18px; }
.refund { margin-top: 14px; padding: 14px; border-radius: 14px; display: grid; gap: 2px; }
.refund.ok { background: var(--sage-t); color: #2F4A36; }
.refund.no { background: var(--amber-t); color: #6D4A10; }
.refund b { font-size: 16px; }
.refund small { font-size: 13px; opacity: .85; }
.sheet label.f { display: grid; gap: 6px; margin-top: 14px; font-size: 14px; font-weight: 500; }
.os-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.os-head small { color: var(--mute); font-size: 14px; font-variant-numeric: tabular-nums; }
.os-tags { display: flex; gap: 6px; margin-top: 8px; }
.os-tags span { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--cream); color: #5D4F4B; }
.os-tags span.warn { background: #F4D9D7; color: #8E2A2A; font-weight: 600; }
.sheet .hint { margin-top: 14px; }
.paying { text-align: center; padding: 26px 0 14px; }
.spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--wine-t); border-top-color: var(--wine); margin: 0 auto 14px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.paying small { display: block; margin-top: 6px; color: var(--mute); font-size: 13px; }

.toast { position: absolute; left: 50%; bottom: 96px; transform: translate(-50%, 12px); background: rgba(43, 31, 34, .92); color: #fff; font-size: 14px; padding: 10px 16px; border-radius: 12px; z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; width: max-content; max-width: calc(100% - 40px); text-align: center; line-height: 1.45; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 누를 때 셀이 잠깐 어두워진다 */
.svc:not(:disabled):active, .rows > *:active, .ol-row:active, .ticket:active, .h-row:active, .who-b:active, .date:not(:disabled):active, .day-card:active, .alert:active { filter: brightness(.95); }
.btn:active { transform: scale(.985); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
