* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  font-size: calc(min(100vw, 480px) / 7.5);
}

body {
  margin: 0;
  background: #0b0a0a;
  color: #f2efe9;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  overflow-x: hidden;
}

#app {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: #151313;
  overflow-x: hidden;
}

/* 首页：页面下方延续渐变底色，避免露出黑色底 */
body.is-home { background: #476099; }
#app.is-home { background: #476099; }

button {
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

img { -webkit-user-drag: none; }

/* ---------- 首页（还原网站手机端机型页） ---------- */
.site-model {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 34px 16px 24px;
  background:
    radial-gradient(120% 60% at 18% 0%, rgba(255, 255, 255, 0.07), transparent 62%),
    linear-gradient(180deg, #88a376 0%, #829c7a 15%, #7b957d 27%, #719083 40%, #67858a 53%, #5f7b8e 66%, #557094 79%, #4e6798 92%, #476099 100%);
}

.site-model .brand {
  margin: 0 0 26px;
  text-align: center;
}

.site-model .brand img {
  display: block;
  width: 94%;
  max-width: 400px;
  margin: 0 auto;
}

.site-model .title-img {
  display: block;
  width: 76%;
  max-width: 300px;
  margin: 0 auto;
}

.site-model .sub {
  margin: 6px 0 26px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  color: #eef1f3;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
}

.site-model .select {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-model .cat-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.site-model .cat-item {
  padding: 7px 2px;
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(5, 12, 17, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.site-model .cat-item.active {
  color: #fff;
  border-color: #ff2b47;
  background: linear-gradient(180deg, rgba(230, 0, 45, 0.5), rgba(230, 0, 45, 0.24));
}

.site-model .model-panel {
  padding: 10px 10px 12px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* 首页系列标题靠左（覆盖底部面板通用的居中样式） */
.site-model .panel-head { display: block; margin-bottom: 8px; }

.site-model .panel-title {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.site-model .panel-title strong { font-size: 15px; font-weight: 600; }

.site-model .panel-title span {
  display: none;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.site-model .chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 6px;
}

.site-model .model-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px 8px;
  border-radius: 10px;
  background: none;
  border: 1px solid transparent;
}

/* 和网站手机端一致：高度固定 38，宽度铺满整格，机身图自然撑大 */
.site-model .model-pic {
  position: relative;
  flex: 0 0 38px;
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 机身底部的一圈接触阴影：和网站一样，让相机像落在画面上 */
.site-model .model-pic::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 60%;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 8, 14, 0.5), rgba(0, 8, 14, 0) 100%);
  filter: blur(3px);
}

.site-model .model-pic img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 36px;
}

.site-model .model-name {
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  color: #eef3fa;
}

/* ---------- 导航 ---------- */
.nav {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 0.2rem;
  background: #151313;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  height: 0.6rem;
  padding: 0 0.22rem 0 0.16rem;
  border-radius: 999px;
  font-size: 0.24rem;
  font-weight: 500;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.34);
}
.nav-back:active { background: rgba(255, 255, 255, 0.2); }

.nav-model {
  margin-left: 0.06rem;
  max-width: 2.2rem;
  font-size: 0.28rem;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nav-center {
  position: absolute;
  left: 50%;
  top: 0;
  height: 44px;
  line-height: 44px;
  transform: translateX(-50%);
  font-size: 0.3rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- 预设库 ---------- */
/* 预设库：整页可下滑，底部预设介绍固定不动 */
.lib {
  min-height: 100vh;
  padding-bottom: calc(2.6rem + env(safe-area-inset-bottom));
}

/* 顶部：样图条（整体靠最左，右侧保留箭头提示） */
.lib-top {
  display: flex;
  align-items: center;
  padding: 0.14rem 0.12rem 0.08rem;
}

.scenes-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.scenes {
  display: flex;
  gap: 0.1rem;
  overflow-x: auto;
  padding: 0 0.44rem 0 0;
  scrollbar-width: none;
}

.scenes-more {
  position: absolute;
  right: 0.02rem;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 50%;
  color: #fff;
  background: rgba(10, 12, 16, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.scenes::-webkit-scrollbar { display: none; }

.sthumb {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 0.8rem;
  border-radius: 0.1rem;
  overflow: hidden;
  border: 2px solid transparent;
}

.sthumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sthumb.on {
  border-color: #d8352f;
  box-shadow: 0 0 0.12rem rgba(216, 53, 47, 0.5);
}

/* 预览区：占据剩余高度，内部 3:2 画框按空间自动缩放，照片始终完整 */
.stage {
  --pos: 10%;
  position: relative;
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

.frame {
  position: relative;
  overflow: hidden;
  background: transparent;
  touch-action: none;
}

.frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.before-gray {
  position: absolute;
  inset: 0;
  background: rgba(128, 128, 128, 0.22);
  pointer-events: none;
}

.after-clip {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos));
}

.divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.85);
}

.knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.44rem;
  height: 0.44rem;
  margin: -0.22rem 0 0 -0.22rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0.16rem rgba(0, 0, 0, 0.6);
}

.loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
}

.loading.show { display: flex; }

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spinner {
  width: 0.64rem;
  height: 0.64rem;
  border: 6px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  margin-top: 0.16rem;
  font-size: 0.3rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

@keyframes spin { to { transform: rotate(360deg); } }

.sortbar {
  display: flex;
  gap: 0.14rem;
  padding: 0.1rem 0.2rem 0;
}

.sort-btn {
  height: 0.52rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  font-size: 0.22rem;
  color: rgba(242, 239, 233, 0.55);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sort-btn.on {
  color: #fff;
  background: rgba(216, 53, 47, 0.85);
  border-color: rgba(216, 53, 47, 0.9);
}

.palette {
  display: flex;
  flex-wrap: wrap;
  padding: 0.08rem 0.12rem 0.1rem;
}

.pitem {
  width: 20%;
  padding: 0.06rem 0.02rem 0.04rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.picon-wrap {
  position: relative;
  width: 0.86rem;
  height: 0.86rem;
}

.picon {
  display: block;
  width: 0.86rem;
  height: 0.86rem;
  border-radius: 0.11rem;
  border: 2px solid transparent;
}

.pitem.on .picon {
  border-color: #d8352f;
  box-shadow: 0 0 0.14rem rgba(216, 53, 47, 0.5);
}

/* 收藏星标：贴住图标右上角，深底金边更醒目 */
.pstar {
  position: absolute;
  top: -0.03rem;
  right: -0.03rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.34rem;
  height: 0.34rem;
  font-size: 0.2rem;
  line-height: 1;
  color: #ffd24a;
  background: rgba(12, 10, 8, 0.9);
  border: 1px solid rgba(255, 210, 74, 0.85);
  border-radius: 50%;
  box-shadow: 0 0 0.08rem rgba(0, 0, 0, 0.7), 0 0 0.1rem rgba(255, 190, 30, 0.55);
  text-shadow: 0 0 0.05rem rgba(255, 190, 30, 0.9);
}

.pname {
  width: 100%;
  margin-top: 0.05rem;
  font-size: 0.19rem;
  line-height: 0.23rem;
  text-align: center;
  color: rgba(242, 239, 233, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pitem.on .pname { color: #fff; }

/* 预设图标下方的金额 */
.pprice {
  margin-top: 0.02rem;
  font-size: 0.17rem;
  line-height: 0.21rem;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 190, 26, 0.9);
}

.pprice i,
.pname-price i,
.fav-price i {
  font-style: normal;
  font-size: 0.85em;
  margin-right: 0.01rem;
}

.panel {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  width: min(100%, 480px);
  transform: translateX(-50%);
  padding: 0.13rem 0.24rem calc(0.1rem + env(safe-area-inset-bottom));
  border-radius: 0.24rem 0.24rem 0 0;
  background: rgba(24, 22, 22, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
}

.panel-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
}

.title-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.18rem;
  width: 100%;
}

.title-name {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
}

.pname-main {
  font-size: 0.3rem;
  font-weight: 700;
}

.pname-ext {
  margin-left: 0.04rem;
  font-size: 0.24rem;
  color: rgba(242, 239, 233, 0.45);
}

/* 预设介绍里名称右侧的金额 */
.pname-price {
  flex: 0 0 auto;
  font-family: "Arial Black", "Segoe UI Black", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.34rem;
  font-weight: 900;
  line-height: 1;
  color: #ffbe1a;
  text-shadow: 0 0 0.12rem rgba(255, 180, 20, 0.45);
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.1rem;
}

.tag-item {
  padding: 0.04rem 0.14rem;
  border-radius: 999px;
  font-size: 0.19rem;
  color: rgba(242, 239, 233, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.actions {
  display: flex;
  gap: 0.2rem;
  margin-top: 0.15rem;
}

.btn {
  flex: 1;
  height: 0.76rem;
  line-height: 0.76rem;
  text-align: center;
  border-radius: 0.2rem;
  font-size: 0.26rem;
  font-weight: 600;
}

.btn.ghost {
  color: #f2efe9;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn.ghost.faved {
  color: #fff;
  background: rgba(216, 53, 47, 0.85);
  border-color: rgba(216, 53, 47, 0.9);
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #d8352f, #a8231f);
  box-shadow: 0 10px 30px rgba(216, 53, 47, 0.35);
}

/* ---------- 我的清单 ---------- */
.fav {
  min-height: 100vh;
  padding-bottom: 5.8rem;
}

.fav-head {
  padding: 0.3rem 0.34rem 0.16rem;
}

.fav-title {
  font-size: 0.44rem;
  font-weight: 700;
}

/* 标题行：我的清单在左，售后与更新订阅在右 */
.fav-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem;
}
.fav-as-link {
  flex: 0 0 auto;
  padding: 0.07rem 0.2rem;
  border-radius: 999px;
  border: 1px solid rgba(233, 192, 106, 0.55);
  background: rgba(233, 192, 106, 0.08);
  font-size: 0.24rem;
  color: #e9c06a;
  white-space: nowrap;
}

/* 售后与更新订阅弹窗 */
.as-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.as-mask.show { opacity: 1; pointer-events: auto; }
.as-card {
  width: 100%;
  max-width: 6.8rem;
  max-height: 82vh;
  overflow: auto;
  padding: 0.44rem 0.4rem;
  border-radius: 0.3rem;
  background: #262626;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}
.as-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.2rem;
}
.as-title { font-size: 0.34rem; font-weight: 700; }
.as-close {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.24rem;
}
.as-body {
  margin-top: 0.34rem;
  font-size: 0.23rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}
.as-sec {
  display: flex;
  align-items: baseline;
  gap: 0.1rem;
  margin-top: 0.3rem;
}
.as-sec:first-child { margin-top: 0; }
.as-sec b { font-size: 0.27rem; color: #fff; }
.as-num { color: #d9a441; font-weight: 700; }
.as-line { margin: 0.1rem 0 0; }
.as-contact { display: flex; align-items: center; gap: 0.16rem; margin-top: 0.14rem; }
.as-contact span { color: #e8e6e1; }
.as-copy {
  flex: 0 0 auto;
  padding: 0.05rem 0.16rem;
  border-radius: 999px;
  border: 1px solid rgba(217, 164, 65, 0.6);
  background: rgba(217, 164, 65, 0.12);
  color: #e9c06a;
  font-size: 0.2rem;
}

/* 复制订单后的确认弹窗 */
.order-card {
  max-width: 5.6rem;
  text-align: center;
}
.order-title { font-size: 0.36rem; font-weight: 700; }
.order-text {
  margin: 0.18rem 0 0;
  font-size: 0.24rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}
.as-card .order-ok {
  width: 100%;
  height: 0.8rem;
  line-height: 0.8rem;
  margin-top: 0.4rem;
}

.fav-list {
  padding: 0.08rem 0.24rem;
}

.fav-item {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.22rem;
  margin-bottom: 0.16rem;
  border-radius: 0.24rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

/* 清单里勾选的预设：红色边框 */
.fav-item.picked {
  border-color: rgba(216, 53, 47, 0.9);
  background: rgba(216, 53, 47, 0.09);
  box-shadow: 0 0 0.16rem rgba(216, 53, 47, 0.35);
}

/* 选中行右侧的绿色对勾 */
.fav-check {
  flex: 0 0 auto;
  width: 0.44rem;
  font-size: 0.38rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: #35c759;
  opacity: 0;
  transition: opacity 0.15s;
}
.fav-item.picked .fav-check { opacity: 1; }

.fav-ico-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 1.08rem;
  height: 1.08rem;
}

.fav-ico {
  width: 1.08rem;
  height: 1.08rem;
  border-radius: 0.2rem;
}

/* 清单里已收藏预设右上角的星标 */
.fav-star {
  position: absolute;
  top: -0.05rem;
  right: -0.05rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  font-size: 0.2rem;
  line-height: 1;
  color: #ffd24a;
  background: rgba(12, 14, 16, 0.88);
  border: 1px solid rgba(255, 210, 74, 0.75);
}

.fav-meta { flex: 1; min-width: 0; }

.fav-name {
  font-size: 0.3rem;
  font-weight: 600;
}

/* 清单里预设名后面的金额 */
.fav-price {
  margin-left: 0.16rem;
  font-size: 0.27rem;
  font-weight: 700;
  color: #ffbe1a;
  white-space: nowrap;
}

.fav-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  width: min(100%, 480px);
  transform: translateX(-50%);
  padding: 0.2rem 0.24rem 0.32rem;
  background: linear-gradient(to top, rgba(21, 19, 19, 0.98), rgba(21, 19, 19, 0.86));
}

.fav-bar .btn { width: 100%; height: 0.92rem; line-height: 0.92rem; border-radius: 0.24rem; }

/* 全套购买按钮：金色描边，下方小字注释 */
.fav-bar .btn.full {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.02rem;
  height: 1.02rem;
  margin-top: 0.12rem;
  line-height: 1.15;
  color: #ffd24a;
  background: rgba(255, 190, 26, 0.1);
  border: 1px solid rgba(255, 190, 26, 0.45);
  box-shadow: none;
}
.fav-bar .btn.full .full-main { font-size: 0.25rem; font-weight: 700; }
.fav-bar .btn.full .full-note { font-size: 0.18rem; color: rgba(255, 210, 74, 0.72); }

/* 底部按钮里的金额：统一用黄色 */
.fav-bar .btn .btn-price {
  font-style: normal;
  font-weight: 700;
  color: #ffbe1a;
}

.btn.disabled {
  color: rgba(242, 239, 233, 0.35);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  pointer-events: none;
}

/* 未选择预设时：按钮保持红色，文案显示 0 款 ￥0，但不可点击 */
.fav-bar .btn.primary.disabled {
  color: #fff;
  background: linear-gradient(135deg, #d8352f, #a8231f);
  border: none;
  box-shadow: none;
  pointer-events: none;
}
.fav-bar .btn.primary.disabled .btn-price { color: #ffbe1a; }

.toast {
  position: fixed;
  left: 50%;
  top: 34%;
  z-index: 300;
  max-width: 70vw;
  padding: 0.2rem 0.32rem;
  border-radius: 0.16rem;
  font-size: 0.26rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.82);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.toast.show { opacity: 1; }

/* 底部版权（与成熟网站一致） */
.copyright {
  margin: 0.1rem 0 0;
  font-size: 0.21rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
  color: rgba(242, 239, 233, 0.38);
}

.site-model .copyright {
  margin: 22px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* 底部正版提醒（与成熟网站一致） */
.copyright-tips {
  margin: 0.03rem 0 0;
  font-size: 0.18rem;
  line-height: 1.5;
  text-align: center;
  color: rgba(242, 239, 233, 0.3);
}

.copyright-tips span { display: block; }

.site-model .copyright-tips {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.fav-bar .copyright { margin-top: 0.06rem; }

/* 预设库最底部：版权与正版注释独立成页脚，不再放进预设介绍卡 */
.lib-footer {
  margin-top: 0.55rem;
  padding: 0.06rem 0.2rem 0.16rem;
  background: #151313;
}

.lib-footer .copyright { margin: 0; }

/* ---------- 收藏 / 取消收藏飞行动画 ---------- */
.fly-item {
  position: fixed !important;
  z-index: 9999;
  margin: 0 !important;
  pointer-events: none;
}

@keyframes btnPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.09); }
  100% { transform: scale(1); }
}
.btn.pulse { animation: btnPulse 0.5s ease; }

/* ---------- 微信可视高度较矮时（约 690）压缩版式，默认一屏看到全部 20 个预设 ---------- */
@media (max-height: 740px) {
  .lib { padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
  .lib-top { padding: 0.1rem 0.12rem 0.06rem; }
  .sthumb { width: 1.2rem; height: 0.8rem; }
  .scenes-more { width: 0.6rem; height: 0.6rem; }
  .scenes-more svg { width: 0.34rem; height: 0.34rem; }
  /* 图片始终 3:2 完整显示：高度够时铺满宽度，更矮的屏幕自动等比缩小，
     给图标区留出空间，保证 20 个预设一屏全部可见 */
  .stage { aspect-ratio: auto; height: min(260px, calc(100dvh - 433px)); }
  .sortbar { padding: 0.06rem 0.2rem 0; }
  .sort-btn { height: 0.44rem; padding: 0 0.26rem; font-size: 0.19rem; }
  .palette { padding: 0.02rem 0.12rem 0.02rem; }
  .pitem { padding: 0.04rem 0.02rem 0.01rem; }
  .picon-wrap, .picon { width: 0.8rem; height: 0.8rem; }
  .pname { margin-top: 0.01rem; font-size: 0.17rem; line-height: 0.2rem; }
  .pprice { font-size: 0.15rem; line-height: 0.18rem; }
  .pstar { width: 0.28rem; height: 0.28rem; font-size: 0.16rem; }
  .lib-footer { margin-top: 0.5rem; padding: 0.06rem 0.2rem 0.14rem; }
  .copyright { font-size: 0.21rem; }
  .copyright-tips { font-size: 0.18rem; }
  .panel { padding: 0.1rem 0.2rem calc(0.08rem + env(safe-area-inset-bottom)); }
  .panel-head { gap: 0.06rem; }
  .title-row { gap: 0.14rem; }
  .pname-main { font-size: 0.24rem; }
  .pname-ext { font-size: 0.2rem; }
  .pname-price { font-size: 0.3rem; }
  .tag-item { padding: 0.03rem 0.12rem; font-size: 0.16rem; }
  .actions { margin-top: 0.1rem; }
  .btn { height: 0.6rem; line-height: 0.6rem; font-size: 0.24rem; border-radius: 0.18rem; }
}




