:root {
  --c-brand: #2f45c5;
  --c-brand-deep: #2539ad;
  --c-brand-soft: #eef1fd;
  --c-text: #14171f;
  --c-text-sub: #8b919c;
  --c-text-mute: #a8adb7;
  --c-bg: #f1f2f4;
  --c-card: #ffffff;
  --c-line: #eceef1;
  --c-price: #e5356c;
  --c-star: #f5b731;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --tabbar-h: 64px;
  --shadow-card: 0 2px 10px rgba(20, 23, 31, .05);
  --kb: 0px;
  --shell: min(430px, 100%);
  --bar: min(414px, calc(100% - 16px));
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Heiti TC", "Microsoft JhengHei", "Noto Sans TC", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #e6e7ea; color: var(--c-text); overflow-x: hidden; }
button, input, textarea, select { font-family: inherit; }
button { border: 0; background: none; padding: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
button, a, input, textarea { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.phone {
  width: var(--shell);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--c-bg);
  position: relative;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
#view { padding-bottom: calc(var(--tabbar-h) + 36px + env(safe-area-inset-bottom)); }
#view.is-sub { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

.top { display: flex; gap: 10px; align-items: center; padding: 8px 12px 10px; }
.loc, .search {
  height: 44px; border-radius: var(--r-pill); background: var(--c-card);
  display: flex; align-items: center;
}
.loc { padding: 0 11px 0 17px; gap: 3px; font-weight: 700; font-size: 17px; color: var(--c-brand); flex: none; }
.loc svg { color: var(--c-brand); }
.search { flex: 1; padding: 0 15px 0 18px; gap: 8px; color: var(--c-brand); }
.search input { border: 0; outline: 0; width: 100%; background: transparent; font-size: 15.5px; color: var(--c-text); }
.search input::placeholder { color: #b4b9c3; }
.marq {
  margin: 2px 12px 8px; height: 44px; border-radius: 12px; background: var(--c-card);
  border-left: 3px solid var(--c-brand); box-shadow: var(--shadow-card);
  display: flex; align-items: center; gap: 9px; padding: 0 12px 0 9px; color: var(--c-text); overflow: hidden;
}
.marq__win { overflow: hidden; flex: 1; }
.marq__track { display: flex; width: max-content; font-size: 16px; font-weight: 600; line-height: 44px; animation: marq 18s linear infinite; }
.marq__track span { padding-right: 72px; }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.sec { padding: 0 12px; }
.sec h2 { margin: 24px 4px 12px; font-size: 19px; font-weight: 800; letter-spacing: .3px; }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 2px; }
.cat {
  aspect-ratio: 1 / 1.02; border-radius: 15px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; padding: 7px 4px 9px;
}
.cat:active { transform: scale(.96); }
.cat--travel { background: linear-gradient(180deg, #e4bfa2, #e9c7ac 26%, #f1dfcb 50%, #f8eee5 70%, #fdf8f5); }
.cat--model { background: linear-gradient(180deg, #5890da, #6c9de2 26%, #a5c7ed 50%, #d6e2f8 70%, #edf4fd); }
.cat--female { background: linear-gradient(180deg, #f99fb1, #faacbc 26%, #fdced6 50%, #fde6ec 70%, #fdf5f8); }
.cat--male { background: linear-gradient(180deg, #fcc5ab, #fccdb3 26%, #fde1d3 50%, #fff0eb 70%, #fefaf7); }
.cat--gay { background: linear-gradient(180deg, #8c9ded, #99aaf0 26%, #c1cdf7 50%, #e2e7fb 70%, #f4f4fc); }
.cat--les { background: linear-gradient(180deg, #ffab08, #ffb926 26%, #ffd37d 50%, #ffecc4 70%, #fef6e6); }
.cat__art { width: 100%; flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; }
.cat__art svg, .cat__art img { width: 100%; height: 100%; object-fit: contain; }
.cat__name { flex: none; margin-top: 4px; font-size: 13px; font-weight: 600; color: #23272f; letter-spacing: .2px; white-space: nowrap; }
.offers {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.offers::-webkit-scrollbar { display: none; }
.offer {
  flex: none; width: 168px; background: var(--c-card); border-radius: 16px; padding: 14px;
  box-shadow: var(--shadow-card);
}
.offer b { display: block; color: var(--c-price); font-size: 18px; }
.offer span { display: block; margin-top: 4px; color: var(--c-text-sub); font-size: 12px; }
.list { display: flex; flex-direction: column; gap: 14px; }
.svc { background: var(--c-card); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); }
.svc__cover { aspect-ratio: 332 / 158; height: auto; position: relative; }
.coverpic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.svc__badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: .3px; color: #fff; }
.badge.cert { background: #2f45c5; }
.badge.hot { background: #f0447c; }
.badge.off { background: #f5852f; }
.fav {
  position: absolute; right: 10px; top: 8px; color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.28));
}
.fav.on { color: var(--c-price); }
.svc__body { padding: 12px 14px 14px; }
.svc__body h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.35; }
.meta { margin: 12px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.when { color: #3d434e; font-size: 13.5px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.when svg { flex: none; color: #6c727d; }
.price { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; font-weight: 400; }
.price i { font-style: normal; font-size: 14px; color: #3d434e; font-weight: 400; }
.price b { font-size: 18px; font-weight: 800; color: var(--c-price); }
.price s { font-size: 13px; color: #b3b8c2; font-weight: 400; text-decoration-color: #000; text-decoration-thickness: 1px; }
.subbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 8px; background: rgba(241,242,244,.92); backdrop-filter: blur(8px);
}
.subbar h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .5px; flex: 1; text-align: center; }
.iconbtn { width: 36px; height: 36px; border-radius: 50%; background: var(--c-card); display: flex; align-items: center; justify-content: center; }
.detail-cover { height: 230px; margin: 0 14px; border-radius: 20px; position: relative; overflow: hidden; }
.detail { padding: 14px 14px 80px; }
.detail h2 { margin: 8px 0 0; font-size: 20px; font-weight: 700; line-height: 1.3; }
.detail p { color: #3f4042; line-height: 1.6; font-size: 16px; }
.buy {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 20;
  width: var(--bar);
  bottom: calc(4px + env(safe-area-inset-bottom) + var(--kb));
  display: flex; align-items: center; justify-content: space-between;
  height: 46px; padding: 4px; border-radius: 999px; background: #2c2d30;
}
.buy .amt { padding-left: 16px; color: #fff; font-size: 16px; font-weight: 600; }
.buy .btn { height: 38px; min-width: 0; background: var(--c-brand); font-size: 16px; font-weight: 600; }
.btn {
  height: 46px; border-radius: 999px; background: var(--c-brand); color: #fff; font-size: 15px; font-weight: 700;
  padding: 0 22px; min-width: 132px;
}
.btn.block { width: 100%; }
.btn.brand { background: var(--c-brand); }
.btn.ghost { background: var(--c-card); color: var(--c-text); border: 1px solid var(--c-line); }
.btn:disabled { opacity: .5; }
.pad { padding: 14px; }
.card { background: var(--c-card); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-card); }
.card + .card { margin-top: 10px; }
.row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; font-size: 14px; }
.row span { color: var(--c-text-sub); }
.st { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--c-brand-soft); color: var(--c-brand); }
.st.done { background: #e8f8ef; color: #1c9a55; }
.st.cancelled { background: #f3f4f6; color: #8b919c; }
.me-bal { background: linear-gradient(135deg, #2f45c5, #6d7ef0); color: #fff; border-radius: 18px; padding: 18px; }
.me-bal small { opacity: .85; }
.me-bal b { display: block; margin-top: 6px; font-size: 28px; }
.menu { margin-top: 12px; background: #fff; border-radius: 16px; overflow: hidden; }
.menu button, .menu a { width: 100%; text-align: left; padding: 15px 16px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--c-line); font-size: 15px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 13.5px; line-height: 1.6; color: var(--c-text-sub); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; height: 44px; border-radius: 12px; border: 0; background: #f4f5f7; padding: 0 14px;
  font: inherit; font-size: 14.5px; line-height: 1.5; color: var(--c-text);
}
.field input::placeholder, .field textarea::placeholder { color: var(--c-text-mute); }
.field textarea { height: 88px; padding: 12px 14px; resize: none; }
.book { padding: 0 0 88px; }
.book__card { margin: 12px 12px 0; padding: 14px 16px; background: var(--c-card); border-radius: 16px; box-shadow: var(--shadow-card); }
.book__svc { display: flex; gap: 12px; align-items: center; }
.book__thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; background: #e9ebee; flex: none; }
.book__name { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.4; }
.book__row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.book__row + .book__row { border-top: 1px solid var(--c-line); }
.book__label { flex: none; width: 62px; font-size: 13.5px; line-height: 1.6; color: var(--c-text-sub); }
.book__row input {
  flex: 1; min-width: 0; height: auto; border: 0; background: transparent; padding: 2px 0;
  font: inherit; font-size: 14.5px; line-height: 1.5; color: var(--c-text); box-shadow: none;
}
.book__note {
  display: block; width: 100%; margin-top: 8px; padding: 12px 14px; border: 0; border-radius: 12px;
  background: #f4f5f7; font: inherit; font-size: 14.5px; line-height: 1.5; color: var(--c-text); resize: none; outline: none;
}
.book__bar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 20;
  width: var(--shell); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--c-card);
  bottom: var(--kb);
  box-shadow: 0 -2px 14px #14171f0f;
}
.book__bar .price i { font-size: 13px; }
.book__bar .price b { font-size: 17px; }
.book__bar .btn { height: 46px; padding: 0 30px; font-size: 15px; font-weight: 700; }
.book__bar .btn:disabled { background: #d6d8de; }
.addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; background: var(--c-brand-soft); border-radius: 12px; padding: 12px; }
.empty { text-align: center; color: var(--c-text-sub); padding: 48px 16px; }
.tab {
  position: fixed; left: 50%; transform: translateX(-50%);
  width: var(--bar);
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 20; display: flex; padding: 4px; background: var(--c-card);
  border-radius: 24px; box-shadow: 0 6px 20px #14171f1a;
}
.tab[hidden] { display: none; }
.tab button { flex: 1; display: flex; justify-content: center; color: #6b6b6b; background: none; }
.pill { width: 52px; height: 48px; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; }
.tab button.on { color: #fff; }
.tab button.on .pill { background: var(--c-brand); }
.mask { position: fixed; inset: 0; background: #10131a73; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.mask[hidden] { display: none; }
.sheet {
  width: min(430px, 100%); background: #f6f7f9; border-radius: 20px 20px 0 0;
  margin-bottom: var(--kb);
  padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); max-height: 86vh; max-height: 86dvh; overflow: auto;
}
.sheet h3 { margin: 4px 0 12px; text-align: center; font-size: 18px; }
.grp { font-size: 13px; color: var(--c-text-sub); margin: 8px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #fff; border-radius: 999px; padding: 8px 12px; font-size: 13px; }
.chip.on { background: var(--c-brand); color: #fff; }
.err { color: var(--c-price); font-size: 13px; min-height: 18px; margin: 4px 0 8px; }
.toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--kb)); transform: translateX(-50%);
  background: #14171f; color: #fff; border-radius: 999px; padding: 10px 16px; font-size: 13px; z-index: 70;
  max-width: calc(100% - 32px);
}
.book__row input[type="date"],
.book__row input[type="time"] { min-height: 28px; }
@media (pointer: coarse) {
  .search input, .book__row input, .book__note, .field input, .field textarea, .field select { font-size: 16px; }
}
@media (max-width: 360px) {
  .loc { font-size: 15px; padding-left: 12px; }
  .cat__name { font-size: 12px; letter-spacing: 0; }
  .sec h2 { font-size: 17px; }
  .svc__body h3 { font-size: 16px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .pill { width: 64px; height: 40px; flex-direction: row; }
  .detail-cover { height: 160px; }
  .detail { padding-bottom: 72px; }
}
@media (min-width: 680px) {
  :root {
    --shell: min(1120px, 100%);
    --bar: min(1104px, calc(100% - 16px));
  }
  .offers { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; }
  .offer { width: auto; }
  .list { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .detail-cover { height: min(38vw, 360px); margin-left: auto; margin-right: auto; max-width: 920px; }
  .detail { max-width: 920px; margin: 0 auto; }
  .book { max-width: 720px; margin: 0 auto; }
  .mask { align-items: center; padding: 24px; }
  .sheet { width: min(560px, 100%); border-radius: 20px; max-height: min(86dvh, 760px); }
}
@media (min-width: 900px) {
  .cats { grid-template-columns: repeat(6, 1fr); }
  .cat__name { font-size: 14px; }
}
@media (min-width: 1100px) {
  .list { grid-template-columns: repeat(3, 1fr); }
  .top { padding-left: 20px; padding-right: 20px; }
  .sec { padding-left: 20px; padding-right: 20px; }
}
@media (min-width: 680px) {
  .book__bar { width: min(720px, 100%); }
}
@media (hover: hover) and (pointer: fine) {
  .cat, .svc, .offer { transition: transform .15s ease, box-shadow .15s ease; }
  .cat:hover { transform: translateY(-2px); }
  .svc:hover, .offer:hover { box-shadow: 0 8px 24px rgba(20, 23, 31, .08); }
}
