/* The purchase house belongs to the world and shares its pan/zoom coordinates. */
#homeScene{display:none}body[data-game-view=farm][data-farm-mode=plaza] #homeScene{display:block;position:absolute;left:50%;top:54%;transform:translateX(-50%);width:min(84vw,430px);height:35%;z-index:5;pointer-events:none}#homeScene [hidden]{display:none!important}#homeScene button{pointer-events:auto}body[data-game-view=farm][data-farm-mode=plaza] .world{height:100dvh;min-height:0;width:max(100%,calc(100dvh * .75))}body[data-game-view=farm][data-farm-mode=plaza] .world.has-supplied-buildings .building{bottom:51%}body[data-game-view=farm][data-farm-mode=plaza] .has-supplied-buildings .reward-tree{top:21%}body[data-game-view=farm][data-farm-mode=plaza] .world-tree-meta{top:48%}body[data-game-view=farm][data-farm-mode=plaza] #decorLayer{display:none}
.home-path{position:absolute;z-index:-1;left:63%;top:-10%;width:43%;height:100%;border:0;border-left:clamp(16px,5vw,27px) solid #cabc96;border-bottom:12px solid #cabc96;border-radius:0 0 65% 35%;transform:rotate(-18deg);opacity:.86;filter:drop-shadow(0 2px 1px #43502b66)}.home-path:after{content:'';position:absolute;inset:0 auto 0 -16px;width:12px;background:repeating-linear-gradient(0deg,transparent 0 20px,#93866d88 21px 22px);border-radius:50%}.home-empty-plot{position:absolute;left:10%;right:10%;bottom:18%;height:42%;border:clamp(5px,1.8vw,9px) solid #d2c19b;border-bottom-color:#b2a17d;border-radius:22% 18% 15% 24%;background:linear-gradient(140deg,#79984666,#4d762322);box-shadow:0 5px 3px #233e2344,inset 0 2px 2px #4b663355;transform:perspective(360px) rotateX(35deg)}.home-plot-sign{position:absolute;left:22%;right:22%;bottom:39%;padding:10px 9px;border:2px solid #ad8550;border-radius:5px;background:linear-gradient(95deg,#d3ad71,#e6c58c,#d5ae73);color:#3e321b;font:400 clamp(15px,3.5vw,19px)/1.25 Georgia,serif;text-align:center;box-shadow:0 3px 3px #19351e44}.home-plot-sign:before,.home-plot-sign:after{content:'';position:absolute;top:100%;height:23px;width:7px;background:#b48954;border-right:1px solid #916b38}.home-plot-sign:before{left:15%}.home-plot-sign:after{right:15%}
#homeScene .home-cottage{position:absolute;inset:0 4% 13%;display:block;padding:0;min-height:0;border:0;background:none;box-shadow:none;overflow:visible}.home-cottage>img{position:absolute;inset:14% 0 0;width:100%;height:86%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 5px 3px #17331a55)}.home-caption{position:absolute;top:3%;left:50%;transform:translateX(-50%);white-space:nowrap;padding:5px 14px;background:#143b2bee;border:1px solid #c5b07a;border-radius:20px;color:#f5e9c7;font:400 1rem Georgia,serif}.home-action{position:absolute;bottom:0;left:50%;transform:translateX(-50%);display:block;min-height:44px;max-width:95%;white-space:nowrap;border:1px solid #c6b27a;border-radius:25px;padding:10px 20px;background:#173b2bed;color:#f3e4bd;font-size:.875rem;box-shadow:0 3px 5px #17331e33}#homeScene[data-home-owned=true] .home-action{background:#ebd8a5;color:#193c2b;font:400 1.1rem Georgia,serif;min-width:130px}#homeScene[data-home-owned=true] .home-empty-plot{display:none}#homeScene[data-status=loading]{opacity:.75}#homeScene button:focus-visible{outline:3px solid #efda9b;outline-offset:5px}.home-placed-decor{position:absolute;transform:translate(-50%,-70%);width:46px;height:72px;min-height:0;padding:0;background:none;border:0;box-shadow:none;z-index:3}.home-placed-decor svg{display:block;width:100%;height:100%;transform:scaleX(var(--home-facing,1));filter:drop-shadow(0 3px 2px #18361e44)}#homeSceneDecorations{position:absolute;inset:8% 0 12%;pointer-events:none}
.home-decor-menu,.home-decor-placement{font-size:1rem;line-height:1.6}.home-decor-preview{display:block;width:min(100%,260px);height:180px;object-fit:contain;margin:0 auto}.home-decor-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}.home-decor-options button{display:flex;align-items:center;flex-direction:column;gap:8px;padding:12px 7px;min-width:0}.home-decor-options svg{width:45px;height:70px}.home-decor-options strong{font:400 1.05rem Georgia,serif}.home-decor-options small{font-size:.875rem;white-space:nowrap;color:#dec895}.home-owned-options{display:grid;gap:8px}.home-owned-options button{text-align:left;min-height:44px}.home-placement-preview{position:relative;height:230px;margin:10px 0 22px}.home-placement-preview>img{position:absolute;left:10%;top:8%;width:80%;height:84%;object-fit:contain}.home-placement-preview>[data-home-slot]{position:absolute;transform:translate(-50%,-50%);width:44px;height:48px;min-height:0;background:#244a2acc;border:1px solid #b4c090;border-radius:12px;padding:0;color:#efe4bc;font-size:1.2rem}.home-placement-preview>[data-home-slot][aria-pressed=true]{height:66px;border-color:#eed28e;background:#315331dd}.home-placement-preview>[data-home-slot] svg{height:60px;width:42px;transform:scaleX(var(--home-facing,1))}.home-placement-preview>[data-home-slot]:disabled{font-size:.875rem;opacity:.6}.home-placement-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px}.home-placement-controls>button{min-height:44px}.home-placement-controls>.gold{grid-column:1/-1}.home-decor-placement [role=status]{font-size:.875rem;color:#d2d9c2}#dialog:has(.home-decor-menu),#dialog:has(.home-decor-placement){width:min(530px,calc(100% - 24px));box-sizing:border-box;border-radius:22px;background:#132d22;border:1px solid #b49d67;padding:22px 18px}#dialog:has(.home-decor-menu) #dialogTitle,#dialog:has(.home-decor-placement) #dialogTitle{font:400 1.7rem Georgia,serif}
@media(max-height:650px){body[data-game-view=farm][data-farm-mode=plaza] #homeScene{top:53%;height:32%;width:min(76vw,360px)}.home-plot-sign{font-size:.875rem;padding:7px}.home-caption{font-size:.875rem;padding:4px 10px}.home-action{padding:7px 14px;min-height:40px}.home-placed-decor{width:34px;height:55px}}@media(prefers-reduced-motion:reduce){#homeScene *{animation:none!important;transition:none!important}}
/* Move the painted planter with its tree, and join the walk on the open right side. */
body[data-game-view=farm][data-farm-mode=plaza] .landscape{overflow:hidden;background:#163b27}body[data-game-view=farm][data-farm-mode=plaza] .painted-garden{transform:translateY(7%)}
.home-path{left:72%;top:-10%;width:26%;height:93%;border-left:0;border-right:clamp(16px,5vw,27px) solid #cabc96;border-bottom:12px solid #cabc96;border-radius:0 65% 48% 0;transform:rotate(-8deg)}.home-path:after{inset:0 -16px 0 auto;width:12px;background:repeating-linear-gradient(0deg,transparent 0 20px,#93866d66 21px 22px)}

.home-purchase-gift{position:absolute;left:65%;top:69%;width:36px;height:62px;transform:translate(-50%,-70%);pointer-events:none;filter:sepia(.4) saturate(1.3) drop-shadow(0 0 4px #f2c86e99)}.home-purchase-gift svg{width:100%;height:100%}.home-gift-note{padding:12px;border:1px solid #c6ad69;border-radius:12px;color:#edd49a;font-size:.9375rem}

/* Farm, neighborhood and placement previews share exactly the same yard artwork. */
#homeCottageArt{position:absolute;inset:14% 0 0}#homeCottageArt>svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 5px 3px #17331a55)}#homeCottageArt [data-home-decor]{cursor:pointer}.home-decor-preview>svg{display:block;width:100%;height:100%}.home-placement-preview{width:min(100%,340px);height:auto;aspect-ratio:170/150;margin:10px auto 22px}.home-placement-preview>.home-shared-art{display:block;width:100%;height:100%}.home-path{display:none}.home-decor-preview{height:210px}
.home-caption{top:21%}@media(max-height:650px){.home-caption{top:14%}}

/* Ground the cottage at a readable phone scale, with one vertical layout. */
body[data-game-view=farm][data-farm-mode=plaza] #homeScene{top:53%;height:36%;width:min(92vw,470px)}
#homeScene .home-cottage{inset:0 0 18%;display:flex;flex-direction:column;align-items:center;gap:3px}
#homeScene .home-caption{position:relative;top:auto;left:auto;transform:none;flex:none;align-self:center;margin:0}
#homeCottageArt{position:relative;inset:auto;flex:1;min-height:0;width:100%;isolation:isolate}
#homeCottageArt:before{content:'';position:absolute;left:16%;right:12%;bottom:2%;height:16%;border-radius:50%;background:radial-gradient(ellipse,#20391c55 0%,#273f2240 40%,#20391c00 73%);filter:blur(5px);transform:rotate(-5deg);z-index:0;pointer-events:none}
#homeCottageArt>svg{position:relative;z-index:1;filter:drop-shadow(4px 5px 2px #1d35252b)}
#homeCottageArt .town-house-contact{opacity:.4;filter:blur(1px)}#homeCottageArt .town-house-roof{filter:drop-shadow(2px 4px 1.3px #26362238)}
@media(max-height:650px){body[data-game-view=farm][data-farm-mode=plaza] #homeScene{top:52%;height:34%;width:min(88vw,420px)}#homeScene .home-cottage{bottom:21%;gap:1px}}

/* The real watering tree now grows beside the home; it is not baked into the sprite. */
body[data-game-view=farm][data-farm-mode=plaza] .has-supplied-buildings .reward-tree{left:calc(50% + min(19vw,90px));top:calc(80% - min(34vw,170px));width:min(30vw,155px);height:min(34vw,170px);transform:translateX(-50%);scale:1;z-index:6}
body[data-game-view=farm][data-farm-mode=plaza] .has-supplied-buildings .reward-tree:before{display:block;content:'';position:absolute;left:20%;right:10%;bottom:-2%;height:10%;background:radial-gradient(ellipse,#1f331a66,transparent 72%);border-radius:50%;pointer-events:none}
body[data-game-view=farm][data-farm-mode=plaza] .has-supplied-buildings .reward-tree strong,body[data-game-view=farm][data-farm-mode=plaza] .has-supplied-buildings .reward-tree-status{display:none}
#homeScene .home-cottage{right:22%}#homeCottageArt>svg.home-3d-art{filter:drop-shadow(3px 5px 2px #1d35252b)}
@media(max-height:650px){body[data-game-view=farm][data-farm-mode=plaza] .has-supplied-buildings .reward-tree{top:calc(79% - min(33vw,145px));height:min(33vw,145px);width:min(29vw,135px)}}
body[data-game-view=farm][data-farm-mode=plaza] .has-supplied-buildings .reward-tree-art{overflow:hidden;mask-image:linear-gradient(to bottom,#000 94%,transparent 100%);-webkit-mask-image:linear-gradient(to bottom,#000 94%,transparent 100%)}
#homeScene .home-purchase-gift{left:10%;top:78%}
/* A small soil bed and soft grass edge anchor the existing watering-tree roots. */
body[data-game-view=farm][data-farm-mode=plaza] .has-supplied-buildings .reward-tree:before{left:23%;right:-5%;bottom:2%;height:12%;background:radial-gradient(ellipse,#26381b47,transparent 72%);filter:blur(2px);transform:rotate(-8deg);z-index:0}
body[data-game-view=farm][data-farm-mode=plaza] .has-supplied-buildings .reward-tree:after{content:'';display:block;position:absolute;left:12%;bottom:-1%;width:72%;height:20%;background:url('/shop/tree-ground.svg?v=2') center/100% 100% no-repeat;pointer-events:none;z-index:1}
body[data-game-view=farm][data-farm-mode=plaza] .has-supplied-buildings .reward-tree[data-stage="0"]:after{left:22%;bottom:-9%}
body[data-game-view=farm][data-farm-mode=plaza] .has-supplied-buildings .reward-tree[data-stage="1"]:after{left:20%}

/* Extend the doorstep stones into the lawn, keeping the house and tree in one yard. */
#homeScene[data-home-owned=true] .home-path{display:block;left:33%;top:65%;width:24%;height:20%;border:0;border-radius:0;transform:none;opacity:.9;background:url('/shop/home-yard-path.svg?v=1') center/100% 100% no-repeat;filter:none;z-index:0;pointer-events:none}
#homeScene .home-path:after{display:none}

/* Watering status belongs to the home tree, directly below its roots. */
body[data-game-view=farm][data-farm-mode=plaza] .world-tree-meta{top:calc(80% - 8px);left:50%;font-size:.875rem;min-height:30px;gap:8px;padding:5px 10px;max-width:calc(100% - 32px)}
@media(max-height:650px){body[data-game-view=farm][data-farm-mode=plaza] .world-tree-meta{top:calc(79% - 12px);font-size:.875rem;min-height:28px;padding:4px 8px}#homeScene .home-action{bottom:-6%}}

/* A short, purely visual response to a newly confirmed daily watering. */
.home-tree-drops{position:absolute;inset:0;pointer-events:none;z-index:3;overflow:visible}
.home-tree-drops i{position:absolute;left:calc(18% + var(--drop)*9%);top:7%;width:5px;height:9px;border-radius:60% 40% 60% 40%;background:linear-gradient(135deg,#e4fcff,#58c9e8);box-shadow:0 0 3px #b7f4ff80;opacity:0;animation:home-tree-water-drop 1.25s calc(var(--drop)*.09s) ease-in both}
.tree-watering-celebration .reward-tree-art{transform-origin:44% 96%;animation:home-tree-leaves 1.8s ease-in-out both}
@keyframes home-tree-water-drop{0%{opacity:0;transform:translateY(-9px) rotate(20deg)}18%{opacity:.95}80%{opacity:.8}100%{opacity:0;transform:translateY(85px) rotate(20deg) scale(.6)}}
@keyframes home-tree-leaves{0%,100%{transform:rotate(0)}22%{transform:rotate(-1.8deg)}48%{transform:rotate(1.5deg)}72%{transform:rotate(-.7deg)}}
@media(prefers-reduced-motion:reduce){.home-tree-drops{display:none}.tree-watering-celebration .reward-tree-art{animation:none}}


/* Keep all destinations in one bottom row, including the original note gardens. */
#worldDock,.town-nav,.nh-nav{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:400px){#worldDock button>b,.town-nav button span,.nh-nav button{font-size:.75rem!important}}

/* A quiet ten-second harvest hint, anchored to the existing garden tab. */
#worldDock #worldMap{position:relative}#gardenHarvestHint{position:absolute;bottom:calc(100% - 3px);left:50%;transform:translateX(-50%);z-index:2;white-space:nowrap;padding:3px 7px;border:1px solid #bba36a99;border-radius:10px;background:#244631;color:#f5e6b7;font:400 .75rem/1.3 Arial,sans-serif;box-shadow:0 2px 4px #0c211c33;pointer-events:none}#gardenHarvestHint[hidden]{display:none!important}

/* The house itself opens its decoration menu. */
#homeScene[data-home-owned=true] #homeSceneAction{display:none!important}

/* One short celebration after an explicit, successfully saved home decoration. */
.home-decor-joy{pointer-events:none}
.home-decor-new{animation:home-decor-glint 1.5s ease-out both}
.home-decor-spark{transform-box:fill-box;transform-origin:center;opacity:0;animation:home-decor-spark 1.15s var(--spark-delay) ease-out both}
.home-happy-resident{opacity:0;animation:home-happy-arrival 1.6s ease-out both}
.home-happy-resident .town-person-wave-arm{transform-origin:4px -20px;animation:home-happy-wave 1.25s ease-in-out both}
@keyframes home-decor-glint{0%,100%{opacity:1}25%,55%{opacity:.65}}
@keyframes home-decor-spark{0%{opacity:0;transform:scale(.3)}25%{opacity:1}100%{opacity:0;transform:translateY(-7px) scale(1.1)}}
@keyframes home-happy-arrival{0%,100%{opacity:0}12%,82%{opacity:1}}
@keyframes home-happy-wave{0%,100%{transform:rotate(0)}25%,60%{transform:rotate(-140deg)}43%,78%{transform:rotate(-105deg)}}
.world.farm-camera-moving .home-decor-joy{display:none}
@media(prefers-reduced-motion:reduce){.home-decor-joy{display:none}.home-decor-new{animation:none}}

.home-placement-preview[data-layout=level2]{height:auto;aspect-ratio:auto}.home-slot-art{aspect-ratio:170/190}.home-slot-art>svg{display:block;width:100%;height:100%}.home-slot-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}.home-slot-choices [data-home-slot]{position:static;transform:none;min-height:48px;padding:8px 5px;border:1px solid #b4c090;border-radius:10px;background:#244a2a;color:#efe4bc;font:inherit;font-size:.875rem;line-height:1.3}.home-slot-choices [data-home-slot][aria-pressed=true]{border:2px solid #eed28e;background:#36543c}.home-slot-choices [data-home-slot]:disabled{opacity:.6}
