:root {
  --bg: #f6f4f1;
  --card: #ffffff;
  --ink: #1f1d1a;
  --muted: #7a746c;
  --line: #ebe6df;
  --brand: #c8553d;
  --brand-ink: #ffffff;
  --brand-soft: #fbeee9;
  --ok: #2f7d5b;
  --warn: #b7791f;
  --radius: 14px;
  --gap: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412;
    --card: #211e1b;
    --ink: #f1ece6;
    --muted: #a39b91;
    --line: #34302b;
    --brand: #e0735a;
    --brand-soft: #3a2621;
    --ok: #5fbf93;
    --warn: #e0a64a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
/* component rules set display on many elements; the hidden attribute must still win over all of them */
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
main { max-width: 640px; margin: 0 auto; padding: 0 var(--gap) var(--gap); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.price { color: var(--brand); font-weight: 600; }
.strike { color: var(--muted); text-decoration: line-through; font-size: 12px; margin-left: 6px; }

.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 0 10px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.topbar .back { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); font-size: 18px; }
.hero { padding: 22px 0 14px; }
.hero p { margin-top: 4px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row .grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.item-card { display: flex; gap: 12px; }
.item-card img, .thumb { width: 92px; height: 92px; border-radius: 10px; object-fit: cover; background: var(--line); flex: none; }
/* staff photos are mostly full-length portraits, so crop toward the face */
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: center 12%; background: var(--line); flex: none; }
.avatar.lg { width: 72px; height: 72px; }
.cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--line); }

/* two-up therapist cards; full-length portraits crop toward the face */
.pro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pro-grid .empty, .pro-grid .skeleton { grid-column: 1 / -1; }
.pro-grid .skeleton { height: 220px; grid-column: auto; }
@media (min-width: 560px) { .pro-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pro-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.pro-photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 15%; background: var(--line); }
.pro-body { padding: 10px 12px 12px; }
.pro-body h3 { font-size: 15px; }
.pro-body .muted { font-size: 12px; margin-top: 2px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--card); padding: 7px 12px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip small { display: block; font-size: 11px; opacity: .8; text-align: center; }

.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 9px 0; text-align: center; font-size: 14px; color: var(--ink); }
.slot:disabled { color: var(--muted); background: transparent; text-decoration: line-through; }
.slot.rest:disabled { text-decoration: none; }
.slot.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

.btn { display: block; width: 100%; border: 0; border-radius: 12px; padding: 13px; font-size: 16px; font-weight: 600; background: var(--brand); color: var(--brand-ink); text-align: center; cursor: pointer; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.btn.small { display: inline-block; width: auto; padding: 7px 14px; font-size: 14px; }
.btn:disabled { opacity: .5; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding: 10px var(--gap) calc(10px + env(safe-area-inset-bottom)); z-index: 10; }
.dock-inner { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.dock-inner .btn { width: auto; flex: 1; }
body.docked { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

.field { display: block; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input, .field textarea, .field select { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.field textarea { min-height: 72px; resize: vertical; }
.option { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.option:first-child { border-top: 0; }
.option input { accent-color: var(--brand); width: 18px; height: 18px; }

.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.badge.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.grey { background: var(--line); color: var(--muted); }
.badge.warn { background: var(--brand); color: var(--brand-ink); }
.admin .field textarea { font: 12px/1.4 ui-monospace, Consolas, monospace; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: inherit; width: 100%; }
.admin code { font-size: 12px; word-break: break-all; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.kv b { font-weight: 500; text-align: right; }
.empty { text-align: center; padding: 48px 0; color: var(--muted); }
.center { text-align: center; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabs[hidden], .toast[hidden] { display: none; }
.tabs a { flex: 1; text-align: center; padding: 12px 0; font-size: 13px; color: var(--muted); }
.tabs a.on { color: var(--brand); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 48px); background: rgba(20, 18, 16, .88); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 20; }
/* ---- back office: wide layout, sidebar on desktop, top strip on phones ---- */
body.admin { padding-bottom: 24px; }
body.admin main { max-width: 1100px; padding-top: 8px; }
.side { display: flex; gap: 4px; align-items: center; overflow-x: auto; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px var(--gap); position: sticky; top: 0; z-index: 10; }
.side[hidden] { display: none; }
.side .brand { margin-right: 12px; white-space: nowrap; }
.side a { padding: 7px 12px; border-radius: 8px; white-space: nowrap; font-size: 14px; }
.side a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
@media (min-width: 900px) {
  body.admin { display: grid; grid-template-columns: 190px 1fr; min-height: 100vh; }
  .side { flex-direction: column; align-items: stretch; border-bottom: 0; border-right: 1px solid var(--line); height: 100vh; padding: 18px 12px; }
  .side .brand { margin: 0 0 14px 12px; font-size: 17px; }
  body.admin main { width: 100%; padding: 8px 28px 28px; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat b { display: block; font-size: 22px; margin-top: 4px; }
.tbl-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 500; font-size: 13px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.link { cursor: pointer; }
.tbl tr.link:hover td { background: var(--bg); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.toolbar input, .toolbar select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.suffix { display: flex; align-items: center; gap: 6px; }
.suffix input { flex: 1; min-width: 0; }
.fare-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; }
@media (max-width: 640px) { .fare-row { grid-template-columns: 1fr 1fr; } }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
.doc { white-space: pre-wrap; line-height: 1.8; font-size: 14px; }
.consent { border-top: 0; padding: 4px 0; align-items: flex-start; }
.consent input { margin-top: 3px; flex: none; }
.danger { color: #c0392b; }
.btn.danger-btn { background: #c0392b; }
.rest input[type=time], .toolbar input[type=date] { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.check-list { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.check-list label { display: flex; gap: 6px; align-items: center; }
.sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 30; }
.sheet-box { width: 100%; max-width: 640px; background: var(--card); border-radius: 18px 18px 0 0; padding: 22px var(--gap) calc(16px + env(safe-area-inset-bottom)); }
.sheet-box p { margin-bottom: 18px; font-size: 16px; }
.sheet-box .row .btn { flex: 1; }
.skeleton { height: 92px; border-radius: var(--radius); background: linear-gradient(90deg, var(--line), var(--card), var(--line)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ---- 后台 → 数据 ---- */
:root { --c1: #3b82f6; --c2: #e0607e; --c3: #2f9e6e; --c4: #e0a030; }
@media (prefers-color-scheme: dark) { :root { --c1: #6ea4ff; --c2: #f08aa2; --c3: #5fcf9a; --c4: #f0b850; } }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid, svg .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis, svg .axis { fill: var(--muted); font-size: 11px; }
svg .big { fill: var(--ink); font-size: 26px; font-weight: 700; }
.chart path { stroke-width: 2; stroke-linejoin: round; }
.chart circle { stroke: none; }
.s1 { stroke: var(--c1); fill: var(--c1); } .chart path.s1 { fill: none; }
.s2 { stroke: var(--c2); fill: var(--c2); } .chart path.s2 { fill: none; }
.s3 { stroke: var(--c3); fill: var(--c3); } .chart path.s3 { fill: none; }
.s4 { stroke: var(--c4); fill: var(--c4); }
svg circle[stroke-dasharray] { fill: none; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend i.s1 { background: var(--c1); } .legend i.s2 { background: var(--c2); } .legend i.s3 { background: var(--c3); } .legend i.s4 { background: var(--c4); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--card); color: inherit; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.help { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--line); color: var(--muted); font-size: 11px; cursor: help; }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rank li:last-child { border-bottom: 0; }
.rank .no { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 12px; flex: none; }
.rank.scroll { max-height: 320px; overflow-y: auto; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rank .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack > .legend { display: flex; }
.city-list { max-height: 60vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.city-row { gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.city-row:last-child { border-bottom: 0; }
.switches { display: grid; gap: 2px; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row:last-child { border-bottom: 0; }
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ================= customer app (index.html, body.app) ================= */
body.app { --radius: 16px; --shadow: 0 1px 2px rgba(60, 35, 20, .04), 0 6px 20px rgba(60, 35, 20, .06);
  --hero-a: #d9674b; --hero-b: #b8432f; --gold: #f6c88f; }
@media (prefers-color-scheme: dark) { body.app { --shadow: 0 1px 2px rgba(0,0,0,.3); --hero-a: #7a3a2b; --hero-b: #4d2219; --gold: #e9b77a; } }
body.app main { padding: 0; max-width: 640px; }
body.app .page { padding: 0 var(--gap) var(--gap); }
body.app .card { border: 0; box-shadow: var(--shadow); }
body.app .topbar { padding: 12px var(--gap) 10px; }
body.app main > .stack, body.app main > form.stack { padding: 0 var(--gap) var(--gap); }
body.app main > .topbar + .stack { padding-top: 2px; }
.ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.ico.sm { width: 14px; height: 14px; vertical-align: -2px; }
.ico.xl { width: 40px; height: 40px; }
.price.lg { font-size: 17px; }

/* hero */
.home-hero { position: relative; overflow: hidden; color: #fff; padding: 14px var(--gap) 26px; padding-top: calc(14px + env(safe-area-inset-top));
  background: linear-gradient(140deg, var(--hero-a), var(--hero-b)); border-radius: 0 0 26px 26px; }
.home-hero::before, .home-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.home-hero::before { width: 220px; height: 220px; right: -70px; top: -90px; }
.home-hero::after { width: 140px; height: 140px; right: 60px; bottom: -80px; }
.home-hero h1 { font-size: 28px; letter-spacing: 1px; margin-top: 18px; position: relative; }
.home-hero > p { opacity: .9; margin-top: 6px; position: relative; }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 18px; position: relative; }
.trust span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; background: rgba(255,255,255,.12); border-radius: 12px; padding: 9px 2px; }
.trust .ico { width: 20px; height: 20px; color: var(--gold); }
.page-hero { padding: 16px var(--gap) 10px; padding-top: calc(16px + env(safe-area-inset-top)); }
.page-hero h1 { font-size: 24px; }
.page-hero .muted { margin-top: 6px; }

/* city */
.city-pill { display: inline-flex; align-items: center; gap: 4px; border: 0; font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 999px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; max-width: 60vw; }
.city-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city-pill.on-hero { background: rgba(255,255,255,.18); color: #fff; box-shadow: none; position: relative; z-index: 1; }
.notice { display: flex; gap: 12px; align-items: center; background: var(--brand-soft); border-radius: var(--radius); padding: 14px; margin: 16px 0 0; flex-wrap: wrap; }
.notice > .ico { color: var(--brand); width: 24px; height: 24px; }
.notice .btn { flex: none; }
.city-sheet { max-height: 80vh; overflow-y: auto; }
.city-sheet .link { border: 0; background: none; color: var(--muted); font: inherit; }
.city-here { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.city-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.city-chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px 4px; font: inherit; font-size: 14px; }
.city-chip small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.city-chip.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* sections */
.section { margin-top: 22px; }
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.section-head h2 { flex: 1; font-size: 18px; position: relative; padding-left: 10px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 2px; background: var(--brand); }
.section-head .more { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; }
.where { margin: -6px 0 10px; }

/* therapist cards */
body.app .pro-grid { gap: 12px; }
.pro-card { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pro-shot { position: relative; }
.pro-shot .pro-photo { aspect-ratio: 3 / 4; }
.pro-tag, .pro-km { position: absolute; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 3px 7px; border-radius: 999px; backdrop-filter: blur(4px); }
.pro-tag { left: 8px; top: 8px; background: rgba(47, 125, 91, .88); color: #fff; }
.pro-km { right: 8px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; }
.pro-tag .ico, .pro-km .ico { width: 12px; height: 12px; }
.pro-body h3 small { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 6px; }
body.app .skeleton.tall { height: 240px; border-radius: var(--radius); }

/* service tiles */
.item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.item-tile { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.item-cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.item-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.item-body h3 { font-size: 15px; }
.item-body .row { gap: 4px; margin-top: auto; }
.mini-btn { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); }

/* orders */
.order-card { display: block; }
.order-card .row + .row { margin-top: 10px; }
.status-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border-radius: var(--radius); color: #fff;
  background: linear-gradient(140deg, var(--hero-a), var(--hero-b)); text-align: center; }
.status-hero p { opacity: .9; font-size: 13px; }
.status-hero.tone-ok { background: linear-gradient(140deg, #3c9a6f, #2a7653); }
.status-hero.tone-grey { background: linear-gradient(140deg, #8a8178, #625a52); }
.empty-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 0; color: var(--muted); }

/* me */
.me-hero { color: #fff; padding: 22px var(--gap) 18px; padding-top: calc(22px + env(safe-area-inset-top)); background: linear-gradient(140deg, var(--hero-a), var(--hero-b)); border-radius: 0 0 26px 26px; margin-bottom: 16px; min-height: 150px; }
.me-hero p { opacity: .85; margin-top: 4px; font-size: 13px; }
.avatar.ring { border: 3px solid rgba(255,255,255,.6); }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; background: rgba(255,255,255,.14); border-radius: 14px; }
.me-stats > * { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 0; color: inherit; background: none; border: 0; font: inherit; }
.me-stats b { font-size: 17px; }
.me-stats b .ico { width: 20px; height: 20px; }
.me-stats span { font-size: 12px; opacity: .85; }
.menu { padding: 4px 14px; }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.menu-row:first-child { border-top: 0; }
.menu-row > .ico:first-child { color: var(--brand); }
.coupon { display: flex; align-items: center; gap: 12px; padding: 10px; margin-top: 10px; border-radius: 12px; background: var(--brand-soft); }
.coupon-amt { font-size: 20px; font-weight: 700; color: var(--brand); min-width: 64px; text-align: center; border-right: 1px dashed var(--brand); padding-right: 10px; }
body.app .btn.ghost { display: flex; align-items: center; justify-content: center; gap: 6px; }

/* login */
.login { min-height: 100vh; padding-bottom: 32px; }
.login-hero { color: #fff; text-align: center; padding: 48px 24px 72px; padding-top: calc(48px + env(safe-area-inset-top)); background: linear-gradient(150deg, var(--hero-a), var(--hero-b)); border-radius: 0 0 32px 32px; }
.logo-mark { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.logo-mark .ico { width: 34px; height: 34px; color: var(--gold); }
.login-hero h1 { font-size: 28px; letter-spacing: 2px; }
.login-hero p { opacity: .9; margin-top: 8px; }
.login-card { margin: -44px var(--gap) 0; background: var(--card); border-radius: 20px; padding: 22px 18px; box-shadow: 0 10px 30px rgba(60, 35, 20, .12); position: relative; }
.login-card h2 { font-size: 20px; }
.wx-btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: #07c160; color: #fff; }
.input-row { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 12px; padding: 0 12px; border: 1px solid transparent; }
.input-row:focus-within { border-color: var(--brand); }
.input-row > .ico { color: var(--muted); }
.input-row input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--ink); padding: 13px 0; outline: none; }
.code-btn { border: 0; background: none; color: var(--brand); font: inherit; font-size: 14px; white-space: nowrap; padding: 8px 0 8px 8px; }
.code-btn:disabled { color: var(--muted); }
.copy-box { background: var(--bg); border-radius: 12px; padding: 12px; word-break: break-all; }
.perks { list-style: none; padding: 0; margin: 22px var(--gap) 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.perks li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.perks .ico { width: 22px; height: 22px; color: var(--brand); }

/* tab bar */
body.app .tabs { box-shadow: 0 -4px 20px rgba(60, 35, 20, .06); border-top: 0; }
body.app .tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: 11px; }
body.app .tabs svg { width: 24px; height: 24px; }
body.app .tabs a.on { color: var(--brand); }
.menu-row .grow, .notice .grow, .city-here .grow { flex: 1; min-width: 0; }

/* ---- conversion pieces (body.app) ---- */
.home-hero h1 { font-size: 24px; margin-top: 16px; }
.search { flex: 1; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.95); color: #7a746c; border-radius: 999px; padding: 0 12px; margin-left: 10px; position: relative; z-index: 1; }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 14px; color: #1f1d1a; padding: 8px 0; outline: none; }
.search.block { margin: 0; background: var(--card); box-shadow: var(--shadow); color: var(--muted); }
.search.block input { color: var(--ink); padding: 11px 0; }
.promo { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); color: #6b3a10;
  background: linear-gradient(120deg, #ffe7c2, #ffd29a); box-shadow: var(--shadow); }
.promo b { font-size: 16px; }
.promo p { font-size: 12px; opacity: .8; margin-top: 2px; }
.promo-btn { flex: none; background: #e2572f; color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.hot-row { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hot-row::-webkit-scrollbar { display: none; }
.hot-card { flex: none; width: 46%; max-width: 220px; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); scroll-snap-align: start; display: flex; flex-direction: column; }
.hot-cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.hot-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.hot-body .row { gap: 2px; }
.book-btn { display: block; text-align: center; margin-top: 8px; padding: 8px 0; border-radius: 999px; background: linear-gradient(120deg, var(--hero-a), var(--hero-b)); color: #fff; font-size: 14px; font-weight: 600; }
.book-btn.off { background: var(--line); color: var(--muted); font-weight: 500; }
.soon { font-size: 12px; color: var(--ok); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.soon b { font-weight: 600; }
.soon.full { color: var(--muted); }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; font-size: 12px; color: var(--muted); }
.steps li b { display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 6px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 14px; }

/* ---- back office polish ---- */
body.admin { --shadow: 0 1px 2px rgba(60, 35, 20, .04), 0 4px 14px rgba(60, 35, 20, .05); }
@media (prefers-color-scheme: dark) { body.admin { --shadow: 0 1px 2px rgba(0,0,0,.3); } }
body.admin .card, body.admin .tbl-wrap { border: 0; box-shadow: var(--shadow); }
.side .brand { display: flex; align-items: center; gap: 8px; }
.side .brand small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 2px; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-size: 15px; }
.nav-group { display: none; }
@media (min-width: 900px) {
  .side { overflow-y: auto; }
  .nav-group { display: block; font-size: 12px; color: var(--muted); padding: 14px 12px 4px; letter-spacing: 1px; }
  .side a { padding: 8px 12px; }
}
body.admin h1 { font-size: 22px; }
.stat { display: block; transition: transform .15s; }
.stat:hover { transform: translateY(-1px); }
.stat.hot b { color: var(--brand); }
.alert-card { display: block; margin-bottom: 12px; border-left: 4px solid var(--brand) !important; }
.todo h3 .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); font-size: 12px; margin-left: 6px; }
.todo-list { display: grid; }
.todo-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.todo-row:first-child { border-top: 0; }
.todo-row .grow { flex: 1; min-width: 0; }
.tbl td .btn.small { padding: 5px 10px; font-size: 13px; }

/* ---- pink theme and reference-style home (body.app) ---- */
body.app { --brand: #ec4f8c; --brand-ink: #fff; --brand-soft: #fde8f0; --hero-a: #f88bb8; --hero-b: #ec4f8c; --gold: #ffe08a;
  --price: #f0443a; --bg: #f7f4f6; --top-a: #fbd3e6; --top-b: #fdeef5;
  background: linear-gradient(180deg, var(--top-a) 0, var(--top-b) 180px, var(--bg) 360px) no-repeat, var(--bg); }
@media (prefers-color-scheme: dark) {
  body.app { --brand: #f472a8; --brand-soft: #3a2230; --hero-a: #8a3a5c; --hero-b: #5c2340; --price: #ff6b5e; --bg: #161214;
    --top-a: #3a1f2e; --top-b: #241820; }
}
body.app .price { color: var(--price); }
.price.xl { font-size: 22px; font-weight: 700; }
.h-top { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gap) 6px; padding-top: calc(14px + env(safe-area-inset-top)); }
.city-pill.plain { background: none; box-shadow: none; padding: 6px 0; font-size: 19px; font-weight: 600; }
.city-pill.plain > .ico:first-child { color: var(--brand); width: 20px; height: 20px; }
.h-search { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.7); color: var(--ink); }
@media (prefers-color-scheme: dark) { .h-search { background: rgba(255,255,255,.08); } }
.panel { background: var(--card); border-radius: 22px; padding: 16px 14px; margin-top: 12px; box-shadow: var(--shadow); }
.panel > h2 { font-size: 21px; margin-bottom: 12px; }
.pro-scroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
.pro-scroll::-webkit-scrollbar { display: none; }
.pro-tile { flex: none; width: 30%; min-width: 104px; aspect-ratio: 3 / 4; position: relative; border-radius: 14px; overflow: hidden; background: var(--line); scroll-snap-align: start; }
.pro-tile img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.pro-tile::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.pro-tile .pro-tag { left: 6px; top: 6px; }
.pro-name { position: absolute; left: 10px; bottom: 8px; color: #fff; font-size: 15px; font-weight: 600; z-index: 1; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.pro-soon { position: absolute; right: 6px; top: 6px; font-size: 10px; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.9); color: #2f7d5b; z-index: 1; }
.more-pros { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(90deg, var(--brand-soft), var(--top-b)); color: var(--brand); }
@media (prefers-color-scheme: dark) { .more-pros { background: linear-gradient(90deg, var(--brand-soft), var(--top-b)); } }
.more-pros b { font-size: 16px; font-style: italic; letter-spacing: 1px; }
.more-pros .spark { font-size: 12px; margin-top: -10px; }
.more-pros .grow { flex: 1; }
.faces { display: flex; }
.faces .face { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: center 15%; border: 2px solid #fff; margin-left: -8px; background: var(--line); }
.svc-row { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.panel > h2 + .svc-row { border-top: 0; padding-top: 0; }
.svc-cover { position: relative; width: 40%; max-width: 160px; flex: none; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: var(--brand-soft); }
.svc-cover img { width: 100%; height: 100%; object-fit: cover; }
.svc-min { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--brand); color: #fff; }
.svc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.svc-body h3 { font-size: 17px; }
.tag-new { align-self: flex-start; font-size: 11px; color: var(--price); background: #ffe9e6; border-radius: 4px; padding: 1px 6px; margin-top: 4px; }
@media (prefers-color-scheme: dark) { .tag-new { background: #3a1f1c; } }
.svc-foot { display: flex; align-items: flex-end; gap: 8px; margin-top: auto; }
.svc-foot .grow { flex: 1; min-width: 0; }
.pill-btn { flex: none; padding: 8px 16px; border-radius: 999px; background: linear-gradient(120deg, var(--hero-a), var(--brand)); color: #fff; font-size: 15px; font-weight: 600; box-shadow: 0 4px 10px rgba(0, 0, 0, .14); }
/* the earliest time sits under the name, so it never collides with the badge in the corner */
.pro-tile .pro-name { bottom: 24px; }
.pro-tile .pro-soon { top: auto; right: auto; left: 10px; bottom: 7px; background: none; color: #fff; padding: 0; font-size: 11px; opacity: .95; }
.pro-tile:not(:has(.pro-soon)) .pro-name { bottom: 9px; }

/* ---- images that fit any shape without cropping ---- */
.fit { position: relative; overflow: hidden; width: 100%; height: 100%; background: var(--brand-soft); }
.fit::before { content: ""; position: absolute; inset: -12px; background: var(--img) center / cover no-repeat; filter: blur(14px) saturate(1.1); opacity: .85; }
.fit img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.svc-cover .fit { position: absolute; inset: 0; }
.item-tile .fit.item-cover { aspect-ratio: 4 / 3; height: auto; }
.cover-full { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; border-radius: var(--radius); background: var(--brand-soft); }
.gallery { display: flex; flex-direction: column; gap: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery img { display: block; width: 100%; height: auto; }
.intro { white-space: pre-wrap; line-height: 1.7; margin-top: 8px; }
/* back office */
.fit-thumb { width: 96px; height: 96px; border-radius: 10px; object-fit: contain; background: var(--bg); flex: none; }
.gal { display: flex; flex-wrap: wrap; gap: 10px; }
.gal figure { margin: 0; width: 110px; }
.gal img { width: 110px; height: 140px; object-fit: contain; background: var(--bg); border-radius: 8px; border: 1px solid var(--line); }
.gal figcaption { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.gal figcaption button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 6px; width: 30px; height: 26px; cursor: pointer; }
.gal figcaption button:disabled { opacity: .35; cursor: default; }

/* filing numbers at the foot of the front page and the login page */
.filing { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; padding: 22px 16px 10px; font-size: 12px; color: var(--muted); }
.filing a { color: inherit; }
/* back office fare editor */
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
input.time { width: 90px; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; text-align: center; }
.fare-rule h3 { margin-top: 6px; }

/* therapist everyday photos: a sideways strip on the profile, opening a full-screen viewer */
.pro-photos { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.pro-photos img { flex: 0 0 auto; width: 30%; max-width: 140px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--brand-soft); scroll-snap-align: start; cursor: zoom-in; }
.viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.92); }
.viewer-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-track > div { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; }
.viewer-track img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-count { position: absolute; left: 0; right: 0; bottom: calc(24px + env(safe-area-inset-bottom)); text-align: center; color: #fff; font-size: 14px; }

/* choosing the service address on a map */
.map-pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 14px; border: 1px dashed var(--brand); border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.map-pick .ico { flex: none; }
.map-sheet { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #fff; }
.map-sheet-bar { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid #eee; text-align: center; color: #222; }
.map-sheet-bar .link { justify-self: start; border: 0; background: none; color: #666; font-size: 15px; padding: 4px; }
.map-sheet iframe { flex: 1; width: 100%; border: 0; }

/* the "已认证" mark stays off faces: beside the name on the home row, a small chip at the photo's foot in the list */
.pro-name { display: inline-flex; align-items: center; gap: 4px; max-width: calc(100% - 16px); }
.v-mark { display: inline-flex; align-items: center; gap: 1px; flex: none; font-size: 9px; font-weight: 500; line-height: 1; padding: 2px 4px 2px 3px; border-radius: 999px; background: rgba(47, 125, 91, .9); color: #fff; text-shadow: none; }
.v-mark .ico { width: 9px; height: 9px; }
.pro-shot .pro-tag { top: auto; bottom: 8px; left: 8px; font-size: 10px; padding: 2px 6px; gap: 2px; }
.pro-shot .pro-tag .ico { width: 10px; height: 10px; }

/* list cards: a square photo framed on the face instead of a tall full-length shot */
.pro-shot .pro-photo { aspect-ratio: 1 / 1; object-position: center 12%; }

/* Storefront looks chosen per promotion link (后台 → 推广链接 → 首页风格). Each only swaps the colour tokens; the
   layout stays the same, so every page of the site follows the link's look, not just the home page. */
body.app.theme-mint   { --brand: #12a07c; --brand-soft: #dff4ec; --hero-a: #52c9a6; --hero-b: #12a07c; --gold: #fff1b8; --bg: #f2f7f5; --top-a: #c6eee0; --top-b: #e9f8f2; }
body.app.theme-gold   { --brand: #b9822a; --brand-soft: #f7ecd7; --hero-a: #e0b562; --hero-b: #b9822a; --gold: #fff3c4; --bg: #f8f5ef; --top-a: #f1dfb6; --top-b: #faf2e1; }
body.app.theme-violet { --brand: #7a58d6; --brand-soft: #ece6fb; --hero-a: #a58cf0; --hero-b: #7a58d6; --gold: #ffe7a3; --bg: #f5f3fa; --top-a: #dcd1f7; --top-b: #f0ecfc; }
body.app.theme-plain  { --brand: #2a3441; --brand-soft: #eceff3; --hero-a: #5a6675; --hero-b: #2a3441; --gold: #ffe08a; --bg: #f6f7f9; --top-a: #e6e9ee; --top-b: #f3f5f8; }
@media (prefers-color-scheme: dark) {
  body.app.theme-mint   { --brand: #3fcfa4; --brand-soft: #173029; --hero-a: #1f6b56; --hero-b: #134537; --bg: #111614; --top-a: #183229; --top-b: #14211c; }
  body.app.theme-gold   { --brand: #e2b462; --brand-soft: #33291a; --hero-a: #7a5a22; --hero-b: #4d3815; --bg: #15130f; --top-a: #33291a; --top-b: #201b13; }
  body.app.theme-violet { --brand: #a993f2; --brand-soft: #29213d; --hero-a: #563f9a; --hero-b: #362764; --bg: #131218; --top-a: #2a2240; --top-b: #1c1829; }
  body.app.theme-plain  { --brand: #d6dce4; --brand-ink: #14181d; --brand-soft: #262b32; --hero-a: #4a5360; --hero-b: #2e353f; --bg: #121417; --top-a: #22272e; --top-b: #191c21; }
}
/* the link's own name and line at the top of the home page, and its banner */
.store-head { padding: 2px var(--gap) 4px; display: grid; gap: 2px; }
.store-head h1 { font-size: 22px; line-height: 1.3; margin: 0; color: var(--ink); }
.store-head p { margin: 0; color: var(--brand); font-size: 14px; font-weight: 600; }
.store-banner { margin: 10px var(--gap) 0; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 7; max-width: 100%; box-shadow: var(--shadow); }
.store-banner .fit { width: 100%; height: 100%; }

/* back office: colour swatches for the per-link storefront looks */
.look-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.look-pink { background: linear-gradient(135deg, #f88bb8, #ec4f8c); }
.look-mint { background: linear-gradient(135deg, #52c9a6, #12a07c); }
.look-gold { background: linear-gradient(135deg, #e0b562, #b9822a); }
.look-violet { background: linear-gradient(135deg, #a58cf0, #7a58d6); }
.look-plain { background: linear-gradient(135deg, #5a6675, #2a3441); }
.look-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.look-opt { display: inline-flex; align-items: center; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.look-opt input { margin: 0 6px 0 0; }
.look-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* back office: commission totals of one promotion link */
.ledger-sum { gap: 10px; }
.ledger-sum > div { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.ledger-sum b { font-size: 20px; font-variant-numeric: tabular-nums; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tbl .sum-row td { font-weight: 600; border-top: 2px solid var(--line); background: var(--brand-soft); }
