/* Story Cat's live writing desk. Native inputs remain outside the animated scene. */
body[data-game=storycat] .story-studio{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);gap:24px;width:min(1160px,100%);margin:auto;padding:24px;align-items:center}
body[data-game=storycat] .story-workbench{display:grid;grid-template-columns:minmax(130px,.7fr) minmax(0,1fr);align-items:center;gap:0;max-width:none;width:100%;min-height:0;margin:0;padding:0;border:0;background:none;overflow:visible}
body[data-game=storycat] .story-workbench .writer-figure.story-cat{position:relative;width:100%;height:auto;aspect-ratio:1;margin:0;align-self:center;animation:none;flex:none;z-index:1;filter:drop-shadow(0 10px 10px #503d2517)}
.writer-cat{display:block;width:100%;height:auto;transform-origin:50% 80%}
.writer-paw{position:absolute;left:48%;top:51%;width:24%;height:auto;overflow:visible;transform-origin:20% 15%}
.writer-star{position:absolute;right:13%;top:10%;font-size:26px;color:#c48a25;opacity:0;transform:scale(.5)}
[data-writer-state=writing] .writer-paw{animation:writer-pencil .28s ease-in-out infinite alternate}
[data-writer-state=writing] .writer-cat{animation:writer-nod 1.4s ease-in-out infinite}
[data-writer-state=writing] .writer-star,.story-cat[data-expression=cheer] .writer-star,.story-cat[data-expression=proud] .writer-star{opacity:1;transform:scale(1);transition:transform .3s,opacity .3s}
.story-notebook{min-width:0;background:#fffcf1;border:1px solid #d7c5a0;border-left:5px solid #bfa67c;border-radius:4px 16px 16px 4px;padding:20px 20px 16px;box-shadow:0 8px 0 -3px #e9dfc8,0 13px 22px #78674315}
.story-book-heading{display:flex;justify-content:space-between;gap:10px;font-size:10px;font-weight:900;letter-spacing:.07em;text-transform:uppercase;color:#8b6e42}
.story-notebook h3{font-family:Georgia,serif;font-size:23px;color:#3b4f50;line-height:1.2;margin:14px 0}
.story-manuscript{max-height:240px;min-height:115px;overflow:auto;overscroll-behavior:contain;font-family:Georgia,serif;font-size:18px;line-height:1.7;color:#35474b;scrollbar-width:thin}
.story-manuscript p{margin:0 0 14px}.story-manuscript p:last-child{margin-bottom:0}
.story-not-yet{color:#917b5b;font-style:italic}
.story-manuscript mark{color:#276761;background:#e2f0df;border-radius:3px;padding:0 2px}
.story-manuscript .story-live-word{background:#fae5a7;border-bottom:2px solid #c69131}
.story-ink-caret{display:inline-block;height:1em;border-left:2px solid #b9822b;vertical-align:-.1em;margin-left:3px;animation:writer-caret 1s steps(2,end) infinite}
.story-ink-caption{border-top:1px solid #e2d4b8;margin-top:15px;padding-top:10px;display:grid;gap:4px;font-size:12px;color:#746143;overflow-wrap:anywhere}
.story-ink-caption small{color:#536d69;font-size:11px}
body[data-game=storycat] .story-studio .story-prompt.word-game{margin:0;max-width:none;padding:24px;background:#fffdf7;border:1px solid #dedbcb;border-radius:20px;box-shadow:0 7px 0 #dedfce66}
.story-prompt .eyebrow{color:#41766d;margin:0}
.story-prompt h2{font-size:26px!important}
.story-pacing{font-size:12px;color:#64776e;text-align:center;margin-bottom:0}
body[data-game=storycat] .story-shelf.word-game{max-width:1000px;margin:20px auto;padding:24px}
.story-shelf .story-workbench{grid-template-columns:180px minmax(0,1fr);max-width:650px;margin:0 auto 24px}
.story-shelf .story-manuscript{min-height:0;max-height:95px}
.story-shelf .story-notebook h3{font-size:20px}
.story-shelf-heading{max-width:600px;margin:auto;text-align:center}
.story-shelf-heading h2{font-size:30px}.story-shelf-heading>p:last-child{color:#576a68}
.story-shelf .story-list{margin-top:18px;grid-template-columns:repeat(3,minmax(0,1fr))}
.story-shelf .story-list button{background:#fffdf6;border-color:#d3d9cb;padding:14px}
body[data-game=storycat] .story-finished.word-game{max-width:820px;background:#fcf9ec;margin:20px auto;padding:28px}
.story-finished>h2,.story-finished>.eyebrow{text-align:center}
body[data-game=storycat] .story-finished .story-workbench{display:block;width:180px;margin:-6px auto 0}
.story-finished .story-notebook{display:none}
.story-finished .story-result{font-family:Georgia,serif;font-size:21px;line-height:1.8;padding:22px 28px;background:#fffdf6;border:1px solid #e0d8be;white-space:normal}
.story-finished .story-result p{margin:0 0 18px}.story-finished .story-result p:last-child{margin-bottom:0}
@keyframes writer-pencil{from{transform:rotate(-4deg) translate(-1px,0)}to{transform:rotate(3deg) translate(1px,1px)}}
@keyframes writer-nod{50%{transform:rotate(.6deg) translateY(1px)}}
@keyframes writer-caret{50%{opacity:0}}
@media(max-width:850px){
 body[data-game=storycat] .story-studio{display:flex;flex-direction:column;gap:14px;padding:16px;margin:0 auto;max-width:620px}
 body[data-game=storycat] .story-workbench{grid-template-columns:150px minmax(0,1fr)}
 .story-notebook{padding:14px}.story-notebook h3{font-size:20px;margin:9px 0}
 .story-manuscript{font-size:16px;min-height:64px;max-height:125px}
 .story-ink-caption{margin-top:9px;padding-top:7px}.story-ink-caption small{display:none}
 body[data-game=storycat] .story-studio .story-prompt.word-game{padding:18px;width:100%}
 .story-prompt h2{font-size:23px!important;margin:7px 0}
 .story-shelf .story-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:450px){
 body[data-game=storycat] .story-studio{padding:10px;gap:10px}
 body[data-game=storycat] .story-workbench{grid-template-columns:115px minmax(0,1fr)}
 .story-book-heading{font-size:8px;letter-spacing:0}.story-notebook h3{font-size:18px}
 .story-notebook{padding:10px 12px}.story-manuscript{min-height:55px;max-height:92px;font-size:15px}
 .story-ink-caption{font-size:10px}.story-prompt .word-hint{font-size:15px}
 body[data-game=storycat] .story-shelf.word-game{margin:0;padding:16px}
 .story-shelf .story-workbench{grid-template-columns:110px minmax(0,1fr);margin-bottom:18px}
 .story-shelf-heading h2{font-size:25px}.story-shelf .story-list button{font-size:14px;padding:10px}
 body[data-game=storycat] .story-finished.word-game{padding:16px;margin:0}
 .story-finished .story-result{padding:18px;font-size:19px}
}
body[data-game=storycat].typing-compact .story-studio{display:flex;flex-direction:column;gap:4px;padding:4px 12px;margin:0 auto;max-width:650px}
body[data-game=storycat].typing-compact .story-workbench{display:grid!important;grid-template-columns:48px minmax(0,1fr);height:48px;min-height:48px;gap:6px;width:100%;margin:0}
body[data-game=storycat].typing-compact .story-workbench .writer-figure.story-cat{width:48px;height:48px;display:block}
body[data-game=storycat].typing-compact .story-notebook{padding:4px 8px;border-radius:4px 8px 8px 4px;box-shadow:none}
body[data-game=storycat].typing-compact .story-book-heading,body[data-game=storycat].typing-compact .story-notebook h3,body[data-game=storycat].typing-compact .story-ink-caption{display:none}
body[data-game=storycat].typing-compact .story-manuscript{font-size:13px;line-height:1.4;min-height:32px;max-height:32px}
body[data-game=storycat].typing-compact .story-studio .story-prompt.word-game{padding:4px 0;margin:0;border:0;background:none;box-shadow:none;border-radius:0}
body[data-game=storycat].typing-compact .story-prompt h2,body[data-game=storycat].typing-compact .story-pacing,body[data-game=storycat].typing-compact .word-examples{display:none}
body[data-game=storycat].typing-compact .story-prompt .eyebrow{font-size:10px;line-height:14px;margin:0}
body[data-game=storycat].typing-compact .story-prompt label{font-size:18px;line-height:23px;margin:2px 0}
body[data-game=storycat].typing-compact .story-prompt .word-hint{font-size:13px;line-height:17px;padding:4px 8px 4px 35px;background-size:25px;margin:3px 0;min-height:29px}
body[data-game=storycat].typing-compact .story-prompt .word-hint::before{display:none}
body[data-game=storycat].typing-compact .story-prompt input{font-size:18px;min-height:48px;height:48px;padding:8px 12px}
body[data-game=storycat].typing-compact .word-actions{margin-top:5px;gap:8px}
body[data-game=storycat].typing-compact .word-actions button{height:48px;min-height:48px;padding:8px}
@media(max-height:520px) and (orientation:landscape){
 body[data-game=storycat]:not(.typing-compact) .story-studio{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,1fr);gap:15px;max-width:1000px;padding:10px}
 body[data-game=storycat]:not(.typing-compact) .story-workbench{display:grid;grid-template-columns:105px minmax(0,1fr)}
 body[data-game=storycat]:not(.typing-compact) .story-prompt{padding:12px!important}
 body[data-game=storycat]:not(.typing-compact) .story-prompt h2,.story-pacing{display:none}
 body[data-game=storycat] .story-shelf .story-workbench{display:grid}
}
@media(prefers-reduced-motion:reduce){
 .writer-paw,.writer-cat,.story-ink-caret{animation:none!important}
 .writer-star{transition:none!important}
}
