/* Chapter 04 Appendix · 字母组合点读卡 · 定稿视觉复刻（2026-10-02）
   颜色语义（业务规则，最高优先级）：元音 = 粉色，辅音 = 蓝色。
   只改展示层；数据 / 音频 / 搜索 / 点击逻辑不变。 */

:root {
  --navy-900: #102E5B; --navy-800: #173E73; --navy-700: #24558E;
  --blue-600: #1669DE; --blue-500: #278AF0; --blue-400: #61B3F9; --blue-300: #9BD3FF;
  --blue-200: #CBE8FF; --blue-100: #EAF7FF; --blue-050: #F5FBFF;
  --pink-600: #EF3E7C; --pink-500: #F65D91; --pink-400: #FA7FA8; --pink-300: #FDB1C8;
  --pink-200: #FFD3E0; --pink-100: #FFEAF1; --pink-050: #FFF7FA;
  --cream-000: #FFFEFB; --cream-050: #FFF9F3;
  --text-main: #102E5B; --text-secondary: #6F86A8; --text-muted: #93A5BE;
  --border-blue: #C9E4FA; --border-pink: #F7D2DE;
  --white: #FFFFFF; --yellow: #FFD75A; --green: #6BCB9E;

  --radius-xs: 10px; --radius-sm: 14px; --radius-md: 16px; --radius-lg: 18px; --radius-pill: 999px;
  --page-max: 520px; --page-pad: 16px; --nav-h: 46px;
  --section-gap: 24px; --card-gap: 9px; --grid-gap: 9px;
  --combo-card-h: 118px; --ipa-card-h: 82px;
  --combo-radius: 18px; --ipa-radius: 16px;
  --section-bar-h: 42px; --play-combo: 28px; --play-ipa: 22px;
}

* { box-sizing: border-box; }

body.appendix-combinations {
  margin: 0;
  background: #F7FCFF;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "SF Pro Display",
    "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
}

.reading-page {
  min-height: 100vh;
  color: var(--text-main);
  background: linear-gradient(180deg, #F4FBFF 0, #F8FCFF 260px, #FFFFFF 760px);
}

.page-inner {
  width: min(calc(100% - 32px), var(--page-max));
  margin: 0 auto;
  padding: 0 0 48px;
  box-sizing: border-box;
}

/* ---------- 顶部导航 ---------- */
.reading-page .apx-nav {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 8px 0 14px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}
.reading-page .apx-nav-back,
.reading-page .apx-nav-links a {
  color: #7C91AD;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.reading-page .apx-nav-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.reading-page .apx-nav-links a { position: relative; }
.reading-page .apx-nav a:hover,
.reading-page .apx-nav a:focus { color: var(--blue-600); text-decoration: none; }
.reading-page .apx-nav a.is-active { color: var(--blue-600); font-weight: 700; }
.reading-page .apx-nav a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px;
  height: 2px; border-radius: 99px; background: var(--blue-600);
}

/* ---------- 页面主标题区 ---------- */
.reading-header { position: relative; min-height: 105px; padding-right: 112px; }
.reading-kicker {
  margin: 0 0 4px; font-size: 12px; letter-spacing: .16em;
  font-weight: 700; color: var(--text-muted);
}
.reading-title {
  margin: 0; font-size: 32px; line-height: 1.15; font-weight: 800;
  letter-spacing: -.5px; color: var(--navy-900);
}
.reading-subtitle {
  margin: 8px 0 0; font-size: 15px; line-height: 23px;
  font-weight: 400; color: #7389A7;
}
.reading-header__mascot {
  position: absolute; right: 0; bottom: 0; width: 114px; height: auto;
  pointer-events: none;
}
.reading-header__mascot img { width: 100%; height: auto; display: block; }

/* ---------- 搜索框 ---------- */
.lc-filter { position: relative; height: 46px; margin: 5px 0 18px; }
.lc-filter-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.lc-filter-input {
  display: block; width: 100%; height: 46px; padding: 0 16px 0 42px;
  font: inherit; font-size: 15px; line-height: 22px; color: var(--navy-900);
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--border-blue);
  border-radius: 23px;
  box-shadow: 0 3px 10px rgba(62, 126, 181, .05);
  outline: none; -webkit-appearance: none; appearance: none;
}
.lc-filter-input::placeholder { color: #A6B6C9; }
.lc-filter-input:focus {
  border-color: var(--blue-400);
  box-shadow: 0 3px 10px rgba(62, 126, 181, .06), 0 0 0 4px rgba(97, 179, 249, .14);
}
.lc-filter-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--navy-700);
  pointer-events: none; display: block;
}

.lc-status {
  margin: 0 0 14px; min-height: 20px; font-size: 13px; line-height: 20px;
  font-weight: 500; color: var(--text-secondary);
}

/* ---------- 栏目 ---------- */
.lc-stations { display: block; }
.lc-station { margin: 0 0 var(--section-gap); }
.lc-station-title { margin: 0 0 var(--card-gap); }

/* ---------- 栏目标题条 ---------- */
.section-titlebar {
  height: var(--section-bar-h); min-height: var(--section-bar-h);
  padding: 0 12px; display: flex; align-items: center;
  border-radius: var(--radius-md); background: #ECF7FF;
}
.section-titlebar.is-vowel { background: #FFF0F5; }
.section-titlebar__num {
  flex: 0 0 auto; width: 38px; height: 26px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; line-height: 1; color: #FFFFFF;
  background: var(--blue-400);
}
.section-titlebar.is-vowel .section-titlebar__num { background: var(--pink-500); }
.section-titlebar__title {
  margin-left: 10px; font-size: 17px; line-height: 24px;
  font-weight: 700; color: var(--navy-800);
}
.section-titlebar__count {
  margin-left: 8px; font-size: 13px; font-weight: 500; color: #8DA1BC;
}

/* ---------- 卡片网格（3 列） ---------- */
.lc-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap); align-items: start;
}

/* ---------- 字母组合卡 ---------- */
.lc-card {
  height: var(--combo-card-h); padding: 10px 7px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  background: #FFFFFF;
  border: 1px solid var(--border-blue);
  border-radius: var(--combo-radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .96),
              0 2px 0 rgba(37, 104, 160, .13),
              0 6px 12px rgba(37, 104, 160, .07);
  cursor: pointer; font: inherit; color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms ease, box-shadow 140ms ease,
              border-color 140ms ease, background-color 140ms ease;
}
button.lc-card { width: 100%; }
.lc-card.is-vowel {
  border-color: var(--border-pink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .96),
              0 2px 0 rgba(208, 83, 126, .13),
              0 6px 12px rgba(208, 83, 126, .07);
}
.lc-card[hidden] { display: none; }

.lc-glyph {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 37px; line-height: 40px; font-weight: 700; letter-spacing: -.8px;
  white-space: nowrap; color: var(--blue-600);
}
.lc-card.is-vowel .lc-glyph { color: var(--pink-600); }
.lc-card.is-long .lc-glyph { font-size: 34px; }

.lc-ipa {
  margin-top: 2px; font-size: 19px; line-height: 24px; font-weight: 400;
  white-space: nowrap; color: var(--navy-800);
}

/* ---------- 小圆播放钮（CSS 绘制，非 emoji） ---------- */
.lc-spk {
  flex: 0 0 auto; width: var(--play-combo); height: var(--play-combo);
  margin-top: 6px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--blue-400);
  box-shadow: 0 0 0 4px rgba(97, 179, 249, .12);
  transition: transform 120ms ease;
}
.lc-spk::before {
  content: ""; width: 0; height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #FFFFFF;
  transform: translateX(1px);
}
.lc-card.is-vowel .lc-spk {
  background: var(--pink-400);
  box-shadow: 0 0 0 4px rgba(250, 127, 168, .12);
}
.lc-card:hover .lc-spk,
.lc-reading:hover .lc-spk { transform: scale(1.04); }
.lc-card:active .lc-spk,
.lc-reading:active .lc-spk { transform: scale(.96); }

/* ---------- 多读音卡（th / oo / ea …） ---------- */
.lc-card.is-multi { height: auto; min-height: var(--combo-card-h); padding: 9px 7px 9px; }
.lc-card.is-multi .lc-glyph { font-size: 32px; line-height: 34px; }
.lc-readings {
  display: flex; flex-direction: column; gap: 4px;
  align-items: center; width: 100%; margin-top: 3px;
}
.lc-reading {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 84px; height: 28px; padding: 0 5px 0 9px;
  background: #EEF7FF; border: 0; border-radius: 14px;
  cursor: pointer; font: inherit; color: inherit;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82),
              0 2px 4px rgba(37, 104, 160, .08);
  transition: transform 140ms ease, box-shadow 140ms ease,
              background-color 140ms ease;
}
.lc-reading.is-vowel {
  background: #FFF0F5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82),
              0 2px 4px rgba(208, 83, 126, .08);
}
.lc-reading .lc-ipa { margin-top: 0; font-size: 15px; line-height: 20px; color: var(--blue-600); }
.lc-reading.is-vowel .lc-ipa { color: var(--pink-600); }
.lc-reading .lc-spk { width: 20px; height: 20px; margin-top: 0; box-shadow: none; }
.lc-reading .lc-spk::before {
  border-top-width: 3px; border-bottom-width: 3px; border-left-width: 5px;
}
.lc-reading.is-vowel .lc-spk { background: var(--pink-400); }

/* ---------- 状态 ---------- */
.lc-card:focus-visible, .lc-reading:focus-visible {
  outline: 3px solid rgba(22, 105, 222, .28); outline-offset: 2px;
}
.lc-card.is-vowel:focus-visible, .lc-reading.is-vowel:focus-visible {
  outline-color: rgba(239, 62, 124, .28);
}
button.lc-card:active,
.lc-reading:active,
.lc-card.is-single.playing,
.lc-reading.playing {
  transform: translateY(2px);
}
button.lc-card:active,
.lc-card.is-single.playing {
  background: #EDF7FF;
  border-color: var(--blue-400);
  box-shadow: inset 0 2px 6px rgba(37, 104, 160, .17),
              inset 0 1px 0 rgba(255, 255, 255, .55),
              0 1px 2px rgba(37, 104, 160, .05);
}
button.lc-card.is-vowel:active,
.lc-card.is-vowel.playing {
  background: #FFF0F5;
  border-color: var(--pink-400);
  box-shadow: inset 0 2px 6px rgba(208, 83, 126, .17),
              inset 0 1px 0 rgba(255, 255, 255, .55),
              0 1px 2px rgba(208, 83, 126, .05);
}
.lc-reading:active,
.lc-reading.playing {
  background: #DCEEFF;
  box-shadow: inset 0 2px 5px rgba(37, 104, 160, .22),
              inset 0 0 0 1px var(--blue-300);
}
.lc-reading.is-vowel:active,
.lc-reading.is-vowel.playing {
  background: #FFE3EC;
  box-shadow: inset 0 2px 5px rgba(208, 83, 126, .22),
              inset 0 0 0 1px var(--pink-300);
}

.lc-empty { margin: 10px 0 0; font-size: 13.5px; color: var(--text-muted); }
.lc-foot {
  margin: 24px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--text-muted);
}

/* ---------- 右上角小书本（点过这张卡之后才出现） ---------- */
/* 卡片外面套一层定位容器：小书本要 absolute 落在右上角，又不能在 <button> 里面 */
.lc-slot { position: relative; }
.lc-slot > .lc-card { width: 100%; }
.lc-slot[hidden] { display: none; }

/* 32×32 的可点区域（手机好点），里面只画一条很小的线描书本：没有底色、边框、阴影。
   内缩 6px 让图标稳稳落在 18px 圆角里面，不骑在边框上，也不碰居中的组合字母。 */
.lc-card-book {
  position: absolute; top: 0; right: 0; z-index: 2;
  width: 32px; height: 32px;
  display: grid; align-items: start; justify-items: end;
  padding: 6px 5px 0 0;
  color: #8FA6C4;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  animation: lc-book-in 150ms ease-out;
}
.lc-card-book svg { width: 12px; height: 12px; display: block; }
.lc-card-book:hover { color: var(--blue-600); }
.lc-card-book:focus-visible {
  outline: 2px solid rgba(22, 105, 222, .46);
  outline-offset: -3px;
  border-radius: 10px;
}
@media (min-width: 420px) {
  .lc-card-book svg { width: 16px; height: 16px; }
}
@media (max-width: 345px) {
  .lc-card-book { padding: 5px 4px 0 0; }
  .lc-card-book svg { width: 11px; height: 11px; }
}

@keyframes lc-book-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (min-width: 700px) {
  .page-inner { border-radius: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  button.lc-card,
  .lc-reading,
  .lc-spk { transition: none; }
  .lc-card-book { animation: none; }
}
