:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #758078;
  --green: #183f2d;
  --cream: #f5f2e9;
  --orange: #ee774d;
  --line: #e8e7e1;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #e9ece8; color: var(--ink); }
button { font: inherit; }
.mobile-app { width: min(100%, 430px); min-height: 100dvh; margin: 0 auto; background: #fafaf7; position: relative; padding-bottom: calc(82px + var(--safe-bottom)); }
.page { padding: 0 20px 28px; }
.home-header { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.brand-line { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.brand-line img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; }
.avatar { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #e8eee9; color: var(--green); font-weight: 700; }
.welcome { padding: 16px 0 22px; }
.welcome p, .welcome span { margin: 0; color: var(--muted); font-size: 13px; }
.welcome h1 { margin: 8px 0 7px; font-family: Georgia, "Songti SC", serif; font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.membership-card { position: relative; overflow: hidden; padding: 22px; border-radius: 24px; color: #fff; background: radial-gradient(circle at 95% 5%, rgba(238,119,77,.58), transparent 32%), linear-gradient(145deg, #244f39, #142a20); box-shadow: 0 18px 40px rgba(24,63,45,.2); }
.membership-card::after { content: ""; position: absolute; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: -72px; bottom: -108px; }
.membership-top, .membership-meta, .days-row { display: flex; align-items: center; justify-content: space-between; }
.membership-label { font-size: 13px; letter-spacing: .06em; color: rgba(255,255,255,.82); }
.membership-badge { padding: 5px 9px; border-radius: 20px; background: rgba(255,255,255,.12); font-size: 11px; }
.days-row { margin: 22px 0 20px; align-items: end; }
.days-row strong { font-family: Georgia, serif; font-size: 48px; line-height: .9; font-weight: 500; }
.days-row div span { margin-left: 5px; font-size: 14px; }
.days-row p { margin: 0 0 4px; color: rgba(255,255,255,.65); font-size: 12px; }
.membership-meta { border-top: 1px solid rgba(255,255,255,.14); padding-top: 15px; font-size: 11px; color: rgba(255,255,255,.64); }
.section-block { margin-top: 28px; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 13px; }
.section-title h2 { margin: 4px 0 0; font-size: 19px; }
.eyebrow { color: var(--orange); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.section-title button { border: 0; background: none; color: var(--muted); font-size: 12px; }
.class-card { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); background: #fff; border-radius: 18px; }
.date-tile { width: 52px; height: 56px; flex: 0 0 52px; border-radius: 14px; display: grid; place-content: center; text-align: center; background: var(--cream); }
.date-tile strong { font-size: 21px; line-height: 1; }
.date-tile span { margin-top: 4px; font-size: 10px; color: var(--muted); }
.class-info { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 6px; }
.class-info strong { font-size: 14px; }
.class-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.status-pill { padding: 6px 8px; border-radius: 16px; background: #e9f2ec; color: var(--green); font-size: 10px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.quick-grid button { min-width: 0; padding: 16px; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); }
.quick-grid.group-only { grid-template-columns: 1fr; }
.quick-grid.group-only button { min-height: 76px; }
.quick-grid strong { align-self: end; font-size: 13px; }
.quick-grid small { grid-column: 2; color: var(--muted); white-space: nowrap; font-size: 9px; }
.quick-icon { grid-row: 1 / 3; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; font-weight: 700; }
.quick-icon.warm { background: #fff0e9; color: var(--orange); }
.quick-icon.green { background: #e9f2ec; color: var(--green); }
.quick-icon.cool { background: #e9f2ec; color: var(--green); }
.bottom-nav { position: fixed; z-index: 10; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 430px); height: calc(68px + var(--safe-bottom)); padding: 8px 12px var(--safe-bottom); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); }
.bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: none; color: #98a099; font-size: 10px; }
.bottom-nav .mobile-nav-icon { width: 22px; height: 22px; display: grid; place-items: center; }
.bottom-nav .mobile-nav-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav button.active { color: var(--green); font-weight: 700; }

.app-loading { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.app-loading img { width: 50px; height: 50px; border-radius: 14px; object-fit: cover; animation: breathe 1.6s ease-in-out infinite; }
.all-bookings { width: 100%; margin-top: 14px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 16px; background: var(--cream); color: var(--ink); }
.all-bookings span { font-size: 12px; color: var(--muted); }
.all-bookings strong { font-size: 12px; }
.all-bookings b { margin-left: 8px; color: var(--orange); }
.page-header { display: grid; grid-template-columns: 40px 1fr 40px; gap: 10px; align-items: center; padding: 19px 0 17px; }
.page-header > div { text-align: center; }
.page-header h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 22px; font-weight: 600; }
.page-header p { margin: 4px -24px 0; color: var(--muted); font-size: 9px; white-space: nowrap; }
.brand-mini, .mini-avatar { width: 38px; height: 38px; border: 0; border-radius: 50%; display: grid; place-items: center; }
.brand-mini { background: transparent; }
.brand-mini img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; }
.mini-avatar { background: #e8eee9; color: var(--green); font-weight: 700; }
.date-strip { margin: 2px -4px 20px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.date-strip button { padding: 9px 2px; border: 0; border-radius: 20px; display: flex; flex-direction: column; gap: 7px; align-items: center; background: transparent; color: var(--muted); }
.date-strip span { font-size: 9px; }
.date-strip strong { font-size: 14px; }
.date-strip button.active { background: var(--green); color: #fff; }
.course-list, .booking-list { display: grid; gap: 12px; }
.course-item { width: 100%; padding: 17px 12px; display: grid; grid-template-columns: 54px 1fr 18px; gap: 14px; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--ink); }
.course-time { align-self: stretch; padding-right: 12px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.course-time strong { font-family: Georgia, serif; font-size: 17px; }
.course-time span { margin-top: 6px; color: var(--muted); font-size: 9px; }
.course-main { min-width: 0; }
.course-main h2 { margin: 5px 0 7px; font-size: 16px; }
.course-main p, .course-main small { margin: 0; color: var(--muted); font-size: 10px; }
.course-tag { color: var(--orange); font-size: 9px; font-weight: 700; }
.course-arrow { color: #adb4ae; font-size: 24px; }
.capacity { height: 4px; margin: 11px 0 7px; border-radius: 6px; overflow: hidden; background: #edf0ed; }
.capacity i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--orange), #f3a06f); }
.capacity.large { height: 7px; margin-top: 18px; }
.empty-state { min-height: 138px; padding: 24px; display: grid; place-content: center; justify-items: center; border: 1px dashed #dfe2dd; border-radius: 18px; color: var(--muted); text-align: center; }
.empty-state span { font-size: 22px; color: #b7c3ba; }
.empty-state strong { margin-top: 7px; color: var(--ink); font-size: 13px; }
.empty-state p { margin: 5px 0 0; font-size: 10px; }
.detail-header { height: 66px; display: flex; align-items: center; justify-content: space-between; }
.detail-header button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font-size: 19px; }
.detail-header span { font-weight: 700; font-size: 14px; }
.detail-header i { width: 36px; }
.hero-detail { margin: 5px -20px 20px; padding: 36px 24px; background: radial-gradient(circle at 92% 0, rgba(238,119,77,.48), transparent 30%), linear-gradient(140deg, #244f39, #142a20); color: #fff; }
.hero-detail span { color: rgba(255,255,255,.62); font-size: 11px; }
.hero-detail h1 { margin: 11px 0 8px; font-family: Georgia, "Songti SC", serif; font-size: 30px; }
.hero-detail p { margin: 0; color: rgba(255,255,255,.75); font-size: 12px; }
.detail-panel { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.detail-row { min-height: 42px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f0ec; }
.detail-row:last-of-type { border-bottom: 0; }
.detail-row span { color: var(--muted); font-size: 11px; }
.detail-row strong { font-size: 12px; }
.capacity-note { margin: 10px 0 0; color: var(--muted); font-size: 10px; }
.rule-note { margin-top: 14px; padding: 16px 18px; border-radius: 16px; background: #f3efe5; }
.rule-note strong { font-size: 12px; }
.rule-note p { margin: 6px 0 0; color: #7f796d; font-size: 10px; line-height: 1.7; }
.sticky-action { position: sticky; bottom: calc(66px + var(--safe-bottom)); padding: 16px 0 4px; background: linear-gradient(transparent, #fafaf7 25%); }
.primary-action { width: 100%; min-height: 50px; border: 0; border-radius: 16px; background: var(--green); color: #fff; font-weight: 700; box-shadow: 0 12px 24px rgba(24,63,45,.18); }
.primary-action:disabled { background: #c4cbc6; box-shadow: none; }
.coach-list h2 { margin: 8px 0 12px; font-size: 14px; }
.coach-scroll { margin: 0 -20px; padding: 0 20px 8px; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.coach-card { width: 140px; flex: 0 0 140px; padding: 14px; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: 19px auto; text-align: left; border: 1px solid var(--line); border-radius: 17px; background: #fff; color: var(--ink); }
.coach-card > span { grid-row: 1 / 3; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #e9f2ec; color: var(--green); font-weight: 700; }
.coach-card strong { padding-left: 8px; font-size: 12px; }
.coach-card small { padding-left: 8px; color: var(--muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coach-card.active { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.private-date { margin: 14px 0 22px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; border-radius: 15px; background: var(--cream); }
.private-date label { font-size: 11px; font-weight: 700; }
.private-date input { border: 0; background: transparent; color: var(--green); font: inherit; font-size: 11px; }
.slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot-grid button { padding: 11px 3px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 11px; }
.slot-grid button.active { border-color: var(--green); background: var(--green); color: #fff; }
.slot-grid button.disabled { background: #f1f2ef; color: #c2c6c2; text-decoration: line-through; }
.private-next { margin-top: 22px; }
.private-confirm { padding: 24px 0 26px; display: grid; justify-items: center; }
.coach-portrait { width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #e5eee7, #bdd0c1); color: var(--green); font-size: 28px; font-weight: 700; }
.private-confirm p { margin: 13px 0 4px; color: var(--orange); font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.private-confirm h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 25px; }
.private-confirm small { margin-top: 6px; color: var(--muted); }
.note-field { margin-top: 14px; display: block; color: var(--muted); font-size: 10px; }
.note-field textarea { width: 100%; min-height: 78px; margin-top: 8px; padding: 12px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.segment { margin: 4px 0 20px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; background: #ebece7; }
.segment button { padding: 10px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 12px; }
.segment button.active { background: #fff; color: var(--green); font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.booking-card { position: relative; padding: 16px; display: grid; grid-template-columns: 52px 1fr; gap: 14px; border: 1px solid var(--line); border-radius: 19px; background: #fff; }
.booking-date { width: 50px; height: 54px; display: grid; place-content: center; text-align: center; border-radius: 13px; background: #fff0e9; color: var(--orange); }
.booking-date.private { background: #e9f2ec; color: var(--green); }
.booking-date strong { font-size: 20px; line-height: 1; }
.booking-date span { margin-top: 4px; font-size: 9px; }
.booking-main { min-width: 0; }
.booking-main h2 { margin: 4px 0 5px; font-size: 15px; }
.booking-main p, .booking-main small { margin: 0; color: var(--muted); font-size: 10px; }
.booking-main small { display: block; margin-top: 5px; }
.status-text { color: var(--green); font-size: 9px; font-weight: 700; }
.status-text.waitlisted { color: var(--orange); }
.status-text.canceled { color: #a0a5a1; }
.cancel-link { position: absolute; right: 13px; top: 13px; border: 0; background: none; color: #9a9e99; font-size: 10px; }
.profile-head { padding: 32px 2px 24px; display: flex; align-items: center; gap: 15px; }
.profile-avatar { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #e8eee9; color: var(--green); font-size: 20px; font-weight: 700; }
.profile-head h1 { margin: 0 0 5px; font-family: Georgia, "Songti SC", serif; font-size: 24px; }
.profile-head p { margin: 0; color: var(--muted); font-size: 11px; }
.profile-menu { margin-top: 18px; border: 1px solid var(--line); border-radius: 19px; overflow: hidden; background: #fff; }
.profile-menu > button, .profile-menu > div { width: 100%; min-height: 68px; padding: 12px 15px; display: grid; grid-template-columns: 38px 1fr 20px; gap: 10px; align-items: center; text-align: left; border: 0; border-bottom: 1px solid #efefeb; background: transparent; color: var(--ink); }
.profile-menu > div { grid-template-columns: 38px 1fr; }
.profile-menu > :last-child { border-bottom: 0; }
.profile-menu > * > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--cream); color: var(--green); font-weight: 700; }
.profile-menu section, .profile-menu button div { display: flex; flex-direction: column; gap: 5px; }
.profile-menu strong { font-size: 12px; }
.profile-menu small { color: var(--muted); font-size: 9px; }
.profile-menu b { color: #b7bcb8; font-size: 20px; }
.logout-button { width: 100%; margin: 18px 0; padding: 14px; border: 0; border-radius: 14px; background: #f0f0ec; color: #787e79; }
.login-page { min-height: 100dvh; padding: 34px 24px 20px; display: flex; flex-direction: column; background: radial-gradient(circle at 95% 2%, #e7d4c4, transparent 29%), #fafaf7; }
.login-brand { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.login-brand img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.login-copy { margin: 74px 0 34px; }
.login-copy > span { color: var(--orange); font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.login-copy h1 { margin: 9px 0 8px; font-family: Georgia, "Songti SC", serif; font-size: 35px; font-weight: 500; }
.login-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.login-form { display: grid; gap: 18px; }
.login-form label { color: #616a63; font-size: 11px; font-weight: 700; }
.login-form input { width: 100%; height: 48px; margin-top: 7px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; outline: none; background: #fff; font: inherit; }
.login-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(24,63,45,.08); }
.code-input { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
.code-input button { height: 48px; margin-top: 7px; border: 1px solid #cad4cc; border-radius: 13px; background: #edf3ee; color: var(--green); font-size: 10px; }
.demo-code { min-height: 14px; margin: -10px 0 0; color: var(--orange); font-size: 10px; }
.demo-entry { margin-top: 13px; padding: 13px; border: 0; background: none; color: var(--green); font-size: 11px; text-decoration: underline; }
.login-page footer { margin-top: auto; padding-top: 24px; text-align: center; color: #aaaFAA; font-size: 9px; }
.mobile-toast { position: fixed; z-index: 50; left: 50%; bottom: calc(88px + var(--safe-bottom)); transform: translate(-50%, 20px); max-width: 330px; padding: 10px 15px; border-radius: 18px; opacity: 0; pointer-events: none; background: rgba(20,31,25,.92); color: #fff; font-size: 11px; transition: .2s ease; }
.mobile-toast.show { opacity: 1; transform: translate(-50%, 0); }
.membership-card.invalid { background: linear-gradient(145deg, #777e79, #4d544f); }

@keyframes breathe { 50% { transform: scale(1.08); opacity: .72; } }

@media (max-width: 360px) {
  .page { padding-inline: 16px; }
  .quick-grid { grid-template-columns: 1fr; }
}
