/* Kainchi app screens. Tokens live in tokens.css. */
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--ink); }
body { margin: 0; font: 400 15px/1.5 var(--font); letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; font-feature-settings: "ss01"; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 500; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.block { display: block; }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.stack > section { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
form.stack, .sheet .stack { gap: 18px; }
.h2 { font-size: 24px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; }
.sec-title { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sec-toggle { display: flex; justify-content: space-between; align-items: center; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }

/* shell */
.app { min-height: 100vh; padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.demo-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.brand { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand .eyebrow { letter-spacing: .08em; }
.brand h1 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.status.open i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.staff-btn { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500; cursor: pointer; }
.main { max-width: 560px; margin: 0 auto; padding-block: 24px 32px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); animation: rise .3s ease-out; }
@keyframes rise { from { transform: translateY(4px); opacity: .5; } to { transform: none; opacity: 1; } }
.foot { text-align: center; font-size: 11px; letter-spacing: .02em; color: var(--faint); padding-block: 0 20px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.tabs-inner { max-width: 560px; margin: 0 auto; display: grid; }
.tabs button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px 9px; border: 0; background: none; color: var(--faint); font-size: 11px; font-weight: 500; cursor: pointer; min-width: 0; position: relative; }
.tabs button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabs button.on { color: var(--ink); }
.tabs button.on::before { content: ""; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--accent); }
.boot { min-height: 70vh; display: grid; place-content: center; gap: 10px; text-align: center; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r-sm); padding: 11px 18px; font-weight: 500; cursor: pointer; text-decoration: none; text-align: center; transition: transform .1s, opacity .15s; }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn.block { width: 100%; min-height: 52px; }
.btn.sm { min-height: 38px; padding: 8px 14px; font-size: 14px; align-self: flex-start; }
.btn.xs { min-height: 32px; padding: 5px 12px; font-size: 13px; border-radius: 999px; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; flex: none; }
.link { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.row-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.lbl { font-size: 13px; font-weight: 500; color: var(--muted); }
.hint { font-size: 12px; color: var(--faint); }
input:not([type=checkbox]):not([type=file]), textarea, select, .search { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); min-width: 0; transition: border-color .15s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); }
input.pin { font-size: 28px; font-weight: 300; letter-spacing: .5em; text-align: center; }
.mini-select { width: auto !important; padding: 5px 10px !important; font-size: 13px; border-radius: 999px !important; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.toggle.tiny { font-size: 12px; gap: 6px; min-width: 76px; color: var(--muted); }
.toggle.tiny input { width: 15px; height: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 9px 14px; cursor: pointer; font-size: 14px; font-weight: 500; text-align: left; transition: border-color .15s, background .15s; }
.chip small { font-weight: 400; font-size: 12px; color: var(--muted); }
.chip.on { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.chip.on small { color: inherit; opacity: .65; }
.chip:disabled { opacity: .35; }
.pill { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.st-booked::before { background: var(--ink); }
.st-waiting { color: var(--warn); } .st-waiting::before { background: var(--warn); }
.st-in_chair { color: var(--accent); } .st-in_chair::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.st-done { color: var(--ok); } .st-done::before { background: var(--ok); }
.st-no_show { color: var(--bad); } .st-no_show::before { background: var(--bad); }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none; font-size: 13px; font-weight: 500; letter-spacing: .02em; background: var(--surface-2); color: var(--ink); }
.av-1 { background: var(--ink); color: var(--bg); }
.av-2 { background: var(--accent-soft); color: var(--accent); }
.av-3 { background: var(--surface-2); color: var(--muted); }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 28px 0; justify-content: center; font-size: 14px; }
.spin { width: 16px; height: 16px; border: 1.5px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { padding: 32px 20px; border-radius: var(--r); background: var(--surface); text-align: center; display: flex; flex-direction: column; gap: 6px; }
.empty strong { font-weight: 500; }
.empty p { color: var(--muted); font-size: 14px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 14px; max-width: min(92vw, 440px); text-align: center; animation: rise .2s ease-out; }
.toast.err { background: var(--bad); color: var(--surface); }

/* lists */
.list { list-style: none; margin: 0; padding: 0 16px; background: var(--surface); border-radius: var(--r); }
.item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line); min-width: 0; }
.item:first-child { border-top: 0; }
.item.compact { align-items: center; padding: 13px 0; }
.item.tap { cursor: pointer; align-items: center; }
.item.off { opacity: .45; }
.item-main { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.item-main strong { font-weight: 500; }
.item-main > span { overflow-wrap: anywhere; font-size: 14px; }
.item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; flex: none; }
.amt { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.when { width: 62px; flex: none; padding-top: 1px; }
.when .t { font-weight: 500; font-variant-numeric: tabular-nums; font-size: 14px; }
.tok { display: inline-grid; place-items: center; min-width: 36px; height: 28px; padding: 0 8px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; }
.tok.live { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.st-row-in_chair .when .tok, .st-row-in_chair .when .t { color: var(--accent); }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; }

/* customer home */
.hero-actions { display: grid; gap: 10px; }
.big-btn { display: flex; align-items: center; gap: 16px; text-align: left; padding: 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink); }
.big-btn span { display: flex; flex-direction: column; gap: 2px; }
.big-btn strong { font-size: 17px; font-weight: 500; letter-spacing: -0.015em; }
.big-btn small { color: var(--muted); font-size: 13px; }
.big-btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.big-btn.primary small { color: inherit; opacity: .6; }
.big-btn:disabled { opacity: .45; cursor: not-allowed; }
.next-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 18px 20px; border-radius: var(--r); border: 0; background: var(--accent-soft); cursor: pointer; color: var(--ink); }
.next-card strong { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.next-card .eyebrow { color: var(--accent); }
.next-card > span:last-child { font-size: 14px; color: var(--muted); }
.price-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.price-list li { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.price-list li:first-child { border-top: 0; }
.price-list .dots { flex: 1; min-width: 8px; }
.price-list .mins { color: var(--faint); font-size: 13px; white-space: nowrap; }
.price-list strong { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 72px; text-align: right; }
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.team li { display: flex; gap: 14px; align-items: center; }
.team li div { display: flex; flex-direction: column; gap: 1px; }
.team strong { font-weight: 500; }
.team li div > span:nth-child(2) { font-size: 14px; color: var(--muted); }
.hours { width: 100%; border-collapse: collapse; font-size: 14px; }
.hours th { text-align: left; font-weight: 400; color: var(--muted); padding: 5px 0; width: 38%; vertical-align: top; }
.hours td { padding: 5px 0; font-variant-numeric: tabular-nums; }
.hours tr.now th, .hours tr.now td { color: var(--ink); font-weight: 500; }
.visit { gap: 8px !important; }
.install { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 18px 20px; border-radius: var(--r); background: var(--surface); }
.install strong { font-weight: 500; }
.install p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.install-actions { display: flex; gap: 6px; }

/* loyalty card */
.punch { padding: 20px; border-radius: var(--r); background: var(--surface); }
.punch-head { display: flex; justify-content: space-between; align-items: baseline; }
.punch-head .num { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.holes { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin: 16px 0 12px; }
.hole { aspect-ratio: 1; max-width: 100%; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 0; color: transparent; }
.hole .ic { width: 55%; height: 55%; }
.hole.on { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.hole.last { border-color: var(--accent); border-style: dashed; }
.hole.last.on { background: var(--accent); border-style: solid; color: var(--on-accent); }
.punch-foot { font-size: 13px; color: var(--muted); }

/* booking */
.step { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.step span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); font-size: 11px; letter-spacing: 0; }
.svc-pick { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); padding: 0 16px; }
.svc { display: grid; grid-template-columns: 20px 1fr auto auto; gap: 12px; align-items: center; padding: 15px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.svc:first-child { border-top: 0; }
.svc .tick { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--faint); display: grid; place-items: center; transition: background .15s; }
.svc.on .tick { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.svc-name { font-weight: 400; min-width: 0; }
.svc.on .svc-name { font-weight: 500; }
.svc-meta { color: var(--faint); font-size: 13px; white-space: nowrap; }
.svc strong { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.total { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.total strong { color: var(--ink); font-weight: 500; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; margin-right: calc(-1 * max(20px, env(safe-area-inset-right, 0px))); scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 56px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; }
.day strong { font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.day small { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.day.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.day.on small { color: inherit; opacity: .6; }
.day:disabled { opacity: .3; cursor: not-allowed; }
.slot-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.slot { padding: 11px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: 14px; font-variant-numeric: tabular-nums; }
.slot.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 500; }
.sticky-cta { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 5; padding-top: 12px; background: linear-gradient(transparent, var(--bg) 35%); }
.ticket, .token { padding: 32px 24px 24px; border-radius: var(--r); background: var(--surface); text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.ticket-time { font-size: 56px; font-weight: 300; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.ticket-day { color: var(--muted); }
.perf { width: calc(100% + 48px); border-top: 1px dashed var(--line); margin: 16px 0 8px; position: relative; }
.perf::before, .perf::after { content: ""; position: absolute; top: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); }
.perf::before { left: -10px; } .perf::after { right: -10px; }
.ticket dl { margin: 0; width: 100%; display: grid; gap: 10px; }
.ticket dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.ticket dt { color: var(--muted); } .ticket dd { margin: 0; font-weight: 500; text-align: right; }
.ticket > .eyebrow, .token > .eyebrow { color: var(--accent); }
.token .token-no { font-size: 120px; font-weight: 300; line-height: .95; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.token.live .token-no { color: var(--accent); }
.token-line { font-size: 16px; }
.token-line strong { font-weight: 500; }
.qlist { list-style: none; margin: 0; padding: 0 16px; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); }
.qlist li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; font-size: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.qlist li:first-child { border-top: 0; }
.qlist li.me { font-weight: 500; }
.me-head, .client-top { display: flex; gap: 14px; align-items: center; }
.me-head div, .client-top > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.me-head strong, .client-top strong { font-weight: 500; }

/* staff */
.daynav { display: flex; gap: 8px; align-items: center; }
.daynav-label { flex: 1; display: flex; flex-direction: column; align-items: center; background: none; border: 0; cursor: pointer; }
.daynav-label strong { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--r); background: var(--surface); padding: 4px 0; }
.strip.three { grid-template-columns: repeat(3, 1fr); }
.strip > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-left: 1px solid var(--line); min-width: 0; }
.strip > div:first-child { border-left: 0; }
.strip strong { font-size: 22px; font-weight: 400; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bill { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--surface); border-radius: var(--r-sm); }
.bill > div { display: flex; justify-content: space-between; gap: 12px; }
.bill strong { font-weight: 500; font-variant-numeric: tabular-nums; }
.bill .disc { color: var(--ok); }
.photo-pick { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.photo-pick img { width: 100%; max-height: 240px; object-fit: cover; border-radius: var(--r-sm); }
.usual { padding: 14px 16px; background: var(--accent-soft); border-radius: var(--r-sm); display: flex; flex-direction: column; gap: 4px; }
.usual .eyebrow { color: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.gallery figcaption { font-size: 11px; color: var(--muted); }
.earn { padding: 24px 20px; border-radius: var(--r); background: var(--surface); }
.earn-big { font-size: 48px; font-weight: 300; letter-spacing: -0.045em; line-height: 1.05; font-variant-numeric: tabular-nums; margin: 6px 0 4px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); min-width: 0; }
.kpi strong { font-size: 22px; font-weight: 400; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi.lead { grid-column: 1 / -1; padding: 22px 16px; }
.kpi.lead strong { font-size: 44px; font-weight: 300; letter-spacing: -0.045em; line-height: 1.05; }
.kpi.warn strong { color: var(--warn); }
.kpis .kpi:last-child:nth-child(even) { grid-column: 1 / -1; }
.up, .down { font-size: 13px; }
.up { color: var(--ok); } .down { color: var(--accent); }
.chart { background: var(--surface); border-radius: var(--r); padding: 16px 12px 8px 4px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 10px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--bar); }
.chart .bar.hi { fill: var(--accent); }
.table-wrap { overflow-x: auto; border-radius: var(--r); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 14px 10px; white-space: nowrap; }
.tbl td { padding: 12px 14px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; vertical-align: top; }
.stackbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.legend strong { font-weight: 500; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; }
.m-cash { background: var(--m-cash); } .m-jazzcash { background: var(--m-jazzcash); } .m-easypaisa { background: var(--m-easypaisa); } .m-card { background: var(--m-card); }
.hours-edit { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.h-row { display: grid; grid-template-columns: 36px 80px 1fr 1fr; gap: 6px; align-items: center; font-size: 14px; }
.h-row input[type=time] { padding: 7px 8px !important; font-size: 13px; }
.poster { padding: 32px 24px; border-radius: var(--r); background: var(--qr-bg); color: var(--qr-ink); text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; border: 1px solid var(--line); }
.poster .eyebrow { color: var(--qr-ink); opacity: .5; }
.poster h2 { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; }
.poster strong { font-weight: 500; }
.qr { width: 200px; max-width: 100%; margin: 6px 0; }
.qr svg { width: 100%; height: auto; display: block; }
.linkbox { display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); min-width: 0; }
.linkbox code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 13px var(--font); color: var(--muted); }
.tips ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; display: grid; gap: 6px; color: var(--muted); }

/* sheets */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgb(17 16 21 / .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 22px 22px 0 0; animation: up .25s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom, 0px); }
@keyframes up { from { transform: translateY(40px); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px)); }
.sheet-head h2 { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.sheet-body { overflow-y: auto; padding: 8px max(20px, env(safe-area-inset-right, 0px)) 28px max(20px, env(safe-area-inset-left, 0px)); }
@media (min-width: 600px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 360px) { .strip { grid-template-columns: repeat(2, 1fr); } .strip > div:nth-child(3) { border-left: 0; } .strip > div:nth-child(n+3) { border-top: 1px solid var(--line); } .h-row { grid-template-columns: 32px 70px 1fr; } .h-row input[type=time]:last-child { grid-column: 3; } .holes { grid-template-columns: repeat(5, 1fr); } }
.sec-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.sec-row .chip { padding: 6px 12px; font-size: 13px; }
.kpi.tapk { border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.kpi.tapk strong { font-size: 17px; letter-spacing: -0.015em; }

/* ---------- feels like an app ---------- */
html, body { overscroll-behavior-y: none; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
button, .btn, .tabs, .chip, .slot, .day, .svc, .big-btn, .seg { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* 16px stops iOS from zooming into a field on focus */
input:not([type=checkbox]):not([type=file]), textarea, select, .search { font-size: 16px; }
@media (display-mode: standalone) { .foot { display: none; } .app { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } }

/* skeleton loading */
.skel { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.skel span { height: 56px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
.skel span:nth-child(2) { opacity: .7; } .skel span:nth-child(3) { opacity: .45; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* offline */
.offline { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; padding: 8px 16px; background: var(--warn-bg); color: var(--warn); }

/* book again */
.again { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "e e" "s g" "m g"; column-gap: 12px; row-gap: 2px; text-align: left; padding: 18px 20px; border-radius: var(--r); border: 0; background: var(--surface); color: var(--ink); cursor: pointer; }
.again .eyebrow { grid-area: e; color: var(--accent); margin-bottom: 2px; }
.again strong { grid-area: s; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.again .small { grid-area: m; }
.again-go { grid-area: g; align-self: center; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; padding: 8px 12px; border-radius: 999px; background: var(--primary); color: var(--on-primary); }

/* install card on Home */
.install { flex-wrap: nowrap; }
.install > div { flex: 1; min-width: 0; }
.app-icon { flex: none; border-radius: 22%; box-shadow: 0 1px 2px rgb(0 0 0 / .12); }

/* install sheet */
.install-wrap { align-items: flex-end; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.install-wrap.with-arrow { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
.install-sheet { position: relative; border-radius: 26px; max-width: 440px; padding: 28px 22px 14px; gap: 14px; text-align: left; overflow-y: auto; animation: pop .32s cubic-bezier(.2, .9, .25, 1.1); }
@keyframes pop { from { transform: translateY(24px) scale(.97); opacity: 0; } }
.install-sheet h2 { font-size: 22px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.2; }
.install-sheet > p { font-size: 14px; }
.install-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; background: var(--surface-2); }
.install-app { display: flex; align-items: center; gap: 14px; padding-right: 40px; }
.install-app div { display: flex; flex-direction: column; min-width: 0; }
.install-app strong { font-weight: 500; }
.install-app span { font-size: 13px; color: var(--muted); }
.i-steps { list-style: none; margin: 4px 0; padding: 4px 16px; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); }
.i-steps li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.i-steps li:first-child { border-top: 0; }
.i-steps b { font-weight: 600; }
.i-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; flex: none; }
.kbd { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; padding: 3px 8px; margin: 0 2px; border-radius: 8px; background: var(--surface-2); color: #0A84FF; font-weight: 500; font-size: 14px; white-space: nowrap; }
.kbd .ic { stroke-width: 2.2; }
.install-later { min-height: 40px !important; color: var(--muted); border: 0; }
.i-arrow { position: fixed; left: 50%; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); color: var(--on-primary); background: var(--primary); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; animation: nudge 1.1s ease-in-out infinite; box-shadow: 0 6px 18px rgb(0 0 0 / .25); }
.i-arrow.right { left: auto; right: calc(18px + env(safe-area-inset-right, 0px)); transform: none; }
.i-arrow.top { bottom: auto; top: calc(8px + env(safe-area-inset-top, 0px)); right: calc(18px + env(safe-area-inset-right, 0px)); left: auto; transform: rotate(180deg); }
@keyframes nudge { 50% { translate: 0 6px; } }
.i-arrow.top { animation-name: nudge-up; } @keyframes nudge-up { 50% { translate: 0 -6px; } }
.desk-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r); background: var(--surface); text-decoration: none; color: var(--ink); }
.desk-link span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.desk-link strong { font-weight: 500; }
.desk-link small { color: var(--muted); font-size: 13px; }
.paused { padding: 18px 20px; border-radius: var(--r); background: var(--warn-bg); color: var(--warn); display: flex; flex-direction: column; gap: 4px; }
.paused strong { font-weight: 500; color: var(--ink); }
.paused .sel { color: var(--ink); font-weight: 500; user-select: all; }
.foot a { color: inherit; }
