/* ==========================================================================
   星月屿云错题 · 学生端首页 v10
   11.png 蓝色蒙版背景 + 顶部/底部全宽吸顶 + 自由横向滚动
   ========================================================================== */

/* ---------- 背景 ---------- */
body.sh-home {
  background: #0a1020 !important;
}
body.sh-home #bgLayer {
  background-image: url('/static/img/bg11.webp') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  opacity: 1 !important;
  z-index: 0 !important;
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
}

/* 内容层要在背景之上 */
body.sh-home .stage,
body.sh-home .app,
body.sh-home .main,
body.sh-home #view {
  position: relative !important;
  z-index: 2 !important;
  background: transparent !important;
}
body.sh-home #bgLayer::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    linear-gradient(165deg,
      rgba(22,119,255,.34) 0%,
      rgba(64,150,255,.24) 26%,
      rgba(120,190,255,.16) 52%,
      rgba(22,119,255,.30) 100%),
    radial-gradient(circle 700px at 15% 10%,rgba(105,177,255,.22),transparent 62%),
    radial-gradient(circle 600px at 88% 92%,rgba(22,119,255,.18),transparent 60%) !important;
}

/* 首页隐藏全局 appbar 和 tabbar */
body.sh-home .appbar { display: none !important; }
body.sh-home .tabbar { display: none !important; }

body.sh-home .app {
  height: 100vh !important;
  overflow: hidden !important;
}
body.sh-home .main {
  padding: 0 !important;
  height: 100vh !important;
  overflow: hidden !important;
  max-width: none !important;
}

/* ---------- 外壳 ---------- */
.shx {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.shx svg { display: block; flex: 0 0 auto; }

/* ---------- 顶部：全宽吸顶 ---------- */
.shx-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border-bottom: 1px solid rgba(22,119,255,.14);
  box-shadow: 0 2px 18px -8px rgba(9,88,217,.28);
  z-index: 30;
}

/* 品牌 */
.shx-brand {
  display: flex; align-items: center; gap: 10px;
  flex: 0 0 auto; padding-right: 16px;
  border-right: 1px solid #e6eefa; cursor: pointer;
}
.shx-brand-ico {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg,#1677ff,#4096ff);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 5px 16px -5px rgba(22,119,255,.62);
  flex: 0 0 38px;
}
.shx-brand-ico svg { width: 20px; height: 20px; }
.shx-brand-name {
  font-size: 16.5px; font-weight: 850;
  letter-spacing: -.02em; white-space: nowrap; color: #1d2129;
}

/* 用户 */
.shx-user {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 16px 0 5px;
  border-radius: 99px; background: #f0f7ff;
  border: 1px solid #e6eefa; cursor: pointer;
  transition: all .18s; flex: 0 0 auto;
  font-family: inherit;
}
.shx-user:hover { background: #e8f3ff; border-color: rgba(22,119,255,.34); }
.shx-user-ava {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg,#dcebff,#c4ddff);
  display: grid; place-items: center; color: #1677ff;
  flex: 0 0 36px; font-size: 17px;
}
.shx-user-ava svg { width: 19px; height: 19px; }
.shx-user-name {
  font-size: 13.5px; font-weight: 800; line-height: 1.2;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap; color: #1d2129;
}
.shx-vip {
  font-size: 9px; font-weight: 900; padding: 1.5px 5px; border-radius: 3px;
  background: linear-gradient(135deg,#ffd666,#ffa940); color: #7a4100;
  line-height: 1.5;
}
.shx-user-meta {
  font-size: 11px; color: #86909c;
  display: flex; align-items: center; gap: 5px;
  margin-top: 1px; white-space: nowrap;
}
.shx-role { color: #1677ff; font-weight: 750; }
.shx-cls {
  padding: 0 6px; border-radius: 3px; background: #fff;
  color: #1677ff; font-weight: 700; font-size: 10px;
}

.shx-grow { flex: 1 1 auto; min-width: 10px; }

/* 钱包 */
.shx-wallets { display: flex; gap: 8px; flex: 0 0 auto; }
.shx-w {
  display: flex; align-items: center; gap: 7px;
  height: 44px; padding: 0 13px;
  border-radius: 12px; background: #fff;
  border: 1px solid #e6eefa; cursor: pointer;
  transition: all .18s; font-family: inherit;
}
.shx-w:hover {
  border-color: rgba(22,119,255,.4); transform: translateY(-2px);
  box-shadow: 0 6px 18px -6px rgba(22,119,255,.3);
}
.shx-w-ico {
  width: 25px; height: 25px; border-radius: 7px;
  display: grid; place-items: center; flex: 0 0 25px;
}
.shx-w-ico svg { width: 15px; height: 15px; }
.shx-w-ico--blue { background: #e8f3ff; color: #1677ff; }
.shx-w-ico--gold { background: #fff7e6; color: #d48806; }
.shx-w-ico--silver { background: #f0f4f9; color: #7a8fa6; }
.shx-w-txt { display: flex; flex-direction: column; line-height: 1.15; }
.shx-w-txt b { font-size: 9.5px; color: #86909c; font-weight: 650; }
.shx-w-txt i {
  font-size: 15px; font-weight: 850; font-style: normal;
  color: #1d2129; font-variant-numeric: tabular-nums;
}
.shx-w-plus {
  width: 20px; height: 20px; border-radius: 50%;
  background: #1677ff; color: #fff;
  display: grid; place-items: center; flex: 0 0 20px;
}

/* 图标按钮 */
.shx-ibtn {
  position: relative;
  width: 44px; height: 44px;
  border: 1px solid #e6eefa; border-radius: 12px;
  background: #fff; color: #4e5969;
  display: grid; place-items: center;
  cursor: pointer; transition: all .18s; flex: 0 0 44px;
  font-family: inherit;
}
.shx-ibtn:hover {
  background: #f0f7ff; color: #1677ff;
  border-color: rgba(22,119,255,.34);
}
.shx-ibtn svg { width: 20px; height: 20px; }
.shx-ibtn-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #f53f3f; border: 1.5px solid #fff;
}

/* ---------- 中部：自由横向滚动 ---------- */
.shx-board {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 14px 18px;
}
.shx-board::-webkit-scrollbar { display: none; }

.shx-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  height: 100%;
}

/* 每组 = 两列，固定 45vw 宽 */
.shx-group {
  flex: 0 0 auto;
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: calc(46vw - 20px);
  flex: 0 0 calc(46vw - 20px);
  min-width: 460px;
  gap: 14px;
}

.shx-col {
  display: flex; flex-direction: column; gap: 14px;
  min-height: 0; min-width: 0;
}

.shx-row2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  flex: 1 1 0; min-height: 0;
}

/* ---------- 卡片 ---------- */
.shx-card {
  position: relative;
  border-radius: 22px;
  border: 1px solid #e9f0fb;
  background: #fff;
  cursor: pointer;
  transition: all .24s cubic-bezier(.22,.9,.3,1);
  text-align: left; font-family: inherit; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 20px; min-height: 0; min-width: 0;
  box-shadow: 0 6px 24px -10px rgba(0,0,0,.28);
}
.shx-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 52px -18px rgba(0,0,0,.44);
  border-color: rgba(22,119,255,.34);
}
.shx-card:active { transform: translateY(-1px) scale(.99); }

.shx-col > .shx-card--l1 { flex: 1.35 1 0; }
.shx-col > .shx-card--l2 { flex: 1.05 1 0; }
.shx-col > .shx-row2     { flex: .95 1 0; }

.shx-card--l1 { padding: 24px; }

/* 主色 */
.shx-card--blue {
  background: linear-gradient(125deg,#0958d9,#1677ff 48%,#4096ff);
  border-color: transparent; color: #fff;
  box-shadow: 0 16px 46px -16px rgba(22,119,255,.7);
}
.shx-card--purple {
  background: linear-gradient(125deg,#531dab,#722ed1 48%,#9254de);
  border-color: transparent; color: #fff;
  box-shadow: 0 16px 46px -16px rgba(114,46,209,.7);
}
.shx-card--blue::after,
.shx-card--purple::after {
  content: ""; position: absolute;
  right: -90px; top: -110px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle,rgba(255,255,255,.22),transparent 68%);
  pointer-events: none;
}
.shx-card--blue .shx-title,
.shx-card--purple .shx-title { color: #fff; }
.shx-card--blue .shx-desc,
.shx-card--purple .shx-desc { color: rgba(255,255,255,.9); }

/* 卡内 */
.shx-ico {
  width: 44px; height: 44px; border-radius: 13px;
  background: #f0f7ff; color: #1677ff;
  display: grid; place-items: center;
  flex: 0 0 auto; margin-bottom: 11px;
  transition: transform .24s;
}
.shx-ico svg { width: 22px; height: 22px; }
.shx-card:hover .shx-ico { transform: scale(1.09) rotate(-3deg); }
.shx-ico--lg {
  width: 66px; height: 66px; border-radius: 19px;
  background: rgba(255,255,255,.2); color: #fff; margin-bottom: 0;
}
.shx-ico--lg svg { width: 33px; height: 33px; }

.shx-body {
  position: relative; flex: 1;
  display: flex; flex-direction: column;
  justify-content: flex-end; min-height: 0;
}
.shx-title {
  font-size: 16px; font-weight: 850; color: #1d2129;
  line-height: 1.25; letter-spacing: -.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shx-title--lg { font-size: 30px; }
.shx-desc {
  font-size: 12.5px; color: #86909c;
  margin-top: 5px; line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.shx-wm {
  position: absolute; right: 20px; bottom: 14px;
  font-weight: 900; line-height: 1;
  color: #1677ff; opacity: .1;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.shx-card--l1 .shx-wm { font-size: 72px; }
.shx-card--l2 .shx-wm { font-size: 46px; right: 16px; bottom: 9px; }
.shx-card--blue .shx-wm,
.shx-card--purple .shx-wm { color: #fff; opacity: .24; }

.shx-tag {
  position: absolute; top: 15px; right: 15px;
  font-size: 11px; font-weight: 850;
  padding: 3px 11px; border-radius: 99px;
  background: rgba(250,140,22,.15); color: #d46b08;
  z-index: 2; line-height: 1.5; white-space: nowrap;
}
.shx-card--blue .shx-tag,
.shx-card--purple .shx-tag {
  background: rgba(255,255,255,.26); color: #fff;
}
.shx-tag--new {
  background: linear-gradient(135deg,#f53f3f,#ff7a45); color: #fff;
}

/* 配色 */
.shx-cy .shx-ico { background: #e8fafa; color: #13c2c2; }
.shx-or .shx-ico { background: #fff5e8; color: #fa8c16; }
.shx-pu .shx-ico { background: #f5edff; color: #722ed1; }
.shx-gr .shx-ico { background: #eafbee; color: #00b42a; }
.shx-blue .shx-ico { background: #f0f7ff; color: #1677ff; }

.shx-card--l2.shx-cy {
  background: linear-gradient(160deg,#eefdfd,#dcf7f7); border-color: #b5f0f0;
}
.shx-card--l2.shx-pu {
  background: linear-gradient(160deg,#f9f3ff,#efe3ff); border-color: #dcc7f7;
}
.shx-card--l2.shx-gr {
  background: linear-gradient(160deg,#f1fdf5,#e0f8e8); border-color: #b7ebc6;
}
.shx-card--l2 .shx-ico {
  background: #fff;
  box-shadow: 0 4px 13px -5px rgba(22,119,255,.28);
}
.shx-card--l2 .shx-title { font-size: 17px; }
.shx-card--l2 .shx-desc { font-size: 11.5px; }

.shx-card--l3 { padding: 15px; justify-content: center; }
.shx-card--l3 .shx-ico {
  width: 36px; height: 36px; border-radius: 11px; margin-bottom: 8px;
}
.shx-card--l3 .shx-ico svg { width: 18px; height: 18px; }
.shx-card--l3 .shx-title { font-size: 14.5px; }
.shx-card--l3 .shx-desc { font-size: 11px; margin-top: 3px; }

/* 宠物 */
.shx-card--pet {
  background: linear-gradient(165deg,#eaf3ff,#d8e8ff 52%,#c9e0ff);
  border-color: #c5dbff;
  align-items: center; justify-content: center;
  text-align: center; padding: 22px 18px;
}
.shx-card--pet:hover {
  box-shadow: 0 22px 54px -20px rgba(22,119,255,.55);
}
.shx-pet-ava {
  width: 106px; height: 106px; border-radius: 32px;
  background: #fff; display: grid; place-items: center;
  margin-bottom: 16px; color: #1677ff;
  box-shadow: 0 16px 42px -15px rgba(22,119,255,.5);
  animation: shxPet 3.4s ease-in-out infinite;
  flex: 0 0 auto;
}
.shx-pet-ava svg { width: 56px; height: 56px; }
@keyframes shxPet {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-9px) rotate(3deg); }
}
.shx-pet-name {
  font-size: 19px; font-weight: 850; color: #1d2129; margin-bottom: 9px;
}
.shx-pet-lv {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 14px; font-weight: 850; color: #1677ff;
  background: #fff; padding: 6px 15px; border-radius: 99px;
  box-shadow: 0 4px 13px -5px rgba(22,119,255,.28);
  margin-bottom: 15px;
}
.shx-pet-lv svg { width: 14px; height: 14px; }
.shx-pet-exp { width: 100%; max-width: 230px; }
.shx-pet-bar {
  height: 9px; border-radius: 99px;
  background: rgba(255,255,255,.94); overflow: hidden;
}
.shx-pet-bar > i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg,#1677ff,#69b1ff);
}
.shx-pet-xp {
  font-size: 12px; color: #5c7ca8; margin-top: 8px;
  font-weight: 750; font-variant-numeric: tabular-nums;
}

/* 段位 */
.shx-card--rank {
  background: linear-gradient(150deg,#fff9e6,#fff1c4 55%,#ffe7a8);
  border-color: #ffe0a3; justify-content: center; padding: 18px 20px;
}
.shx-card--rank:hover {
  box-shadow: 0 22px 54px -20px rgba(255,176,32,.52);
}
.shx-rank-ico {
  width: 46px; height: 46px; border-radius: 15px;
  background: #fff; display: grid; place-items: center;
  color: #ffb020; margin-bottom: 11px;
  box-shadow: 0 8px 20px -9px rgba(255,176,32,.58);
  flex: 0 0 auto;
}
.shx-rank-ico svg { width: 24px; height: 24px; }
.shx-rank-name {
  font-size: 19px; font-weight: 900; color: #874d00; line-height: 1.2;
}
.shx-rank-bar {
  height: 8px; border-radius: 99px;
  background: rgba(255,255,255,.94); overflow: hidden; margin-top: 10px;
}
.shx-rank-bar > i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg,#ffb020,#ff9a2e);
}
.shx-rank-tip {
  font-size: 12.5px; color: #a86800; margin-top: 8px; font-weight: 750;
}

/* ---------- 底部：全宽吸底 ---------- */
.shx-foot {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 9px;
  padding: 10px 18px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border-top: 1px solid rgba(22,119,255,.14);
  box-shadow: 0 -2px 18px -8px rgba(9,88,217,.28);
  z-index: 30;
  overflow-x: auto; scrollbar-width: none;
}
.shx-foot::-webkit-scrollbar { display: none; }

.shx-fbtn {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px;
  border: 1px solid #e6eefa; border-radius: 12px;
  background: #fff; color: #4e5969;
  font-size: 13.5px; font-weight: 750; font-family: inherit;
  cursor: pointer; transition: all .18s;
  white-space: nowrap; position: relative;
}
.shx-fbtn:hover {
  background: #f0f7ff; color: #1677ff;
  border-color: rgba(22,119,255,.36); transform: translateY(-1px);
}
.shx-fbtn:active { transform: scale(.97); }
.shx-fbtn svg { width: 17px; height: 17px; flex: 0 0 17px; }
.shx-fdot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f53f3f; flex: 0 0 7px;
}

.shx-shop {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 24px;
  border: 0; border-radius: 13px;
  background: linear-gradient(135deg,#1677ff,#4096ff);
  color: #fff; font-size: 14.5px; font-weight: 850;
  font-family: inherit; cursor: pointer;
  box-shadow: 0 10px 26px -12px rgba(22,119,255,.78);
  transition: all .2s; white-space: nowrap;
}
.shx-shop:hover { filter: brightness(1.07); transform: translateY(-2px); }
.shx-shop:active { transform: translateY(0) scale(.97); }
.shx-shop svg { width: 19px; height: 19px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1500px) {
  .shx-title--lg { font-size: 26px; }
  .shx-card--l1 { padding: 20px; }
  .shx-pet-ava { width: 92px; height: 92px; border-radius: 28px; }
  .shx-pet-ava svg { width: 48px; height: 48px; }
}
@media (max-width: 1300px) {
  .shx-brand-name { display: none; }
  .shx-brand { padding-right: 12px; }
  .shx-title--lg { font-size: 23px; }
  
}
@media (max-width: 1100px) {
  .shx-top { padding: 8px 12px; gap: 8px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
  .shx-brand-ico { width: 34px; height: 34px; flex: 0 0 34px; }
  .shx-user { height: 42px; }
  .shx-user-ava { width: 32px; height: 32px; flex: 0 0 32px; }
  .shx-w { height: 40px; padding: 0 10px; }
  .shx-ibtn { width: 40px; height: 40px; flex: 0 0 40px; }
  .shx-board { padding: 10px 12px; }
  .shx-track { gap: 10px; }
  .shx-group { width: calc(45vw - 12px); min-width: 420px; gap: 10px; }
  .shx-col, .shx-row2 { gap: 10px; }
  .shx-card { padding: 16px; border-radius: 18px; }
  .shx-ico { width: 38px; height: 38px; margin-bottom: 9px; }
  .shx-ico svg { width: 19px; height: 19px; }
  .shx-title { font-size: 14px; }
  .shx-title--lg { font-size: 21px; }
  .shx-desc { font-size: 11px; }
  .shx-card--l3 { padding: 12px; }
  .shx-card--l3 .shx-ico { width: 31px; height: 31px; }
  .shx-card--l3 .shx-title { font-size: 13px; }
  .shx-foot { padding: 8px 12px; gap: 7px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .shx-fbtn { height: 38px; padding: 0 13px; font-size: 12.5px; }
  .shx-shop { height: 40px; padding: 0 19px; font-size: 13.5px; }
}
@media (orientation: landscape) and (max-height: 660px) {
  .shx-top { padding: 7px 12px; gap: 7px;
    padding-top: calc(7px + env(safe-area-inset-top, 0px)); }
  .shx-brand-ico { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; }
  .shx-brand-ico svg { width: 16px; height: 16px; }
  .shx-brand-name { font-size: 14px; }
  .shx-brand { padding-right: 10px; }
  .shx-user { height: 38px; padding: 0 12px 0 4px; gap: 8px; }
  .shx-user-ava { width: 30px; height: 30px; flex: 0 0 30px; }
  .shx-user-ava svg { width: 16px; height: 16px; }
  .shx-user-name { font-size: 12px; }
  .shx-user-meta { font-size: 10px; }
  .shx-w { height: 36px; padding: 0 10px; gap: 6px; border-radius: 11px; }
  .shx-w-ico { width: 22px; height: 22px; flex: 0 0 22px; }
  .shx-w-ico svg { width: 13px; height: 13px; }
  .shx-w-txt i { font-size: 13px; }
  .shx-w-txt b { font-size: 9px; }
  .shx-w-plus { width: 18px; height: 18px; flex: 0 0 18px; }
  .shx-ibtn { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; }
  .shx-ibtn svg { width: 16px; height: 16px; }

  .shx-board { padding: 8px 10px; }
  .shx-track { gap: 9px; }
  .shx-group { gap: 9px; }
  .shx-col, .shx-row2 { gap: 9px; }

  .shx-card { padding: 13px; border-radius: 15px; }
  .shx-card--l1 { padding: 15px; }
  .shx-ico { width: 32px; height: 32px; border-radius: 10px; margin-bottom: 7px; }
  .shx-ico svg { width: 16px; height: 16px; }
  .shx-ico--lg { width: 48px; height: 48px; border-radius: 14px; }
  .shx-ico--lg svg { width: 24px; height: 24px; }
  .shx-title { font-size: 12.5px; }
  .shx-title--lg { font-size: 19px; }
  .shx-desc { font-size: 10px; margin-top: 2px; }
  .shx-card--l2 .shx-title { font-size: 13px; }
  .shx-card--l2 .shx-desc { font-size: 9.5px; }
  .shx-card--l3 { padding: 10px; }
  .shx-card--l3 .shx-ico { width: 26px; height: 26px; margin-bottom: 4px; }
  .shx-card--l3 .shx-ico svg { width: 13px; height: 13px; }
  .shx-card--l3 .shx-title { font-size: 11.5px; }
  .shx-card--l3 .shx-desc { font-size: 9px; margin-top: 1px; }
  .shx-wm { font-size: 44px; }
  .shx-card--l2 .shx-wm { font-size: 32px; }

  .shx-pet-ava { width: 68px; height: 68px; border-radius: 21px; margin-bottom: 9px; }
  .shx-pet-ava svg { width: 35px; height: 35px; }
  .shx-pet-name { font-size: 14.5px; margin-bottom: 5px; }
  .shx-pet-lv { font-size: 11px; padding: 3px 10px; margin-bottom: 8px; }
  .shx-pet-lv svg { width: 11px; height: 11px; }
  .shx-pet-xp { font-size: 9.5px; margin-top: 5px; }
  .shx-pet-bar { height: 6px; }

  .shx-rank-ico { width: 34px; height: 34px; border-radius: 11px; margin-bottom: 7px; }
  .shx-rank-ico svg { width: 18px; height: 18px; }
  .shx-rank-name { font-size: 14.5px; }
  .shx-rank-bar { height: 6px; margin-top: 7px; }
  .shx-rank-tip { font-size: 10px; margin-top: 5px; }

  .shx-foot { padding: 7px 11px; gap: 6px;
    padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px)); }
  .shx-fbtn { height: 33px; padding: 0 11px; font-size: 11.5px; gap: 6px; border-radius: 10px; }
  .shx-fbtn svg { width: 14px; height: 14px; flex: 0 0 14px; }
  .shx-shop { height: 35px; padding: 0 17px; font-size: 12.5px; border-radius: 11px; }
  .shx-shop svg { width: 16px; height: 16px; }
}

/* 竖屏 */
@media (orientation: portrait) {
  .shx-group {
    grid-template-columns: 1fr;
    height: auto;
  }
  .shx-board { overflow-x: hidden; overflow-y: auto; }
  .shx-track { flex-direction: column; width: 100%; height: auto; }
  .shx-col > .shx-card--l1 { flex: 0 0 auto; min-height: 150px; }
  .shx-col > .shx-card--l2 { flex: 0 0 auto; min-height: 110px; }
  .shx-col > .shx-row2 { flex: 0 0 auto; }
  .shx-card--l3 { min-height: 92px; }
  .shx-top { flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
  .shx-brand {
    width: 100%; border-right: 0; padding-right: 0;
    padding-bottom: 8px; border-bottom: 1px solid #e6eefa; margin-bottom: 2px;
  }
  .shx-brand-name { display: block; }
  .shx-grow { display: none; }
  .shx-foot { flex-wrap: wrap; gap: 7px; }
}


/* ==========================================================================
   首页：隐藏全局 appbar 导航（避免和底部栏重复）
   ========================================================================== */
body.sh-home .appbar,
body.sh-home #topbar,
body.sh-home #nav,
body.sh-home .nav,
body.sh-home .tabbar,
body.sh-home #tabbar {
  display: none !important;
}


/* ==========================================================================
   内页：只留返回键，不显示导航
   ========================================================================== */
.appbar .nav,
.appbar #nav { display: none !important; }

/* 返回按钮放大更明显 */
.appbar__back {
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px !important;
  border-radius: 11px !important;
  background: #f0f7ff !important;
  border: 1px solid #e6eefa !important;
  color: #1677ff !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  margin-right: 6px !important;
  transition: all .16s !important;
}
.appbar__back:hover {
  background: #e8f3ff !important;
  border-color: rgba(22,119,255,.4) !important;
}
.appbar__back svg { width: 20px !important; height: 20px !important; }
.appbar__back[hidden] { display: none !important; }

/* appbar 全宽吸顶 */
.appbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  background: rgba(255,255,255,.94) !important;
  backdrop-filter: blur(22px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(170%) !important;
  border-bottom: 1px solid rgba(22,119,255,.14) !important;
  box-shadow: 0 2px 18px -8px rgba(9,88,217,.28) !important;
  padding: 8px 16px !important;
  height: auto !important;
  min-height: 60px !important;
}


/* ==========================================================================
   内页标题栏：返回键 + 标题
   ========================================================================== */
.pg-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 18px;
  border-bottom: 1px solid rgba(230,238,250,.8);
  margin-bottom: 18px;
}

.pg-back {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border: 1px solid #e6eefa;
  border-radius: 12px;
  background: #fff;
  color: #1677ff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .16s;
  box-shadow: 0 2px 10px -4px rgba(22,119,255,.24);
  padding: 0;
  font-family: inherit;
}
.pg-back:hover {
  background: #f0f7ff;
  border-color: rgba(22,119,255,.42);
  transform: translateX(-2px);
}
.pg-back:active { transform: translateX(-2px) scale(.95); }
.pg-back svg { width: 20px; height: 20px; }

.pg-head__grow { flex: 1 1 auto; min-width: 0; }

.pg-title {
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -.025em;
  color: #1d2129;
  line-height: 1.2;
  margin: 0;
}

.pg-desc {
  font-size: 13px;
  color: #86909c;
  margin-top: 3px;
  line-height: 1.4;
}

.pg-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* 内页背景透明化（继承首页蓝蒙版） */
body.sh-home .page {
  background: transparent !important;
}

@media (max-width: 900px) {
  .pg-head { gap: 9px; padding: 2px 0 14px; margin-bottom: 14px; }
  .pg-back { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; }
  .pg-back svg { width: 17px; height: 17px; }
  .pg-title { font-size: 19px; }
  .pg-desc { font-size: 11.5px; }
}


/* appbar 里的返回键隐藏（用标题栏的） */
.appbar__back { display: none !important; }

/* 修复竖排大字 */
.page .appbar__grow h1,
.page h1.appbar__title,
[class*="vertical"],
.side-title,
.vertical-title {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}
