/* ActuallySpeak Kids — Home's two doors + the 📚 Story library (js/kids-library.js).
   Phone-first (390 / 360), picture first, short labels, tap targets ≥ 56px. */

/* ---------------- Home: two big doors ---------------- */
.askh-doors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 14px; }
.askh-door {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 116px; padding: 0; border: 0; background: none; font: inherit; color: var(--j-ink, #24304A); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.askh-door__arch {
  position: relative; display: grid; place-items: center; width: 100%; height: 88px;
  border-radius: 50% 50% 16px 16px / 58px 58px 16px 16px;
  border: 4px solid #8A5523; box-shadow: inset 0 0 0 3px rgba(255,255,255,.28), 0 5px 0 #5E3612, 0 10px 18px rgba(60,35,10,.22);
  overflow: hidden; transition: transform .12s ease;
}
.askh-door.is-path .askh-door__arch {
  background:
    radial-gradient(circle at 22% 78%, rgba(255,255,255,.18) 0 14px, transparent 15px),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,.14) 0 10px, transparent 11px),
    linear-gradient(180deg, #8EDC7F, #3C9C49);
}
.askh-door.is-library .askh-door__arch {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 10px, transparent 10px 22px),
    linear-gradient(180deg, #A993F5, #6447C8);
}
.askh-door__ic { font-size: 46px; line-height: 1; filter: drop-shadow(0 3px 0 rgba(0,0,0,.18)); }
.askh-door__knob { position: absolute; right: 12%; top: 54%; width: 10px; height: 10px; border-radius: 50%; background: #FFD43B; box-shadow: 0 1px 0 #8E5A0F; }
.askh-door b { font-weight: 900; font-size: 1.02em; line-height: 1.1; text-align: center; }
.askh-door:active .askh-door__arch { transform: translateY(3px); }
.askh-door.is-on .askh-door__arch { box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), 0 0 0 4px #FFD43B, 0 5px 0 #5E3612, 0 12px 22px rgba(255,190,40,.45); }
.askh-door.is-on .askh-door__ic { animation: askhDoorBob 2.6s ease-in-out infinite; }
@keyframes askhDoorBob { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-5px) scale(1.06); } 90% { transform: none; } }

/* the panel under the doors + "Switch to …" */
.askh-panel { position: relative; }
.askh-switch {
  display: flex; align-items: center; justify-content: center; gap: 4px; margin: 10px auto 0; min-height: 44px; padding: 8px 18px;
  border-radius: 999px; border: 2px dashed rgba(36,48,74,.28); background: rgba(255,255,255,.78);
  font: inherit; font-weight: 900; font-size: .86em; color: var(--j-ink-2, #5A6478); cursor: pointer;
}
.askh-switch:active { transform: translateY(2px); }

/* A2 "My Jungle World" doors */
.askh.is-a2 .askh-door b { color: #FFF3CF; text-shadow: 0 2px 0 rgba(3,26,22,.6); }
.askh.is-a2 .askh-door__arch { border-color: #C98A1F; box-shadow: inset 0 0 0 3px rgba(255,255,255,.25), 0 5px 0 #6E440D, 0 10px 18px rgba(3,26,22,.4); }
.askh.is-a2 .askh-door.is-path .askh-door__arch { background: radial-gradient(circle at 75% 25%, rgba(255,230,160,.35) 0 16px, transparent 17px), linear-gradient(180deg, #2FA58C, #0F5E4E); }
.askh.is-a2 .askh-door.is-library .askh-door__arch { background: repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 10px, transparent 10px 22px), linear-gradient(180deg, #F2B33D, #B86E0E); }
.askh.is-a2 .askh-door.is-on .askh-door__arch { box-shadow: inset 0 0 0 3px rgba(255,255,255,.3), 0 0 0 4px #FFE08A, 0 5px 0 #6E440D, 0 12px 22px rgba(255,200,80,.35); }
.askh.is-a2 .askh-switch { background: rgba(4,40,33,.55); color: #FFF3CF; border-color: rgba(255,230,160,.5); }

/* ---------------- Home: the library panel ---------------- */
.asklib-home {
  border-radius: 26px; overflow: hidden; background: #fff; border: 4px solid #6E52B8;
  box-shadow: 0 6px 0 #4E3792, 0 14px 26px rgba(78,55,146,.22); padding: 0 0 12px;
}
.asklib-home__main { display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.asklib-home__cv { display: block; }
.asklib-home__cv .asklib-cv { width: 100%; height: 180px; border-radius: 0; border: 0; box-shadow: none; }
.asklib-home__b { display: grid; gap: 8px; padding: 12px 14px 4px; }
.asklib-home__b small { font-size: .72em; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #6E52B8; }
.asklib-home__b b { font-weight: 900; font-size: 1.22em; line-height: 1.15; margin-top: -4px; }
.asklib-home__go {
  width: 100%; display: flex !important; align-items: center; justify-content: center; gap: 10px; font-size: 1.4em !important; padding: 14px 10px !important;
  background: linear-gradient(180deg, #8F74F0, #6A4FC9) !important; box-shadow: 0 5px 0 #4E3792 !important; color: #fff !important;
}
.asklib-home__go span { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #6A4FC9; display: inline-grid; place-items: center; font-size: .66em; padding-left: 3px; }
.asklib-home__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 14px 0; }
.asklib-home__mini, .asklib-home__all {
  position: relative; min-height: 64px; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 14px; background: none; cursor: pointer; font: inherit;
}
.asklib-home__mini .asklib-cv { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 14px; border-width: 2px; }
.asklib-home__mini .asklib-mk { top: auto; bottom: 4px; left: 4px; font-size: 10px; padding: 1px 6px; }
.asklib-home__all {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: #F3EFFD; border: 3px solid #B9A6EC; color: #4E3792; box-shadow: 0 3px 0 #6E52B8;
}
.asklib-home__all span { font-size: 24px; line-height: 1; }
.asklib-home__all b { font-size: .72em; font-weight: 900; line-height: 1.05; }
.asklib-home .asklib-key { margin: 12px 14px 0; width: auto; }
/* A2 */
.asklib-home.is-a2 { border-color: var(--a2-gold, #F2B33D); box-shadow: 0 7px 0 #8E5A0F, 0 18px 34px rgba(3,26,22,.5); }
.asklib-home.is-a2 .asklib-home__b small { color: #B86E0E; }
.asklib-home.is-a2 .asklib-home__go { background: linear-gradient(180deg, #2FB79A, #138169) !important; box-shadow: 0 5px 0 #0B5847 !important; }
.asklib-home.is-a2 .asklib-home__go span { color: #138169; }

/* ---------------- covers ---------------- */
.asklib-cv {
  position: relative; display: block; overflow: hidden; border-radius: 16px; aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #FFD9A8, #F39C5A);
  border: 3px solid #fff; box-shadow: 0 4px 0 rgba(60,35,10,.2), 0 8px 14px rgba(60,35,10,.12);
}
.asklib-cv.is-a2 { background: linear-gradient(135deg, var(--la, #2FA58C), color-mix(in srgb, var(--la, #2FA58C) 60%, #000)); }
.asklib-cv__fb {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 46%, rgba(255,255,255,.55) 0 34px, transparent 35px), repeating-linear-gradient(135deg, rgba(255,255,255,.12) 0 6px, transparent 6px 14px);
}
.asklib-cv.is-a2 .asklib-cv__fb { background: radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--ls, #DCF2EA) 90%, #fff) 0 34px, transparent 35px), repeating-linear-gradient(135deg, rgba(255,255,255,.1) 0 6px, transparent 6px 14px); }
.asklib-cv__fb i { font-style: normal; font-size: 42px; line-height: 1; filter: drop-shadow(0 2px 0 rgba(0,0,0,.15)); }
.asklib-cv.is-sm .asklib-cv__fb i { font-size: 28px; }
.asklib-cv.is-sm .asklib-cv__fb { background: radial-gradient(circle at 50% 46%, rgba(255,255,255,.5) 0 22px, transparent 23px); }
.asklib-cv.is-big .asklib-cv__fb i { font-size: 64px; }
.asklib-cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* marks: New! / Read ✓ / Level 2 / 🌴 */
.asklib-mk {
  position: absolute; z-index: 2; left: 6px; top: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 900; line-height: 1.4; white-space: nowrap; box-shadow: 0 2px 0 rgba(0,0,0,.2);
}
.asklib-mk.is-new { background: #FF7A1A; color: #fff; border: 2px solid #fff; }
.asklib-mk.is-read { background: #2E9E4F; color: #fff; border: 2px solid #fff; }
.asklib-mk.is-lv2 { left: 50%; top: auto; bottom: 8px; transform: translateX(-50%); background: #FFF6DA; color: #6A3E00; border: 2px solid #F2B33D; }
.asklib-mk.is-plan { left: auto; right: 6px; background: #fff; }

/* ---------------- the library screen ---------------- */
.asklib { padding-top: 12px; }
.asklib .asklib-seg { margin-bottom: 12px; }
.asklib-h { display: flex; align-items: center; gap: 8px; margin: 18px 2px 10px; }
.asklib-h__ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: #fff; box-shadow: 0 3px 0 rgba(60,35,10,.15); flex: 0 0 auto; }
.asklib-h b { font-weight: 900; font-size: 1.25em; line-height: 1.1; }
.asklib-h small { margin-left: auto; font-weight: 900; font-size: .8em; color: #2E7D3E; background: #E5F6E2; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.asklib-grp.is-lv2 .asklib-h small { color: #6A3E00; background: #FFF0C2; }
.asklib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.asklib-bk { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 56px; -webkit-tap-highlight-color: transparent; }
.asklib-bk__c { position: relative; display: block; }
.asklib-bk .asklib-cv { width: 100%; }
.asklib-bk:active .asklib-bk__c { transform: translateY(3px) rotate(-1deg); }
.asklib-bk__t {
  font-weight: 900; font-size: .9em; line-height: 1.15; padding: 0 2px; min-height: 2.3em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.asklib-bk.is-locked .asklib-cv { filter: grayscale(.6) brightness(.95); }
.asklib-bk.is-locked .asklib-bk__t { opacity: .7; }
.asklib-bk.is-nudge .asklib-bk__c { animation: asklibNo .4s ease; }
@keyframes asklibNo { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* keep reading */
.asklib-cont {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 10px 12px; min-height: 76px;
  border-radius: 20px; border: 3px solid #B9A6EC; background: linear-gradient(90deg, #F3EFFD, #fff); box-shadow: 0 4px 0 #6E52B8;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.asklib-cont .asklib-cv { width: 76px; flex: 0 0 auto; border-width: 2px; }
.asklib-cont__b { flex: 1; min-width: 0; display: grid; }
.asklib-cont__b small { font-size: .72em; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: #6E52B8; }
.asklib-cont__b b { font-weight: 900; font-size: 1.05em; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asklib-cont__go { width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: #6A4FC9; color: #fff; font-size: 18px; padding-left: 3px; box-shadow: 0 3px 0 #4E3792; }

/* 🗝️ book key meter / open button */
.asklib-key {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 60px; padding: 6px 12px; border-radius: 18px;
  background: #FFFBEF; border: 2.5px solid #F2D58A; box-shadow: 0 3px 0 #D9B45A; font: inherit; color: var(--j-ink, #24304A); text-align: left;
}
.asklib-key__ch { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; font-size: 30px; }
.asklib-key__ch img { width: 46px; height: 46px; object-fit: contain; }
.asklib-key__ch.is-shut img { filter: grayscale(.4) brightness(.95); opacity: .85; }
.asklib-key__b { flex: 1; min-width: 0; display: grid; gap: 3px; }
.asklib-key__b b { font-weight: 900; font-size: .98em; line-height: 1.15; }
.asklib-key__b small { font-weight: 800; font-size: .76em; color: var(--j-ink-2, #5A6478); }
.asklib-key__dots { display: flex; gap: 6px; }
.asklib-key__dots i { width: 14px; height: 14px; border-radius: 50%; background: #EADFC2; box-shadow: inset 0 1px 0 rgba(0,0,0,.12); }
.asklib-key__dots i.on { background: #F2B33D; box-shadow: 0 0 0 2px #fff, 0 1px 0 2px #B4741A; }
.asklib-key.is-ready {
  cursor: pointer; background: linear-gradient(180deg, #FFE38A, #F7B32B); border-color: #fff; box-shadow: 0 4px 0 #B4741A, 0 8px 18px rgba(247,179,43,.35);
  animation: asklibKey 2.4s ease-in-out infinite;
}
.asklib-key__go { width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: #fff; color: #B4741A; font-size: 16px; padding-left: 3px; }
@keyframes asklibKey { 0%, 80%, 100% { transform: none; } 88% { transform: scale(1.03); } }
.asklib-key.is-end { margin: 12px 0 4px; }
.asklib-key.is-got { background: #E5F6E2; border-color: #9BD38F; box-shadow: 0 3px 0 #5DAA55; }
.askfx-win .asklib-key.is-end { max-width: 360px; margin: 10px auto 4px; }

@media (max-width: 370px) {
  .askh-door { min-height: 108px; }
  .askh-door__arch { height: 80px; }
  .askh-door__ic { font-size: 40px; }
  .askh-door b { font-size: .94em; }
  .asklib-home__cv .asklib-cv { height: 160px; }
  .asklib-grid { gap: 12px 10px; }
  .asklib-bk__t { font-size: .84em; }
}
@media (prefers-reduced-motion: reduce) { .askh-door.is-on .askh-door__ic, .asklib-key.is-ready { animation: none; } }
html.ask-reduced .askh-door.is-on .askh-door__ic, html.ask-reduced .asklib-key.is-ready { animation: none; }

/* Oct 2026 · Listen & point picture books (js/kids-pointbooks.js) */
.asklib-cv--lp{background:linear-gradient(160deg,#FEF3C7,#FDE68A)}
.asklib-cv__lp{position:absolute;inset:8%;display:block}
.asklib-cv__lp .ask-wordart{width:100%;height:100%;border-radius:14px}
.asklib-cv__lpic{position:absolute;right:6px;bottom:6px;font-size:22px;filter:drop-shadow(0 2px 2px rgba(0,0,0,.2))}
.lp-title{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0}
.lp-title b{font-family:'Fredoka','Baloo 2',var(--font,inherit);font-size:1.05em;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.lp-dots{display:flex;gap:5px}
.lp-dots i{width:9px;height:9px;border-radius:50%;background:rgba(255,255,255,.4)}
.lp-dots i.is-done{background:#FDE68A}
.lp-dots i.is-here{background:#fff;transform:scale(1.3)}
.lp-root{padding-top:14px}
.lp-line{background:#fff;border-radius:22px;padding:14px 12px;text-align:center;box-shadow:0 6px 0 #E3DAFF;line-height:1.6}
.lp-w{border:0;background:transparent;font:inherit;font-family:'Fredoka','Baloo 2',var(--font,inherit);font-weight:700;font-size:1.7em;color:#1F2547;padding:0 3px;border-radius:10px;cursor:pointer;transition:background .15s,transform .15s}
.lp-w.is-key{color:#E11D48}
.lp-w.is-on{background:#FDE68A;transform:translateY(-2px)}
.lp-w.is-wait{background:#FCE7F3;box-shadow:inset 0 0 0 3px #F472B6;color:transparent;min-width:2.4em;animation:lpWait 1s ease-in-out infinite}
@keyframes lpWait{50%{transform:scale(1.08)}}
.lp-ask{margin:14px 0 10px;text-align:center;font-weight:900;font-size:1.15em;color:#fff;text-shadow:0 2px 0 rgba(59,26,122,.35)}
.lp-ask b{color:#FDE68A}
.lp-pics{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.lp-pic{border:4px solid #fff;border-radius:24px;padding:6px;background:#fff;cursor:pointer;box-shadow:0 6px 0 rgba(59,26,122,.18);transition:transform .25s,opacity .3s}
.lp-pic .ask-wordart{width:100%;height:auto;border-radius:18px}
.lp-pic.is-right{border-color:#22C55E;box-shadow:0 0 0 5px rgba(34,197,94,.35),0 6px 0 #15803D;transform:scale(1.03)}
.lp-pic.is-wrong{opacity:.5;animation:a2gShake .4s}
.lp-pic.is-gone{opacity:.25;transform:scale(.9)}
.lp-root.is-twist .lp-line{box-shadow:0 6px 0 #FBCFE8;background:linear-gradient(180deg,#fff,#FFF1F7)}
.lp-bar{margin-top:14px;display:flex;flex-direction:column;gap:10px;align-items:stretch}
.lp-say{align-self:center}
@media (prefers-reduced-motion:reduce){ .lp-w.is-wait{animation:none} }
.lp-bar[hidden]{display:none}
