/* 同源自托管字体：避免 fonts.googleapis.com 在部分网络下阻塞首屏。Inter 为可变字体，单文件覆盖 400-700。 */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('./fonts/inter-var.woff2?v=perf-2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 600; font-display: swap; src: url('./fonts/sourceserif-600.woff2?v=perf-2') format('woff2'); }

/* 喜鹊AI · ChatGPT 会员订阅导航页
   纯静态，无构建。主题色参考 cdk.xique.fun 的 terracotta 皮肤。 */

:root {
  --bg: #f2ede4;
  --surface: #fbf8f1;
  --surface-2: #f4eee3;
  --brd: #e7ddcb;
  --ink: #2a2622;
  --ink-2: #6f6657;
  --ink-3: #9a9183;
  --primary: #c0563a;
  --primary-hover: #cb6a4f;
  --primary-soft: rgba(192, 86, 58, .1);
  --primary-on: #fff;
  --good: #2f8f6b;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 28px 56px -36px rgba(120, 72, 40, .45);
  --shadow-btn: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 2px rgba(80, 30, 15, .25), 0 10px 22px -10px rgba(192, 86, 58, .6);
  --glow-a: rgba(192, 86, 58, .1);
  --glow-b: rgba(214, 158, 92, .12);
  --font-body: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-head: "Source Serif 4", Georgia, "Noto Serif SC", "Songti SC", serif;
  --radius-card: 26px;
}

html.dark {
  --bg: #17120e;
  --surface: #221a14;
  --surface-2: #2b2118;
  --brd: #372c21;
  --ink: #f1e8db;
  --ink-2: #c2b6a4;
  --ink-3: #8f8474;
  --primary: #d9744f;
  --primary-hover: #e0805f;
  --primary-soft: rgba(217, 116, 79, .14);
  --primary-on: #1a130d;
  --good: #4cae87;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 30px 60px -36px rgba(0, 0, 0, .7);
  --shadow-btn: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(0, 0, 0, .4), 0 10px 22px -10px rgba(217, 116, 79, .5);
  --glow-a: rgba(217, 116, 79, .12);
  --glow-b: rgba(140, 92, 44, .14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(760px 420px at 50% -8%, var(--glow-a), rgba(0, 0, 0, 0) 70%),
    radial-gradient(620px 380px at 88% 6%, var(--glow-b), rgba(0, 0, 0, 0) 72%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  border: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.25;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ---------- layout ---------- */

.shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- header ---------- */

.site-header {
  padding: 18px 0 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  display: block;
  flex: 0 0 32px;
  margin-right: 10px;
  border-radius: 8px;
}

.brand-text {
  display: block;
  min-width: 0;
}

.brand-name {
  display: block;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  display: block;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-3);
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.pill {
  display: inline-block;
  margin-left: 8px;
  padding: 7px 13px;
  border: 1px solid var(--brd);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

.pill:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 8px;
  padding: 0;
  border: 1px solid var(--brd);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.theme-toggle .icon {
  width: 17px;
  height: 17px;
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

html.dark .theme-toggle .icon-moon {
  display: none;
}

html.dark .theme-toggle .icon-sun {
  display: block;
}

/* ---------- hero ---------- */

.hero {
  padding: 34px 0 8px;
}

.hero-inner {
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin: 0;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--primary);
  vertical-align: 2px;
}

.hero h1 {
  margin: 12px 0 0;
  font-size: 30px;
}

.hero-sub {
  margin: 10px auto 0;
  max-width: 30em;
  color: var(--ink-2);
  font-size: 14px;
}

.badges {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
}

.badges li {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 400;
}

.badge-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-right: 6px;
  color: var(--good);
}

/* ---------- products ---------- */

.products {
  padding: 22px 0 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 16px;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--brd);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.product {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-soft);
}

.product-icon img {
  display: block;
  width: 26px;
  height: 26px;
}

html.dark .product-icon img {
  filter: brightness(0) invert(1);
  opacity: .85;
}

.tier {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  white-space: nowrap;
}

.product-name {
  margin: 16px 0 0;
  font-size: 20px;
}

.region {
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: 12.5px;
}

.price-row {
  display: flex;
  align-items: baseline;
  margin: 10px 0 0;
}

.price {
  font-family: var(--font-head);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--ink);
}

.price-was {
  margin-left: 8px;
  font-size: 14px;
  color: var(--ink-3);
  text-decoration: line-through;
}

.stock {
  display: flex;
  align-items: center;
  margin: 4px 0 0;
  color: var(--good);
  font-size: 12.5px;
  font-weight: 500;
}

.stock-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.checks {
  list-style: none;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--brd);
}

.checks li {
  position: relative;
  margin: 0 0 8px;
  padding-left: 22px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}

.checks li:last-child {
  margin-bottom: 0;
}

.checks li::before {
  content: "\2713";
  position: absolute;
  left: 1px;
  top: 0;
  color: var(--good);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
}

.buys {
  margin: 18px 0 0;
  padding-top: 16px;
}

.buy {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 9px 14px;
  border: 1px solid transparent;
  text-align: center;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.buy:last-child {
  margin-bottom: 0;
}

.buy-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.buy-note {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  opacity: .8;
}

.buy-1 {
  border-radius: 12px;
  border-color: var(--brd);
  background: var(--primary-soft);
  color: var(--primary);
}

.buy-1:hover {
  border-color: var(--primary);
  background: rgba(192, 86, 58, .17);
}

html.dark .buy-1:hover {
  background: rgba(217, 116, 79, .2);
}

.buy-2 {
  border-radius: 999px;
  background-color: var(--primary);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%);
  color: var(--primary-on);
  box-shadow: var(--shadow-btn);
}

.buy-2:hover {
  background-color: var(--primary-hover);
}

.product.is-soldout .buy-2 {
  opacity: .5;
  cursor: not-allowed;
}


.product.is-soldout .buy-2:hover {
  background-color: var(--primary);
}

.products-note {
  margin: 16px auto 0;
  max-width: 46em;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
}

/* ---------- flow ---------- */

.flow {
  padding: 40px 0 0;
}

.section-title {
  font-size: 22px;
  text-align: center;
}

.steps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 12px;
  gap: 12px;
}

.step {
  padding: 16px;
  border: 1px solid var(--brd);
  border-radius: 20px;
  background: var(--surface);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.step-title {
  margin: 10px 0 0;
  font-size: 16px;
}

.step-text {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}

.inline-link {
  color: var(--primary);
  border-bottom: 1px solid var(--primary-soft);
}

.inline-link:hover {
  border-bottom-color: var(--primary);
}

/* ---------- notes ---------- */

.notes {
  padding: 24px 0 0;
}

.notes-card {
  padding: 22px;
}

.notes-title {
  font-size: 18px;
  text-align: left;
}

.notes-list {
  margin: 12px 0 0;
  padding-left: 20px;
}

.notes-list li {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
}

.notes-list li:last-child {
  margin-bottom: 0;
}


.seo-fold {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--brd);
}

.seo-fold-trigger {
  display: inline-flex;
  align-items: center;
  color: var(--ink-3);
  font-size: 12.5px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color .18s ease;
}

.seo-fold-trigger::-webkit-details-marker {
  display: none;
}

.seo-fold-trigger::after {
  content: "▾";
  margin-left: 5px;
  font-size: 11px;
}

.seo-fold[open] .seo-fold-trigger::after {
  content: "▴";
}

.seo-fold-trigger:hover {
  color: var(--primary);
}

.seo-fold-body {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.7;
}

.seo-fold-body p {
  margin: 0 0 10px;
}

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

.seo-fold-body strong {
  color: var(--ink);
  font-weight: 600;
}
/* ---------- footer ---------- */

.site-footer {
  margin: 44px 0 0;
  padding: 24px 0 34px;
  border-top: 1px solid var(--brd);
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
}

.footer-logo {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 6px;
}

.footer-links {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links li {
  margin: 4px 9px;
}

.footer-links a {
  color: var(--ink-2);
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  margin: 10px 0 0;
  color: var(--ink-3);
  font-size: 12px;
}

/* ---------- responsive ---------- */

@media (min-width: 641px) {
  .shell {
    padding: 0 24px;
  }

  .hero {
    padding: 46px 0 10px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-sub {
    font-size: 15px;
  }

  .product {
    padding: 24px;
  }

  .step {
    padding: 18px;
  }
}

@media (min-width: 901px) {
  .site-header {
    padding: 24px 0 0;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    margin-right: 12px;
  }

  .brand-name {
    font-size: 17px;
  }

  .hero {
    padding: 58px 0 12px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 18px;
    gap: 18px;
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .flow {
    padding: 56px 0 0;
  }

  .notes-card {
    padding: 26px 28px;
  }
}

.pill-full {
  display: inline;
}

.pill-short {
  display: none;
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 0 0;
  }

  .brand-sub {
    display: none;
  }

  .brand-logo {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    margin-right: 8px;
  }

  .brand-name {
    font-size: 14px;
  }

  .pill {
    padding: 6px 10px;
    font-size: 12px;
    margin-left: 5px;
  }

  .theme-toggle {
    width: 30px;
    height: 30px;
    margin-left: 5px;
  }

  .footer-links li {
    margin: 4px 7px;
  }
}

@media (max-width: 460px) {
  .shell {
    padding: 0 15px;
  }

  .brand-name {
    font-size: 13.5px;
  }

  .pill {
    padding: 6px 9px;
    font-size: 11.5px;
  }

  .pill-full {
    display: none;
  }

  .pill-short {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* 商品列表按卡网2首页动态同步；加载失败不展示过期库存。 */
.catalog-status { margin:20px auto; text-align:center; color:var(--ink-2); font-size:14px; }
.catalog-actions { margin:16px 0; display:flex; flex-wrap:wrap; justify-content:center; gap:10px; }
.catalog-actions .pill { margin-left:0; font-family:inherit; cursor:pointer; }
#catalog-grid:empty { display:none; }
#catalog-grid .checks { overflow-wrap:break-word; }
#catalog-grid .buys { margin-top:auto; padding-top:28px; }

/* 导航页独立首推商品，不影响卡网2同步商品的顺序。 */
.product.product-featured { border:2px solid var(--primary); background:linear-gradient(150deg,var(--primary-soft),transparent 60%),var(--surface); box-shadow:0 0 0 4px var(--primary-soft),var(--shadow-card); }
.product-featured .featured-badge { background:var(--primary); color:var(--primary-on); letter-spacing:.03em; padding:7px 12px; }
.product-featured .product-name { color:var(--primary); }
.product-featured .price { font-size:42px; color:var(--primary); }
.product-featured .region { color:var(--ink-2); font-weight:600; }
.product-featured .checks li:last-child { color:var(--primary); font-weight:600; }
.product-featured .buy-1 { border-color:var(--primary); font-weight:600; }

/* 渠道未配置或缺货时保留按钮，但禁止交互。 */
.buy[aria-disabled="true"] { opacity:.5; cursor:not-allowed; pointer-events:none; }

/* 分类筛选后维持卡片宽度，未满一行的商品居中。 */
#catalog-grid {
  --catalog-columns: 1;
  --catalog-gap: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--catalog-gap);
}
#catalog-grid > .product {
  flex: 0 0 calc((100% - (var(--catalog-columns) - 1) * var(--catalog-gap)) / var(--catalog-columns));
}
@media (min-width: 641px) and (max-width: 900px) {
  #catalog-grid { --catalog-columns: min(2, var(--display-columns, 3)); }
}
@media (min-width: 901px) {
  #catalog-grid { --catalog-columns: var(--display-columns, 3); }
}
.catalog-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin: 24px 0; padding-bottom: 18px; border-bottom: 1px solid var(--brd); }
.catalog-categories { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 8px; min-width: 0; }
.category-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; max-width: 100%; padding: 9px 16px; border: 1px solid var(--brd); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; overflow-wrap: anywhere; }
.category-button:hover { border-color: var(--primary); color: var(--primary); }
.category-button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--primary-on); }
.category-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 6px; }
.category-icon svg { display: block; width: 18px; height: 18px; }
.category-icon-brand { background: #fff; }
.category-icon img { display: block; width: 16px; height: 16px; object-fit: contain; }
.category-number { flex-shrink: 0; min-width: 20px; padding: 0 5px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 11px; line-height: 20px; text-align: center; }
.category-button[aria-pressed="true"] .category-number { background: var(--surface); color: var(--primary); }
.catalog-count { flex-shrink: 0; margin: 0; color: var(--ink-3); font-size: 12px; }
@media (max-width: 640px) {
  .catalog-toolbar { gap: 12px; margin: 20px 0; }
  .catalog-count { flex-basis: 100%; }
  .category-button { padding: 9px 12px; }
}
.product { min-width: 0; overflow-wrap: anywhere; }
.product-icon img { object-fit: contain; }
.lks-hours { white-space: pre-line; }

.price-row { flex-wrap: wrap; gap: 4px; }
.price-unit { color: var(--ink-2); font-family: var(--font-body); font-size: 15px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }

.sales-count { margin-left: auto; padding-left: 12px; color: var(--ink-3); font-size: 12px; font-weight: 400; line-height: 1.5; white-space: nowrap; }

/* xique-logo-colors */
.brand-logo,.footer-logo{object-fit:contain;background:#fff;border-radius:8px}html[data-theme="dark"] .brand-logo,html[data-theme="dark"] .footer-logo{filter:none}

html.dark .product-icon img[src*="xique-logo.png"]{filter:none;opacity:1;object-fit:contain;background:#fff}

/* xique-header-svg-v1: original magpie vector with restrained flight motion. */
.brand-logo.brand-logo-animated {
  background: transparent;
  border-radius: 0;
  object-fit: contain;
  filter: brightness(0);
  transform-origin: 55% 65%;
  animation: xique-header-float 4.8s ease-in-out infinite;
}
html.dark .brand-logo.brand-logo-animated {
  filter: brightness(0) invert(1);
}
.brand:hover .brand-logo-animated,
.brand:focus-visible .brand-logo-animated {
  animation: xique-header-flight .72s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes xique-header-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(-3deg); }
}
@keyframes xique-header-flight {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  28% { transform: translateY(-4px) rotate(-9deg) scale(1.06); }
  58% { transform: translateY(-2px) rotate(5deg) scale(1.03); }
  80% { transform: translateY(-3px) rotate(-3deg) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-logo.brand-logo-animated,
  .brand:hover .brand-logo-animated,
  .brand:focus-visible .brand-logo-animated {
    animation: none;
    transform: none;
  }
}

/* Cached AI brand SVGs retain their original colors in both themes. */
.product-icon:has(img[src^="/ai-icons/"]) { background: #fff; }
html.dark .product-icon img[src^="/ai-icons/"] { filter: none; opacity: 1; }
.catalog-intro { margin-top: 32px; }
