/* 小叶网站：首页 + 文章页共用样式（服务端渲染，样式全站一份） */
:root {
  --bg: #0b0d10;
  --fg: #fff;
  --line: rgba(255, 255, 255, .16);
  --dim: rgba(244, 238, 229, .62);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: #0b0d10; }

body {
  margin: 0;
  background-color: var(--bg);
  /* 第二层背景：直接铺在 body 上。.photo 那一层万一留缝，缝里露出的也是同一张图、
     同样的 cover 裁切，所以肉眼完全接不上缝，不会出现纯色边 */
  background-image: var(--bgpc, none);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--fg);
  font-family: "Songti SC", "STSong", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

/* ============ 首页 ============ */
body.home { overflow: hidden; }

/* 背景：整屏铺满，电脑图与手机图各占一层，窄屏自动切换 */
.photo {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  /* 不给 height：靠上下左右四条边撑满视口。
     写死 100vh/100dvh 时，手机地址栏展开会让元素比视口矮一截，
     底部就会露出一条缝 */
  background-color: #0b0d10;
  overflow: hidden;
}

/* 背景层：两块 div 各带一张图，用 background-size:cover 铺满。
   不用 img + object-fit，避免 <picture> 里百分比高度失效导致上下留黑边 */
.photo .bg,
.backdrop .bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}
/* 图源统一走变量：换背景时只要改 body 上的两个变量，三层同时换 */
.photo .bg-pc, .backdrop .bg-pc { background-image: var(--bgpc); }
.photo .bg-m, .backdrop .bg-m { background-image: var(--bgm); }
.photo .bg-m, .backdrop .bg-m { display: none; }

@media (max-width: 767px) {
  .photo .bg-pc, .backdrop .bg-pc { display: none; }
  .photo .bg-m, .backdrop .bg-m { display: block; }
  body { background-image: var(--bgm, var(--bgpc, none)); }
}

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 16px 0;
  pointer-events: none;
}

/* 两个框共用同一套材质 */
.panel {
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 14px;
  background: rgba(255, 255, 255, .26);
  color: #17150f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  animation: rise 1.2s cubic-bezier(.22, .61, .36, 1) both;
}

h1 {
  margin: 0;
  padding: .62em 1.15em;
  font-weight: 500;
  font-size: clamp(1.05rem, 3.4vw, 1.5rem);
  letter-spacing: .28em;
  text-indent: .28em;
  white-space: nowrap;
}

.desc {
  margin: 0;
  max-width: min(18.5rem, 84vw);
  padding: 1.2em 1.45em 1.35em;
  font-size: clamp(.76rem, 2.3vw, .875rem);
  text-align: center;
  animation-delay: .2s;
}

.desc h2 {
  margin: 0 0 .85em;
  font-size: 1.18em;
  font-weight: 600;
  letter-spacing: .26em;
  text-indent: .26em;
  white-space: nowrap;
  animation: rise .9s cubic-bezier(.22, .61, .36, 1) .46s both;
}

.desc h2::after {
  content: "";
  display: block;
  width: 26px;
  height: 1px;
  margin: .8em auto 0;
  background: currentColor;
  opacity: .3;
}

.desc p {
  margin: 0;
  line-height: 2.05;
  letter-spacing: .05em;
  text-indent: .05em;
  animation: rise .9s cubic-bezier(.22, .61, .36, 1) .6s both;
}

/* 声明框下面那一块：左上「免费」、右上「测试」、免费正下方「文章」 */
.top-actions {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px 18px;
  justify-content: center;
  align-items: center;
  justify-items: center;
  pointer-events: none;
}
.top-actions > * { pointer-events: auto; }
.top-actions > :nth-child(1) { grid-area: 1 / 1; }
.top-actions > :nth-child(2) { grid-area: 1 / 2; }
.top-actions > :nth-child(3) { grid-area: 2 / 1; }

/* 「文章」小入口，尺寸跟「测试」按钮一致 */
.more {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45em;
  min-width: 132px;
  padding: 11px 34px;
  font-size: 18px;
  letter-spacing: .28em;
  text-indent: .28em;
  text-decoration: none;
  color: #17150f;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .26);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  animation: rise 1.1s cubic-bezier(.22, .61, .36, 1) .72s both;
  transition: background-color .2s, transform .2s, box-shadow .2s;
}
.more:hover {
  background: rgba(255, 255, 255, .38);
  transform: translateY(-2px);
  box-shadow: none;
}
.more em {
  font-style: normal;
  font-size: .92em;
  opacity: .55;
  letter-spacing: 0;
  text-indent: 0;
  font-variant-numeric: tabular-nums;
}

/* 右下角「切换背景」按钮 */
.swap {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .26);
  color: #17150f;
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1;
  letter-spacing: .06em;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  animation: rise 1.1s cubic-bezier(.22, .61, .36, 1) .8s both;
  transition: background-color .2s, transform .2s;
}
.swap:hover { background: rgba(255, 255, 255, .44); transform: translateY(-1px); }
.swap:active { transform: scale(.94); }

/* 「切换动态效果」按钮：样式跟「切换背景」一样，叠在它上面 */
.swap-fx { bottom: 58px; }

/* 动态效果画布：铺满全屏，永远不挡点击 */
.fx-layer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 效果选择面板（沿用 .bgbox 的外观，往上一格） */
.fxbox { bottom: 92px; }
.fx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.fx-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 9px 3px 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  color: inherit;
  font-family: inherit;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background-color .16s, border-color .16s, transform .16s;
}
.fx-item:hover { background: rgba(255, 255, 255, .15); transform: translateY(-1px); }
.fx-item.on {
  background: rgba(255, 255, 255, .21);
  border-color: rgba(255, 255, 255, .68);
}
.fx-ico {
  font-size: 15px;
  line-height: 16px;
  height: 16px;
  opacity: .92;
}

/* 底部中间「打赏支持一下」 */
.tip {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 3;
  padding: 9px 22px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .26);
  color: #17150f;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1;
  letter-spacing: .12em;
  text-indent: .12em;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
  cursor: pointer;
  animation: rise 1.1s cubic-bezier(.22, .61, .36, 1) .9s both;
  transition: background-color .2s, transform .2s, box-shadow .2s;
}
.tip:hover {
  background: rgba(255, 255, 255, .42);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}
.tip:active { transform: translateX(-50%) scale(.95); }

/* 打赏弹层：选金额 → 去支付 */
.tipbox {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  padding: 20px;
}
.tipbox[hidden] { display: none; }
.tip-mask {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 10, .58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.tip-card {
  position: relative;
  width: min(350px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 24px 22px 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 20px;
  background: rgba(20, 20, 22, .92);
  color: #f4f1ea;
  text-align: center;
  box-shadow: 0 26px 64px rgba(0, 0, 0, .55);
  animation: boxIn .3s cubic-bezier(.22, .61, .36, 1) both;
}
.tip-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: inherit;
  font-size: 15px;
  line-height: 25px;
  cursor: pointer;
}
.tip-x:hover { background: rgba(255, 255, 255, .22); }
.tip-title {
  margin: 0 0 7px;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-indent: .16em;
}
.tip-text {
  margin: 0 0 16px;
  font-size: 12.5px;
  line-height: 1.9;
  letter-spacing: .04em;
  color: rgba(244, 241, 234, .74);
}
.tip-amounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}
.tip-amt {
  padding: 10px 4px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s;
}
.tip-amt:hover { background: rgba(255, 255, 255, .13); }
.tip-amt.on {
  background: rgba(255, 255, 255, .92);
  border-color: #fff;
  color: #17150f;
  font-weight: 600;
}
.tip-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
}
.tip-custom span { font-size: 13px; color: rgba(244, 241, 234, .55); }
.tip-custom input {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.tip-custom input::placeholder { color: rgba(244, 241, 234, .35); }
.tip-custom input::-webkit-outer-spin-button,
.tip-custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tip-custom input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.tip-ch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 16px;
}
.tip-ch:has(.tip-chbtn:only-child) { grid-template-columns: 1fr; }
.tip-chbtn {
  padding: 11px 6px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: inherit;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background-color .18s, border-color .18s;
}
.tip-chbtn:hover { background: rgba(255, 255, 255, .12); }
.tip-chbtn.on { border-color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .16); }
.tip-chbtn[data-channel="wxpay"].on { border-color: #4ac26b; background: rgba(74, 194, 107, .16); }
.tip-chbtn[data-channel="alipay"].on { border-color: #4a9ef0; background: rgba(74, 158, 240, .16); }
.tip-pay {
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 999px;
  background: #f4f1ea;
  color: #17150f;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .16em;
  text-indent: .16em;
  cursor: pointer;
  transition: transform .18s, opacity .18s, background-color .18s;
}
.tip-pay:hover { background: #fff; transform: translateY(-1px); }
.tip-pay:active { transform: scale(.985); }
.tip-pay:disabled { opacity: .55; cursor: default; transform: none; }
.tip-msg {
  min-height: 16px;
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: #ffb4a2;
}
.tip-note {
  margin: 4px 0 0;
  font-size: 11.5px;
  letter-spacing: .08em;
  color: rgba(244, 241, 234, .5);
}

/* 打赏结果页 */
.tip-done-sub {
  margin: 12px 0 0;
  font-size: 14px;
  letter-spacing: .1em;
  color: rgba(244, 241, 234, .82);
}
.tip-done-no {
  margin: 6px 0 0;
  font-size: 11px;
  letter-spacing: .06em;
  color: rgba(244, 241, 234, .4);
}

/* ============ 软件商店 ============ */

/* 界面正中的售卖入口「测试」，四分之三透明玻璃感 */
.sell {
  position: fixed;
  left: 65%;
  top: 34%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 46px;
  font-size: 20px;
  letter-spacing: .32em;
  text-indent: .32em;
  text-decoration: none;
  color: #f7f2e9;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(18, 16, 14, .26);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .24), inset 0 0 0 1px rgba(255, 255, 255, .06);
  animation: sellIn 1s cubic-bezier(.22, .61, .36, 1) .85s both;
  transition: background-color .22s, transform .22s, box-shadow .22s;
}
.sell:hover {
  background: rgba(26, 22, 18, .46);
  transform: translate(-50%, -50%) scale(1.045);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .32), inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.sell:active { transform: translate(-50%, -50%) scale(.97); }
@keyframes sellIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.94); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 首页：跟声明框同一套材质的按钮，挂在声明框下面，中间留一道缝 */
body.home .top .sell {
  position: static;
  transform: none;
  z-index: auto;
  padding: 11px 34px;
  font-size: 18px;
  letter-spacing: .28em;
  text-indent: .28em;
  color: #17150f;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .26);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  animation: sellFade .9s ease .95s both;
  transition: background-color .2s, transform .2s;
}
body.home .top .sell:hover {
  color: #17150f;
  background: rgba(255, 255, 255, .38);
  box-shadow: none;
  transform: translateY(-2px);
}
body.home .top .sell:active { transform: translateY(0) scale(.97); }
@keyframes sellFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 卡密兑换 */
.redeem {
  padding: 20px 22px 22px;
  margin-bottom: 16px;
  animation: fadeUp .8s cubic-bezier(.22, .61, .36, 1) .12s both;
}
.redeem-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.redeem-title { font-size: 14px; letter-spacing: .12em; color: #f4efe6; }
.redeem-note { font-size: 11.5px; letter-spacing: .06em; color: var(--dim); }
.redeem-form { display: flex; gap: 10px; }
.redeem-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: .1em;
  color: #f7f2e9;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .06);
  outline: none;
  transition: border-color .2s, background-color .2s;
}
.redeem-form input::placeholder { color: rgba(244, 238, 229, .32); letter-spacing: .06em; }
.redeem-form input:focus { border-color: rgba(230, 201, 168, .6); background: rgba(255, 255, 255, .09); }
.redeem-form button {
  flex: none;
  padding: 12px 18px;
  font-size: 13px;
  letter-spacing: .1em;
  color: #1a1712;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, #f0dcc0, #dcc0a0);
  cursor: pointer;
  transition: filter .2s, transform .2s, opacity .2s;
}
.redeem-form button:hover { filter: brightness(1.06); }
.redeem-form button:active { transform: scale(.985); }
.redeem-form button:disabled { opacity: .55; cursor: default; }
.redeem-status {
  margin: 12px 0 0;
  min-height: 1em;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--dim);
}
.redeem-status.is-ok { color: #a4d9ad; }
.redeem-status.is-err { color: #e8a08f; }
.redeem-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(230, 201, 168, .3);
  border-radius: 12px;
  background: rgba(230, 201, 168, .08);
  animation: fadeUp .5s cubic-bezier(.22, .61, .36, 1) both;
}
.redeem-card[hidden] { display: none; }
.redeem-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.redeem-name { font-size: 14px; letter-spacing: .06em; color: #f7f2e9; }
.redeem-meta { font-size: 11.5px; color: var(--dim); word-break: break-all; }
.redeem-dl {
  flex: none;
  padding: 10px 18px;
  font-size: 12.5px;
  letter-spacing: .1em;
  color: #1a1712;
  text-decoration: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #f0dcc0, #dcc0a0);
  transition: filter .2s;
}
.redeem-dl:hover { filter: brightness(1.06); }

/* 商品卡片 */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 14px;
}
.shop-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(18, 16, 14, .52);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .3);
  animation: fadeUp .7s cubic-bezier(.22, .61, .36, 1) both;
  transition: transform .22s, box-shadow .22s, background-color .22s;
}
.shop-card:hover {
  transform: translateY(-3px);
  background: rgba(26, 22, 19, .68);
  box-shadow: 0 22px 52px rgba(0, 0, 0, .4);
}
.shop-thumb { aspect-ratio: 16 / 10; background: rgba(255, 255, 255, .05) center/cover no-repeat; }
.shop-thumb.is-empty { display: grid; place-items: center; }
.shop-thumb.is-empty::after {
  content: 'NO IMAGE';
  font-size: 10px;
  letter-spacing: .2em;
  color: rgba(244, 238, 229, .26);
}
.shop-body { display: flex; flex-direction: column; gap: 7px; padding: 14px 16px 17px; }
.shop-line { display: flex; align-items: baseline; gap: 10px; }
.shop-name { flex: 1; min-width: 0; font-size: 14.5px; letter-spacing: .04em; color: #f6f1e7; }
.shop-price { flex: none; font-size: 13.5px; color: #e6c9a8; font-variant-numeric: tabular-nums; }
.shop-meta { font-size: 11px; letter-spacing: .06em; color: var(--dim); }
.shop-desc { margin: 0; font-size: 12px; line-height: 1.65; color: rgba(244, 238, 229, .7); }
.shop-empty { margin: 0; padding: 30px 20px; text-align: center; font-size: 12.5px; color: var(--dim); }

/* 免费下载按钮 */
.free-dl {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 12.5px;
  letter-spacing: .1em;
  text-decoration: none;
  color: #17150f;
  background: rgba(255, 255, 255, .82);
  border: 0;
  border-radius: 999px;
  transition: background-color .2s, transform .2s;
}
.free-dl:hover { background: #fff; transform: translateY(-1px); }
.free-dl.is-off {
  color: var(--dim);
  background: rgba(255, 255, 255, .12);
  cursor: not-allowed;
}
.free-dl.is-off:hover { background: rgba(255, 255, 255, .12); transform: none; }

/* 背景面板：切换 / 添加 / 删除 */
@keyframes boxIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.bgbox {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 4;
  width: 268px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  background: rgba(18, 18, 20, .68);
  color: #f4f1ea;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .4);
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  animation: boxIn .34s cubic-bezier(.22, .61, .36, 1) both;
}
.bgbox[hidden] { display: none; }
.bgbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px 2px;
  font-size: 12.5px;
  letter-spacing: .08em;
  opacity: .92;
}
.bgbox-x {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: inherit;
  font-size: 14px;
  line-height: 21px;
  cursor: pointer;
}
.bgbox-x:hover { background: rgba(255, 255, 255, .24); }
.bgbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  max-height: 234px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.bgbox-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: #15171a center/cover no-repeat;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s;
}
.bgbox-item:hover { transform: translateY(-1px); }
.bgbox-item.on { box-shadow: 0 0 0 2px #f4f1ea, 0 0 0 3px rgba(0, 0, 0, .45); }
.bgbox-item.on::after {
  content: '✓';
  position: absolute;
  left: 5px;
  bottom: 3px;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
.bgbox-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 12px;
  line-height: 17px;
  text-align: center;
  cursor: pointer;
}
.bgbox-del:hover { background: rgba(0, 0, 0, .85); }
.bgbox-tip {
  margin: 9px 2px 8px;
  min-height: 17px;
  font-size: 11.5px;
  line-height: 1.5;
  opacity: .7;
}
.bgbox-add {
  width: 100%;
  padding: 8px 10px;
  border: 1px dashed rgba(255, 255, 255, .35);
  border-radius: 9px;
  background: transparent;
  color: #f4f1ea;
  font-family: inherit;
  font-size: 12.5px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.bgbox-add:hover { border-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .07); }
.bgbox-login { display: grid; gap: 6px; margin-top: 8px; }
.bgbox-login[hidden] { display: none; }
.bgbox-login input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: #f4f1ea;
  font-family: inherit;
  font-size: 12.5px;
}
.bgbox-login input::placeholder { color: rgba(244, 241, 234, .45); }
.bgbox-login input:focus { outline: 0; border-color: rgba(255, 255, 255, .6); }
.bgbox-login button {
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: #f4f1ea;
  color: #17150f;
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

@keyframes swapIn { from { opacity: .2; transform: scale(1.015); } to { opacity: 1; transform: none; } }
.photo.in { animation: swapIn .42s ease; }

/* ============ 动效 ============ */
@keyframes rise {
  from { opacity: 0; transform: translateY(-14px) scale(.985); filter: blur(3px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ============ 文章页 / 列表页 ============ */
body.page { overflow-x: hidden; }

.backdrop {
  position: fixed;
  /* 向外多撑 80px：模糊会让边缘 40px 变透明，不撑出去就会露出底色（黑边/白边） */
  top: -80px;
  right: -80px;
  bottom: -80px;
  left: -80px;
  z-index: 0;
  overflow: hidden;
  background-color: #0b0d10;
  filter: blur(40px) saturate(1.1) brightness(.42);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0 auto;
  padding: 54px 22px 96px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  animation: fadeUp .7s cubic-bezier(.22, .61, .36, 1) both;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .42em .9em;
  font-size: 12.5px;
  letter-spacing: .1em;
  color: #f2ede4;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 18, 16, .38);
  backdrop-filter: blur(8px);
  transition: background-color .2s, opacity .2s;
}
.back:hover { background: rgba(20, 18, 16, .62); }
.back span { opacity: .6; }

.glass {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(18, 16, 14, .52);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .34);
}

.page-head {
  padding: 26px 26px 22px;
  margin-bottom: 16px;
  animation: fadeUp .8s cubic-bezier(.22, .61, .36, 1) .06s both;
}
.page-head .kicker {
  display: block;
  margin-bottom: 10px;
  font-size: 10.5px;
  letter-spacing: .34em;
  color: var(--dim);
}
.page-head h1 {
  margin: 0;
  padding: 0;
  font-size: clamp(1.32rem, 4.6vw, 1.72rem);
  font-weight: 500;
  letter-spacing: .12em;
  white-space: normal;
  color: #f7f2e9;
}
.page-head .meta {
  margin: 12px 0 0;
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* 文章列表 */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  animation: fadeUp .7s cubic-bezier(.22, .61, .36, 1) both;
  border-bottom: 1px solid var(--line);
}
.list li:last-child { border-bottom: 0; }
.list a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 17px 26px;
  color: inherit;
  text-decoration: none;
  transition: background-color .2s;
}
.list a:hover { background: rgba(255, 255, 255, .05); }
.list time {
  flex: none;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.list .t {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  letter-spacing: .04em;
  color: #f4efe6;
}
.list .pin {
  flex: none;
  font-size: 10px;
  letter-spacing: .1em;
  color: #e6c9a8;
  border: 1px solid rgba(230, 201, 168, .34);
  border-radius: 999px;
  padding: 1px 7px;
}
.list .v {
  flex: none;
  font-size: 11px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* 文章正文 */
.article { padding: 30px 28px 34px; animation: fadeUp .8s cubic-bezier(.22, .61, .36, 1) .06s both; }
.article h1 {
  margin: 0;
  padding: 0;
  font-size: clamp(1.42rem, 5vw, 1.9rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .08em;
  white-space: normal;
  color: #f9f4eb;
}
.article .meta {
  margin: 14px 0 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.body {
  font-size: 15.5px;
  line-height: 2.1;
  letter-spacing: .045em;
  color: #ece5da;
}
.body p { margin: 1.25em 0 0; }
.body p:first-child { margin-top: 1.4em; }

.note {
  margin: 26px 0 0;
  padding: 22px;
  text-align: center;
  color: var(--dim);
  font-size: 12.5px;
  letter-spacing: .1em;
}
.note:empty { display: none; }
.note a { color: #e6c9a8; text-decoration: none; border-bottom: 1px solid rgba(230, 201, 168, .3); }

/* 底部 */
.foot {
  position: relative;
  z-index: 1;
  padding: 0 22px 74px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .18em;
  color: rgba(244, 238, 229, .34);
}

/* ============ 响应式 ============ */
@media (max-width: 620px) {
  .top { padding-top: 18px; gap: 10px; }
  .more { min-width: 108px; padding: 9px 26px; font-size: 15.5px; letter-spacing: .22em; text-indent: .22em; }
  .top-actions { gap: 8px 14px; }
  .swap { right: 13px; bottom: 13px; padding: 5px 10px; font-size: 10.5px; }
  .swap-fx { bottom: 41px; }
  .tip { bottom: 13px; padding: 8px 17px; font-size: 11.5px; letter-spacing: .1em; text-indent: .1em; }
  .tip-card { padding: 22px 16px 16px; }
  .tip-amounts { gap: 6px; }
  .tip-amt { padding: 9px 2px; font-size: 13px; }
  .sell { left: 64%; top: 46%; padding: 15px 32px; font-size: 17px; letter-spacing: .24em; }
  body.home .top .sell { padding: 9px 26px; font-size: 15.5px; letter-spacing: .22em; }
  .redeem { padding: 16px 16px 18px; }
  .redeem-form { flex-wrap: wrap; }
  .redeem-form input, .redeem-form button { flex: 1 1 100%; }
  .redeem-dl { flex: 1 1 100%; text-align: center; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .shop-body { padding: 11px 12px 14px; }
  .shop-name { font-size: 13px; }
  .shop-desc { font-size: 11px; }
  .bgbox { left: 13px; right: 13px; bottom: 74px; width: auto; padding: 12px; }
  .bgbox-grid { grid-template-columns: repeat(4, 1fr); max-height: 42vh; }
  h1 { padding: .55em 1em; }
  .desc { padding: 1em 1.2em 1.15em; }
  .wrap { padding: 34px 16px 70px; }
  .page-head, .article { padding: 22px 18px; }
  .list a { padding: 15px 18px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .panel, .desc h2, .desc p, .topbar, .page-head, .article, .list li { animation: none; }
  .swap, .photo.in { animation: none; }
}
