/* ============================================================
   高职单招规划平台 · 移动端优先（微信内 H5 适配）
   浅色主题 · 深蓝主色
   ============================================================ */
:root {
  --bg: #f2f5fa;
  --card: #ffffff;
  --ink: #111c33;
  --ink-2: #5a6a85;
  --ink-3: #97a4b8;
  --line: #e9eef7;
  --brand: #1f4fd8;
  --brand-2: #3f86ff;
  --brand-deep: #16307a;
  --brand-soft: #eaf0ff;
  --teal: #00b39a;
  --amber: #ff9f1c;
  --danger: #e5484d;
  --shadow: 0 8px 24px rgba(15, 30, 70, .06);
  --shadow-lg: 0 18px 50px rgba(15, 30, 70, .16);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 58px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

body.is-locked { overflow: hidden; }

button { font-family: inherit; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; touch-action: manipulation; }
input, textarea { font-family: inherit; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
b, strong { font-weight: 700; }
em { font-style: normal; }

.app {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 8px);
  background: var(--bg);
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.logo {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  display: grid; place-items: center;
  color: #fff; font-size: 16px; font-weight: 800;
  background: linear-gradient(140deg, #2f6bff, #16307a);
  box-shadow: 0 6px 14px rgba(31, 79, 216, .28);
}
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-txt strong { font-size: 14.5px; letter-spacing: -.2px; }
.brand-txt span { font-size: 10.5px; color: var(--ink-3); letter-spacing: .2px; white-space: nowrap; }

.points-pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 29px; padding: 0 11px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.points-pill:active { transform: scale(.96); }

/* ---------------- 视图 ---------------- */
main { padding: 12px 16px 4px; }
.view { display: none; }
.view.is-active { display: block; animation: rise .32s ease both; }
.view[data-view="book"] { padding-bottom: 78px; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 16px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #1b3a8c 0%, #2358d8 55%, #3f86ff 100%);
  box-shadow: 0 14px 34px rgba(22, 48, 122, .28);
}
.hero-glow {
  position: absolute;
  width: 220px; height: 220px;
  right: -70px; top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}
.hero-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .3px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .22);
}
.hero h1 {
  margin-top: 10px;
  font-size: 25px;
  line-height: 1.28;
  letter-spacing: -.6px;
  font-weight: 800;
}
.hero-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.hero-head h1 {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
}
.hero-qr {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 6px 5px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(10, 25, 70, .22);
}
.hero-qr img {
  display: block;
  width: 72px; height: 72px;
  border-radius: 8px;
  -webkit-touch-callout: default;
}
.hero-qr span {
  font-size: 9.5px;
  color: #1b3a8c;
  font-weight: 600;
  letter-spacing: .2px;
}
.hero > p {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .8);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 16px;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .1);
}
.hero-stats > div { text-align: center; }
.hero-stats b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 10.5px; color: rgba(255, 255, 255, .72); }

/* ---------------- 地点 ---------------- */
.loc-card {
  display: flex; gap: 11px;
  margin-top: 12px;
  padding: 13px 14px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.loc-icon {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 11px;
  display: grid; place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
}
.loc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.loc-body b { font-size: 13.5px; }
.loc-body span { font-size: 11.5px; color: var(--ink-2); line-height: 1.45; }

/* ---------------- 区块标题 ---------------- */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 18px 2px 9px;
}
.sec-head h2 { font-size: 15px; letter-spacing: -.2px; }
.sec-tip { font-size: 11.5px; color: var(--ink-3); }

/* ---------------- 日期条 ---------------- */
.day-strip {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto;
  width: 56px;
  padding: 8px 0 7px;
  border-radius: 14px;
  background: var(--card);
  border: 1.5px solid transparent;
  box-shadow: 0 4px 12px rgba(15, 30, 70, .05);
  text-align: center;
  scroll-snap-align: start;
  transition: all .18s ease;
}
.day-chip span { display: block; font-size: 10.5px; color: var(--ink-3); }
.day-chip b { display: block; font-size: 16px; margin-top: 1px; font-variant-numeric: tabular-nums; }
.day-chip i { display: block; font-size: 9.5px; font-style: normal; color: var(--ink-3); margin-top: 1px; }
.day-chip.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.day-chip.is-active span, .day-chip.is-active b, .day-chip.is-active i { color: var(--brand); }
.day-chip.is-today i { color: var(--teal); }

/* ---------------- 时段 ---------------- */
.slot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.slot {
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1.5px solid var(--line);
  text-align: left;
  transition: all .16s ease;
}
.slot b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.slot span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.slot.is-active { border-color: var(--brand); background: var(--brand-soft); }
.slot.is-active b { color: var(--brand); }
.slot.is-disabled { opacity: .45; }
.slot.is-disabled span { color: var(--danger); }
.slot.is-mine b::after {
  content: "已约";
  margin-left: 6px;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--teal);
  color: #fff;
  vertical-align: 2px;
}
.loading-line { grid-column: 1 / -1; padding: 18px; text-align: center; color: var(--ink-3); font-size: 12.5px; }

/* ---------------- 须知 ---------------- */
.rule-note {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #f7f9fe;
  border: 1px dashed #d8e2f6;
}
.rule-note b { font-size: 12.5px; color: var(--ink-2); }
.rule-note ul { margin-top: 6px; }
.rule-note li {
  position: relative;
  padding-left: 12px;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink-2);
}
.rule-note li::before {
  content: "";
  position: absolute; left: 0; top: 8px;
  width: 4px; height: 4px; border-radius: 50%;
  background: #b9c7de;
}
.rule-note em { color: var(--brand); font-weight: 700; }

/* ---------------- 通用卡片 ---------------- */
.card {
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; }
.page-head { margin: 4px 2px 14px; }
.page-head h1 { font-size: 21px; letter-spacing: -.5px; font-weight: 800; }
.page-head p { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }

/* ---------------- 打卡 ---------------- */
.checkin-card { text-align: center; padding-top: 20px; }
.ring-wrap { position: relative; width: 148px; height: 148px; margin: 0 auto; }
.ring { width: 148px; height: 148px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.ring-bg { stroke: #eef2f9; }
.ring-fg {
  stroke: var(--brand);
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .9s cubic-bezier(.22, 1, .36, 1);
}
.ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
}
.ring-center b { font-size: 38px; line-height: 1; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.ring-center span { font-size: 10.5px; color: var(--ink-3); }

.week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin: 16px 0 18px;
}
.week-cell {
  padding: 6px 0 7px;
  border-radius: 10px;
  background: #f6f8fd;
  text-align: center;
}
.week-cell span { display: block; font-size: 9.5px; color: var(--ink-3); }
.week-cell i {
  display: grid; place-items: center;
  width: 18px; height: 18px; margin: 4px auto 0;
  border-radius: 50%;
  background: #e2e8f4;
  color: transparent;
  font-size: 10px; font-style: normal; font-weight: 700;
}
.week-cell.is-done { background: #e9fbf6; }
.week-cell.is-done i { background: var(--teal); color: #fff; }
.week-cell.is-today { box-shadow: inset 0 0 0 1.5px var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 18px;
  border-radius: 13px;
  font-size: 14px; font-weight: 600;
  transition: transform .12s ease, opacity .18s ease, background .18s ease;
}
.btn:active { transform: scale(.97); }
.btn-lg { width: 100%; height: 48px; font-size: 15px; border-radius: 15px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2b62f0, #1f4fd8);
  box-shadow: 0 10px 22px rgba(31, 79, 216, .26);
}
.btn-primary[disabled], .btn-primary.is-busy {
  opacity: .55;
  box-shadow: none;
}
.btn-ghost {
  background: #fff;
  color: var(--ink-2);
  border: 1px solid var(--line);
  height: 38px;
  font-size: 13px;
}
.mini-tip { margin-top: 10px; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }

.milestone { display: flex; gap: 7px; flex-wrap: wrap; }
.mile {
  flex: 1 1 0;
  min-width: 74px;
  padding: 9px 6px;
  border-radius: 12px;
  background: #f7f9fe;
  text-align: center;
  border: 1px solid #eef2fa;
}
.mile b { display: block; font-size: 12.5px; }
.mile span { font-size: 10.5px; color: var(--ink-3); }
.mile.is-hit { background: #e9fbf6; border-color: #c9f0e7; }
.mile.is-hit b { color: var(--teal); }

.rule-list { margin-top: 4px; }
.rule-list li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--ink-2); line-height: 1.9;
}
.dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 8px; flex: 0 0 6px; }
.dot-brand { background: var(--brand); }
.dot-teal { background: var(--teal); }
.dot-amber { background: var(--amber); }

/* ---------------- 抽奖 ---------------- */
.lottery-card { text-align: center; padding: 18px 16px 16px; }
.wheel-outer {
  position: relative;
  width: 78vw;
  max-width: 300px;
  height: 78vw;
  max-height: 300px;
  margin: 6px auto 0;
}
.wheel {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 6px #fff, 0 14px 34px rgba(15, 30, 70, .14);
  overflow: hidden;
  will-change: transform;
}
.wheel canvas { width: 100%; height: 100%; display: block; }
.wheel-pin {
  position: absolute;
  top: -9px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(160deg, #ff7a59, #e5484d);
  box-shadow: 0 6px 14px rgba(229, 72, 77, .4);
}
.wheel-pin svg { transform: translateY(1px); }
.wheel-btn {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 82px; height: 82px;
  border-radius: 50%;
  background: linear-gradient(150deg, #ffffff, #eef3ff);
  border: 4px solid #fff;
  box-shadow: 0 8px 22px rgba(22, 48, 122, .22), inset 0 0 0 1px rgba(31, 79, 216, .12);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 2;
}
.wheel-btn b { font-size: 16px; color: var(--brand); letter-spacing: -.3px; }
.wheel-btn span { font-size: 9px; color: var(--ink-3); margin-top: 1px; }
.wheel-btn:active { transform: translate(-50%, -50%) scale(.95); }
.wheel-btn[disabled] { opacity: .6; }
.wheel-balance { margin-top: 16px; font-size: 12.5px; color: var(--ink-2); }
.wheel-balance b { color: var(--brand); font-size: 17px; font-variant-numeric: tabular-nums; }

.prize-list { display: flex; flex-direction: column; gap: 8px; }
.prize-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: #f8fafd;
}
.prize-chip {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand);
}
.prize-row .p-main { flex: 1 1 auto; min-width: 0; }
.prize-row .p-main b { display: block; font-size: 13px; }
.prize-row .p-main span { font-size: 10.5px; color: var(--ink-3); }
.prize-row .p-time { font-size: 10.5px; color: var(--ink-3); flex: 0 0 auto; }
.empty-mini {
  padding: 16px 4px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
}

/* ---------------- 我的 ---------------- */
.points-card {
  color: #fff;
  background: linear-gradient(135deg, #1b3a8c, #2b62f0 70%, #3f86ff);
  box-shadow: 0 16px 34px rgba(22, 48, 122, .26);
}
.points-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.pts-label { font-size: 11.5px; color: rgba(255, 255, 255, .74); }
.pts-value { display: flex; align-items: baseline; gap: 3px; margin-top: 2px; }
.pts-value b { font-size: 34px; line-height: 1.1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.pts-value i { font-size: 12px; font-style: normal; color: rgba(255, 255, 255, .72); }
.avatar {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 17px; font-weight: 700;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .24);
}
.points-card-name { margin-top: 12px; font-size: 15px; font-weight: 700; }
.points-card-phone { font-size: 11.5px; color: rgba(255, 255, 255, .72); margin-top: 1px; }
.points-card-actions { display: flex; gap: 8px; margin-top: 14px; }
.points-card-actions .btn-ghost {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
  height: 36px;
}

.book-row {
  display: flex; gap: 10px;
  padding: 11px 12px;
  border-radius: 13px;
  background: #f8fafd;
  margin-bottom: 8px;
}
.book-date {
  flex: 0 0 auto;
  width: 62px;
  text-align: center;
  padding-right: 8px;
  border-right: 1px dashed #dbe3f1;
}
.book-date b { display: block; font-size: 17px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.book-date span { display: block; font-size: 9.5px; color: var(--ink-3); white-space: nowrap; margin-top: 2px; }
.book-main { flex: 1 1 auto; min-width: 0; }
.book-line { display: flex; align-items: center; gap: 5px; }
.book-line b { font-size: 13px; font-variant-numeric: tabular-nums; }
.book-main > span { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.badge {
  display: inline-block;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #e9fbf6;
  color: #0a7f6b;
  vertical-align: 1px;
  margin-left: 5px;
  white-space: nowrap;
}
.book-line .badge { margin-left: 0; }
.badge.is-off { background: #eef1f7; color: var(--ink-3); }
.book-cancel {
  align-self: center;
  font-size: 11px;
  color: var(--ink-3);
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.log-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid #f2f5fb;
}
.log-row:last-child { border-bottom: 0; }
.log-row .l-main { min-width: 0; }
.log-row .l-main b { display: block; font-size: 12.5px; font-weight: 600; }
.log-row .l-main span { font-size: 10px; color: var(--ink-3); }
.log-row .l-delta { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.l-delta.is-plus { color: var(--teal); }
.l-delta.is-minus { color: var(--ink-2); }

.brand-foot { text-align: center; padding: 18px 14px; background: transparent; box-shadow: none; }
.brand-foot b { display: block; font-size: 12.5px; }
.brand-foot span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.brand-foot .foot-muted { font-size: 10px; margin-top: 8px; color: #aab6c8; }

/* ---------------- 底部预约条 ---------------- */
.cta-dock {
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: calc(var(--tab-h) + var(--safe-b));
  width: 100%;
  max-width: 560px;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(15, 30, 70, .05);
  z-index: 18;
}
.cta-dock[hidden] { display: none; }
.cta-info { flex: 1 1 auto; min-width: 0; }
.cta-info b { display: block; font-size: 13px; }
.cta-info span { font-size: 11px; color: var(--ink-3); }
.cta-dock .btn { flex: 0 0 auto; height: 44px; padding: 0 22px; }

/* ---------------- Tab ---------------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: 0;
  width: 100%;
  max-width: 560px;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  z-index: 30;
}
.tab {
  flex: 1 1 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: #a9b5c7;
  font-size: 10px;
  transition: color .16s ease;
}
.tab svg { display: block; }
.tab.is-active { color: var(--brand); }
.tab:active { transform: scale(.95); }

/* ---------------- 遮罩 / 弹层 ---------------- */
.mask {
  position: fixed; inset: 0;
  background: rgba(9, 18, 38, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
  z-index: 40;
}
.mask.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 102%);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 18px calc(20px + var(--safe-b));
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 40px rgba(9, 18, 38, .18);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
  z-index: 45;
}
.sheet.is-open { transform: translate(-50%, 0); }
.sheet-handle {
  width: 38px; height: 4px;
  margin: 2px auto 12px;
  border-radius: 999px;
  background: #e2e8f2;
}
.auth-head h2 { font-size: 19px; letter-spacing: -.4px; }
.auth-head p { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
#formSheet .auth-head { margin-bottom: 16px; }

.seg {
  display: flex; gap: 4px;
  padding: 3px;
  margin: 14px 0 16px;
  border-radius: 12px;
  background: #f3f6fc;
}
.seg-btn {
  flex: 1 1 0;
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-2);
  transition: all .18s ease;
}
.seg-btn.is-active {
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 30, 70, .08);
}

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 13px;
  font-size: 16px;
  color: var(--ink);
  background: #f7f9fd;
  border: 1.5px solid transparent;
  border-radius: 13px;
  outline: none;
  transition: border-color .18s ease, background .18s ease;
  -webkit-appearance: none;
}
.field input::placeholder, .field textarea::placeholder { color: #aab6c8; font-size: 14px; }
.field input:focus, .field textarea:focus { border-color: var(--brand); background: #fff; }
.field textarea { resize: none; font-size: 14px; line-height: 1.6; }

.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1 1 auto; letter-spacing: 2px; }
.code-btn {
  flex: 0 0 auto;
  min-width: 104px;
  padding: 0 12px;
  border-radius: 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  transition: opacity .18s ease;
}
.code-btn[disabled] { opacity: .55; color: var(--ink-3); background: #f0f3f9; }

.reg-gift {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #fff8ec;
  border: 1px solid #ffe6bf;
  font-size: 11.5px;
  color: #8a5a00;
  line-height: 1.5;
}
.reg-gift b { color: #d97706; }
.gift-badge {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--amber);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.form-err {
  font-size: 12px;
  color: var(--danger);
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fdf0f0;
}
.form-err[hidden] { display: none; }

.link-btn {
  display: block;
  margin: 12px auto 0;
  font-size: 12.5px;
  color: var(--brand);
  padding: 4px 8px;
}
.agree { margin-top: 10px; font-size: 10.5px; color: #aab6c8; text-align: center; line-height: 1.6; }

.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 12.5px;
  background: #f7f9fd;
  border: 1.5px solid transparent;
  color: var(--ink-2);
}
.chip.is-active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* ---------------- 弹窗 ---------------- */
.modal {
  position: fixed; inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 18, 38, .5);
  z-index: 60;
}
.modal.is-open { display: flex; }
.prize-modal-card, .ok-modal-card {
  position: relative;
  width: 100%;
  max-width: 300px;
  padding: 22px 20px 18px;
  border-radius: 22px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: pop .34s cubic-bezier(.22, 1.2, .36, 1) both;
  overflow: hidden;
}
@keyframes pop {
  from { opacity: 0; transform: scale(.88) translateY(10px); }
  to { opacity: 1; transform: none; }
}
.prize-badge, .ok-icon {
  width: 62px; height: 62px;
  margin: 2px auto 12px;
  border-radius: 20px;
  display: grid; place-items: center;
  font-size: 30px;
  background: linear-gradient(140deg, #fff4d6, #ffe2a8);
}
.ok-icon { color: var(--teal); background: #e9fbf6; }
.prize-modal-card h3, .ok-modal-card h3 { font-size: 18px; letter-spacing: -.3px; }
.prize-modal-card p, .ok-modal-card p {
  font-size: 12.5px;
  color: var(--ink-2);
  margin: 6px 0 16px;
  line-height: 1.6;
}
.ok-detail {
  text-align: left;
  padding: 11px 13px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #f7f9fd;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.8;
}
.ok-detail b { color: var(--ink); }
.confetti {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, #ffd166 2px, transparent 2.4px),
    radial-gradient(circle, #4d8dff 2px, transparent 2.4px),
    radial-gradient(circle, #00b39a 2px, transparent 2.4px);
  background-size: 60px 60px, 76px 76px, 92px 92px;
  background-position: 8px 12px, 38px 46px, 62px 6px;
  opacity: .22;
  animation: drift 6s linear infinite;
}
@keyframes drift {
  from { background-position: 8px 12px, 38px 46px, 62px 6px; }
  to { background-position: 8px 132px, 38px 166px, 62px 126px; }
}

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%) scale(.94);
  max-width: 76vw;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(17, 28, 51, .92);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 80;
  backdrop-filter: blur(6px);
}
.toast.is-show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.toast.is-ok { background: rgba(10, 127, 107, .94); }
.toast.is-err { background: rgba(199, 46, 51, .94); }

/* ---------------- 桌面端 ---------------- */
@media (min-width: 600px) {
  body { background: #e7ecf5; }
  .app {
    box-shadow: 0 0 0 1px rgba(15, 30, 70, .06), 0 24px 60px rgba(15, 30, 70, .1);
    min-height: 100vh;
  }
  .hero h1 { font-size: 27px; }
}

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

/* ==================== 家长问答 ==================== */
.faq-search {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  height: 44px;
  box-shadow: var(--shadow);
  color: var(--ink-3);
}
.faq-search input {
  flex: 1 1 auto; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font-size: 16px; color: var(--ink);
  height: 100%;
}
.faq-search input::placeholder { color: var(--ink-3); font-size: 13px; }
.faq-search input::-webkit-search-cancel-button { display: none; }
.faq-search button {
  flex: 0 0 auto;
  width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: #eef2f9; color: var(--ink-2);
  font-size: 15px; line-height: 1; padding: 0;
}

.faq-chips {
  display: flex; gap: 8px;
  overflow-x: auto;
  margin: 12px -16px 0;
  padding: 0 16px 2px;
  scrollbar-width: none;
}
.faq-chips::-webkit-scrollbar { display: none; }
.faq-chip {
  flex: 0 0 auto;
  height: 32px; padding: 0 13px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  white-space: nowrap;
  transition: all .16s ease;
}
.faq-chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}

.faq-note {
  margin: 12px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f9ff;
  border: 1px dashed #d9e2f7;
  font-size: 11px; line-height: 1.6; color: var(--ink-2);
}
.faq-note b { color: var(--brand); margin-right: 4px; }

.faq-cat {
  margin-top: 18px;
  display: flex; align-items: baseline; gap: 8px;
}
.faq-cat-ico { font-size: 15px; }
.faq-cat b { font-size: 15px; letter-spacing: -.2px; }
.faq-cat span { font-size: 11px; color: var(--ink-3); }
.faq-cat-count {
  margin-left: auto;
  font-size: 10.5px; color: var(--ink-3);
}

.faq-item {
  margin-top: 8px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.faq-item.is-open {
  border-color: #cddcfb;
  box-shadow: 0 6px 18px rgba(31, 79, 216, .08);
}
.faq-q {
  width: 100%;
  display: flex; align-items: flex-start; gap: 8px;
  padding: 13px 12px;
  border: 0; background: transparent;
  text-align: left;
  font-size: 13.5px; line-height: 1.5; color: var(--ink);
  font-weight: 600;
}
.faq-q .q-no {
  flex: 0 0 auto;
  min-width: 18px; height: 18px;
  margin-top: 1px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.faq-q .q-txt { flex: 1 1 auto; min-width: 0; }
.faq-q .q-arrow {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--ink-3);
  transition: transform .2s ease;
}
.faq-item.is-open .q-arrow { transform: rotate(180deg); color: var(--brand); }
.faq-a {
  display: none;
  padding: 0 12px 14px 38px;
  font-size: 12.8px; line-height: 1.78; color: var(--ink-2);
  animation: rise .2s ease both;
}
.faq-item.is-open .faq-a { display: block; }

.faq-empty {
  margin-top: 18px;
  padding: 26px 12px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
}

.faq-cta {
  margin: 20px 0 6px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f4fd8, #3f86ff);
  color: #fff;
  box-shadow: 0 12px 28px rgba(31, 79, 216, .22);
}
.faq-cta b { display: block; font-size: 15px; }
.faq-cta span { display: block; margin: 6px 0 12px; font-size: 12px; line-height: 1.65; opacity: .9; }
.faq-cta .btn { width: 100%; background: #fff; color: var(--brand); font-weight: 700; height: 42px; }

/* ==================== 进校申请提示 / 我的预约提示 ==================== */
.entry-note {
  margin: 4px 0 14px;
  padding: 11px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff8ec, #fff3e0);
  border: 1px solid #ffe1b8;
}
.entry-note b {
  display: block;
  font-size: 12.5px;
  color: #a35a00;
  margin-bottom: 3px;
}
.entry-note span {
  display: block;
  font-size: 11px;
  line-height: 1.65;
  color: #8a6a3a;
}

.my-booking-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid #cfdcfb;
}
.my-booking-tip .mb-ico {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: #fff;
  color: var(--brand);
  font-size: 15px;
}
.my-booking-tip .mb-main { flex: 1 1 auto; min-width: 0; }
.my-booking-tip b { display: block; font-size: 12.5px; color: var(--brand-deep); }
.my-booking-tip span { display: block; font-size: 11px; color: var(--ink-2); margin-top: 1px; }

/* ==================== 预约成功弹窗（含老师微信） ==================== */
.bookok-card {
  position: relative;
  width: 100%;
  max-width: 330px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 18px 18px;
  border-radius: 22px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: pop .34s cubic-bezier(.22, 1.2, .36, 1) both;
}
.bookok-card h3 { font-size: 18px; letter-spacing: -.3px; }
.bookok-card > p {
  font-size: 12.5px;
  color: var(--ink-2);
  margin: 6px 0 12px;
  line-height: 1.6;
}
.bookok-detail {
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #f7f9fd;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.85;
}
.bookok-detail b { color: var(--ink); }
.bookok-detail .bk-time {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-deep);
  margin-bottom: 2px;
}
.qr-box {
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f6f9ff, #eef4ff);
  border: 1px dashed #c8d8f8;
  margin-bottom: 14px;
}
.qr-head b { display: block; font-size: 13px; color: var(--brand-deep); }
.qr-head span { display: block; font-size: 10.5px; color: var(--ink-2); margin-top: 2px; }
.qr-box img {
  display: block;
  width: 190px; height: 190px;
  margin: 10px auto 6px;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 4px 14px rgba(15, 30, 70, .1);
  -webkit-touch-callout: default;
}
.qr-tip {
  font-size: 10.5px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
}

/* ==================== 奶茶每日额度 ==================== */
.milk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff6ec, #ffeedd);
  border: 1px solid #ffd9b0;
}
.milk-ico { font-size: 18px; line-height: 1; }
.milk-txt { flex: 1 1 auto; min-width: 0; }
.milk-txt b { display: block; font-size: 12px; color: #a35a00; }
.milk-txt span { display: block; font-size: 10.5px; color: #96703c; margin-top: 1px; }
.milk-dots { display: flex; gap: 3px; flex: 0 0 auto; }
.milk-dots i {
  width: 9px; height: 9px;
  border-radius: 3px;
  background: #ffd9b0;
}
.milk-dots i.is-taken { background: #ff9f1c; }

/* ==================== 奖品概率表 ==================== */
.odds { display: grid; gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; }
.odds-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: #fff;
  font-size: 12px;
}
.odds-row .o-name { flex: 1 1 auto; min-width: 0; color: var(--ink); }
.odds-row .o-bar {
  flex: 0 0 88px;
  height: 5px;
  border-radius: 3px;
  background: #eef2f9;
  overflow: hidden;
}
.odds-row .o-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
}
.odds-row .o-pct {
  flex: 0 0 40px;
  text-align: right;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.odds-row.is-drink .o-name::after {
  content: ' · 每日 5 杯';
  color: var(--amber);
  font-size: 10.5px;
}

/* 已领取的奖品记录 */
.prize-row.is-used .prize-chip { background: #eef2f9; color: var(--ink-3); }
.prize-row.is-used .p-main b { color: var(--ink-3); }

/* 小屏（≤340px）：标题与二维码同步缩小，避免标题掉字 */
@media (max-width: 340px) {
  .hero h1 { font-size: 22px; letter-spacing: -.4px; }
  .hero-qr img { width: 62px; height: 62px; }
  .hero-qr span { font-size: 9px; }
  .hero-qr { padding: 5px 5px 4px; }
}
