/* Theme controls: [data-theme-toggle], [data-paw-toggle]. Assets resolve from this file. */
html[data-theme=dark]{color-scheme:dark;--paper:#211e1d;--ink:#f5ede2;--muted:#cfc2b3;--orange:#ffac88;--line:#5b5049;--sage:#344038}
html[data-theme=dark] .tone-sage{--tile:#344038;--accent:#c8e0bb}
html[data-theme=dark] .tone-sand{--tile:#493c2f;--accent:#f4d6a2}
html[data-theme=dark] .tone-peach{--tile:#4c3430;--accent:#ffbea3}
html[data-theme=dark] .tone-lavender{--tile:#403746;--accent:#dfc6ed}
html[data-theme=dark] .tone-rose{--tile:#4b3335;--accent:#ffc0b3}
html[data-theme=dark] .guide-card,html[data-theme=dark] .game-board,html[data-theme=dark] .object-card,html[data-theme=dark] .story-choices button{background:#302b28;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .search-form,html[data-theme=dark] .article-toc nav,html[data-theme=dark] .play-banner,html[data-theme=dark] .game-hero,html[data-theme=dark] .story-card{background:#3b332e}
html[data-theme=dark] .urgent-strip,html[data-theme=dark] .urgent-box,html[data-theme=dark] .medical-note{background:#50342e;border-color:#b87e6b;color:var(--ink)}
html[data-theme=dark] .article-category strong{background:#50342e;color:#ffc6af}
html[data-theme=dark] .urgent-strip a,html[data-theme=dark] .urgent-box .eyebrow,html[data-theme=dark] .game-eyebrow,html[data-theme=dark] .game-heading>span,html[data-theme=dark] .game-link{color:#ffc6af}
html[data-theme=dark] .topic-tile p,html[data-theme=dark] .topic-heading p:not(.eyebrow),html[data-theme=dark] .article-intro,html[data-theme=dark] .medical-note p,html[data-theme=dark] .urgent-box>div>p:not(.eyebrow),html[data-theme=dark] .about-page>section p,html[data-theme=dark] .game-hero p:not(.game-eyebrow),html[data-theme=dark] .game-heading p,html[data-theme=dark] .game-welcome p,html[data-theme=dark] .game-finish p,html[data-theme=dark] .game-progress{color:var(--muted)}
html[data-theme=dark] .game-feedback:not(:empty){background:#34483a;color:#e6f4e2}
html[data-theme=dark] .object-card[aria-pressed=true]{background:#654535;border-color:#ffc6af}
html[data-theme=dark] .story-choices button:hover:not(:disabled),html[data-theme=dark] .filter:hover:not(.active),html[data-theme=dark] .fact-button:hover,html[data-theme=dark] .pet-button:hover{background:#51433b}
html[data-theme=dark] .primary,html[data-theme=dark] .closing{background:#9b432c;color:#fffaf2}
html[data-theme=dark] .primary:hover{background:#743522}
html[data-theme=dark] .closing em{color:#fffaf2}
html[data-theme=dark] .fact-copy .eyebrow,html[data-theme=dark] .source-link{color:#d2e3c7}
html[data-theme=dark] .search-form input::placeholder{color:#c7bbb0}
html[data-theme=dark] .photo-corner,html[data-theme=dark] .cat-number{color:#fff}
html[data-theme=dark] #gallery-dialog>img{background:#302b28}
html[data-theme=dark] .sun-sticker{color:#302b25}
html[data-theme=dark] .sun-sticker svg{stroke:#302b25}
html[data-theme=dark] .game-board button:focus-visible,html[data-theme=dark] .game-board a:focus-visible{outline-color:#ffbd9e}
@media(pointer:fine){html.paw-cursor body,html.paw-cursor button:not(:disabled),html.paw-cursor a,html.paw-cursor summary,html.paw-cursor label{cursor:url('assets/paw-cursor.svg') 16 16, pointer}}
.murr-companion{position:fixed;z-index:30;right:8px;bottom:0;display:flex;flex-direction:column;align-items:flex-end;max-width:calc(100vw - 16px)}
.murr-companion-left{right:auto;left:8px;align-items:flex-start}
.murr-companion-trigger{width:55px;height:51px;padding:0;border:0;background:transparent;filter:drop-shadow(0 2px 3px #0004)}
.murr-companion-trigger svg{width:100%;height:100%}
.murr-companion-panel{position:relative;width:min(240px,calc(100vw - 24px));margin-bottom:6px;padding:20px;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 25px #0003;font-size:14px}
.murr-companion-panel strong{display:block;padding-right:25px}
.murr-companion-panel nav{display:grid;gap:10px;margin-top:14px}
.murr-companion-panel a{text-decoration:underline;text-underline-offset:3px}
.murr-companion-close{position:absolute;right:9px;top:7px;border:0;background:transparent;font-size:24px;line-height:1}
body:has(dialog[open]) .murr-companion{visibility:hidden}
.murr-pet-bubble{position:absolute;top:0;left:40%;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:18px;padding:6px 12px;font-size:14px;opacity:0;pointer-events:none}
.murr-petted .murr-pet-bubble{animation:murr-bubble 1.5s ease-out both}
@keyframes murr-bubble{0%{opacity:0;transform:translateY(10px)}20%,70%{opacity:1}100%{opacity:0;transform:translateY(-28px)}}
@media(prefers-reduced-motion:reduce){body:not(.motion-on) .murr-petted .murr-pet-bubble{animation:none;opacity:1;transform:none}body:not(.motion-on) .murr-petted .cat-tail{animation:none}}
.motion-off .murr-petted .murr-pet-bubble{opacity:1;transform:none}
@media(max-width:400px){.murr-companion-trigger{width:45px;height:43px}.murr-companion-panel{font-size:13px}}
.virtual-cat[role=button]{cursor:pointer;border-radius:24px}
.virtual-cat[role=button]:focus-visible{outline:3px solid var(--orange);outline-offset:5px}
/* The head is one group and the tail pivots under the body. */
.virtual-cat .cat-head{transform-origin:150px 150px;animation:murr-idle 5s ease-in-out infinite}
.virtual-cat .cat-tail{transform-origin:215px 190px;animation:murr-tail-idle 5s ease-in-out infinite}
.virtual-cat.murr-petted .cat-head{animation:murr-head 1.1s ease-in-out}
.virtual-cat.murr-petted .cat-tail{animation:murr-tail 1.1s ease-in-out}
.virtual-cat.murr-petted .cat-heart,.virtual-cat.happy.murr-petted .cat-heart{animation:murr-heart 1.1s ease-out both}
@keyframes murr-idle{50%{transform:rotate(2deg)}}
@keyframes murr-tail-idle{50%{transform:rotate(-5deg)}}
@keyframes murr-head{0%,100%{transform:rotate(0)}35%{transform:rotate(-6deg)}70%{transform:rotate(4deg)}}
@keyframes murr-tail{0%,100%{transform:rotate(0)}25%,75%{transform:rotate(-9deg)}50%{transform:rotate(5deg)}}
@keyframes murr-heart{0%{opacity:0;transform:scale(.5) translateY(10px)}30%{opacity:1;transform:scale(1.4)}100%{opacity:0;transform:scale(1) translateY(-55px)}}
@media(pointer:fine){
 html.paw-cursor :is(a[href],button:not(:disabled),summary,label,input:not(:disabled),select:not(:disabled),textarea:not(:disabled),[role=button]){cursor:url('assets/paw-hover.svg') 16 16,pointer}
 html.paw-cursor :is(a[href],button:not(:disabled),summary,label,input:not(:disabled),select:not(:disabled),textarea:not(:disabled),[role=button]):active{cursor:url('assets/paw-pressed.svg') 16 16,pointer}
}
@media(prefers-reduced-motion:reduce){body:not(.motion-on) .virtual-cat .cat-head,body:not(.motion-on) .virtual-cat .cat-tail,body:not(.motion-on) .virtual-cat.murr-petted .cat-heart{animation:none!important}}
