:root {
  --purple: #7047d8;
  --purple-dark: #4d31a7;
  --purple-soft: #efe8ff;
  --ink: #171421;
  --muted: #706b7f;
  --line: #e7e0f3;
  --card: #ffffff;
  --bg: #fbf8ff;
  --shadow: 0 18px 45px rgba(77, 49, 167, .12);
}

* { box-sizing: border-box; }
/* 兜底：本文件里大量组件类显式设置了 display:flex/grid，会盖掉浏览器对
   [hidden] 的默认 display:none —— 例如 .summary-line 曾因此“hidden 了却还显示”。
   这里统一保证 hidden 一定不可见（!important 以压过同优先级的类规则）。 */
[hidden] { display: none !important; }
/* 同一条兜底覆盖不到 <template>/图表等自定义隐藏；如需显式隐藏可用 .is-hidden */
.is-hidden { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .topbar,
  .nav a,
  .nav a::before { transition: none; }
}
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  /* 仅使用系统内置免费字体（跨平台）：macOS 苹方、Windows 微软雅黑、Linux Noto Sans CJK，
     均为操作系统自带授权字体，无商用字体文件引用，不存在侵权风险。 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "WenQuanYi Micro Hei", Arial, sans-serif;
  background: var(--color-bg);
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 104px auto 22px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--sh-sm);
}
body[data-page="detail"] .shell {
  overflow: visible;
}

.topbar {
  width: min(1180px, calc(100% - 28px));
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 30px;
  border: 1px solid var(--color-border);
  border-radius: 0 0 16px 16px;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .08);
  position: fixed;
  left: 50%;
  top: 0;
  transform: translateX(-50%) translateY(0);
  z-index: 1000;
  will-change: transform;
  transition: transform .3s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.topbar.nav-hidden {
  transform: translateX(-50%) translateY(calc(-100% - 2px));
}
.topbar.is-scrolled {
  border-color: rgba(112, 71, 216, .18);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 30px rgba(16, 24, 40, .12);
}

.brand, .nav a, .profile {
  color: inherit;
  text-decoration: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  font-size: 22px;
  font-weight: 800;
}
.brand strong, .brand span:last-child { font-size: 1em; letter-spacing: 0; }
.paw, .mini-icon {
  color: #a77beb;
  font-weight: 900;
}
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-weight: 700;
}
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  line-height: 1.25;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease, transform .12s ease;
}
.nav a::before {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 5px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(.45);
  transition: opacity .18s ease, transform .18s ease;
}
.nav a:hover {
  color: var(--purple);
  background: rgba(112, 71, 216, .07);
}
.nav a:active { transform: translateY(1px); }
.nav a:focus-visible {
  outline: 3px solid rgba(112, 71, 216, .3);
  outline-offset: 2px;
}
.nav a.is-active,
.nav a[aria-current] {
  color: var(--purple-dark);
  font-weight: 800;
  background: rgba(112, 71, 216, .08);
}
.nav a.is-active::before,
.nav a[aria-current]::before {
  opacity: 1;
  transform: scaleX(1);
}
.support-link {
  position: relative;
}
.support-link:after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 280px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #342946;
  background: #fff;
  box-shadow: 0 16px 36px rgba(23, 20, 33, .14);
  font-size: 13px;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: min(420px, calc(100vw - 24px));
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: .18s ease;
  z-index: 30;
}
.support-link:hover:after,
.support-link:focus-visible:after {
  opacity: 1;
  transform: translateY(0);
}

#home,
#products,
#support {
  scroll-margin-top: 124px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 0 0 1px var(--line);
}
.link-icon { text-decoration: none; }
.user-icon {
  color: var(--ink);
}
.user-icon:before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
}
.user-icon span {
  width: 22px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 42% 42%;
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
}
.user-icon.active,
.user-icon:hover {
  color: var(--purple);
}
.cart-count {
  position: absolute;
  right: -6px;
  top: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--purple);
  font-size: 12px;
  line-height: 19px;
}
.profile { font-size: 12px; line-height: 1.35; text-align: center; }
.profile small { color: var(--muted); }
.lead {
  margin: -8px 0 22px;
  color: var(--muted);
}

.hero {
  min-height: 286px;
  margin: 30px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 44px 1fr 1.2fr 44px;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(110deg, #decfff 0%, #f6f1ff 48%, #e9dcff 100%);
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0;
}
.hero p { color: #50445f; margin: 0 0 24px; font-weight: 700; }
.primary, .outline, .danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 24px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--motion), border-color var(--motion), color var(--motion);
}
.primary { color: #fff; background: var(--color-primary); }
.primary:hover:not(:disabled) { background: var(--color-primary-hover); }
.primary:disabled {
  border-color: var(--color-border-strong);
  background: var(--color-border-strong);
  color: #fff;
  cursor: not-allowed;
}
.outline {
  color: var(--color-text);
  background: var(--color-surface);
  border-color: var(--color-border-strong);
}
.outline:hover:not(:disabled) { background: var(--color-surface-2); }
.danger {
  color: var(--color-danger);
  background: var(--color-surface);
  border-color: var(--color-danger);
}
.danger:hover:not(:disabled) { background: var(--color-danger-soft); }
.wide { width: 100%; }
.arrow {
  width: 44px;
  height: 100%;
  border: 0;
  color: #8b69d8;
  background: transparent;
  font-size: 50px;
  cursor: pointer;
}

.hero-art {
  position: relative;
  height: 286px;
}
.cat {
  position: absolute;
  width: 210px;
  height: 132px;
  background: #fff;
  border: 5px solid #111;
  border-bottom: 0;
  border-radius: 48% 52% 16px 16px;
}
.cat.big {
  right: 92px;
  bottom: 44px;
  transform: rotate(-8deg);
}
.ear {
  position: absolute;
  top: -40px;
  width: 66px;
  height: 66px;
  background: #fff;
  border-left: 5px solid #111;
  border-top: 5px solid #111;
  transform: rotate(45deg);
}
.ear.left { left: 22px; }
.ear.right { right: 20px; }
.eye {
  position: absolute;
  top: 58px;
  width: 12px;
  height: 18px;
  border-radius: 50%;
  background: #111;
}
.eye.left { left: 78px; }
.eye.right { right: 76px; }
.mouth {
  position: absolute;
  left: 95px;
  top: 74px;
  font-size: 22px;
  font-weight: 900;
}
.paw-pad {
  position: absolute;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffb8c8;
  box-shadow: inset 0 0 0 6px #fff;
}
.paw-pad.left { left: 18px; }
.paw-pad.right { right: 18px; }
.keyboard {
  position: absolute;
  right: 28px;
  bottom: 22px;
  width: 250px;
  height: 58px;
  border: 4px solid #111;
  border-radius: 10px;
  background: repeating-linear-gradient(90deg, #908ca0 0 18px, #7f7a8c 18px 21px);
  transform: rotate(8deg);
}
.mousepad {
  position: absolute;
  right: 310px;
  bottom: 26px;
  width: 110px;
  height: 74px;
  border: 4px solid #111;
  border-radius: 12px;
  background: #ffd8e0;
  transform: rotate(9deg);
}
.note {
  position: absolute;
  right: 65px;
  top: 54px;
  color: #8a5ce2;
  font-size: 48px;
  font-weight: 900;
}
.spark {
  position: absolute;
  right: 310px;
  top: 62px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
}

.section, .flow, .detail-panel {
  padding: 0 30px 34px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title h2 { margin: 0; font-size: 26px; }
/* ---------- 模型列表关键词搜索 ---------- */
.product-search {
  position: relative;
  margin: 0 0 16px;
}
.product-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 40px 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  /* 16px 起：低于此值 iOS Safari 聚焦时会自动放大整页 */
  font: inherit;
  font-size: 16px;
}
.product-search input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(112, 71, 216, .12);
}
/* 去掉 type=search 在 WebKit 下的原生清除按钮，避免与自定义按钮重复 */
.product-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.product-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #ece7f7;
  color: #6b5f80;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.product-search-clear:hover { background: #ded5f2; color: var(--purple-dark); }
.product-search-empty {
  margin: 0 0 16px;
  padding: 22px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fbf9ff;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.sort-disclosure {
  position: relative;
  margin-left: auto;
}
.product-sort-toggle {
  min-width: 84px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text);
  background: rgba(255, 255, 255, .82);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.product-sort-toggle:hover { transform: translateY(-2px); border-color: var(--color-primary); }
.product-sort-toggle[aria-expanded="true"] { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(124, 77, 255, .12); }
.product-sort-toggle span { display: inline-block; margin-left: 5px; transition: transform .18s ease; }
.product-sort-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
.product-sort {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  gap: 7px;
  min-width: 316px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  color: var(--color-muted);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 34px rgba(42, 28, 78, .15);
  backdrop-filter: blur(16px);
  font-size: 13px;
}
.product-sort[hidden] { display: none; }
.sort-row {
  display: grid;
  grid-template-columns: 58px auto;
  align-items: center;
  gap: 8px;
}
.sort-label {
  text-align: right;
  white-space: nowrap;
}
.sort-segments {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(124, 77, 255, .07);
}
.sort-segments button {
  min-height: 30px;
  padding: 5px 11px;
  border: 0;
  border-radius: 8px;
  color: var(--color-muted);
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: transform .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease;
}
.sort-segments button:hover {
  transform: translateY(-1px);
  color: var(--color-primary);
}
.sort-segments button[aria-pressed="true"] {
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 4px 10px rgba(124, 77, 255, .2);
}
.sort-segments button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.product-card {
  color: inherit;
  text-decoration: none;
  display: grid;
  grid-template-rows: auto auto auto auto;
  min-height: 272px;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: 14px;
  background: var(--color-surface);
  box-shadow: none;
  cursor: pointer;
}
.product-card:hover {
  border-color: var(--color-primary);
}
.cat-pic {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #faf7ff);
  overflow: hidden;
}
.image-pic img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.cat-pic .small-cat {
  position: absolute;
  left: 36px;
  top: 38px;
  width: 116px;
  height: 72px;
  border: 3px solid #111;
  border-bottom: 0;
  border-radius: 52% 48% 12px 12px;
  background: var(--cat-color, #fff);
}
.small-cat:before, .small-cat:after {
  content: "";
  position: absolute;
  top: -22px;
  width: 38px;
  height: 38px;
  background: var(--cat-color, #fff);
  border-left: 3px solid #111;
  border-top: 3px solid #111;
  transform: rotate(45deg);
}
.small-cat:before { left: 14px; }
.small-cat:after { right: 14px; }
.cat-pic .prop {
  position: absolute;
  right: 22px;
  bottom: 24px;
  font-size: 38px;
}
.product-card h3 { margin: 12px 0 6px; font-size: 17px; }
.version {
  display: inline-flex;
  padding: 4px 11px;
  border-radius: 999px;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  font-size: 13px;
  font-weight: 800;
}
.product-card .money {
  display: block;
  margin-top: 10px;
  color: var(--color-primary);
  font-size: 20px;
  font-weight: 900;
}
.product-actions {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.cart-add {
  width: 42px;
  height: 42px;
  border: 1px solid var(--purple);
  border-radius: 10px;
  color: var(--purple);
  background: #fff;
  cursor: pointer;
}
.cart-add:hover {
  color: #fff;
  background: var(--purple);
}

.detail-panel {
  display: grid;
  grid-template-columns: minmax(420px, 560px) minmax(360px, 1fr);
  align-items: start;
  gap: 34px;
  padding-top: 34px;
  border-top: 1px solid #f0eaf8;
}
.detail-left {
  display: grid;
  gap: 22px;
  min-width: 0;
}
.page-panel {
  padding-top: 34px;
}
.gallery, .detail-copy {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.detail-copy {
  position: sticky;
  top: 108px;
  z-index: 2;
}
.preview {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.preview .cat-pic { height: 100%; aspect-ratio: auto; }
.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.thumbs button {
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.thumbs button.active { border-color: var(--purple); box-shadow: inset 0 0 0 1px var(--purple); }
.crumbs {
  margin-bottom: 28px;
  color: var(--purple);
  font-size: 13px;
}
.detail-copy h1, .detail-copy h2 { margin: 0 0 10px; font-size: 30px; }
.price {
  display: block;
  margin: 22px 0;
  color: var(--purple);
  font-size: 40px;
}
.specs {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.specs p {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 14px 0;
  color: var(--muted);
}
.specs b { color: #333; }
.buy-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 22px 0;
}
.description {
  color: #4f4a5a;
  line-height: 1.8;
}
.description h3 { color: var(--ink); margin: 18px 0 6px; }
.detail-notes {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #4f4a5a;
  line-height: 1.8;
  overflow: hidden;
}
.detail-copy-block {
  padding: 20px;
}
.detail-notes h2 {
  margin: 26px 0 10px;
  font-size: 20px;
  color: var(--ink);
}
.detail-image-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
}
.detail-image-stack img,
.detail-fallback {
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
  object-fit: contain;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
.detail-image-stack img {
  height: auto;
  display: block;
}

.timeline {
  position: relative;
  display: grid;
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}
.timeline:before {
  content: "";
  position: absolute;
  left: 27px;
  top: 20px;
  bottom: 20px;
  border-left: 2px dashed #cfc4e6;
}
.timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: center;
}
.timeline article > span {
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #8c65ef, var(--purple));
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
}
.timeline article div {
  min-height: 116px;
  padding: 24px 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 20, 33, .05);
}
.timeline h3 { margin: 0 0 10px; }
.timeline h2 { margin: 0 0 10px; font-size: 20px; }
.timeline p { margin: 0; color: var(--muted); }
.step-card {
  display: grid;
  gap: 14px;
}
.step-product {
  grid-template-columns: 1fr 150px;
  align-items: center;
}
.step-product h2,
.step-product p {
  grid-column: 1;
}
.step-product .order-product {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.order-product .cat-pic {
  height: 86px;
  border: 1px solid var(--line);
}
.order-product .small-cat {
  left: 32px;
  top: 26px;
  transform: scale(.72);
  transform-origin: left top;
}
.order-product .prop {
  right: 18px;
  bottom: 18px;
  font-size: 26px;
}
.order-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.order-box > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.order-box > div:last-child { border-bottom: 0; }
.order-box span { color: var(--muted); font-size: 13px; margin-left: 8px; }
.pay-method {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #262030;
  font-weight: 800;
  cursor: pointer;
}
.pay-method.active {
  border-color: #58c96a;
  color: #159033;
  background: #f5fff7;
}

.checkout-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  padding: 34px 30px;
}
.checkout-main h1 {
  margin: 0 0 14px;
  font-size: 30px;
}
.checkout-card,
.checkout-summary {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 20, 33, .05);
}
.checkout-card {
  padding: 22px;
  margin-bottom: 18px;
}
.checkout-card h2,
.checkout-summary h2,
.flow-mini h2 {
  margin: 0 0 16px;
  font-size: 18px;
}
.checkout-product {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: center;
}
.account-required p {
  margin: 0 0 18px;
  color: var(--muted);
}
.cart-list {
  display: grid;
  gap: 14px;
}
.cart-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 86px 112px 58px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
}
/* 单选语义：被选中作为「本次获取」的那一个带对勾标记 */
.cart-row.is-selected { border-color: #8b5cf6; background: #faf8ff; }
.cart-pick { position: absolute; top: 8px; right: 50px; color: #6d28d9; font-size: 12px; font-weight: 700; }
.cart-row-actions { display: flex; flex-direction: column; gap: 6px; }
.cart-row-actions .outline,
.cart-row-actions .delete-btn { width: 100%; }
.checkout-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.checkout-card-head h2 { margin: 0; }
.checkout-card-head .outline { text-decoration: none; white-space: nowrap; }
/* 站点级价格隐藏：支付宝支付关闭时由 JS 给 <body> 挂 .price-hidden，
   全站（获取页清单、汇总金额行、订单页金额）都不显示价格。
   这里用 body.price-hidden 提高优先级，压过 .summary-line{display:flex} 等自身规则。
   注意：旧规则里的 `body.price-hidden .money` 是死选择器——全站没有任何元素带 class="money"，
   而订单金额由 money() 直接输出纯文本，渲染在 .customer-order-head strong / .customer-order-item
   strong / 合计位置，均不在原隐藏范围内 ⇒ 关闭支付后订单页仍显示「¥0.00」、历史已支付订单
   还会显示 ¥9.90。下面把订单页的金额节点一并覆盖。 */
body.price-hidden [id="orderTotal"],
body.price-hidden [id="payTotal"],
body.price-hidden .cart-row > strong,
body.price-hidden #detailPrice,
body.price-hidden .customer-order-head strong,
body.price-hidden .customer-order-item strong,
body.price-hidden .customer-order-detail strong { display: none !important; }
.cart-thumb .cat-pic {
  height: 78px;
}
.cart-thumb .small-cat {
  left: 22px;
  top: 24px;
  transform: scale(.64);
  transform-origin: left top;
}
.cart-thumb .prop {
  right: 14px;
  bottom: 16px;
  font-size: 24px;
}
.cart-meta h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.cart-meta span {
  color: var(--muted);
  font-size: 13px;
}
.qty-control {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}
.qty-control button {
  height: 100%;
  border: 0;
  background: #faf7ff;
  color: var(--purple);
  font-size: 18px;
  cursor: pointer;
}
.delete-btn {
  min-height: 36px;
  border: 1px solid #f0a6a6;
  border-radius: 9px;
  color: #c03939;
  background: #fff7f7;
  cursor: pointer;
}
.empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  min-height: 190px;
  align-content: center;
  padding: 26px;
  border: 1px dashed #cfc4e6;
  border-radius: 12px;
  background: #fbf8ff;
}
.empty-state h3,
.empty-state p {
  margin: 0;
}
.empty-state p {
  color: var(--muted);
}
.order-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.order-line span { color: var(--muted); margin-left: 8px; }
.pay-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
/* 关闭支付宝时前台只剩两个入口，两列更均衡 */
.pay-options:has([data-pay="支付宝支付"][hidden]) { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .pay-options { grid-template-columns: 1fr; } }
.donation-apply-box { margin-top: 16px; padding: 18px; border: 1px solid #d7e1ec; border-radius: 14px; background: #f8fbfd; }
.donation-entry-hint, .product-donation-hint { margin: 10px 0 0; color: #7047d8; font-size: 13px; line-height: 1.6; font-weight: 700; }
.product-donation-hint { padding-top: 8px; border-top: 1px solid var(--line); }
/* 善意提示：不做强制门槛，用中性提示引导，视觉上区别于紫色强调提示 */
.donation-goodwill-notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #d9c7a3;
  border-radius: 0 8px 8px 0;
  background: #fdfaf3;
  color: #6b5b3e;
  font-size: 13px;
  line-height: 1.7;
}
.donation-apply-box label { display: block; margin: 12px 0; }
.donation-apply-box input { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 16px; }
.donation-apply-box label.policy-consent { display: flex; gap: 8px; align-items: flex-start; line-height: 1.6; font-size: 13px; }
.donation-apply-box label.policy-consent input { flex: 0 0 auto; width: auto; margin-top: 4px; }
.donation-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .donation-fields { grid-template-columns: 1fr; } }
/* 兑换码兑换区（一码一次；与公益凭证区同构，视觉区分） */
.redeem-apply-box { margin-top: 16px; padding: 18px; border: 1px solid #d8cdf3; border-radius: 14px; background: #faf8ff; }
.redeem-apply-box label { display: block; margin: 12px 0; }
.redeem-apply-box input, .redeem-apply-box select { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 16px; }
.redeem-apply-box input#redeemCode { text-transform: uppercase; letter-spacing: 1px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.admin-code-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; padding-right: 4px; }
.admin-code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.admin-code-row .code-hint { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; }
.admin-code-row small { color: var(--muted); }
.admin-code-batch { padding: 10px 0; border-bottom: 1px solid var(--line); }
.admin-code-batch:last-child { border-bottom: 0; }
.admin-code-batch-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-code-output { width: 100%; margin-top: 10px; padding: 12px; border-radius: 10px; border: 1px dashed #b9a4ea; background: #faf8ff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.8; resize: vertical; }
.checkout-summary {
  align-self: start;
  position: sticky;
  top: 110px;
  padding: 22px;
}
.summary-line,
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.summary-total {
  margin-bottom: 18px;
  color: var(--ink);
}
.summary-total strong {
  color: var(--purple);
  font-size: 26px;
}
.flow-mini {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.flow-mini ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.flow-mini li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #342946;
}
.flow-mini li span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: var(--purple);
  display: grid;
  place-items: center;
  font-size: 14px;
}

.account-page {
  min-height: 560px;
  display: grid;
  place-items: start center;
  padding: 48px 30px;
}
.account-card {
  width: min(560px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 20, 33, .06);
}
.account-card h1 {
  margin: 0 0 16px;
  font-size: 30px;
}
.account-form {
  display: grid;
  gap: 16px;
}
.account-form label {
  display: grid;
  gap: 8px;
  color: #342946;
  font-weight: 800;
}
.account-form input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}
.captcha-row {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 10px;
}
.captcha-code {
  min-height: 48px;
  border: 1px solid #bba8ea;
  border-radius: 10px;
  color: #4d31a7;
  background:
    repeating-linear-gradient(135deg, #f5efff 0 8px, #ffffff 8px 16px);
  font: 900 22px "Courier New", monospace;
  letter-spacing: 3px;
  cursor: pointer;
  transform: skew(-6deg);
}
.account-info {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf7ff;
}
.account-avatar {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  position: relative;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.account-avatar:before {
  top: 12px;
  width: 15px;
  height: 15px;
}
.account-avatar span {
  bottom: 11px;
  width: 28px;
  height: 15px;
}
.account-info span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}
.account-info strong {
  font-size: 18px;
}
.account-warning {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid #efd58f;
  border-radius: 10px;
  color: #7a5a13;
  background: #fff9e8;
  line-height: 1.6;
}
.account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}
/* .danger unified in shared button rule above */

.admin-page {
  padding: 34px 30px;
}
.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.admin-hero h1 {
  margin: 0 0 10px;
  font-size: 32px;
}
.admin-hero p {
  margin: 0;
  color: var(--muted);
}
.admin-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.admin-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 20, 33, .05);
}
.admin-panel h2 {
  margin: 0 0 18px;
  font-size: 20px;
}
.admin-product-list {
  display: grid;
  gap: 12px;
}
.admin-product {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.admin-product.is-offline {
  background: #fafafa;
  color: #777;
}
.admin-product h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.admin-product span {
  color: var(--muted);
  font-size: 13px;
}
.admin-actions {
  display: grid;
  gap: 8px;
}
.admin-actions button {
  min-width: 58px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}
.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.admin-form h2,
.admin-form .span-2 {
  grid-column: 1 / -1;
}
.admin-form label {
  display: grid;
  gap: 8px;
  color: #342946;
  font-weight: 800;
}
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}
.admin-image-set {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px dashed #cfc4e6;
  border-radius: 12px;
}
.admin-image-set legend {
  padding: 0 8px;
  color: var(--purple);
  font-weight: 900;
}
.admin-help {
  margin: -4px 0 0;
  color: var(--muted);
  line-height: 1.6;
}
.admin-upload-preview {
  display: grid;
  gap: 12px;
}
.admin-upload-preview div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf7ff;
}
.admin-upload-preview img {
  width: 120px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.admin-upload-preview span,
.admin-upload-preview p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.admin-form textarea {
  resize: vertical;
  line-height: 1.6;
}
.switch-line {
  display: flex !important;
  align-items: center;
  gap: 10px;
}
.switch-line input {
  width: 18px;
  min-height: 18px;
}
.admin-orders {
  display: grid;
  gap: 14px;
}
.admin-order {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.admin-order-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}
.admin-order p {
  margin: 0 0 12px;
  color: var(--muted);
}
.admin-order ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.admin-order li {
  display: grid;
  gap: 8px;
}
.admin-order textarea {
  width: 100%;
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf7ff;
  resize: vertical;
  font: inherit;
}

footer {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 30px;
  color: #8a8297;
  background: #f5efff;
  font-size: 13px;
}
footer strong { color: #9a73e7; margin-right: auto; font-size: 18px; }
.footer-message { margin-left: auto; text-align: right; }

.cart {
  position: fixed;
  right: 20px;
  top: 20px;
  bottom: 20px;
  width: min(390px, calc(100vw - 40px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(23, 20, 33, .22);
  transform: translateX(calc(100% + 34px));
  transition: transform .22s ease;
  z-index: 10;
}
.cart.open { transform: translateX(0); }
.cart-head, .cart-total, .cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.cart-head h2 { margin: 0; }
.cart-items {
  display: grid;
  gap: 12px;
  margin: 22px 0;
  min-height: 180px;
}
.cart-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.cart-total {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.cart-total strong { color: var(--color-primary); font-size: 24px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 22px;
  border-radius: 999px;
  color: #fff;
  background: var(--color-text);
  opacity: 0;
  transition: .22s ease;
  z-index: 20;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 920px) {
  .shell { margin-top: 96px; }
  .topbar { min-height: 78px; padding: 0 18px; gap: 12px; }
  .brand { min-width: 0; }
  .brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav { flex: 0 0 auto; gap: 4px; }
  .nav a { padding-inline: 10px; }
  .actions { gap: 8px; }
  .hero { grid-template-columns: 1fr; padding: 28px; }
  .hero .arrow { display: none; }
  .hero-art { height: 240px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-panel { grid-template-columns: 1fr; }
  .gallery, .detail-copy { position: static; }
  .detail-image-stack { width: 100%; min-width: 0; }
  .detail-notes { width: 100%; margin: 0; }
  .checkout-page { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
  .cart-row { grid-template-columns: 92px 1fr 82px; }
  .qty-control, .delete-btn { grid-column: span 1; }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .shell { width: calc(100% - 16px); margin: 80px auto 8px; border-radius: 12px; }
  .topbar { width: calc(100% - 16px); min-height: 64px; top: 0; padding: 0 10px; gap: 5px; border-radius: 0 0 16px 16px; }
  .brand { flex: 1 1 auto; font-size: 17px; }
  .brand span:last-child { display: none; }
  .nav { margin-left: 0; }
  .nav a { min-height: 44px; padding-inline: 8px; font-size: 15px; }
  .actions { gap: 4px; }
  .icon-btn { width: 44px; height: 44px; }
  #home, #products, #support { scroll-margin-top: 84px; }
  .profile { display: none; }
  .hero, .section, .flow, .detail-panel { margin: 16px; padding: 0 0 24px; }
  .hero { padding: 22px; min-height: 420px; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .sort-disclosure { width: 100%; }
  .product-sort-toggle { width: 100%; }
  .product-sort { position: static; width: 100%; min-width: 0; margin-top: 8px; box-sizing: border-box; }
  .sort-row { grid-template-columns: 58px minmax(0, 1fr); }
  .sort-segments button { flex: 1; padding-inline: 6px; }
  .product-grid { grid-template-columns: 1fr; }
  .preview { height: auto; }
  .detail-notes { margin: 0; }
  .buy-row { grid-template-columns: 1fr; }
  .timeline article { grid-template-columns: 44px 1fr; }
  .timeline article > span { width: 44px; height: 44px; }
  .timeline:before { left: 21px; }
  .step-product { grid-template-columns: 1fr; }
  .step-product .order-product {
    grid-column: 1;
    grid-row: auto;
  }
  .checkout-page { padding: 20px 16px; }
  .checkout-product, .pay-options { grid-template-columns: 1fr; }
  .order-line { align-items: flex-start; flex-direction: column; padding: 16px; }
  .cart-row { grid-template-columns: 1fr; }
  /* 手机端单列布局下，选中标记改为文档流内显示，避免与缩略图重叠 */
  .cart-pick { position: static; justify-self: end; margin-bottom: 6px; }
  .cart-thumb .cat-pic { height: 110px; }
  .account-page { padding: 28px 16px; }
  .account-actions { grid-template-columns: 1fr; }
  .admin-page { padding: 22px 16px; }
  .admin-hero { align-items: flex-start; flex-direction: column; }
  .admin-form { grid-template-columns: 1fr; }
  footer { flex-wrap: wrap; padding: 20px; gap: 12px; }
  .footer-message { width: 100%; margin-left: 0; text-align: left; }
}

@media (max-width: 420px) {
  .topbar { gap: 4px; }
  .brand { gap: 0; font-size: 15px; }
  .brand .paw { display: none; }
  .nav a { padding-inline: 6px; font-size: 14px; }
}

/* ---------- 管理后台：添加商品 / 采用主图文件名 ---------- */
.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-panel-head h2 {
  margin: 0;
}
.admin-panel-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.admin-secondary-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.admin-secondary-btn:hover { transform: translateY(-1px); border-color: var(--purple); color: var(--purple); }
.admin-secondary-btn:disabled { cursor: wait; opacity: .55; transform: none; }
.admin-import-help { margin: 10px 0 0; }
.admin-add-btn {
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.admin-add-btn:hover {
  background: var(--purple-dark);
}
.admin-name-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.admin-name-row input {
  flex: 1;
  min-width: 0;
}
.admin-name-btn {
  background: #fff;
  color: var(--purple);
  border: 1px solid #d7caf1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.admin-name-btn:hover {
  background: var(--purple-soft);
}

/* ---------- 管理后台：标签页 / 日志筛选 / 密码表单 ---------- */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.admin-tab {
  flex: 1;
  min-height: 44px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.admin-tab:hover {
  background: var(--purple-soft);
  color: var(--purple-dark);
}
.admin-tab.active {
  background: var(--purple);
  color: #fff;
}
.admin-tab-panel {
  display: none;
}
.admin-tab-panel.active {
  display: block;
}

.account-form h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.logs-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf7ff;
}
.logs-filter label {
  display: grid;
  gap: 6px;
  flex: 1;
  min-width: 160px;
  color: #342946;
  font-weight: 800;
  font-size: 14px;
}
.logs-filter input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}
.logs-filter button {
  min-height: 40px;
}
.logs-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}
.logs-pagination span {
  color: var(--muted);
  font-size: 14px;
}
.logs-pagination button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

@media (max-width: 920px) {
  .admin-tabs { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .logs-filter { flex-direction: column; align-items: stretch; }
  .logs-filter label { min-width: auto; }
}
/* 统一微交互：按钮、图标按钮和纯文字操作 */
button:not(:disabled),
a:not(.brand):not(.product-card) {
  transition: transform .18s ease, box-shadow .18s ease, color .18s ease, background-color .18s ease, border-color .18s ease;
}
button:not(:disabled):hover,
a:not(.brand):not(.product-card):hover {
  transform: translateY(-2px);
}
button:not(:disabled):active,
a:not(.brand):not(.product-card):active {
  transform: translateY(0);
  transition-duration: .08s;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(124, 87, 220, .34);
  outline-offset: 3px;
}
button:disabled {
  cursor: not-allowed;
}

/* 页面级加载骨架 */
.page-loading {
  position: fixed;
  inset: 0;
  z-index: 9000;
  overflow: auto;
  background: #f8fafc;
  padding: 22px;
}
.page-loading-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}
.page-loading-header {
  height: 76px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  margin-bottom: 28px;
}
.page-loading-content {
  min-height: 430px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 30px;
}
.skeleton-block {
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 37%, #e5e7eb 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.35s ease-in-out infinite;
}
.skeleton-block.title { width: min(360px, 65%); height: 34px; margin-bottom: 18px; }
.skeleton-block.lead { width: min(580px, 86%); margin-bottom: 30px; }
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.skeleton-card {
  height: 190px;
  border-radius: 14px;
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 37%, #e5e7eb 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.35s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (max-width: 680px) {
  .page-loading { padding: 14px; }
  .page-loading-content { padding: 20px; }
  .skeleton-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  button:not(:disabled),
  a:not(.brand):not(.product-card),
  .skeleton-block,
  .skeleton-card { transition: none; animation: none; }
}


/* ---------- 商品批量管理 ---------- */
.admin-list-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf9ff;
}
.admin-list-controls label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.admin-list-export { align-self: stretch; min-height: 34px; }
.admin-list-controls select, .admin-bulk-group select, .admin-bulk-group input { min-height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; }
.admin-check-all { margin-left: auto; }
.admin-selection-count { color: var(--muted); font-size: 13px; }
.admin-bulk-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.admin-bulk-group { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.admin-bulk-group strong { color: var(--ink); margin-right: 2px; }
.admin-bulk-group input { width: 92px; }
.admin-bulk-group button { min-height: 34px; padding: 6px 12px; border: 0; border-radius: 8px; background: var(--purple); color: #fff; cursor: pointer; font: inherit; font-weight: 700; }
.admin-bulk-group button:hover { background: var(--purple-dark); }
.admin-product { grid-template-columns: auto minmax(0, 1fr) auto; }
.admin-product-select { display: flex; align-items: center; cursor: pointer; }
.admin-product-select input { width: 18px; height: 18px; accent-color: var(--purple); }
.admin-product-main { min-width: 0; }
.admin-product-main span { display: block; line-height: 1.5; }
@media (max-width: 760px) {
  .admin-panel-head { align-items: flex-start; flex-direction: column; }
  .admin-panel-actions { width: 100%; justify-content: flex-start; }
  .admin-bulk-tools { grid-template-columns: 1fr; }
  .admin-check-all { margin-left: 0; }
  .admin-product { grid-template-columns: auto minmax(0, 1fr); }
  .admin-product .admin-actions { grid-column: 2; grid-auto-flow: column; justify-content: start; }
}
/* ---------- 全面屏安全区（刘海 / 灵动岛 / 底部横条） ----------
   各页面 viewport 已加 viewport-fit=cover；此处补内边距与偏移，
   避免顶栏被状态栏遮挡、页脚被底部横条压住。
   env() 在桌面端恒为 0，max()/calc() 取原值，不影响既有布局。 */
.topbar {
  top: env(safe-area-inset-top, 0px);
  padding-left: max(30px, env(safe-area-inset-left, 0px));
  padding-right: max(30px, env(safe-area-inset-right, 0px));
}
/* 顶栏整体下移后，主容器上边距需同步加回该偏移，否则会重叠 */
.shell { margin-top: calc(104px + env(safe-area-inset-top, 0px)); }
footer {
  padding-left: max(30px, env(safe-area-inset-left, 0px));
  padding-right: max(30px, env(safe-area-inset-right, 0px));
  padding-bottom: max(0px, env(safe-area-inset-bottom, 0px));
}
.shell { margin-bottom: max(22px, env(safe-area-inset-bottom, 0px)); }

@media (max-width: 920px) {
  .topbar {
    padding-left: max(18px, env(safe-area-inset-left, 0px));
    padding-right: max(18px, env(safe-area-inset-right, 0px));
  }
  .shell { margin-top: calc(96px + env(safe-area-inset-top, 0px)); }
}

@media (max-width: 560px) {
  .topbar {
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
  }
  footer {
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  }
  .shell {
    margin-top: calc(80px + env(safe-area-inset-top, 0px));
    margin-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }
  /* 移动端主按钮触摸目标提到 44px（原 40px 低于推荐值） */
  .primary, .outline, .danger { min-height: 44px; }
}

/* ---------- 2026-09 页脚极简版式 ---------- */
footer#support,
footer .footer-inner,
.account-footer .footer-inner {
  box-sizing: border-box;
}
footer#support {
  min-height: 0;
  padding-top: 18px;
  padding-bottom: 18px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
}
footer#support > .footer-inner,
footer > .footer-inner,
.account-footer .footer-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}
footer .footer-brand strong,
.account-footer .footer-brand strong {
  margin-right: 0;
  font-size: 16px;
}
.footer-subtitle,
.footer-contact {
  color: #8a8297;
  font-size: 12px;
  line-height: 1.6;
}
footer nav,
.account-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0;
  font-size: 13px;
}
footer nav a,
.account-footer nav a {
  color: inherit;
  text-decoration: none;
}
.footer-contact a {
  color: inherit;
}
footer .icp-beian,
.account-footer .icp-beian {
  margin-top: 2px;
  font-size: 12px;
  color: #8a8297;
}
footer .icp-beian a,
.account-footer .icp-beian a {
  color: inherit;
  text-decoration: none;
}
footer .icp-beian img,
.account-footer .icp-beian img {
  width: 12px;
  height: 13px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 4px;
}
.account-footer {
  width: 100%;
  box-sizing: border-box;
  padding: 18px 22px max(18px, env(safe-area-inset-bottom, 0px));
  color: #8a8297;
  background: #f5efff;
  font-size: 13px;
  text-align: center;
}
@media (max-width: 560px) {
  footer#support { padding-left: 18px; padding-right: 18px; }
  .footer-brand { flex-direction: column; align-items: center; gap: 2px; }
  footer nav, .account-footer nav { gap: 10px 14px; }
}
