:root {
  --bg: #eceaf6;
  --surface: #ffffff;
  --line: #dbe2ef;
  --text: #17233f;
  --muted: #7788a3;
  --brand: #6a26d8;
  --brand-soft: #ece2ff;
  --primary: #4f84fb;
  --ok: #24a86b;
  --danger: #ef5a74;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.hidden {
  display: none !important;
}

.mobile-login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
}

.mobile-login-card {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 22px;
}

.mobile-login-card h1 {
  margin: 0;
  font-size: 1.6rem;
}

.mobile-login-card p {
  margin: 6px 0 16px;
  color: var(--muted);
}

.mobile-login-card form {
  display: grid;
  gap: 10px;
}

.mobile-login-card input,
.mobile-login-card button,
.date-toolbar input,
.date-toolbar button,
.danger-btn {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  font-size: 16px;
}

.mobile-login-card button {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

.mobile-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

.mobile-app {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr 72px;
  background: var(--bg);
}

.mobile-main {
  overflow: auto;
  padding: 0;
}

.mobile-view {
  display: none;
}

.mobile-view.active {
  display: block;
}

.home-shell {
  padding: calc(14px + env(safe-area-inset-top)) 14px 16px;
}

.home-classic {
  padding: calc(14px + env(safe-area-inset-top)) 14px 16px;
}

.home-hero-card {
  border-radius: 22px;
  padding: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.06) 34%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(160deg, #6e73f2 0%, #7168e8 45%, #8f98ff 100%);
}

.home-hero-kicker {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.95;
}

.home-hero-card h3 {
  margin: 8px 0 0;
  font-size: 1.3rem;
  line-height: 1.3;
}

.home-hero-sub {
  margin: 8px 0 0;
  font-size: 0.86rem;
  opacity: 0.9;
}

.home-hero-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-hero-tags span {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.73rem;
}

.home-mini-metrics {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.home-mini-card {
  border: 1px solid #dce4f5;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.home-mini-card span {
  color: #6b7f9f;
  font-size: 0.75rem;
}

.home-mini-card strong {
  display: block;
  margin-top: 6px;
  color: #17233f;
  font-size: 1.25rem;
}

.welcome-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.welcome-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid var(--brand);
  background: radial-gradient(circle at 35% 30%, #ffe2c4 0%, #f4ba95 42%, #b97f63 100%);
  position: relative;
}

.avatar-mark::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #2ad063;
}

.welcome-kicker {
  margin: 0;
  letter-spacing: 1px;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--brand);
}

.welcome-left h3 {
  margin: 2px 0 0;
  font-size: 2rem;
  line-height: 1.06;
}

.weekly-head,
.classes-head {
  margin-top: 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.weekly-head h4,
.classes-head h4 {
  margin: 0;
  font-size: 1.02rem;
}

.weekly-head span,
.classes-head button {
  color: var(--brand);
  font-weight: 700;
}

.home-preview-head {
  margin-top: 12px;
}

.classes-head button {
  border: 0;
  background: transparent;
  font-size: 0.95rem;
  padding: 0;
}

.week-strip {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.week-strip::-webkit-scrollbar {
  display: none;
}

.week-pill {
  flex: 0 0 auto;
  width: 86px;
  min-height: 110px;
  border-radius: 24px;
  border: 1px solid #dde5f3;
  background: #fff;
  color: #95a6bf;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.week-pill span {
  font-size: 0.78rem;
  font-weight: 700;
}

.week-pill strong {
  font-size: 1.18rem;
  color: #17233f;
}

.week-pill i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(106, 38, 216, 0.1);
  color: var(--brand);
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
}

.week-pill.active {
  background: linear-gradient(170deg, #6f2ce0 0%, #5f24cd 100%);
  color: #d9c5ff;
  border-color: #6429d6;
}

.week-pill.active strong {
  color: #fff;
}

.week-pill.active i {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.class-list {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.home-class-card {
  border: 1px solid #e0e7f5;
  border-radius: 22px;
  background: #fff;
  padding: 14px;
  display: block;
}

.home-level {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.8px;
}

.home-class-main h5 {
  margin: 12px 0 0;
  font-size: 2rem;
  line-height: 1.08;
}

.home-time {
  margin: 8px 0 0;
  font-size: 0.98rem;
  color: #6f809d;
}

.home-card-foot {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #eef2f8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-coach {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #344764;
  font-size: 0.98rem;
}

.home-action {
  height: 42px;
  min-width: 120px;
  border-radius: 42px;
  border: 1px solid var(--brand);
  font-size: 0.98rem;
  font-weight: 800;
  background: linear-gradient(145deg, #6f2ce0 0%, #5f24cd 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-action.is-done {
  background: #e9f8f0;
  border-color: #bfe8d1;
  color: var(--ok);
}

.membership-card {
  margin-top: 14px;
  border-radius: 24px;
  background: linear-gradient(145deg, #6f2ce0 0%, #5d1fca 100%);
  color: #fff;
  padding: 18px;
}

.membership-card span {
  display: block;
  font-size: 0.88rem;
  letter-spacing: 1.8px;
  opacity: 0.86;
}

.membership-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.85rem;
}

.membership-card p {
  margin: 6px 0 0;
  font-size: 1.05rem;
  opacity: 0.9;
}

.schedule-item,
.empty-box,
.mobile-card {
  border: 1px solid #dce4f5;
  border-radius: 12px;
  background: #fff;
}

.schedule-item {
  margin-bottom: 10px;
  padding: 12px;
}

.schedule-line-1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.schedule-theme {
  font-size: 1rem;
  font-weight: 700;
  color: #24385f;
}

.schedule-time {
  margin: 6px 0 0;
  color: #6d819f;
  font-size: 0.92rem;
}

.schedule-member {
  margin: 4px 0 0;
  color: #24385f;
  font-size: 0.92rem;
}

.card-action-btn {
  height: 36px;
  min-width: 86px;
  border-radius: 36px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-action-btn.is-done {
  background: #e9f8f0;
  border-color: #bfe8d1;
  color: var(--ok);
}

.empty-box {
  text-align: center;
  color: #6d819f;
  padding: 18px 12px;
}

.me-card,
.stats-card {
  margin: calc(12px + env(safe-area-inset-top)) 12px 12px;
  padding: 12px;
}

.me-card h3,
.stats-card h3 {
  margin: 0;
}

.me-card p,
.stats-card p {
  margin: 8px 0 0;
  color: #6d819f;
}

.danger-btn {
  width: calc(100% - 24px);
  margin: 0 12px 12px;
  color: var(--danger);
}

.mobile-tabbar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid #d7dff0;
  background: #fff;
}

.tab-btn {
  height: 52px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9aaac4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
}

.tab-icon {
  color: inherit;
  line-height: 1;
  width: 22px;
  height: 22px;
}

.tab-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tab-text {
  font-size: 0.76rem;
  font-weight: 700;
  color: #8f9eb7;
}

.tab-btn.active {
  background: transparent;
  color: var(--brand);
}

.tab-btn.active .tab-text {
  color: var(--brand);
}

@media (max-width: 380px) {
  .welcome-left h3 {
    font-size: 1.68rem;
  }

  .home-class-main h5 {
    font-size: 1.6rem;
  }

  .week-pill {
    width: 80px;
  }
}
