/* The river is a remembered landscape, with the original hearth as its anchor. */
.river-play{background:#7f8c72;isolation:isolate}
.river-landscape{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center bottom;z-index:-3;filter:saturate(.79) contrast(.96);pointer-events:none}
.river-play:before{content:"";position:absolute;inset:0;z-index:-2;background:linear-gradient(180deg,#273c3920,transparent 30%,transparent 69%,#332c1e12);pointer-events:none}
.river-play:after{content:"";position:absolute;inset:0 0 24%;z-index:2;pointer-events:none;opacity:.12;background:repeating-radial-gradient(ellipse at 23% 14%,transparent 0 70px,#e7edda30 72px,transparent 74px 150px);background-size:180% 160%;animation:river-light 28s ease-in-out infinite alternate;mix-blend-mode:screen}
.water-lines,.river-stones,.river-bank,.river-word{display:none}
.river-caption{color:#f5f3e5;text-shadow:0 1px 9px #182d26;left:4.7%;top:26px;z-index:3;font-size:10px}
.river-caption .live-dot{background:#e0e5bf;box-shadow:0 0 0 4px #f4f5d61f}
.river-fieldnote{position:absolute;right:4.7%;top:24px;writing-mode:vertical-rl;font-family:var(--serif);font-size:17px;letter-spacing:.25em;line-height:1.9;color:#f5f3e5;text-shadow:0 1px 10px #162f2a;pointer-events:none}
.river-dog{width:clamp(220px,23vw,340px);height:auto;aspect-ratio:4/3;bottom:3.3%;z-index:4;filter:saturate(.82);}
.dog-illustration{position:absolute;inset:0;width:100%;height:100%;transform-origin:center bottom;transform:scaleX(var(--dog-facing,1))}
.dog-illustration img,.dog-illustration canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}
.dog-illustration canvas{visibility:hidden}.dog-illustration.rig-ready canvas{visibility:visible}.dog-illustration.rig-ready img{visibility:hidden}
.dog-illustration.rig-ready{transform:none}
.dog-ground-shadow{position:absolute;width:64%;height:5%;bottom:1%;left:19%;background:#3f35266b;filter:blur(5px);border-radius:50%;transform:scaleX(var(--shadow-scale,1));opacity:.6;pointer-events:none}
.river-dog-thought{top:-5%;left:70%;font-size:10px;border:0;border-radius:2px;background:#f1efe3e8;padding:8px 13px;z-index:5;box-shadow:0 2px 8px #25352a08}
.river-dog-thought:after{content:"";position:absolute;top:100%;left:32%;border:5px solid transparent;border-top-color:#f1efe3e8}
.river-dog.is-excited .river-dog-thought{opacity:1}.river-dog.is-sniffing .river-dog-thought{opacity:0}
.swimming-fish{width:clamp(82px,10.5vw,146px);height:62px;z-index:1;opacity:.82;filter:drop-shadow(0 9px 5px #30483240);padding:8px 0;background:none;transition:opacity .5s;}
.swimming-fish>img{display:block;width:100%;height:100%;object-fit:contain;filter:brightness(.57) saturate(.45) sepia(.13);transform:scaleY(.77);pointer-events:none;animation:fin-drift 3.6s ease-in-out infinite;}
.swimming-fish:hover{opacity:1}.swimming-fish:hover>img,.swimming-fish:focus-visible>img{filter:brightness(.83) saturate(.65);}
.swimming-fish.is-watched:after{inset:12% 10%;border-color:#e8ebd255;transform:scale(1.12,.8)}
.swimming-fish.caught{opacity:0;pointer-events:none}
.river-instruction{left:4.7%;top:60px;bottom:auto;transform:none;text-align:left;color:#fcfaee;text-shadow:0 1px 8px #20382a;z-index:3;font-size:10px;letter-spacing:.05em;pointer-events:none;}
.river-instruction small{opacity:.7;font-size:8px;margin-top:4px}
.catch-counter{right:4.7%;left:auto;bottom:24px;color:#293b32;background:#f2efdfdc;padding:14px 20px 12px;backdrop-filter:blur(8px);border:1px solid #f2efdf91;min-width:156px;}
.catch-counter>span{font-size:7px;letter-spacing:.15em}.catch-counter p{margin:3px 0 0;display:flex;align-items:baseline;gap:10px}.catch-counter b{font-family:var(--serif);font-weight:400;font-size:33px;line-height:1.2}.catch-counter p span{font-size:10px}
.reset-catch{right:4.7%;bottom:118px;font-size:9px;color:#26352a;background:#f2efdfb5;padding:7px 10px;backdrop-filter:blur(8px);border:0;}
.catch-toast{top:24px;z-index:8;background:#f3f1e4ed;border-color:#aebda1;box-shadow:0 4px 28px #162c2418}
.river-scene-label{background:#e0e5d9;padding-top:19px;padding-bottom:19px;border-top-color:#bac3b0}
.river-scene-footer{background:#e0e5d9;align-items:start;border-bottom:1px solid #b9c2b1;padding-top:19px;}
.river-scene-footer #dog-action{font-family:var(--serif);font-size:13px;letter-spacing:.08em;padding-top:5px}
.river-scene-footer>a{font-size:10px;padding-top:8px;border-bottom:1px solid #bcc7b4;padding-bottom:7px}
.call-dog{gap:40px;padding:7px 0;border-color:#899781;transition:color .2s}.call-dog:hover{color:var(--red)}
.river-bottom{padding-top:22px;padding-bottom:24px}
.companion-inner{position:relative;overflow:hidden;background:#e5e6da;min-height:460px;grid-template-columns:1.15fr 1fr;padding:45px 6% 45px 3%;gap:5%;}
.companion-inner:before{content:"";position:absolute;inset:0 48% 0 0;background:linear-gradient(90deg,#e5e6da15,#e5e6da),url('assets/images/river-memory.webp') center/cover;opacity:.21;pointer-events:none;}
.dog-portrait{height:350px;position:relative;z-index:1;display:flex;align-items:end;justify-content:center}
.portrait-art{position:relative;width:100%;max-width:420px;aspect-ratio:4/3;filter:saturate(.75);transform:rotate(-3deg);transition:transform 1s ease}
.portrait-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.portrait-look{opacity:0;transition:opacity .65s}.dog-mode .portrait-look{opacity:1}.dog-mode .portrait-art{transform:rotate(1deg)}
.dog-speech{top:8%;right:0;z-index:2;font-size:10px;background:#f1efe5ed;border-radius:2px;padding:10px 14px}
.sniff-lines{display:none}.companion-copy{position:relative;z-index:1}.companion-index{z-index:2;left:15px}
.buddy button{overflow:hidden;position:relative;background:#e7e6d9}.buddy button img{position:absolute;max-width:none;width:155px;height:auto;left:-77px;top:-2px;filter:saturate(.75)}
.story-fish-art{display:block;width:210px;height:auto;transform:rotate(-13deg);margin:40px 0 5px 10px;filter:saturate(.5)}
.memory-stamp{position:absolute;right:4.7%;bottom:20px;font-size:8px;letter-spacing:.11em;color:var(--muted)}
.motion-quiet .river-play:after,.motion-quiet .swimming-fish>img{animation:none}
.motion-quiet .river-dog{bottom:4%}.motion-quiet .river-play{height:620px}
@keyframes river-light{to{background-position:8% 13%;opacity:.21}}
@keyframes fin-drift{50%{transform:scaleY(.69) skewY(1deg)}}
@media(min-width:1600px){.companion-inner{min-height:520px}.dog-portrait{height:410px}.portrait-art{max-width:490px}}
@media(max-width:700px){
 .river-dog{width:195px;bottom:4%;}.river-landscape{object-position:49% bottom}
 .enhanced-motion .river-play{min-height:380px}.river-fieldnote{font-size:13px;right:6%;top:25px}
 .river-caption{left:6%;font-size:9px;top:25px}.river-instruction{left:6%;top:51px;font-size:8px;max-width:75%;white-space:normal}.river-instruction small{display:none}
 .swimming-fish{width:91px;height:52px}.catch-counter{right:5%;bottom:15px;min-width:105px;padding:10px 11px}.catch-counter>span{font-size:5px;letter-spacing:.11em}.catch-counter b{font-size:28px}.catch-counter p{gap:5px}.catch-counter p span{font-size:8px}
 .reset-catch{right:5%;bottom:96px;font-size:8px;padding:5px 8px}.catch-toast{top:81px;width:max-content;max-width:90%;font-size:9px}
 .river-scene-footer{padding:13px 6% 69px;gap:7px 12px}.river-scene-footer #dog-action{font-size:10px}.river-scene-footer>a{font-size:8px;width:max-content}.call-dog{font-size:9px;gap:12px}
 .river-dog-thought{font-size:8px;padding:6px 9px}.river-bottom{padding-top:17px;padding-bottom:17px}
 .companion-inner{grid-template-columns:1fr;gap:0;padding:25px 7% 37px}.companion-inner:before{inset:0 0 45%;background:linear-gradient(0deg,#e5e6da,transparent),url('assets/images/river-memory.webp') center/cover;opacity:.21}
 .dog-portrait{height:265px}.portrait-art{max-width:320px}.dog-speech{top:6%;right:-2%;font-size:8px}
 .companion-copy{text-align:center}.companion h2{font-size:30px}.buddy button img{width:127px;left:-63px;top:-1px}
 .story-fish-art{width:113px;position:absolute;right:1%;bottom:9px;margin:0}
 .motion-quiet .river-play{height:530px}.river-scene-label{font-size:7px;padding:16px 6%}
}
@media(max-height:670px) and (min-width:701px){.enhanced-motion .river-play{min-height:300px}.river-dog{width:230px}.river-scene-footer{padding-bottom:70px}}
@media(prefers-reduced-motion:reduce){.river-play:after,.swimming-fish>img{animation:none!important}.portrait-art{transition:none}.portrait-look{transition:none}}
.river-scene-footer{display:grid;grid-template-columns:1fr auto auto auto;gap:25px;align-items:center}
.river-catch-controls{display:flex;align-items:center;gap:18px}
.river-catch-controls .catch-counter{position:static;min-width:0;background:none;backdrop-filter:none;border:0;padding:0;display:flex;align-items:center;gap:12px}
.river-catch-controls .catch-counter>span{display:none}
.river-catch-controls .catch-counter p{margin:0;gap:7px}
.river-catch-controls .catch-counter b{font-size:27px;font-family:var(--serif)}
.river-catch-controls .catch-counter p span{font-size:9px;white-space:nowrap}
.river-catch-controls .reset-catch{position:static;background:none;padding:7px 0;font-size:9px;backdrop-filter:none;white-space:nowrap}
.river-scene-footer #dog-action{padding:0;font-size:12px}
.river-scene-footer>a{white-space:nowrap}
.river-play:after{animation-play-state:paused}.river-is-visible .river-play:after{animation-play-state:running}
@media(max-width:900px) and (min-width:701px){.river-scene-footer{gap:16px}.river-catch-controls{gap:10px}.river-scene-footer #dog-action{font-size:10px}.call-dog{gap:14px}}
@media(max-width:700px){
 .river-scene-footer{grid-template-columns:1fr auto;gap:10px 12px;padding-top:16px;padding-bottom:70px}
 .river-scene-footer #dog-action{grid-column:1/-1;font-size:10px;padding-bottom:3px}
 .river-catch-controls{grid-column:1;grid-row:2;gap:12px}
 .river-catch-controls .catch-counter b{font-size:24px}.river-catch-controls .catch-counter p span{font-size:8px}.river-catch-controls .reset-catch{font-size:8px}
 .river-scene-footer .call-dog{grid-column:2;grid-row:2}
 .river-scene-footer>a{grid-column:2;grid-row:3;justify-self:end;padding-top:0;font-size:8px;border:0}
 .river-dog{width:205px;bottom:3%}
 .river-scene-footer .call-dog,.river-catch-controls .reset-catch{min-height:44px;font-size:10px;align-items:center}
 .river-scene-footer>a{min-height:32px;display:flex;align-items:center;font-size:9px}
 .chapter-dock a,.chapter-dock>button{min-height:36px}
}
