/* Watercolor objects sit on little paper keepsakes, like an illustrated picture book. */
.ranch-bottom{z-index:5;gap:14px;bottom:14px;align-items:end}
.action-tile.illustrated-command{
 --command-wash:#f6d7c8;--command-edge:#d7af91;--command-tilt:-1deg;
 position:relative;display:block;flex:1;min-width:0;height:150px;min-height:0;
 padding:0;border:0;border-radius:0;background:none;box-shadow:none;
 transform:rotate(var(--command-tilt));filter:none;isolation:isolate;
 transition:transform .2s,filter .2s;
}
.illustrated-command.honey{--command-wash:#f6e4ae;--command-edge:#d5b36b;--command-tilt:1.3deg}
.illustrated-command.lilac{--command-wash:#e0def0;--command-edge:#b6a9ca;--command-tilt:-.8deg}
.illustrated-command.sage{--command-wash:#dce8ce;--command-edge:#a1b78b;--command-tilt:1deg}
.illustrated-command.apricot{--command-wash:#f2dbb6;--command-edge:#c9a36e;--command-tilt:-1.3deg}
.illustrated-command:hover:not(:disabled){transform:translateY(-5px) rotate(0);filter:brightness(1.025)}
.illustrated-command:active:not(:disabled){transform:translateY(1px) rotate(0)}
.command-paper{position:absolute;inset:32% 0 0;width:100%;height:68%;overflow:visible;z-index:-1;filter:drop-shadow(0 3px 1px #6e4e3433);pointer-events:none}
.paper-edge{fill:#fff9e8;stroke:var(--command-edge,#d1b389);stroke-width:1.5;stroke-linejoin:round}
.paper-wash{fill:var(--command-wash,#f4e2bb);opacity:.9}
.paper-stitch{fill:none;stroke:#fffdf2;stroke-width:1.6;stroke-dasharray:3 3;stroke-linecap:round;opacity:.8}
.paper-fold{fill:var(--command-edge,#d1b389);opacity:.35}
.command-art{position:absolute;display:block;left:50%;top:0;transform:translateX(-50%) rotate(calc(var(--command-tilt) * -1));height:94px;width:81%;filter:drop-shadow(0 3px 1px #6a50351c);pointer-events:none;transition:transform .2s}
.illustrated-command:hover:not(:disabled) .command-art{transform:translateX(-50%) translateY(-2px) rotate(-3deg)}
.command-caption{position:absolute;bottom:15px;left:5%;right:5%;text-align:center;pointer-events:none}
.illustrated-command .command-caption b{font-size:22px;line-height:1.3;letter-spacing:.12em;text-shadow:0 1px #fff9ee}
.illustrated-command .command-caption small{font-size:10px;line-height:1.4;margin-top:2px;opacity:1;color:#78614b}
.action-tile.illustrated-command.promotion-ready{background:none;box-shadow:none;border:0;--command-wash:#ffe49a;--command-edge:#bb802e}
.promotion-ready .command-paper{filter:drop-shadow(0 0 4px #ffdf83) drop-shadow(0 3px 1px #6e4e3433)}
.command-seal{position:absolute;right:3%;top:16%;display:grid;place-content:center;width:30px;height:34px;background:#c47150;color:#fff8e7;font-size:10px;clip-path:polygon(0 0,100% 0,96% 100%,50% 83%,4% 100%);transform:rotate(10deg)}
.ranch{border-color:#fffaf0;box-shadow:0 0 0 1px #d4c09a,0 6px 0 #d4c4a140,0 12px 24px #5b482224}
.ranch .identity{border-radius:16px 10px 18px 11px;transform:rotate(-.7deg);background:#fffaec}
.ranch .identity:before{content:'';position:absolute;width:44px;height:12px;left:35%;top:-7px;background:repeating-linear-gradient(90deg,#d6debcbb 0 4px,#e7edcfbb 4px 8px);transform:rotate(-4deg);clip-path:polygon(0 0,100% 5%,97% 40%,100% 100%,0 94%,3% 50%)}
.ranch .date-card{background:#fff9e8;border-radius:5px 6px 13px 10px;border-top:8px solid #d6b697;transform:rotate(1deg)}
.ranch .date-card:before{content:'';position:absolute;top:-14px;left:18%;right:18%;height:12px;background:radial-gradient(ellipse at center,#84775f 0 32%,transparent 36%) left center/7px 100% no-repeat,radial-gradient(ellipse at center,#84775f 0 32%,transparent 36%) right center/7px 100% no-repeat}
.ranch .money-card{border-radius:10px 19px 12px 20px;background:#fff5dc;border-style:dashed;transform:rotate(-1deg)}
.ranch .money-card>span{display:grid;place-content:center;width:30px;height:30px;border:2px dotted #c6a25c;border-radius:50%;font-size:19px}
.ranch .ranch-sidebar{border:1px solid #d8c7a9;border-radius:5px 12px 8px 15px;background:repeating-linear-gradient(transparent 0 27px,#d5c4a319 27px 28px),#fff9eb}
.ranch .ranch-sidebar{scrollbar-width:thin;scrollbar-color:#c0b08a #efe5cd}
.ranch-sidebar .section-title{background:#e6ebd7;color:#6d7654;letter-spacing:.07em;padding:7px 8px;margin:-5px -7px 13px;border-radius:3px;transform:rotate(-1deg);border-block:1px dashed #c7d0ad}
.ranch-tools .side-tool{border:1px dashed #ceb99a;border-radius:5px 13px 6px 11px;background:#fffae9f0;transform:rotate(1.5deg);box-shadow:0 3px 2px #5c482526}
.ranch-tools .side-tool:nth-child(even){transform:rotate(-1.5deg)}
.ranch .speech{border:1px solid #d3bd9e;border-radius:45% 13px 40% 16px / 17px 40% 17px 43%;padding:13px 21px}
.ranch-shell .ranch-footer{margin:8px 8px 0;padding:9px 5px 12px;border-bottom:1px dashed #ccb996}

/* A new save opens as a short, saved picture-book prologue. */
body.modal-open{overflow:hidden}
.modal:focus{outline:none}
.story-shade{background:linear-gradient(#eaf0dfc9,#e9dcbecf),url('assets/ranch.png') center/cover;padding:20px;backdrop-filter:blur(3px)}
.modal.story-modal{max-width:1080px;max-height:94dvh;background:#fff9e9;border:5px solid #fffdf3;border-radius:8px 23px 12px 20px;box-shadow:0 0 0 1px #d0bfa0,0 20px 70px #4f49394a;padding:30px}
.story-modal:has(.story-page){padding:0;overflow:auto}
.story-page{position:relative;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:35px;min-height:min(530px,80dvh);padding:42px 50px;background:radial-gradient(ellipse at 77% 40%,#eff1d891,transparent 52%),radial-gradient(ellipse at 12% 80%,#f4dfbc50,transparent 40%)}
.story-page:before,.story-page:after{content:'✿';position:absolute;font-size:22px;color:#aebf9180;pointer-events:none}
.story-page:before{left:17px;top:18px;transform:rotate(-20deg)}
.story-page:after{right:20px;bottom:15px;transform:rotate(25deg);color:#dfb6a280}
.story-copy{position:relative;z-index:1;min-width:0}
.story-chapter{display:flex;gap:12px;align-items:center;margin-bottom:28px;font-size:10px;letter-spacing:.08em;color:#8f896c;flex-wrap:wrap}
.story-chapter i{display:block;width:29px;height:1px;background:#c5b798}
.story-modal .story-copy h2{font-size:clamp(27px,3.1vw,42px);font-weight:700;line-height:1.55;letter-spacing:.08em;color:#5e4833;margin:0 0 16px}
.story-modal .story-copy>p{font-size:14px;line-height:2.1;color:#7d715a;margin:14px 0}
.story-modal p.story-whisper{font-size:12px;color:#9c8d73}
.story-next.btn{background:#718a63;color:#fffdf0;border:1px solid #5e7951;border-radius:7px 15px 8px 13px;padding:13px 22px;min-height:46px;box-shadow:0 3px 0 #41583f35;font-size:14px;margin-top:12px;letter-spacing:.04em}
.story-next.btn:hover{background:#617e56}
.story-back.btn{display:block;border:0;box-shadow:none;background:none;font-size:11px;color:#958368;padding:7px 0;min-height:32px;margin-top:10px}
.story-art{position:relative;min-width:0;display:grid;place-items:center;aspect-ratio:1/1;width:100%;max-width:350px;justify-self:center}
.story-art>.artwork-frame{width:86%;height:86%;position:relative;filter:drop-shadow(0 7px 1px #79674214);animation:story-float 4s ease-in-out infinite}
.story-art>.sprite-wrap{width:84%;animation:story-appear .8s ease-out both}
.magic-orbit{position:absolute;left:7%;right:7%;bottom:12%;height:25%;border:2px dashed #cfb370;border-radius:50%;transform:rotate(-7deg);background:radial-gradient(ellipse,#f7d48444,transparent 70%);box-shadow:0 0 25px #f7db9c42}
.magic-spark{position:absolute;color:#d3ab57;animation:story-spark 3s ease-in-out infinite;font-size:27px}
.spark-one{top:8%;right:12%}.spark-two{top:31%;left:6%;font-size:35px;animation-delay:-1s}.spark-three{bottom:14%;right:5%;font-size:18px;animation-delay:-2s}
.story-art-note{position:absolute;bottom:0;left:0;right:0;text-align:center;color:#a18e6e;font-size:12px;letter-spacing:.25em;transform:rotate(-4deg)}
.story-options{display:grid;grid-template-columns:1fr 1fr;gap:15px;align-items:center;min-width:0}
.story-option{--command-wash:#e7ecd4;--command-edge:#bcc7a3;position:relative;min-width:0;height:260px;padding:0 13px 22px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;isolation:isolate;transform:rotate(-2deg);transition:transform .2s}
.story-option.photo-option{--command-wash:#f3dfce;--command-edge:#d5b59a;transform:rotate(2deg)}
.story-option:hover{transform:translateY(-5px) rotate(0)}
.story-option .command-paper{inset:18% 0 0;height:82%}
.story-option b{font-size:17px;margin:12px 0 8px;white-space:nowrap}
.story-option small{font-size:10px;line-height:1.6}
.story-option-art{display:block;width:100%;height:130px;filter:drop-shadow(0 3px 1px #96724a17)}
.story-photo{background:#fffdf5;width:115px;height:127px;padding:9px 9px 18px;transform:rotate(-6deg);box-shadow:0 3px 5px #4f49392b;border:1px solid #dfd1b6;display:flex;flex-direction:column;justify-content:space-between}
.story-photo>span{display:grid;place-content:center;background:radial-gradient(ellipse,#d9e4c7,#e6eddc);height:83px;color:#819a73;font-size:37px}
.story-photo i{font-size:7px;font-style:normal;letter-spacing:.08em;color:#a59b85}
.story-options>p{grid-column:1/-1;text-align:center;font-size:10px;margin:0!important}
.story-modal .check-row{background:#ecefdc;border:1px dashed #bdc5a5;padding:12px;font-size:12px!important;flex-wrap:wrap}
.story-modal .check-row small{font-size:10px;color:#8a8d73}
.story-pet-note{font-size:12px;line-height:1.9;background:#f0ecda;padding:10px 15px;border-left:3px solid #bbbd94;border-radius:3px 9px 6px 8px;margin:17px 0}
.story-dialogue{position:relative;background:#fffcf1;border:1px solid #d6c4a4;border-radius:16px 5px 19px 8px;padding:27px 26px 20px;box-shadow:0 6px 0 #d6c4a424}
.speaker-label{position:absolute;left:22px;top:-13px;background:#dce5cc;border:1px solid #becaa8;padding:5px 17px;border-radius:3px 9px 3px 8px;font-size:12px;color:#68775a}
.story-modal .story-dialogue p{font-size:17px;line-height:2;color:#725a40;margin:8px 0 18px}
.story-voice .story-dialogue{transform:rotate(-1deg)}
.story-new-friends{grid-template-columns:1fr 1.05fr;align-items:end;gap:8px;aspect-ratio:auto;padding:20px 0 40px;background:radial-gradient(ellipse at 50% 80%,#e1e8ca,transparent 70%)}
.story-new-friends>.owner-portrait{width:100%;height:auto;aspect-ratio:1;border:3px solid #fffdf3;box-shadow:0 3px 0 #c7b69266;transform:rotate(-5deg)}
.story-new-friends>.sprite-wrap{width:100%;margin-bottom:-8px}
.story-new-friends>span:last-child{position:absolute;bottom:0;font-size:11px;text-align:center;width:100%;color:#8a765b}
.story-departure .story-dialogue{padding:16px 20px 8px;margin-top:27px}
.story-departure .story-dialogue p{font-size:14px;margin:8px 0}
.story-form-chapter{display:block;font-size:11px;letter-spacing:.13em;color:#8b9272;margin:0 0 12px;padding-bottom:10px;border-bottom:1px dashed #cbbd9e}
.story-owner-editor .owner-tabs[hidden]{display:none}
.story-owner-editor>.modal-actions{align-items:center;justify-content:space-between}
.story-owner-editor .owner-appearance{border-radius:7px 15px 8px 18px;border:1px dashed #d1c19f;background:#f0eddc}
.story-owner-editor .rival-edit-preview{background:#e9eddb;border-radius:7px 14px 9px 18px}
@keyframes story-float{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-7px) rotate(0)}}
@keyframes story-spark{0%,100%{opacity:.4;transform:scale(.8)}50%{opacity:1;transform:scale(1.12)}}
@keyframes story-appear{from{opacity:0;transform:translateY(12px) scale(.85)}to{opacity:1;transform:translateY(0) scale(1)}}

@media(orientation:landscape) and (max-height:650px){
 .ranch-bottom{bottom:8px;gap:8px}
 .action-tile.illustrated-command{height:103px}
 .command-art{height:63px;width:86%}
 .command-caption{bottom:12px}
 .illustrated-command .command-caption b{font-size:15px;line-height:1.25}
 .illustrated-command .command-caption small{font-size:8px;margin-top:1px}
 .ranch-sidebar .section-title{font-size:8px;padding:4px;margin:0 0 8px}
 .story-shade{padding:10px}
 .story-page{gap:20px;padding:22px 35px;min-height:min(440px,85dvh)}
 .story-chapter{margin-bottom:14px;font-size:9px}
 .story-modal .story-copy h2{font-size:29px;line-height:1.45;margin-bottom:10px}
 .story-modal .story-copy>p{font-size:12px;line-height:1.8;margin:10px 0}
 .story-art{max-width:260px}
 .story-option{height:220px}.story-option-art{height:100px}
 .story-photo{height:104px;width:95px}.story-photo>span{height:65px;font-size:30px}
 .story-modal .story-dialogue p{font-size:15px}
 .story-next.btn{margin-top:7px;min-height:42px;padding:10px 18px;font-size:13px}
}
@media(orientation:landscape) and (max-height:450px) and (max-width:1100px){
 .ranch .mobile-status{border-radius:5px 12px 7px 13px;background:#fff8e8f5;border-style:dashed}
 .ranch .mobile-meta>span{border-radius:4px 9px 4px 8px;background:#fff7e3f0;border:1px dashed #d0ba95}
 .ranch .mobile-ranch-menu button{border-radius:4px 10px 5px 9px;background:#fff9eaf2;border-style:dashed;box-shadow:0 2px 1px #61512b20}
 .ranch-bottom{left:8px;right:8px;bottom:4px;gap:7px}
 .action-tile.illustrated-command{height:77px}
 .command-art{height:52px;width:75%;max-width:100px}
 .command-caption{bottom:7px}.illustrated-command .command-caption b{font-size:15px}
 .illustrated-command .command-caption small{display:none}
 .illustrated-command.promotion-ready .command-caption small{display:block;font-size:9px;line-height:1.1;margin-top:1px}
 .promotion-ready .command-art{height:44px;top:-2px}
 .command-seal{width:21px;height:25px;font-size:8px;right:9%;top:12%}
 .story-page{min-height:0;gap:20px;padding:20px 28px}
 .story-chapter{font-size:9px;margin-bottom:12px;gap:9px}
 .story-modal .story-copy h2{font-size:25px;line-height:1.45;letter-spacing:.04em}
 .story-modal .story-copy>p{font-size:11px;line-height:1.7}
 .story-modal p.story-whisper{font-size:10px}
 .story-art{max-width:min(220px,57dvh)}
 .story-art-note{font-size:9px}
 .story-options{gap:8px}
 .story-option{height:180px;padding:0 6px 20px}
 .story-option-art{height:80px}.story-option b{font-size:14px;margin:5px 0}
 .story-option small{font-size:9px}.story-photo{height:84px;width:76px;padding:5px 5px 12px}.story-photo>span{height:54px;font-size:24px}.story-photo i{font-size:5px}
 .story-next.btn{font-size:12px;padding:9px 14px;min-height:40px}
 .story-modal .story-dialogue p{font-size:13px;line-height:1.8;margin-bottom:12px}
 .story-dialogue{padding:22px 19px 16px}
 .story-pet-note{margin:8px 0;font-size:11px;padding:6px 10px}
 .story-modal .check-row{padding:8px;font-size:11px!important;gap:5px}
 .modal.story-modal{padding:18px;max-height:95dvh}
 .story-modal:has(.story-page){padding:0}
}
@media(orientation:landscape) and (max-height:250px) and (max-width:1100px){
 .action-tile.illustrated-command{height:51px;min-height:45px}
 .command-art{height:32px;max-width:66px;top:-2px}
 .command-caption{bottom:5px}.illustrated-command .command-caption b{font-size:13px}
 .promotion-ready .command-art{height:24px;left:28%;top:5px}
 .promotion-ready .command-caption b{font-size:12px}
 .illustrated-command.promotion-ready .command-caption small{font-size:8px}
 .command-seal{top:3%;right:12%;height:20px;width:18px;font-size:7px}
 .story-page{padding:15px 25px;gap:24px}
 .story-chapter{margin-bottom:7px;font-size:8px}
 .story-modal .story-copy h2{font-size:21px;margin-bottom:6px;line-height:1.4}
 .story-modal .story-copy>p{margin:5px 0;font-size:10px}
 .story-call .story-whisper{display:none}
 .story-next.btn{min-height:36px;padding:7px 13px;font-size:11px;margin-top:6px}
 .story-option{height:150px;padding-bottom:16px}.story-option-art{height:62px}.story-option b{font-size:12px}.story-option small{font-size:8px}
 .story-options>p{font-size:8px!important}.story-photo{width:62px;height:66px}.story-photo>span{height:42px;font-size:19px}
 .story-choose .story-copy h2{font-size:18px}.story-choose .story-copy>p,.story-choose .check-row small,.story-choose .help-line{display:none}
 .story-modal .story-dialogue p{font-size:11px;line-height:1.6;margin:3px 0 10px}
 .story-dialogue{padding:16px 14px 10px}.speaker-label{font-size:10px;top:-11px;padding:3px 12px}
 .story-departure .story-copy>p{display:none}.story-new-friends{padding-bottom:25px}
 .story-page{padding:8px 23px}
 .story-call .story-copy>p{display:none}
 .story-choose .story-option{height:120px;padding-bottom:13px}
 .story-choose .story-option-art{height:45px}
 .story-choose .story-photo{height:50px;width:49px;padding:4px 4px 8px}
 .story-choose .story-photo>span{height:32px;font-size:17px}
 .story-choose .story-photo i,.story-choose .story-options>p{display:none}
 .story-choose .check-row{margin:5px 0}
 .story-choose .story-back.btn{min-height:24px;margin-top:2px;padding:4px 0}
 .story-voice .story-dialogue{padding:13px 12px 7px}
 .story-voice .story-dialogue p{font-size:10.5px;line-height:1.45;margin:3px 0 6px}
 .story-voice .story-next.btn{min-height:32px;padding:6px 12px;margin-top:4px}
 .story-arrival .story-copy>p{display:none}
 .story-arrival .story-copy h2{font-size:18px;line-height:1.3}
 .story-arrival .story-pet-note{font-size:9px;line-height:1.25;padding:4px 7px;margin:3px 0}
 .story-arrival .story-next.btn{min-height:32px;padding:6px 10px;margin-top:4px}
 .story-departure .story-chapter{display:none}
 .story-departure .story-copy h2{font-size:18px;line-height:1.3;margin-bottom:4px}
 .story-departure .story-copy h2 br{display:none}
 .story-departure .story-dialogue{margin-top:12px;padding:10px 12px 3px}
 .story-departure .story-dialogue p{font-size:10.5px;line-height:1.4;margin:3px 0 5px}
 .story-departure .story-next.btn{min-height:32px;padding:6px 12px;margin-top:4px}
 .story-departure .story-back.btn{min-height:24px;margin-top:0;padding:4px 0;font-size:10px}
}
@media(orientation:portrait) and (max-width:640px){
 .ranch-bottom{gap:6px;bottom:10px}
 .action-tile.illustrated-command{flex:1 1 28%;height:105px}
 .command-art{height:64px;max-width:100px;width:88%}
 .command-caption{bottom:12px}.illustrated-command .command-caption b{font-size:16px}
 .illustrated-command .command-caption small{font-size:8px}
 .story-shade{padding:12px}
 .story-page{grid-template-columns:1fr;gap:18px;padding:29px 24px;min-height:0}
 .story-call .story-art{grid-row:1;width:170px}
 .story-copy{width:100%}.story-chapter{margin-bottom:15px;font-size:9px}
 .story-modal .story-copy h2{font-size:28px;line-height:1.45}
 .story-modal .story-copy>p{font-size:12px;line-height:1.8}
 .story-call .story-whisper{display:none}.story-art{max-width:190px}
 .story-art-note{font-size:10px}.story-option{height:210px;padding-bottom:20px}
 .story-option-art{height:100px}.story-option b{font-size:15px}
 .story-option small{font-size:9px}.story-options{gap:10px}
 .story-photo{width:90px;height:103px}.story-photo>span{height:65px;font-size:29px}
 .story-choose .story-copy h2 br{display:none}
 .story-modal .story-dialogue p{font-size:14px}
 .story-arrival .story-art{width:185px}
 .story-departure .story-art{max-width:220px;grid-template-columns:1fr 1fr}
 .modal.story-modal{padding:20px;max-height:94dvh}.story-modal:has(.story-page){padding:0}
 .story-owner-editor>.modal-actions{gap:2px}
}
@media(prefers-reduced-motion:reduce){.story-art>.artwork-frame,.story-art>.sprite-wrap,.magic-spark{animation:none}.illustrated-command,.command-art,.story-option{transition:none}}
