/* 首屏：拼音字母卡。所有类名带 ch- 前缀，只在 .ch-hero 内生效，不影响站内其他区块 */
.ch-hero {
  --ch-ink: #1D1D1F;
  --ch-muted: #86868B;
  --ch-ease: cubic-bezier(.2, .8, .2, 1);
  max-width: 1280px; margin: 0 auto; padding: 56px 40px 0; color: var(--ch-ink);
  font-family: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}
.ch-hero button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.ch-bopo { font-family: Bopo, sans-serif; font-weight: 400; font-kerning: normal; }

/* 文案 */
.ch-intro { text-align: center; }
.ch-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ch-muted); letter-spacing: .02em; }
.ch-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: #E4573D; }
.ch-title { margin: 16px 0 0; font-size: clamp(32px, 4.2vw, 52px); line-height: 1.18; font-weight: 600; letter-spacing: -.02em; }
.ch-lede { margin: 16px auto 0; max-width: 560px; font-size: 15px; line-height: 1.8; color: #6E6E73; }
.ch-cta { margin-top: 26px; display: flex; gap: 12px; justify-content: center; }
.ch-pill { display: inline-flex; align-items: center; height: 42px; padding: 0 22px; border-radius: 999px; font-size: 14px;
  background: var(--ch-ink); color: #fff; transition: transform .2s var(--ch-ease), background .2s; }
.ch-pill:hover { transform: translateY(-1px); background: #000; }
.ch-pill.ch-ghost { background: transparent; color: var(--ch-ink); box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.ch-pill.ch-ghost:hover { background: rgba(0,0,0,.04); }

/* 控制条 */
.ch-table { padding-top: 48px; }
.ch-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.ch-tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.05); }
.ch-tabs button { height: 32px; padding: 0 16px; border-radius: 999px; font-size: 13px; color: #6E6E73;
  transition: background .25s, color .25s, box-shadow .25s; }
.ch-tabs button span { margin-left: 6px; font-variant-numeric: tabular-nums; color: #AEAEB2; }
.ch-tabs button[aria-selected="true"] { background: #fff; color: var(--ch-ink); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.05); }
.ch-tabs button[aria-selected="true"] span { color: var(--ch-muted); }
.ch-themes { display: inline-flex; align-items: center; gap: 14px; font-size: 12px; color: var(--ch-muted); }
.ch-themes button { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 6px; border-radius: 999px;
  color: #6E6E73; transition: background .2s, color .2s; }
.ch-themes button:hover { background: rgba(0,0,0,.04); }
.ch-themes button[aria-pressed="true"] { color: var(--ch-ink); background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.ch-swatch { display: inline-flex; }
.ch-swatch b { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; }
.ch-swatch b + b { margin-left: -5px; }

/* 卡片 */
.ch-deck { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 16px; perspective: 1400px; }
.ch-slot { aspect-ratio: 5 / 7; position: relative; }
.ch-card { position: absolute; inset: 0; container-type: inline-size; will-change: transform; }
.ch-card:focus-visible { outline: 2px solid var(--ch-ink); outline-offset: 3px; border-radius: 13cqw; }
.ch-tilt { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .35s var(--ch-ease); }
.ch-flipper { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, .7, .15, 1); }
.ch-card.is-flipped .ch-flipper { transform: rotateY(180deg); }
.ch-face { position: absolute; inset: 0; border-radius: 13cqw; background: var(--c-bg); color: var(--c-ink);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.035), 0 1px 2px rgba(0,0,0,.04), 0 6px 16px -6px rgba(0,0,0,.10);
  transition: background-color .6s ease, color .6s ease, box-shadow .35s var(--ch-ease);
  transition-delay: var(--wave, 0s), var(--wave, 0s), 0s; }
.ch-card:hover .ch-face { box-shadow: 0 0 0 1px rgba(0,0,0,.035), 0 2px 4px rgba(0,0,0,.05), 0 22px 40px -14px rgba(0,0,0,.24); }

/* 正面：左上类别、右上编号、大字母和字体度量辅助线 */
.ch-meta { position: absolute; left: 9cqw; right: 9cqw; top: 8cqw; display: flex; justify-content: space-between;
  font-size: 6.4cqw; letter-spacing: .04em; opacity: .62; font-variant-numeric: tabular-nums; }
.ch-guides { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch-guides line { stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .09; }
.ch-guides line.ch-base { opacity: .16; }
.ch-guides text { font-family: Bopo, sans-serif; fill: currentColor; }

/* 背面：统一浅灰底，大 emoji，例词在下 */
.ch-face.ch-back { background: #EBEBEB; color: #1D1D1F; transform: rotateY(180deg); }
.ch-emoji { position: absolute; left: 0; right: 0; top: 27cqw; text-align: center; font-size: 46cqw; line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.ch-word { position: absolute; left: 6cqw; right: 6cqw; bottom: 17cqw; display: flex; flex-direction: column; align-items: center; gap: 2.5cqw; }
.ch-word .ch-py { font-family: Bopo, sans-serif; font-size: 14.5cqw; line-height: 1; white-space: nowrap; }
.ch-word .ch-zh { font-size: 8cqw; line-height: 1; font-weight: 500; color: #6E6E73; letter-spacing: .08em; }

.ch-hint { margin: 22px 0 0; text-align: center; font-size: 12px; color: #AEAEB2; }

@media (max-width: 980px) { .ch-deck { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 640px) {
  .ch-hero { padding: 32px 14px 0; }
  .ch-intro { padding: 0 6px; }
  .ch-lede { font-size: 14px; }
  .ch-table { padding-top: 36px; }
  .ch-controls { flex-direction: column; align-items: stretch; gap: 12px; }
  .ch-tabs { align-self: center; } .ch-themes { justify-content: center; } .ch-themes > span { display: none; }
  .ch-deck { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .ch-tilt, .ch-flipper, .ch-face { transition: none !important; }
}
