/* booking-platform 租户前台样式：移动优先，原创高尔夫主题（深绿） */
:root {
  --theme: #1a7a3c;
  --theme-dark: #0f5a28;
  --theme-soft: #e9f4ed;
  --bg: #f2f5f1;
  --card: #ffffff;
  --text: #1d2b22;
  --muted: #7d8b81;
  --line: #e2e9e3;
  --danger: #c0392b;
  --warn: #b45309;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- 头部 ---------- */
.site-header {
  background: linear-gradient(135deg, var(--theme-dark), var(--theme));
  color: #fff;
  padding: calc(16px + env(safe-area-inset-top)) 16px 20px;
}
.site-header .header-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
}
.site-header h1 { font-size: 20px; margin: 0; font-weight: 600; }
.phone-link {
  color: #eaf7ee;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  margin-top: 4px;
}
.phone-link:active { opacity: .8; }
.topnav { margin-left: auto; white-space: nowrap; }
.topnav a {
  color: #fff; font-size: 14px; text-decoration: none;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px; padding: 6px 12px;
}

/* ---------- 主体 ---------- */
main { max-width: 640px; margin: 0 auto; padding: 12px 12px 90px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(20,60,35,.08);
}
.card h2 {
  font-size: 16px; margin: 4px 0 12px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.card h2::before {
  content: ""; width: 4px; height: 16px;
  background: var(--theme); border-radius: 2px;
}
.muted { color: var(--muted); font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0; }
.warn { color: var(--warn); font-size: 14px; }

/* ---------- 日期条 ---------- */
.date-strip {
  display: flex; gap: 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 6px; margin-bottom: 16px;
}
.date-btn {
  flex: 0 0 auto; min-width: 58px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; padding: 8px 6px;
  text-align: center; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
}
.date-btn .wk { font-size: 12px; color: var(--muted); }
.date-btn .md { font-size: 15px; font-weight: 600; }
.date-btn.active {
  background: var(--theme); border-color: var(--theme); color: #fff;
}
.date-btn.active .wk { color: #dff0e4; }

/* ---------- 开球时间选择（下拉框 + 滚轮弹窗） ---------- */
.sub-h { font-size: 15px; font-weight: 600; margin: 16px 0 10px; }
.time-select {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 13px 14px; font-size: 16px; cursor: pointer;
}
.time-select .placeholder { color: #a8b3aa; }
.time-select .chev { color: var(--muted); font-size: 22px; line-height: 1; }
.time-select.disabled { opacity: .55; cursor: not-allowed; }
.surcharge-note {
  color: var(--warn); font-size: 14px; font-weight: 600;
  margin: -6px 0 12px;
}
.time-msg { font-size: 14px; color: var(--muted); margin: 10px 2px; line-height: 1.7; }
select.select {
  width: 100%; padding: 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 16px; background: #fff;
}
#playerNames input {
  width: 100%; padding: 12px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 16px;
}
#playerNames input:focus { outline: 2px solid var(--theme-soft); border-color: var(--theme); }

/* 底部滚轮弹窗 */
.sheet-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end;
}
.sheet-mask[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 640px; margin: 0 auto;
  background: #fff; border-radius: 18px 18px 0 0;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  animation: sheetUp .22s ease;
}
@keyframes sheetUp {
  from { transform: translateY(48px); opacity: .5; }
  to { transform: none; opacity: 1; }
}
.sheet-bar {
  display: flex; align-items: center;
  padding: 10px 6px; border-bottom: 1px solid var(--line);
}
.sheet-title { flex: 1; text-align: center; font-weight: 600; font-size: 17px; }
.sheet-btn {
  background: none; border: none; font-size: 16px;
  color: var(--muted); padding: 10px 18px; cursor: pointer;
}
.sheet-btn.ok { color: var(--theme); font-weight: 700; }
.sheet-btn.ok:disabled { color: #c3ccc5; }
.wheels {
  position: relative; display: flex;
  padding: 6px 30px 0;
}
.wheel-col { flex: 1; position: relative; }
.wheel-colon {
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: var(--muted);
  width: 30px;
}
.wheel {
  height: 220px; overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.wheel::-webkit-scrollbar { display: none; }
.w-item {
  height: 44px; line-height: 44px; text-align: center;
  font-size: 20px; color: var(--text);
  scroll-snap-align: center;
  font-variant-numeric: tabular-nums;
}
.w-item.disabled { color: #c3ccc5; text-decoration: line-through; }
.w-item.sel { font-weight: 700; font-size: 24px; color: var(--theme-dark); }
.wheel-unit {
  position: absolute; right: 16%; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none;
}
.wheel-highlight {
  position: absolute; left: 22px; right: 22px; top: 50%;
  height: 44px; transform: translateY(-50%);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(26,122,60,.05); border-radius: 8px;
  pointer-events: none;
}
.sheet-hint {
  text-align: center; font-size: 14px; min-height: 26px;
  padding: 10px 16px 2px; color: var(--muted);
}
.sheet-hint.ok { color: var(--theme-dark); font-weight: 600; }
.sheet-hint.bad { color: var(--danger); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; font-weight: 500; }
.field input {
  width: 100%; padding: 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 16px; background: #fff;
}
.field input:focus { outline: 2px solid var(--theme-soft); border-color: var(--theme); }
.selected-info {
  background: var(--theme-soft); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; margin-bottom: 12px;
  color: var(--theme-dark);
}
.btn-primary {
  width: 100%; padding: 13px; margin-top: 6px;
  background: var(--theme); color: #fff; border: none;
  border-radius: 10px; font-size: 17px; font-weight: 600; cursor: pointer;
}
.btn-primary:active { background: var(--theme-dark); }
.btn-primary:disabled { background: #9db8a6; cursor: not-allowed; }
.btn-ghost {
  width: 100%; padding: 12px; margin-top: 10px;
  background: #fff; color: var(--theme); border: 1px solid var(--theme);
  border-radius: 10px; font-size: 15px; cursor: pointer;
}
.btn-danger {
  padding: 10px 18px;
  background: var(--danger); color: #fff; border: none;
  border-radius: 10px; font-size: 15px; cursor: pointer;
}

/* ---------- 成功面板 ---------- */
.success-panel { text-align: center; }
.success-check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--theme); color: #fff;
  font-size: 34px; line-height: 64px; margin: 2px auto 6px;
}
.code-card {
  border: 2px dashed var(--theme); border-radius: 14px;
  background: var(--theme-soft);
  padding: 16px; margin: 10px 0 4px;
}
.code-card p { margin: 6px 0 0; font-size: 13px; color: var(--theme-dark); }
.code-big {
  font-size: 56px; font-weight: 700; letter-spacing: 12px;
  color: var(--theme-dark); margin: 4px 0;
  font-variant-numeric: tabular-nums;
}
.summary {
  text-align: left; background: #f8faf8;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 14px; margin: 12px 0;
}
.summary div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.summary span:first-child { color: var(--muted); white-space: nowrap; }
.summary span:last-child { text-align: right; }
.btn-qiudazi {
  display: block; width: 100%; padding: 13px; margin-top: 10px;
  background: #f59e0b; color: #fff; text-decoration: none;
  border-radius: 10px; font-size: 16px; font-weight: 600;
}
.btn-qiudazi:active { opacity: .9; }

/* ---------- 组局卡片（横向滑动） ---------- */
.games-scroll {
  display: flex; gap: 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px; margin: 0 -4px; padding-left: 4px; padding-right: 4px;
}
.g-card2 {
  flex: 0 0 188px; scroll-snap-align: start;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; background: #fff;
  text-decoration: none; color: var(--text); display: block;
}
.g-card2:active { background: #f6faf7; }
.g-t2 { font-size: 27px; font-weight: 700; color: var(--theme-dark); font-variant-numeric: tabular-nums; }
.g-l2 { font-size: 14px; font-weight: 600; margin-top: 2px; }
.g-m2 { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.g-fee { font-size: 13px; color: var(--warn); font-weight: 600; margin-top: 4px; }
.g-go { margin-top: 10px; color: var(--theme); font-weight: 700; font-size: 14px; }

/* ---------- 营销区块 ---------- */
.dark-card {
  background: linear-gradient(135deg, #0e3520, var(--theme));
  color: #fff;
}
.dark-card h2 { color: #fff; }
.dark-card h2::before { background: #ffd76a; }
.stat-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.16);
  font-size: 14px;
}
.stat-row:last-child { border-bottom: none; }
.stat-row .k { opacity: .78; }
.stat-row .v { font-weight: 600; text-align: right; }
.photos-scroll {
  display: flex; gap: 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}
.photos-scroll img {
  height: 130px; width: auto; flex: 0 0 auto;
  border-radius: 10px; object-fit: cover; background: #eef2ee;
}
.nav-links { display: flex; gap: 10px; margin-top: 10px; }
.nav-link {
  flex: 1; text-align: center; text-decoration: none;
  border: 1px solid var(--theme); color: var(--theme);
  border-radius: 10px; padding: 10px; font-size: 15px; font-weight: 600;
}

/* ---------- 4 格确认码 ---------- */
.code-boxes {
  display: flex; gap: 10px; justify-content: center;
  margin: 14px 0;
}
.code-boxes input {
  width: 58px; height: 66px;
  text-align: center; font-size: 30px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 12px;
  font-variant-numeric: tabular-nums;
  caret-color: var(--theme);
}
.code-boxes input:focus { outline: 2px solid var(--theme-soft); border-color: var(--theme); }

/* ---------- 我的预约 ---------- */
.lookup-row { display: flex; gap: 8px; }
.lookup-row input {
  flex: 1; padding: 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 16px;
  letter-spacing: 4px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.lookup-row .btn-primary { width: auto; margin-top: 0; padding: 12px 22px; }
.order-card {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; margin-top: 10px;
}
.order-card .o-main { font-size: 15px; font-weight: 600; }
.order-card .o-sub { font-size: 13px; color: var(--muted); margin: 4px 0 10px; line-height: 1.7; }
.order-card .btn-danger { width: 100%; }
.o-actions { display: flex; gap: 8px; }
.o-actions .btn-small { flex: 1; padding: 9px 6px; font-size: 14px; }
.btn-small {
  padding: 9px 14px; font-size: 14px; border-radius: 8px; cursor: pointer;
  background: #fff; color: var(--theme); border: 1px solid var(--theme);
}
.btn-small.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-small:disabled { opacity: .55; cursor: not-allowed; }
a.btn-small.btn-link {
  display: inline-block; text-align: center; text-decoration: none;
  line-height: 1.6;
}
.back-link {
  display: inline-block; margin: 12px; color: var(--theme);
  text-decoration: none; font-size: 14px;
}

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-box {
  background: #fff; border-radius: 14px;
  padding: 20px; width: 100%; max-width: 360px;
}
.modal-box h3 { margin: 0 0 8px; font-size: 17px; }
.modal-box input {
  width: 100%; padding: 12px; margin: 8px 0;
  border: 1px solid var(--line); border-radius: 10px; font-size: 16px;
}
.modal-actions { display: flex; gap: 10px; margin-top: 10px; }
.modal-actions .btn-ghost { margin-top: 0; }
.modal-actions .btn-danger { flex: 1; }

/* ---------- 浮动入口 / 页脚 ---------- */
.nav-fab {
  position: fixed; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40;
}
.nav-fab a {
  display: inline-block; background: var(--theme); color: #fff;
  text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(15,90,40,.35);
}
footer {
  text-align: center; color: var(--muted); font-size: 13px;
  padding: 8px 16px calc(24px + env(safe-area-inset-bottom));
}
footer p { margin: 4px 0; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 60;
  transform: translate(-50%, 12px);
  background: rgba(20,35,25,.92); color: #fff;
  font-size: 14px; padding: 10px 18px; border-radius: 999px;
  max-width: 86vw; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= 天马风格（ui_variant=tianma 租户专用，tm- 前缀隔离） ================= */
[hidden] { display: none !important; }

/* hero 大图 */
.tm-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  background: #fff;
}
.tm-hero-imgwrap { position: relative; background: #0f2c1a; min-height: 180px; }
.tm-hero img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}
.tm-hero-btns {
  position: absolute; right: 12px; bottom: 12px;
  display: flex; gap: 8px;
}
.tm-pillbtn {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0,0,0,.45); color: #fff;
  font-size: 13px; text-decoration: none;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  cursor: pointer; font-family: inherit;
}
.tm-hero-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px 4px;
}
.tm-hero-bar h2 { margin: 0; font-size: 20px; font-weight: 700; color: #1c1c1c; }
.tm-navbtn {
  display: inline-flex; flex-direction: column; align-items: center;
  font-size: 22px; text-decoration: none; color: #1c1c1c; line-height: 1.2;
}
.tm-navbtn span { font-size: 12px; margin-top: 2px; }
.tm-service:active { opacity: .8; }

/* 球场印象横滑 */
.tm-impress { margin-bottom: 12px; }
.tm-impress h2 {
  font-size: 16px; margin: 4px 0 10px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.tm-impress h2::before {
  content: ""; width: 4px; height: 16px;
  background: var(--theme); border-radius: 2px;
}
.tm-photos {
  display: flex; gap: 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 2px;
}
.tm-photos img {
  flex: 0 0 auto; width: 150px; height: 105px;
  object-fit: cover; border-radius: 10px;
  scroll-snap-align: start;
  background: #dfe8e0;
}

/* 会员 banner（米黄底） */
.tm-member {
  display: flex; align-items: center; gap: 8px;
  background: #fdf6ec;
  border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 12px;
  font-size: 14px; color: var(--text);
}
.tm-v {
  color: #c9a24b; font-weight: 800; font-size: 18px; font-style: italic;
}
.tm-club {
  border: 1px solid #e3c98a; color: #a8842f;
  font-size: 12px; border-radius: 4px; padding: 1px 6px;
  white-space: nowrap;
}
.tm-member-text { flex: 1; }
.tm-member-more {
  border: 0; background: none; color: #e8641b;
  font-size: 14px; padding: 4px 0 4px 8px; white-space: nowrap;
}
.tm-member-more:active { opacity: .7; }

/* 日期价格卡（横滑） */
.tm-date-strip {
  display: flex; gap: 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px;
}
.tm-date-card {
  flex: 0 0 auto; min-width: 86px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 8px;
  font-family: inherit;
}
.tm-date-card .tm-d { font-size: 15px; font-weight: 700; color: var(--text); }
.tm-date-card .tm-w { font-size: 12px; color: var(--muted); }
.tm-date-card .tm-p { font-size: 15px; font-weight: 700; color: #e8641b; margin-top: 2px; }
.tm-date-card.active {
  background: var(--theme); border-color: var(--theme);
}
.tm-date-card.active .tm-d,
.tm-date-card.active .tm-w { color: #fff; }
.tm-date-card.active .tm-p { color: #ffd9a8; }

/* 时段卡 */
.tm-slot-list { display: flex; flex-direction: column; gap: 10px; }
.tm-slot {
  background: #fff; border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(20,60,35,.08);
}
.tm-slot-top { display: flex; align-items: center; gap: 10px; }
.tm-slot-time { font-size: 19px; font-weight: 700; color: var(--text); }
.tm-paytag {
  font-size: 12px; color: #8a8a8a;
  background: #f1f1f1; border-radius: 4px; padding: 2px 8px;
  white-space: nowrap;
}
.tm-slot-desc { font-size: 13px; color: var(--muted); margin-top: 6px; }
.tm-slot-bottom {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
}
.tm-guest { font-size: 14px; color: var(--text); }
.tm-price { font-size: 22px; font-weight: 800; color: #e8641b; }
.tm-coupon {
  font-size: 12px; color: #e8641b;
  border: 1px solid #f0b27e; border-radius: 4px;
  padding: 1px 6px; white-space: nowrap;
}
.tm-book {
  margin-left: auto;
  border: 0; border-radius: 999px;
  background: #f0731a; color: #fff;
  font-size: 15px; font-weight: 600;
  padding: 9px 26px; font-family: inherit;
  white-space: nowrap;
}
.tm-book:active { opacity: .85; }
