/* Release 16: source-safe recall scoring, star progression and Gomati guide. */
.star-bank{min-width:66px;height:48px;padding:5px 10px;display:flex;align-items:center;justify-content:center;gap:7px;color:#173f46;background:linear-gradient(145deg,#fffdf5,#ffe8a6);border:1px solid #fff;border-radius:15px;box-shadow:0 4px 0 #e4c15f,0 9px 18px rgba(91,70,24,.12)}
.star-bank>span:first-child{color:#e89f1f;font-size:22px;filter:drop-shadow(0 2px 0 #fff)}
.star-bank>span:last-child{display:grid;line-height:1}
.star-bank small{color:#8a6420;font-size:7px;font-weight:900;letter-spacing:.12em}
.star-bank strong{margin-top:2px;font-size:16px}
.star-bank.has-stars>span:first-child{animation:starBankGlow 2.8s ease-in-out infinite}
@keyframes starBankGlow{50%{transform:scale(1.14) rotate(7deg);filter:drop-shadow(0 0 7px rgba(232,159,31,.7))}}

.source-label,.meaning-source{color:#315e58;font-size:12px;font-weight:900;text-decoration:none}
.meaning-source{display:inline-block}
.recall-stars{display:flex;gap:5px;margin-top:9px;font-size:24px;line-height:1}
.recall-stars span{color:#d6d8d2;text-shadow:0 2px 0 #fff;transform:scale(.92)}
.recall-stars span.earned{color:#f2af26;filter:drop-shadow(0 3px 3px rgba(138,84,8,.2));animation:earnedStarIn .48s cubic-bezier(.2,.9,.3,1.25) both}
.recall-stars span.earned:nth-child(2){animation-delay:.12s}.recall-stars span.earned:nth-child(3){animation-delay:.24s}
@keyframes earnedStarIn{from{opacity:0;transform:scale(.2) rotate(-30deg)}to{opacity:1;transform:scale(1) rotate(0)}}

.quest-companion{position:fixed;z-index:120;right:clamp(9px,1.7vw,25px);bottom:clamp(12px,2vh,24px);width:clamp(116px,11vw,168px);pointer-events:none;filter:drop-shadow(0 15px 20px rgba(29,63,60,.2));transition:opacity .22s ease,transform .22s ease}
.quest-companion[hidden]{display:none!important}
.companion-art{position:relative;width:100%;aspect-ratio:683/720;padding:0;background:transparent;border:0;cursor:pointer;pointer-events:auto}
.companion-art:focus-visible{outline:4px solid #f2b22d;outline-offset:3px;border-radius:42%}
.companion-character{position:absolute;z-index:2;inset:0;display:block;transform-origin:50% 88%;will-change:transform}
.companion-pose{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;opacity:0;transform:translateY(6px) scale(.97);transition:opacity .2s ease,transform .32s cubic-bezier(.2,.75,.25,1);pointer-events:none}
.companion-pose.is-active{opacity:1;transform:none}
.companion-shadow{position:absolute;z-index:1;left:25%;right:25%;bottom:2%;height:7%;background:rgba(33,86,72,.16);border-radius:50%;filter:blur(5px);transition:opacity .26s ease,transform .34s ease}
.companion-art::before{content:"";position:absolute;z-index:0;inset:12% 4% 5%;background:radial-gradient(circle,#fff0aa 0 24%,rgba(255,220,119,.38) 46%,transparent 70%);border-radius:50%;opacity:.25;transform:scale(.7);transition:.35s ease}
.companion-bubble{position:absolute;right:54%;bottom:76%;width:min(270px,44vw);padding:12px 14px;color:#173f46;background:rgba(255,253,246,.97);border:2px solid #fff;border-radius:18px 18px 4px 18px;box-shadow:0 12px 30px rgba(23,63,70,.18);font-size:13px;font-weight:800;line-height:1.4;opacity:0;transform:translateY(8px) scale(.94);transform-origin:100% 100%;transition:opacity .22s ease,transform .22s ease}
.quest-companion.speaking .companion-bubble{opacity:1;transform:none}
.quest-companion.speaking .companion-art::before{opacity:.75;transform:scale(1)}
.quest-companion.state-welcoming .companion-character{animation:companionWelcome 1.05s cubic-bezier(.2,.85,.25,1) 1}
.quest-companion.state-guiding .companion-character{animation:companionGuide 1.15s ease-in-out 1}
.quest-companion.state-thinking .companion-character{animation:companionThink 1.45s ease-in-out 1}
.quest-companion.state-consoling .companion-character{animation:companionComfort 1.35s ease-in-out 1}
.quest-companion.state-cheering .companion-character{animation:companionCheer .76s cubic-bezier(.2,.9,.3,1.18) 2}
.quest-companion.state-cheering .companion-shadow{opacity:.35;transform:scaleX(.78)}
.quest-companion.state-cheering .companion-art::before{background:radial-gradient(circle,#fff8ba 0 22%,rgba(255,179,49,.7) 45%,transparent 72%)}
.quest-companion.state-consoling .companion-art::before{background:radial-gradient(circle,#e8fbff 0 22%,rgba(106,188,204,.35) 45%,transparent 72%)}
.companion-sparkles{position:absolute;inset:3% 2% 15%;pointer-events:none;opacity:0}.companion-sparkles b{position:absolute;width:12px;height:12px;background:#f4b126;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%)}.companion-sparkles b:nth-child(1){left:5%;top:23%}.companion-sparkles b:nth-child(2){right:7%;top:4%;transform:scale(.65)}.companion-sparkles b:nth-child(3){right:0;top:45%;transform:scale(.8)}
.quest-companion.state-cheering .companion-sparkles{opacity:1}.quest-companion.state-cheering .companion-sparkles b{animation:companionSpark .8s ease-in-out infinite alternate}.quest-companion.state-cheering .companion-sparkles b:nth-child(2){animation-delay:.2s}.quest-companion.state-cheering .companion-sparkles b:nth-child(3){animation-delay:.4s}
@keyframes companionWelcome{0%{transform:translateY(8px) scale(.94)}35%{transform:translateY(-8px) scale(1.03)}70%{transform:translateY(-3px) rotate(-2deg)}100%{transform:none}}
@keyframes companionGuide{0%{transform:translateX(6px) scale(.98)}45%{transform:translateX(-5px) translateY(-4px) scale(1.02)}100%{transform:none}}
@keyframes companionThink{0%{transform:translateY(3px) scale(.98)}48%{transform:translateY(-4px) rotate(2deg)}100%{transform:none}}
@keyframes companionComfort{0%{transform:translateY(3px) scale(.96)}45%{transform:translateY(-2px) scale(1.015)}100%{transform:none}}
@keyframes companionCheer{0%{transform:translateY(0) scale(1)}45%{transform:translateY(-24px) scale(1.08) rotate(-4deg)}100%{transform:translateY(0) scale(1) rotate(3deg)}}
@keyframes companionSpark{from{opacity:.35;transform:scale(.55) rotate(0)}to{opacity:1;transform:scale(1.1) rotate(45deg)}}

.skip-recall-button{color:#30565b;background:#fffdf7;border:1px solid #b8cbc5}.skip-recall-note{margin:9px 2px 0;color:#607579;font-size:12px;line-height:1.4;text-align:right}.final-mode .recall-actions{grid-template-columns:minmax(220px,1fr) minmax(160px,.42fr)}
.collection-filters{margin-top:16px;display:flex;gap:8px;overflow-x:auto;padding:2px 1px 8px;scrollbar-width:thin}.collection-filters button{min-height:44px;padding:0 15px;flex:0 0 auto;color:#42646a;background:#fff;border:1px solid #cbdad4;border-radius:999px;cursor:pointer;font-size:13px;font-weight:900}.collection-filters button[aria-pressed="true"]{color:#fff;background:#237b70;border-color:#237b70;box-shadow:0 4px 0 #14564f}
.level-stars{display:flex;gap:2px;margin-top:2px}.level-stars i{color:#d4ddd8;font-style:normal;font-size:15px}.level-stars i.earned{color:#f0aa22;filter:drop-shadow(0 1px 0 #fff)}.verse-level.skipped{border-style:dashed}.verse-level.skipped .level-number{background:#819893}.verse-level.skipped::after{content:"↷";position:absolute;right:9px;top:9px;display:grid;width:26px;height:26px;place-items:center;color:#fff;background:#819893;border-radius:9px;font-weight:900}
.guest-save-warning{margin:9px 0 2px;padding:10px 12px;color:#6e501d;background:#fff5d7;border:1px solid #efd38a;border-radius:12px;font-size:12px;font-weight:750;line-height:1.45}.settings-tutorial-button{width:100%;min-height:48px;color:#1e665e;background:#eff9f5;border:1px solid #bcd8cf;border-radius:13px;cursor:pointer;font-weight:900}
.ui-icon{display:grid!important;width:24px;height:24px;place-items:center;color:currentColor}.ui-icon svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.deck-button>.ui-icon:first-child{color:#eaa41c;font-size:inherit}.round-button .ui-icon{width:23px;height:23px}
.top-actions .round-button{min-width:48px;flex:0 0 48px}.home-audio{grid-template-columns:minmax(0,1fr) minmax(85px,.7fr) 44px!important}.home-audio #music-next-home{min-width:44px}.small-action,.recall-result-actions button,.review-floater button{min-height:44px}
@media(max-width:760px){.screen{padding-top:0!important}.top-actions .round-button{min-width:44px;flex-basis:44px}.home-audio{grid-template-columns:1fr 44px!important}}

@media(max-width:900px){.quest-companion{bottom:calc(84px + env(safe-area-inset-bottom));width:102px}.companion-bubble{right:45%;bottom:82%;width:min(230px,62vw);padding:10px 12px;font-size:12px}.star-bank{min-width:54px;height:44px;padding:4px 8px}.star-bank small{display:none}.final-mode .recall-actions{grid-template-columns:1fr}.skip-recall-note{text-align:left}.welcome-shell>.dialog-primary{position:static!important;margin-top:14px!important}}
@media(max-width:760px){.play-title h1{max-width:150px!important;font-size:18px!important}}
@media(max-width:340px){.play-title h1{max-width:124px!important;font-size:17px!important}}
@media(max-width:430px){.quest-companion{right:2px;width:88px;opacity:.94}.companion-bubble{right:38%;width:min(218px,66vw)}.brand-button>span:last-child{display:none}.star-bank{min-width:48px;padding:3px 7px}.star-bank>span:first-child{font-size:19px}}
@media(prefers-reduced-motion:reduce){.companion-character,.companion-pose,.companion-shadow,.companion-sparkles b,.star-bank.has-stars>span:first-child,.recall-stars span.earned{animation:none!important;transition:none!important}}
