/* =====================================================================
   家长端 H5（移动优先）
   设计语言与 PC 后台一致：活力橙 #FF8A3D / 天空青 #4ECDC4 / 柠檬黄 #FFD93D
   手机外壳：宽屏居中 430px，窄屏全宽
   ===================================================================== */
body.h5 {
  background:
    radial-gradient(900px 460px at 12% 6%, #FFF2E5 0%, rgba(255, 249, 240, 0) 62%),
    radial-gradient(820px 420px at 88% 92%, #E7F8F6 0%, rgba(255, 249, 240, 0) 60%),
    #F5EFE6;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}
.phone {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
@media (min-width: 620px) {
  body.h5 { align-items: center; padding: 28px 0; }
  .phone { min-height: auto; height: 880px; max-height: 92vh; border-radius: 30px;
    box-shadow: 0 24px 70px rgba(150, 122, 96, .22), 0 0 0 1px rgba(255, 255, 255, .6);
    overflow: hidden; }
}

/* ------------------------------ 通用 ------------------------------ */
.h5-main { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 20px; -webkit-overflow-scrolling: touch; }
.h5-main::-webkit-scrollbar { width: 0; }

.h5-page { animation: h5in .22s ease; }
@keyframes h5in { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }

.h5-sec { padding: 0 16px; margin-top: 16px; }
.h5-sec__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.h5-sec__title { font-size: 15px; font-weight: 600; }
.h5-sec__title::before { content: ''; display: inline-block; width: 3px; height: 13px; border-radius: 2px;
  background: var(--brand); margin-right: 7px; vertical-align: -1px; }
.h5-sec__more { font-size: 12px; color: var(--text-3); }

.h5-card { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 2px 10px rgba(168, 141, 112, .07); }

/* ------------------------------ 顶部导航 ------------------------------ */
.h5-nav {
  height: 50px; display: flex; align-items: center; padding: 0 14px; gap: 10px;
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.h5-nav__back { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); border: none;
  display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text-2); }
.h5-nav__title { font-size: 16px; font-weight: 600; flex: 1; }
.h5-nav__act { font-size: 13px; color: var(--text-3); }

/* ------------------------------ 首页头部 ------------------------------ */
.h5-hero {
  padding: 18px 16px 62px;
  background: linear-gradient(150deg, #FF9A54 0%, #FF7A26 55%, #F4620F 100%);
  color: #fff; position: relative; overflow: hidden;
}
.h5-hero::before { content: ''; position: absolute; right: -50px; top: -60px; width: 190px; height: 190px;
  border-radius: 50%; background: rgba(255, 255, 255, .13); }
.h5-hero::after { content: ''; position: absolute; right: 46px; top: 44px; width: 90px; height: 90px;
  border-radius: 50%; background: rgba(255, 255, 255, .1); }
.h5-hero__row { display: flex; align-items: center; gap: 11px; position: relative; z-index: 1; }
.h5-avatar { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .25);
  border: 1.5px solid rgba(255, 255, 255, .55); display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; flex: 0 0 42px; }
.h5-hero__name { font-size: 16px; font-weight: 600; }
.h5-hero__meta { font-size: 11.5px; opacity: .88; }
/* 所属机构徽标：校区名可能很长（如"金牌培优邹城校区"），超宽省略号兜底，不许撑破头部 */
.h5-hero__org { display: inline-block; max-width: 100%; margin-top: 4px; padding: 1px 8px;
  border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: 11.5px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; vertical-align: middle; }
.h5-lvl { display: inline-flex; align-items: center; height: 19px; padding: 0 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .26); font-size: 11px; margin-left: 6px; vertical-align: 1px; }
.h5-hero__pts { margin-top: 16px; position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 6px; }
.h5-hero__pts b { font-size: 34px; font-weight: 700; letter-spacing: -1px; line-height: 1;
  font-variant-numeric: tabular-nums; }
.h5-hero__pts span { font-size: 12px; opacity: .9; padding-bottom: 4px; }

/* 悬浮数据卡 */
.h5-float {
  margin: -46px 16px 0; background: #fff; border-radius: 16px; padding: 16px 8px;
  box-shadow: 0 8px 26px rgba(168, 141, 112, .16); position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.h5-float__i { text-align: center; }
.h5-float__v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.h5-float__l { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ------------------------------ 目标进度 ------------------------------ */
.h5-goal { display: flex; align-items: center; gap: 14px; }
.h5-goal__bar { flex: 1; }
.h5-goal__track { height: 10px; background: #F6F2EC; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.h5-goal__fill { height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #FFC38A, #FF8A3D); transition: width .7s cubic-bezier(.2, .8, .3, 1); }

/* ------------------------------ 快捷入口 ------------------------------ */
.h5-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.h5-quick__i { text-align: center; padding: 12px 4px; border-radius: 12px; background: #fff;
  box-shadow: 0 2px 8px rgba(168, 141, 112, .07); cursor: pointer; transition: transform .12s ease; }
.h5-quick__i:active { transform: scale(.95); }
.h5-quick__ico { font-size: 22px; display: block; margin-bottom: 5px; }
.h5-quick__t { font-size: 11.5px; color: var(--text-2); }

/* ------------------------------ 提醒条 ------------------------------ */
.h5-alert { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-radius: 12px;
  font-size: 12.5px; line-height: 1.5; }
.h5-alert--warn { background: var(--lemon-light); color: #8A6A00; }
.h5-alert--mint { background: var(--mint-light); color: #16786F; }

/* ------------------------------ 海报 ------------------------------ */
.h5-posters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.h5-poster { border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(168, 141, 112, .1);
  cursor: pointer; position: relative; border: 2px solid transparent; transition: all .16s ease; }
.h5-poster.active { border-color: var(--brand); }
.h5-poster__cover { height: 92px; position: relative; display: flex; align-items: center; justify-content: center;
  color: #fff; padding: 8px; text-align: center; }
.h5-poster__cover b { font-size: 12.5px; display: block; line-height: 1.35; }
.h5-poster__cover i { font-size: 10px; opacity: .9; font-style: normal; display: block; margin-top: 4px; }
.h5-poster__name { font-size: 11px; padding: 6px 7px; color: var(--text-2); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 自定义上传海报直接显示原图；内置模板用配色块示意 */
.h5-poster__cover { padding: 0; overflow: hidden; }
.h5-poster__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h5-poster__art { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 8px; text-align: center; color: #fff; }
.h5-poster__size { font-size: 10px; text-align: center; color: var(--text-4); padding: 0 0 6px;
  font-variant-numeric: tabular-nums; }

/* ------------------------------ 列表行 ------------------------------ */
.h5-row { display: flex; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.h5-row:last-child { border-bottom: none; }
.h5-row__ico { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center;
  justify-content: center; font-size: 17px; flex: 0 0 36px; background: var(--brand-light); }
.h5-row__main { flex: 1; min-width: 0; }
.h5-row__t { font-size: 13.5px; }
.h5-row__d { font-size: 11.5px; color: var(--text-3); }
.h5-row__r { text-align: right; font-size: 12px; color: var(--text-3); }
/* 机构名长度不可控（"金牌培优邹城旗舰校区"这种），超长单行省略，别把左边标签挤没 */
.h5-row__r--org { max-width: 52%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ------------------------------ 成单跟踪 ------------------------------ */
.h5-track { position: relative; padding-left: 20px; }
.h5-track::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px;
  background: var(--line-strong); border-radius: 2px; }
.h5-track__i { position: relative; padding: 12px 0; }
.h5-track__dot { position: absolute; left: -20px; top: 17px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--brand); box-sizing: border-box; }
.h5-track__dot--done { border-color: var(--success); background: var(--success); }
.h5-track__dot--gray { border-color: var(--text-4); }
.h5-track__card { background: #fff; border-radius: 12px; padding: 12px 13px;
  box-shadow: 0 2px 8px rgba(168, 141, 112, .07); }

/* ------------------------------ 商城 ------------------------------ */
.h5-cats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; }
.h5-cats::-webkit-scrollbar { height: 0; }
.h5-cat { flex: 0 0 auto; height: 30px; padding: 0 14px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line-strong); font-size: 12.5px; color: var(--text-2); display: flex;
  align-items: center; cursor: pointer; transition: all .16s ease; }
.h5-cat.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }

.h5-goods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.h5-good { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(168, 141, 112, .08);
  cursor: pointer; transition: transform .12s ease; position: relative; }
.h5-good:active { transform: scale(.98); }
.h5-good__cover { height: 84px; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.h5-good__body { padding: 9px 10px 11px; }
.h5-good__name { font-size: 13px; font-weight: 500; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.h5-good__foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 7px; }
.h5-good__pts { font-size: 15px; font-weight: 700; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.h5-good__pts i { font-size: 10.5px; font-weight: 500; font-style: normal; margin-left: 2px; }
.h5-good__sold { font-size: 10.5px; color: var(--text-3); }
.h5-good__badge { position: absolute; left: 0; top: 8px; height: 19px; padding: 0 7px; line-height: 19px;
  font-size: 10.5px; color: #fff; background: var(--brand); border-radius: 0 999px 999px 0; }

/* ------------------------------ 我的 ------------------------------ */
.h5-me-head { padding: 20px 16px 54px; background: linear-gradient(150deg, #63D8CF 0%, #3FBDB4 100%);
  color: #fff; position: relative; overflow: hidden; }
.h5-me-head::before { content: ''; position: absolute; left: -40px; bottom: -60px; width: 170px; height: 170px;
  border-radius: 50%; background: rgba(255, 255, 255, .12); }
.h5-me-list { margin: -40px 16px 0; background: #fff; border-radius: 14px; padding: 4px 14px;
  box-shadow: 0 8px 24px rgba(168, 141, 112, .13); position: relative; z-index: 2; }

/* ------------------------------ 底部标签栏 ------------------------------ */
.tabbar {
  height: 56px; background: #fff; border-top: 1px solid var(--line);
  display: flex; align-items: stretch; flex: 0 0 56px; z-index: 30;
}
.tabbar__i { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10.5px; color: var(--text-4); cursor: pointer; user-select: none; position: relative; }
.tabbar__i.on { color: var(--brand-dark); font-weight: 600; }
.tabbar__ico { font-size: 19px; line-height: 1; }
.tabbar__dot { position: absolute; top: 6px; right: 50%; margin-right: -20px; min-width: 15px; height: 15px;
  padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px;
  line-height: 15px; text-align: center; font-weight: 600; }

/* ------------------------------ 登录页 ------------------------------ */
.h5-login { padding: 44px 26px 30px; min-height: 100%; display: flex; flex-direction: column; }
.h5-login__brand { text-align: center; margin-bottom: 34px; }
.h5-login__mark { width: 62px; height: 62px; border-radius: 20px; margin: 0 auto 14px;
  background: linear-gradient(135deg, #FFB37A, #FF7A26); color: #fff; font-size: 27px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(255, 122, 38, .32); }
.h5-login__title { font-size: 19px; font-weight: 700; }
.h5-login__sub { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.h5-code-row { display: flex; gap: 9px; }
.h5-code-row .input { flex: 1; }
.h5-code-btn { flex: 0 0 106px; height: 38px; border-radius: var(--radius); border: 1px solid var(--brand);
  background: var(--brand-light); color: var(--brand-dark); font-size: 12.5px; font-weight: 500; }
.h5-code-btn:disabled { border-color: var(--line-strong); background: var(--surface-2); color: var(--text-4); }

/* 登录方式切换：验证码登录 / 密码登录 */
.h5-tabs { display: flex; gap: 6px; background: var(--surface-2); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.h5-tab { flex: 1; height: 36px; border: 0; border-radius: 9px; background: transparent;
  color: var(--text-3); font-size: 13.5px; font-weight: 500; }
.h5-tab.on { background: var(--surface); color: var(--brand-dark); font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
/* 密码「显示/隐藏」按钮：沿用验证码按钮的观感，但不需要那么宽 */
.h5-eye-btn { flex: 0 0 62px; }
/* 文字链按钮（忘记密码） */
.h5-link { border: 0; background: transparent; color: var(--brand-dark); font-size: 12.5px; padding: 6px 8px; }

/* ------------------------------ 空态 / 底部按钮 ------------------------------ */
.h5-empty { padding: 56px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.h5-empty__i { font-size: 38px; display: block; margin-bottom: 12px; opacity: .45; }
.h5-foot { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.h5-tip { font-size: 11px; color: var(--text-3); line-height: 1.8; text-align: center; }

/* 兑换弹窗内的收货信息 */
.h5-form-row { display: flex; gap: 10px; }
.h5-form-row > * { flex: 1; }

/* 积分流水行 */
.h5-txn { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.h5-txn:last-child { border-bottom: none; }
.h5-txn__amt { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.h5-txn__amt--in { color: var(--danger); }
.h5-txn__amt--out { color: var(--success); }

/* 核销码 */
.h5-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 22px; font-weight: 700;
  letter-spacing: 4px; color: var(--brand-dark); background: var(--brand-light); border-radius: 12px;
  padding: 14px; text-align: center; margin: 12px 0; }

/* ------------------------------ 底部弹层 ------------------------------ */
.h5-mask { position: fixed; inset: 0; background: rgba(51, 45, 38, .4); z-index: 900;
  display: flex; align-items: flex-end; justify-content: center; animation: fade .16s ease;
  padding: 0; }
@media (min-width: 620px) { .h5-mask { align-items: center; padding: 24px; } }

.h5-sheet { width: 100%; max-width: 430px; background: #fff; border-radius: 20px 20px 0 0;
  max-height: 86vh; display: flex; flex-direction: column; overflow: hidden;
  animation: sheetUp .26s cubic-bezier(.2, .8, .3, 1);
  padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 620px) { .h5-sheet { border-radius: 20px; max-height: 80vh; } }
@keyframes sheetUp { from { transform: translateY(26px); opacity: .5 } to { transform: none; opacity: 1 } }

.h5-sheet__head { padding: 18px 20px 10px; display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; }
.h5-sheet__head b { font-weight: 600; }
.h5-sheet__x { border: none; background: none; font-size: 22px; line-height: 1; color: var(--text-3);
  padding: 0 2px; }
.h5-sheet__body { padding: 4px 20px 20px; overflow-y: auto; flex: 1; }
.h5-sheet__foot { padding: 12px 20px 20px; display: flex; flex-direction: column; gap: 9px;
  border-top: 1px solid var(--line); background: #fff; }
.h5-sheet__foot .btn { height: 44px; }

/* 占位（登录页底部留白） */
.spot { height: 4px; }
