.reading-reward{background:#fff9ec;border:1px solid #eee0bb;border-radius:20px;padding:24px;margin-bottom:24px}.reward-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}.reward-heading h2{font-size:23px;line-height:1.5}.reading-reward>p{font-size:13px;line-height:1.9;color:#716b55;margin:13px 0 18px}.reading-points{background:#fff;border:1px solid #ebdcb7;border-radius:16px;padding:12px 18px;min-width:96px;text-align:center}.reading-points strong{font-size:34px;color:#6c834d}.reading-points span{display:block;font-size:10px;white-space:nowrap;color:#7b795d;margin-top:4px}.completion-confirm{display:flex;align-items:center;gap:9px;margin:15px 0;font-size:12px;line-height:1.8;color:#6e765a}.completion-confirm input{accent-color:#4b7451}.rubric,.missing-pages{margin:18px 0 0;font-size:12px;color:#776c4f}.rubric summary,.missing-pages summary{cursor:pointer;min-height:28px}.rubric p{font-size:11px;line-height:1.9;margin:10px 0}.missing-pages ul{padding-left:20px;line-height:2}.rubric-breakdown{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:15px 0}.rubric-breakdown div{background:white;border-radius:10px;padding:12px}.rubric-breakdown strong{display:block;font-size:18px;margin-top:7px}.reward-shelf{display:flex;justify-content:space-between;align-items:center;gap:18px;background:#fff8e9;border:1px solid #ece0bf;border-radius:18px;padding:23px 27px;margin:20px 0 30px}.reward-shelf h2{font-size:20px}.reward-shelf p{font-size:12px;color:#7a755c;margin-top:9px}.reward-shelf>div:last-child{display:flex;flex-direction:column;align-items:center;gap:9px;flex-shrink:0}.reward-reveal{text-align:center}.reward-reveal>img{width:100%;max-height:52vh;object-fit:contain;border-radius:16px;margin:8px 0 18px}.reward-reveal>p{line-height:1.9}.reward-album{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin:20px 0}.reward-album article{border:1px solid #e2e6d7;border-radius:13px;overflow:hidden;background:#fbfcf7}.reward-album img{display:block;width:100%;aspect-ratio:1;object-fit:cover}.reward-album strong{display:block;font-size:13px;padding:12px 10px 4px}.reward-album small{display:block;font-size:11px;color:#7a896b;padding:0 10px 12px}.album-empty{grid-column:1/-1}.parent-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:23px 0}.parent-stats>div{background:#eff4e8;border-radius:13px;padding:17px}.parent-stats strong{display:block;font-size:28px;color:#456e50}.parent-stats span{font-size:11px;color:#768468}.reading-compare section{padding:15px 0;border-top:1px solid #e0e5d7}.reading-compare h3{font-size:16px;margin-bottom:8px}.reading-compare p{font-size:11px;line-height:1.8}dialog:has(.reward-album),dialog:has(.reward-reveal){max-width:590px;max-height:92vh;overflow:auto}
@media(max-width:650px){.reading-reward{padding:20px}.reward-heading{align-items:flex-start;gap:10px}.reward-heading h2{font-size:18px}.reading-points{padding:9px;min-width:75px}.reading-points strong{font-size:29px}.reading-points span{font-size:8px}.reading-reward>p{font-size:12px}.completion-confirm{font-size:11px;align-items:flex-start}.reading-reward>.primary,.reading-reward>.secondary{font-size:12px;padding:11px 13px}.rubric-breakdown{grid-template-columns:1fr}.rubric-breakdown div{display:flex;align-items:center;justify-content:space-between}.rubric-breakdown strong{margin:0}.reward-shelf{padding:20px;align-items:flex-start;flex-direction:column}.reward-shelf>div:last-child{flex-direction:row;gap:17px}.reward-shelf h2{font-size:18px}.reward-album{gap:11px}.reward-album strong{font-size:12px}.reward-reveal h2{font-size:22px}dialog:has(.reward-reveal){padding:32px 20px 20px}}
.library-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}.top:has(.library-actions){flex-wrap:wrap}.library-actions button{white-space:nowrap}.parent-report-link{display:flex;justify-content:flex-end;margin:-17px 0 16px}.coin-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:19px 0;text-align:left}.coin-stats>div{display:flex;align-items:center;gap:11px;padding:17px;background:#fff4d8;border:1px solid #ebd49a;border-radius:14px;color:#897047;font-size:12px}.coin-stats strong{display:block;font-size:30px;color:#9b701f;line-height:1.2;margin-top:7px;font-variant-numeric:tabular-nums}.coin-stats small{margin-left:auto;font-size:11px}.coin-symbol{display:grid;place-items:center;flex-shrink:0;width:35px;height:35px;border-radius:50%;border:3px solid #e7bb57;background:#f7d87c;color:#b28228;font-size:18px;box-shadow:inset 0 0 0 2px #fff0bf}.book-reward-limit{font-size:11px!important;color:#897249!important}.coin-tiers>div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #e8ddc4;padding:9px 0;flex-wrap:wrap}.coin-tiers span{color:#7c683f}.coin-history{font-size:12px;color:#7a755c;margin:18px 0}.coin-history summary{cursor:pointer;padding:8px 0}.coin-history>div{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid #e3e8da}.coin-history small{display:block;margin-top:6px;color:#969b85}.coin-history strong{color:#a47d2e;font-size:18px}.encouragement-card{padding:28px 22px;background:#f2f6e9;border:1px solid #e0e7d1;border-radius:18px;margin:20px 0}.encouragement-card>span{font-size:38px;color:#b9a366}.encouragement-card p{font-size:17px;line-height:2;color:#617851;margin:15px 0 0}.reward-reveal>img{max-height:36vh;margin-bottom:9px}.reward-reveal .coin-stats strong{font-size:25px}.reward-reveal .coin-stats>div{padding:13px}.reward-reveal .coin-stats{margin:12px 0}.reward-reveal>p{font-size:12px}dialog:has(.coin-stats){max-height:92vh;overflow:auto}
@media(max-width:650px){.library-actions{width:100%;gap:10px}.library-actions .reward-entry{flex:1;font-size:12px;min-height:43px}.library-actions .primary{font-size:12px;padding:10px 13px;min-height:43px}.library-actions .icon{width:17px;height:17px}.top:has(.library-actions){gap:17px}.coin-stats>div{padding:13px 10px;gap:7px;font-size:11px}.coin-stats strong{font-size:25px}.coin-symbol{width:28px;height:28px;font-size:14px}.coin-stats small{display:none}.reward-reveal .coin-stats strong{font-size:23px}.reward-reveal .coin-stats>div{padding:12px 8px}.coin-tiers>div{font-size:11px}.parent-report-link{margin-top:-12px}.reward-reveal>img{max-height:31vh}}

/* Reading celebration: large centred gift, one short burst, then a quiet reward. */
dialog:has(>.reward-reveal){inset:0;margin:auto;width:calc(100% - 40px);max-width:720px;max-height:calc(100dvh - 32px);padding:0;border:0;border-radius:28px;overflow:visible;background:transparent;box-shadow:0 24px 100px #203d3659}
dialog:has(>.reward-reveal)::backdrop{background:#243b3978;backdrop-filter:blur(7px)}
dialog:has(>.reward-reveal)>.modal-close{z-index:4;top:14px;right:14px;width:36px;height:36px;border-radius:50%;background:#fff9;color:#527769}
.reward-reveal{position:relative;z-index:1;max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;padding:38px 44px 26px;border:1px solid #fff9;border-radius:28px;background:radial-gradient(ellipse at 50% 35%,#fffdf4 0%,#faf9ed 45%,#eaf4e8 100%);animation:reward-arrive .48s cubic-bezier(.2,.8,.25,1) both}
.reward-reveal .journey-kicker{display:block;color:#617f63;letter-spacing:2px;font-size:12px}
.reward-reveal h2{font-size:32px;line-height:1.4;color:#365c48;margin:10px 0 0}
.reward-reveal .unwrap-button{display:flex;align-items:center;justify-content:center;gap:15px;min-height:58px;width:min(100%,340px);margin:0 auto 22px;border:1px solid #396c4d;border-radius:18px;background:linear-gradient(135deg,#507e53,#376b51);box-shadow:0 7px 0 #294e39,0 13px 25px #375d4324;font-size:21px;font-weight:700;letter-spacing:2px}
.reward-reveal .unwrap-button span{font-size:25px;color:#fbe4a8}
.reward-reveal .unwrap-button:hover:not(:disabled){background:#426e4b;transform:translateY(-2px)}
.reward-reveal .unwrap-button:active:not(:disabled){transform:translateY(4px);box-shadow:0 3px 0 #294e39}
.reward-reveal .unwrap-button:disabled{opacity:.75;cursor:wait}
.reward-reveal button:focus-visible{outline:3px solid #b48028;outline-offset:5px}
.reward-reveal .coin-stats{max-width:500px;margin:20px auto 12px;gap:14px}
.reward-reveal .coin-stats>div{padding:15px 18px;background:#fff8e4c9}
.reward-reveal .coin-stats strong{font-size:29px}
.reward-reveal .reward-note{max-width:490px;margin:10px auto 0;color:#7a7862;font-size:12px;line-height:1.8}
.reward-reveal .reward-done{min-height:48px;margin-top:20px;padding:12px 30px;border-radius:14px}
.reward-reveal>img{display:block;width:100%;max-height:min(38dvh,360px);margin:22px auto 10px;object-fit:contain;border-radius:20px;animation:reward-arrive .5s ease-out both}
.reward-reveal .reward-caption{font-size:15px;color:#607454;margin:10px 0 18px;line-height:1.8}
.reward-reveal .encouragement-card{max-width:510px;margin:28px auto;padding:30px 24px;background:#ffffff91}
.reward-reveal .encouragement-card p{font-size:20px}
.reward-reveal #reward-error{margin:20px 0 8px}
.blind-box-stage{position:relative;display:grid;place-items:center;width:min(100%,380px);height:294px;margin:5px auto 8px}
.blind-box-stage:before{content:'';position:absolute;bottom:14px;left:15%;width:70%;height:26px;border-radius:50%;background:#557d5920;filter:blur(8px)}
.blind-box{position:relative;width:270px;height:250px;font-size:27px;filter:drop-shadow(0 14px 13px #41765728);animation:gift-arrive .8s cubic-bezier(.2,.75,.2,1) both}
.blind-box-body{position:absolute;left:4%;right:4%;top:35%;bottom:3%;border-radius:0 0 16px 16px;background:linear-gradient(115deg,#b5dabb,#89b99a);box-shadow:inset 5px 0 0 #ffffff28,inset -7px -7px 0 #547f6414}
.blind-box-body:before,.blind-box-lid:after{content:'';position:absolute;top:0;bottom:0;left:42%;width:16%;background:linear-gradient(90deg,#e8be65,#f8de96 45%,#ebc46d)}
.blind-box-body>span{position:absolute;left:50%;top:50%;display:grid;place-items:center;width:1.65em;height:1.65em;transform:translate(-50%,-44%);border:3px solid #edcf83;border-radius:50%;background:#fff9e4;color:#a68138;font-family:Georgia,serif;font-size:1.5em;box-shadow:0 4px 10px #82683a1a}
.blind-box-lid{position:absolute;left:0;right:0;top:27%;height:19%;border-radius:9px;background:linear-gradient(115deg,#cae4c7,#a8d0b1);box-shadow:0 6px 0 #527c5824,inset 0 3px 0 #ffffff55;z-index:1}
.blind-box-lid:after{left:42.6%;width:14.8%}
.blind-box-bow{position:absolute;left:50%;bottom:95%;width:1em;height:.8em;transform:translateX(-50%);background:#eac777;border-radius:40%;box-shadow:inset 0 -4px 0 #c99b4030}
.blind-box-bow:before,.blind-box-bow:after{content:'';position:absolute;bottom:0;width:1.9em;height:1.3em;border:.32em solid #f0d38a;border-radius:60% 60% 30% 60%;box-shadow:inset 0 0 0 2px #d9af5a20}
.blind-box-bow:before{right:55%;transform:rotate(24deg);transform-origin:right bottom}
.blind-box-bow:after{left:55%;transform:rotate(-24deg);transform-origin:left bottom;border-radius:60% 60% 60% 30%}
.gift-spark{position:absolute;color:#d1a746;font-size:30px;animation:spark-arrive 1s ease-out both}
.gift-spark-one{left:3%;top:27%;transform:rotate(-12deg)}
.gift-spark-two{right:2%;top:42%;font-size:39px;color:#91b797}
.gift-spark-three{right:15%;top:6%;font-size:21px}
.is-opening .blind-box-lid{animation:gift-unwrap .55s cubic-bezier(.25,.6,.4,1) both}
.reward-confetti{position:fixed;z-index:3;inset:0;overflow:hidden;pointer-events:none}
.reward-confetti>i{position:absolute;left:50%;top:42%;width:9px;height:15px;border-radius:2px;background:var(--confetti-color);opacity:0;animation:reward-burst var(--duration) var(--delay) ease-out both}
.reward-confetti>i:nth-child(3n){width:10px;height:10px;border-radius:50%}
.reward-confetti>i:nth-child(5n){width:7px;height:19px}
@keyframes reward-arrive{from{opacity:0;transform:translateY(14px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes gift-arrive{0%{opacity:0;transform:translateY(25px) scale(.6) rotate(-9deg)}65%{opacity:1;transform:translateY(-5px) scale(1.05) rotate(3deg)}100%{opacity:1;transform:translateY(0) scale(1) rotate(0)}}
@keyframes spark-arrive{0%,25%{opacity:0;scale:.4}70%{opacity:1;scale:1.15}100%{opacity:1;scale:1}}
@keyframes gift-unwrap{0%{transform:translate(0,0) rotate(0);opacity:1}35%{transform:translate(0,-15px) rotate(-5deg);opacity:1}100%{transform:translate(24px,-100px) rotate(13deg);opacity:0}}
@keyframes reward-burst{0%{opacity:0;transform:translate3d(0,0,0) scale(.3) rotate(0)}8%{opacity:1}55%{opacity:1;transform:translate3d(calc(var(--dx)*.8),var(--dy),0) scale(1) rotate(var(--turn))}100%{opacity:0;transform:translate3d(var(--dx),calc(var(--dy) + 160px),0) scale(.7) rotate(calc(var(--turn) + 180deg))}}
@media(max-width:650px){
  dialog:has(>.reward-reveal){width:calc(100% - 24px);max-height:calc(100dvh - 24px);border-radius:24px}
  .reward-reveal{padding:38px 18px 22px;max-height:calc(100dvh - 24px);border-radius:24px}
  .reward-reveal h2{font-size:25px;margin-top:8px}
  .reward-reveal .journey-kicker{font-size:11px}
  .blind-box-stage{height:246px;margin:2px auto 4px}
  .blind-box{width:230px;height:215px;font-size:23px}
  .reward-reveal .unwrap-button{width:min(100%,300px);min-height:56px;font-size:20px;margin-bottom:20px}
  .reward-reveal .coin-stats{gap:9px;margin-top:18px}
  .reward-reveal .coin-stats>div{padding:13px 10px;gap:7px}
  .reward-reveal .coin-stats strong{font-size:25px}
  .reward-reveal .reward-note{font-size:11px}
  .reward-reveal>img{max-height:34dvh;margin-top:18px}
  .reward-reveal .reward-caption{font-size:13px;margin-bottom:14px}
  .reward-reveal .encouragement-card{padding:24px 15px;margin:24px auto}
  .reward-reveal .encouragement-card p{font-size:18px}
  .gift-spark-one{left:0}
  .gift-spark-two{right:0}
}
@media(max-height:700px){
  .reward-reveal{padding-top:30px;padding-bottom:18px}
  .blind-box-stage{height:204px;margin-top:0}
  .blind-box{width:200px;height:185px;font-size:20px}
  .reward-reveal .unwrap-button{min-height:50px;margin-bottom:16px}
  .reward-reveal .coin-stats{margin-top:16px}
}
@media(prefers-reduced-motion:reduce){
  .reward-confetti{display:none}
  .reward-reveal,.blind-box,.blind-box-lid,.gift-spark,.reward-reveal>img{animation:none!important}
}

.completion-prompt>p{line-height:1.9;color:#66735c}.completion-prompt h2{font-size:26px;color:#365c48}.completion-prompt>.primary,.completion-prompt>.secondary{display:block;width:100%;min-height:48px;margin:15px 0 10px;justify-content:center}.completion-prompt>.text-button{display:block;margin:14px auto 0}.scope-help{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.scope-help .text-button{font-size:12px;text-decoration:underline}
dialog:has(.reading-scope){max-width:720px;max-height:92dvh;overflow:auto}.reading-scope>p{font-size:13px;line-height:1.9;color:#6b765f}.scope-pages{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}.scope-page{display:grid;grid-template-columns:20px 65px 1fr;gap:10px;align-items:center;padding:12px;border:1px solid #dce4d6;border-radius:12px;cursor:pointer}.scope-page:has(input:checked){border-color:#86a780;background:#f1f7ec}.scope-page input,.scope-sync input{accent-color:#4b7451;width:18px;height:18px}.scope-page img{width:65px;height:84px;object-fit:contain;background:#fff}.scope-page span{font-size:13px;line-height:1.5;overflow-wrap:anywhere;min-width:0}.scope-page small{display:block;margin-top:7px;color:#79816b;font-size:10px}.scope-sync{display:flex;align-items:center;gap:9px;font-size:12px;line-height:1.7}.reading-scope form>.primary{min-height:48px}
@media(max-width:650px){dialog:has(.reading-scope){padding:38px 18px 22px}.scope-pages{grid-template-columns:1fr}.scope-page{grid-template-columns:20px 72px 1fr}.scope-page img{width:72px;height:93px}.completion-prompt h2{font-size:23px}}
.pet-collection-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:25px}.pet-collection-heading h3{font-size:20px;color:#3c674c}.pet-collection-heading>span{font-size:12px;color:#728261}.pet-album .pet-card{background:radial-gradient(ellipse at 50% 35%,#fffbed,#edf4e9);border-color:#dce6d4}.pet-album img{object-fit:contain;padding:14px}.pet-species{display:block;color:#7b8d70;font-size:11px;line-height:1.7}.pet-card .pet-species{padding:2px 10px}.reward-reveal>img.pet-portrait{max-height:min(37dvh,350px);padding:8px;filter:drop-shadow(0 9px 9px #47724d15);border-radius:0}.reward-reveal>.pet-species{font-size:12px;margin:0 0 8px;letter-spacing:.5px}.legacy-rewards{font-size:12px;color:#7a755c;margin:20px 0}.legacy-rewards summary{cursor:pointer;padding:8px 0}

dialog:has(.completion-blocked){max-width:620px;max-height:90dvh;overflow:auto}.completion-blocked h2{font-size:26px;line-height:1.5}.completion-blocked p,.blocked-pages{line-height:1.8;font-size:14px}.blocked-pages{padding-left:22px}.completion-blocked>.primary,.completion-blocked>.secondary{display:block;width:100%;margin-top:12px}.scope-count{font-weight:600;color:#4b7451}

/* Outfit geometry must be available before the wardrobe is first opened. */
.wardrobe-stage{position:relative;isolation:isolate;aspect-ratio:1;max-width:360px;margin:8px auto 0;border-radius:24px;background:linear-gradient(#f8faf3,#edf3e6);overflow:hidden}
.wardrobe-ground{position:absolute;width:80%;height:14%;left:10%;bottom:5%;border-radius:50%;background:#dce8d3}
.wardrobe-stage img{position:absolute;object-fit:contain;display:block;margin:0!important;max-height:none!important;border-radius:0!important}
.wardrobe-pet{width:76%!important;height:88%;left:12%;top:2%;z-index:1}
.wardrobe-layer{transform:translate(-50%,-50%);filter:drop-shadow(0 2px 1px #243e3633);user-select:none}
.reward-pet-stage{margin:0!important;max-width:none;border-radius:0}.reward-pet-stage img{padding:0!important}
