/* 页面样式：home / content / mine / protocol / error（由小程序各页 wxss 换算） */

/* ================= 首页 ================= */
.page.home { background: #F5F6F8; }
.home-head {
  flex-shrink: 0;
  padding: max(2rem, env(safe-area-inset-top)) 3.6rem 3.6rem;
  background: var(--mine-head, var(--theme, #FF7D00));
  border-radius: 0 0 4.4rem 4.4rem;
  color: #fff;
}
.home-search {
  display: flex; align-items: center; gap: 1.6rem;
  height: 7.6rem; padding: 0 2.8rem;
  background: #fff; border-radius: 4rem;
  box-shadow: 0 .8rem 2.4rem rgba(0,0,0,.08);
}
.s-ic { font-size: 2.4rem; }
.s-input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 2.7rem; color: #1D2129;
}
.s-input::placeholder { color: #9AB0D8; }
.s-clr {
  width: 3.2rem; height: 3.2rem; border-radius: 50%;
  background: #C9CDD4; color: #fff; font-size: 1.8rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.theme-arco .home { background: #F4F6FA; }
.theme-arco .home-head {
  background: #fff; border-radius: 0; color: #1D2129;
  box-shadow: 0 .2rem 1.2rem rgba(29,33,41,.04);
}
.theme-arco .home-search { background: #EDF2FF; border-radius: 3.8rem; box-shadow: none; }
.theme-arco .home-login-bar { bottom: 16.8rem; }

.load-fail {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.2rem;
}
.lf-t { font-size: 3rem; font-weight: 700; }
.lf-s { font-size: 2.4rem; color: #86909C; margin-bottom: 2.4rem; }
.lf-btn { width: 32rem; }

/* 列表滚动容器链：page(flex) → #home-body(flex:1) → .home-list(overflow-y:auto)
 * 之前 #home-body 是普通 block，高度被内容撑开后超出 #app-shell 被裁切且无滚动容器 */
#home-body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
}
.home-list {
  flex: 1; min-height: 0; width: 100%;
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2.8rem 2.8rem 0;
}
.list-pad { height: 20rem; }
.pd-row {
  display: flex; align-items: center; gap: 2.4rem;
  background: #fff; border-radius: 3.2rem; padding: 2.4rem;
  margin-bottom: 2.4rem; box-shadow: 0 .4rem 2rem rgba(29,33,41,.05);
  cursor: pointer; transition: transform .12s;
}
.pd-row:active, .pd-card:active { transform: scale(.98); }
.pd-thumb {
  width: 13.2rem; height: 13.2rem; border-radius: 2.4rem;
  flex-shrink: 0; background: #F2F3F5; object-fit: cover; object-position: left center;
}
.pd-info { flex: 1; min-width: 0; }
.pd-name {
  font-size: 2.9rem; font-weight: 600; color: #1D2129;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pd-sum {
  font-size: 2.4rem; color: #86909C; line-height: 1.5; margin-top: 1rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pd-arrow { color: #C9CDD4; font-size: 3.4rem; flex-shrink: 0; margin-left: .8rem; }
.pd-card {
  background: #fff; border-radius: 3.2rem; overflow: hidden;
  margin-bottom: 2.4rem; box-shadow: 0 .4rem 2rem rgba(29,33,41,.05);
  cursor: pointer; transition: transform .12s;
}
.pd-cover { width: 100%; display: block; }
.pd-body { padding: 2.4rem 2.6rem 2.6rem; }
.pd-meta { font-size: 2.3rem; color: #86909C; margin-top: 1rem; }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.pd-card.mid { margin-bottom: 0; }
.pd-card.mid .pd-name { font-size: 2.5rem; -webkit-line-clamp: 1; }
.pd-card.mid .pd-body { padding: 1.8rem 2rem 2rem; }

.home-login-bar {
  position: absolute; left: 2.8rem; right: 2.8rem; bottom: 17.6rem; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  background: #fff; border-radius: 3.2rem;
  padding: 2.2rem 2.4rem 2.2rem 3rem;
  box-shadow: 0 1.6rem 4.8rem rgba(29,33,41,.16);
  transition: transform .2s, opacity .2s;
}
.home-login-bar.hidden { transform: translateY(200%); opacity: 0; pointer-events: none; }
.hlb-t { font-size: 2.5rem; color: #4E5969; }
.hlb-btn {
  height: 6.8rem; padding: 0 3.6rem; border-radius: 3.4rem;
  background: var(--brand-grad, var(--theme, #FF7D00));
  box-shadow: var(--btn-shadow, none); color: #fff;
  font-size: 2.6rem; font-weight: 600;
  display: flex; align-items: center; cursor: pointer;
}

/* ================= 内容页 ================= */
.page.content { background: #fff; }
.art-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; }
.detail-cover { position: relative; }
.cover-img { width: 100%; display: block; }
.art-body { padding: 3.6rem 3.6rem 4.8rem; }
.d-meta { display: flex; align-items: center; gap: 1.6rem; }
.d-date { font-size: 2.3rem; color: #86909C; }
.d-title { font-size: 3.8rem; font-weight: 700; line-height: 1.4; margin-top: 2.4rem; color: #1D2129; }
.d-sub-desc { font-size: 2.6rem; color: #4E5969; line-height: 1.7; margin-top: 1.6rem; }
.art-rich { margin-top: 1.2rem; font-size: 2.8rem; color: #4E5969; line-height: 1.85; }
.art-rich img { max-width: 100%; height: auto; display: block; border-radius: .8rem; }
.rich-img { width: 100%; display: block; margin-top: 1.2rem; border-radius: .8rem; cursor: zoom-in; }
.art-pad { height: 4rem; }
/* 训练营长图铺满详情页，去掉标题/圆角，避免与图内文案重复 */
.art-poster { padding: 0; }
.art-poster .rich-img { margin-top: 0; border-radius: 0; }
.art-lock {
  display: flex; flex-direction: column; align-items: center;
  padding: 6rem 0 4rem; gap: 1.4rem; text-align: center;
}
.lock-ic { font-size: 6.4rem; }
.lock-t { font-size: 3rem; font-weight: 700; }
.lock-s { font-size: 2.3rem; color: #86909C; margin-bottom: 2rem; }
.lock-btn { width: 36rem; }
.detail-footer {
  flex-shrink: 0; display: flex; gap: 2.4rem;
  padding: 2.4rem 3.2rem 4rem;
  padding-bottom: max(4rem, env(safe-area-inset-bottom));
  background: #fff; border-top: .2rem solid #F2F3F5;
}
.btn-secondary {
  flex: 1; height: 9.2rem; border-radius: 4.6rem;
  background: #F2F3F5; color: #4E5969;
  font-size: 2.9rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn-secondary:active { background: #E8EAED; }
.btn-primary {
  flex: 1.3; height: 9.2rem; border-radius: 4.6rem;
  background: var(--brand-grad, var(--theme, #FF7D00));
  box-shadow: var(--btn-shadow, none); color: #fff;
  font-size: 2.9rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 1.2rem;
  border: 0; cursor: pointer;
}
.btn-primary:active { transform: scale(.98); }
.claim-btn { flex: 1; }
.off-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 6rem 8rem; }
.off-card {
  width: 100%; background: #fff; border-radius: 3.6rem;
  box-shadow: 0 2rem 6rem rgba(29,33,41,.08);
  padding: 5.2rem 4rem 4.4rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.off-ic { font-size: 6.4rem; margin-bottom: 2rem; }
.off-code {
  font-family: ui-monospace, Consolas, monospace; font-size: 2.1rem; color: #86909C;
  padding: .8rem 2rem; border-radius: 999rem; background: #F7F8FA;
  border: .2rem solid #E5E6EB; margin-bottom: 2.4rem;
}
.off-t { font-size: 3.4rem; font-weight: 700; margin-bottom: 1.2rem; }
.off-d { font-size: 2.5rem; line-height: 1.8; color: #86909C; margin-bottom: 3.6rem; }
.off-card .mp-btn { width: 100%; }

/* ================= 我的 ================= */
.page.mine { background: #F5F6F8; }
.mine-head {
  flex-shrink: 0; padding: max(2rem, env(safe-area-inset-top)) 3.6rem 8.8rem;
  background: var(--mine-head, var(--theme, #FF7D00)); color: #fff;
}
.mine-title { font-size: 3.6rem; font-weight: 700; }
.theme-arco .mine { background: #F4F6FA; }
.theme-arco .mine-head { display: none; }
.theme-arco .mine-body { margin-top: 0; padding-top: 2.8rem; }
.theme-arco .anon-panel { background: linear-gradient(165deg, #E3ECFF 0%, #C3D6FF 60%, #AFC8FF 100%); box-shadow: none; }
.theme-arco .anon-avatar { background: var(--brand-grad, #3E7BFA); border: 0; color: #fff; box-shadow: 0 .8rem 2.4rem rgba(62,123,250,.35); }
.theme-arco .anon-sub, .theme-arco .anon-arrow { color: #6C85B8; }
.theme-arco .avatar { box-shadow: 0 .8rem 2.4rem rgba(62,123,250,.35); }
.mine-body {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  margin-top: -5.2rem; padding: 0 2.8rem;
}
.mine-pad { height: 20rem; }
.user-panel {
  background: #fff; border-radius: 3.6rem; padding: 3.6rem 3.2rem;
  display: flex; align-items: center; gap: 2.6rem;
  box-shadow: 0 .8rem 3.2rem rgba(29,33,41,.06);
}
.avatar {
  width: 10.4rem; height: 10.4rem; border-radius: 50%;
  background: var(--brand-grad, var(--theme, #FF7D00)); color: #fff;
  font-size: 5.2rem; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.avatar-img { width: 100%; height: 100%; }
.user-info { flex: 1; min-width: 0; }
.u-name { font-size: 3.3rem; font-weight: 700; color: #1D2129; }
.u-sub { font-size: 2.4rem; color: #86909C; margin-top: 1rem; }
.anon-panel {
  background: #fff; border-radius: 3.6rem; padding: 3.4rem 3rem;
  display: flex; align-items: center; gap: 2.6rem;
  box-shadow: 0 .8rem 3.2rem rgba(29,33,41,.06); cursor: pointer;
}
.anon-panel:active { transform: scale(.985); }
.anon-avatar {
  width: 10.4rem; height: 10.4rem; border-radius: 50%;
  background: #F5F6F8; border: .2rem solid #E5E6EB;
  font-size: 4.8rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.anon-info { flex: 1; min-width: 0; }
.anon-name { font-size: 3.1rem; font-weight: 600; color: #1D2129; }
.anon-sub { font-size: 2.3rem; color: #86909C; margin-top: 1rem; }
.anon-arrow { margin-left: auto; color: #C9CDD4; font-size: 3.6rem; }
.group {
  background: #fff; border-radius: 3.6rem; margin-top: 2.8rem;
  box-shadow: 0 .4rem 2rem rgba(29,33,41,.05); overflow: hidden;
}
.cell { display: flex; align-items: center; gap: 2rem; padding: 3.2rem 3rem; cursor: pointer; }
.cell:active { background: #FAFBFC; }
.ic {
  width: 6rem; height: 6rem; border-radius: 1.6rem;
  background: var(--brand-soft, rgba(255,125,0,.07));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ic-img { width: 3.2rem; height: 3.2rem; }
.lab { font-size: 2.8rem; font-weight: 500; color: #1D2129; }
.cell .arr { margin-left: auto; color: #C9CDD4; font-size: 3.2rem; }
.cell.danger .ic { background: #F2F3F5; }
.cell.danger .lab { color: #86909C; font-weight: 400; }

.lo-mask {
  position: absolute; inset: 0; z-index: 260;
  background: rgba(29,33,41,.55); display: flex;
  align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .18s;
}
.lo-mask.show { opacity: 1; visibility: visible; pointer-events: auto; }
.lo-dialog { width: 67.4rem; background: #fff; border-radius: 3.2rem; overflow: hidden; }
.lo-title { font-size: 3.3rem; font-weight: 700; color: #1D2129; text-align: center; padding: 4.4rem 3.8rem 0; }
.lo-text { font-size: 2.6rem; color: #4E5969; line-height: 1.75; text-align: left; padding: 2rem 3.8rem 3.6rem; }
.lo-btns { display: flex; border-top: .2rem solid #F2F3F5; }
.lo-btn {
  flex: 1; height: 10rem; line-height: 10rem; text-align: center;
  font-size: 2.9rem; color: #4E5969; cursor: pointer;
}
.lo-btn:active { background: #FAFBFC; }
.lo-btn.ok { color: var(--theme, #FF7D00); font-weight: 600; border-left: .2rem solid #F2F3F5; }

/* ================= 协议页 ================= */
/* 协议页从登录弹层中点开时需盖在弹层之上（z-index 251），返回后弹层原样保留 */
.page.proto { background: #fff; position: relative; z-index: 300; }
.proto-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4.4rem 4rem 6rem; background: #fff; }
.p-title { font-size: 3.6rem; font-weight: 700; color: #1D2129; }
.p-date { font-size: 2.3rem; color: #86909C; margin-top: 1.6rem; }
.proto-rich { font-size: 2.7rem; color: #4E5969; line-height: 1.85; margin-top: 2.4rem; }
.proto-rich p { margin: 0 0 1.4rem; }
.proto-pad { height: 4rem; }
.proto-footer {
  flex-shrink: 0; padding: 2rem 3.2rem 4rem;
  padding-bottom: max(4rem, env(safe-area-inset-bottom));
  background: #fff; border-top: .2rem solid #F2F3F5;
}
.btn-dark {
  height: 9.2rem; border-radius: 4.6rem; width: 100%;
  background: #1D2129; color: #fff;
  font-size: 2.9rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn-dark:active { opacity: .9; }

/* ================= 异常页 ================= */
.page.err { background: var(--bg-grad, var(--theme, #FF7D00)); color: #fff; }
.theme-arco .err, .theme-orange .err { color: #1D2129; background: #F5F6F8; }
.theme-nebula .err { color: #fff; }
.state-body {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 0 6.8rem;
}
.state-icon { font-size: 7.2rem; margin-bottom: 4rem; }
.state-title { font-size: 3.8rem; font-weight: 700; margin-bottom: 2rem; }
.state-sub { font-size: 2.5rem; line-height: 1.8; opacity: .84; }
.state-code {
  margin-top: 3.2rem; font-family: ui-monospace, Consolas, monospace; font-size: 2.2rem;
  padding: 1rem 2.4rem; border-radius: 999rem;
  background: rgba(255,255,255,.16); border: .2rem solid rgba(255,255,255,.28); opacity: .9;
}
.state-actions { width: 100%; margin-top: 5.2rem; display: flex; flex-direction: column; gap: 2rem; }
.state-actions .mp-btn { width: 100%; }
.theme-arco .state-sub, .theme-orange .state-sub { color: #4E5969; opacity: 1; }
.theme-arco .state-code, .theme-orange .state-code {
  background: rgba(29,33,41,.05); border-color: rgba(29,33,41,.12); color: #86909C; opacity: 1;
}
.theme-arco .mp-btn.ghost-dark, .theme-orange .mp-btn.ghost-dark {
  background: #fff; color: #4E5969; border: .2rem solid #E5E6EB;
}
.theme-nebula .state-actions .mp-btn.ghost-dark { background: rgba(255,255,255,.92); color: #4E5969; }
