/* Story Teller: library grid and picture-book reader. */
.st-prog { max-width: 420px; margin-bottom: 16px; }
.st-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.st-cats .chip { cursor: pointer; color: var(--ink); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.st-card { display: block; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.st-card:hover, .st-card:focus-visible { transform: translateY(-3px); box-shadow: 0 0 24px var(--glow); }
.st-card h3 { margin: 0 0 2px; font-family: var(--font-head); font-size: 19px; line-height: 1.2; }
.st-alt { margin: 0 0 6px; font-size: 14px; }
.st-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.st-meta .chip { font-size: 12px; padding: 3px 9px; }
.st-cover { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 12px 12px 0 0; }
.st-cover img, .st-cover .st-fallback { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-done { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 900; box-shadow: 0 2px 8px rgba(0,0,0,.4); }

.st-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; text-align: center; color: #fff; aspect-ratio: 3 / 2; width: 100%; }
.st-fb-emoji { font-size: clamp(40px, 8vw, 84px); filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.st-fb-title { font-family: var(--font-head); font-weight: 800; font-size: clamp(15px, 2vw, 22px); text-shadow: 0 2px 6px rgba(0,0,0,.4); }

.st-crumbs { margin-bottom: 4px; font-weight: 700; }
.st-crumbs a { color: var(--gold-2); }
.st-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.st-toolbar .tabs { margin: 0; }
.st-voice select { max-width: 260px; }

.st-book { padding: 18px; }
.st-stage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: center; min-height: 320px; }
.st-pic { border-radius: 14px; overflow: hidden; border: 2px solid var(--line); box-shadow: 0 0 30px var(--glow); }
.st-pic-img { width: 100%; height: auto; display: block; aspect-ratio: 3 / 2; object-fit: cover; }
.st-words { display: flex; flex-direction: column; gap: 14px; }
.st-text { position: relative; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 14px 48px; }
.st-text p { margin: 0 0 6px; font-size: 20px; line-height: 1.55; font-weight: 700; }
.st-flag { position: absolute; left: 14px; top: 14px; font-size: 22px; }
.st-s { border-radius: 6px; transition: background .2s, color .2s; }
.st-s.on { background: var(--gold); color: #1b1300; box-shadow: 0 0 0 3px var(--gold); }
.st-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.st-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.st-dot { width: 14px; height: 14px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: rgba(47,128,255,.25); font-size: 10px; line-height: 1; color: var(--gold); }
.st-dot.on { background: var(--gold); border-color: var(--gold); transform: scale(1.25); color: #1b1300; }

.st-finish { grid-column: 1 / -1; }
.st-finish h2 { font-family: var(--font-head); font-size: 30px; margin: 0 0 6px; }
.st-moral { font-size: 19px; font-weight: 800; color: var(--gold-2); }
.st-wordlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 18px; }
.st-word { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.st-we { font-size: 26px; }
.st-quiz .row-btns { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 760px) {
  .st-stage { grid-template-columns: 1fr; }
  .st-text p { font-size: 18px; }
  .st-nav .btn { padding-inline: 12px; }
}
