/* v38 — Stories: readable small text + each story's own color carried through the card. */
.story-path-card.theme-amber,.story-chapter.theme-amber,.story-route-hero.theme-amber{--route-accent:#f0a64a}
.story-path-card.theme-rose,.story-chapter.theme-rose,.story-route-hero.theme-rose{--route-accent:#ef8aa8}
.story-path-card.theme-slate,.story-chapter.theme-slate,.story-route-hero.theme-slate{--route-accent:#a3b4cc}
.story-route-hero.theme-green{--route-accent:#73c795}.story-route-hero.theme-peach{--route-accent:#e8a77e}
.story-route-hero.theme-blue{--route-accent:#82aaf3}.story-route-hero.theme-purple{--route-accent:#bc93de}
.story-route-hero.theme-gold{--route-accent:#e0c16c}.story-route-hero.theme-teal{--route-accent:#78cfc5}

/* Shelf cards */
.story-hub .story-path-card{
  border-color:color-mix(in srgb,var(--route-accent,#78cfc5) 26%,rgba(255,255,255,.08));
  background:
    radial-gradient(120% 70% at 0% 0%,color-mix(in srgb,var(--route-accent,#78cfc5) 13%,transparent),transparent 62%),
    rgba(255,255,255,.025);
  box-shadow:inset 0 3px 0 color-mix(in srgb,var(--route-accent,#78cfc5) 70%,transparent);
}
.story-hub .story-path-card:hover,.story-hub .story-path-card.active{
  border-color:color-mix(in srgb,var(--route-accent,#78cfc5) 62%,transparent);
  background:
    radial-gradient(120% 70% at 0% 0%,color-mix(in srgb,var(--route-accent,#78cfc5) 20%,transparent),transparent 62%),
    rgba(255,255,255,.04);
}
.story-hub .path-card-kicker{font-size:12px;letter-spacing:.1em;font-weight:800}
.story-hub .path-card-english{font-size:14px;color:#c3cfdf}
.story-hub .path-arc{font-size:14px;color:color-mix(in srgb,var(--route-accent,#78cfc5) 55%,#e6edf5)}
.story-hub .story-preview-chip{
  font-size:13px;padding:5px 10px;border-radius:999px;font-weight:650;
  color:color-mix(in srgb,var(--route-accent,#78cfc5) 45%,#f2f5f9);
  border-color:color-mix(in srgb,var(--route-accent,#78cfc5) 34%,transparent);
  background:color-mix(in srgb,var(--route-accent,#78cfc5) 11%,transparent);
}
.story-hub .path-card-question{font-size:15px}
.story-hub .path-card-footer{font-size:13px;color:#c0ccdb}
.story-hub .path-card-footer span:last-child{
  padding:5px 12px;border-radius:999px;color:#10151d;
  background:var(--route-accent,#78cfc5);
}
.story-count-note{font-size:13px}
.story-hub-footnote{font-size:14px}

/* Route (reading) view */
.story-hub .story-route-hero .story-route-kicker{font-size:12px;letter-spacing:.1em;color:var(--route-accent,#78cfc5);font-weight:800}
.story-hub .story-chapter-nav a small{font-size:12px}
.story-hub .story-root-note b{font-size:13px}
.story-hub .story-root-note p{font-size:14px}
.story-hub .path-summary-translation,.story-hub .path-question-translation{font-size:14px}
.story-hub .word-story-main .word-story-pinyin{font-size:14px}
.story-hub .word-story-extra{font-size:13px;color:#a3b1c4}
.story-hub .word-story-total{font-size:13px}
.story-hub .story-node .story-pronounce-btn{font-size:13px}
.story-node-copy small{font-size:13px}
.story-word-check{font-size:14px}
.story-word-check small{font-size:13px}
.story-check-status{font-size:13px}
.story-progress{font-size:14px}
.story-pagination button,.story-pagination .story-end{font-size:14px}
.story-language-switch button{font-size:14px}
.story-hub .story-chapter-head{border-bottom-color:color-mix(in srgb,var(--route-accent,#78cfc5) 30%,transparent)}
.story-hub .story-chapter-number{color:var(--route-accent,#78cfc5);font-weight:900}

@media(max-width:760px){
  .story-hub .story-preview-chip{font-size:12px}
  .story-hub .path-card-question{font-size:14px}
}

/* v40 — word and its reading side by side; reading, meaning and book in different colors. */
.story-hub .word-story-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;min-width:0}
.story-hub .word-story-head .word-story-term{flex:0 0 auto}
.story-hub .word-story-head .word-story-pinyin{
  font-size:15px;font-weight:700;letter-spacing:.01em;
  color:color-mix(in srgb,var(--route-accent,#78cfc5) 75%,#fff);
}
.story-hub .word-story-meaning{margin-top:6px;color:#f1f4f8;font-size:15px;font-weight:600}
.story-hub .word-story-book{
  align-self:flex-start;display:inline-block;margin-top:6px;padding:2px 8px;border-radius:999px;
  font-size:12px;font-weight:800;color:#c7d1de;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);
}
.story-hub .word-story-main{display:flex;flex-direction:column;align-items:flex-start}

/* Character cards: glyph left, reading + meaning right */
.story-hub .story-node .story-node-main{flex-direction:row;align-items:center;gap:12px}
.story-hub .story-node .story-node-char{flex:0 0 auto;min-width:52px;font-size:46px}
.story-hub .story-node .story-node-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.story-hub .story-node-pinyin{font-size:16px;font-weight:800;color:color-mix(in srgb,var(--route-accent,#78cfc5) 75%,#fff)}
.story-hub .story-node-gloss{font-size:15px;font-weight:700;color:#f1f4f8;line-height:1.4}
.story-hub .story-node-copy small{color:#93a1b5}
@media(max-width:620px){
  .story-hub .story-node .story-node-main{gap:8px}
  .story-hub .story-node .story-node-char{min-width:40px;font-size:36px}
  .story-hub .story-node-pinyin{font-size:15px}
  .story-hub .story-node-gloss{font-size:14px}
  .story-hub .story-node-copy small{display:none}
}
/* Grid so the helper line runs full width under the glyph + reading block. */
.story-hub .story-node .story-node-main{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:12px;row-gap:2px;align-items:end}
.story-hub .story-node .story-node-copy{display:contents}
.story-hub .story-node .story-node-char{grid-column:1;grid-row:1 / span 2;align-self:center}
.story-hub .story-node .story-node-pinyin{grid-column:2;grid-row:1}
.story-hub .story-node .story-node-gloss{grid-column:2;grid-row:2;align-self:start}
.story-hub .story-node .story-node-copy > :not(.story-node-pinyin):not(.story-node-gloss):not(small){grid-column:2}
.story-hub .story-node .story-node-copy small{grid-column:1 / -1;margin-top:8px;font-size:12px;line-height:1.45}
