:root {
  --bg: #0c0e13;
  --bg-soft: #141822;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f6fb;
  --muted: rgba(244, 246, 251, 0.62);
  --muted-2: rgba(244, 246, 251, 0.42);
  --accent: #5b8cff;
  --radius-card: 14px;
  --radius-ctl: 8px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1200px 620px at 18% -10%, rgba(91, 140, 255, 0.24), transparent 62%),
    radial-gradient(900px 520px at 92% 8%, rgba(255, 122, 195, 0.16), transparent 60%),
    radial-gradient(900px 700px at 50% 118%, rgba(40, 209, 168, 0.14), transparent 62%),
    linear-gradient(180deg, #0d1016 0%, #0c0e13 55%, #0a0c11 100%);
  background-size: cover;
  background-position: center;
}

.bg-layer.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.72), rgba(8, 10, 14, 0.9));
  backdrop-filter: blur(2px);
}

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.4vw, 22px);
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(18px, 3.4vw, 34px) clamp(16px, 4vw, 40px) 30px;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-row--title {
  gap: 12px;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 11px 3px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex: 0 0 auto;
}

.hero-logo {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.hero-brand-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-title {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 34px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero-tagline {
  margin: 0;
  max-width: 40ch;
  font-size: clamp(12.5px, 1.9vw, 14.5px);
  color: var(--muted);
}

.fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  flex: 0 0 auto;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.fav-btn:hover {
  background: var(--panel-strong);
  border-color: rgba(255, 255, 255, 0.24);
}

.fav-btn:active {
  transform: scale(0.97);
}

.fav-btn svg {
  width: 14px;
  height: 14px;
  color: #ffd166;
}

.fav-btn.is-done svg {
  fill: #ffd166;
}

.bookmark-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 34px;
  z-index: 80;
  white-space: nowrap;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  background: rgba(20, 24, 34, 0.96);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: var(--shadow);
}

/* ---------- Deck ---------- */
.deck-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.deck {
  display: flex;
  gap: clamp(14px, 2.4vw, 24px);
  width: 100%;
  padding: 8px 0 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  outline: none;
}

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

.card {
  --accent: #5b8cff;
  position: relative;
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  width: min(84vw, 396px);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, opacity 0.35s ease;
  opacity: 0.62;
}

.card.is-active {
  opacity: 1;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  transform: translateY(-2px);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0e1118;
  overflow: hidden;
  flex: 0 0 auto;
}

.card-media img,
.card-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0e1118;
}

.card-media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 42%, #10131b), #0e1118 78%);
}

.card-media--placeholder span {
  font-size: 44px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.04em;
}

.card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: color-mix(in srgb, var(--accent) 82%, #000);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 18px;
  flex: 1 1 auto;
}

.card-name {
  margin: 0;
  font-size: clamp(19px, 3.4vw, 22px);
  font-weight: 700;
  line-height: 1.3;
}

.card-name::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-top: 9px;
  border-radius: 999px;
  background: var(--accent);
}

.card-subtitle {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: color-mix(in srgb, var(--accent) 72%, #ffffff);
}

.card-desc {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.card-desc p {
  margin: 0 0 8px;
}

.card-desc p:last-child {
  margin-bottom: 0;
}

.card-desc img {
  max-width: 100%;
  border-radius: 8px;
}

.card-desc span {
  font-weight: 600;
}

.card-foot {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 子按钮组：2 个并排、3~4 个自动折行，永远不溢出卡片 */
.sub-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 7px;
}

.sub-btn {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-ctl);
  border: 1px solid color-mix(in srgb, var(--accent) 46%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: color-mix(in srgb, var(--accent) 72%, #ffffff);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.sub-btn:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: color-mix(in srgb, var(--accent) 66%, transparent);
}

.sub-btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.enter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-ctl);
  border: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 96%, #fff), color-mix(in srgb, var(--accent) 78%, #000));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 32%, transparent);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.enter-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.enter-btn:active {
  transform: translateY(0);
}

.enter-btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.enter-btn.is-disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted-2);
  box-shadow: none;
  pointer-events: none;
}

/* ---------- 一键看明白：标题行右侧浅色胶囊 ---------- */

.quicklook-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, 0.05));
  color: color-mix(in srgb, var(--accent) 40%, #ffffff);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.quicklook-btn:hover {
  background: color-mix(in srgb, var(--accent) 22%, rgba(255, 255, 255, 0.07));
  border-color: color-mix(in srgb, var(--accent) 66%, rgba(255, 255, 255, 0.14));
  color: #ffffff;
}

.quicklook-btn:active {
  background: color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.06));
  transform: scale(0.99);
}

.quicklook-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.9;
}

/* ---------- 卡片操作区：主按钮 + 等宽图标按钮组 ---------- */
.sub-btn {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 0 6px;
  border-radius: var(--radius-ctl);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, 0.1));
  background: color-mix(in srgb, var(--accent) 9%, rgba(255, 255, 255, 0.035));
  color: color-mix(in srgb, var(--accent) 44%, #ffffff);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.sub-btn:hover {
  background: color-mix(in srgb, var(--accent) 18%, rgba(255, 255, 255, 0.05));
  border-color: color-mix(in srgb, var(--accent) 54%, rgba(255, 255, 255, 0.1));
}

.sub-btn:active {
  transform: scale(0.98);
}

.sub-btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-btn svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.sub-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 7px;
}

.enter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-ctl);
  border: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 96%, #fff), color-mix(in srgb, var(--accent) 78%, #000));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 32%, transparent);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.enter-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.enter-btn:active {
  transform: translateY(0);
}

.enter-btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.enter-btn.is-disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted-2);
  box-shadow: none;
  pointer-events: none;
}

@media (max-width: 420px) {
  .sub-row {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  }

  .sub-btn {
    font-size: 12.5px;
    gap: 4px;
    padding: 0 4px;
  }

  .sub-btn svg {
    width: 14px;
    height: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quicklook-btn,
  .sub-btn {
    transition: none;
  }
}

/* ---------- Arrows ---------- */
.nav-arrow {
  flex: 0 0 auto;
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-ctl);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.nav-arrow:hover {
  background: var(--panel-strong);
}

.nav-arrow:active {
  transform: scale(0.94);
}

.nav-arrow svg {
  width: 20px;
  height: 20px;
}

/* ---------- Dots ---------- */
.dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 12px;
}

.dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
  transition: width 0.24s ease, background 0.24s ease;
  position: relative;
}

/* 扩大圆点的可点区域（视觉不变），方便手机上点 */
.dot::after {
  content: "";
  position: absolute;
  inset: -12px -6px;
}

.dot.is-active {
  width: 26px;
  background: var(--dot-accent, #5b8cff);
}

/* ---------- Contacts ---------- */
.contacts {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.contacts-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.contacts-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.contact-card {
  --accent: #5b8cff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(100%, 300px);
  min-width: 0;
  padding: 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
}

.contact-qr {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 168px;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (max-width: 640px) {
  .contact-card {
    width: calc(50% - 6px);
    padding: 12px 10px 14px;
  }
  .contact-qr {
    max-width: 118px;
  }
}

.contacts-list--single .contact-card {
  width: min(100%, 320px);
}

.contact-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.contact-qr--empty {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed var(--line);
  color: var(--muted-2);
  font-size: 12px;
}

.contact-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.contact-name-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  color: color-mix(in srgb, var(--accent) 82%, #fff);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.contact-copy svg {
  width: 13px;
  height: 13px;
}

.contact-copy:hover {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
}

.contact-copy.is-done {
  color: #fff;
  background: color-mix(in srgb, var(--accent) 68%, #0b0e14);
  border-color: transparent;
}

.contact-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: color-mix(in srgb, var(--accent) 78%, #fff);
  text-decoration: none;
}

.foot {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted-2);
  text-align: center;
}

.empty-state {
  position: relative;
  z-index: 1;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Popup ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: modal-fade 0.2s ease;
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(30, 34, 46, 0.98), rgba(18, 21, 29, 0.98));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  animation: modal-pop 0.24s ease;
}

@keyframes modal-fade {
  from {
    opacity: 0;
  }
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-ctl);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-image {
  display: block;
  width: 100%;
  max-height: 46svh;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  margin-bottom: 14px;
}

.modal-title {
  margin: 0 0 10px;
  padding-right: 34px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.modal-body {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.modal-body p {
  margin: 0 0 8px;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-body img {
  max-width: 100%;
  border-radius: 8px;
}

.modal-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-ctl);
  background: linear-gradient(135deg, #6f9bff, #4a72e6);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(74, 114, 230, 0.3);
  cursor: pointer;
}

.modal-action:hover {
  filter: brightness(1.06);
}

.modal-fav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease;
}

.modal-fav:hover {
  background: rgba(255, 255, 255, 0.13);
}

.modal-fav svg {
  width: 15px;
  height: 15px;
  color: #ffd166;
}

.modal-fav.is-done svg {
  fill: #ffd166;
}

/* ---------- 鏀惰棌寮曞 ---------- */
.modal--guide {
  z-index: 70;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.modal-actions .modal-action {
  margin-top: 0;
  width: auto;
  flex: 1 1 auto;
}

.modal-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease;
}

.modal-ghost:hover {
  background: rgba(255, 255, 255, 0.13);
}

.ins-now {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text);
}

.ins-tag {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.ins-tag.ok {
  border-color: rgba(142, 224, 168, 0.35);
  color: #8ee0a8;
}

.ins-tag.warn {
  border-color: rgba(255, 207, 122, 0.35);
  color: #ffcf7a;
}

.ins-steps {
  counter-reset: ins;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ins-steps li {
  position: relative;
  padding-left: 30px;
  counter-increment: ins;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.ins-steps li::before {
  content: counter(ins);
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(111, 155, 255, 0.16);
  color: #9db9ff;
  font-size: 12px;
  font-weight: 700;
}

.ins-steps b {
  font-weight: 700;
  color: var(--text);
}

.ins-alt {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

body.has-modal {
  overflow: hidden;
}

.modal-card--qr {
  width: min(100%, 330px);
  text-align: center;
}

.modal-card--qr .modal-title {
  text-align: center;
  padding-right: 0;
  margin-bottom: 14px;
  font-size: 17px;
}

.qr-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.qr-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Desktop ---------- */
@media (min-width: 760px) {
  .nav-arrow {
    display: inline-flex;
  }
  .card {
    width: 396px;
  }
}

@media (min-width: 1024px) {
  .card {
    width: 420px;
  }
  .deck {
    /* center first/last card so neighbors peek on both sides */
    padding-inline: max(0px, calc((100% - 420px) / 2));
    scroll-padding-inline: max(0px, calc((100% - 420px) / 2));
  }
}

@media (prefers-reduced-motion: reduce) {
  .deck {
    scroll-behavior: auto;
  }
  .card,
  .dot,
  .enter-btn,
  .nav-arrow {
    transition: none;
  }
}

/* ---------- 收藏引导：收藏 / 添加到桌面 两个分栏 ---------- */
.ins-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.ins-tab {
  flex: 1 1 0;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.ins-tab.is-active {
  background: linear-gradient(135deg, #5b8cff 0%, #7c5cff 100%);
  color: #fff;
  font-weight: 800;
  font-size: 14.5px;
  box-shadow:
    0 6px 18px rgba(91, 140, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 推荐徽标 */
.ins-rec {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff;
  color: #3f6bff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.5;
  vertical-align: 1px;
}

.ins-tab:not(.is-active) .ins-rec {
  background: rgba(91, 140, 255, 0.22);
  color: #9db9ff;
}

/* 弹窗打开后轻推三下，把眼睛引到「添加到桌面」 */
@keyframes ins-nudge {
  0% {
    box-shadow:
      0 6px 18px rgba(91, 140, 255, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 0 0 0 rgba(91, 140, 255, 0.55);
  }
  100% {
    box-shadow:
      0 6px 18px rgba(91, 140, 255, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 0 0 10px rgba(91, 140, 255, 0);
  }
}

.ins-tab.is-active {
  animation: ins-nudge 1.5s ease-out 3;
}

/* 活动站位连步骤序号也亮一点 */
.ins-panel[data-ins-panel="desktop"] .ins-steps li::before {
  background: linear-gradient(135deg, #5b8cff, #7c5cff);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .ins-tab.is-active {
    animation: none;
  }
}
/* ---------- Posts / 发布 ---------- */
.posts {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.posts-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 720px;
}

.post-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.post-item:hover,
.post-item:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--panel-strong);
  transform: translateY(-1px);
}

.post-item-thumb {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.post-item-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.post-item-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.post-item-summary {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.post-item-meta {
  font-size: 11.5px;
  color: var(--muted-2);
}

.post-item-arrow {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--muted-2);
}

@media (max-width: 640px) {
  .posts-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- 键盘可访问性：统一焦点环（仅在键盘操作时显示） ---------- */
:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent, #5b8cff) 80%, #fff);
  outline-offset: 3px;
}

.deck:focus-visible {
  outline-offset: 6px;
}

.fav-btn:focus-visible,
.dot:focus-visible,
.nav-arrow:focus-visible,
.enter-btn:focus-visible,
.sub-btn:focus-visible,
.quicklook-btn:focus-visible,
.modal-close:focus-visible,
.modal-action:focus-visible,
.modal-fav:focus-visible,
.modal-ghost:focus-visible,
.copy-btn:focus-visible {
  outline: 2px solid #8fb4ff;
  outline-offset: 3px;
}

/* ---------- 触摸滑动防误触：拖动过程中不触发链接点击 ---------- */
.deck.is-dragging .card a,
.deck.is-dragging .card button {
  pointer-events: none;
}
/* ---------- 二维码弹窗里的外链样式 ---------- */
.qr-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6f9bff, #4a72e6);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.qr-link svg {
  width: 16px;
  height: 16px;
}

.qr-link-url {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  text-align: center;
}

.qr-empty {
  padding: 24px 12px;
  color: var(--muted);
  font-size: 14px;
}
/* ---------- 移动端触摸目标：保证至少 40px 可点区域 ---------- */
.dots {
  gap: 2px;
  min-height: 40px;
}

/* 视觉仍是 9px 圆点，但用透明边框把点击热区撑到 40px */
.dot {
  position: relative;
  width: 9px;
  height: 9px;
  box-sizing: content-box;
  border: 0;
  padding: 0;
}

.dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
}

.dot.is-active {
  width: 26px;
}

.dot.is-active::after {
  width: 52px;
}

.fav-btn {
  min-height: 38px;
}

.contact-copy {
  min-height: 34px;
  padding: 4px 10px;
}

.modal-close {
  width: 40px;
  height: 40px;
}
/* ---------- 产品搜索与标签筛选 ---------- */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto 4px;
  padding: 0 clamp(10px, 2vw, 16px);
}

.filter-search {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-search svg {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}

.filter-input {
  width: 100%;
  min-height: 44px;
  padding: 0 42px 0 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s ease;
}

.filter-input::placeholder {
  color: var(--muted-2, rgba(244, 246, 251, 0.42));
}

.filter-input:focus {
  border-color: rgba(120, 168, 255, 0.6);
}

/* 去掉 search 输入框自带的清除按钮，用自定义的 */
.filter-input::-webkit-search-cancel-button {
  display: none;
}

.filter-clear {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  cursor: pointer;
}

.filter-clear svg {
  position: static;
  width: 14px;
  height: 14px;
  color: inherit;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-tag {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.filter-tag:hover {
  background: var(--panel-strong);
  color: var(--text);
}

.filter-tag.is-active {
  border-color: color-mix(in srgb, var(--accent, #5b8cff) 62%, transparent);
  background: color-mix(in srgb, var(--accent, #5b8cff) 20%, transparent);
  color: #fff;
}

.filter-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 48px 16px;
  color: var(--muted);
  font-size: 15px;
}

.filter-empty p {
  margin: 0;
}

.filter-reset {
  min-height: 40px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* 产品卡上的标签 */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 8px;
}

.card-tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  color: color-mix(in srgb, var(--accent) 70%, #fff);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.6;
}
/* ==========================================================
   特价活动标识（前端卡片）
   设计目标：无论封面是红/绿/蓝/黑，都必须是画面里最刺眼的一块
   做法：金色斜条纹底 + 深红粗体字 + 深红描边 + 外发光
   ========================================================== */
.card.has-sale {
  --sale-bg: #ffcc33;
  border: 2px solid var(--sale-bg);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--sale-bg) 45%, transparent),
    0 0 26px color-mix(in srgb, var(--sale-bg) 55%, transparent),
    0 18px 44px color-mix(in srgb, var(--sale-bg) 35%, transparent),
    var(--shadow);
}

/* 非当前卡片默认半透明，特价卡片保持全亮，滑动时也能一眼看到 */
.card.has-sale:not(.is-active) {
  opacity: 0.92;
}

.card.has-sale.is-active {
  border-color: var(--sale-bg, #ffb020);
}

.sale-ribbon {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 12px 14px 13px;
  --sale-bg: #ffcc33;
  font-weight: 900;
  color: var(--sale-text, #fff);
  /* 自定义底色 + 同色系深浅斜条纹，保留促销灯牌质感 */
  background-color: var(--sale-bg);
  background-image:
    repeating-linear-gradient(
      135deg,
      color-mix(in srgb, var(--sale-bg) 88%, #ffffff) 0px,
      color-mix(in srgb, var(--sale-bg) 88%, #ffffff) 14px,
      color-mix(in srgb, var(--sale-bg) 82%, #000000) 14px,
      color-mix(in srgb, var(--sale-bg) 82%, #000000) 28px
    );
  border-bottom: 3px solid color-mix(in srgb, var(--sale-bg) 55%, #000000);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 0 rgba(0, 0, 0, 0.14),
    0 4px 14px color-mix(in srgb, var(--sale-bg) 45%, transparent);
  text-shadow: var(--sale-shadow, none);
  letter-spacing: 0.04em;
  overflow: hidden;
}

/* 斜条纹缓缓流动，制造「促销灯牌」的动感 */
.sale-ribbon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.34) 47%,
    rgba(255, 255, 255, 0) 64%
  );
  transform: translateX(-120%);
  animation: saleShine 3.4s ease-in-out infinite;
  pointer-events: none;
  /* 浅底（金/绿/青）关掉扫光，避免冲淡深色字 */
}

.sale-ribbon[style*="--sale-light:0"]::before {
  display: none;
}

@keyframes saleShine {
  0%   { transform: translateX(-120%); }
  55%  { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

.sale-ribbon-fire {
  font-size: 19px;
  line-height: 1;
  animation: salePulse 1.15s ease-in-out infinite;
  filter: drop-shadow(0 2px 3px rgba(110, 30, 0, 0.6));
}

.sale-ribbon-main {
  position: relative;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--sale-text, #fff);
  -webkit-text-stroke: 2.8px var(--sale-stroke, rgba(0, 0, 0, 0.55));
  paint-order: stroke fill;
  text-shadow: var(--sale-shadow, none);
}

/* 文字两端的小箭头装饰，进一步强调 */
.sale-ribbon-main::before,
.sale-ribbon-main::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 9px 2px;
  border-left: 3.5px solid var(--sale-arrow, #b3260f);
  border-bottom: 3.5px solid var(--sale-arrow, #b3260f);
  transform: rotate(45deg);
  vertical-align: middle;
  -webkit-text-stroke: 0;
}

.sale-ribbon-main::after {
  transform: rotate(-135deg);
}

.sale-ribbon-note {
  position: relative;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 900;
  color: var(--sale-note, #b3260f);
  background: var(--sale-note-bg, #ffffff);
  border: 2px solid var(--sale-note-border, #b3260f);
  letter-spacing: 0;
  text-shadow: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
}

@keyframes salePulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.22) rotate(-6deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sale-ribbon::before { animation: none; opacity: 0; }
  .sale-ribbon-fire { animation: none; }
}

@media (max-width: 640px) {
  .sale-ribbon {
    padding: 9px 10px 10px;
    gap: 6px;
  }
  .sale-ribbon-fire {
    font-size: 15px;
  }
  .sale-ribbon-main {
    font-size: 15.5px;
    letter-spacing: 0.04em;
    -webkit-text-stroke: 2px var(--sale-stroke, rgba(0, 0, 0, 0.55));
  }
  .sale-ribbon-main::before,
  .sale-ribbon-main::after {
    width: 6px;
    height: 6px;
    margin: 0 6px 2px;
  }
  .sale-ribbon-note {
    font-size: 11.5px;
    padding: 2px 8px;
  }
}

/* ==========================================================
   浅色主题
   用法：<html data-theme="light">
   ========================================================== */
html[data-theme="light"] {
  --bg: #f2f4f9;
  --bg-soft: #e9edf6;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --line: rgba(23, 34, 59, 0.13);
  --text: #1b2130;
  --muted: rgba(27, 33, 48, 0.66);
  --muted-2: rgba(27, 33, 48, 0.46);
  --shadow: 0 18px 44px rgba(23, 34, 59, 0.13);
}

html[data-theme="light"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="light"] .bg-layer {
  background:
    radial-gradient(1200px 620px at 18% -10%, rgba(91, 140, 255, 0.16), transparent 62%),
    radial-gradient(900px 520px at 92% 8%, rgba(255, 122, 195, 0.12), transparent 60%),
    radial-gradient(900px 700px at 50% 118%, rgba(40, 209, 168, 0.1), transparent 62%),
    linear-gradient(180deg, #f7f9fd, #eef1f8);
}

html[data-theme="light"] .card {
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(23, 34, 59, 0.12);
}

html[data-theme="light"] .card-name,
html[data-theme="light"] .hero-title,
html[data-theme="light"] .contacts-title {
  color: #12161f;
}

html[data-theme="light"] .card-desc {
  color: rgba(27, 33, 48, 0.8);
}

html[data-theme="light"] .sub-btn {
  background: color-mix(in srgb, var(--accent) 12%, #ffffff);
  color: color-mix(in srgb, var(--accent) 76%, #101521);
}

html[data-theme="light"] .quicklook-btn {
  background: rgba(23, 34, 59, 0.04);
  color: #2b3446;
}

html[data-theme="light"] .post-item,
html[data-theme="light"] .contact-card {
  background: #ffffff;
}

html[data-theme="light"] .post-item-title {
  color: #12161f;
}

html[data-theme="light"] .modal-card {
  background: #ffffff;
  color: #1b2130;
}

html[data-theme="light"] .modal-title {
  color: #12161f;
}

html[data-theme="light"] .modal-close {
  background: rgba(23, 34, 59, 0.06);
  color: #2b3446;
}

html[data-theme="light"] .modal-fav,
html[data-theme="light"] .modal-ghost {
  background: rgba(23, 34, 59, 0.05);
  color: #2b3446;
  border-color: var(--line);
}

html[data-theme="light"] .fav-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #2b3446;
}

html[data-theme="light"] .dot {
  background: rgba(23, 34, 59, 0.24);
}

html[data-theme="light"] .nav-arrow {
  background: rgba(255, 255, 255, 0.9);
  color: #2b3446;
}

html[data-theme="light"] .filter-input,
html[data-theme="light"] .filter-tag {
  background: rgba(255, 255, 255, 0.92);
  color: #2b3446;
}

html[data-theme="light"] .filter-tag.is-active {
  color: #ffffff;
}

html[data-theme="light"] .bookmark-toast {
  background: #ffffff;
  color: #1b2130;
  box-shadow: 0 12px 30px rgba(23, 34, 59, 0.18);
}

/* ---------- 主题切换按钮 ---------- */
.theme-toggle {
  position: fixed;
  right: 14px;
  bottom: 16px;
  z-index: 30;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, background 0.18s ease;
}

.theme-toggle:hover {
  transform: scale(1.06);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

/* ---------- 楠ㄦ灦灞?---------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-card);
}

html[data-theme="light"] .skeleton {
  background: rgba(23, 34, 59, 0.07);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  animation: skeleton-sweep 1.3s ease-in-out infinite;
}

html[data-theme="light"] .skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}

@keyframes skeleton-sweep {
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after {
    animation: none;
  }
}

.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(100%, 360px);
  margin: 0 auto;
  padding: 0 0 16px;
}

.skeleton-media {
  height: 190px;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.skeleton-line {
  height: 14px;
  margin: 0 16px;
  border-radius: 6px;
}

.skeleton-line--title {
  height: 22px;
  width: 62%;
  margin-top: 8px;
}

.skeleton-line--short {
  width: 40%;
}

.skeleton-btn {
  height: 44px;
  margin: 6px 16px 0;
  border-radius: var(--radius-ctl);
}

/* ---------- 浜岀淮鐮佷笅杞芥寜閽?---------- */
.qr-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.qr-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.qr-download svg {
  width: 16px;
  height: 16px;
}

/* ---------- 拖拽排序 ---------- */
.prow-drag {
  cursor: grab;
  user-select: none;
}

.prow.is-dragging {
  opacity: 0.5;
}

.prow.is-drag-over {
  outline: 2px dashed rgba(120, 168, 255, 0.7);
  outline-offset: 2px;
}

.pcard.is-dragging {
  opacity: 0.5;
}

.pcard.is-drag-over {
  outline: 2px dashed rgba(120, 168, 255, 0.8);
  outline-offset: 2px;
}

/* ---------- 富文本段落块 ---------- */
.post-para {
  padding: 14px 16px;
  border: 1px solid #dfe4ee;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2430;
  font-size: 14.5px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.post-para p {
  margin: 0 0 10px;
}

.post-para p:last-child {
  margin-bottom: 0;
}

.post-para h3 {
  margin: 4px 0 10px;
  font-size: 17px;
  font-weight: 800;
  color: #14181f;
}

.post-para img {
  max-width: 100%;
  border-radius: 8px;
}

.post-para a {
  color: #2f6fed;
  font-weight: 600;
  text-decoration: underline;
}

.pblock--para .pblock-head {
  gap: 8px;
}

/* ================================================================
   移动端体验优化（筛选区 / 联系客服 / 最新发布 / 轮播圆点）

/* ---------- 1) 筛选区：手机端收紧，标签单行左右滑动 ---------- */
@media (max-width: 720px) {
  .filter-bar {
    gap: 8px;
    margin: 0 auto 6px;
  }

  .filter-input {
    min-height: 42px;
    font-size: 14px;
  }

  .filter-tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 -2px;
    padding: 2px 2px 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-tags::-webkit-scrollbar {
    display: none;
  }

  .filter-tag {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 15px;
    scroll-snap-align: start;
  }
}

/* 选中态：实色主色底 + 白字，深浅主题都看得清（原来是白字白底） */
.filter-tag.is-active,
html[data-theme="light"] .filter-tag.is-active {
  border-color: var(--accent, #5b8cff);
  background: var(--accent, #5b8cff);
  color: #fff;
  font-weight: 700;
}

/* ---------- 2) 联系客服：多个客服横向左右滑动，不再并排挤压 ---------- */
.contacts-list {
  flex-wrap: nowrap;
  justify-content: flex-start;
  max-width: 720px;
  gap: 12px;
  padding: 2px 2px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.contacts-list::-webkit-scrollbar {
  display: none;
}

.contacts-list--single {
  justify-content: center;
}

.contact-card {
  flex: 0 0 auto;
  width: min(78vw, 300px);
  scroll-snap-align: center;
}

/* 只有一个客服时占满，不要留半截空白 */
.contacts-list--single .contact-card {
  width: min(100%, 320px);
}

/* ---------- 3) 最新发布 / 公告：单列固定高度，可手动上下滚动 ---------- */
.posts-list {
  grid-template-columns: 1fr;
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

@media (max-width: 720px) {
  .posts-list {
    max-height: 300px;
  }
}

/* ---------- 4) 手机端也显示轮播圆点（原来窄屏看不到） ---------- */
@media (max-width: 760px) {
  .dots {
    display: flex;
    gap: 4px;
    min-height: 34px;
  }
}

/* ================================================================
   并排布局：联系客服 + 最新发布；子按钮单行（手机也就一行）
   ================================================================ */

/* 联系客服 / 最新发布 左右并排，各占一半 */
.side-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  width: 100%;
  max-width: 720px;
  margin-top: 4px;
}

/* 只有一边有内容时整行铺开 */
.side-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.side-grid > .contacts,
.side-grid > .posts {
  width: 100%;
  min-width: 0;
  margin-top: 0;
}

.side-grid .contacts-title {
  font-size: 13.5px;
}

/* 栏内客服卡：铺满本栏；多个仍可左右滑动 */
.side-grid .contact-card,
.side-grid .contacts-list--single .contact-card {
  width: 100%;
  padding: 12px 10px 14px;
}

.side-grid .contact-qr {
  max-width: 132px;
}

.side-grid .contact-name {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
}

.side-grid .contact-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-grid .contact-desc {
  font-size: 12px;
}

/* 公告栏：固定高度可上下滚，高度和客服栏接近 */
.side-grid .posts-list {
  max-height: 268px;
}

/* 发布条目紧凑化：窄栏里标题/日期不折行 */
.side-grid .post-item {
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
}

.side-grid .post-item-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.side-grid .post-item-title {
  font-size: 13px;
  line-height: 1.4;
}

.side-grid .post-item-meta {
  font-size: 10.5px;
  white-space: nowrap;
}

.side-grid .post-item-arrow {
  width: 15px;
  height: 15px;
}

/* 子按钮（试用/购买/教程/群二维码）：不管几个都排一行等分 */
.sub-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.sub-row .sub-btn {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 720px) {
  .side-grid .contact-copy {
    padding: 4px 7px;
  }

  .side-grid .contact-copy .contact-copy-text {
    display: none;
  }

  .side-grid .contact-qr {
    max-width: 118px;
  }
}

@media (max-width: 420px) {
  .sub-row {
    gap: 5px;
  }

  .sub-row .sub-btn {
    font-size: 12px;
    gap: 3px;
    padding: 0 3px;
  }

  .sub-row .sub-btn svg {
    width: 13px;
    height: 13px;
  }
}

@media (max-width: 400px) {
  .side-grid .post-item-thumb {
    display: none;
  }

  .side-grid .post-item-title {
    font-size: 12.5px;
  }

  .side-grid .post-item {
    padding: 9px;
  }
}

@media (max-width: 340px) {
  .side-grid {
    gap: 10px;
  }

  .side-grid .contact-qr {
    max-width: 112px;
  }
}

/* ===== 客服轮播（左右切换） ===== */
.contacts-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.cs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  color: #2b3446;
  cursor: pointer;
  z-index: 3;
  transition: background 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.cs-arrow--prev { left: -15px; }
.cs-arrow--next { right: -15px; }

.cs-arrow[hidden] { display: none; }

.cs-arrow:hover { background: #fff; }
.cs-arrow:active { transform: translateY(-50%) scale(0.9); }
.cs-arrow svg { width: 16px; height: 16px; }

.cs-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 10px;
  margin-top: 2px;
}

.cs-dots[hidden] { display: none; }

.cs-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  cursor: pointer;
  position: relative;
  transition: width 0.22s ease, background 0.22s ease;
}

.cs-dot::after { content: ""; position: absolute; inset: -10px -5px; }
.cs-dot.is-active { width: 18px; background: var(--dot-accent, #5b8cff); }

html[data-theme="light"] .cs-dot { background: rgba(20, 30, 50, 0.2); }
html[data-theme="light"] .cs-dot.is-active { background: var(--dot-accent, #5b8cff); }
html[data-theme="light"] .cs-arrow { background: rgba(255, 255, 255, 0.92); color: #2b3446; }

/* 客服卡：一屏一张，铺满所在栏 */
.contacts-carousel .contacts-list {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  width: 100%;
  padding-inline: 0;
  flex-wrap: nowrap;
  justify-content: flex-start;
  padding: 2px 0 4px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.contacts-carousel .contact-card,
.side-grid .contacts-carousel .contact-card,
.side-grid .contacts-carousel .contacts-list--single .contact-card {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  scroll-snap-align: center;
}

/* 二维码放大（比原来的 132px 大一档） */
.side-grid .contacts-carousel .contact-qr,
.contacts-carousel .contact-qr {
  position: relative;
  width: 100%;
  max-width: min(100%, 300px);
  aspect-ratio: 1 / 1;
}

/* 卡片左右留出箭头位置，避免箭头压到二维码 */
.contacts-carousel .contact-card,
.side-grid .contacts-carousel .contact-card {
  padding-inline: 18px;
}

@media (max-width: 720px) {
  .side-grid .contacts-carousel .contact-qr,
  .contacts-carousel .contact-qr {
    max-width: 100%;
  }
  .contacts-carousel .contact-card,
  .side-grid .contacts-carousel .contact-card {
    padding: 10px 16px 12px;
  }
}



/* 手机端：客服栏独占整行，箭头贴在卡片外侧，卡片不吃宽度 */
@media (max-width: 720px) {
  .contacts-carousel {
    gap: 0;
  }
  .cs-arrow { width: 24px; height: 24px; }
  .cs-arrow--prev { left: -12px; }
  .cs-arrow--next { right: -12px; }
  .cs-arrow svg { width: 13px; height: 13px; }
  .contacts-carousel .contacts-list { padding: 2px 0 4px; }
  .contacts-carousel .contact-card,
  .side-grid .contacts-carousel .contact-card,
  .side-grid .contacts-carousel .contacts-list--single .contact-card {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
  .side-grid .contacts-carousel .contact-qr,
  .contacts-carousel .contact-qr {
    max-width: min(76vw, 260px);
  }
}
